BRPtouchNetworkManager
BRPtouchNetworkManager
searches and lists printers connected via the network.
Instance Methods
startSearch:
Begins searching for compatible printers that exist on the network.
Declaration
- (int)startSearch:(int)nTimeout;
Parameters
Parameter | Description |
---|---|
nTimeout | Time to perform the search in seconds |
Return Value
RET_TRUE
if success, otherwise RET_FALSE
.
getPrinterNetInfo
Get the found printers list. Call after didFinishSearch:
is called.
Declaration
- (NSArray *)getPrinterNetInfo;
Return Value
Array of BRPtouchDeviceInfo
class.
initWithPrinterName:
Initializer to specify a target printer model. Only the model will be found.
Declaration
- (void)initWithPrinterName:(NSString *)strPrinterName;
Parameters
Parameter | Description |
---|---|
strPrinterName | The target printer model name |
initWithPrinterNames:
Initializer to specify target printer models. Only the models will be found.
Declaration
- (void)initWithPrinterNames:(NSArray *)strPrinterNames;
Parameters
Parameter | Description |
---|---|
strPrinterNames | Array of the target printer model names |
setPrinterName:
Set the target printer model.
Declaration
- (BOOL)setPrinterName:(NSString *)strPrinterName;
Parameters
Parameter | Description |
---|---|
strPrinterName | The target printer model name |
Return Value
NO
if strPrinterName
is nil
, otherwise YES
.
setPrinterNames:
Set the target printer models.
Declaration
- (BOOL)setPrinterNames:(NSArray *)strPrinterNames;
Parameters
Parameter | Description |
---|---|
strPrinterNames | Array of the target printer model name |
Return Value
NO
if strPrinterNames
is nil
, otherwise YES
.
Properties
delegate
Set an object adapted to BRPtouchNetworkDelegate
protocol to know the search progress.
Declaration
@property(nonatomic, assign) id <BRPtouchNetworkDelegate> delegate;
isEnableIPv6Search
Enable IPv6 search. strIPAddress
of BRPtouchDeviceInfo
object will be IPv6 address if the printer has it, otherwise IPv4 address. It always will be IPv4 address if this property is disabled.
Declaration
@property(nonatomic, assign) BOOL isEnableIPv6Search;
BRPtouchNetworkDelegate protocol
BRPtouchNetworkDelegate
protocol defines the interface to know the search progress.
didFinishSearch
This delegate method is called when the search is finished.
- (void)didFinishSearch:(id)sender;
didFindDevice:
This delegate method is called when a printer is found.
@optional - (void)didFindDevice:(BRPtouchDeviceInfo *)deviceInfo;