Guardtime KSI c SDK
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Data Fields
KSI_CalendarAuthRec_list_st Struct Reference

#include <types.h>

Data Fields

int(* append )(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *)
 
int(* removeElement )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec **)
 
int(* indexOf )(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *, size_t **)
 
int(* insertAt )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *)
 
int(* replaceAt )(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *)
 
int(* elementAt )(KSI_CalendarAuthRecList *, size_t pos, KSI_CalendarAuthRec **)
 
size_t(* length )(KSI_CalendarAuthRecList *list)
 
void(* obj_free )(KSI_CalendarAuthRec *)
 
int(* sort )(KSI_CalendarAuthRecList *list, int(*cmp)(const KSI_CalendarAuthRec **, const KSI_CalendarAuthRec **))
 
int(* foldl )(KSI_CalendarAuthRecList *list, void *foldCtx, int(*fn)(KSI_CalendarAuthRec *el, void *foldCtx))
 
void * pImpl
 
int(* find )(KSI_CalendarAuthRecList *list, KSI_CalendarAuthRec *el, int *found, size_t *pos)
 

Field Documentation

int(* KSI_CalendarAuthRec_list_st::append)(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *)

Appends the element to the list.

Parameters
[in]listPointer to the list.
[in]elPointer to the element being added.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After appending the element to the list, the element belongs to the list and it will be freed if the list is freed.
int(* KSI_CalendarAuthRec_list_st::elementAt)(KSI_CalendarAuthRecList *, size_t pos, KSI_CalendarAuthRec **)

Method for accessing an element at any given position.

Parameters
[in]listPointer to the list.
[in]posPosition of the element.
[out]elPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
The returned element still belongs to the list and may not be freed by the caller.
int(* KSI_CalendarAuthRec_list_st::find)(KSI_CalendarAuthRecList *list, KSI_CalendarAuthRec *el, int *found, size_t *pos)
  • Find the index of the given element. If the element is found, the found output variable * will be evaluated to 1 and the index of the element is stored in pos. If the element is * not present, the parameter found is evaluated to 0 and the output variable pos remains * unchanged. If the process fails with an error neither pos nor found will be changed. *
    Parameters
    [in]listPointer to the list. *
    [in]elPointer to the element. *
    [out]foundOutput pointer for a boolean value whether the object was found or not. *
    [out]posOutput pointer for the index value if the element was found.
int(* KSI_CalendarAuthRec_list_st::foldl)(KSI_CalendarAuthRecList *list, void *foldCtx, int(*fn)(KSI_CalendarAuthRec *el, void *foldCtx))
  • Applies each element in the list and the foldCtx to the function fn. *
    Parameters
    [in]listPointer to the list. *
    [in]foldCtxThe fold context. *
    [in]fnFunction to be applied.
int(* KSI_CalendarAuthRec_list_st::indexOf)(KSI_CalendarAuthRecList *, KSI_CalendarAuthRec *, size_t **)

This function finds the index of a given element.

Parameters
[in]listPointer to the list.
[in]elPointer to the element.
[out]posPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
For fewer allocations use the *List_find function instead.
int(* KSI_CalendarAuthRec_list_st::insertAt)(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *)

Add the element to the given position in the list. All elements with equal or greater indices are shifted.

Parameters
[in]listPointer to the list.
[in]posPosition where to insert the element.
[in]elPointer to the element being added.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After add the element to the list, the element belongs to the list and it will be freed if the list is freed.
size_t(* KSI_CalendarAuthRec_list_st::length)(KSI_CalendarAuthRecList *list)

Returns the list of the element.

Parameters
[in]listPointer to the list.
Returns
Returns the length of the list or 0 if the list is NULL.
void(* KSI_CalendarAuthRec_list_st::obj_free)(KSI_CalendarAuthRec *)
void* KSI_CalendarAuthRec_list_st::pImpl

Internal implementation of the list.

int(* KSI_CalendarAuthRec_list_st::removeElement)(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec **)

Removes an element at the given position. If the out parameter is set to NULL, the removed element is freed implicitly with type_free.

Parameters
[in]listPointer to the list.
[in]posPosition of the element to be removed.
[out]elPointer to the receiving pointer.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
If the element is removed from the list and returned via output parameter to the caller, the caller is responsible for freeing the element.
int(* KSI_CalendarAuthRec_list_st::replaceAt)(KSI_CalendarAuthRecList *, size_t, KSI_CalendarAuthRec *)

Replace the element at the given position in the list. The old element will be freed.

Parameters
[in]listPointer to the list.
[in]posPosition where to insert the element.
[in]elPointer to the element being added.
Returns
status code (KSI_OK, when operation succeeded, otherwise an error code).
Note
After add the element to the list, the element belongs to the list and it will be freed if the list is freed.
int(* KSI_CalendarAuthRec_list_st::sort)(KSI_CalendarAuthRecList *list, int(*cmp)(const KSI_CalendarAuthRec **, const KSI_CalendarAuthRec **))

Sorts the list using the comparison function cmp. *

Parameters
[in]listPointer to the list. *
[in]cmpThe comparison function.

The documentation for this struct was generated from the following file: