diff --git a/dcapi/local/result.c b/dcapi/local/result.c new file mode 100644 index 0000000000..2fc5443422 --- /dev/null +++ b/dcapi/local/result.c @@ -0,0 +1,42 @@ +#ifdef HAVE_CONFIG_H +#include +#endif + +#include +#include +#include + +#include "dc_local.h" + +/******************************************************************** + * Functions + */ + +DC_Result *_DC_createResult(const char *wu_name) +{ + DC_Result *result; + + result = g_new0(DC_Result, 1); + result->wu = _DC_getWUByName(wu_name); + if (!result->wu) + { + DC_log(LOG_ERR, "Received result for unknown WU %s", wu_name); + g_free(result); + return NULL; + } + + // XXX Finish the result correctly + + return result; +} + +void _DC_destroyResult(DC_Result *result) +{ + while (result->output_files) + { +// _DC_destroyPhysicalFile(result->output_files->data); + result->output_files = g_list_delete_link(result->output_files, + result->output_files); + } + g_free(result); +}