• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Policy definitions for the CUPS scheduler.
3  *
4  * Copyright © 2020-2024 by OpenPrinting.
5  * Copyright 2007-2010 by Apple Inc.
6  * Copyright 1997-2005 by Easy Software Products, all rights reserved.
7  *
8  * Licensed under Apache License v2.0.  See the file "LICENSE" for more information.
9  */
10 
11 
12 /*
13  * Policy structure...
14  */
15 
16 typedef struct
17 {
18   char			*name;		/* Policy name */
19   cups_array_t		*job_access,	/* Private users/groups for jobs */
20 			*job_attrs,	/* Private attributes for jobs */
21 			*sub_access,	/* Private users/groups for subscriptions */
22 			*sub_attrs,	/* Private attributes for subscriptions */
23 			*ops;		/* Operations */
24 } cupsd_policy_t;
25 
26 
27 /*
28  * Globals...
29  */
30 
31 VAR cups_array_t	*Policies	VALUE(NULL);
32 					/* Policies */
33 
34 
35 /*
36  * Prototypes...
37  */
38 
39 extern cupsd_policy_t	*cupsdAddPolicy(const char *policy);
40 extern cupsd_location_t	*cupsdAddPolicyOp(cupsd_policy_t *p,
41 			                  cupsd_location_t *po,
42 			                  ipp_op_t op);
43 extern http_status_t	cupsdCheckPolicy(cupsd_policy_t *p, cupsd_client_t *con,
44 				         const char *owner);
45 extern void		cupsdDeleteAllPolicies(void);
46 extern cupsd_policy_t	*cupsdFindPolicy(const char *policy);
47 extern cupsd_location_t	*cupsdFindPolicyOp(cupsd_policy_t *p, ipp_op_t op);
48 extern cups_array_t	*cupsdGetPrivateAttrs(cupsd_policy_t *p,
49 			                      cupsd_client_t *con,
50 					      cupsd_printer_t *printer,
51 			                      const char *owner);
52