xref: /aosp_15_r20/external/libcups/scheduler/util.h (revision 5e7646d21f1134fb0638875d812ef646c12ab91e)
1*5e7646d2SAndroid Build Coastguard Worker /*
2*5e7646d2SAndroid Build Coastguard Worker  * Mini-daemon utility definitions for CUPS.
3*5e7646d2SAndroid Build Coastguard Worker  *
4*5e7646d2SAndroid Build Coastguard Worker  * Copyright 2007-2014 by Apple Inc.
5*5e7646d2SAndroid Build Coastguard Worker  * Copyright 1997-2005 by Easy Software Products.
6*5e7646d2SAndroid Build Coastguard Worker  *
7*5e7646d2SAndroid Build Coastguard Worker  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8*5e7646d2SAndroid Build Coastguard Worker  */
9*5e7646d2SAndroid Build Coastguard Worker 
10*5e7646d2SAndroid Build Coastguard Worker #ifndef _CUPSD_UTIL_H_
11*5e7646d2SAndroid Build Coastguard Worker #  define _CUPSD_UTIL_H_
12*5e7646d2SAndroid Build Coastguard Worker 
13*5e7646d2SAndroid Build Coastguard Worker /*
14*5e7646d2SAndroid Build Coastguard Worker  * Include necessary headers...
15*5e7646d2SAndroid Build Coastguard Worker  */
16*5e7646d2SAndroid Build Coastguard Worker 
17*5e7646d2SAndroid Build Coastguard Worker #  include <cups/array-private.h>
18*5e7646d2SAndroid Build Coastguard Worker #  include <cups/file-private.h>
19*5e7646d2SAndroid Build Coastguard Worker #  include <signal.h>
20*5e7646d2SAndroid Build Coastguard Worker 
21*5e7646d2SAndroid Build Coastguard Worker 
22*5e7646d2SAndroid Build Coastguard Worker /*
23*5e7646d2SAndroid Build Coastguard Worker  * C++ magic...
24*5e7646d2SAndroid Build Coastguard Worker  */
25*5e7646d2SAndroid Build Coastguard Worker 
26*5e7646d2SAndroid Build Coastguard Worker #  ifdef __cplusplus
27*5e7646d2SAndroid Build Coastguard Worker extern "C" {
28*5e7646d2SAndroid Build Coastguard Worker #  endif /* __cplusplus */
29*5e7646d2SAndroid Build Coastguard Worker 
30*5e7646d2SAndroid Build Coastguard Worker 
31*5e7646d2SAndroid Build Coastguard Worker /*
32*5e7646d2SAndroid Build Coastguard Worker  * Types...
33*5e7646d2SAndroid Build Coastguard Worker  */
34*5e7646d2SAndroid Build Coastguard Worker 
35*5e7646d2SAndroid Build Coastguard Worker typedef int (*cupsd_compare_func_t)(const void *, const void *);
36*5e7646d2SAndroid Build Coastguard Worker 
37*5e7646d2SAndroid Build Coastguard Worker 
38*5e7646d2SAndroid Build Coastguard Worker /*
39*5e7646d2SAndroid Build Coastguard Worker  * Prototypes...
40*5e7646d2SAndroid Build Coastguard Worker  */
41*5e7646d2SAndroid Build Coastguard Worker 
42*5e7646d2SAndroid Build Coastguard Worker extern int		cupsdCompareNames(const char *s, const char *t);
43*5e7646d2SAndroid Build Coastguard Worker extern cups_array_t	*cupsdCreateStringsArray(const char *s);
44*5e7646d2SAndroid Build Coastguard Worker extern int		cupsdExec(const char *command, char **argv);
45*5e7646d2SAndroid Build Coastguard Worker extern cups_file_t	*cupsdPipeCommand(int *pid, const char *command,
46*5e7646d2SAndroid Build Coastguard Worker 			                  char **argv, uid_t user);
47*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdSendIPPGroup(ipp_tag_t group_tag);
48*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdSendIPPHeader(ipp_status_t status_code,
49*5e7646d2SAndroid Build Coastguard Worker 			                   int request_id);
50*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdSendIPPInteger(ipp_tag_t value_tag,
51*5e7646d2SAndroid Build Coastguard Worker 			                    const char *name, int value);
52*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdSendIPPString(ipp_tag_t value_tag,
53*5e7646d2SAndroid Build Coastguard Worker 			                   const char *name, const char *value);
54*5e7646d2SAndroid Build Coastguard Worker extern void		cupsdSendIPPTrailer(void);
55*5e7646d2SAndroid Build Coastguard Worker 
56*5e7646d2SAndroid Build Coastguard Worker 
57*5e7646d2SAndroid Build Coastguard Worker #  ifdef __cplusplus
58*5e7646d2SAndroid Build Coastguard Worker }
59*5e7646d2SAndroid Build Coastguard Worker #  endif /* __cplusplus */
60*5e7646d2SAndroid Build Coastguard Worker 
61*5e7646d2SAndroid Build Coastguard Worker #endif /* !_CUPSD_UTIL_H_ */
62