1 // This file is under GNU General Public License 3.0
13 // new_identity_list() - allocate a new identity list
16 // ident (in) identity to move for first element
19 // new identity_list or NULL if out of memory
22 // ident is being moved if the function succeeds, the caller loses
25 DYNAMIC_API identity_list *new_identity_list(pEp_identity *ident);
28 // identity_list_dup() - duplicate identity_list (deep copy)
31 // id_list (in) identity_list to copy
34 // new identity_list or NULL if out of memory
36 DYNAMIC_API identity_list *identity_list_dup(const identity_list *src);
39 // free_identity_list() - free memory allocated by identity_list
42 // id_list (in) identity_list to free
45 // this function frees all identities in the list additional to the
46 // identity_list itself
48 DYNAMIC_API void free_identity_list(identity_list *id_list);
51 // identity_list_add - add identity to an identity_list
54 // id_list (in) identity_list to add to
55 // ident (in) identity being added
58 // pointer to the last element in identity_list or NULL if out of memory
61 // ident is being moved, the caller loses ownership if the function is
64 DYNAMIC_API identity_list *identity_list_add(identity_list *id_list, pEp_identity *ident);
66 // identity_list_add - join second identity_list to the first.
69 // first_list (in) identity_list to add to
70 // second_list (in) identity list to add
73 // pointer to the HEAD of the new list, or NULL if both lists are empty.
75 DYNAMIC_API identity_list *identity_list_join(identity_list *first_list, identity_list* second_list);
77 // identity_list_length() - get length of identity_list
80 // id_list (in) identity_list struct to determine length of
83 // length of identity_list in number of elements
85 DYNAMIC_API int identity_list_length(const identity_list *id_list);
88 PEP_STATUS set_all_userids_in_list(identity_list* id_list, const char* user_id);