#ifndef SERVICEMANAGER_H
#define SERVICEMANAGER_H

#include <Windows.h>
#include <QString>

class ServiceManager
{
public:
    ServiceManager(DWORD flags = SC_MANAGER_ALL_ACCESS);
    bool Open();
    bool Exist(const QString &serviceName);
    bool IsRunning(const QString &serviceName);

    void Start(const QString &serviceName);
    void Stop(const QString &serviceName);
    void Install(const QString &serviceName, const QString &path);

    DWORD flags = SC_MANAGER_ALL_ACCESS;
    SC_HANDLE schSCManager;
};

#endif // SERVICEMANAGER_H
