#include <stdint.h>
#include <string.h>
#include "../../util/re.h"
#include "../../ndn-constants.h"
#include "../../ndn-error-code.h"
#include "../name-component.h"
#include "ndn-trust-schema-common.h"
#include <stdio.h>
Go to the source code of this file.
◆ ndn_trust_schema_pattern_component_t
The structure to represent an NDN Trust Schema Pattern Component.
◆ _probe_trust_schema_pattern_component_type()
static uint32_t _probe_trust_schema_pattern_component_type |
( |
const char * |
string | ) |
|
|
inlinestatic |
Probes a string to get its trust schema pattern component type.
- Parameters
-
string. | Input. String variable which will be probed for trust schema pattern component type. |
size. | Input. Size of input string. |
- Returns
- Returns the trust schema pattern component type if there is no error and the probing found a valid NDN trust schema pattern component type.
◆ ndn_trust_schema_pattern_component_compare()
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).
- Parameters
-
pattern_component. | Input. The pattern component for comparison. |
name_component. | Input. The name component for comparison. |
- Returns
- 0 if the pattern component matches the name component.
◆ ndn_trust_schema_pattern_component_copy()
Copy lhs pattern component to rhs pattern component.
- Parameters
-
lhs. | Input. The pattern component to be copied. |
rhs. | Output. The pattern component to be copied to. |
- Returns
- 0 if there is no error.
◆ ndn_trust_schema_pattern_component_from_buffer()
Init an NDN Trust Schema pattern Component structure from caller supplied memory block.
The function will do memory copy
- Parameters
-
component. | Output. The NDN Trust Schema pattern Component structure to be inited. |
type. | Input. NDN Trust Schema pattern Component Type to be set with. |
value. | Input. Memory block which holds the NDN Trust Schema Pattern Component Value. |
size. | Input. Size of input block. |
- Returns
- 0 if there is no error.
◆ ndn_trust_schema_pattern_component_from_string()
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.
- Parameters
-
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. |
- Returns
- 0 if there is no error.