CustomiOSApi  1.04
 All Classes Functions Enumerations Enumerator Pages
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
enableLog status
- (NSArray *) EnumBTDevices: (NSError **)  error

Get the list of the available bluetooth devices

Parameters
errorError 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
searchTimeSearch wifi/ethernet devices timeout (msec)
errorError 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
btdeviceEAAccessory* of the device
errorError 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
printerIpAddrPrinter IP Address
errorError 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
printerIpAddrPrinter IP Address
printerIpPortPrinter IP Port
errorError 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];