2002-06-04 12:26:23 +00:00
|
|
|
#ifndef CUNIXPLATFORM_H
|
|
|
|
#define CUNIXPLATFORM_H
|
|
|
|
|
|
|
|
#include "IPlatform.h"
|
|
|
|
|
|
|
|
class CUnixPlatform : public IPlatform {
|
|
|
|
public:
|
|
|
|
CUnixPlatform();
|
|
|
|
virtual ~CUnixPlatform();
|
|
|
|
|
|
|
|
// IPlatform overrides
|
2002-06-08 21:48:00 +00:00
|
|
|
virtual bool installDaemon(const char* name,
|
2002-06-10 22:06:45 +00:00
|
|
|
const char* description,
|
|
|
|
const char* pathname,
|
|
|
|
const char* commandLine);
|
2002-06-08 21:48:00 +00:00
|
|
|
virtual bool uninstallDaemon(const char* name);
|
|
|
|
virtual int daemonize(const char* name, DaemonFunc);
|
|
|
|
virtual int restart(RestartFunc, int minErrorCode);
|
2002-06-04 12:26:23 +00:00
|
|
|
virtual const char* getBasename(const char* pathname) const;
|
|
|
|
virtual CString getUserDirectory() const;
|
|
|
|
virtual CString getSystemDirectory() const;
|
|
|
|
virtual CString addPathComponent(
|
2002-06-10 22:06:45 +00:00
|
|
|
const CString& prefix,
|
|
|
|
const CString& suffix) const;
|
2002-06-04 12:26:23 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
virtual void setDaemonLogger(const char* name);
|
|
|
|
|
|
|
|
private:
|
2002-06-08 21:48:00 +00:00
|
|
|
static bool deamonLogger(int, const char*);
|
2002-06-04 12:26:23 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|