| CustomiOSApi 1.06

- Main Page
- Classes

All Classes Functions Enumerations Enumerator Pages
/Users/sviluppo/Documents/sviluppo/CustomiOSApi/CustomiOSApi/CustomiOSApi/CustomPrinter.h
1 //
2 // CustomPrinter.h
3 // CustomiOSApi
4 //
5 // Created by CUSTOM on 03/07/13.
6 // Copyright (c) 2013 CUSTOM. All rights reserved.
7 //
8
9 #ifndef CUSTOMPRINTER_H_
10 #define CUSTOMPRINTER_H_
11
12 #import <Foundation/Foundation.h>
13 #import "PrinterStatus.h"
14 #import "PrinterFont.h"
15 #import <UIKit/UIKit.h>
16
20 @interface CustomPrinter : NSObject
21 {
22 @public
23
27 enum CommPortType
28 {
32 COMMTYPE_BLUETOOTH = 0,
36 COMMTYPE_WIFI = 1,
40 COMMTYPE_NONE = 0xFF,
41 };
42
43 //************************************************************************************************
44 // IMAGE SCALE
45 //************************************************************************************************
46
50 enum ImageScale
51 {
55 IMAGE_SCALE_NONE = 0,
59 IMAGE_SCALE_TO_FIT = 1,
63 IMAGE_SCALE_TO_WIDTH = 2,
64 };
65
66 //************************************************************************************************
67 // IMAGE ALIGN / JUSTIFICATION
68 //************************************************************************************************
69
73 enum ImageJustification
74 {
78 IMAGE_ALIGN_TO_LEFT = 0,
82 IMAGE_ALIGN_TO_CENTER = -1,
86 IMAGE_ALIGN_TO_RIGHT = -2,
87 };
88
89 //************************************************************************************************
90 // CUT
91 //************************************************************************************************
92
96 enum CutType
97 {
101 CUT_TOTAL = 0,
105 CUT_PARTIAL = 1,
106 };
107
108 //************************************************************************************************
109 // EJECT
110 //************************************************************************************************
111
115 enum EjectType
116 {
120 EJ_EJECT = 0,
124 EJ_RETRACT = 1,
125 };
126
127 //************************************************************************************************
128 // BARCODE TYPE
129 //************************************************************************************************
130
134 enum BarcodeType
135 {
139 BARCODE_TYPE_CODABAR = -1,
143 BARCODE_TYPE_UPCA = -2,
147 BARCODE_TYPE_UPCE = -3,
151 BARCODE_TYPE_EAN13 = -4,
155 BARCODE_TYPE_EAN8 = -5,
159 BARCODE_TYPE_CODE39 = -6,
163 BARCODE_TYPE_ITF = -7,
167 BARCODE_TYPE_CODE93 = -8,
171 BARCODE_TYPE_CODE128 = -9,
175 BARCODE_TYPE_CODE32 = -10,
176 };
177
178 //************************************************************************************************
179 // BARCODE 2D TYPE
180 //************************************************************************************************
181
185 enum Barcode2DType
186 {
190 BARCODE_TYPE_QRCODE = -101,
191
195 BARCODE_TYPE_MICROQRCODE = -102,
196
200 BARCODE_TYPE_DATAMATRIX = -103,
201
205 BARCODE_TYPE_PDF417 = -104,
206
210 BARCODE_TYPE_MICROPDF417 = -105,
211
215 BARCODE_TYPE_AZTEC = -106,
216
217 };
218
219 //************************************************************************************************
220 // BARCODE HRI TYPE
221 //************************************************************************************************
222
226 enum BarcodeHriType
227 {
231 BARCODE_HRI_NONE = 0,
235 BARCODE_HRI_TOP = 1,
239 BARCODE_HRI_BOTTOM = 2,
243 BARCODE_HRI_TOPBOTTOM = 3,
244 };
245
246 //************************************************************************************************
247 // BARCODE ALIGN / JUSTIFICATION
248 //************************************************************************************************
249
253 enum BarcodeJustification
254 {
258 BARCODE_ALIGN_TO_LEFT = 0,
262 BARCODE_ALIGN_TO_CENTER = -1,
266 BARCODE_ALIGN_TO_RIGHT = -2,
267 };
268
269 @protected
270
271 @private
272 }
273
274 //***********************************************
275 // COMMON FUNCTIONS
276 //***********************************************
277
283 - (Boolean) IsPrinterOnline:(NSError**)error;
284
290 - (NSInteger) GetPrinterId:(NSError**)error;
291
297 - (NSString*) GetFirmwareVersion:(NSError**)error;
298
303 - (NSString*) GetAPIVersion;
304
310 - (NSData*) GetPrinterFullStatusBuffer:(NSError**)error;
311
317 - (PrinterStatus*) GetPrinterFullStatus:(NSError**)error;
318
323 - (NSString*) GetPrinterName;
324
329 - (NSInteger) GetPageWidth;
330
336 - (NSInteger) GetReadTimeout:(NSError**)error;
337
343 - (void) SetReadTimeout:(NSInteger)msecs :(NSError**)error;
344
350 - (NSInteger) GetWriteTimeout:(NSError**)error;
351
357 - (void) SetWriteTimeout:(NSInteger)msecs :(NSError**)error;
358
363 - (void) Close:(NSError**)error;
364
375 - (enum CommPortType) GetPortType;
376
381 - (void) ClearReadBuffer:(NSError**)error;
382
388 - (NSData *) ReadData:(NSError**)error;
389
395 - (void) WriteData:(NSData *)data :(NSError**)error;
396
402 - (void) Feed:(NSInteger)nFeeds :(NSError**)error;
403
414 - (void) Cut:(enum CutType)cutType :(NSError**)error;
415
426 - (void) Eject:(enum EjectType)ejectType :(NSError**)error;
427
433 - (void) Present:(NSInteger)presentMM :(NSError**)error;
434
435 // <summary>
443 - (void) PrintText:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
444
453 - (void) PrintTextLF:(NSString*)text :(NSInteger)pixel_la :(NSInteger)pixel_w :(PrinterFont*)font :(NSError**)error;
454
461 - (void) PrintText:(NSString*)text :(PrinterFont*)font :(NSError**)error;
462
469 - (void) PrintTextLF:(NSString*)text :(PrinterFont*)font :(NSError**)error;
470
477 - (void) PrintTextArrayLF:(NSArray*)textarray :(PrinterFont*)font :(NSError**)error;
478
484 - (void) PrintText:(NSString*)text :(NSError**)error;
485
491 - (void) PrintTextLF:(NSString*)text :(NSError**)error;
492
498 - (void) PrintTextArrayLF:(NSArray*)textarray :(NSError**)error;
499
520 - (void) PrintImage:(UIImage*)image :(NSInteger)leftAlign :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSError**)error;
521
527 - (void) PrintImage:(UIImage*)image :(NSError**)error;
528
539 - (void) PrintBarcodeText:(NSString*)brcText :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
540
551 - (void) PrintBarcodeData:(NSData*)brcData :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
552
561 - (void) PrintBarcode2DText:(NSString*)brcText :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
562
571 - (void) PrintBarcode2DData:(NSData*)brcData :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
572
573 @end
574
575 #endif