00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __LICENSEINFO_H__
00028 #define __LICENSEINFO_H__
00029
00030 #include "XMLite.h"
00031
00032 #define MAX_JURISDICTION 128
00033 #define MAX_NAME 256
00034 #define MAX_URI 256
00035
00042 struct LicenseInfo
00043 {
00044 public:
00048 LicenseInfo() : m_eLicense(LicenseInfo::LTUnknown), m_bCommercialUse(false), m_eModification(LicenseInfo::MTUnknown), m_eSampling(LicenseInfo::STUnknown) {m_cJurisdiction[0] = '\0'; m_cURI[0] = '\0'; m_cName[0] = '\0';};
00053 LicenseInfo(const LicenseInfo& info) : m_eLicense(info.m_eLicense), m_bCommercialUse(info.m_bCommercialUse), m_eModification(info.m_eModification), m_eSampling(info.m_eSampling) {_tcscpy_s(m_cJurisdiction, info.m_cJurisdiction); _tcscpy_s(m_cURI, info.m_cURI); _tcscpy_s(m_cName, info.m_cName);};
00054
00055 public:
00056
00058 typedef enum
00059 {
00060 LTCC = 0,
00061 LTSampling = 1,
00062 LTPublicDomain = 2,
00063 LTDevelopingNations = 3,
00064 LTNone = 4,
00065 LTUnknown
00066 } LicenseType;
00068 typedef enum
00069 {
00070 MTAllow = 0,
00071 MTShareAlike = 1,
00072 MTNo = 2,
00073 MTUnknown
00074 } ModificationType;
00076 typedef enum
00077 {
00078 STSampling,
00079 STSamplingPlus,
00080 STSamplingNC,
00081 STUnknown
00082 } SamplingType;
00084 typedef enum
00085 {
00086 LLDTCC = 0,
00087 LLDTSampling,
00088 LLDTCC_by_nc,
00089 LLDTCC_by_nc_sa,
00090 LLDTCC_by_nc_nd,
00091 LLDTCC_by,
00092 LLDTCC_by_sa,
00093 LLDTCC_by_nd,
00094 LLDTSampling_by,
00095 LLDTSampling_by_plus,
00096 LLDTSampling_by_nc_plus,
00097 LLDT_Count
00098 } LoadedLicenseDataType;
00099
00100 public:
00101
00103 LicenseInfo::LicenseType m_eLicense;
00105 bool m_bCommercialUse;
00107 LicenseInfo::ModificationType m_eModification;
00109 LicenseInfo::SamplingType m_eSampling;
00111 TCHAR m_cJurisdiction[MAX_JURISDICTION];
00112
00113
00115 TCHAR m_cName[MAX_NAME];
00117 TCHAR m_cURI[MAX_URI];
00118
00119 public:
00121 void Clear();
00126 bool HasJurisdiction() const {return (m_cJurisdiction[0] != '\0');};
00128 void SetJurisdiction(LPCTSTR lpJurisdiction);
00130 void SetName(LPCTSTR lpName);
00132 void SetURI(LPCTSTR lpURI);
00133
00139 const LicenseInfo& operator=(const LicenseInfo& other) {m_eLicense = other.m_eLicense; m_bCommercialUse = other.m_bCommercialUse; m_eModification = other.m_eModification; m_eSampling = other.m_eSampling; _tcscpy_s(m_cJurisdiction, other.m_cJurisdiction); _tcscpy_s(m_cName, other.m_cName); _tcscpy_s(m_cURI, other.m_cURI); return *this;};
00140 };
00141
00142
00143
00144 #endif