diff --git a/dcapi/local/dc.c b/dcapi/local/dc.c index 8b6704c8b9..af7fea1e1e 100644 --- a/dcapi/local/dc.c +++ b/dcapi/local/dc.c @@ -18,7 +18,9 @@ DC_ResultCallback _dc_resultcb; DC_SubresultCallback _dc_subresultcb; DC_MessageCallback _dc_messagecb; -static uuid_t project_uuid; +char project_uuid_str[37]; +uuid_t project_uuid; +int sleep_interval; /******************************************************************** * API functions diff --git a/dcapi/local/dc_local.h b/dcapi/local/dc_local.h index bf8cd56ad7..7c602ade64 100644 --- a/dcapi/local/dc_local.h +++ b/dcapi/local/dc_local.h @@ -91,13 +91,21 @@ extern DC_SubresultCallback _dc_subresultcb; extern DC_MessageCallback _dc_messagecb; extern char project_uuid_str[37]; +extern uuid_t project_uuid; extern int sleep_interval; /******************************************************************** * Function prototypes */ -int rm_init(const char *config_workdir, const char *config_uuid); +/* Allocates a physical file descriptor */ +DC_PhysicalFile *_DC_createPhysicalFile(const char *label, + const char *path); + +/* De-allocates a physical file descriptor */ +void _DC_destroyPhysicalFile(DC_PhysicalFile *file); + +int _DC_searchForEvents(); /* Parses the project's config.xml */ int _DC_parseConfigXML(const char *file); @@ -134,7 +142,7 @@ DC_PhysicalFile *_DC_createPhysicalFile(const char *label, void _DC_destroyPhysicalFile(DC_PhysicalFile *file); /* Creates a new DC_Result */ -DC_Result *_DC_createResult(const char *wu_name, const char *xml_doc_in); +DC_Result *_DC_createResult(const char *wu_name); /* Destroys a DC_Result */ void _DC_destroyResult(DC_Result *result); diff --git a/dcapi/local/events.c b/dcapi/local/events.c index 07f2af8fed..2e16284614 100644 --- a/dcapi/local/events.c +++ b/dcapi/local/events.c @@ -9,13 +9,13 @@ int DC_processEvents(int timeout) { - if (!_dc_resultcb || !_dc_subresultcb || !_dc_messagecb) { DC_log(LOG_ERR, "DC_processEvents: callbacks are not set up"); return DC_ERR_CONFIG; } + _DC_searchForEvents(); return 0; }