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, 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.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
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 107 of file SyncRoot.h.
struct SyncRootStruct* SyncAddRoot | ( | struct SyncBaseStruct * | base, | |
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 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 103 of file SyncRoot.c.
Referenced by newDefaultRoot(), and SyncRootDecodeAndAdd().
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 168 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 279 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 224 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 314 of file SyncRoot.c.
Referenced by SyncAddName(), and testRootLookup().
struct SyncHashCacheEntry* SyncRootTopEntry | ( | struct SyncRootStruct * | root | ) | [read] |
Definition at line 302 of file SyncRoot.c.
Referenced by testReadBuilder(), and UpdateAction().