|
|
@@ -40,6 +40,12 @@
|
|
|
return self;
|
|
|
}
|
|
|
|
|
|
+#pragma mark 关闭链接
|
|
|
+- (void)closeLinkWebRtcFun
|
|
|
+{
|
|
|
+ [_mediaStream disconnect];
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 开始链接
|
|
|
- (void)beginToLinkWebRtcFun
|
|
|
{
|
|
|
@@ -410,6 +416,54 @@
|
|
|
// }
|
|
|
}
|
|
|
|
|
|
+#pragma mark 重启云机
|
|
|
+- (void)needToRebootFun
|
|
|
+{
|
|
|
+ NSString *commondStr = @"{\"type\":\"reboot\"}";
|
|
|
+ [self send_data:commondStr];
|
|
|
+
|
|
|
+ //添加到任务监听
|
|
|
+ [self addCommandSendTaskFunWithType:@"reboot" WithCommandStr:commondStr];
|
|
|
+
|
|
|
+ //数据埋点
|
|
|
+ [[netWorkManager shareInstance] DataEmbeddingPointBy:3 withEventValue:@"Cloud_restart"];
|
|
|
+
|
|
|
+ _isRebootIngType = YES;
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 恢复出厂设置
|
|
|
+- (void)needToResetFun
|
|
|
+{
|
|
|
+ NSString *commondStr = @"{\"type\":\"reset\"}";
|
|
|
+ [self send_data:commondStr];
|
|
|
+
|
|
|
+ //添加到任务监听
|
|
|
+ [self addCommandSendTaskFunWithType:@"reset" WithCommandStr:commondStr];
|
|
|
+
|
|
|
+ //数据埋点
|
|
|
+ [[netWorkManager shareInstance] DataEmbeddingPointBy:3 withEventValue:@"Cloud_restore_factory"];
|
|
|
+ _isResetingType = YES;
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 创建备份文件夹
|
|
|
+- (void)createBackupsFolderBy:(NSString*)backupsDefaultPath
|
|
|
+{
|
|
|
+ NSString *folderName = backupsDefaultPath;
|
|
|
+
|
|
|
+ if(folderName && folderName.length >0){
|
|
|
+ NSString * commandStr = [RCCommandHelp applyForCreateFolderwithFolderName:folderName];
|
|
|
+ [self send_data:commandStr];
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 获取备份文件夹列表
|
|
|
+- (void)getBackupFolderListFun
|
|
|
+{
|
|
|
+ NSString * commandStr = [RCCommandHelp getCreateFolderList];
|
|
|
+ [self send_data:commandStr];
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
|
|
|
#pragma mark 收到的webrtc消息处理
|
|
|
- (void)handleWebRtcMsgResponseBy:(NSData*)message
|
|
|
@@ -625,9 +679,9 @@
|
|
|
// [weakSelf getTvStatusFun];
|
|
|
// });
|
|
|
// }
|
|
|
-// else if ([messageType isEqualToString:@"reboot"]){/*重启*/
|
|
|
-// //[weakSelf stopForceStartTimerFun];
|
|
|
-// }
|
|
|
+ else if ([messageType isEqualToString:@"reboot"]){/*重启*/
|
|
|
+ //[weakSelf stopForceStartTimerFun];
|
|
|
+ }
|
|
|
// else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
|
|
|
// [weakSelf createFolderResponseFun:dataDict];
|
|
|
// }
|
|
|
@@ -685,6 +739,7 @@
|
|
|
#pragma mark 通道连接状态变化监听
|
|
|
- (void)dataChannelDidChangeFromPeerName:(NSString*)peerName State:(RTCDataChannelState)state
|
|
|
{
|
|
|
+ self.channelState = state;
|
|
|
switch (state) {
|
|
|
case RTCDataChannelStateConnecting:
|
|
|
{
|