]> git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/util.h
241c1e84892d065d385d4a6c4602c4aa40d5fefa
[thirdparty/cups.git] / scheduler / util.h
1 /*
2 * Mini-daemon utility definitions for CUPS.
3 *
4 * Copyright 2007-2014 by Apple Inc.
5 * Copyright 1997-2005 by Easy Software Products.
6 *
7 * These coded instructions, statements, and computer programs are the
8 * property of Apple Inc. and are protected by Federal copyright
9 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
10 * which should have been included with this file. If this file is
11 * file is missing or damaged, see the license at "http://www.cups.org/".
12 */
13
14 #ifndef _CUPSD_UTIL_H_
15 # define _CUPSD_UTIL_H_
16
17 /*
18 * Include necessary headers...
19 */
20
21 # include <cups/array-private.h>
22 # include <cups/file-private.h>
23 # include <signal.h>
24
25
26 /*
27 * C++ magic...
28 */
29
30 # ifdef __cplusplus
31 extern "C" {
32 # endif /* __cplusplus */
33
34
35 /*
36 * Types...
37 */
38
39 typedef int (*cupsd_compare_func_t)(const void *, const void *);
40
41
42 /*
43 * Prototypes...
44 */
45
46 extern int cupsdCompareNames(const char *s, const char *t);
47 extern cups_array_t *cupsdCreateStringsArray(const char *s);
48 extern int cupsdExec(const char *command, char **argv);
49 extern cups_file_t *cupsdPipeCommand(int *pid, const char *command,
50 char **argv, uid_t user);
51 extern void cupsdSendIPPGroup(ipp_tag_t group_tag);
52 extern void cupsdSendIPPHeader(ipp_status_t status_code,
53 int request_id);
54 extern void cupsdSendIPPInteger(ipp_tag_t value_tag,
55 const char *name, int value);
56 extern void cupsdSendIPPString(ipp_tag_t value_tag,
57 const char *name, const char *value);
58 extern void cupsdSendIPPTrailer(void);
59
60
61 # ifdef __cplusplus
62 }
63 # endif /* __cplusplus */
64
65 #endif /* !_CUPSD_UTIL_H_ */