security/nss/lib/libpkix/pkix/util/pkix_list.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/security/nss/lib/libpkix/pkix/util/pkix_list.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,95 @@
     1.4 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.5 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.6 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.7 +/*
     1.8 + * pkix_list.h
     1.9 + *
    1.10 + * List Object Type Definition
    1.11 + *
    1.12 + */
    1.13 +
    1.14 +#ifndef _PKIX_LIST_H
    1.15 +#define _PKIX_LIST_H
    1.16 +
    1.17 +#include "pkix_tools.h"
    1.18 +
    1.19 +#ifdef __cplusplus
    1.20 +extern "C" {
    1.21 +#endif
    1.22 +
    1.23 +typedef PKIX_Error *
    1.24 +(*PKIX_List_SortComparatorCallback)(
    1.25 +        PKIX_PL_Object *obj1,
    1.26 +        PKIX_PL_Object *obj2,
    1.27 +        PKIX_Int32 *pResult,
    1.28 +        void *plContext);
    1.29 +
    1.30 +struct PKIX_ListStruct {
    1.31 +        PKIX_PL_Object *item;
    1.32 +        PKIX_List *next;
    1.33 +        PKIX_Boolean immutable;
    1.34 +        PKIX_UInt32 length;
    1.35 +        PKIX_Boolean isHeader;
    1.36 +};
    1.37 +
    1.38 +/* see source file for function documentation */
    1.39 +
    1.40 +PKIX_Error *pkix_List_RegisterSelf(void *plContext);
    1.41 +
    1.42 +PKIX_Error *
    1.43 +pkix_List_Contains(
    1.44 +        PKIX_List *list,
    1.45 +        PKIX_PL_Object *object,
    1.46 +        PKIX_Boolean *pFound,
    1.47 +        void *plContext);
    1.48 +
    1.49 +PKIX_Error *
    1.50 +pkix_List_Remove(
    1.51 +        PKIX_List *list,
    1.52 +        PKIX_PL_Object *target,
    1.53 +        void *plContext);
    1.54 +
    1.55 +PKIX_Error *
    1.56 +pkix_List_MergeLists(
    1.57 +        PKIX_List *firstList,
    1.58 +        PKIX_List *secondList,
    1.59 +        PKIX_List **pMergedList,
    1.60 +        void *plContext);
    1.61 +
    1.62 +PKIX_Error *
    1.63 +pkix_List_AppendList(
    1.64 +        PKIX_List *toList,
    1.65 +        PKIX_List *fromList,
    1.66 +        void *plContext);
    1.67 +
    1.68 +PKIX_Error *
    1.69 +pkix_List_AppendUnique(
    1.70 +        PKIX_List *toList,
    1.71 +        PKIX_List *fromList,
    1.72 +        void *plContext);
    1.73 +
    1.74 +PKIX_Error *
    1.75 +pkix_List_RemoveItems(
    1.76 +        PKIX_List *list,
    1.77 +        PKIX_List *deleteList,
    1.78 +        void *plContext);
    1.79 +
    1.80 +PKIX_Error *
    1.81 +pkix_List_QuickSort(
    1.82 +        PKIX_List *fromList,
    1.83 +        PKIX_List_SortComparatorCallback comparator,
    1.84 +        PKIX_List **pSortedList,
    1.85 +        void *plContext);
    1.86 +
    1.87 +PKIX_Error *
    1.88 +pkix_List_BubbleSort(
    1.89 +        PKIX_List *fromList,
    1.90 +        PKIX_List_SortComparatorCallback comparator,
    1.91 +        PKIX_List **pSortedList,
    1.92 +        void *plContext);
    1.93 +
    1.94 +#ifdef __cplusplus
    1.95 +}
    1.96 +#endif
    1.97 +
    1.98 +#endif /* _PKIX_LIST_H */

mercurial