Debian Codegraph @

include/base/plist.h

raw
1 /** BEGIN COPYRIGHT BLOCK
2 * Copyright (C) 2001 Sun Microsystems, Inc. Used by permission.
3 * Copyright (C) 2005 Red Hat, Inc.
4 * All rights reserved.
5 *
6 * License: GPL (version 3 or any later version).
7 * See LICENSE for details.
8 * END COPYRIGHT BLOCK **/
9
10 #ifdef HAVE_CONFIG_H
11 #include <config.h>
12 #endif
13
14 #ifndef _PLIST_H
15 #define _PLIST_H
16
17 #ifndef NOINTNSACL
18 #define INTNSACL
19 #endif /* !NOINTNSACL */
20
21 /*
22 * TYPE: PList_t
23 *
24 * DESCRIPTION:
25 *
26 * This type defines a handle for a property list.
27 */
28
29 #include "base/pool.h"
30
31 #ifndef PUBLIC_NSACL_PLISTDEF_H
32 #include "../public/nsacl/plistdef.h"
33 #endif /* !PUBLIC_NSACL_PLISTDEF_H */
34
35 #ifdef INTNSACL
36
37 /* Functions in plist.c */
38 NSPR_BEGIN_EXTERN_C
39
40 NSAPI_PUBLIC extern int PListAssignValue(PList_t plist, const char *pname, const void *pvalue, PList_t ptype);
41 NSAPI_PUBLIC extern PList_t PListCreate(pool_handle_t *mempool,
42 int resvprop,
43 int maxprop,
44 int flags);
45 NSAPI_PUBLIC extern int PListDefProp(PList_t plist, int pindex, const char *pname, const int flags);
46 NSAPI_PUBLIC extern const void *PListDeleteProp(PList_t plist, int pindex, const char *pname);
47 NSAPI_PUBLIC extern int PListFindValue(PList_t plist,
48 const char *pname,
49 void **pvalue,
50 PList_t *type);
51 NSAPI_PUBLIC extern int PListInitProp(PList_t plist, int pindex, const char *pname, const void *pvalue, PList_t ptype);
52 NSAPI_PUBLIC extern PList_t PListNew(pool_handle_t *mempool);
53 NSAPI_PUBLIC extern void PListDestroy(PList_t plist);
54 NSAPI_PUBLIC extern int PListGetValue(PList_t plist,
55 int pindex,
56 void **pvalue,
57 PList_t *type);
58 NSAPI_PUBLIC extern int PListNameProp(PList_t plist, int pindex, const char *pname);
59 NSAPI_PUBLIC extern int PListSetType(PList_t plist, int pindex, PList_t type);
60 NSAPI_PUBLIC extern int PListSetValue(PList_t plist,
61 int pindex,
62 const void *pvalue,
63 PList_t type);
64 NSAPI_PUBLIC extern void PListEnumerate(PList_t plist, PListFunc_t *user_func, void *user_data);
65 NSAPI_PUBLIC extern PList_t
66 PListDuplicate(PList_t plist, pool_handle_t *new_mempool, int flags);
67 NSAPI_PUBLIC extern pool_handle_t *PListGetPool(PList_t plist);
68
69 NSPR_END_EXTERN_C
70
71 #endif /* INTNSACL */
72
73 #endif /* _PLIST_H */