forked from michaelrsweet/lprint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lprint.h
74 lines (56 loc) · 2.73 KB
/
lprint.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
//
// Header file for LPrint, a Label Printer Application
//
// Copyright © 2019-2021 by Michael R Sweet.
// Copyright © 2010-2019 by Apple Inc.
//
// Licensed under Apache License v2.0. See the file "LICENSE" for more
// information.
//
#ifndef LPRINT_H
# define LPRINT_H
//
// Include necessary headers...
//
# include "config.h"
# include <pappl/pappl.h>
//
// Debug macro...
//
# ifdef DEBUG
# define LPRINT_DEBUG(...) fprintf(stderr, __VA_ARGS__)
# else
# define LPRINT_DEBUG(...)
# endif // DEBUG
//
// Function annotations...
//
# if defined(__GNUC__) || defined(__has_extension)
# define LPRINT_FORMAT(a,b) __attribute__ ((__format__(__printf__, a,b)))
# define LPRINT_NONNULL(...) __attribute__ ((nonnull(__VA_ARGS__)))
# define LPRINT_NORETURN __attribute__ ((noreturn))
# else
# define LPRINT_FORMAT(a,b)
# define LPRINT_NONNULL(...)
# define LPRINT_NORETURN
# endif // __GNUC__ || __has_extension
//
// Constants...
//
# define LPRINT_TESTPAGE_MIMETYPE "application/vnd.lprint-test"
# define LPRINT_TESTPAGE_HEADER "T*E*S*T*P*A*G*E*"
//
// Functions...
//
extern bool lprintDYMO(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *data, ipp_t **attrs, void *cbdata);
extern bool lprintEPL2(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *data, ipp_t **attrs, void *cbdata);
extern bool lprintTestFilterCB(pappl_job_t *job, pappl_device_t *device, void *data);
extern const char *lprintTestPageCB(pappl_printer_t *printer, char *buffer, size_t bufsize);
extern bool lprintZPL(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *data, ipp_t **attrs, void *cbdata);
extern void lprintZPLQueryDriver(pappl_system_t *system, const char *device_uri, char *name, size_t namesize);
// Future planned drivers that are not yet implemented
//extern bool lprintCPCL(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *driver_data, ipp_t **driver_attrs, void *data);
//extern bool lprintEPL1(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *driver_data, ipp_t **driver_attrs, void *data);
//extern bool lprintFGL(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *driver_data, ipp_t **driver_attrs, void *data);
//extern bool lprintPCL(pappl_system_t *system, const char *driver_name, const char *device_uri, const char *device_id, pappl_pr_driver_data_t *driver_data, ipp_t **driver_attrs, void *data);
#endif // !LPRINT_H