• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Backend definitions for CUPS.
3  *
4  * Copyright 2007-2011 by Apple Inc.
5  * Copyright 1997-2005 by Easy Software Products.
6  *
7  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
8  */
9 
10 #ifndef _CUPS_BACKEND_H_
11 #  define _CUPS_BACKEND_H_
12 
13 
14 /*
15  * Include necessary headers...
16  */
17 
18 #  include "versioning.h"
19 
20 
21 /*
22  * C++ magic...
23  */
24 
25 #  ifdef __cplusplus
26 extern "C" {
27 #  endif /* __cplusplus */
28 
29 /*
30  * Constants...
31  */
32 
33 enum cups_backend_e			/**** Backend exit codes ****/
34 {
35   CUPS_BACKEND_OK = 0,			/* Job completed successfully */
36   CUPS_BACKEND_FAILED = 1,		/* Job failed, use error-policy */
37   CUPS_BACKEND_AUTH_REQUIRED = 2,	/* Job failed, authentication required */
38   CUPS_BACKEND_HOLD = 3,		/* Job failed, hold job */
39   CUPS_BACKEND_STOP = 4,		/* Job failed, stop queue */
40   CUPS_BACKEND_CANCEL = 5,		/* Job failed, cancel job */
41   CUPS_BACKEND_RETRY = 6,		/* Job failed, retry this job later */
42   CUPS_BACKEND_RETRY_CURRENT = 7	/* Job failed, retry this job immediately */
43 };
44 typedef enum cups_backend_e cups_backend_t;
45 					/**** Backend exit codes ****/
46 
47 
48 /*
49  * Prototypes...
50  */
51 
52 extern const char	*cupsBackendDeviceURI(char **argv) _CUPS_API_1_2;
53 extern void		cupsBackendReport(const char *device_scheme,
54 			                  const char *device_uri,
55 			                  const char *device_make_and_model,
56 			                  const char *device_info,
57 			                  const char *device_id,
58 			                  const char *device_location)
59 					  _CUPS_API_1_4;
60 
61 
62 #  ifdef __cplusplus
63 }
64 #  endif /* __cplusplus */
65 
66 #endif /* !_CUPS_BACKEND_H_ */
67