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