1 /* 2 * Administration utility API definitions for CUPS. 3 * 4 * Copyright 2020-2024 by OpenPrinting. 5 * Copyright 2007-2016 by Apple Inc. 6 * Copyright 2001-2007 by Easy Software Products. 7 * 8 * Licensed under Apache License v2.0. See the file "LICENSE" for more information. 9 */ 10 11 #ifndef _CUPS_ADMINUTIL_H_ 12 # define _CUPS_ADMINUTIL_H_ 13 14 /* 15 * Include necessary headers... 16 */ 17 18 # include <stdio.h> 19 # include "cups.h" 20 21 22 /* 23 * C++ magic... 24 */ 25 26 # ifdef __cplusplus 27 extern "C" { 28 # endif /* __cplusplus */ 29 30 31 /* 32 * Constants... 33 */ 34 35 # define CUPS_SERVER_DEBUG_LOGGING "_debug_logging" 36 # define CUPS_SERVER_REMOTE_ADMIN "_remote_admin" 37 # define CUPS_SERVER_REMOTE_ANY "_remote_any" 38 # define CUPS_SERVER_SHARE_PRINTERS "_share_printers" 39 # define CUPS_SERVER_USER_CANCEL_ANY "_user_cancel_any" 40 41 42 /* 43 * Types and structures... 44 */ 45 46 typedef void (*cups_device_cb_t)(const char *device_class, 47 const char *device_id, const char *device_info, 48 const char *device_make_and_model, 49 const char *device_uri, 50 const char *device_location, void *user_data); 51 /* Device callback 52 * @since CUPS 1.4/macOS 10.6@ */ 53 54 55 /* 56 * Functions... 57 */ 58 59 extern int cupsAdminExportSamba(const char *dest, const char *ppd, 60 const char *samba_server, 61 const char *samba_user, 62 const char *samba_password, 63 FILE *logfile) _CUPS_DEPRECATED; 64 extern char *cupsAdminCreateWindowsPPD(http_t *http, const char *dest, 65 char *buffer, int bufsize) 66 _CUPS_DEPRECATED; 67 68 extern int cupsAdminGetServerSettings(http_t *http, 69 int *num_settings, 70 cups_option_t **settings) 71 _CUPS_API_1_3; 72 extern int cupsAdminSetServerSettings(http_t *http, 73 int num_settings, 74 cups_option_t *settings) 75 _CUPS_API_1_3; 76 77 extern ipp_status_t cupsGetDevices(http_t *http, int timeout, 78 const char *include_schemes, 79 const char *exclude_schemes, 80 cups_device_cb_t callback, 81 void *user_data) _CUPS_DEPRECATED; 82 83 84 # ifdef __cplusplus 85 } 86 # endif /* __cplusplus */ 87 88 #endif /* !_CUPS_ADMINUTIL_H_ */ 89