216 lines
4.3 KiB
C++
216 lines
4.3 KiB
C++
#ifndef _WATCHDOG_CREATESERVICEPARAMS_HPP_
|
|
#define _WATCHDOG_CREATESERVICEPARAMS_HPP_
|
|
#ifndef _COMMON_WINDOWS_HPP_
|
|
#include <common/windows.hpp>
|
|
#endif
|
|
#ifndef _COMMON_STRING_HPP_
|
|
#include <common/string.hpp>
|
|
#endif
|
|
#ifndef _COMMON_ARRAY_HPP_
|
|
#include <common/array.hpp>
|
|
#endif
|
|
#ifndef _COMMON_WINSVC_HPP_
|
|
#include <common/winsvc.hpp>
|
|
#endif
|
|
|
|
class CreateServiceParams
|
|
{
|
|
public:
|
|
CreateServiceParams();
|
|
virtual ~CreateServiceParams();
|
|
const String &getServiceName(void)const;
|
|
void setServiceName(const String &serviceName);
|
|
const String &getDisplayName(void)const;
|
|
void setDisplayName(const String &displayName);
|
|
DWORD getDesiredAccess(void)const;
|
|
void setDesiredAccess(DWORD desiredAccess);
|
|
DWORD getServiceType(void)const;
|
|
void setServiceType(DWORD serviceType);
|
|
DWORD getStartType(void)const;
|
|
void setStartType(DWORD startType);
|
|
DWORD getErrorControl(void)const;
|
|
void setErrorControl(DWORD errorControl);
|
|
const String &getBinaryPathName(void)const;
|
|
void setBinaryPathName(const String &binaryPathName);
|
|
const String &getLoadOrderGroup(void)const;
|
|
void setLoadOrderGroup(const String &loadOrderGroup);
|
|
DWORD getTagID(void)const;
|
|
void setTagID(DWORD tagID);
|
|
const String &getDependencies(void)const;
|
|
void setDependencies(const String &dependencies);
|
|
bool getNullSeparatedDependencies(Array<char> &dependencies);
|
|
const String &getServiceStartName(void)const;
|
|
void setServiceStartName(const String &serviceStartName);
|
|
const String &getPassword(void)const;
|
|
void setPassword(const String &password);
|
|
private:
|
|
String mServiceName;
|
|
String mDisplayName;
|
|
DWORD mDesiredAccess;
|
|
DWORD mServiceType;
|
|
DWORD mStartType;
|
|
DWORD mErrorControl;
|
|
String mBinaryPathName;
|
|
String mLoadOrderGroup;
|
|
DWORD mTagID;
|
|
String mDependencies;
|
|
String mServiceStartName;
|
|
String mPassword;
|
|
};
|
|
|
|
inline
|
|
CreateServiceParams::CreateServiceParams()
|
|
: mDesiredAccess(0), mServiceType(0), mStartType(0), mErrorControl(0), mTagID(0)
|
|
{
|
|
}
|
|
|
|
inline
|
|
CreateServiceParams::~CreateServiceParams()
|
|
{
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getServiceName(void)const
|
|
{
|
|
return mServiceName;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setServiceName(const String &serviceName)
|
|
{
|
|
mServiceName=serviceName;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getDisplayName(void)const
|
|
{
|
|
return mDisplayName;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setDisplayName(const String &displayName)
|
|
{
|
|
mDisplayName=displayName;
|
|
}
|
|
|
|
inline
|
|
DWORD CreateServiceParams::getDesiredAccess(void)const
|
|
{
|
|
return mDesiredAccess;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setDesiredAccess(DWORD desiredAccess)
|
|
{
|
|
mDesiredAccess=desiredAccess;
|
|
}
|
|
|
|
inline
|
|
DWORD CreateServiceParams::getServiceType(void)const
|
|
{
|
|
return mServiceType;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setServiceType(DWORD serviceType)
|
|
{
|
|
mServiceType=serviceType;
|
|
}
|
|
|
|
inline
|
|
DWORD CreateServiceParams::getStartType(void)const
|
|
{
|
|
return mStartType;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setStartType(DWORD startType)
|
|
{
|
|
mStartType=startType;
|
|
}
|
|
|
|
inline
|
|
DWORD CreateServiceParams::getErrorControl(void)const
|
|
{
|
|
return mErrorControl;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setErrorControl(DWORD errorControl)
|
|
{
|
|
mErrorControl=errorControl;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getBinaryPathName(void)const
|
|
{
|
|
return mBinaryPathName;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setBinaryPathName(const String &binaryPathName)
|
|
{
|
|
mBinaryPathName=binaryPathName;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getLoadOrderGroup(void)const
|
|
{
|
|
return mLoadOrderGroup;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setLoadOrderGroup(const String &loadOrderGroup)
|
|
{
|
|
mLoadOrderGroup=loadOrderGroup;
|
|
}
|
|
|
|
inline
|
|
DWORD CreateServiceParams::getTagID(void)const
|
|
{
|
|
return mTagID;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setTagID(DWORD tagID)
|
|
{
|
|
mTagID=tagID;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getDependencies(void)const
|
|
{
|
|
return mDependencies;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setDependencies(const String &dependencies)
|
|
{
|
|
mDependencies=dependencies;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getServiceStartName(void)const
|
|
{
|
|
return mServiceStartName;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setServiceStartName(const String &serviceStartName)
|
|
{
|
|
mServiceStartName=serviceStartName;
|
|
}
|
|
|
|
inline
|
|
const String &CreateServiceParams::getPassword(void)const
|
|
{
|
|
return mPassword;
|
|
}
|
|
|
|
inline
|
|
void CreateServiceParams::setPassword(const String &password)
|
|
{
|
|
mPassword=password;
|
|
}
|
|
#endif
|