2006-02-23 14:01:47 +00:00
|
|
|
/*
|
|
|
|
* DC-API: Distributed Computing Platform for Master-Worker Applications
|
|
|
|
*
|
|
|
|
* Internal definitions
|
|
|
|
*
|
|
|
|
* Authors:
|
|
|
|
* Gabor Gombas <gombasg@sztaki.hu>
|
|
|
|
*
|
|
|
|
* Copyright MTA SZTAKI, 2006
|
|
|
|
*/
|
2006-04-08 11:25:18 +00:00
|
|
|
|
2006-05-19 13:00:11 +00:00
|
|
|
/* <private_header> */
|
2006-04-08 11:25:18 +00:00
|
|
|
|
2006-02-23 14:01:47 +00:00
|
|
|
#ifndef __DC_INTERNAL_H_
|
|
|
|
#define __DC_INTERNAL_H_
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2006-07-12 08:44:17 +00:00
|
|
|
#include <stdio.h>
|
2007-02-06 15:00:25 +00:00
|
|
|
#include <dc_common.h>
|
2006-06-13 13:57:54 +00:00
|
|
|
|
2006-05-19 13:00:11 +00:00
|
|
|
/********************************************************************
|
|
|
|
* Constants
|
|
|
|
*/
|
|
|
|
|
|
|
|
/* Master's working directory (absolute path) */
|
|
|
|
#define CFG_WORKDIR "WorkingDirectory"
|
|
|
|
/* Application instance UUID */
|
|
|
|
#define CFG_INSTANCEUUID "InstanceUUID"
|
|
|
|
/* Log level */
|
|
|
|
#define CFG_LOGLEVEL "LogLevel"
|
|
|
|
/* Log file location */
|
|
|
|
#define CFG_LOGFILE "LogFile"
|
2006-07-12 08:44:17 +00:00
|
|
|
/* Configuration items to send to clients */
|
|
|
|
#define CFG_SENDKEYS "SendCfgKeys"
|
2006-11-16 12:41:41 +00:00
|
|
|
/* Default WU priority */
|
|
|
|
#define CFG_DEFAULTPRIO "DefaultPriority"
|
2006-05-19 13:00:11 +00:00
|
|
|
|
|
|
|
|
2006-02-23 14:01:47 +00:00
|
|
|
/********************************************************************
|
|
|
|
* Function prototypes
|
|
|
|
*/
|
|
|
|
|
2006-04-27 14:52:13 +00:00
|
|
|
/* Parses a configuration file */
|
2009-09-08 14:57:47 +00:00
|
|
|
int _DC_parseCfg(const char *cfgfile) __attribute__((visibility("hidden")));
|
2006-02-23 14:01:47 +00:00
|
|
|
|
2006-04-10 12:43:01 +00:00
|
|
|
/* Copies a file */
|
2009-09-08 14:57:47 +00:00
|
|
|
int _DC_copyFile(const char *src, const char *dst) __attribute__((visibility("hidden")));
|
2006-04-10 12:43:01 +00:00
|
|
|
|
2006-04-27 14:52:13 +00:00
|
|
|
/* Processes a unit suffix and adjust the value accordingly */
|
2009-09-08 14:57:47 +00:00
|
|
|
long long _DC_processSuffix(const char *suffix) __attribute__((visibility("hidden")));
|
2006-04-27 14:52:13 +00:00
|
|
|
|
2006-06-13 13:57:54 +00:00
|
|
|
/* Parses a boolean value */
|
2009-09-08 14:57:47 +00:00
|
|
|
int _DC_parseBoolean(const char *value) __attribute__((visibility("hidden")));
|
2006-06-13 13:57:54 +00:00
|
|
|
|
|
|
|
/* Allocates a physical file descriptor */
|
2009-09-08 14:57:47 +00:00
|
|
|
DC_PhysicalFile *_DC_createPhysicalFile(const char *label, const char *path)
|
|
|
|
__attribute__((visibility("hidden")));
|
2006-06-13 13:57:54 +00:00
|
|
|
|
2010-09-13 13:14:18 +00:00
|
|
|
/* Allocates a remote file descriptor */
|
2010-09-29 13:58:04 +00:00
|
|
|
DC_RemoteFile *_DC_createRemoteFile(const char *label, const char *url, const char *md5, const size_t size)
|
2010-09-13 13:14:18 +00:00
|
|
|
__attribute__((visibility("hidden")));
|
|
|
|
|
2006-06-13 13:57:54 +00:00
|
|
|
/* De-allocates a physical file descriptor */
|
2009-09-08 14:57:47 +00:00
|
|
|
void _DC_destroyPhysicalFile(DC_PhysicalFile *file)
|
|
|
|
__attribute__((visibility("hidden")));
|
2006-06-13 13:57:54 +00:00
|
|
|
|
2010-09-13 13:14:18 +00:00
|
|
|
/* De-allocates a remote file descriptor */
|
|
|
|
void _DC_destroyRemoteFile(DC_RemoteFile *file)
|
|
|
|
__attribute__((visibility("hidden")));
|
|
|
|
|
2006-07-12 08:44:17 +00:00
|
|
|
/* Initializa a config file for a client */
|
2009-09-08 14:57:47 +00:00
|
|
|
int _DC_initClientConfig(const char *clientName, FILE *f)
|
|
|
|
__attribute__((visibility("hidden")));
|
2006-07-12 08:44:17 +00:00
|
|
|
|
2006-02-23 14:01:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __DC_INTERNAL_H_ */
|