diff --git a/dcapi/include/dc.h b/dcapi/include/dc.h index 84273d7c10..ddce814f65 100644 --- a/dcapi/include/dc.h +++ b/dcapi/include/dc.h @@ -13,11 +13,7 @@ extern "C" { #include #include - -enum { - DC_OK, - DC_ERROR -}; +#include typedef enum { DC_RESULT_ACCEPT, @@ -138,6 +134,32 @@ int DC_submitWU (DC_Workunit wu); int DC_cancelWU (DC_Workunit wu); +/** DC_suspend. + * It cancels the running of the given work unit. + * It is not deleted from the hdd, or from the memmory, + * only from the execution system. + * + * return: DC_OK + * + * Comment: This has no meaning on BOINC, so nothing will happen with the + * running client, but you will not get back the results even if + * the wu is finished. + * Even this feature is not implemented yet. + */ +int DC_suspendWU(DC_Workunit wu); + + +/** DC_resubmit. + * It restarts the given, suspended work unit. + * + * return: DC_OK; + * + * Comment: In BOINC based implementation, nothing happens to the client + * but from now on you can get back the results. + * Even this feature is not implemented yet. + */ +int DC_resubmitWU(DC_Workunit wu); + /** Check for results. * Waits for available results and returns the first. * Return: DC_OK on success diff --git a/dcapi/include/dc_client.h b/dcapi/include/dc_client.h index 83921d2a41..ca1f564e37 100644 --- a/dcapi/include/dc_client.h +++ b/dcapi/include/dc_client.h @@ -10,11 +10,7 @@ extern "C" { #endif -/* For return value */ -/*enum { - DC_OK, - DC_ERROR -};*/ +#include /* For the DC_ResolveFileName function */ #define DC_FILE_IN 0 diff --git a/dcapi/include/dc_common.h b/dcapi/include/dc_common.h new file mode 100644 index 0000000000..1fe18f8421 --- /dev/null +++ b/dcapi/include/dc_common.h @@ -0,0 +1,22 @@ +/* API for Master-worker applications on Distributed Computing Platforms + Common definitions for the client and server side +*/ + +#ifndef __DC_COMMON_H_ +#define __DC_COMMON_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +/* API error codes */ +enum { + DC_OK, + DC_ERROR +}; + +#ifdef __cplusplus +} +#endif + +#endif /* __DC_COMMON_H_ */