Part of CCNx Sync. More...
Go to the source code of this file.
Data Structures | |
struct | SyncRootStruct |
A SyncRootStruct object holds the necessary data for a root sync tree. More... | |
Enumerations | |
enum | SyncRootLookupCode { SyncRootLookupCode_none, SyncRootLookupCode_covered, SyncRootLookupCode_error } |
Functions | |
struct SyncRootStruct * | SyncAddRoot (struct SyncBaseStruct *base, int syncScope, const struct ccn_charbuf *topoPrefix, const struct ccn_charbuf *namingPrefix, struct SyncNameAccum *filter) |
namesToAdd has the names where content is known to be present. | |
struct SyncRootStruct * | SyncRemRoot (struct SyncRootStruct *root) |
Removes the root from the base, and frees up associated storage. | |
struct SyncRootStruct * | SyncRootDecodeAndAdd (struct SyncBaseStruct *base, struct ccn_buf_decoder *d) |
Parse a content object representing a config slice, and if successful add it to the base. | |
int | SyncRootAppendSlice (struct ccn_charbuf *cd, struct SyncRootStruct *root) |
Appends the ccnb encoding for a config slice to the provided cb. | |
struct SyncHashCacheEntry * | SyncRootTopEntry (struct SyncRootStruct *root) |
enum SyncRootLookupCode | SyncRootLookupName (struct SyncRootStruct *root, const struct ccn_charbuf *name) |
Tests to see if the name is covered by this root. |
Part of CCNx Sync.
Definition in file SyncRoot.h.
enum SyncRootLookupCode |
SyncRootLookupCode_none |
not covered by this root |
SyncRootLookupCode_covered |
covered by this root |
SyncRootLookupCode_error |
error in the name or the state |
Definition at line 110 of file SyncRoot.h.
struct SyncRootStruct* SyncAddRoot | ( | struct SyncBaseStruct * | base, | |
int | syncScope, | |||
const struct ccn_charbuf * | topoPrefix, | |||
const struct ccn_charbuf * | namingPrefix, | |||
struct SyncNameAccum * | filter | |||
) | [read] |
namesToAdd has the names where content is known to be present.
These names should come from SyncNotifyContent. The name storage belongs to the root.
namesToFetch has the names where content should be fetched. Once content is fetched and stored to the repo the names should be appended to namesToAdd. The name storage belongs to the root. Creates a new root structure and adds it to the base. The syncScope will be used for sync control interests (-1 for unscoped). The topoPrefix and namingPrefix will be copied and canonicalized. The filter (and the names in it) will also be copied and canonicalized. Canonicalized data is owned by the base.
Definition at line 106 of file SyncRoot.c.
Referenced by ccns_open(), genTestRootRepos(), genTestRootRouting(), SyncRootDecodeAndAdd(), and testReadBuilder().
struct SyncRootStruct* SyncRemRoot | ( | struct SyncRootStruct * | root | ) | [read] |
Removes the root from the base, and frees up associated storage.
Requires that there are no active comparisons. Deactivates all pending interests.
Definition at line 176 of file SyncRoot.c.
Referenced by findAndDeleteRoot(), main(), SyncFreeBase(), SyncHandleSlice(), testRootBasic(), and testRootCoding().
int SyncRootAppendSlice | ( | struct ccn_charbuf * | cd, | |
struct SyncRootStruct * | root | |||
) |
Appends the ccnb encoding for a config slice to the provided cb.
Definition at line 307 of file SyncRoot.c.
Referenced by SyncAddRoot(), and testRootCoding().
struct SyncRootStruct* SyncRootDecodeAndAdd | ( | struct SyncBaseStruct * | base, | |
struct ccn_buf_decoder * | d | |||
) | [read] |
Parse a content object representing a config slice, and if successful add it to the base.
Definition at line 251 of file SyncRoot.c.
Referenced by SyncHandleSlice(), and testRootCoding().
enum SyncRootLookupCode SyncRootLookupName | ( | struct SyncRootStruct * | root, | |
const struct ccn_charbuf * | name | |||
) |
Tests to see if the name is covered by this root.
Useful for testing full names given by the Repo. The topoPrefix does not participate, but the filter does.
Definition at line 343 of file SyncRoot.c.
Referenced by SyncAddName(), and testRootLookup().
struct SyncHashCacheEntry* SyncRootTopEntry | ( | struct SyncRootStruct * | root | ) | [read] |
Definition at line 331 of file SyncRoot.c.
Referenced by testReadBuilder(), and UpdateAction().