Sandboxie/SandboxiePlus/SandMan/SbieProcess.h

35 lines
1.5 KiB
C
Raw Normal View History

2022-02-05 14:09:53 +00:00
#pragma once
#include "SbiePlusAPI.h"
class CSbieProcess : public CBoxedProcess
{
Q_OBJECT
public:
2023-01-28 19:57:20 +00:00
CSbieProcess(quint32 ProcessId, class CSandBox* pBox);
2022-02-05 14:09:53 +00:00
virtual QString GetStatusStr() const;
2023-01-28 19:57:20 +00:00
virtual void BlockProgram() { GetBox()->BlockProgram(m_ImageName); }
virtual void SetInternetAccess(bool bSet) { GetBox()->SetInternetAccess(m_ImageName, bSet); }
virtual bool HasInternetAccess() { return GetBox()->HasInternetAccess(m_ImageName); }
virtual void SetForcedProgram(bool bSet) { GetBox()->SetForcedProgram(m_ImageName, bSet); }
virtual bool IsForcedProgram() { return GetBox()->IsForcedProgram(m_ImageName); }
virtual void SetLingeringProgram(bool bSet) { GetBox()->SetLingeringProgram(m_ImageName, bSet); }
virtual int IsLingeringProgram() { return GetBox()->IsLingeringProgram(m_ImageName); }
virtual void SetLeaderProgram(bool bSet) { GetBox()->SetLeaderProgram(m_ImageName, bSet); }
virtual int IsLeaderProgram() { return GetBox()->IsLeaderProgram(m_ImageName); }
2022-02-05 14:09:53 +00:00
virtual CSandBoxPlus* GetBox() { return qobject_cast<CSandBoxPlus*>(m_pBox); }
2023-01-28 19:57:20 +00:00
virtual int GetRememberedAction(int Action) { return m_RememberedActions.value(Action, -1); }
virtual void SetRememberedAction(int Action, int retval) { m_RememberedActions.insert(Action, retval); }
2022-02-05 14:09:53 +00:00
2023-01-28 19:57:20 +00:00
static QString ImageTypeToStr(quint32 type);
2022-02-05 14:09:53 +00:00
protected:
2023-01-28 19:57:20 +00:00
2023-11-27 18:14:16 +00:00
//virtual void InitProcessInfoImpl(void* ProcessHandle);
2023-01-28 19:57:20 +00:00
2022-02-05 14:09:53 +00:00
QMap<int, int> m_RememberedActions;
};