]> git.ipfire.org Git - thirdparty/cups.git/blame - cups/array.h
Import CUPS 1.4svn-r7041.
[thirdparty/cups.git] / cups / array.h
CommitLineData
ef416fc2 1/*
bc44d920 2 * "$Id: array.h 6649 2007-07-11 21:46:42Z mike $"
ef416fc2 3 *
4 * Sorted array definitions for the Common UNIX Printing System (CUPS).
5 *
bc44d920 6 * Copyright 2007 by Apple Inc.
b94498cf 7 * Copyright 1997-2007 by Easy Software Products.
ef416fc2 8 *
9 * These coded instructions, statements, and computer programs are the
bc44d920 10 * property of Apple Inc. and are protected by Federal copyright
11 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
12 * which should have been included with this file. If this file is
13 * file is missing or damaged, see the license at "http://www.cups.org/".
ef416fc2 14 *
15 * This file is subject to the Apple OS-Developed Software exception.
16 */
17
18#ifndef _CUPS_ARRAY_H_
19# define _CUPS_ARRAY_H_
20
21/*
22 * Include necessary headers...
23 */
24
2fb76298 25# include "versioning.h"
ef416fc2 26# include <stdlib.h>
27
28
29/*
30 * C++ magic...
31 */
32
33# ifdef __cplusplus
34extern "C" {
35# endif /* __cplusplus */
36
37
38/*
39 * Types and structures...
40 */
41
42typedef struct _cups_array_s cups_array_t;
43 /**** CUPS array type ****/
44typedef int (*cups_array_func_t)(void *first, void *second, void *data);
45 /**** Array comparison function ****/
b94498cf 46typedef int (*cups_ahash_func_t)(void *element, void *data);
47 /**** Array hash function ****/
48
ef416fc2 49
50/*
51 * Functions...
52 */
53
2fb76298
MS
54extern int cupsArrayAdd(cups_array_t *a, void *e) _CUPS_API_1_2;
55extern void cupsArrayClear(cups_array_t *a) _CUPS_API_1_2;
56extern int cupsArrayCount(cups_array_t *a) _CUPS_API_1_2;
57extern void *cupsArrayCurrent(cups_array_t *a) _CUPS_API_1_2;
58extern void cupsArrayDelete(cups_array_t *a) _CUPS_API_1_2;
59extern cups_array_t *cupsArrayDup(cups_array_t *a) _CUPS_API_1_2;
60extern void *cupsArrayFind(cups_array_t *a, void *e) _CUPS_API_1_2;
61extern void *cupsArrayFirst(cups_array_t *a) _CUPS_API_1_2;
62extern int cupsArrayGetIndex(cups_array_t *a) _CUPS_API_1_3;
63extern int cupsArrayGetInsert(cups_array_t *a) _CUPS_API_1_3;
64extern void *cupsArrayIndex(cups_array_t *a, int n) _CUPS_API_1_2;
65extern int cupsArrayInsert(cups_array_t *a, void *e) _CUPS_API_1_2;
66extern void *cupsArrayLast(cups_array_t *a) _CUPS_API_1_2;
67extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d) _CUPS_API_1_2;
b94498cf 68extern cups_array_t *cupsArrayNew2(cups_array_func_t f, void *d,
2fb76298
MS
69 cups_ahash_func_t h, int hsize) _CUPS_API_1_3;
70extern void *cupsArrayNext(cups_array_t *a) _CUPS_API_1_2;
71extern void *cupsArrayPrev(cups_array_t *a) _CUPS_API_1_2;
72extern int cupsArrayRemove(cups_array_t *a, void *e) _CUPS_API_1_2;
73extern void *cupsArrayRestore(cups_array_t *a) _CUPS_API_1_2;
74extern int cupsArraySave(cups_array_t *a) _CUPS_API_1_2;
75extern void *cupsArrayUserData(cups_array_t *a) _CUPS_API_1_2;
ef416fc2 76
77# ifdef __cplusplus
78}
79# endif /* __cplusplus */
80#endif /* !_CUPS_ARRAY_H_ */
81
82/*
bc44d920 83 * End of "$Id: array.h 6649 2007-07-11 21:46:42Z mike $".
ef416fc2 84 */