Added LDAP printer browsing support (STR #338)
Browsing code cleanup.
config-scripts/cups-ldap.m4:
- Added.
config.h.in:
- Added HAVE_LDAP and HAVE_OPENLDAP definitions.
configure.in:
- Include config-scripts/cups-ldap.m4.
scheduler/conf.c:
- Added BrowseLDAPBindDN, BrowseLDAPDN, BrowseLDAPPassword,
and BrowseLDAPServer configuration directives.
- cupsdReadConfiguration(): Initialize new directives.
scheduler/dirsvc.c:
- cupsdSendBrowseList(): Call cupsdSendLDAPBrowse() as
needed.
- cupsdSendLDAPBrowse(): Added.
- cupsdSendSLPBrowse(): Add printer-type attribute to
registration.
- cupsdStartBrowsing(): Add LDAP initialization code.
- cupsdStopBrowsing(): Add LDAP shutdown code.
- cupsdUpdateCUPSBrowse(): Use new is_local_queue() function
to detect local queues.
- cupsdUpdateLDAPBrowse(): Added.
- cupsdUpdateSLPBrowse(): Use new is_local_queue() function
to detect local queues, and use printer type value from SLP
attributes instead of guessing. Also free memory used by
dummy printer entry.
- is_local_queue(): Added.
- process_browse_data(): Added host and resource arguments so
that we don't do an extra httpSeparateURI() call.
- slp_attr_callback(): Get printer type from printer-type
attribute instead of building it from all of the others.
scheduler/dirsvc.h:
- Include LDAP headers as needed.
- Add LDAP browsing globals and prototypes.
scheduler/main.c:
- main(): Call cupsdUpdateLDAPBrowse() as needed.
- select_timeout(): Take LDAP browse refresh value into
account.
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@5157
7a7537e8-13f0-0310-91df-
b6672ffda945