legacy/experimental/ecdb/trunk/src/ecdb.c

61 lines
937 B
C
Raw Normal View History

#include "ecdb.h"
Ecdb_Main *em;
int ecdb_setup();
void ecdb_shutdown();
int
main(int argc, char **argv)
{
Ecdb_Project *proj;
int i;
if (!ecdb_setup())
{
printf("Setup failed\n");
return 1;
}
ecdb_print_drive_info();
ecdb_burn_init();
proj = ecdb_project_new();
i = 1;
while ((i < argc) && (argv))
{
ecore_list_append(proj->files, strdup(argv[i]));
i++;
}
proj->simulate = FALSE;
proj->publisher_id = proj->data_preparer_id = proj->system_id =
proj->application_id = proj->copywrite_id = proj->abstract_id =
proj->biblio_id = "ecdb";
ecdb_aquire_drive(proj, 0);
ecdb_burn_project(proj);
sleep(7000);
/* End testing */
burn_finish();
ecdb_shutdown();
return 0;
};
int
ecdb_setup(void)
{
em = NULL;
em = calloc(1, sizeof(Ecdb_Main));
em->drives = NULL;
em->projects = ecore_list_new();
if (!ecdb_aquire_drive_info())
{
printf("Aquiring drives failed!\n");
return 0;
}
return 1;
}