Tizen 2.0 Release
[external/epson-laser-printer-escpage.git] / lib / epson-escpr-services.h
1 /*_____________________________  epson-escpr-services.h   ______________________________*/\r
2 \r
3 /*       1         2         3         4         5         6         7         8        */\r
4 /*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/\r
5 /*******************************************|********************************************/\r
6 /*\r
7  *   Copyright (c) 2009  Seiko Epson Corporation                 All rights reserved.\r
8  *\r
9  *   Copyright protection claimed includes all forms and matters of\r
10  *   copyrightable material and information now allowed by statutory or judicial\r
11  *   law or hereinafter granted, including without limitation, material generated\r
12  *   from the software programs which are displayed on the screen such as icons,\r
13  *   screen display looks, etc.\r
14  *\r
15  */\r
16 /*******************************************|********************************************/\r
17 /*                                                                                      */\r
18 /*                            Epson ESC/PR Sevice Functions                             */\r
19 /*                                                                                      */\r
20 /*******************************************|********************************************/\r
21 #ifndef __EPSON_ESCPR_SERVICES_H__\r
22 #define __EPSON_ESCPR_SERVICES_H__\r
23 #ifdef __cplusplus\r
24 extern "C" {\r
25 #endif\r
26 \r
27 /*------------------------------------  Includes   -------------------------------------*/\r
28 /*******************************************|********************************************/\r
29 #include "epson-typedefs.h"\r
30 #include "epson-escpr-pvt.h"\r
31 \r
32 /*------------------------------------- Data Types -------------------------------------*/\r
33 /*******************************************|********************************************/\r
34 \r
35 /*--------------------------------------  Macros   -------------------------------------*/\r
36 /*******************************************|********************************************/\r
37 \r
38 /*-----------------------------------  Definitions  ------------------------------------*/\r
39 /*******************************************|********************************************/\r
40     /*** Ink Cartridge Type                                                             */\r
41     /*** -------------------------------------------------------------------------------*/\r
42 #define MI_CARTRIDGE_INDEP          0x00        /* Independent Cartridge                */\r
43 #define MI_CARTRIDGE_ONE            0x01        /* One Cartridge                        */\r
44 \r
45     /*** Device States                                                                  */\r
46     /*** -------------------------------------------------------------------------------*/\r
47 #define EPS_ST_ERROR                        0x01\r
48 #define EPS_ST_SELF_PRINTING                0x02\r
49 #define EPS_ST_BUSY                         0x04\r
50 #define EPS_ST_WAITING                      0x08\r
51 #define EPS_ST_IDLE                         0x10\r
52 /*#define EPS_ST_PAUSE                      0x20*/   /* Not supported by 2006 Model  */\r
53 /*#define EPS_ST_INKDRYING                  0x40*/   /* Not supported by 2006 Model  */\r
54 #define EPS_ST_CLEANING                     0x80\r
55 #define EPS_ST_FACTORY_SHIPMENT            0x100\r
56 /*#define EPS_ST_MOTOR_DRIVE_OFF           0x200*/   /* Not supported by 2006 Model  */\r
57 #define EPS_ST_SHUTDOWN                    0x400\r
58 /*#define EPS_ST_WAITPAPERINIT             0x800*/   /* Not supported by 2006 Model  */\r
59 /*#define EPS_ST_INIT_PAPER               0x1000*/   /* Not supported by 2006 Model  */\r
60 \r
61     /*** Device Warnings                                                                */\r
62     /*** -------------------------------------------------------------------------------*/\r
63 #define EPS_PRNWARN_NONE                       0x00     /* No Warnings                  */\r
64 #define EPS_PRNWARN_INKLOW                 (1 << 0)     /* Ink Low                      */\r
65 #define EPS_PRNWARN_DISABLE_CLEAN          (1 << 1)     /* disable cleaning             */\r
66 #define EPS_PRNWARN_COLOR_INKOUT           (1 << 2)     /* disable color print          */\r
67         \r
68 \r
69     /*** Ink Error                                                                      */\r
70     /*** -------------------------------------------------------------------------------*/\r
71 #define EPS_INKERR_NONE                0\r
72 \r
73 #define EPS_INKERR_INKENDB            -1\r
74 #define EPS_INKERR_INKENDC            -2\r
75 #define EPS_INKERR_INKENDCY           -3\r
76 #define EPS_INKERR_INKENDMA           -4\r
77 #define EPS_INKERR_INKENDYL           -5\r
78 #define EPS_INKERR_INKENDLC           -6\r
79 #define EPS_INKERR_INKENDLM           -7\r
80 #define EPS_INKERR_INKENDLY           -8\r
81 #define EPS_INKERR_INKENDDY           -9\r
82 #define EPS_INKERR_INKENDB2          -10\r
83 #define EPS_INKERR_INKENDRD          -11\r
84 #define EPS_INKERR_INKENDBL          -12\r
85 #define EPS_INKERR_INKENDMB          -13\r
86 #define EPS_INKERR_INKENDPB          -14\r
87 #define EPS_INKERR_INKENDGO          -15\r
88 #define EPS_INKERR_INKENDALL         -16\r
89 #define EPS_INKERR_INKENDBC          -17\r
90 \r
91 #define EPS_INKERR_CEMPTYB          -101\r
92 #define EPS_INKERR_CEMPTYC          -102\r
93 #define EPS_INKERR_CEMPTYCY         -103\r
94 #define EPS_INKERR_CEMPTYMA         -104\r
95 #define EPS_INKERR_CEMPTYYL         -105\r
96 #define EPS_INKERR_CEMPTYLC         -106\r
97 #define EPS_INKERR_CEMPTYLM         -107\r
98 #define EPS_INKERR_CEMPTYLY         -108\r
99 #define EPS_INKERR_CEMPTYDY         -109\r
100 #define EPS_INKERR_CEMPTYB2         -110\r
101 #define EPS_INKERR_CEMPTYRD         -111\r
102 #define EPS_INKERR_CEMPTYBL         -112\r
103 #define EPS_INKERR_CEMPTYMB         -113\r
104 #define EPS_INKERR_CEMPTYPB         -114\r
105 #define EPS_INKERR_CEMPTYGO         -115\r
106 #define EPS_INKERR_CEMPTYBC         -116\r
107 #define EPS_INKERR_CEMPTYALL        -117\r
108 \r
109 #define EPS_INKERR_CFAILB           -201\r
110 #define EPS_INKERR_CFAILC           -202\r
111 #define EPS_INKERR_CFAILCY          -203\r
112 #define EPS_INKERR_CFAILMA          -204\r
113 #define EPS_INKERR_CFAILYL          -205\r
114 #define EPS_INKERR_CFAILLC          -206\r
115 #define EPS_INKERR_CFAILLM          -207\r
116 #define EPS_INKERR_CFAILLY          -208\r
117 #define EPS_INKERR_CFAILDY          -209\r
118 #define EPS_INKERR_CFAILB2          -210\r
119 #define EPS_INKERR_CFAILRD          -211\r
120 #define EPS_INKERR_CFAILBL          -212\r
121 #define EPS_INKERR_CFAILMB          -213\r
122 #define EPS_INKERR_CFAILPB          -214\r
123 #define EPS_INKERR_CFAILGO          -215\r
124 #define EPS_INKERR_CFAILBC          -216\r
125 #define EPS_INKERR_CFAILALL         -217\r
126 \r
127     /*** Cancel request from printer                                                    */\r
128     /*** -------------------------------------------------------------------------------*/\r
129 #define EPS_CAREQ_CANCEL            -300\r
130 #define EPS_CAREQ_NOCANCEL          -301\r
131 \r
132     /*** Other Printer Information                                                      */\r
133     /*** -------------------------------------------------------------------------------*/\r
134 #define EPS_PREPARE_OVERHEAT        -400\r
135 #define EPS_PREPARE_NORMALHEAT      -401\r
136 #define EPS_PREPARE_TRAYOPENED      -402\r
137 #define EPS_PREPARE_TRAYCLOSED      -403\r
138 \r
139     /*** reset mode                                                                      */\r
140     /*** -------------------------------------------------------------------------------*/\r
141 #define EPS_PM_PAGE                   1\r
142 #define EPS_PM_JOB                    2\r
143 \r
144     /*** Misc                                                                           */\r
145     /*** -------------------------------------------------------------------------------*/\r
146 #define _SECOND_                    1000    /* Unit for changing milli second to second */\r
147 #define _STATUS_REPLY_BUF            256    /* Printer status buffer size               */\r
148 \r
149 \r
150     /*** PM string resource ID                                                          */\r
151     /*** -------------------------------------------------------------------------------*/\r
152 #define EPS_PMS_E300                (1)\r
153 #define EPS_PMS_E500                (2)\r
154 #define EPS_PMS_E700                EPS_PMS_E500\r
155 #define EPS_PMS_PM200               (3)\r
156 #define EPS_PMS_PM240               (4)\r
157 \r
158     /*** Model depend                                                                   */\r
159     /*** -------------------------------------------------------------------------------*/\r
160 #define EPS_MDC_STATUS                          (1)\r
161 #define EPS_MDC_NOZZLE                          (2)\r
162 \r
163 /*---------------------------  Public Function Declarations  ---------------------------*/\r
164 /*******************************************|********************************************/\r
165 extern EPS_BOOL     serParseDeviceID (EPS_INT8*, EPS_INT8*, EPS_INT8*, EPS_INT32*, EPS_UINT32*);\r
166 extern EPS_ERR_CODE serAnalyzeStatus            (EPS_INT8*, EPS_STATUS_INFO*            );\r
167 extern void         serDelayThread              (EPS_UINT32, EPS_CMN_FUNC*              );\r
168 extern EPS_INT32    serGetInkError              (EPS_STATUS_INFO*, EPS_INT32*           );\r
169 extern EPS_INT32    serInkLevelNromalize        (EPS_INT32                              );\r
170 \r
171 #ifdef GCOMSW_EPSON_SLEEP\r
172 extern EPS_ERR_CODE serSleep                    (EPS_UINT32                             );\r
173 #endif\r
174 \r
175     /*** pm reply                                                                       */\r
176     /*** -------------------------------------------------------------------------------*/\r
177 extern EPS_ERR_CODE _SP_ChangeSpec_UpdatePMReply(EPS_PRINTER_INN*, EPS_UINT8*, EPS_INT32);\r
178 extern EPS_ERR_CODE _SP_ChangeSpec_DraftOnly    (EPS_PRINTER_INN*, EPS_JOB_ATTRIB*      );\r
179 extern void         serAppendMedia              (EPS_SUPPORTED_MEDIA*                   );\r
180 \r
181 \r
182 extern void         obsSetPrinter               (const EPS_PRINTER_INN*                 );\r
183 extern void         obsSetColorPlane            (EPS_UINT8                              );\r
184 extern void         obsClear                    (void                                   );\r
185 extern EPS_INT32    obsGetPageMode              (void                                   );\r
186 extern EPS_BOOL         obsIsA3Model                            (EPS_INT32                              );\r
187 extern EPS_BOOL         obsEnableDuplex                         (EPS_INT32                              );\r
188 \r
189 \r
190 #ifdef __cplusplus\r
191 }\r
192 #endif\r
193 \r
194 #endif  /* def __EPSON_ESCPR_SERVICES_H__ */\r
195 \r
196 \r
197 /*_____________________________  epson-escpr-services.h  _______________________________*/\r
198   \r
199 /*34567890123456789012345678901234567890123456789012345678901234567890123456789012345678*/\r
200 /*       1         2         3         4         5         6         7         8        */\r
201 /*******************************************|********************************************/\r
202 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/\r
203 /***** End of File *** End of File *** End of File *** End of File *** End of File ******/\r
204 /*%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%|%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%*/\r