Go to the source code of this file.
Functions | |
void | ccn_uri_append_percentescaped (struct ccn_charbuf *c, const unsigned char *data, size_t size) |
This appends to c a percent-escaped representation of the component passed in. | |
int | ccn_uri_append (struct ccn_charbuf *c, const unsigned char *ccnb, size_t size, int includescheme) |
This appends to c a URI representation of the ccnb-encoded Name element passed in. | |
int | ccn_name_from_uri (struct ccn_charbuf *c, const char *uri) |
Convert a ccnx-scheme URI to a ccnb-encoded Name. |
Part of the CCNx C Library.
Copyright (C) 2008, 2009, 2010 Palo Alto Research Center, Inc.
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 uri.h.
int ccn_name_from_uri | ( | struct ccn_charbuf * | c, | |
const char * | uri | |||
) |
Convert a ccnx-scheme URI to a ccnb-encoded Name.
The converted result is placed in c. On input, c may contain a base name, in which case relative URIs are allowed. Otherwise c should start out empty, and the URI must be absolute.
Definition at line 249 of file ccn_uri.c.
Referenced by ccn_initiate_ccndid_fetch(), ccn_initiate_prefix_reg(), ccnd_init_service_ccnb(), ccnd_parse_uri_list(), ccnd_reg_ccnx_ccndid(), ccnd_reg_uri(), ccnd_start_notice(), ccnd_uri_listen(), ccnr_init_policy_cob(), ccnr_init_policy_link_cob(), ccnr_init_service_ccnb(), ccnr_uri_listen(), existingRootOp(), get_ccndid(), getFile(), load_policy(), localStore(), main(), newDefaultRoot(), NewElem(), parseAndAccumName(), process_command_tokens(), putFile(), r_proto_append_repo_info(), r_proto_uri_listen(), sendSlice(), stuff_link_check(), SyncNewBase(), test_flatname(), testRootBasic(), and testRootLookup().
int ccn_uri_append | ( | struct ccn_charbuf * | c, | |
const unsigned char * | ccnb, | |||
size_t | size, | |||
int | includescheme | |||
) |
This appends to c a URI representation of the ccnb-encoded Name element passed in.
For convenience, it will also look inside of a ContentObject or Interest object to find the Name. Components that consist solely of zero or more dots are converted by adding 3 more dots so there are no ambiguities with . or .. or whether a component is empty or absent. Will prepend "ccnx:" unless includescheme is 0
Definition at line 88 of file ccn_uri.c.
Referenced by ccn_uri_append_flatname(), ccnd_debug_ccnb(), ccnd_reg_ccnx_ccndid(), ccnd_uri_listen(), ccnr_debug_ccnb(), ccnr_uri_listen(), collect_forwarding_html(), collect_forwarding_xml(), incoming_content(), main(), printTreeInner(), process_data(), process_prefix_face_list_item(), storeHandler(), SyncRootLookupName(), SyncUriForName(), test_flatname(), and testReader().
void ccn_uri_append_percentescaped | ( | struct ccn_charbuf * | c, | |
const unsigned char * | data, | |||
size_t | size | |||
) |
This appends to c a percent-escaped representation of the component passed in.
Only generic URI unreserved characters are not escaped. Components that consist solely of zero or more dots are converted by adding 3 more dots so there are no ambiguities with . or .. or whether a component is empty or absent. (cf. ccn_uri_append)
Definition at line 51 of file ccn_uri.c.
Referenced by ccn_uri_append(), and incoming_interest().