Go to the source code of this file.
Defines | |
#define | ELEMENT size_t |
Functions | |
struct ccn_indexbuf * | ccn_indexbuf_create (void) |
Create a new indexbuf. | |
void | ccn_indexbuf_destroy (struct ccn_indexbuf **cbp) |
Deallocate indexbuf. | |
ELEMENT * | ccn_indexbuf_reserve (struct ccn_indexbuf *c, size_t n) |
Expand buffer as necessary to hold at least n more values. | |
int | ccn_indexbuf_append (struct ccn_indexbuf *c, const ELEMENT *p, size_t n) |
Append multiple elements to the indexbuf. | |
int | ccn_indexbuf_append_element (struct ccn_indexbuf *c, ELEMENT v) |
Append v to the indexbuf. | |
int | ccn_indexbuf_member (struct ccn_indexbuf *x, ELEMENT val) |
void | ccn_indexbuf_remove_element (struct ccn_indexbuf *x, ELEMENT val) |
Removes up to one instance of val from the indexbuf. | |
int | ccn_indexbuf_set_insert (struct ccn_indexbuf *x, ELEMENT val) |
int | ccn_indexbuf_remove_first_match (struct ccn_indexbuf *x, ELEMENT val) |
Removes first occurrence of val, preserving order. | |
void | ccn_indexbuf_move_to_end (struct ccn_indexbuf *x, ELEMENT val) |
If val is present in the indexbuf, move it to the final place. | |
void | ccn_indexbuf_move_to_front (struct ccn_indexbuf *x, ELEMENT val) |
If val is present in the indexbuf, move it to the first place. |
Part of the CCNx C Library.
Copyright (C) 2008, 2009 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 ccn_indexbuf.c.
#define ELEMENT size_t |
Definition at line 25 of file ccn_indexbuf.c.
Referenced by ccn_indexbuf_append(), ccn_indexbuf_append_element(), and ccn_indexbuf_reserve().
int ccn_indexbuf_append | ( | struct ccn_indexbuf * | c, | |
const ELEMENT * | p, | |||
size_t | n | |||
) |
Append multiple elements to the indexbuf.
Definition at line 93 of file ccn_indexbuf.c.
int ccn_indexbuf_append_element | ( | struct ccn_indexbuf * | c, | |
ELEMENT | v | |||
) |
Append v to the indexbuf.
Definition at line 108 of file ccn_indexbuf.c.
struct ccn_indexbuf* ccn_indexbuf_create | ( | void | ) | [read] |
Create a new indexbuf.
Definition at line 31 of file ccn_indexbuf.c.
Referenced by ccn_create_version(), ccn_dispatch_message(), ccn_indexbuf_obtain(), ccn_name_chop(), ccn_name_next_sibling(), ccn_parse_interest(), ccn_parse_Link(), ccn_resolve_version(), ccn_sign_content(), ccnd_create(), ccnd_reg_uri(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), ccnd_start_notice(), ccnd_uri_listen(), ccnr_parsed_policy_create(), ccnr_uri_listen(), content_queue_create(), content_skiplist_insert(), decode_message(), deliver_content(), get_outbound_faces(), indexbuf_obtain(), interest_handler(), load_policy(), main(), process_test(), r_init_create(), r_match_match_interests(), r_proto_begin_enumeration(), r_proto_check_exclude(), r_proto_policy_update(), r_proto_start_write_checked(), r_store_index_cleaner(), r_sync_enumerate(), r_util_indexbuf_obtain(), SyncNewBase(), test_insert_content(), and update_forward_to().
void ccn_indexbuf_destroy | ( | struct ccn_indexbuf ** | cbp | ) |
Deallocate indexbuf.
Definition at line 42 of file ccn_indexbuf.c.
Referenced by ccn_create_version(), ccn_destroy(), ccn_dispatch_message(), ccn_indexbuf_release(), ccn_name_chop(), ccn_name_next_sibling(), ccn_parse_interest(), ccn_parse_Link(), ccn_resolve_version(), ccn_sign_content(), ccnd_destroy(), ccnd_internal_client_stop(), ccnd_reg_uri(), ccnd_req_prefix_or_self_reg(), ccnd_req_unreg(), ccnd_start_notice(), ccnd_uri_listen(), ccnr_direct_client_stop(), ccnr_internal_client_stop(), ccnr_parsed_policy_destroy(), ccnr_uri_listen(), check_forward_to(), cleanup_se(), consume(), content_queue_destroy(), content_skiplist_remove(), decode_message(), deliver_content(), finalize_nameprefix(), indexbuf_release(), interest_handler(), load_policy(), main(), process_incoming_interest(), propagate_interest(), r_fwd_finalize_nameprefix(), r_init_destroy(), r_match_consume_interest(), r_match_match_interests(), r_proto_begin_enumeration(), r_proto_check_exclude(), r_proto_continue_enumeration(), r_proto_policy_update(), r_proto_start_write_checked(), r_sendq_content_queue_destroy(), r_store_index_cleaner(), r_sync_enumerate(), r_util_indexbuf_release(), SyncFreeBase(), test_insert_content(), and update_forward_to().
int ccn_indexbuf_member | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
Definition at line 122 of file ccn_indexbuf.c.
void ccn_indexbuf_move_to_end | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
If val is present in the indexbuf, move it to the final place.
Definition at line 196 of file ccn_indexbuf.c.
void ccn_indexbuf_move_to_front | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
If val is present in the indexbuf, move it to the first place.
Definition at line 217 of file ccn_indexbuf.c.
void ccn_indexbuf_remove_element | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
Removes up to one instance of val from the indexbuf.
Order of elements not preserved.
Definition at line 138 of file ccn_indexbuf.c.
int ccn_indexbuf_remove_first_match | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
Removes first occurrence of val, preserving order.
Definition at line 173 of file ccn_indexbuf.c.
ELEMENT* ccn_indexbuf_reserve | ( | struct ccn_indexbuf * | c, | |
size_t | n | |||
) |
Expand buffer as necessary to hold at least n more values.
Definition at line 59 of file ccn_indexbuf.c.
Referenced by ccn_indexbuf_append(), and ccn_indexbuf_append_element().
int ccn_indexbuf_set_insert | ( | struct ccn_indexbuf * | x, | |
ELEMENT | val | |||
) |
Definition at line 154 of file ccn_indexbuf.c.