Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
p6kmipdecoder.h
Go to the documentation of this file.
1 
18 #ifndef P6KMIPDECODER_H__
19 #define P6KMIPDECODER_H__ 1
20 
21 #include "p6com.h"
22 //#include "p6time.h"
23 #include "p6kmip.h"
24 #include "p6iobuffer.h"
25 
26 
27 #ifdef __cplusplus
28 namespace P6R {
29 extern "C" {
30 #endif
31 
32 
41 typedef struct {
46 
68 typedef struct {
70  union {
81  } value;
82 } P6KMIP_PRIMITIVE;
83 
96 static const P6KMIPDECODERFLAGS P6KMIPDECODER_NOFLAGS = 0x00000000;
97 static const P6KMIPDECODERFLAGS P6KMIPDECODER_TRACEON = 0x00000001;
98 static const P6KMIPDECODERFLAGS P6KMIPDECODER_TREATASBINARY = 0x00000002;
99 
100 
107 #undef INTERFACE
108 #define INTERFACE p6IKMIPStructure
110 {
129  P6DECLCOMMETHOD(getValue)(P6THIS_ P6KMIP_PRIMITIVE* pValue ) P6PURE;
130 
149  P6DECLCOMMETHOD(getRawBytes)(P6THIS_ P6BSTR value, P6UINT32* pWritten ) P6PURE;
150 
163  P6DECLCOMMETHOD(getChildStructure)(P6THIS_ p6IKMIPStructure** ppNested ) P6PURE;
164 
176  P6DECLCOMMETHOD(getNestingLevel)(P6THIS_ P6UINT32* pLevel ) P6PURE;
177 
193  P6DECLCOMMETHOD(next)(P6THIS_ P6KMIP_ELEMENT* pCursor ) P6PURE;
194 
203  P6DECLCOMMETHOD(reset)(P6THIS) P6PURE;
204 };
205 
206 // {FFBA7D0E-D5B3-4a23-8B20-CF1ED44A5B7D}
207 #define IF_p6IKMIPStructure {0xffba7d0e,0xd5b3,0x4a23,{0x8b,0x20,0xcf,0x1e,0xd4,0x4a,0x5b,0x7d}}
208 
209 // {595A2E15-DB84-4c1c-8B07-CCE26348C337}
210 #define COMP_p6KMIPStructure {0x595a2e15,0xdb84,0x4c1c,{0x8b,0x7,0xcc,0xe2,0x63,0x48,0xc3,0x37}}
211 
212 
213 
225 #undef INTERFACE
226 #define INTERFACE p6IKMIPDecoder
228 {
240  P6DECLCOMMETHOD(initialize)(P6THIS_ P6KMIPDECODERFLAGS flags ) P6PURE;
241 
253  P6DECLCOMMETHOD(setBufPtr)(P6THIS_ p6IIoBuffer* pBuffer ) P6PURE;
254 
267  P6DECLCOMMETHOD(getRootStructure)(P6THIS_ p6IKMIPStructure** ppRoot ) P6PURE;
268 };
269 
270 // {10C61D97-82AB-4d3a-B3BB-85605A3EC0AF}
271 #define IF_p6IKMIPDecoder {0x10c61d97,0x82ab,0x4d3a,{0xb3,0xbb,0x85,0x60,0x5a,0x3e,0xc0,0xaf}}
272 
273 // {0FAB5BCA-AFA2-459e-9F2B-6F70345B986A}
274 #define COMP_p6KMIPDecoder {0xfab5bca,0xafa2,0x459e,{0x9f,0x2b,0x6f,0x70,0x34,0x5b,0x98,0x6a}}
275 
276 
293 typedef P6VOID (*P6TTLVOUTCB)(const P6WCHAR *pszString,P6VOID *pCtx);
294 
295 
297 static const P6TTLVDUMPFLAGS P6TTDF_NOFLAGS = 0x00000000;
298 static const P6TTLVDUMPFLAGS P6TTDF_HDRSONLY = 0x00000001;
299 static const P6TTLVDUMPFLAGS P6TTDF_DATAONLY = 0x00000002;
300 static const P6TTLVDUMPFLAGS P6TTDF_DUMPRECNUM = 0x00000004;
301 
303 static const P6TTLVCOMPAREFLAGS P6TTCF_NOFLAGS = 0x00000000;
304 
311 #undef INTERFACE
312 #define INTERFACE p6ITTLVDumper
314 {
316 
349  P6DECLCOMMETHOD(dumpTTLV)(P6THIS_ P6UINT8 *pTTLV,P6SIZE cTTLV,P6TTLVDUMPFLAGS fFlags,P6UINT32 nRecord,const P6WCHAR *pszPrefix,P6TTLVOUTCB pfnOutput,P6VOID *pCBCtx) P6PURE;
350 
375  P6DECLCOMMETHOD(compareTTLV)(P6THIS_ P6UINT8 *pTTLV1,P6SIZE cTTLV1,P6UINT8 *pTTLV2,P6SIZE cTTLV2,P6TTLVCOMPAREFLAGS nFlags,P6TTLVOUTCB pfnOutput,P6VOID *pCBCtx) P6PURE;
376 
377  P6DECLCOMMETHOD(getTTLVRawPayload)(P6THIS_ P6UINT8 *pTTLV1,P6SIZE cTTLV1,P6UINT32 nRecord,P6BCSTR *pbsPayload) P6PURE;
378 
379 };
380 
381 // {C95D0D4B-9EFF-4ABE-95A8-DE9AA4E082C9}
382 #define IF_p6ITTLVDumper {0xC95D0D4B,0x9EFF,0x4ABE,{0x95,0xA8,0xDE,0x9A,0xA4,0xE0,0x82,0xC9}}
383 
384 
385 
386 #ifdef __cplusplus
387 } // extern "C"
388 } // namespace
389 #endif
390 
391 
392 #endif
393 
394 
size_t P6SIZE
Definition: p6types.h:90
Const Binary string.
Definition: p6types.h:199
P6UINT32 P6KMIPDECODERFLAGS
P6KMIPDECODERFLAGS.
Definition: p6kmipdecoder.h:95
uint32_t P6UINT32
Definition: p6types.h:77
#define P6DECLAREICOM
Definition: p6defs.h:191
Constant KMIP definitions.
I/O Buffer Interfaces.
#define P6PURE
Definition: p6defs.h:192
unsigned char P6BOOL
Boolean type.
Definition: p6types.h:133
This interface is used to parse an existing KMIP message as defined in Key Management Interoperabilit...
P6UINT32 P6TTLVCOMPAREFLAGS
P6KMIP_ELEMENT.
Definition: p6kmipdecoder.h:41
P6VOID(* P6TTLVOUTCB)(const P6WCHAR *pszString, P6VOID *pCtx)
Defines the signature of the callback function that the TTLV dump methods will call with dump output...
This interface provides a enumerator of all parts of a KMIP structure type inside a KMIP message...
unsigned char P6UINT8
Definition: p6types.h:71
wchar_t P6WCHAR
Wide character type see p6i18n.h.
Definition: p6types.h:111
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:97
int64_t P6INT64
Definition: p6types.h:78
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
This interface is provided to aid in debugging TLLV issues.
#define P6DECLCOMMETHOD(method)
Definition: p6defs.h:189
P6INT64 P6TIME
The wallclock time represented as the number of microseconds since midnight January 1 1970 UTC...
Definition: p6types.h:259
#define P6THIS_
Definition: p6defs.h:193
P6COM definitions and interfaces.
void P6VOID
Definition: p6types.h:109
P6UINT32 P6TTLVDUMPFLAGS
int32_t P6INT32
Definition: p6types.h:76
#define P6THIS
Definition: p6defs.h:194
P6KMIP_PRIMITIVE.
Definition: p6kmipdecoder.h:68
#define P6DECLAREIF_(iface, baseif)
Definition: p6defs.h:188