Tuya iOS Smart Life App SDK 5.15.0
ThingDeviceNetworkManager Class Reference

#import <ThingDeviceNetworkManager.h>

Inheritance diagram for ThingDeviceNetworkManager:

Instance Methods

(instancetype) - initWithDeviceId:
 
(BOOL) - supportWifiBackupNetwork
 Support WiFi backup network or not. More...
 
(void) - getCurrentNetworkInfoWithSuccess:failure:
 
(void) - getBackupWifiNetworksWithSuccess:failure:
 
(ThingSmartBackupWifiModel *) - generateBackupWifiModelWithSSID:pwd:
 
(BOOL) - canUpdateWifiBackupNetwork:
 
(void) - updateBackupWifiNetworks:success:failure:
 
(BOOL) - canSwitchWifiNetwork:
 
(void) - switchBackupWifiNetworkWithHash:success:failure:
 
(void) - switchBackupWifiNetworkWithSSID:pwd:success:failure:
 
(instancetype) - initWithDeviceId:
 
(BOOL) - supportWifiBackupNetwork
 Support WiFi backup network or not. More...
 
(void) - getCurrentNetworkInfoWithSuccess:failure:
 
(void) - getBackupWifiNetworksWithSuccess:failure:
 
(ThingSmartBackupWifiModel *) - generateBackupWifiModelWithSSID:pwd:
 
(BOOL) - canUpdateWifiBackupNetwork:
 
(void) - updateBackupWifiNetworks:success:failure:
 
(BOOL) - canSwitchWifiNetwork:
 
(void) - switchBackupWifiNetworkWithHash:success:failure:
 
(void) - switchBackupWifiNetworkWithSSID:pwd:success:failure:
 

Class Methods

(BOOL) + supportWifiBackupNetwork:
 Support WiFi backup network or not. More...
 
(BOOL) + supportWifiBackupNetwork:
 Support WiFi backup network or not. More...
 

Detailed Description

Definition at line 30 of file ThingDeviceNetworkManager.h.

Method Documentation

◆ canSwitchWifiNetwork: [1/2]

- (BOOL) canSwitchWifiNetwork: (ThingDeviceNetworkInfo *)  info

Determine whether the device can currently switch WiFi networks. True if can otherwise false

◆ canSwitchWifiNetwork: [2/2]

- (BOOL) canSwitchWifiNetwork: (ThingDeviceNetworkInfo *)  info

Determine whether the device can currently switch WiFi networks. True if can otherwise false

◆ canUpdateWifiBackupNetwork: [1/2]

- (BOOL) canUpdateWifiBackupNetwork: (ThingDeviceNetworkInfo *)  info

Determine whether the device can currently update the WiFi backup network. True if can otherwise false

◆ canUpdateWifiBackupNetwork: [2/2]

- (BOOL) canUpdateWifiBackupNetwork: (ThingDeviceNetworkInfo *)  info

Determine whether the device can currently update the WiFi backup network. True if can otherwise false

◆ generateBackupWifiModelWithSSID:pwd: [1/2]

- (ThingSmartBackupWifiModel *) generateBackupWifiModelWithSSID: (NSString *)  ssid
pwd: (NSString *)  pwd 

Generate a backup network model through the WiFi name and password. You should generate a ThingSmartBackupWifiModel via 'generateBackupWifiModelWithSSID:pwd:' and then update the backup WiFi network of the device if went.

  • Parameters:
    • ssid: the name of WiFi
    • pwd: the password of WiFi

◆ generateBackupWifiModelWithSSID:pwd: [2/2]

- (ThingSmartBackupWifiModel *) generateBackupWifiModelWithSSID: (NSString *)  ssid
pwd: (NSString *)  pwd 

Generate a backup network model through the WiFi name and password. You should generate a ThingSmartBackupWifiModel via 'generateBackupWifiModelWithSSID:pwd:' and then update the backup WiFi network of the device if went.

  • Parameters:
    • ssid: the name of WiFi
    • pwd: the password of WiFi

◆ getBackupWifiNetworksWithSuccess:failure: [1/2]

- (void) getBackupWifiNetworksWithSuccess: (void(^)(NSArray< ThingSmartBackupWifiModel * > *backWifiInfos, NSInteger maxNum))  success
failure: (void(^)(NSError *error))  failure 

Obtain the current list of WiFi backup networks for the device.

  • Parameters:
    • success: success callback with the list of ThingSmartBackupWifiModel and the max count of backup WiFis the device support
    • failure: failure callback with error

◆ getBackupWifiNetworksWithSuccess:failure: [2/2]

- (void) getBackupWifiNetworksWithSuccess: (void(^)(NSArray< ThingSmartBackupWifiModel * > *backWifiInfos, NSInteger maxNum))  success
failure: (void(^)(NSError *error))  failure 

Obtain the current list of WiFi backup networks for the device.

  • Parameters:
    • success: success callback with the list of ThingSmartBackupWifiModel and the max count of backup WiFis the device support
    • failure: failure callback with error

