/*************************************************************************** Replicate Work Class ----------------------------------------- begin : 2012/10/14 copyright : (C) 2010 SolutionBox Inc. author : Service 1 Team email : svc1@solbox.com version : 1.0 CopyRight(C) 2010 SolutionBox Inc. All Rights reserved. Redistribution and use in source and binary forms, with or with out modification, are not permitted in outside of SolutionBox Inc. ***************************************************************************/ #ifndef __MSG_QUEUE_POP_THREAD__ #define __MSG_QUEUE_POP_THREAD__ #include #include #include #include #include #include #include "Logger.h" #include "FimngdData.h" #include "IPCMsgQueue.h" #include "TransferStatDataList.h" /// @brief class CMsgQueuePopThread { public: /// @brief »ý¼ºÀÚ CMsgQueuePopThread(); ~CMsgQueuePopThread(); /// @brief Thread¸¦ »ý¼ºÇϰí, À̸¦ ½ÃÀÛÇÑ´Ù. /// @param none /// @return ¼º°øÀº return true ½ÇÆÐ´Â return false bool Start(); /// @brief ProcessStatus ³»ÀÇ RCDB °ü·Ã ¼³Á¤°ªÀ» ÀÌ¿ëÇØ DB ConnectionÀ» ÇÑ´Ù. /// @param sighandle ¾²·¹µå¿¡¼­ signal¿¡ µû¶ó Á¤»ó Á¾·áÇϵµ·Ï signal handleÀ» Àü´ÞÇÑ´Ù. /// @param objMsgQueue IPC Message Queue °´Ã¼ /// @return ¼º°øÇϸé return true ½ÇÆÐÇϸé return false bool ThreadInit(const sig_atomic_t *sighandle, std::vector &vecContentQueue, CTransferStatDataList *pTransfer = NULL); bool ThreadInit(const sig_atomic_t *sighandle, CIPCMsgQueue &cContentQueue, CTransferStatDataList *pTransfer = NULL); // Attributes private: // ¾²·¹µå ÇÚµé pthread_t m_threadHandle; const sig_atomic_t *m_sighandle; std::vector m_vecContentQueue; CTransferStatDataList * m_pTransfer; void Pop(); // ¾²·¹µå ½ÃÀÛ ·çƾÀÌ´Ù. static void* EntryPoint(void* arg); // ÇØ´ç ÇÔ¼öÀÇ ³»¿ëÀº ¼öÁ¤ÇÏÁö ¸»°Í. void Execute(); }; #endif //__MSG_QUEUE_POP_THREAD__