![]() |
ndn-lite
|
#include "ndn-trust-schema-pattern-component.h"
#include <string.h>
#include <stdlib.h>
#include "../../ndn-constants.h"
#include "../../ndn-error-code.h"
Functions | |
int | ndn_trust_schema_pattern_component_from_string (ndn_trust_schema_pattern_component_t *component, const char *string, uint32_t size) |
Init an NDN Trust Schema Pattern Component structure from string. More... | |
int | ndn_trust_schema_pattern_component_copy (const ndn_trust_schema_pattern_component_t *lhs, ndn_trust_schema_pattern_component_t *rhs) |
Copy lhs pattern component to rhs pattern component. More... | |
int | ndn_trust_schema_pattern_component_compare (const ndn_trust_schema_pattern_component_t *pattern_component, const name_component_t *name_component) |
Compare a trust schema pattern component and a name component. More... | |
int ndn_trust_schema_pattern_component_compare | ( | const ndn_trust_schema_pattern_component_t * | pattern_component, |
const name_component_t * | name_component | ||
) |
Compare a trust schema pattern component and a name component.
This function will return false for any pattern components that require extra context to be matched properly (i.e., subpattern indexes).
pattern_component. | Input. The pattern component for comparison. |
name_component. | Input. The name component for comparison. |
int ndn_trust_schema_pattern_component_copy | ( | const ndn_trust_schema_pattern_component_t * | lhs, |
ndn_trust_schema_pattern_component_t * | rhs | ||
) |
Copy lhs pattern component to rhs pattern component.
lhs. | Input. The pattern component to be copied. |
rhs. | Output. The pattern component to be copied to. |
int ndn_trust_schema_pattern_component_from_string | ( | ndn_trust_schema_pattern_component_t * | component, |
const char * | string, | ||
uint32_t | size | ||
) |
Init an NDN Trust Schema Pattern Component structure from string.
The size should not include the terminating '\0' character. The function will do memory copy.
component. | Output. The NDN Trust Schema Pattern Component structure to be inited. |
string. | Input. String variable which NDN Trust Schema pattern component initing from. |
size. | Input. Size of input string. |