◆ getCurrentNetworkInfoWithSuccess:failure: [1/2]

- (void) getCurrentNetworkInfoWithSuccess: (void(^)(ThingDeviceNetworkInfo *info))  success
failure: (void(^)(NSError *error))  failure 

Obtain the current network information of the device

◆ getCurrentNetworkInfoWithSuccess:failure: [2/2]

- (void) getCurrentNetworkInfoWithSuccess: (void(^)(ThingDeviceNetworkInfo *info))  success
failure: (void(^)(NSError *error))  failure 

Obtain the current network information of the device

◆ initWithDeviceId: [1/2]

- (instancetype) initWithDeviceId: (NSString *)  deviceId

◆ initWithDeviceId: [2/2]

- (instancetype) initWithDeviceId: (NSString *)  deviceId

◆ supportWifiBackupNetwork [1/2]

- (BOOL) supportWifiBackupNetwork

Support WiFi backup network or not.

◆ supportWifiBackupNetwork [2/2]

- (BOOL) supportWifiBackupNetwork

Support WiFi backup network or not.

◆ supportWifiBackupNetwork: [1/2]

+ (BOOL) supportWifiBackupNetwork: (NSString *)  deviceId

Support WiFi backup network or not.

◆ supportWifiBackupNetwork: [2/2]

+ (BOOL) supportWifiBackupNetwork: (NSString *)  deviceId

Support WiFi backup network or not.

◆ switchBackupWifiNetworkWithHash:success:failure: [1/2]

- (void) switchBackupWifiNetworkWithHash: (NSString *)  hash
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Switch the network of device to the specified WiFi backup network using hash value. You can do this if the WiFi backup network has been updated to the device. You should call 'canSwitchWifiNetwork:' firstly to determine whether the device can currently switch WiFi networks.

  • Parameters:
    • hash: the hash value of the WiFi backup network
    • success: success callback
    • failure: failure callback with error

◆ switchBackupWifiNetworkWithHash:success:failure: [2/2]

- (void) switchBackupWifiNetworkWithHash: (NSString *)  hash
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Switch the network of device to the specified WiFi backup network using hash value. You can do this if the WiFi backup network has been updated to the device. You should call 'canSwitchWifiNetwork:' firstly to determine whether the device can currently switch WiFi networks.

  • Parameters:
    • hash: the hash value of the WiFi backup network
    • success: success callback
    • failure: failure callback with error

◆ switchBackupWifiNetworkWithSSID:pwd:success:failure: [1/2]

- (void) switchBackupWifiNetworkWithSSID: (NSString *)  ssid
pwd: (NSString *)  pwd
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Switch the network of device to the specified WiFi backup network using WIFI name and password. You can do this if the WiFi backup network hasn't been updated to the device. You should call 'canSwitchWifiNetwork:' firstly to determine whether the device can currently switch WiFi networks.

  • Parameters:
    • ssid: the name of the WiFi backup network
    • pwd: the password of the WiFi backup network
    • success: success callback
    • failure: failure callback with error

◆ switchBackupWifiNetworkWithSSID:pwd:success:failure: [2/2]

- (void) switchBackupWifiNetworkWithSSID: (NSString *)  ssid
pwd: (NSString *)  pwd
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Switch the network of device to the specified WiFi backup network using WIFI name and password. You can do this if the WiFi backup network hasn't been updated to the device. You should call 'canSwitchWifiNetwork:' firstly to determine whether the device can currently switch WiFi networks.

  • Parameters:
    • ssid: the name of the WiFi backup network
    • pwd: the password of the WiFi backup network
    • success: success callback
    • failure: failure callback with error

◆ updateBackupWifiNetworks:success:failure: [1/2]

- (void) updateBackupWifiNetworks: (NSArray< ThingSmartBackupWifiModel * > *)  infos
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Update the WiFi backup networks of the device. You should call 'canUpdateWifiBackupNetwork:' firstly to determine whether the device can currently update the WiFi backup network.

  • Parameters:
    • infos: the list of ThingSmartBackupWifiModel. The device does not support individual updates, only full coverage is supported. So you must list all the WiFi backup networks into the 'infos'.
    • success: success callback
    • failure: failure callback with error

◆ updateBackupWifiNetworks:success:failure: [2/2]

- (void) updateBackupWifiNetworks: (NSArray< ThingSmartBackupWifiModel * > *)  infos
success: (void(^)(void))  success
failure: (void(^)(NSError *error))  failure 

Update the WiFi backup networks of the device. You should call 'canUpdateWifiBackupNetwork:' firstly to determine whether the device can currently update the WiFi backup network.

  • Parameters:
    • infos: the list of ThingSmartBackupWifiModel. The device does not support individual updates, only full coverage is supported. So you must list all the WiFi backup networks into the 'infos'.
    • success: success callback
    • failure: failure callback with error

The documentation for this class was generated from the following files: