2 * Copyright (c) 2001-2004 artofcode LLC.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
25 /* This file contains common data types for IJS */
27 /* IJS_VERSION is decimal version number times 100 */
28 #define IJS_VERSION 35
55 IJS_CMD_SEND_DATA_BLOCK,
62 #define IJS_EIO -2 /* I/O error */
63 #define IJS_EPROTO -3 /* protocol error */
64 #define IJS_ERANGE -4 /* out of range */
65 #define IJS_EINTERNAL -5 /* internal error */
66 #define IJS_ENYI -6 /* not yet implemented */
67 #define IJS_ESYNTAX -7 /* syntax error */
68 #define IJS_ECOLORSPACE -8 /* unknown color space */
69 #define IJS_EUNKPARAM -9 /* unknown parameter */
70 #define IJS_EJOBID -10 /* job id doesn't match */
71 #define IJS_ETOOMANYJOBS -11 /* reached limit of server's #jobs */
72 #define IJS_EBUF -12 /* buffer isn't big enough */
74 #define IJS_HELO_STR "IJS\n\252v1\n"
75 #define IJS_RESP_STR "IJS\n\253v1\n"
91 ijs_send_init (IjsSendChan *ch, int fd);
94 ijs_send_int (IjsSendChan *ch, int val);
97 ijs_send_begin (IjsSendChan *ch, IjsCommand cmd);
100 ijs_send_block (IjsSendChan *ch, const char *buf, int len);
103 ijs_send_buf (IjsSendChan *ch);
106 ijs_get_int (const char *p);
109 ijs_recv_init (IjsRecvChan *ch, int fd);
112 ijs_recv_read (IjsRecvChan *ch, char *buf, int size);
115 ijs_recv_buf (IjsRecvChan *ch);
118 ijs_recv_ack (IjsRecvChan *ch);
121 ijs_recv_int (IjsRecvChan *ch, int *val);
124 ijs_recv_block (IjsRecvChan *ch, char *buf, int buf_size);