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 namespace P6R {
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
33 
42 typedef struct {
47 
69 typedef struct {
71  union {
82  } value;
83 } P6KMIP_PRIMITIVE;
84 
97 const P6KMIPDECODERFLAGS P6KMIPDECODER_NOFLAGS = 0x00000000;
98 const P6KMIPDECODERFLAGS P6KMIPDECODER_TRACEON = 0x00000001;
99 const P6KMIPDECODERFLAGS P6KMIPDECODER_TREATASBINARY = 0x00000002;
100 
101 
108 interface p6IKMIPStructure : public p6ICom
109 {
127  P6COMMETHOD getValue( P6KMIP_PRIMITIVE* pValue ) = 0;
128 
147  P6COMMETHOD getRawBytes( P6BSTR value, P6UINT32* pWritten ) = 0;
148 
162 
174  P6COMMETHOD getNestingLevel( P6UINT32* pLevel ) = 0;
175 
191  P6COMMETHOD next( P6KMIP_ELEMENT* pCursor ) = 0;
192 
201  P6COMMETHOD reset() = 0;
202 };
203 
204 // {FFBA7D0E-D5B3-4a23-8B20-CF1ED44A5B7D}
205 #define IF_p6IKMIPStructure {0xffba7d0e,0xd5b3,0x4a23,{0x8b,0x20,0xcf,0x1e,0xd4,0x4a,0x5b,0x7d}}
206 
207 // {595A2E15-DB84-4c1c-8B07-CCE26348C337}
208 #define COMP_p6KMIPStructure {0x595a2e15,0xdb84,0x4c1c,{0x8b,0x7,0xcc,0xe2,0x63,0x48,0xc3,0x37}}
209 
210 
211 
223 interface p6IKMIPDecoder : public p6ICom
224 {
235  P6COMMETHOD initialize( P6KMIPDECODERFLAGS flags ) = 0;
236 
248  P6COMMETHOD setBufPtr( p6IIoBuffer* pBuffer ) = 0;
249 
263 };
264 
265 // {10C61D97-82AB-4d3a-B3BB-85605A3EC0AF}
266 #define IF_p6IKMIPDecoder {0x10c61d97,0x82ab,0x4d3a,{0xb3,0xbb,0x85,0x60,0x5a,0x3e,0xc0,0xaf}}
267 
268 // {0FAB5BCA-AFA2-459e-9F2B-6F70345B986A}
269 #define COMP_p6KMIPDecoder {0xfab5bca,0xafa2,0x459e,{0x9f,0x2b,0x6f,0x70,0x34,0x5b,0x98,0x6a}}
270 
271 
272 
273 #ifdef __cplusplus
274 }
275 #endif
276 
277 } // namespace
278 
279 #endif
280 
281 
const P6KMIPDECODERFLAGS P6KMIPDECODER_TRACEON
Definition: p6kmipdecoder.h:98
P6LONGLONG P6INT64
Definition: p6types.h:50
P6UINT32 P6KMIPDECODERFLAGS
P6KMIPDECODERFLAGS.
Definition: p6kmipdecoder.h:96
virtual P6R::P6ERR getChildStructure(p6IKMIPStructure **ppNested)=0
In order to walk the value of a nested KMIP structure type the caller has to get a specific enumerato...
unsigned int P6UINT32
Definition: p6types.h:40
virtual P6R::P6ERR setBufPtr(p6IIoBuffer *pBuffer)=0
This method is used to load the KMIP message into the decoder for parsing.
Constant KMIP definitions.
I/O Buffer Interfaces.
bool P6BOOL
Boolean type.
Definition: p6types.h:101
This interface is used to parse an existing KMIP message as defined in Key Management Interoperabilit...
P6KMIP_ELEMENT.
Definition: p6kmipdecoder.h:42
virtual P6R::P6ERR getNestingLevel(P6UINT32 *pLevel)=0
This method allows the caller to determine how nested the current KMIP structure is in the overall KM...
const P6KMIPDECODERFLAGS P6KMIPDECODER_TREATASBINARY
Definition: p6kmipdecoder.h:99
This interface provides a enumerator of all parts of a KMIP structure type inside a KMIP message...
unsigned char P6UINT8
Definition: p6types.h:30
virtual P6R::P6ERR getRawBytes(P6BSTR value, P6UINT32 *pWritten)=0
Return the raw KMIP encoded type currently pointed to by the enumerator cursor.
int P6INT32
Definition: p6types.h:41
The base interface all [p6]COM components must derive from and implement.
Definition: p6comdef.h:96
virtual P6R::P6ERR next(P6KMIP_ELEMENT *pCursor)=0
Move the cursor to the next type in the structure.
Binary string.
Definition: p6types.h:154
virtual P6R::P6ERR reset()=0
Move the cursor to the start of the KMIP structure.
virtual P6R::P6ERR getValue(P6KMIP_PRIMITIVE *pValue)=0
Return the value of the non-structure type pointed to by the enumerator's cursor. ...
#define P6COMMETHOD
Definition: p6types.h:872
virtual P6R::P6ERR getRootStructure(p6IKMIPStructure **ppRoot)=0
Get an enumerator to the very top structure defining the KMIP message.
P6INT64 P6TIME
The wallclock time represented as the number of microseconds since midnight January 1 1970 UTC...
Definition: p6types.h:228
virtual P6R::P6ERR initialize(P6KMIPDECODERFLAGS flags)=0
Sets up the object to run properly.
P6COM definitions and interfaces.
Interfaces for wallclock and interval time.
const P6KMIPDECODERFLAGS P6KMIPDECODER_NOFLAGS
Definition: p6kmipdecoder.h:97
P6KMIP_PRIMITIVE.
Definition: p6kmipdecoder.h:69