75 lines
2.2 KiB
C
Raw Normal View History

2025-03-12 11:08:50 +08:00
/**
@file ProcMngImpl.h
@brief
@author
*/
#pragma once
#include "sys_proc_mng_api/ProcMngInterface.h"
#include "ProcMngApiThread.h"
2025-03-12 14:17:01 +08:00
namespace iot_sys
2025-03-12 11:08:50 +08:00
{
class CProcMngImpl : public CProcMngInterface
{
public:
/**
@brief
@param const SProcessInfoKey & stProcKey
*/
explicit CProcMngImpl(const SProcessInfoKey &stProcKey);
virtual ~CProcMngImpl();
/**
@brief 退
@param const CProcessQuitInterface * pQuitInterface
*/
virtual int setCallback(CProcessQuitInterface *pQuitInterface);
/**
@brief
*/
virtual void unsetCallback();
/**
@brief
@param bool bActive
@param bool bMaster
@param bool bSlave
@return Success
@retval
*/
virtual int updateProcessInfo(bool bActive, bool bMaster, bool bSlave);
/**
@brief
@param SProcessInfo & stProcInfo
@return Success
@retval
*/
virtual int getProcessInfo(SProcRunInfo &stProcInfo);
/**
@brief
@param const SProcessInfoKey & stProcKey
2025-03-12 16:30:28 +08:00
@return iotSuccess,iotFailed
2025-03-12 11:08:50 +08:00
@retval
*/
//int registerProcInfo(const SProcessInfoKey &stProcKey);
/**
@brief
2025-03-12 16:30:28 +08:00
@return iotSuccess,
2025-03-12 11:08:50 +08:00
*/
int initialize();
protected:
CProcMngImpl(); //< 防止默认构造
private:
SProcessInfoKey m_stProcKey; //< 进程信息的主键
CProcMngApiThreadPtr m_ptrProcMngThread; //< 心跳线程
bool m_bIsInitProcInfo; //< 是否已经完成初始化
};
typedef boost::shared_ptr<CProcMngImpl> CProcMngImplPtr;
2025-03-12 14:17:01 +08:00
} //namespace iot_sys
2025-03-12 11:08:50 +08:00