12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576 |
- #pragma once
- #include "afx.h"
- #include "XMLSerialization.h"
- namespace OTSDATA {
- class __declspec(dllexport) COTSLicenseInfo : public CObject, public xmls::Slo
- {
- protected:
- DECLARE_SERIAL(COTSLicenseInfo)
- public:
- COTSLicenseInfo(); // constructor
- virtual ~COTSLicenseInfo(); // detractor
- COTSLicenseInfo(const COTSLicenseInfo&); // copy constructor
- COTSLicenseInfo(COTSLicenseInfo*); // copy constructor
- COTSLicenseInfo& operator=(const COTSLicenseInfo&); // =operator
- BOOL operator==(const COTSLicenseInfo&); // ==operator
- // serialization
- void Serialize(CArchive& ar);
- void Serialize(bool isStoring, tinyxml2::XMLDocument * classDoc, tinyxml2::XMLElement * rootNode);
- // machine id
- CString GetMachineId() { return m_strMachineId; }
- void SetMachineId(CString a_strMachineId) { m_strMachineId = a_strMachineId; }
- // software package id
- OTS_SOFT_PACKAGE_ID GetPackId() { return m_nPackId; }
- void SetPackId(OTS_SOFT_PACKAGE_ID a_nPackId) { m_nPackId = a_nPackId; }
- // license type
- OTS_LICENSE_TYPE GetLicType() { return m_nLicType; }
- void SetLicType(OTS_LICENSE_TYPE a_nLicType) { m_nLicType = a_nLicType; }
- // expire date
- COleDateTime GetExpireDate() { return m_oExpireDate; }
- void SetExpireDate(COleDateTime a_oExpireDate) { m_oExpireDate = a_oExpireDate; }
- // computer nick name
- CString GetComputerNickName() { return m_strComputerNickName; }
- void SetComputerNickName(CString a_strComputerNickName) { m_strComputerNickName = a_strComputerNickName; }
- protected:
- // cleanup
- void Cleanup();
- // initialization
- void Init();
- // duplication
- void Duplicate(const COTSLicenseInfo& a_oSource);
- // machine id
- CString m_strMachineId;
- // software package id
- OTS_SOFT_PACKAGE_ID m_nPackId;
- // license type
- OTS_LICENSE_TYPE m_nLicType;
- // expire date
- COleDateTime m_oExpireDate;
- // computer nick name
- CString m_strComputerNickName;
- };
- typedef std::shared_ptr<COTSLicenseInfo> __declspec(dllexport) COTSLicenseInfoPtr;
- typedef std::vector<COTSLicenseInfoPtr> __declspec(dllexport) COTSLicenseInfoList;
- }
|