#ifndef _RYL_DBAGENT_BILLING_DATA_H_ #define _RYL_DBAGENT_BILLING_DATA_H_ #include // forward decl; class CSendStream; namespace DBAgent { namespace DataStorage { // forward decl; class CSessionData; class CBilling { public: CBilling(); ~CBilling(); enum WarningType { WARN_BEFORE_1SEC = 0, NO_WARNING = 1, WARN_EVERY_MINUTE = 2 }; time_t GetLoginTime() const { return m_nLoginTime; } int GetPlayTime() const { return m_nPlayTime; } unsigned long GetCRMData() const { return m_dwCRMIndex1; } WarningType GetWarnMsgType() const { return m_eWarnMsgType; } char GetBillingType() const { return m_cBillingType; } void SetWarnMsgType(WarningType eWarnMsgType) { m_eWarnMsgType = eWarnMsgType; } //! ºô¸µÀ» ½ÃÀÛÇÑ´Ù. void StartBilling(int nPlayTime, unsigned long dwCRMIndex1, unsigned char cBillingType); void ClearBilling(); //! ¿ä½Ã·£µå Æ÷ÀÎÆ®¸¦ Ãß°¡ÇÑ´Ù void AddYouxiLandPoint(int nAdditionalPoint, unsigned char cBillingType); //! true : ¾ÆÁ÷ Á¢¼Ó °¡´É / false : Á¢¼Ó ²÷¾î¾ß ÇÔ. bool CheckBilling(const CSessionData& SessionData, time_t nCurrentTime); private: time_t m_nLoginTime; // ·Î±×ÀÎ ½Ã°£(midnight, January 1, 1970 ºÎÅÍ È帥 ½Ã°£(sec)) int m_nPlayTime; // ºô¸µ ½Ã°£ (³¯Â¥ ȤÀº ½Ã°£) unsigned long m_dwCRMIndex1; // PC¹æ ID (0ÀÌ¸é °³ÀÎÀ¯Àú) WarningType m_eWarnMsgType; // ÇØ¿Ü °æ°í¸Þ½ÃÁö ŸÀÔ ( 0 : 1ºÐÀü¿¡ °æ°íº¸³¿ - ´ë¸¸ µî, 1 : °æ°í ¾øÀ½, 2 : °æ°í ÀÖÀ½ ) char m_cBillingType; // ºô¸µ ŸÀÔ (D : ³²Àº ³¯Â¥, T : ³²Àº ½Ã°£) char m_cFlags; // ³»ºÎ Ç÷¡±×. }; } } #endif