/***************************************************************************
				GcmdConfig.h
                -----------------------------------------
    begin      : 2012/10/12
    copyright  : (C) 2005 SolutionBox Inc.
    author     : Service 1 Team
    email      : svc1@solbox.com
    version    : 1.0

    CopyRight(C) 2005 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 __RC_GCMD_CONFIG_H__
#define __RC_GCMD_CONFIG_H__

#include <string>
#include <vector>

class CGcmdConfig
{
// fuctions  
public:
	CGcmdConfig( std::string szFilename, std::string szProgramName, std::string szProgramVersion  );
	~CGcmdConfig();
	/// @brief 설정 파일로부터 데이터를 읽어와서 해당 변수에 저장한다.
	bool LoadConfig();
	
	/// @brief 설정 파일로부터 데이터를 읽어 들이다가 에러가 발생한 경우 에러 메시지를 반환 한다. 
	std::string GetErrorMessage() { return m_szErrMessage; };
	
private:
	bool CheckConfig();
	bool CheckVector(std::vector< std::string > vecValue);
	
	
// Attributes
private:
    // gcmd section configure values
    // - for this class

    std::string m_szConfigFile;
    std::string m_szProgramName;
    std::string m_szProgramVersion;
	std::string m_szErrMessage;
    
    // common section configure values
	std::string m_szRcdbIp;
    int	m_nRcdbPort;
    std::string m_szRcdbName;
    std::string m_szRcdbAcct;
    std::string m_szRcdbAcctPw;
	std::string m_szRcid;
    
    int m_nMaxDeleteThread;
	
    // - for log
	std::string m_szAppLogRoot;
	int m_nLogLevel;
};

#endif // __RC_GCMD_CONFIG_H__
