2 * "$Id: dirsvc.h 6930 2007-09-08 00:28:06Z mike $"
4 * Directory services definitions for the Common UNIX Printing System
7 * Copyright 2007 by Apple Inc.
8 * Copyright 1997-2007 by Easy Software Products, all rights reserved.
10 * These coded instructions, statements, and computer programs are the
11 * property of Apple Inc. and are protected by Federal copyright
12 * law. Distribution and use rights are outlined in the file "LICENSE.txt"
13 * which should have been included with this file. If this file is
14 * file is missing or damaged, see the license at "http://www.cups.org/".
18 * Include necessary headers...
23 #endif /* HAVE_LIBSLP */
30 #endif /* HAVE_OPENLDAP */
36 #define BROWSE_CUPS 1 /* CUPS */
37 #define BROWSE_SLP 2 /* SLPv2 */
38 #define BROWSE_LDAP 4 /* LDAP */
39 #define BROWSE_DNSSD 8 /* DNS Service Discovery (aka Bonjour) */
40 #define BROWSE_SMB 16 /* SMB/Samba */
41 #define BROWSE_LPD 32 /* LPD via xinetd or launchd */
42 #define BROWSE_ALL 63 /* All protocols */
51 char iface
[32]; /* Destination interface */
52 http_addr_t to
; /* Destination address */
53 } cupsd_dirsvc_addr_t
;
62 cupsd_authmask_t from
; /* Source address/name mask */
63 http_addr_t to
; /* Destination address */
64 } cupsd_dirsvc_relay_t
;
68 * Polling structure...
73 char hostname
[64]; /* Hostname (actually, IP address) */
74 int port
; /* Port number */
75 int pid
; /* Current poll server PID */
76 } cupsd_dirsvc_poll_t
;
83 VAR
int Browsing
VALUE(TRUE
),
84 /* Whether or not browsing is enabled */
87 /* Protocols to support for local printers */
90 /* Protocols to support for remote printers */
91 BrowseShortNames
VALUE(TRUE
),
92 /* Short names for remote printers? */
93 BrowseSocket
VALUE(-1),
94 /* Socket for browsing */
95 BrowsePort
VALUE(IPP_PORT
),
96 /* Port number for broadcasts */
97 BrowseInterval
VALUE(DEFAULT_INTERVAL
),
98 /* Broadcast interval in seconds */
99 BrowseTimeout
VALUE(DEFAULT_TIMEOUT
),
100 /* Time out for printers in seconds */
101 UseNetworkDefault
VALUE(CUPS_DEFAULT_USE_NETWORK_DEFAULT
),
102 /* Use the network default printer? */
103 NumBrowsers
VALUE(0);
104 /* Number of broadcast addresses */
105 VAR
char *BrowseLocalOptions
107 /* Options to add to local printer URIs */
110 /* Options to add to remote printer URIs */
111 VAR cupsd_dirsvc_addr_t
*Browsers
VALUE(NULL
);
112 /* Broadcast addresses */
113 VAR cupsd_location_t
*BrowseACL
VALUE(NULL
);
114 /* Browser access control list */
115 VAR cupsd_printer_t
*BrowseNext
VALUE(NULL
);
116 /* Next class/printer to broadcast */
117 VAR
int NumRelays
VALUE(0);
118 /* Number of broadcast relays */
119 VAR cupsd_dirsvc_relay_t
*Relays
VALUE(NULL
);
120 /* Broadcast relays */
121 VAR
int NumPolled
VALUE(0);
122 /* Number of polled servers */
123 VAR cupsd_dirsvc_poll_t
*Polled
VALUE(NULL
);
125 VAR
int PollPipe
VALUE(0);
126 /* Status pipe for pollers */
127 VAR cupsd_statbuf_t
*PollStatusBuffer
VALUE(NULL
);
128 /* Status buffer for pollers */
131 VAR SLPHandle BrowseSLPHandle
VALUE(NULL
);
133 VAR
time_t BrowseSLPRefresh
VALUE(0);
134 /* Next SLP refresh time */
135 #endif /* HAVE_LIBSLP */
138 # ifdef HAVE_OPENLDAP
139 VAR LDAP
*BrowseLDAPHandle
VALUE(NULL
);
140 /* Handle to LDAP server */
141 # endif /* HAVE_OPENLDAP */
142 VAR
time_t BrowseLDAPRefresh
VALUE(0);
143 /* Next LDAP refresh time */
144 VAR
char *BrowseLDAPBindDN
VALUE(NULL
),
146 *BrowseLDAPDN
VALUE(NULL
),
148 *BrowseLDAPPassword
VALUE(NULL
),
149 /* LDAP login password */
150 *BrowseLDAPServer
VALUE(NULL
),
151 /* LDAP server to use */
152 *BrowseLDAPCACertFile
VALUE(NULL
);
153 /* LDAP CA CERT file to use */
154 #endif /* HAVE_LDAP */
155 VAR
char *LPDConfigFile
VALUE(NULL
),
156 /* LPD configuration file */
157 *SMBConfigFile
VALUE(NULL
);
158 /* SMB configuration file */
165 extern void cupsdDeregisterPrinter(cupsd_printer_t
*p
, int removeit
);
166 extern void cupsdLoadRemoteCache(void);
167 extern void cupsdRegisterPrinter(cupsd_printer_t
*p
);
168 extern void cupsdRestartPolling(void);
169 extern void cupsdSaveRemoteCache(void);
170 extern void cupsdSendBrowseList(void);
171 extern void cupsdStartBrowsing(void);
172 extern void cupsdStartPolling(void);
173 extern void cupsdStopBrowsing(void);
174 extern void cupsdStopPolling(void);
176 extern void cupsdUpdateDNSSDBrowse(cupsd_printer_t
*p
);
177 #endif /* HAVE_DNSSD */
179 extern void cupsdUpdateLDAPBrowse(void);
180 #endif /* HAVE_LDAP */
181 extern void cupsdUpdateSLPBrowse(void);
185 * End of "$Id: dirsvc.h 6930 2007-09-08 00:28:06Z mike $".