ARCHFLAGS = @ARCHFLAGS@
ARFLAGS = @ARFLAGS@
BACKLIBS = @BACKLIBS@
-CFLAGS = -I.. @CPPFLAGS@ @CFLAGS@ \
+CFLAGS = -I.. -D_CUPS_SOURCE @CPPFLAGS@ @CFLAGS@ \
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
COMMONLIBS = @LIBS@
CUPSDLIBS = @CUPSDLIBS@
-CXXFLAGS = -I.. $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
+CXXFLAGS = -I.. -D_CUPS_SOURCE $(SSLFLAGS) @CPPFLAGS@ @CXXFLAGS@ \
@LARGEFILE@ @PTHREAD_FLAGS@ $(OPTIONS)
CXXLIBS = @CXXLIBS@
DSOFLAGS = @DSOFLAGS@
const char *samba_server,
const char *samba_user,
const char *samba_password,
- FILE *logfile);
+ FILE *logfile) _CUPS_API_1_2;
extern char *cupsAdminCreateWindowsPPD(http_t *http, const char *dest,
- char *buffer, int bufsize);
+ char *buffer, int bufsize) _CUPS_API_1_2;
extern int cupsAdminGetServerSettings(http_t *http,
int *num_settings,
- cups_option_t **settings);
+ cups_option_t **settings) _CUPS_API_1_3;
extern int cupsAdminSetServerSettings(http_t *http,
int num_settings,
- cups_option_t *settings);
+ cups_option_t *settings) _CUPS_API_1_3;
# ifdef __cplusplus
* Include necessary headers...
*/
+# include "versioning.h"
# include <stdlib.h>
* Functions...
*/
-extern int cupsArrayAdd(cups_array_t *a, void *e);
-extern void cupsArrayClear(cups_array_t *a);
-extern int cupsArrayCount(cups_array_t *a);
-extern void *cupsArrayCurrent(cups_array_t *a);
-extern void cupsArrayDelete(cups_array_t *a);
-extern cups_array_t *cupsArrayDup(cups_array_t *a);
-extern void *cupsArrayFind(cups_array_t *a, void *e);
-extern void *cupsArrayFirst(cups_array_t *a);
-extern int cupsArrayGetIndex(cups_array_t *a);
-extern int cupsArrayGetInsert(cups_array_t *a);
-extern void *cupsArrayIndex(cups_array_t *a, int n);
-extern int cupsArrayInsert(cups_array_t *a, void *e);
-extern void *cupsArrayLast(cups_array_t *a);
-extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d);
+extern int cupsArrayAdd(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void cupsArrayClear(cups_array_t *a) _CUPS_API_1_2;
+extern int cupsArrayCount(cups_array_t *a) _CUPS_API_1_2;
+extern void *cupsArrayCurrent(cups_array_t *a) _CUPS_API_1_2;
+extern void cupsArrayDelete(cups_array_t *a) _CUPS_API_1_2;
+extern cups_array_t *cupsArrayDup(cups_array_t *a) _CUPS_API_1_2;
+extern void *cupsArrayFind(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void *cupsArrayFirst(cups_array_t *a) _CUPS_API_1_2;
+extern int cupsArrayGetIndex(cups_array_t *a) _CUPS_API_1_3;
+extern int cupsArrayGetInsert(cups_array_t *a) _CUPS_API_1_3;
+extern void *cupsArrayIndex(cups_array_t *a, int n) _CUPS_API_1_2;
+extern int cupsArrayInsert(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void *cupsArrayLast(cups_array_t *a) _CUPS_API_1_2;
+extern cups_array_t *cupsArrayNew(cups_array_func_t f, void *d) _CUPS_API_1_2;
extern cups_array_t *cupsArrayNew2(cups_array_func_t f, void *d,
- cups_ahash_func_t h, int hsize);
-extern void *cupsArrayNext(cups_array_t *a);
-extern void *cupsArrayPrev(cups_array_t *a);
-extern int cupsArrayRemove(cups_array_t *a, void *e);
-extern void *cupsArrayRestore(cups_array_t *a);
-extern int cupsArraySave(cups_array_t *a);
-extern void *cupsArrayUserData(cups_array_t *a);
+ cups_ahash_func_t h, int hsize) _CUPS_API_1_3;
+extern void *cupsArrayNext(cups_array_t *a) _CUPS_API_1_2;
+extern void *cupsArrayPrev(cups_array_t *a) _CUPS_API_1_2;
+extern int cupsArrayRemove(cups_array_t *a, void *e) _CUPS_API_1_2;
+extern void *cupsArrayRestore(cups_array_t *a) _CUPS_API_1_2;
+extern int cupsArraySave(cups_array_t *a) _CUPS_API_1_2;
+extern void *cupsArrayUserData(cups_array_t *a) _CUPS_API_1_2;
# ifdef __cplusplus
}
# define _CUPS_BACKEND_H_
+/*
+ * Include necessary headers...
+ */
+
+# include "versioning.h"
+
+
/*
* Constants...
*/
* Prototypes...
*/
-extern const char *cupsBackendDeviceURI(char **argv);
+extern const char *cupsBackendDeviceURI(char **argv) _CUPS_API_1_2;
#endif /* !_CUPS_BACKEND_H_ */
/**** New in CUPS 1.1.20 ****/
extern int cupsDoAuthentication(http_t *http, const char *method,
- const char *resource);
+ const char *resource) _CUPS_API_1_1_20;
extern http_status_t cupsGetFile(http_t *http, const char *resource,
- const char *filename);
+ const char *filename) _CUPS_API_1_1_20;
extern http_status_t cupsGetFd(http_t *http, const char *resource, int fd);
extern http_status_t cupsPutFile(http_t *http, const char *resource,
- const char *filename);
-extern http_status_t cupsPutFd(http_t *http, const char *resource, int fd);
+ const char *filename) _CUPS_API_1_1_20;
+extern http_status_t cupsPutFd(http_t *http, const char *resource, int fd) _CUPS_API_1_1_20;
/**** New in CUPS 1.1.21 ****/
-extern const char *cupsGetDefault2(http_t *http);
-extern int cupsGetDests2(http_t *http, cups_dest_t **dests);
+extern const char *cupsGetDefault2(http_t *http) _CUPS_API_1_1_21;
+extern int cupsGetDests2(http_t *http, cups_dest_t **dests) _CUPS_API_1_1_21;
extern int cupsGetJobs2(http_t *http, cups_job_t **jobs,
const char *dest, int myjobs,
- int completed);
-extern const char *cupsGetPPD2(http_t *http, const char *printer);
+ int completed) _CUPS_API_1_1_21;
+extern const char *cupsGetPPD2(http_t *http, const char *printer) _CUPS_API_1_1_21;
extern int cupsPrintFile2(http_t *http, const char *printer,
const char *filename,
const char *title, int num_options,
- cups_option_t *options);
+ cups_option_t *options) _CUPS_API_1_1_21;
extern int cupsPrintFiles2(http_t *http, const char *printer,
int num_files, const char **files,
const char *title, int num_options,
- cups_option_t *options);
+ cups_option_t *options) _CUPS_API_1_1_21;
extern int cupsSetDests2(http_t *http, int num_dests,
- cups_dest_t *dests);
+ cups_dest_t *dests) _CUPS_API_1_1_21;
/**** New in CUPS 1.2 ****/
extern ssize_t cupsBackChannelRead(char *buffer, size_t bytes,
- double timeout);
+ double timeout) _CUPS_API_1_2;
extern ssize_t cupsBackChannelWrite(const char *buffer, size_t bytes,
- double timeout);
+ double timeout) _CUPS_API_1_2;
extern void cupsEncodeOptions2(ipp_t *ipp, int num_options,
cups_option_t *options,
- ipp_tag_t group_tag);
-extern const char *cupsLastErrorString(void);
-extern char *cupsNotifySubject(cups_lang_t *lang, ipp_t *event);
-extern char *cupsNotifyText(cups_lang_t *lang, ipp_t *event);
+ ipp_tag_t group_tag) _CUPS_API_1_2;
+extern const char *cupsLastErrorString(void) _CUPS_API_1_2;
+extern char *cupsNotifySubject(cups_lang_t *lang, ipp_t *event) _CUPS_API_1_2;
+extern char *cupsNotifyText(cups_lang_t *lang, ipp_t *event) _CUPS_API_1_2;
extern int cupsRemoveOption(const char *name, int num_options,
- cups_option_t **options);
-extern cups_file_t *cupsTempFile2(char *filename, int len);
+ cups_option_t **options) _CUPS_API_1_2;
+extern cups_file_t *cupsTempFile2(char *filename, int len) _CUPS_API_1_2;
/**** New in CUPS 1.3 ****/
extern ipp_t *cupsDoIORequest(http_t *http, ipp_t *request,
const char *resource, int infile,
- int outfile);
-extern char *cupsGetServerPPD(http_t *http, const char *name);
+ int outfile) _CUPS_API_1_3;
+extern char *cupsGetServerPPD(http_t *http, const char *name) _CUPS_API_1_3;
extern int cupsRemoveDest(const char *name,
const char *instance,
- int num_dests, cups_dest_t **dests);
+ int num_dests, cups_dest_t **dests) _CUPS_API_1_3;
extern void cupsSetDefaultDest(const char *name,
const char *instance,
int num_dests,
- cups_dest_t *dests);
+ cups_dest_t *dests) _CUPS_API_1_3;
/**** New in CUPS 1.4 ****/
extern http_status_t cupsGetPPD3(http_t *http, const char *name,
time_t *modtime, char *buffer,
- size_t bufsize);
+ size_t bufsize) _CUPS_API_1_4;
# ifdef __cplusplus
}
* Include necessary headers...
*/
+# include "versioning.h"
# include <sys/stat.h>
* Prototypes...
*/
-extern void cupsDirClose(cups_dir_t *dp);
-extern cups_dir_t *cupsDirOpen(const char *directory);
-extern cups_dentry_t *cupsDirRead(cups_dir_t *dp);
-extern void cupsDirRewind(cups_dir_t *dp);
+extern void cupsDirClose(cups_dir_t *dp) _CUPS_API_1_2;
+extern cups_dir_t *cupsDirOpen(const char *directory) _CUPS_API_1_2;
+extern cups_dentry_t *cupsDirRead(cups_dir_t *dp) _CUPS_API_1_2;
+extern void cupsDirRewind(cups_dir_t *dp) _CUPS_API_1_2;
# ifdef __cplusplus
* Include necessary headers...
*/
+# include "versioning.h"
# include <sys/types.h>
# if defined(WIN32) && !defined(__CUPS_SSIZE_T_DEFINED)
# define __CUPS_SSIZE_T_DEFINED
* Prototypes...
*/
-extern int cupsFileClose(cups_file_t *fp);
-extern int cupsFileCompression(cups_file_t *fp);
-extern int cupsFileEOF(cups_file_t *fp);
+extern int cupsFileClose(cups_file_t *fp) _CUPS_API_1_2;
+extern int cupsFileCompression(cups_file_t *fp) _CUPS_API_1_2;
+extern int cupsFileEOF(cups_file_t *fp) _CUPS_API_1_2;
extern const char *cupsFileFind(const char *filename, const char *path,
int executable, char *buffer,
- int bufsize);
-extern int cupsFileFlush(cups_file_t *fp);
-extern int cupsFileGetChar(cups_file_t *fp);
+ int bufsize) _CUPS_API_1_2;
+extern int cupsFileFlush(cups_file_t *fp) _CUPS_API_1_2;
+extern int cupsFileGetChar(cups_file_t *fp) _CUPS_API_1_2;
extern char *cupsFileGetConf(cups_file_t *fp, char *buf, size_t buflen,
- char **value, int *linenum);
+ char **value, int *linenum) _CUPS_API_1_2;
extern size_t cupsFileGetLine(cups_file_t *fp, char *buf,
- size_t buflen);
-extern char *cupsFileGets(cups_file_t *fp, char *buf, size_t buflen);
-extern int cupsFileLock(cups_file_t *fp, int block);
-extern int cupsFileNumber(cups_file_t *fp);
-extern cups_file_t *cupsFileOpen(const char *filename, const char *mode);
-extern cups_file_t *cupsFileOpenFd(int fd, const char *mode);
-extern int cupsFilePeekChar(cups_file_t *fp);
-extern int cupsFilePrintf(cups_file_t *fp, const char *format, ...);
-extern int cupsFilePutChar(cups_file_t *fp, int c);
-extern int cupsFilePuts(cups_file_t *fp, const char *s);
-extern ssize_t cupsFileRead(cups_file_t *fp, char *buf, size_t bytes);
-extern off_t cupsFileRewind(cups_file_t *fp);
-extern off_t cupsFileSeek(cups_file_t *fp, off_t pos);
-extern cups_file_t *cupsFileStderr(void);
-extern cups_file_t *cupsFileStdin(void);
-extern cups_file_t *cupsFileStdout(void);
-extern off_t cupsFileTell(cups_file_t *fp);
-extern int cupsFileUnlock(cups_file_t *fp);
-extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes);
+ size_t buflen) _CUPS_API_1_2;
+extern char *cupsFileGets(cups_file_t *fp, char *buf, size_t buflen) _CUPS_API_1_2;
+extern int cupsFileLock(cups_file_t *fp, int block) _CUPS_API_1_2;
+extern int cupsFileNumber(cups_file_t *fp) _CUPS_API_1_2;
+extern cups_file_t *cupsFileOpen(const char *filename, const char *mode) _CUPS_API_1_2;
+extern cups_file_t *cupsFileOpenFd(int fd, const char *mode) _CUPS_API_1_2;
+extern int cupsFilePeekChar(cups_file_t *fp) _CUPS_API_1_2;
+extern int cupsFilePrintf(cups_file_t *fp, const char *format, ...) _CUPS_API_1_2;
+extern int cupsFilePutChar(cups_file_t *fp, int c) _CUPS_API_1_2;
+extern int cupsFilePuts(cups_file_t *fp, const char *s) _CUPS_API_1_2;
+extern ssize_t cupsFileRead(cups_file_t *fp, char *buf, size_t bytes) _CUPS_API_1_2;
+extern off_t cupsFileRewind(cups_file_t *fp) _CUPS_API_1_2;
+extern off_t cupsFileSeek(cups_file_t *fp, off_t pos) _CUPS_API_1_2;
+extern cups_file_t *cupsFileStderr(void) _CUPS_API_1_2;
+extern cups_file_t *cupsFileStdin(void) _CUPS_API_1_2;
+extern cups_file_t *cupsFileStdout(void) _CUPS_API_1_2;
+extern off_t cupsFileTell(cups_file_t *fp) _CUPS_API_1_2;
+extern int cupsFileUnlock(cups_file_t *fp) _CUPS_API_1_2;
+extern ssize_t cupsFileWrite(cups_file_t *fp, const char *buf, size_t bytes) _CUPS_API_1_2;
# ifdef __cplusplus
* Include necessary headers...
*/
+# include "versioning.h"
# include <string.h>
# include <time.h>
# include <sys/types.h>
# endif /* LOCAL_PEERCRED && !SO_PEERCRED */
# endif /* WIN32 */
-/*
- * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
- * a warning at compile-time.
- */
-
-# if defined(__GNUC__) && __GNUC__ > 2
-# define _HTTP_DEPRECATED __attribute__ ((__deprecated__))
-# else
-# define _HTTP_DEPRECATED
-# endif /* __GNUC__ && __GNUC__ > 2 */
-
/*
* C++ magic...
# endif /* __GNUC__ */
;
extern int httpPut(http_t *http, const char *uri);
-extern int httpRead(http_t *http, char *buffer, int length) _HTTP_DEPRECATED;
+extern int httpRead(http_t *http, char *buffer, int length) _CUPS_DEPRECATED;
extern int httpReconnect(http_t *http);
extern void httpSeparate(const char *uri, char *method,
char *username, char *host, int *port,
- char *resource) _HTTP_DEPRECATED;
+ char *resource) _CUPS_DEPRECATED;
extern void httpSetField(http_t *http, http_field_t field,
const char *value);
extern const char *httpStatus(http_status_t status);
extern int httpTrace(http_t *http, const char *uri);
extern http_status_t httpUpdate(http_t *http);
-extern int httpWrite(http_t *http, const char *buffer, int length) _HTTP_DEPRECATED;
-extern char *httpEncode64(char *out, const char *in) _HTTP_DEPRECATED;
-extern char *httpDecode64(char *out, const char *in) _HTTP_DEPRECATED;
-extern int httpGetLength(http_t *http) _HTTP_DEPRECATED;
+extern int httpWrite(http_t *http, const char *buffer, int length) _CUPS_DEPRECATED;
+extern char *httpEncode64(char *out, const char *in) _CUPS_DEPRECATED;
+extern char *httpDecode64(char *out, const char *in) _CUPS_DEPRECATED;
+extern int httpGetLength(http_t *http) _CUPS_DEPRECATED;
extern char *httpMD5(const char *, const char *, const char *,
char [33]);
extern char *httpMD5Final(const char *, const char *, const char *,
extern char *httpMD5String(const unsigned char *, char [33]);
/**** New in CUPS 1.1.19 ****/
-extern void httpClearCookie(http_t *http);
-extern const char *httpGetCookie(http_t *http);
-extern void httpSetCookie(http_t *http, const char *cookie);
-extern int httpWait(http_t *http, int msec);
+extern void httpClearCookie(http_t *http) _CUPS_API_1_1_19;
+extern const char *httpGetCookie(http_t *http) _CUPS_API_1_1_19;
+extern void httpSetCookie(http_t *http, const char *cookie) _CUPS_API_1_1_19;
+extern int httpWait(http_t *http, int msec) _CUPS_API_1_1_19;
/**** New in CUPS 1.1.21 ****/
-extern char *httpDecode64_2(char *out, int *outlen, const char *in);
+extern char *httpDecode64_2(char *out, int *outlen, const char *in) _CUPS_API_1_1_21;
extern char *httpEncode64_2(char *out, int outlen, const char *in,
- int inlen);
+ int inlen) _CUPS_API_1_1_21;
extern void httpSeparate2(const char *uri,
char *method, int methodlen,
char *username, int usernamelen,
char *host, int hostlen, int *port,
- char *resource, int resourcelen) _HTTP_DEPRECATED;
+ char *resource, int resourcelen) _CUPS_DEPRECATED;
/**** New in CUPS 1.2 ****/
-extern int httpAddrAny(const http_addr_t *addr);
-extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock);
+extern int httpAddrAny(const http_addr_t *addr) _CUPS_API_1_2;
+extern http_addrlist_t *httpAddrConnect(http_addrlist_t *addrlist, int *sock) _CUPS_API_1_2;
extern int httpAddrEqual(const http_addr_t *addr1,
- const http_addr_t *addr2);
-extern void httpAddrFreeList(http_addrlist_t *addrlist);
+ const http_addr_t *addr2) _CUPS_API_1_2;
+extern void httpAddrFreeList(http_addrlist_t *addrlist) _CUPS_API_1_2;
extern http_addrlist_t *httpAddrGetList(const char *hostname, int family,
- const char *service);
-extern int httpAddrLength(const http_addr_t *addr);
-extern int httpAddrLocalhost(const http_addr_t *addr);
+ const char *service) _CUPS_API_1_2;
+extern int httpAddrLength(const http_addr_t *addr) _CUPS_API_1_2;
+extern int httpAddrLocalhost(const http_addr_t *addr) _CUPS_API_1_2;
extern char *httpAddrLookup(const http_addr_t *addr,
- char *name, int namelen);
+ char *name, int namelen) _CUPS_API_1_2;
extern char *httpAddrString(const http_addr_t *addr,
- char *s, int slen);
+ char *s, int slen) _CUPS_API_1_2;
extern http_uri_status_t httpAssembleURI(http_uri_coding_t encoding,
char *uri, int urilen,
const char *scheme,
const char *username,
const char *host, int port,
- const char *resource);
+ const char *resource) _CUPS_API_1_2;
extern http_uri_status_t httpAssembleURIf(http_uri_coding_t encoding,
char *uri, int urilen,
const char *scheme,
const char *username,
const char *host, int port,
- const char *resourcef, ...);
-extern int httpFlushWrite(http_t *http);
-extern int httpGetBlocking(http_t *http);
-extern const char *httpGetDateString2(time_t t, char *s, int slen);
-extern int httpGetFd(http_t *http);
-extern const char *httpGetHostname(http_t *http, char *s, int slen);
-extern off_t httpGetLength2(http_t *http);
-extern http_status_t httpGetStatus(http_t *http);
+ const char *resourcef, ...) _CUPS_API_1_2;
+extern int httpFlushWrite(http_t *http) _CUPS_API_1_2;
+extern int httpGetBlocking(http_t *http) _CUPS_API_1_2;
+extern const char *httpGetDateString2(time_t t, char *s, int slen) _CUPS_API_1_2;
+extern int httpGetFd(http_t *http) _CUPS_API_1_2;
+extern const char *httpGetHostname(http_t *http, char *s, int slen) _CUPS_API_1_2;
+extern off_t httpGetLength2(http_t *http) _CUPS_API_1_2;
+extern http_status_t httpGetStatus(http_t *http) _CUPS_API_1_2;
extern char *httpGetSubField2(http_t *http, http_field_t field,
const char *name, char *value,
- int valuelen);
-extern ssize_t httpRead2(http_t *http, char *buffer, size_t length);
+ int valuelen) _CUPS_API_1_2;
+extern ssize_t httpRead2(http_t *http, char *buffer, size_t length) _CUPS_API_1_2;
extern http_uri_status_t httpSeparateURI(http_uri_coding_t decoding,
const char *uri,
char *scheme, int schemelen,
char *username, int usernamelen,
char *host, int hostlen, int *port,
- char *resource, int resourcelen);
-extern void httpSetExpect(http_t *http, http_status_t expect);
-extern void httpSetLength(http_t *http, size_t length);
+ char *resource, int resourcelen) _CUPS_API_1_2;
+extern void httpSetExpect(http_t *http, http_status_t expect) _CUPS_API_1_2;
+extern void httpSetLength(http_t *http, size_t length) _CUPS_API_1_2;
extern ssize_t httpWrite2(http_t *http, const char *buffer,
- size_t length);
+ size_t length) _CUPS_API_1_2;
/**** New in CUPS 1.3 ****/
-extern char *httpGetAuthString(http_t *http);
+extern char *httpGetAuthString(http_t *http) _CUPS_API_1_3;
extern void httpSetAuthString(http_t *http, const char *scheme,
- const char *data);
+ const char *data) _CUPS_API_1_3;
/*
* C++ magic...
/**** New in CUPS 1.1.19 ****/
extern ipp_attribute_t *ippAddCollection(ipp_t *ipp, ipp_tag_t group,
- const char *name, ipp_t *value);
+ const char *name, ipp_t *value) _CUPS_API_1_1_19;
extern ipp_attribute_t *ippAddCollections(ipp_t *ipp, ipp_tag_t group,
const char *name, int num_values,
- const ipp_t **values);
-extern void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr);
-extern ipp_state_t ippReadFile(int fd, ipp_t *ipp);
-extern ipp_state_t ippWriteFile(int fd, ipp_t *ipp);
+ const ipp_t **values) _CUPS_API_1_1_19;
+extern void ippDeleteAttribute(ipp_t *ipp, ipp_attribute_t *attr) _CUPS_API_1_1_19;
+extern ipp_state_t ippReadFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19;
+extern ipp_state_t ippWriteFile(int fd, ipp_t *ipp) _CUPS_API_1_1_19;
/**** New in CUPS 1.2 ****/
extern ipp_attribute_t *ippAddOctetString(ipp_t *ipp, ipp_tag_t group,
const char *name,
- const void *data, int datalen);
-extern ipp_status_t ippErrorValue(const char *name);
-extern ipp_t *ippNewRequest(ipp_op_t op);
-extern const char *ippOpString(ipp_op_t op);
-extern ipp_op_t ippOpValue(const char *name);
+ const void *data, int datalen) _CUPS_API_1_2;
+extern ipp_status_t ippErrorValue(const char *name) _CUPS_API_1_2;
+extern ipp_t *ippNewRequest(ipp_op_t op) _CUPS_API_1_2;
+extern const char *ippOpString(ipp_op_t op) _CUPS_API_1_2;
+extern ipp_op_t ippOpValue(const char *name) _CUPS_API_1_2;
extern ipp_state_t ippReadIO(void *src, ipp_iocb_t cb, int blocking,
- ipp_t *parent, ipp_t *ipp);
+ ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2;
extern ipp_state_t ippWriteIO(void *dst, ipp_iocb_t cb, int blocking,
- ipp_t *parent, ipp_t *ipp);
+ ipp_t *parent, ipp_t *ipp) _CUPS_API_1_2;
/*
extern float ppdPageWidth(ppd_file_t *ppd, const char *name);
/**** New in CUPS 1.1.19 ****/
-extern const char *ppdErrorString(ppd_status_t status);
+extern const char *ppdErrorString(ppd_status_t status) _CUPS_API_1_1_19;
extern ppd_attr_t *ppdFindAttr(ppd_file_t *ppd, const char *name,
- const char *spec);
+ const char *spec) _CUPS_API_1_1_19;
extern ppd_attr_t *ppdFindNextAttr(ppd_file_t *ppd, const char *name,
- const char *spec);
-extern ppd_status_t ppdLastError(int *line);
+ const char *spec) _CUPS_API_1_1_19;
+extern ppd_status_t ppdLastError(int *line) _CUPS_API_1_1_19;
/**** New in CUPS 1.1.20 ****/
-extern void ppdSetConformance(ppd_conform_t c);
+extern void ppdSetConformance(ppd_conform_t c) _CUPS_API_1_1_20;
/**** New in CUPS 1.2 ****/
extern int ppdCollect2(ppd_file_t *ppd, ppd_section_t section,
- float min_order, ppd_choice_t ***choices);
+ float min_order, ppd_choice_t ***choices) _CUPS_API_1_2;
extern int ppdEmitAfterOrder(ppd_file_t *ppd, FILE *fp,
ppd_section_t section, int limit,
- float min_order);
-extern int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp);
+ float min_order) _CUPS_API_1_2;
+extern int ppdEmitJCLEnd(ppd_file_t *ppd, FILE *fp) _CUPS_API_1_2;
extern char *ppdEmitString(ppd_file_t *ppd, ppd_section_t section,
- float min_order);
+ float min_order) _CUPS_API_1_2;
extern ppd_coption_t *ppdFindCustomOption(ppd_file_t *ppd,
- const char *keyword);
+ const char *keyword) _CUPS_API_1_2;
extern ppd_cparam_t *ppdFindCustomParam(ppd_coption_t *opt,
- const char *name);
-extern ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt);
-extern ppd_option_t *ppdFirstOption(ppd_file_t *ppd);
-extern ppd_cparam_t *ppdNextCustomParam(ppd_coption_t *opt);
-extern ppd_option_t *ppdNextOption(ppd_file_t *ppd);
-extern int ppdLocalize(ppd_file_t *ppd);
-extern ppd_file_t *ppdOpen2(cups_file_t *fp);
+ const char *name) _CUPS_API_1_2;
+extern ppd_cparam_t *ppdFirstCustomParam(ppd_coption_t *opt) _CUPS_API_1_2;
+extern ppd_option_t *ppdFirstOption(ppd_file_t *ppd) _CUPS_API_1_2;
+extern ppd_cparam_t *ppdNextCustomParam(ppd_coption_t *opt) _CUPS_API_1_2;
+extern ppd_option_t *ppdNextOption(ppd_file_t *ppd) _CUPS_API_1_2;
+extern int ppdLocalize(ppd_file_t *ppd) _CUPS_API_1_2;
+extern ppd_file_t *ppdOpen2(cups_file_t *fp) _CUPS_API_1_2;
/**** New in CUPS 1.3 ****/
extern const char *ppdLocalizeIPPReason(ppd_file_t *ppd,
const char *reason,
const char *scheme,
- char *buffer, size_t bufsize);
+ char *buffer, size_t bufsize) _CUPS_API_1_3;
/*
#ifndef _CUPS_SIDECHANNEL_H_
# define _CUPS_SIDECHANNEL_H_
+/*
+ * Include necessary headers...
+ */
+
+# include "versioning.h"
+
+
/*
* C++ magic...
*/
extern cups_sc_status_t cupsSideChannelDoRequest(cups_sc_command_t command,
char *data, int *datalen,
- double timeout);
+ double timeout) _CUPS_API_1_3;
extern int cupsSideChannelRead(cups_sc_command_t *command,
cups_sc_status_t *status,
char *data, int *datalen,
- double timeout);
+ double timeout) _CUPS_API_1_3;
extern int cupsSideChannelWrite(cups_sc_command_t command,
cups_sc_status_t status,
const char *data, int datalen,
- double timeout);
+ double timeout) _CUPS_API_1_3;
# ifdef __cplusplus
extern int cupsCharsetToUTF8(cups_utf8_t *dest,
const char *src,
const int maxout,
- const cups_encoding_t encoding);
+ const cups_encoding_t encoding) _CUPS_API_1_2;
extern int cupsUTF8ToCharset(char *dest,
const cups_utf8_t *src,
const int maxout,
- const cups_encoding_t encoding);
+ const cups_encoding_t encoding) _CUPS_API_1_2;
extern int cupsUTF8ToUTF32(cups_utf32_t *dest,
const cups_utf8_t *src,
- const int maxout);
+ const int maxout) _CUPS_API_1_2;
extern int cupsUTF32ToUTF8(cups_utf8_t *dest,
const cups_utf32_t *src,
- const int maxout);
+ const int maxout) _CUPS_API_1_2;
# ifdef __cplusplus
}
--- /dev/null
+/*
+ * "$Id$"
+ *
+ * API versioning definitions for the Common UNIX Printing System (CUPS).
+ *
+ * Copyright 2007 by Apple Inc.
+ *
+ * These coded instructions, statements, and computer programs are the
+ * property of Apple Inc. and are protected by Federal copyright
+ * law. Distribution and use rights are outlined in the file "LICENSE.txt"
+ * which should have been included with this file. If this file is
+ * file is missing or damaged, see the license at "http://www.cups.org/".
+ *
+ * This file is subject to the Apple OS-Developed Software exception.
+ */
+
+#ifndef _CUPS_VERSIONING_H_
+# define _CUPS_VERSIONING_H_
+
+/*
+ * This header defines several constants - _CUPS_DEPRECATED,
+ * _CUPS_API_1_1, _CUPS_API_1_1_19, _CUPS_API_1_1_20, _CUPS_API_1_1_21,
+ * _CUPS_API_1_2, _CUPS_API_1_3, _CUPS_API_1_4 - which add compiler-
+ * specific attributes that flag functions that are deprecated or added
+ * in particular releases. On Mac OS X, the _CUPS_API_* constants are
+ * defined based on the value of the MAC_OS_X_VERSION_MAX_ALLOWED constant
+ * provided by the compiler.
+ */
+
+# if defined(__APPLE__) && !defined(_CUPS_SOURCE)
+# if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_3
+# define _CUPS_API_1_1_19 __attribute__((unavailable))
+# define _CUPS_API_1_1_20 __attribute__((unavailable))
+# define _CUPS_API_1_1_21 __attribute__((unavailable))
+# define _CUPS_API_1_2 __attribute__((unavailable))
+# define _CUPS_API_1_3 __attribute__((unavailable))
+# define _CUPS_API_1_4 __attribute__((unavailable))
+# elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_4
+# define _CUPS_API_1_1_19
+# define _CUPS_API_1_1_20 __attribute__((unavailable))
+# define _CUPS_API_1_1_21 __attribute__((unavailable))
+# define _CUPS_API_1_2 __attribute__((unavailable))
+# define _CUPS_API_1_3 __attribute__((unavailable))
+# define _CUPS_API_1_4 __attribute__((unavailable))
+# elif MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
+# define _CUPS_API_1_1_19
+# define _CUPS_API_1_1_20
+# define _CUPS_API_1_1_21
+# define _CUPS_API_1_2 __attribute__((unavailable))
+# define _CUPS_API_1_3 __attribute__((unavailable))
+# define _CUPS_API_1_4 __attribute__((unavailable))
+# elif MAC_OS_X_VERSION_MAX_ALLOWED == MAC_OS_X_VERSION_10_5
+# define _CUPS_API_1_1_19
+# define _CUPS_API_1_1_20
+# define _CUPS_API_1_1_21
+# define _CUPS_API_1_2
+# define _CUPS_API_1_3
+# define _CUPS_API_1_4 __attribute__((unavailable))
+# else
+# define _CUPS_API_1_1_19
+# define _CUPS_API_1_1_20
+# define _CUPS_API_1_1_21
+# define _CUPS_API_1_2
+# define _CUPS_API_1_3
+# define _CUPS_API_1_4
+# endif /* MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_x */
+# else
+# define _CUPS_API_1_1_19
+# define _CUPS_API_1_1_20
+# define _CUPS_API_1_1_21
+# define _CUPS_API_1_2
+# define _CUPS_API_1_3
+# define _CUPS_API_1_4
+# endif /* __APPLE__ */
+
+/*
+ * With GCC 3.0 and higher, we can mark old APIs "deprecated" so you get
+ * a warning at compile-time.
+ */
+
+# if defined(__GNUC__) && __GNUC__ > 2
+# define _CUPS_DEPRECATED __attribute__ ((__deprecated__))
+# else
+# define _CUPS_DEPRECATED
+# endif /* __GNUC__ && __GNUC__ > 2 */
+
+#endif /* !_CUPS_VERSIONING_H_ */
+
+/*
+ * End of "$Id$".
+ */