legacy/experimental/ecdb/trunk/src/ecdb.h
2008-04-07 01:04:15 +00:00

135 lines
2.6 KiB
C

#ifndef ECDB_H
#define ECDB_H
#include "config.h"
#include <Ecore.h>
#include <Ecore_Data.h>
#include <Ecore_File.h>
#include <Efreet_Mime.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <libgen.h>
#include <sys/types.h>
#include <time.h>
#include <unistd.h>
#include <limits.h>
#include <libburn/libburn.h>
#include <libisofs/libisofs.h>
#include <pthread.h>
#undef FREE
#define FREE(dat) \
{ \
if (dat) { free(dat); dat = NULL; } \
}
/* Typdefs */
typedef struct burn_source BurnSource;
typedef struct burn_disc BurnDisc;
typedef struct burn_session BurnSession;
typedef struct burn_write_opts BurnWriteOpts;
typedef struct burn_track BurnTrack;
typedef struct burn_progress BurnProgress;
typedef struct burn_drive_info BurnDriveInfo;
typedef enum burn_drive_status BurnDriveStatus;
/* ECDB Global Variables */
typedef struct _Ecdb_Main Ecdb_Main;
struct _Ecdb_Main
{
Ecore_List *projects;
Ecore_List *drives;
};
extern Ecdb_Main *em;
typedef struct _Ecdb_Drive_Info Ecdb_Drive_Info;
struct _Ecdb_Drive_Info
{
/* Speeds */
int *read_speeds;
int *write_speeds;
/* Profiles */
char *profile_name;
int profile_loaded;
/* Drive info */
char *vendor;
char *product;
char *revision;
char *location;
unsigned char read_dvdram:1;
unsigned char read_dvdr:1;
unsigned char read_dvdrom:1;
unsigned char read_cdr:1;
unsigned char read_cdrw:1;
unsigned char write_dvdram:1;
unsigned char write_dvdr:1;
unsigned char write_cdr:1;
unsigned char write_simulate:1;
BurnDriveInfo *tangible;
};
typedef struct _Ecdb_Project_Info Ecdb_Project;
struct _Ecdb_Project_Info
{
/* Files are important here */
Ecore_List *files;
/* Ids */
char *volume_id;
char *publisher_id;
char *data_preparer_id;
char *system_id;
char *application_id;
char *copywrite_id;
char *abstract_id;
char *biblio_id;
/* iso options */
unsigned char iso_level:1;
unsigned char use_joliet:1;
unsigned char use_rockridge:1;
unsigned char follow_symlinks:1;
unsigned char ignore_hidden:1;
unsigned char ignore_special:1;
unsigned char iso1990:1;
/* burn options */
unsigned char opc:1;
unsigned char multi:1;
unsigned char simulate:1;
unsigned char underrun_proof:1;
int speed;
/* burn stuff */
int fifo_chunksize;
int fifo_chunks;
int burn_mode;
/* The drive reference */
Ecdb_Drive_Info *drive;
BurnProgress progress;
BurnDriveStatus stat;
};
/* Callbacks */
extern int ECDB_DRIVE_ACTION_FINISHED;
extern int ECDB_DRIVE_ACTION_BEGUN;
extern int ECDB_DRIVE_ACTION_UPDATE;
#include "ecdb_drives.h"
#include "ecdb_image.h"
#include "ecdb_burn.h"
#include "ecdb_misc.h"
#endif