2 * Copyright (c) 2001-2002 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
29 typedef struct _IjsServerCtx IjsServerCtx;
32 int n_chan; /* number of channels */
33 int bps; /* bits per sample, one of 1, 2, 4, 8, 16 */
34 char cs[256]; /* color space, as string */
35 int width; /* in pixels */
37 double xres; /* in dpi */
41 /* callbacks, lots of callbacks */
43 typedef int IjsBeginJobCb (void *begin_cb_data,
47 typedef int IjsEndJobCb (void *end_cb_data,
51 typedef int IjsQueryStatusCb (void *status_cb_data,
55 typedef int IjsListParamsCb (void *list_cb_data,
61 typedef int IjsEnumParamCb (void *enum_cb_data,
68 typedef int IjsSetParamCb (void *set_cb_data,
75 typedef int IjsGetParamCb (void *get_cb_data,
83 ijs_server_init (void);
86 ijs_server_install_begin_cb (IjsServerCtx *ctx,
87 IjsBeginJobCb *begin_cb, void *begin_cb_data);
90 ijs_server_install_end_cb (IjsServerCtx *ctx,
91 IjsEndJobCb *end_cb, void *end_cb_data);
94 ijs_server_install_status_cb (IjsServerCtx *ctx,
95 IjsQueryStatusCb *status_cb,
96 void *status_cb_data);
99 ijs_server_install_list_cb (IjsServerCtx *ctx,
100 IjsListParamsCb *list_cb, void *list_cb_data);
103 ijs_server_install_enum_cb (IjsServerCtx *ctx,
104 IjsEnumParamCb *enum_cb, void *enum_cb_data);
107 ijs_server_install_set_cb (IjsServerCtx *ctx,
108 IjsSetParamCb *set_cb, void *set_cb_data);
111 ijs_server_install_get_cb (IjsServerCtx *ctx,
112 IjsGetParamCb *get_cb, void *get_cb_data);
115 ijs_server_done (IjsServerCtx *ctx);
118 ijs_server_iter (IjsServerCtx *ctx);
121 ijs_server_get_page_header (IjsServerCtx *ctx, IjsPageHeader *ph);
124 ijs_server_get_data (IjsServerCtx *ctx, char *buf, int size);