| CustomiOSApi 1.06

- Main Page
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Functions Enumerations Enumerator Pages
Instance Methods | List of all members
CustomiOSApi Class Reference

Factory class to get the printer driver class for supported model id More...

## Instance Methods
(NSString *) | - GetAPIVersion
| Returns current API version More...
(void) | - EnableLogAPI:
(NSArray *) | - EnumWifiDevices::
| Get the list of the available CUSTOM wifi/ethernet devices More...
(CustomPrinter *) | - GetPrinterDriverWIFI::
| Connects to WiFi/Ethernet Printer device More...
(CustomPrinter *) | - GetPrinterDriverWIFI:::
| Connects to WiFi/Ethernet Printer device More...
(NSArray *) | - EnumBTDevices:
| Get the list of the available bluetooth devices More...
(CustomPrinter *) | - GetPrinterDriverBT::
| Connects to Bluetooth Printer device More...

## Detailed Description

Factory class to get the printer driver class for supported model id

## Method Documentation

- (void) EnableLogAPI: |  | (Boolean) | enable |

Enable / disable the API log (default disabled)

Parameters

  enable | Log status

- (NSArray *) EnumBTDevices: |  | (NSError **) | error |

Get the list of the available bluetooth devices

Parameters

  error | Error pointer

Returns
  The array of EAAccessory of bluetooth devices

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices)
NSArray* arrayBT = [customApi EnumBTDevices:&error];
//Save the 1st BT Device found
EAAccessory* bt1stDevice = [arrayBT objectAtIndex:0];

- (NSArray *) EnumWifiDevices: |  | (NSInteger) | searchTime
: |  | (NSError **) | error

Get the list of the available CUSTOM wifi/ethernet devices

Parameters

  searchTime | Search wifi/ethernet devices timeout (msec)
  error | Error pointer

Returns
  The array of NSString with IP ADDRESS of CUSTOM wifi/Ethernet devices

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Save the 1st IP found
NSString* str1stDeviceIP = [arrayIP objectAtIndex:0];

- (NSString *) GetAPIVersion |  |  |

Returns current API version

Returns
  current API version

- (CustomPrinter*) GetPrinterDriverBT: |  | (EAAccessory *) | btdevice
: |  | (NSError **) | error

Connects to Bluetooth Printer device

Parameters

  btdevice | EAAccessory* of the device
  error | Error pointer

Returns
  Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices)
NSArray* arrayBT = [customApi EnumBTDevices:&error];
//Open the 1st device found
CustomPrinter* cp = [customApi GetPrinterDriverBT:[arrayBT objectAtIndex:0] :&error];

- (CustomPrinter*) GetPrinterDriverWIFI: |  | (NSString *) | printerIpAddr
: |  | (NSError **) | error

Connects to WiFi/Ethernet Printer device

Parameters

  printerIpAddr | Printer IP Address
  error | Error pointer

Returns
  Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Open the 1st device found (on default 9100 port)
CustomPrinter* cp = [customApi GetPrinterDriverWIFI:[arrayIP objectAtIndex:0] :&error];

- (CustomPrinter*) GetPrinterDriverWIFI: |  | (NSString *) | printerIpAddr
: |  | (NSInteger) | printerIpPort
: |  | (NSError **) | error

Connects to WiFi/Ethernet Printer device

Parameters

  printerIpAddr | Printer IP Address
  printerIpPort | Printer IP Port
  error | Error pointer

Returns
  Printer driver class according to its model/printer ID

Example usage:

//Create the Error Object
NSError *error = nil;
//Create Main Object
CustomiOSApi customApi = [[CustomiOSApi alloc] init];
//Enum WIFI devices (search devices for 1.5 secs)
NSArray* arrayIP = [customApi EnumWifiDevices:1500 :&error];
//Open the 1st device found (on 9100 port)
CustomPrinter* cp = [customApi GetPrinterDriverWIFI:[arrayIP objectAtIndex:0] :9100 :&error];