ccnr_store.h

Go to the documentation of this file.
00001 /**
00002  * @file ccnr_store.h
00003  * 
00004  * Part of ccnr - CCNx Repository Daemon.
00005  *
00006  */
00007 
00008 /*
00009  * Copyright (C) 2011 Palo Alto Research Center, Inc.
00010  *
00011  * This work is free software; you can redistribute it and/or modify it under
00012  * the terms of the GNU General Public License version 2 as published by the
00013  * Free Software Foundation.
00014  * This work is distributed in the hope that it will be useful, but WITHOUT ANY
00015  * WARRANTY; without even the implied warranty of MERCHANTABILITY or
00016  * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
00017  * for more details. You should have received a copy of the GNU General Public
00018  * License along with this program; if not, write to the
00019  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00020  * Boston, MA 02110-1301, USA.
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

Generated on Thu Feb 16 00:43:58 2012 for Content-Centric Networking in C by  doxygen 1.5.6