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

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rwxr-xr-x

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

     1 /* This Source Code Form is subject to the terms of the Mozilla Public
     2  * License, v. 2.0. If a copy of the MPL was not distributed with this
     3  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     4 /*
     5  * pkix_list.h
     6  *
     7  * List Object Type Definition
     8  *
     9  */
    11 #ifndef _PKIX_LIST_H
    12 #define _PKIX_LIST_H
    14 #include "pkix_tools.h"
    16 #ifdef __cplusplus
    17 extern "C" {
    18 #endif
    20 typedef PKIX_Error *
    21 (*PKIX_List_SortComparatorCallback)(
    22         PKIX_PL_Object *obj1,
    23         PKIX_PL_Object *obj2,
    24         PKIX_Int32 *pResult,
    25         void *plContext);
    27 struct PKIX_ListStruct {
    28         PKIX_PL_Object *item;
    29         PKIX_List *next;
    30         PKIX_Boolean immutable;
    31         PKIX_UInt32 length;
    32         PKIX_Boolean isHeader;
    33 };
    35 /* see source file for function documentation */
    37 PKIX_Error *pkix_List_RegisterSelf(void *plContext);
    39 PKIX_Error *
    40 pkix_List_Contains(
    41         PKIX_List *list,
    42         PKIX_PL_Object *object,
    43         PKIX_Boolean *pFound,
    44         void *plContext);
    46 PKIX_Error *
    47 pkix_List_Remove(
    48         PKIX_List *list,
    49         PKIX_PL_Object *target,
    50         void *plContext);
    52 PKIX_Error *
    53 pkix_List_MergeLists(
    54         PKIX_List *firstList,
    55         PKIX_List *secondList,
    56         PKIX_List **pMergedList,
    57         void *plContext);
    59 PKIX_Error *
    60 pkix_List_AppendList(
    61         PKIX_List *toList,
    62         PKIX_List *fromList,
    63         void *plContext);
    65 PKIX_Error *
    66 pkix_List_AppendUnique(
    67         PKIX_List *toList,
    68         PKIX_List *fromList,
    69         void *plContext);
    71 PKIX_Error *
    72 pkix_List_RemoveItems(
    73         PKIX_List *list,
    74         PKIX_List *deleteList,
    75         void *plContext);
    77 PKIX_Error *
    78 pkix_List_QuickSort(
    79         PKIX_List *fromList,
    80         PKIX_List_SortComparatorCallback comparator,
    81         PKIX_List **pSortedList,
    82         void *plContext);
    84 PKIX_Error *
    85 pkix_List_BubbleSort(
    86         PKIX_List *fromList,
    87         PKIX_List_SortComparatorCallback comparator,
    88         PKIX_List **pSortedList,
    89         void *plContext);
    91 #ifdef __cplusplus
    92 }
    93 #endif
    95 #endif /* _PKIX_LIST_H */

mercurial