#import <ThingP2PSdk.h>
Definition at line 18 of file ThingP2PSdk.h.
◆ activeCheckWithHandle: [1/2]
+ (int) activeCheckWithHandle: |
|
(int) |
handle |
|
Description : check the p2p active or not
- Parameters
-
handle | : handle .The return value of connect operation. |
◆ activeCheckWithHandle: [2/2]
+ (int) activeCheckWithHandle: |
|
(int) |
handle |
|
Description : check the p2p active or not
- Parameters
-
handle | : handle .The return value of connect operation. |
◆ closeAllSessions [1/2]
closs all sessions for app
◆ closeAllSessions [2/2]
closs all sessions for app
◆ closePreConnectWithRemoteId:reason: [1/2]
+ (int) closePreConnectWithRemoteId: |
|
(char *) |
remote_id |
reason: |
|
(int) |
reason |
|
|
| |
◆ closePreConnectWithRemoteId:reason: [2/2]
+ (int) closePreConnectWithRemoteId: |
|
(char *) |
remote_id |
reason: |
|
(int) |
reason |
|
|
| |
◆ connectBreakWithTraceId: [1/2]
+ (int) connectBreakWithTraceId: |
|
(NSString *) |
traceId |
|
Description : break connect while connecting .
- Parameters
-
traceId | : traceId for p2p connect |
◆ connectBreakWithTraceId: [2/2]
+ (int) connectBreakWithTraceId: |
|
(NSString *) |
traceId |
|
Description : break connect while connecting .
- Parameters
-
traceId | : traceId for p2p connect |
◆ connectWithRemoteId:devId:skill:token:traceId:lanMode:timeout:preConnectEnable: [1/2]
+ (int) connectWithRemoteId: |
|
(NSString *) |
remoteId |
devId: |
|
(NSString *) |
devId |
skill: |
|
(NSString *) |
skill |
token: |
|
(NSString *) |
token |
traceId: |
|
(NSString *) |
traceId |
lanMode: |
|
(int) |
lanMode |
timeout: |
|
(int) |
timeout |
preConnectEnable: |
|
(int) |
preConnectEnable |
|
|
| |
connect v3 preConnectEnable preconnect enable or not
◆ connectWithRemoteId:devId:skill:token:traceId:lanMode:timeout:preConnectEnable: [2/2]
+ (int) connectWithRemoteId: |
|
(NSString *) |
remoteId |
devId: |
|
(NSString *) |
devId |
skill: |
|
(NSString *) |
skill |
token: |
|
(NSString *) |
token |
traceId: |
|
(NSString *) |
traceId |
lanMode: |
|
(int) |
lanMode |
timeout: |
|
(int) |
timeout |
preConnectEnable: |
|
(int) |
preConnectEnable |
|
|
| |
connect v3 preConnectEnable preconnect enable or not
◆ connectWithRemoteId:token:traceId:lanMode:timeout: [1/2]
+ (int) connectWithRemoteId: |
|
(NSString *) |
remoteId |
token: |
|
(NSString *) |
token |
traceId: |
|
(NSString *) |
traceId |
lanMode: |
|
(int) |
lanMode |
timeout: |
|
(int) |
timeout |
|
|
| |
Description : connect to the device such as camera.
- Parameters
-
remoteId | : the did |
token | : token for p2p connect |
traceId | : traceId for p2p connect |
lanMode | : 0 – not lan mode 1 – lan mode |
timeout | : time out for connect operation. |
- Returns
- retcode >= 0: handle, retcode < 0: error code
◆ connectWithRemoteId:token:traceId:lanMode:timeout: [2/2]
+ (int) connectWithRemoteId: |
|
(NSString *) |
remoteId |
token: |
|
(NSString *) |
token |
traceId: |
|
(NSString *) |
traceId |
lanMode: |
|
(int) |
lanMode |
timeout: |
|
(int) |
timeout |
|
|
| |
Description : connect to the device such as camera.
- Parameters
-
remoteId | : the did |
token | : token for p2p connect |
traceId | : traceId for p2p connect |
lanMode | : 0 – not lan mode 1 – lan mode |
timeout | : time out for connect operation. |
- Returns
- retcode >= 0: handle, retcode < 0: error code
◆ deInit [1/2]
Description deinit the p2p module.
◆ deInit [2/2]
Description deinit the p2p module.
◆ deinitLogModule [1/2]
◆ deinitLogModule [2/2]
◆ disConnectForcedWithHandle: [1/2]
+ (int) disConnectForcedWithHandle: |
|
(int) |
handle |
|
◆ disConnectForcedWithHandle: [2/2]
+ (int) disConnectForcedWithHandle: |
|
(int) |
handle |
|
◆ disConnectWithHandle: [1/2]
+ (int) disConnectWithHandle: |
|
(int) |
handle |
|
Description : disconnect with the device
- Parameters
-
handle | : handle .The return value of connect operation. |
◆ disConnectWithHandle: [2/2]
+ (int) disConnectWithHandle: |
|
(int) |
handle |
|
Description : disconnect with the device
- Parameters
-
handle | : handle .The return value of connect operation. |
◆ freeSessionListWithSessionList: [1/2]
+ (void) freeSessionListWithSessionList: |
|
(char *) |
session_list |
|
◆ freeSessionListWithSessionList: [2/2]
+ (void) freeSessionListWithSessionList: |
|
(char *) |
session_list |
|
◆ getSessionList [1/2]
+ (char *) getSessionList |
|
|
|
◆ getSessionList [2/2]
+ (char *) getSessionList |
|
|
|
◆ getVersion [1/2]
Description get the p2p version.
◆ getVersion [2/2]
Description get the p2p version.
◆ initLoggerWithApmLogSender:nativeLogSender:fullLinkLogSender: [1/2]
◆ initLoggerWithApmLogSender:nativeLogSender:fullLinkLogSender: [2/2]
◆ initWithLocalId:mqttSendBlock:httpsRequest: [1/2]
Description init the p2p module.
- Parameters
-
localId | : The local Id |
mqttSender | : |
◆ initWithLocalId:mqttSendBlock:httpsRequest: [2/2]
Description init the p2p module.
- Parameters
-
localId | : The local Id |
mqttSender | : |
◆ initWithLocalId:mqttSendBlock:httpsRequest:sessionStateCB: [1/2]
◆ initWithLocalId:mqttSendBlock:httpsRequest:sessionStateCB: [2/2]
◆ recvWithHandle:channel:buffer:bufferLen:timeOut: [1/2]
+ (int) recvWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
buffer: |
|
(unsigned char *) |
buffer |
bufferLen: |
|
(int) |
bufferLen |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : read data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
buffer | : buffer pointer |
bufferLen | : len of buffer |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新读取操作。其他错误表示session已经断开 >= 0 实际读到的数据长度
◆ recvWithHandle:channel:buffer:bufferLen:timeOut: [2/2]
+ (int) recvWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
buffer: |
|
(unsigned char *) |
buffer |
bufferLen: |
|
(int) |
bufferLen |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : read data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
buffer | : buffer pointer |
bufferLen | : len of buffer |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新读取操作。其他错误表示session已经断开 >= 0 实际读到的数据长度
◆ sendAuthorizationInfoWithHandle:channel:requestId:username:password:timeOut: [1/2]
+ (int) sendAuthorizationInfoWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
requestId: |
|
(int) |
requestid |
username: |
|
(NSString *) |
username |
password: |
|
(NSString *) |
password |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : send data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
requestid | :requestid |
username | : username |
password | : password |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新发送操作。其他错误表示session已经断开 >= 0 发送成功的数据长度
◆ sendAuthorizationInfoWithHandle:channel:requestId:username:password:timeOut: [2/2]
+ (int) sendAuthorizationInfoWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
requestId: |
|
(int) |
requestid |
username: |
|
(NSString *) |
username |
password: |
|
(NSString *) |
password |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : send data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
requestid | :requestid |
username | : username |
password | : password |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新发送操作。其他错误表示session已经断开 >= 0 发送成功的数据长度
◆ sendWithHandle:channel:buffer:bufferLen:timeOut: [1/2]
+ (int) sendWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
buffer: |
|
(unsigned char *) |
buffer |
bufferLen: |
|
(int) |
bufferLen |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : send data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
buffer | : buffer pointer |
bufferLen | : len of buffer |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新发送操作。其他错误表示session已经断开 >= 0 发送成功的数据长度
◆ sendWithHandle:channel:buffer:bufferLen:timeOut: [2/2]
+ (int) sendWithHandle: |
|
(int) |
handle |
channel: |
|
(int) |
channel |
buffer: |
|
(unsigned char *) |
buffer |
bufferLen: |
|
(int) |
bufferLen |
timeOut: |
|
(int) |
timeOut |
|
|
| |
Description : send data from p2p channel.
- Parameters
-
handle | : handle .The return value of connect operation. |
channel | : the p2p channel |
buffer | : buffer pointer |
bufferLen | : len of buffer |
timeOut | : timeout in ms |
- Returns
- < 0 错误发生 返回TUYA_P2P_ERROR_TIME_OUT(-3)表示超时,上层可以做重新发送操作。其他错误表示session已经断开 >= 0 发送成功的数据长度
◆ setHttpsResponseWithApi:code:content: [1/2]
+ (int) setHttpsResponseWithApi: |
|
(const char *) |
api |
code: |
|
(int) |
code |
content: |
|
(const char *) |
content |
|
|
| |
Description : check the p2p active or not
- Parameters
-
◆ setHttpsResponseWithApi:code:content: [2/2]
+ (int) setHttpsResponseWithApi: |
|
(const char *) |
api |
code: |
|
(int) |
code |
content: |
|
(const char *) |
content |
|
|
| |
Description : check the p2p active or not
- Parameters
-
◆ setRemoteOnlineWithHandle: [1/2]
+ (int) setRemoteOnlineWithHandle: |
|
(const char *) |
remoteId |
|
Description : ?
- Parameters
-
◆ setRemoteOnlineWithHandle: [2/2]
+ (int) setRemoteOnlineWithHandle: |
|
(const char *) |
remoteId |
|
Description : ?
- Parameters
-
◆ setSignalingSendResultWithRemoteId:msg:msgLen:code: [1/2]
+ (int) setSignalingSendResultWithRemoteId: |
|
(const char *) |
remoteId |
msg: |
|
(const char *) |
msg |
msgLen: |
|
(int) |
msgLen |
code: |
|
(int) |
code |
|
|
| |
Description : set the p2p signaling msg
- Parameters
-
remoteId | : remoteId |
msg | : p2p signaling msg |
msgLen | : msg length |
◆ setSignalingSendResultWithRemoteId:msg:msgLen:code: [2/2]
+ (int) setSignalingSendResultWithRemoteId: |
|
(const char *) |
remoteId |
msg: |
|
(const char *) |
msg |
msgLen: |
|
(int) |
msgLen |
code: |
|
(int) |
code |
|
|
| |
Description : set the p2p signaling msg
- Parameters
-
remoteId | : remoteId |
msg | : p2p signaling msg |
msgLen | : msg length |
◆ setSignalingWithMsg:msgLen: [1/2]
+ (int) setSignalingWithMsg: |
|
(const char *) |
msg |
msgLen: |
|
(int) |
msgLen |
|
|
| |
Description : set the p2p signaling msg
- Parameters
-
msg | : p2p signaling msg |
msgLen | : msg length |
◆ setSignalingWithMsg:msgLen: [2/2]
+ (int) setSignalingWithMsg: |
|
(const char *) |
msg |
msgLen: |
|
(int) |
msgLen |
|
|
| |
Description : set the p2p signaling msg
- Parameters
-
msg | : p2p signaling msg |
msgLen | : msg length |
◆ startPreConnectWithRemoteId:dev_id: [1/2]
+ (int) startPreConnectWithRemoteId: |
|
(char *) |
remote_id |
dev_id: |
|
(char *) |
dev_id |
|
|
| |
◆ startPreConnectWithRemoteId:dev_id: [2/2]
+ (int) startPreConnectWithRemoteId: |
|
(char *) |
remote_id |
dev_id: |
|
(char *) |
dev_id |
|
|
| |
◆ uploadLogWithLevel:log: [1/2]
Description: upload the log through p2p interface online.
◆ uploadLogWithLevel:log: [2/2]
Description: upload the log through p2p interface online.
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingP2PSDK/Build/ThingP2PSDK.xcframework/ios-x86_64-simulator/ThingP2PSDK.framework/Headers/ThingP2PSdk.h
- /Users/humtong/Downloads/Pods_副本/ThingP2PSDK/Build/ThingP2PSDK.xcframework/ios-arm64/ThingP2PSDK.framework/Headers/ThingP2PSdk.h