00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef CCNR_STORE_DEFINED
00024 #define CCNR_STORE_DEFINED
00025
00026 #include <ccn/ccn.h>
00027 #include <ccn/hashtb.h>
00028
00029 #include "ccnr_private.h"
00030
00031 void r_store_init(struct ccnr_handle *h);
00032 int r_store_final(struct ccnr_handle *h, int stable);
00033 void r_store_set_content_timer(struct ccnr_handle *h,struct content_entry *content,struct ccn_parsed_ContentObject *pco);
00034 void r_store_mark_stale(struct ccnr_handle *h,struct content_entry *content);
00035 struct content_entry *r_store_next_child_at_level(struct ccnr_handle *h,struct content_entry *content,int level);
00036 struct content_entry *r_store_content_next(struct ccnr_handle *h,struct content_entry *content);
00037 int r_store_content_matches_interest_prefix(struct ccnr_handle *h,struct content_entry *content,const unsigned char *interest_msg, size_t interest_size);
00038 struct content_entry *r_store_find_first_match_candidate(struct ccnr_handle *h,const unsigned char *interest_msg,const struct ccn_parsed_interest *pi);
00039 ccnr_cookie r_store_enroll_content(struct ccnr_handle *h,struct content_entry *content);
00040 struct content_entry *r_store_content_from_accession(struct ccnr_handle *h, ccnr_accession accession);
00041 struct content_entry *r_store_content_from_cookie(struct ccnr_handle *h, ccnr_cookie cookie);
00042
00043 struct content_entry *r_store_lookup(struct ccnr_handle *h, const unsigned char *msg, const struct ccn_parsed_interest *pi, struct ccn_indexbuf *comps);
00044 struct content_entry *r_store_lookup_ccnb(struct ccnr_handle *h, const unsigned char *namish, size_t size);
00045 int r_store_content_field_access(struct ccnr_handle *h, struct content_entry *content, enum ccn_dtag dtag, const unsigned char **bufp, size_t *sizep);
00046 void r_store_send_content(struct ccnr_handle *h, struct fdholder *fdholder, struct content_entry *content);
00047 int r_store_name_append_components(struct ccn_charbuf *dst, struct ccnr_handle *h, struct content_entry *content, int skip, int count);
00048 int r_store_content_flags(struct content_entry *content);
00049 int r_store_content_change_flags(struct content_entry *content, int set, int clear);
00050 int r_store_commit_content(struct ccnr_handle *h, struct content_entry *content);
00051 void r_store_forget_content(struct ccnr_handle *h, struct content_entry **pentry);
00052 void ccnr_debug_content(struct ccnr_handle *h, int lineno, const char *msg,
00053 struct fdholder *fdholder,
00054 struct content_entry *content);
00055 int r_store_set_accession_from_offset(struct ccnr_handle *h, struct content_entry *content, struct fdholder *fdholder, off_t offset);
00056 int r_store_content_trim(struct ccnr_handle *h, struct content_entry *content);
00057 void r_store_trim(struct ccnr_handle *h, unsigned long limit);
00058 ccnr_cookie r_store_content_cookie(struct ccnr_handle *h, struct content_entry *content);
00059 ccnr_accession r_store_content_accession(struct ccnr_handle *h, struct content_entry *content);
00060 const unsigned char *r_store_content_base(struct ccnr_handle *h, struct content_entry *content);
00061 size_t r_store_content_size(struct ccnr_handle *h, struct content_entry *content);
00062 void r_store_index_needs_cleaning(struct ccnr_handle *h);
00063 struct ccn_charbuf *r_store_content_flatname(struct ccnr_handle *h, struct content_entry *content);
00064 #endif