boinc/dcapi/local/client.c
balaton 858ecf349f Update local implementation of resolvFileName to match API docs
git-svn-id: svn+ssh://cvs.lpds.sztaki.hu/var/lib/svn/szdg/dcapi/trunk@728 a7169a2c-3604-0410-bc95-c702d8d87f7a
2013-12-02 11:09:36 +01:00

87 lines
1.4 KiB
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dc_client.h>
#include "common_defs.h"
/********************************************************************
* Common API functions
*/
int DC_getMaxMessageSize(void)
{
return MAX_MESSAGE_SIZE;
}
int DC_getMaxSubresults(void)
{
return MAX_SUBRESULTS;
}
unsigned DC_getGridCapabilities(void)
{
return (DC_GridCapabilities)(DC_GC_STDERR | DC_GC_STDOUT);
}
/********************************************************************
* Client API functions
*/
int DC_initClient(void)
{
return 0;
}
char *DC_resolveFileName(DC_FileType type, const char *logicalFileName)
{
if (!strcmp(logicalFileName, DC_CHECKPOINT_FILE))
{
return strdup(CKPT_LABEL);
}
return strdup(logicalFileName);
}
int DC_sendResult(const char *logicalFileName, const char *path, DC_FileMode fileMode)
{
// not implemented yet!
return DC_ERR_NOTIMPL;
}
int DC_sendMessage(const char *message)
{
// not implemented yet!
return DC_ERR_NOTIMPL;
}
DC_ClientEvent *DC_checkClientEvent(void)
{
// not implemented yet!
return NULL;
}
void DC_destroyClientEvent(DC_ClientEvent *event)
{
// not implemented yet!
}
void DC_checkpointMade(const char *fileName)
{
// Nothing to do with it.
}
void DC_fractionDone(double fraction)
{
// Nothing to do with it.
}
void DC_finishClient(int exitcode)
{
// XXX Need to send a message to the master side of the DC_API!
exit(exitcode);
}