Files
interactive/rcts/rc_gcmd/src/GetContentListThread.h
T
2026-08-07 17:38:18 +09:00

80 lines
2.0 KiB
C++

/***************************************************************************
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 __CONTENT_LIST_THREAD__
#define __CONTENT_LIST_THREAD__
#include <pthread.h>
#include <string>
#include "Logger.h"
#include "Data.h"
#include "DataQueue.h"
#include "ProcessStatus.h"
#include "Database.h"
/// @brief
class CGetContentListThread
{
public:
/// @brief 생성자
/// @param [in] pLogger 로깅을 위한 클래스.
CGetContentListThread(CQueue<CFileInfo>* pQueueFileInfo
, CQueue<CFileInfo>* pQueueDeleteJob
, CQueue<CFileInfo>* pQueueCompleteJob);
~CGetContentListThread();
/// @brief Thread를 생성하고, 이를 시작한다.
/// @param none
/// @return 성공은 return true 실패는 return false
bool Start();
bool DbConnect();
void DbClose();
/// @brief ProcessStatus 내의 RCDB 관련 설정값을 이용해 DB Connection을 한다.
/// @param None
/// @return 성공하면 return true 실패하면 return false
bool ThreadInit();
bool GetContentList();
// Attributes
private:
DataBase* m_pPgSQL;
bool m_bExistCheck;
bool m_bCurrent;
CQueue<CFileInfo>* m_pQueueFileInfo;
CQueue<CFileInfo>* m_pQueueDeleteJob;
CQueue<CFileInfo>* m_pQueueCompleteJob;
std::string m_szHost;
int m_nPort;
std::string m_szDBName;
std::string m_szAcct;
std::string m_szPasswd;
bool m_bServiceTableSeparate;
unsigned long long m_timeStartPeriod;
// 쓰레드 핸들
pthread_t m_threadHandle;
// 쓰레드 시작 루틴이다.
static void* EntryPoint(void* arg);
// 해당 함수의 내용은 수정하지 말것.
void Execute();
};
#endif //__CONTENT_LIST_THREAD__