]>
git.ipfire.org Git - thirdparty/cups.git/blob - scheduler/policy.h
eef0c03abd6681cc7ede5a3b50e1e0f127ae98ec
2 * "$Id: policy.h,v 1.1.2.8 2004/06/30 18:24:18 mike Exp $"
4 * Policy definitions for the Common UNIX Printing System (CUPS)
7 * Copyright 1997-2004 by Easy Software Products, all rights reserved.
9 * These coded instructions, statements, and computer programs are the
10 * property of Easy Software Products and are protected by Federal
11 * copyright law. Distribution and use rights are outlined in the file
12 * "LICENSE.txt" which should have been included with this file. If this
13 * file is missing or damaged please contact Easy Software Products
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636-3142 USA
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
27 * "Any" operation code...
30 #define IPP_ANY_OPERATION (ipp_op_t)0
31 #define IPP_BAD_OPERATION (ipp_op_t)-1
38 #define POLICY_ALLOW 0 /* Allow access */
39 #define POLICY_DENY 1 /* Deny access */
43 * IPP operation policy structures...
48 int allow_deny
; /* POLICY_ALLOW or POLICY_DENY */
49 char *name
; /* Name to allow or deny */
54 ipp_op_t op
; /* Operation */
55 int order_type
, /* Default allow/deny */
56 authenticate
, /* Authentication required? */
57 num_names
; /* Number of names */
58 policyname_t
*names
; /* Names */
63 char *name
; /* Policy name */
64 int num_ops
; /* Number of operations */
65 policyop_t
**ops
; /* Operations */
73 VAR
int NumPolicies
VALUE(0);
74 /* Number of policies */
75 VAR policy_t
**Policies
VALUE(NULL
);
83 extern policy_t
*AddPolicy(const char *policy
);
84 extern policyop_t
*AddPolicyOp(policy_t
*p
, policyop_t
*po
, ipp_op_t op
);
85 extern void AddPolicyOpName(policyop_t
*po
, int allow_deny
,
87 extern int CheckPolicy(policy_t
*p
, client_t
*con
,
89 extern void DeleteAllPolicies(void);
90 extern policy_t
*FindPolicy(const char *policy
);
91 extern policyop_t
*FindPolicyOp(policy_t
*p
, ipp_op_t op
);
95 * End of "$Id: policy.h,v 1.1.2.8 2004/06/30 18:24:18 mike Exp $".