21 #ifndef NDN_KEY_LOCATOR_H
22 #define NDN_KEY_LOCATOR_H
24 #include <ndn-cpp/c/key-types.h>
37 static __inline
void ndn_KeyLocator_initialize
39 self->type = (ndn_KeyLocatorType)-1;
40 ndn_Blob_initialize(&self->keyData, 0, 0);
41 ndn_Name_initialize(&self->keyName, keyNameComponents, maxKeyNameComponents);
42 self->keyNameType = (ndn_KeyNameType)-1;
52 static __inline ndn_Error
53 ndn_KeyLocator_setFromKeyLocator
60 return NDN_ERROR_success;
62 self->type = other->
type;
63 ndn_Blob_setFromBlob(&self->keyData, &other->
keyData);
64 if ((error = ndn_Name_setFromName(&self->keyName, &other->
keyName)))
68 return NDN_ERROR_success;
struct ndn_Blob keyData
A Blob whose value is a pointer to a pre-allocated buffer for the key data as follows: If type is ndn...
Definition: key-types.h:53
ndn_KeyLocatorType type
-1 for none
Definition: key-types.h:52
ndn_KeyNameType keyNameType
The type of data for keyName, -1 for none.
Definition: key-types.h:64
An ndn_KeyLocator holds the type of key locator and related data.
Definition: key-types.h:51
Copyright (C) 2015 Regents of the University of California.
Definition: name-types.h:33
struct ndn_Name keyName
The key name (only used if type is ndn_KeyLocatorType_KEYNAME.)
Definition: key-types.h:62