Go to the source code of this file.
Functions | |
PUBLIC uintmax_t | ccnr_accession_encode (struct ccnr_handle *ccnr, ccnr_accession a) |
PUBLIC ccnr_accession | ccnr_accession_decode (struct ccnr_handle *ccnr, uintmax_t encoded) |
PUBLIC int | ccnr_accession_compare (struct ccnr_handle *ccnr, ccnr_accession x, ccnr_accession y) |
PUBLIC uintmax_t | ccnr_hwm_encode (struct ccnr_handle *ccnr, ccnr_hwm hwm) |
PUBLIC ccnr_hwm | ccnr_hwm_decode (struct ccnr_handle *ccnr, uintmax_t encoded) |
PUBLIC int | ccnr_acc_in_hwm (struct ccnr_handle *ccnr, ccnr_accession a, ccnr_hwm hwm) |
PUBLIC ccnr_hwm | ccnr_hwm_update (struct ccnr_handle *ccnr, ccnr_hwm hwm, ccnr_accession a) |
PUBLIC ccnr_hwm | ccnr_hwm_merge (struct ccnr_handle *ccnr, ccnr_hwm x, ccnr_hwm y) |
PUBLIC int | ccnr_hwm_compare (struct ccnr_handle *ccnr, ccnr_hwm x, ccnr_hwm y) |
PUBLIC void | r_sync_notify_after (struct ccnr_handle *ccnr, ccnr_hwm item) |
Notify repo of starting point for new names to be passed to sync. | |
PUBLIC int | r_sync_notify_content (struct ccnr_handle *ccnr, int e, struct content_entry *content) |
A wrapper for SyncNotifyContent that takes a content entry. | |
static struct sync_enumeration_state * | cleanup_se (struct ccnr_handle *ccnr, struct sync_enumeration_state *md) |
static int | r_sync_enumerate_action (struct ccn_schedule *sched, void *clienth, struct ccn_scheduled_event *ev, int flags) |
PUBLIC int | r_sync_enumerate (struct ccnr_handle *ccnr, struct ccn_charbuf *interest) |
Request that a SyncNotifyContent call be made for each content object in the repository that matches the interest. | |
PUBLIC int | r_sync_lookup (struct ccnr_handle *ccnr, struct ccn_charbuf *interest, struct ccn_charbuf *content_ccnb) |
Look up a content object that is stored locally in the repository based on the supplied interest. | |
PUBLIC enum ccn_upcall_res | r_sync_upcall_store (struct ccnr_handle *ccnr, enum ccn_upcall_kind kind, struct ccn_upcall_info *info) |
Called when a content object is received by sync and needs to be committed to stable storage by the repo. | |
PUBLIC int | r_sync_local_store (struct ccnr_handle *ccnr, struct ccn_charbuf *content_cb) |
Called when a content object has been constructed locally by sync and needs to be committed to stable storage by the repo. | |
Variables | |
static const int | se_cookie = __LINE__ |
Definition in file ccnr_sync.c.
PUBLIC int ccnr_acc_in_hwm | ( | struct ccnr_handle * | ccnr, | |
ccnr_accession | a, | |||
ccnr_hwm | hwm | |||
) |
Definition at line 89 of file ccnr_sync.c.
PUBLIC int ccnr_accession_compare | ( | struct ccnr_handle * | ccnr, | |
ccnr_accession | x, | |||
ccnr_accession | y | |||
) |
Definition at line 68 of file ccnr_sync.c.
PUBLIC ccnr_accession ccnr_accession_decode | ( | struct ccnr_handle * | ccnr, | |
uintmax_t | encoded | |||
) |
Definition at line 62 of file ccnr_sync.c.
PUBLIC uintmax_t ccnr_accession_encode | ( | struct ccnr_handle * | ccnr, | |
ccnr_accession | a | |||
) |
Definition at line 56 of file ccnr_sync.c.
PUBLIC int ccnr_hwm_compare | ( | struct ccnr_handle * | ccnr, | |
ccnr_hwm | x, | |||
ccnr_hwm | y | |||
) |
Definition at line 107 of file ccnr_sync.c.
PUBLIC ccnr_hwm ccnr_hwm_decode | ( | struct ccnr_handle * | ccnr, | |
uintmax_t | encoded | |||
) |
Definition at line 83 of file ccnr_sync.c.
PUBLIC uintmax_t ccnr_hwm_encode | ( | struct ccnr_handle * | ccnr, | |
ccnr_hwm | hwm | |||
) |
Definition at line 77 of file ccnr_sync.c.
PUBLIC ccnr_hwm ccnr_hwm_merge | ( | struct ccnr_handle * | ccnr, | |
ccnr_hwm | x, | |||
ccnr_hwm | y | |||
) |
Definition at line 101 of file ccnr_sync.c.
PUBLIC ccnr_hwm ccnr_hwm_update | ( | struct ccnr_handle * | ccnr, | |
ccnr_hwm | hwm, | |||
ccnr_accession | a | |||
) |
Definition at line 95 of file ccnr_sync.c.
static struct sync_enumeration_state* cleanup_se | ( | struct ccnr_handle * | ccnr, | |
struct sync_enumeration_state * | md | |||
) | [static, read] |
Definition at line 179 of file ccnr_sync.c.
Referenced by r_sync_enumerate(), and r_sync_enumerate_action().
PUBLIC int r_sync_enumerate | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | interest | |||
) |
Request that a SyncNotifyContent call be made for each content object in the repository that matches the interest.
Request that a SyncNotifyContent call is made for each content object matching the interest.
If SyncNotifyContent returns -1 the active enumeration will be cancelled.
When there are no more matching objects, SyncNotifyContent will be called passing NULL for name.
Content objects that arrive during an enumeration may or may not be included in that enumeration.
Definition at line 298 of file ccnr_sync.c.
Referenced by r_sync_enumerate(), SyncStartHeartbeat(), and SyncStartSliceEnum().
static int r_sync_enumerate_action | ( | struct ccn_schedule * | sched, | |
void * | clienth, | |||
struct ccn_scheduled_event * | ev, | |||
int | flags | |||
) | [static] |
PUBLIC int r_sync_local_store | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | content_cb | |||
) |
Called when a content object has been constructed locally by sync and needs to be committed to stable storage by the repo.
returns 0 for success, -1 for error.
Definition at line 458 of file ccnr_sync.c.
Referenced by load_policy(), r_sync_local_store(), storeStablePoint(), and SyncLocalRepoStore().
PUBLIC int r_sync_lookup | ( | struct ccnr_handle * | ccnr, | |
struct ccn_charbuf * | interest, | |||
struct ccn_charbuf * | content_ccnb | |||
) |
Look up a content object that is stored locally in the repository based on the supplied interest.
appends the content object to the content_ccnb. returns 0 for success, -1 for error.
Definition at line 385 of file ccnr_sync.c.
Referenced by fetchStablePoint(), r_proto_initiate_key_fetch(), SyncHandleSlice(), SyncLocalRepoFetch(), and SyncStartContentFetch().
PUBLIC void r_sync_notify_after | ( | struct ccnr_handle * | ccnr, | |
ccnr_hwm | item | |||
) |
Notify repo of starting point for new names to be passed to sync.
Use item = 0 as the initial value. Following a call to r_sync_notify_after, the repository will call SyncNotifyContent(struct SyncBaseStruct *, int enumeration, ccnr_accession item, struct ccn_charbuf *name); periodically while there are no un-notified objects. enumeration is 0 for "time-based" notifications, or the value passed in when the enumeration was started. This may not end up an int. if the call is for an explicit enumeration, and there are no more objects, name and content_comps will be NULL. If SyncNotifyContent returns -1 then the active enumeration, or the r_sync_notify_after() will be cancelled.
Definition at line 117 of file ccnr_sync.c.
Referenced by r_sync_notify_content(), and SyncStartHeartbeat().
PUBLIC int r_sync_notify_content | ( | struct ccnr_handle * | ccnr, | |
int | e, | |||
struct content_entry * | content | |||
) |
A wrapper for SyncNotifyContent that takes a content entry.
Definition at line 129 of file ccnr_sync.c.
Referenced by r_store_set_accession_from_offset(), r_sync_enumerate_action(), and r_sync_notify_content().
PUBLIC enum ccn_upcall_res r_sync_upcall_store | ( | struct ccnr_handle * | ccnr, | |
enum ccn_upcall_kind | kind, | |||
struct ccn_upcall_info * | info | |||
) |
Called when a content object is received by sync and needs to be committed to stable storage by the repo.
Definition at line 416 of file ccnr_sync.c.
Referenced by r_sync_upcall_store(), and SyncRemoteFetchResponse().
const int se_cookie = __LINE__ [static] |
Definition at line 176 of file ccnr_sync.c.
Referenced by cleanup_se(), r_sync_enumerate(), and r_sync_enumerate_action().