src/identity_list.h
author Edouard Tisserant
Thu, 09 Jun 2016 16:51:44 +0200
branchimport_own_key
changeset 730 de7942336904
parent 230 5b36a2663539
child 1513 e7f7e42385b5
permissions -rw-r--r--
Moved identity_list typedef
     1 #pragma once
     2 
     3 #include "pEpEngine.h"
     4 
     5 #ifdef __cplusplus
     6 extern "C" {
     7 #endif
     8 
     9 
    10 // new_identity_list() - allocate a new identity list
    11 //
    12 //  parameters:
    13 //      ident (in)          identity to move for first element
    14 //
    15 //  return value:
    16 //      new identity_list or NULL if out of memory
    17 //
    18 //  caveat:
    19 //      ident is being moved if the function succeeds, the caller loses
    20 //      ownership
    21 
    22 DYNAMIC_API identity_list *new_identity_list(pEp_identity *ident);
    23 
    24 
    25 // identity_list_dup() - duplicate identity_list (deep copy)
    26 //
    27 //  parameters:
    28 //      id_list (in)        identity_list to copy
    29 //
    30 //  return value:
    31 //      new identity_list or NULL if out of memory
    32 
    33 DYNAMIC_API identity_list *identity_list_dup(const identity_list *src);
    34 
    35 
    36 // free_identity_list() - free memory allocated by identity_list
    37 //
    38 //  parameters:
    39 //      id_list (in)        identity_list to free
    40 //
    41 //  caveat:
    42 //      this function frees all identities in the list additional to the
    43 //      identity_list itself
    44 
    45 DYNAMIC_API void free_identity_list(identity_list *id_list);
    46 
    47 
    48 // identity_list_add - add identity to an identity_list
    49 //
    50 //  parameters:
    51 //      id_list (in)        identity_list to add to
    52 //      ident (in)          identity being added
    53 //
    54 //  return value:
    55 //      pointer to the last element in identity_list or NULL if out of memory
    56 //
    57 //  caveat:
    58 //      ident is being moved, the caller loses ownership if the function is
    59 //      successful
    60 
    61 DYNAMIC_API identity_list *identity_list_add(identity_list *id_list, pEp_identity *ident);
    62 
    63 
    64 // identity_list_length() - get length of identity_list
    65 //
    66 //  parameters:
    67 //      id_list (in)        identity_list struct to determine length of
    68 //
    69 //  return value:
    70 //      length of identity_list in number of elements
    71 
    72 DYNAMIC_API int identity_list_length(const identity_list *id_list);
    73 
    74 
    75 #ifdef __cplusplus
    76 }
    77 #endif
    78