And horribly break everything. Need to rewrite a bunch of stuff dealing with inheritance.

This commit is contained in:
Jaime Thomas
2009-01-30 03:59:48 +00:00
parent c0b09f0296
commit 2df38d1710
18 changed files with 450 additions and 307 deletions

View File

@@ -1,54 +1,10 @@
/* vim: set sw=3 ts=3 sts=3 expandtab: */
#include "ecdb.h"
int ecdb_erase_project_init(Ecdb_Erase_Project *proj);
static void ecdb_erase_progress_handler(void *data, void *buffer,
unsigned int nbyte);
int ecdb_erase_finished(void *data, int type, void *event);
Ecdb_Erase_Project *
ecdb_erase_project_new(void)
{
Ecdb_Erase_Project *proj;
proj = calloc(1, sizeof(Ecdb_Erase_Project));
if (!proj)
{
return NULL;
}
if (!ecdb_erase_project_init(proj))
{
FREE(proj);
return NULL;
}
return proj;
}
int
ecdb_erase_project_init(Ecdb_Erase_Project *proj)
{
if (!ecdb_project_init(ECDB_PROJECT(proj)))
{
return FALSE;
}
/* Proper defaults */
ecdb_project_type_set(ECDB_PROJECT(proj), ECDB_ERASE_PROJECT);
proj->quick = TRUE;
proj->format = FALSE;
return TRUE;
}
void
ecdb_erase_project_destroy(Ecdb_Erase_Project *proj)
{
ecdb_project_destroy(ECDB_PROJECT(proj));
FREE(proj);
}
// FIXME Make this return an error code
int
ecdb_erase_disc(Ecdb_Erase_Project *proj)