1/*
2 * "$Id: util.h 11560 2014-02-06 20:10:19Z msweet $"
3 *
4 * Mini-daemon utility definitions for CUPS.
5 *
6 * Copyright 2007-2014 by Apple Inc.
7 * Copyright 1997-2005 by Easy Software Products.
8 *
9 * These coded instructions, statements, and computer programs are the
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/".
14 */
15
16#ifndef _CUPSD_UTIL_H_
17#  define _CUPSD_UTIL_H_
18
19/*
20 * Include necessary headers...
21 */
22
23#  include <cups/array-private.h>
24#  include <cups/file-private.h>
25#  include <signal.h>
26
27
28/*
29 * C++ magic...
30 */
31
32#  ifdef __cplusplus
33extern "C" {
34#  endif /* __cplusplus */
35
36
37/*
38 * Types...
39 */
40
41typedef int (*cupsd_compare_func_t)(const void *, const void *);
42
43
44/*
45 * Prototypes...
46 */
47
48extern int		cupsdCompareNames(const char *s, const char *t);
49extern cups_array_t	*cupsdCreateStringsArray(const char *s);
50extern int		cupsdExec(const char *command, char **argv);
51extern cups_file_t	*cupsdPipeCommand(int *pid, const char *command,
52			                  char **argv, uid_t user);
53extern void		cupsdSendIPPGroup(ipp_tag_t group_tag);
54extern void		cupsdSendIPPHeader(ipp_status_t status_code,
55			                   int request_id);
56extern void		cupsdSendIPPInteger(ipp_tag_t value_tag,
57			                    const char *name, int value);
58extern void		cupsdSendIPPString(ipp_tag_t value_tag,
59			                   const char *name, const char *value);
60extern void		cupsdSendIPPTrailer(void);
61
62
63#  ifdef __cplusplus
64}
65#  endif /* __cplusplus */
66
67#endif /* !_CUPSD_UTIL_H_ */
68
69/*
70 * End of "$Id: util.h 11560 2014-02-06 20:10:19Z msweet $".
71 */
72