1 /* ccapi/server/ccs_list_internal.h */ 2 /* 3 * Copyright 2006 Massachusetts Institute of Technology. 4 * All Rights Reserved. 5 * 6 * Export of this software from the United States of America may 7 * require a specific license from the United States Government. 8 * It is the responsibility of any person or organization contemplating 9 * export to obtain such a license before exporting. 10 * 11 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and 12 * distribute this software and its documentation for any purpose and 13 * without fee is hereby granted, provided that the above copyright 14 * notice appear in all copies and that both that copyright notice and 15 * this permission notice appear in supporting documentation, and that 16 * the name of M.I.T. not be used in advertising or publicity pertaining 17 * to distribution of the software without specific, written prior 18 * permission. Furthermore if you modify this software you must label 19 * your software as modified software and not distribute it in such a 20 * fashion that it might be confused with the original M.I.T. software. 21 * M.I.T. makes no representations about the suitability of 22 * this software for any purpose. It is provided "as is" without express 23 * or implied warranty. 24 */ 25 26 #ifndef CCS_LIST_INTERNAL_H 27 #define CCS_LIST_INTERNAL_H 28 29 #include "ccs_common.h" 30 #include "cci_array_internal.h" 31 32 struct ccs_list_d; 33 typedef struct ccs_list_d *ccs_list_t; 34 35 struct ccs_list_iterator_d; 36 typedef struct ccs_list_iterator_d *ccs_list_iterator_t; 37 38 typedef cci_array_object_t ccs_list_object_t; 39 typedef cc_int32 (*ccs_object_release_t) (ccs_list_object_t); 40 typedef cc_int32 (*ccs_object_compare_identifier_t) (ccs_list_object_t, cci_identifier_t, cc_uint32 *); 41 42 cc_int32 ccs_list_new (ccs_list_t *out_list, 43 cc_int32 in_object_not_found_err, 44 cc_int32 in_iterator_not_found_err, 45 ccs_object_compare_identifier_t in_object_compare_identifier, 46 ccs_object_release_t in_object_release); 47 48 cc_int32 ccs_list_release (ccs_list_t io_list); 49 50 cc_int32 ccs_list_new_iterator (ccs_list_t io_list, 51 ccs_pipe_t in_client_pipe, 52 ccs_list_iterator_t *out_list_iterator); 53 54 cc_int32 ccs_list_release_iterator (ccs_list_t io_list, 55 cci_identifier_t in_identifier); 56 57 cc_int32 ccs_list_count (ccs_list_t in_list, 58 cc_uint64 *out_count); 59 60 cc_int32 ccs_list_find (ccs_list_t in_list, 61 cci_identifier_t in_identifier, 62 ccs_list_object_t *out_object); 63 64 cc_int32 ccs_list_find_iterator (ccs_list_t in_list, 65 cci_identifier_t in_identifier, 66 ccs_list_iterator_t *out_list_iterator); 67 68 cc_int32 ccs_list_add (ccs_list_t io_list, 69 ccs_list_object_t in_object); 70 71 cc_int32 ccs_list_remove (ccs_list_t io_list, 72 cci_identifier_t in_identifier); 73 74 cc_int32 ccs_list_push_front (ccs_list_t io_list, 75 cci_identifier_t in_identifier); 76 77 78 cc_int32 ccs_list_iterator_write (ccs_list_iterator_t in_list_iterator, 79 k5_ipc_stream in_stream); 80 81 cc_int32 ccs_list_iterator_clone (ccs_list_iterator_t in_list_iterator, 82 ccs_list_iterator_t *out_list_iterator); 83 84 cc_int32 ccs_list_iterator_current (ccs_list_iterator_t io_list_iterator, 85 ccs_list_object_t *out_object); 86 87 cc_int32 ccs_list_iterator_next (ccs_list_iterator_t io_list_iterator, 88 ccs_list_object_t *out_object); 89 90 cc_int32 ccs_list_iterator_invalidate (ccs_list_iterator_t io_list_iterator); 91 92 cc_int32 ccs_list_iterator_release (ccs_list_iterator_t io_list_iterator); 93 94 #endif /* CCS_LIST_INTERNAL_H */ 95