Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6license.h
Go to the documentation of this file.
1 
11 #ifndef P6LICENSE_H__
12 #define P6LICENSE_H__ 1
13 
14 #include "p6i18n.h"
15 #include "p6cryptokey.h"
16 #include "p6sign.h"
17 #include "p6digest.h"
18 
19 
20 #ifdef __cplusplus
21 namespace P6R {
22 extern "C" {
23 #endif
24 
40 typedef enum
41 {
42  LICENSE_NOOP = 0x00,
46 
55 typedef struct
56 {
57  const P6WCHAR* pName;
58  const P6WCHAR* pValue;
60 
69 static const P6LICENSEFLAGS P6LICENSE_NOFLAGS = 0x00000000;
70 
71 
78 #undef INTERFACE
79 #define INTERFACE p6IEnumLicense
81 {
92 
107  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6PROPERTYVALUE* parElements, P6UINT32* pcReturned ) P6PURE;
108 };
109 
110 // {0AAB71D4-A6B1-4b55-BD31-2F14A2592C4B}
111 #define IF_p6IEnumLicense {0xaab71d4,0xa6b1,0x4b55,{0xbd,0x31,0x2f,0x14,0xa2,0x59,0x2c,0x4b}}
112 
113 
122 #undef INTERFACE
123 #define INTERFACE p6IEnumLicenseValueList
125 {
135  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
136 
151  P6DECLCOMMETHOD(next)(P6THIS_ P6UINT32 cElements, P6PROPERTYVALUE* parElements, P6UINT32* pcReturned ) P6PURE;
152 };
153 
154 
155 // {67A3B9F0-A69C-40B6-AFE4-0CB02E81780D}
156 #define IF_p6IEnumLicenseValueList {0x67A3B9F0,0xA69C,0x40B6,{0xAF,0xE4,0x0C,0xB0,0x2E,0x81,0x78,0x0D}}
157 
158 
182 #undef INTERFACE
183 #define INTERFACE p6ILicense
185 {
199  P6DECLCOMMETHOD(initialize)(P6THIS_ P6LICENSEFLAGS flags, P6LICENSE_OPERATION mode ) P6PURE;
200 
213 
236  P6DECLCOMMETHOD(setKeys)(P6THIS_ p6ICryptoKey* pPublicKey, p6ICryptoKey* pPrivateKey, P6SIGNHMAC algorithm ) P6PURE;
237 
254  P6DECLCOMMETHOD(setPropInt)(P6THIS_ const P6WCHAR* pPropName, P6INT32 value ) P6PURE;
255 
272  P6DECLCOMMETHOD(setPropString)(P6THIS_ const P6WCHAR* pPropName, const P6WCHAR* pValue ) P6PURE;
273 
290  P6DECLCOMMETHOD(setPropStringList)(P6THIS_ const P6WCHAR* pPropName, const P6WCHAR* pValue ) P6PURE;
291 
292 
307  P6DECLCOMMETHOD(getPropInt)(P6THIS_ const P6WCHAR* pPropName, P6INT32* pValue ) P6PURE;
308 
329  P6DECLCOMMETHOD(getPropString)(P6THIS_ const P6WCHAR* pPropName, P6WCHAR* pBuffer, P6UINT32 cBuffer, P6UINT32* pWritten ) P6PURE;
330 
347  P6DECLCOMMETHOD(enumLicense)(P6THIS_ p6IEnumLicense** ppEnum ) P6PURE;
348 
366  P6DECLCOMMETHOD(enumLicenseValueList)(P6THIS_ const P6R::P6WCHAR *pszKeyName, p6IEnumLicenseValueList** ppEnum ) P6PURE;
367 
386  P6DECLCOMMETHOD(createLicenseFile)(P6THIS_ const P6WCHAR* pFilePath ) P6PURE;
387 
408  P6DECLCOMMETHOD(verifyLicenseFile)(P6THIS_ const P6WCHAR* pFilePath ) P6PURE;
409 };
410 
411 // {1DF20931-007C-48d4-9308-7D2A6F0E72BB}
412 #define IF_p6ILicense {0x1df20931,0x7c,0x48d4,{0x93,0x8,0x7d,0x2a,0x6f,0xe,0x72,0xbb}}
413 
414 // {3753D1AF-5BDD-4daa-A7E4-FC07BD0BC3BB}
415 #define COMP_p6License {0x3753d1af,0x5bdd,0x4daa,{0xa7,0xe4,0xfc,0x7,0xbd,0xb,0xc3,0xbb}}
416 
417 
425 #undef INTERFACE
426 #define INTERFACE p6ILicense2
428 {
442  P6DECLCOMMETHOD(initialize)(P6THIS_ P6LICENSEFLAGS flags, P6LICENSE_OPERATION mode ) P6PURE;
443 
456 
479  P6DECLCOMMETHOD(setKeys)(P6THIS_ p6ICryptoKey* pPublicKey, p6ICryptoKey* pPrivateKey, P6SIGNHMAC algorithm ) P6PURE;
480 
497  P6DECLCOMMETHOD(setPropInt)(P6THIS_ const P6WCHAR* pPropName, P6INT32 value ) P6PURE;
498 
515  P6DECLCOMMETHOD(setPropString)(P6THIS_ const P6WCHAR* pPropName, const P6WCHAR* pValue ) P6PURE;
516 
533  P6DECLCOMMETHOD(setPropStringList)(P6THIS_ const P6WCHAR* pPropName, const P6WCHAR* pValue ) P6PURE;
534 
535 
550  P6DECLCOMMETHOD(getPropInt)(P6THIS_ const P6WCHAR* pPropName, P6INT32* pValue ) P6PURE;
551 
572  P6DECLCOMMETHOD(getPropString)(P6THIS_ const P6WCHAR* pPropName, P6WCHAR* pBuffer, P6UINT32 cBuffer, P6UINT32* pWritten ) P6PURE;
573 
590  P6DECLCOMMETHOD(enumLicense)(P6THIS_ p6IEnumLicense** ppEnum ) P6PURE;
591 
609  P6DECLCOMMETHOD(enumLicenseValueList)(P6THIS_ const P6R::P6WCHAR *pszKeyName, p6IEnumLicenseValueList** ppEnum ) P6PURE;
610 
629  P6DECLCOMMETHOD(createLicenseFile)(P6THIS_ const P6WCHAR* pFilePath ) P6PURE;
630 
652  P6DECLCOMMETHOD(createLicenseFile2)(P6THIS_ const P6WCHAR* pFilePath, P6DIGESTS hashAlgorithm, P6BSTR* pHash ) P6PURE;
653 
674  P6DECLCOMMETHOD(verifyLicenseFile)(P6THIS_ const P6WCHAR* pFilePath ) P6PURE;
675 };
676 
677 // {A2444FCE-E455-44BA-A5D6-5AD88F370389}
678 #define IF_p6ILicense2 {0xa2444fce,0xe455,0x44ba,{0xa5,0xd6,0x5a,0xd8,0x8f,0x37,0x3,0x89}}
679 
680 
687 #undef INTERFACE
688 #define INTERFACE p6ILicense3
690 {
704  P6DECLCOMMETHOD(initialize)(P6THIS_ P6LICENSEFLAGS flags, P6LICENSE_OPERATION mode ) P6PURE;
705 
726  P6DECLCOMMETHOD(verifyThirdPartyLicenseFile)(P6THIS_ const P6R::P6WCHAR* pFilePath ) P6PURE;
727 };
728 
729 // {06B2E9B3-4B10-43CC-BDCA-B3FF966EB80B}
730 #define IF_p6ILicense3 {0x6b2e9b3,0x4b10,0x43cc,{0xbd,0xca,0xb3,0xff,0x96,0x6e,0xb8,0xb}}
731 
732 
733 #ifdef __cplusplus
734 } /* extern "C" */
735 } // namespace
736 #endif
737 
738 #endif
739 
740 
741 
742 
743 
P6SIGNHMAC
Supported HMAC algorthms for signing:
Definition: p6sign.h:45
const P6WCHAR * pName
Definition: p6license.h:57
This interface provides key metadata infrormation and key access.
Definition: p6cryptokey.h:1198
uint32_t P6UINT32
Definition: p6types.h:77
A license file is composed of one or more name - value pairs.
Definition: p6license.h:80
#define P6DECLAREICOM
Definition: p6defs.h:191
#define P6PURE
Definition: p6defs.h:192
This interface extends the p6ILicense interface supporting an outside HSM to generate the final signa...
Definition: p6license.h:427
A license file is composed of one or more name - value pairs.
Definition: p6license.h:124
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
const P6WCHAR * pValue
Definition: p6license.h:58
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
Binary string.
Definition: p6types.h:185
it may not contain all the symbols used by this software If you run into undefined symbol please let us know and we can provide you a build that will be compatible with your specific value
Definition: readme.txt:85
Interface definition for all p6I18n and L10n features.
This interface is only to be used to verify third party generated license files.
Definition: p6license.h:689
This interface supports the generation and verification of p6I18n licenses.
Definition: p6license.h:184
P6LICENSE_OPERATION
These are the supported operations that can be performed on a license.
Definition: p6license.h:40
A license property is a name - value pair.
Definition: p6license.h:55
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6UINT32 P6LICENSEFLAGS
P6LICENSEFLAGS.
Definition: p6license.h:68
#define P6THIS_
Definition: p6defs.h:193
Interface definition for the one way digest functions.
Interface definition for the cryptographic signature generation and verification. ...
int32_t P6INT32
Definition: p6types.h:76
#define P6THIS
Definition: p6defs.h:194
P6DIGESTS
P6DIGESTS.
Definition: p6digest.h:43
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188
P6R Cryptographic key interface definitions.