|
@@ -343,6 +343,21 @@
|
|
|
|
|
|
}
|
|
|
|
|
|
+#pragma mark 删除代理确认收到的消息
|
|
|
+-(void)deleteCommandSendTaskFunWith:(NSString*)type
|
|
|
+{
|
|
|
+ if(commandSendCheckArr && commandSendCheckArr.count >0){
|
|
|
+
|
|
|
+ NSArray *taskArr = [NSArray arrayWithArray:commandSendCheckArr];
|
|
|
+
|
|
|
+ for (commandSendCheckModel *model in taskArr) {
|
|
|
+ if([type isEqualToString:model.type]){
|
|
|
+ [commandSendCheckArr removeObject:model];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
#pragma mark 复制手机消息到云机
|
|
|
- (void)updateCopydata{
|
|
|
UIPasteboard* pasteboard = [UIPasteboard generalPasteboard];
|
|
@@ -483,6 +498,64 @@
|
|
|
[self send_data:commandStr];
|
|
|
}
|
|
|
|
|
|
+#pragma mark 创建文件夹回调
|
|
|
+- (void)createFolderResponseFun:(NSDictionary *)dataDict
|
|
|
+{
|
|
|
+ couldPhoneCommonModel *model = [[couldPhoneCommonModel alloc] initWithDictionary:dataDict error:nil];
|
|
|
+
|
|
|
+ if(model){
|
|
|
+ NSNumber *curNum = [NSNumber numberWithInteger:model.status];
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:createFolderDoneNotification object:curNum];/*发送通知*/
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+- (void)getFolderListResponseFun:(NSDictionary *)dataDict
|
|
|
+{
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:getFolderListDoneNotification object:dataDict];/*发送通知*/
|
|
|
+}
|
|
|
+
|
|
|
+- (void)searchFileListResponseFun:(NSDictionary *)dataDict
|
|
|
+{
|
|
|
+ [[NSNotificationCenter defaultCenter] postNotificationName:searchFileListDoneNotification object:dataDict];/*发送通知*/
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark U盘插入相关
|
|
|
+- (void)getExtraMediaEventResponseFun:(NSDictionary *)dataDict
|
|
|
+{
|
|
|
+
|
|
|
+ mainBlock((^{
|
|
|
+ extraMediaEventModel *model = [[extraMediaEventModel alloc] initWithDictionary:dataDict error:nil];
|
|
|
+
|
|
|
+ NSString *tip = nil;
|
|
|
+ if(model.data.event == 0){
|
|
|
+ tip = NSLocalizedString(@"disk_insertion_tip",nil);
|
|
|
+ [self showInsertPopViewFun:model.data.name];
|
|
|
+ }
|
|
|
+ else if(model.data.event == 1){
|
|
|
+ tip = NSLocalizedString(@"disk_extract_tip",nil);
|
|
|
+ }
|
|
|
+ else if(model.data.event == 2){
|
|
|
+ tip = NSLocalizedString(@"disk_save_extract_tip",nil);
|
|
|
+ }
|
|
|
+
|
|
|
+ NSString *totalTips = [[NSString alloc] initWithFormat:@"%@%@",model.data.name,tip];
|
|
|
+
|
|
|
+ [[iToast makeText:totalTips] show];
|
|
|
+ }));
|
|
|
+}
|
|
|
+
|
|
|
+#pragma mark 显示插入UI弹框
|
|
|
+- (void)showInsertPopViewFun:(NSString*)name
|
|
|
+{
|
|
|
+ if(self->curUSBInsertPopV){
|
|
|
+ [self->curUSBInsertPopV removeFromSuperview];
|
|
|
+ self->curUSBInsertPopV = nil;
|
|
|
+ }
|
|
|
+
|
|
|
+ self->curUSBInsertPopV = [[USBInsertPopView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_W, SCREEN_H) withName:name];
|
|
|
+
|
|
|
+ [[iTools getKeyWindow] addSubview:self->curUSBInsertPopV];
|
|
|
+}
|
|
|
|
|
|
|
|
|
#pragma mark 收到的webrtc消息处理
|
|
@@ -702,26 +775,26 @@
|
|
|
else if ([messageType isEqualToString:@"reboot"]){/*重启*/
|
|
|
//[weakSelf stopForceStartTimerFun];
|
|
|
}
|
|
|
-// else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
|
|
|
-// [weakSelf createFolderResponseFun:dataDict];
|
|
|
-// }
|
|
|
-// else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
|
|
|
-// [weakSelf getFolderListResponseFun:dataDict];
|
|
|
-// }
|
|
|
-// else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
|
|
|
-// [weakSelf searchFileListResponseFun:dataDict];
|
|
|
-// }
|
|
|
+ else if ([messageType isEqualToString:@"mkdir"]){/*创建文件夹*/
|
|
|
+ [self createFolderResponseFun:dataDict];
|
|
|
+ }
|
|
|
+ else if ([messageType isEqualToString:@"getBackupPath"]){/*创建文件夹*/
|
|
|
+ [self getFolderListResponseFun:dataDict];
|
|
|
+ }
|
|
|
+ else if ([messageType isEqualToString:@"search"]){/*创建文件夹*/
|
|
|
+ [self searchFileListResponseFun:dataDict];
|
|
|
+ }
|
|
|
else if ([messageType isEqualToString:@"getExtraFiles"]){/*获取云机产品信息*/
|
|
|
[self getExtraFilesResponseFun:dataDict];
|
|
|
}
|
|
|
-// else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
|
|
|
-// [weakSelf getExtraMediaEventResponseFun:dataDict];
|
|
|
-// [weakSelf getExtraFilesListFun];
|
|
|
-// }
|
|
|
-// else if ([messageType isEqualToString:@"reset"]){/**/
|
|
|
-// [weakSelf deleteCommandSendTaskFunWith:@"reset"];
|
|
|
-// }
|
|
|
-//
|
|
|
+ else if ([messageType isEqualToString:@"extraMediaEvent"]){/*磁盘插拔*/
|
|
|
+ [self getExtraMediaEventResponseFun:dataDict];
|
|
|
+ [self getExtraFilesListFun];
|
|
|
+ }
|
|
|
+ else if ([messageType isEqualToString:@"reset"]){/**/
|
|
|
+ [self deleteCommandSendTaskFunWith:@"reset"];
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
|
|
|
#pragma mark WebRTC 回调 MediaStreamClientEventsDelegate
|