Add a common header for the client and server side

git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@316 a7169a2c-3604-0410-bc95-c702d8d87f7a
This commit is contained in:
gombasg 2006-02-08 15:20:11 +00:00 committed by Adam Visegradi
parent 8af91eae33
commit da5624463d
3 changed files with 50 additions and 10 deletions

View File

@ -13,11 +13,7 @@ extern "C" {
#include <sys/syslog.h>
#include <stdarg.h>
enum {
DC_OK,
DC_ERROR
};
#include <dc_common.h>
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

View File

@ -10,11 +10,7 @@
extern "C" {
#endif
/* For return value */
/*enum {
DC_OK,
DC_ERROR
};*/
#include <dc_common.h>
/* For the DC_ResolveFileName function */
#define DC_FILE_IN 0

22
dcapi/include/dc_common.h Normal file
View File

@ -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_ */