]> git.ipfire.org Git - thirdparty/cups.git/blame - scheduler/dirsvc.h
To prepare to load cups into easysw/current, perform 4 renames.
[thirdparty/cups.git] / scheduler / dirsvc.h
CommitLineData
ef416fc2 1/*
a4d04587 2 * "$Id: dirsvc.h 5020 2006-01-28 13:36:15Z mike $"
ef416fc2 3 *
4 * Directory services definitions for the Common UNIX Printing System
5 * (CUPS) scheduler.
6 *
7 * Copyright 1997-2005 by Easy Software Products, all rights reserved.
8 *
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
14 * at:
15 *
16 * Attn: CUPS Licensing Information
17 * Easy Software Products
18 * 44141 Airport View Drive, Suite 204
19 * Hollywood, Maryland 20636 USA
20 *
21 * Voice: (301) 373-9600
22 * EMail: cups-info@cups.org
23 * WWW: http://www.cups.org
24 */
25
26/*
27 * Include necessary headers...
28 */
29
30#ifdef HAVE_LIBSLP
31# include <slp.h>
32#endif /* HAVE_LIBSLP */
33
34
35/*
36 * Browse protocols...
37 */
38
39#define BROWSE_CUPS 1 /* CUPS */
40#define BROWSE_SLP 2 /* SLPv2 */
41#define BROWSE_LDAP 4 /* LDAP (not supported yet) */
a4d04587 42#define BROWSE_DNSSD 8 /* DNS Service Discovery aka Bonjour */
43#define BROWSE_ALL 15 /* All protocols */
ef416fc2 44
45
46/*
47 * Browse address...
48 */
49
50typedef struct
51{
52 char iface[32]; /* Destination interface */
53 http_addr_t to; /* Destination address */
54} cupsd_dirsvc_addr_t;
55
56
57/*
58 * Relay structure...
59 */
60
61typedef struct
62{
63 cupsd_authmask_t from; /* Source address/name mask */
64 http_addr_t to; /* Destination address */
65} cupsd_dirsvc_relay_t;
66
67
68/*
69 * Polling structure...
70 */
71
72typedef struct
73{
74 char hostname[64]; /* Hostname (actually, IP address) */
75 int port; /* Port number */
76 int pid; /* Current poll server PID */
77} cupsd_dirsvc_poll_t;
78
79
80/*
81 * Globals...
82 */
83
84VAR int Browsing VALUE(TRUE),
85 /* Whether or not browsing is enabled */
86 BrowseLocalProtocols
87 VALUE(BROWSE_ALL),
88 /* Protocols to support for local printers */
89 BrowseRemoteProtocols
90 VALUE(BROWSE_ALL),
91 /* Protocols to support for remote printers */
92 BrowseShortNames VALUE(TRUE),
93 /* Short names for remote printers? */
94 BrowseSocket VALUE(-1),
95 /* Socket for browsing */
96 BrowsePort VALUE(IPP_PORT),
97 /* Port number for broadcasts */
98 BrowseInterval VALUE(DEFAULT_INTERVAL),
99 /* Broadcast interval in seconds */
100 BrowseTimeout VALUE(DEFAULT_TIMEOUT),
101 /* Time out for printers in seconds */
102 NumBrowsers VALUE(0);
103 /* Number of broadcast addresses */
104VAR char *BrowseLocalOptions
105 VALUE(NULL),
106 /* Options to add to local printer URIs */
107 *BrowseRemoteOptions
108 VALUE(NULL);
109 /* Options to add to remote printer URIs */
110VAR cupsd_dirsvc_addr_t *Browsers VALUE(NULL);
111 /* Broadcast addresses */
112VAR cupsd_location_t *BrowseACL VALUE(NULL);
113 /* Browser access control list */
114VAR cupsd_printer_t *BrowseNext VALUE(NULL);
115 /* Next class/printer to broadcast */
116VAR int NumRelays VALUE(0);
117 /* Number of broadcast relays */
118VAR cupsd_dirsvc_relay_t *Relays VALUE(NULL);
119 /* Broadcast relays */
120VAR int NumPolled VALUE(0);
121 /* Number of polled servers */
122VAR cupsd_dirsvc_poll_t *Polled VALUE(NULL);
123 /* Polled servers */
124VAR int PollPipe VALUE(0);
125 /* Status pipe for pollers */
126VAR cupsd_statbuf_t *PollStatusBuffer VALUE(NULL);
127 /* Status buffer for pollers */
128
129#ifdef HAVE_LIBSLP
130VAR SLPHandle BrowseSLPHandle VALUE(NULL);
131 /* SLP API handle */
132VAR time_t BrowseSLPRefresh VALUE(0);
133 /* Next SLP refresh time */
134#endif /* HAVE_LIBSLP */
135
136
137/*
138 * Prototypes...
139 */
140
141extern void cupsdLoadRemoteCache(void);
142extern void cupsdProcessBrowseData(const char *uri, cups_ptype_t type,
143 ipp_pstate_t state, const char *location,
144 const char *info, const char *make_model,
145 int num_attrs, cups_option_t *attrs);
146extern void cupsdProcessImplicitClasses(void);
147extern void cupsdSaveRemoteCache(void);
148extern void cupsdSendBrowseDelete(cupsd_printer_t *p);
149extern void cupsdSendBrowseList(void);
150extern void cupsdSendCUPSBrowse(cupsd_printer_t *p);
151extern void cupsdSendSLPBrowse(cupsd_printer_t *p);
152extern void cupsdStartBrowsing(void);
153extern void cupsdStartPolling(void);
154extern void cupsdStopBrowsing(void);
155extern void cupsdStopPolling(void);
156extern void cupsdUpdateCUPSBrowse(void);
157extern void cupsdUpdatePolling(void);
158extern void cupsdUpdateSLPBrowse(void);
159
160
161/*
a4d04587 162 * End of "$Id: dirsvc.h 5020 2006-01-28 13:36:15Z mike $".
ef416fc2 163 */