CustomiOSApi  1.04
 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 
28  {
40  COMMTYPE_NONE = 0xFF,
41  };
42 
43  //************************************************************************************************
44  // IMAGE SCALE
45  //************************************************************************************************
46 
51  {
64  };
65 
66  //************************************************************************************************
67  // IMAGE ALIGN / JUSTIFICATION
68  //************************************************************************************************
69 
74  {
87  };
88 
89  //************************************************************************************************
90  // CUT
91  //************************************************************************************************
92 
96  enum CutType
97  {
106  };
107 
108  //************************************************************************************************
109  // EJECT
110  //************************************************************************************************
111 
116  {
120  EJ_EJECT = 0,
125  };
126 
127  //************************************************************************************************
128  // BARCODE TYPE
129  //************************************************************************************************
130 
135  {
176  };
177 
178  //************************************************************************************************
179  // BARCODE 2D TYPE
180  //************************************************************************************************
181 
186  {
191 
196 
201 
206 
211 
216 
217  };
218 
219  //************************************************************************************************
220  // BARCODE HRI TYPE
221  //************************************************************************************************
222 
227  {
244  };
245 
246  //************************************************************************************************
247  // BARCODE ALIGN / JUSTIFICATION
248  //************************************************************************************************
249 
254  {
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 
476 - (void) PrintText:(NSString*)text :(NSError**)error;
477 
483 - (void) PrintTextLF:(NSString*)text :(NSError**)error;
484 
505 - (void) PrintImage:(UIImage*)image :(NSInteger)leftAlign :(enum ImageScale)widthOption :(NSInteger)imgWidth :(NSError**)error;
506 
512 - (void) PrintImage:(UIImage*)image :(NSError**)error;
513 
524 - (void) PrintBarcodeText:(NSString*)brcText :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
525 
536 - (void) PrintBarcodeData:(NSData*)brcData :(enum BarcodeType)brcType :(enum BarcodeHriType)brcHriType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSInteger)brcHeight :(NSError**)error;
537 
546 - (void) PrintBarcode2DText:(NSString*)brcText :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
547 
556 - (void) PrintBarcode2DData:(NSData*)brcData :(enum Barcode2DType)brcType :(enum BarcodeJustification)brcJustification :(NSInteger)brcWidth :(NSError**)error;
557 
558 @end
559 
560 #endif