#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include "ndn-trust-schema-pattern-component.h"
#include "../../ndn-constants.h"
#include "../../ndn-error-code.h"
Go to the source code of this file.
◆ ndn_trust_schema_pattern_t
The structure to represent the NDN Trust Schema pattern.
This structure is memory expensive so please be careful when using it.
◆ index_of_pattern_component_type()
Find the first index in a trust schema pattern of a particular type.
- Parameters
-
pattern. | Input. The NDN Trust Schema pattern to be parsed. |
type. | Input. The pattern component type to search for. |
- Returns
- Index of first pattern component of given type if successfully found, -1 otherwise.
◆ last_index_of_pattern_component_type()
Find the last index in a trust schema pattern of a particular type.
- Parameters
-
pattern. | Input. The NDN Trust Schema pattern to be parsed. |
type. | Input. The pattern component type to search for. |
- Returns
- Index of last pattern component of given type if successfully found, -1 otherwise.
◆ ndn_trust_schema_pattern_append_component()
Appends a component to the end of a pattern.
This function will do memory copy.
- Parameters
-
name. | Output. The pattern to append to. |
component. | Input. The name component to append with. |
- Returns
- 0 if there is no error.
◆ ndn_trust_schema_pattern_copy()
Copy the lhs pattern to the rhs pattern.
- Parameters
-
lhs. | Input. The pattern to be copied. |
rhs. | Output. The pattern that will be copied to. |
- Returns
- 0 if there is no error.
◆ ndn_trust_schema_pattern_from_string()
Init an NDN Trust Schema pattern from a string.
This function will do memory copy and only support regular string; not support URI currently.
- Parameters
-
pattern. | Output. The NDN Trust Schema pattern to be inited. |
string. | Input. The string from which the NDN Trust Schema pattern is inited. |
size. | Input. Size of the input string. |
- Returns
- 0 if there is no error.