]>
Commit | Line | Data |
---|---|---|
1 | /* | |
2 | * "$Id: ieee1394.h 6649 2007-07-11 21:46:42Z mike $" | |
3 | * | |
4 | * IEEE-1394 header for the Common UNIX Printing System (CUPS). | |
5 | * | |
6 | * Copyright 2007 by Apple Inc. | |
7 | * Copyright 2002 by Easy Software Products, all rights reserved. | |
8 | * | |
9 | * Redistribution and use in source and binary forms, with or | |
10 | * without modification, are permitted provided that the | |
11 | * following conditions are met: | |
12 | * | |
13 | * 1. Redistributions of source code must retain the above | |
14 | * copyright notice, this list of conditions and the | |
15 | * following disclaimer. | |
16 | * | |
17 | * 2. Redistributions in binary form must reproduce the | |
18 | * above copyright notice, this list of conditions and | |
19 | * the following disclaimer in the documentation and/or | |
20 | * other materials provided with the distribution. | |
21 | * | |
22 | * 3. All advertising materials mentioning features or use | |
23 | * of this software must display the following | |
24 | * acknowledgement: | |
25 | * | |
26 | * This product includes software developed by Easy | |
27 | * Software Products. | |
28 | * | |
29 | * 4. The name of Easy Software Products may not be used to | |
30 | * endorse or promote products derived from this software | |
31 | * without specific prior written permission. | |
32 | * | |
33 | * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS | |
34 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, | |
35 | * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | |
36 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | |
37 | * DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS | |
38 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | |
39 | * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
40 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
41 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | |
42 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
43 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE | |
44 | * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | |
45 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH | |
46 | * DAMAGE. | |
47 | */ | |
48 | ||
49 | /* | |
50 | * Include necessary headers. | |
51 | */ | |
52 | ||
53 | #include <cups/cups.h> | |
54 | #include <stdio.h> | |
55 | #include <stdlib.h> | |
56 | #include <stdarg.h> | |
57 | #include <cups/string.h> | |
58 | #include <errno.h> | |
59 | #include <sys/types.h> | |
60 | #include <sys/stat.h> | |
61 | #include <signal.h> | |
62 | ||
63 | #ifdef WIN32 | |
64 | # include <io.h> | |
65 | #else | |
66 | # include <unistd.h> | |
67 | # include <fcntl.h> | |
68 | #endif /* WIN32 */ | |
69 | ||
70 | ||
71 | /* | |
72 | * Device information structure... | |
73 | */ | |
74 | ||
75 | typedef struct | |
76 | { | |
77 | char uri[HTTP_MAX_URI], /* Device URI */ | |
78 | description[128], /* Description of port */ | |
79 | make_model[128]; /* Make and model */ | |
80 | } ieee1394_info_t; | |
81 | ||
82 | ||
83 | /* | |
84 | * Private device connection information... | |
85 | */ | |
86 | ||
87 | typedef void *ieee1394_dev_t; | |
88 | ||
89 | ||
90 | /* | |
91 | * Prototypes for standard IEEE-1394 interface... | |
92 | */ | |
93 | ||
94 | extern ieee1394_info_t *ieee1394_list(int *num_devices); | |
95 | extern ieee1394_dev_t ieee1394_open(const char *uri); | |
96 | extern int ieee1394_close(ieee1394_dev_t dev); | |
97 | extern int ieee1394_read(ieee1394_dev_t dev, char *buffer, int len); | |
98 | extern int ieee1394_write(ieee1394_dev_t dev, char *buffer, int len); | |
99 | extern const char *ieee1394_error(void); | |
100 | ||
101 | ||
102 | /* | |
103 | * End of "$Id: ieee1394.h 6649 2007-07-11 21:46:42Z mike $". | |
104 | */ |