![]() |
ndn-lite
|
#include "ndn-rule-storage.h"Functions | |
| int | _check_buffer_all_zeros (const uint8_t *buf, int buf_size) |
| ndn_rule_storage_t * | get_ndn_rule_storage_instance (void) |
| There should be only one ndn_rule_storage_t. More... | |
| void | ndn_rule_storage_init (void) |
| Init the rule storage singleton. More... | |
| const ndn_trust_schema_rule_t * | ndn_rule_storage_get_rule (const char *rule_name) |
| Get a rule from the rule storage. More... | |
| int | ndn_rule_storage_add_rule (const char *rule_name, const ndn_trust_schema_rule_t *rule) |
| Add a rule to the rule storage. More... | |
| int | ndn_rule_storage_remove_rule (const char *rule_name) |
| Remove a rule from the rule storage. More... | |
Variables | |
| static ndn_rule_storage_t | ndn_rule_storage |
| int _check_buffer_all_zeros | ( | const uint8_t * | buf, |
| int | buf_size | ||
| ) |
| ndn_rule_storage_t* get_ndn_rule_storage_instance | ( | void | ) |
There should be only one ndn_rule_storage_t.
Use this function to get the singleton instance. If the instance has not been initialized, call ndn_rule_storage_init first.
| int ndn_rule_storage_add_rule | ( | const char * | rule_name, |
| const ndn_trust_schema_rule_t * | rule | ||
| ) |
Add a rule to the rule storage.
Will do a deep copy of the rule passed in.
| rule_name. | Input. The string to associate with the rule added. The storage will not allow the adding of a rule with the same name as one already in storage. |
| rule. | Input. The rule that will be deep copied into the rule storage. |
| const ndn_trust_schema_rule_t* ndn_rule_storage_get_rule | ( | const char * | rule_name | ) |
Get a rule from the rule storage.
| rule_name. | Input. The string representing the name of the rule to get from storage. |
| void ndn_rule_storage_init | ( | void | ) |
Init the rule storage singleton.
This function will clear the rule storage.
| int ndn_rule_storage_remove_rule | ( | const char * | rule_name | ) |
Remove a rule from the rule storage.
| rule_name. | Input. The name of the rule to remove. |
|
static |
1.8.15