2 * Mini-daemon utility definitions for CUPS.
4 * Copyright 2007-2014 by Apple Inc.
5 * Copyright 1997-2005 by Easy Software Products.
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/".
14 #ifndef _CUPSD_UTIL_H_
15 # define _CUPSD_UTIL_H_
18 * Include necessary headers...
21 # include <cups/array-private.h>
22 # include <cups/file-private.h>
32 # endif /* __cplusplus */
39 typedef int (*cupsd_compare_func_t)(const void *, const void *);
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,
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);
63 # endif /* __cplusplus */
65 #endif /* !_CUPSD_UTIL_H_ */