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>
|
2006-06-13 13:57:54 +00:00
|
|
|
#include <dc.h>
|
|
|
|
|
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-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 */
|
2006-02-23 14:01:47 +00:00
|
|
|
int _DC_parseCfg(const char *cfgfile);
|
|
|
|
|
2006-04-10 12:43:01 +00:00
|
|
|
/* Copies a file */
|
|
|
|
int _DC_copyFile(const char *src, const char *dst);
|
|
|
|
|
2006-04-27 14:52:13 +00:00
|
|
|
/* Processes a unit suffix and adjust the value accordingly */
|
2006-05-10 11:54:23 +00:00
|
|
|
long long _DC_processSuffix(const char *suffix);
|
2006-04-27 14:52:13 +00:00
|
|
|
|
2006-06-13 13:57:54 +00:00
|
|
|
/* Parses a boolean value */
|
|
|
|
int _DC_parseBoolean(const char *value);
|
|
|
|
|
|
|
|
/* 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);
|
|
|
|
|
2006-07-12 08:44:17 +00:00
|
|
|
/* Initializa a config file for a client */
|
|
|
|
int _DC_initClientConfig(const char *clientName, FILE *f);
|
|
|
|
|
2006-02-23 14:01:47 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* __DC_INTERNAL_H_ */
|