欢迎来到课桌文档! | 帮助中心 课桌文档-建筑工程资料库
课桌文档
全部分类
  • 党建之窗>
  • 感悟体会>
  • 百家争鸣>
  • 教育整顿>
  • 文笔提升>
  • 热门分类>
  • 计划总结>
  • 致辞演讲>
  • 在线阅读>
  • ImageVerifierCode 换一换
    首页 课桌文档 > 资源分类 > DOCX文档下载  

    SDEASYCAM 手机APP软件 后30页代码.docx

    • 资源ID:273228       资源大小:69.54KB        全文页数:31页
    • 资源格式: DOCX        下载积分:5金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要5金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP免费专享
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    SDEASYCAM 手机APP软件 后30页代码.docx

    #pragmamark-保存设置-(void)save:(id)sender(NSIntegerstart,end;startSWeekIndex*49+SHourIndex*2+SMinuteIndex;end=eWeekindex'49+eHorlnde×*2+eMintelnde×if(end>start)for(NSIntegeri=start:i<end:i+)(if(i-48Hi97Ui-146i»195i-244i293i-342)continue;)planTime(i='P'doubledelaylnSends=0.15;dispalch_lime_tpopTime-dispatch_time(DISPATCH_TIME_NOW,(int64j)(delaylnSeconds,NSEC_PER_SEC);dispatch-after(popTime1dispatch_get_main_queue(),ft(void)SMsgAVItrlSetScheduleReq*s2-malloc(sizeof(SMsgAVIoctrlSetScheduleReq);memset(s21O1Sizeof(SMsgAvioctrISetScheduIeReq):memcpy(s2->sDayData,planTime,sizeof(plaTime);s2->u32SchedulType=AVIOTCSCHEDULETYPEALARM;self.camerasendlOClrlToChannel:0Type:IOTYPE_USER_IPCAM_SET_SCHEDULE_REQData:(Char*)s2Dalasizersizeof(SMsgAvioctrISetScheduIeReq);free(s2);!);eseif(sWeeklndex=6&&eWeeklndex=0&&eHourlndex=0&&eMinutelndex=0)(end=342:for(NSIntegeri=start;i<end;i+)(if(i-48Hi-97i-146i»195i-244i»293i-342)continue;)plaTimel,P'doubledaylnSends=0.15;dispatchjime_tpopTime=dispatch_time(DISPATCH_TIME_NOW,(int64-t)(delaylnSends'NSEC_PER_SEC);dispatch_af(er(popTime,dispatch_get_main_queue(),ft(void)SMSgAVloCmSetSChedUIeReq*s2=malloc(sizeof(SMsgAVIoctrlSetScheduleReq);memset(s2,O1Sizeof(SMsgAvioctrtSetScheduIeReq);memcpy(s2->sDayData,planTime,sizeof(planTime);s2->u32ScheduleType=AVIOTC_SCHEDULETYPE_ALARM;self.camerasendlOCtrlToChannel:0Type:IOTYPE_USER_IPCAM_SET_SCHEDULE_REQData:(char*)s2Datasizersizeof(SMsgAvioctrISetScheduIeReq);free(s2);!);elseif(sWeeklndex=0&&sHourlndex=0&&sMinutelndex=0&&eWeeklndex=0&&eHourlndex=0&&eMinutelndex=0)(else(MBProgressHUDshowError:(NSStringstringWithFormat:NSLocalizedString("Error,Plstrysettingtimeagain!",return;/saveandIoadup/sendCMDSMsgAvioctrISetGuardReqEn*s1=malloc(sizeof(SMsgAVItrlSetGuardReqEn);memset(s1,O,sizeof(SMsgAVItrlSetGuardReqEn);s1->chanel=O;/memcpy(s1->ftpServer1sServerUTF8String,(sServerlength);Hmemcpy(s1->userName,sAccountUTF8String,sAccountlength);Hmemcpy(sl->password,sPasswdUTF8Strig,sPasswdlength);Hs1->ftpPort=(int)nPort;s1->alarm_motion_armed=self.isMotioSwitch;s1->alarm_motion_sensitivityself.motionDetection:sl->alarm_preset=self.alarmPresetValue;(Self-CamerasendlOCtrIToChannekOType:IOTYPE_USER_IPCAM_SETGUARD_REQData:(char*)s1Datasizersizeof(SMsgAvioctrISetGuardReqEn);free(s1):Z/2savevideotoSDCardSMsgAvioctrISetAlarmLinkageReqs2=mall。C(SiZeOf(SMSgAVIoCmSetAIarmLinkageReq);memset(s2,O,Sizeof(SMsgAvioctrISetAIarmLinkageReq);s2->channel=O;s2->VidToSDCard(inl)self.isSaveVideoToSD;Self-CamerasendIOCtriToChannekOType:IOTYPE_USER_IPCAM_SET_ALARM_LINKAGE_REQData:(char)s2Datasizeisizeof(SMsgAvioctrISetAlarmLinkageReq);free(s2);/quit(self.navigationControllerpopViewControllerAnimatedYES;)#pragmamark-sensiSpresetDelegate-(Vold)ClidSeleCtsenSitiVityValUe:(NSlnteger)VaIUe(self.motionDetection=value;SeIf-IabIeViewreIoadData;-(void)didSelectPresetValue:(NSInteger)valueself.alarmPreselValuevalue;SeIf-IabIeViewreIoadData;#pragmamark-MyCameraDeIegateMethods-(VOid)Camera:(MyCamera)Camera_didReceivelOClrlWithType:(NSIntec)er)typeData:(COnSlehar*)dataDataSiZe:(NSlntegerjSiZeif(camera.=self.camera&&type=IOTYPE_USER_IPCAM_GETGUARD_RESP)1057SMsgAvioctrIGetGuardRespEn*s=(SMSgAVioetriGetGUardReSPEn")data;SelfjsMotionSwitchs->alarm_motion_armed;self.motionDetection=s->aarmmotionsensitivity;NSLog(">%ld",(Iong)SeILmotionDetection);self.alarmPresetValues->alarm_PreSel;SelfjabeIHinLhiddenMYES;(Self-SenderIndicatorstopAnimating;self.navigationltem.righiBarButtonltem.enabledlself.senderlndicator.isAnimating;SetfAabIeViewreIoadData;elseif(camera,=self.camera&&type=IOTYPEUSERIPCAMGETMOTIONDETECTRESP)(SMsgAvioctrIGetMotionDetectResp's=(SMsgAVIoctrtGtMotionDtectRsp*)clata;self.motionDetection=s->sensitivity;SetfJabIeViewreIoadData;Jelseif(camera.=self.camera&&type=IOTYPE_USER_IPCAM_SET_ALARM_LINKAGE_RESP)SMsgAvioctrISetAIarmLinkageResp*s=(SMSgAVlOCtrlSetAIarmLinkageReSP"data;if(s->32Resut=O)(NSLog(”设pic&video保存到ftp成功!!");SeIf-IabIeViewreIoadData;elseif(camera_=sclf.camera&&type=IOTYPEUSERIPCAMGETALARMLINKAGERESP)/SMsgAvioctrIGetAIarmLinkageResp(1057SMSgAVloCmGetAIarmLinkageReSP*s=(SMsgAVIoctrIGetAIarmLinkageResp*)data;SelfjsSaveVideoToSDs>vidToSDCard;self.tableViewreIoadData;#pragmamark-UipickerViewDataSoure-(NSInteger)numberOfComponentslnPickerView:(UIPickerView,)pickerViewif(pickerType=WEEK_PICKER_VIEW)return1;elseif(pickerType=HM_PICKER_VIEW)(return2;retur1;)-(NSInteger)PiCkeMeW:(UIPiCkerVieW*)pickerViewnumberOfRowslnComponentr(NSInteger)mponent(if(pickerType=WEEK_PICKER_VIEW)(returnweekArr.count;elseif(pickerType=HM_PICKERVIEW)(if(component-0)retumhourArr.count;)else(retumminuteArr.count;return;)#Pragmamark-UIPickerViewDeIegate-(nullableNSString")PiCkerVieWXUlPiCkerVieW,)pickerViewtitleForRow:(NSInteger)rowforComponent:(NSlnteger)component(if(pickerType“WEEK_PICKER_VIEW)returnweekArrobjectAtlndex:row;elseif(pickerType=HM_PICKER_VIEW)(if(component=0)returnIhourArrobjectAtIndex:row:Jelseif(component=1)(returnminuteArrobjectAtlndex:row;)return"test")-(void)pickerView:(UIPickerView)pickerViewdidSelectRow:(NSInteger)rowinComponent:(NSlnteger)ComPonent(if(pickerType=WEEK_PICKER_VIEW)if(WhitchBtn=100)(SWeekIndex-row;eseif(whitchBtn=101)eWeekindexrow;Jelseif(pickerType=HMPICKERVIEW)(if(component0)(if(whitchBtn=200)(SHourIndex=row;)elseif(whitchBtn=201)(eHourindex=row;)elseif(component=1)(if(whitchBtn=200)(SMinuteIndex>row;eseif(whitchBtn=201)(eMinuteindexrow;)I#import<IOTCameraAVIOCTRLDEFs.h>#import"AboutDeviceController.h"#import,MBProgressHUD.h"implementationAboutDeviceControIIer©synthesizecamera:©synthesizelabelItems;SyntheSiZemodel;©synthesizeversion;©synthesizevender;SyntheSiZetotalSize;©synthesizeIreeSize;©synthesizemodellndicator;SyntheSiZeversionindicator;©synthesizeVenelerIndiCator;(synthesizetotallndicator;SyntheSiZefreelndicator; (IBAction)back:(id)sender(self.navigationControllerpopViewControllerAnimaied:YES;) Pragmamark-Viewlifecycle (Void)ViewDidLoad(SuperviewDidLoad):labelitems=NSArrayaIIocinitWithObjects:NSLoCaliZedString("FreeSize",NSLoCaIiZedString(”Tota1Size",NSLocalizedString("FormatSD",(§>""),nil;UIButton,customButton=(UIButtonbuttonWithType:UIButtonTypeCustom;CustomButton.frame-CGRectMake(O,0,44,44);CustomButtonsetBackgroundlmage:UllmageimageNamed:"cam_back"forState:UIControlStateNormal;(CustomButtonsetBackgroundlmage:(UllmageimageNamed:"cam_back_clicked'forState:UIControlStateHighlighted;CustomButtonaddTarget:selfaction:selector(back:)forControlEvents:UIControlEventTouchUplnside;UlBarButtonItem*backBtton=UlBarButtonItemaIIocinitWithCustomView:customButton;UIBarButtonItem*negativeSpacer=(UlBarButtonItemaIIocinitWithBarButtonSystemltem:UIBarButtonSystemltemFixedSpacetarget:nilaction:nil;negativeSpacer.width=-16;self.navigationltem.IeftBarButtonItems=NSArrayarrayWithObjects:negativeSpacer,backButton,nil;backButtonrelease);InegaliveSpacerrelease;self.navigationltem.tit=NSLOCaliZedString(-FOrmatSD",self.modelIndicator=UlActivitylndicatorViewaIIocinitWithActivitylndicatorStyle:UIActivitylndicatorViewStyleGrayautorelease:Self.Versionlndicator=(UIActivityIndicatorViewallinitWithActivitylndicatorstyleruiActivitylndicatorViewStyIeGrayautorelease;SeILvenderIndicator=(UlActivitylndicatorViewaIIocinitWithActivitylndicatorStyle:UIActivrtylndicatorViewStyleGrayautorelease;self.totallndicator-UlActivitylndicatorViewaIIocInitwithActivitylndicatorstyleiuiActivitylndicatorViewStyIeGrayautorelease;SeIfJreeIndicator=UIActivitylndicatorViewaIIocInitWithActivityIndicatorStyle:UIActivityIdicatorViewStyIeGrayautorelease; (void)viewDidUnloadself.modellndicator=nil;Self-Versionlndicator=nil;seif.venderindicator=nil;Selttotallndicator-nil;Slf.freelndicator=nil;self.modelnil;self.version-1;self.vendernil;self.totalSize-1:SeIfjreeSiZe-1;SeIfJabeIItems=nil;self.camera=nil;SuperviewDidUnload; (void)viewWillAppear:(BOOL)animated(SuperviewWiIIAppearianimated;SeIttotaISize-1;self.freeSize-1;camera.delegate2self;SMsgAvioctrIDevicelnfoReq,s=malloc(sizeof(SMsgAVIoctrlDeviceInfoReq);memset(s,O,Sizeof(SMsgAvioctrIDeviceInfoReq);(CamerasendIOCtrIToChannel:0Type:IOTYPE_USER_IPCAM_DEVINFO_REQData:(char*)sDatasizezsizeof(SMsgAvioctrIDeviceInfoReq);free(s); (void)viewWillDiSaPPear:(BoOL)animated(SuperviewwiIIDisappearianimated;camera.delegate2=nil;# (void)dealloc(modelindicatorrelease:versionIndicatorreease;venderindicatorrelease;totallndcatorrelease;(freelndicatorrelas;(modelrelease;venderrelease:(Iabelltemsrelease;(camerarelease):(Superdealloc;)# Pragmamark-TabIeViewDataSourceMethods# (NSInteger)numberOfSectionslnTableView:(UITableView,)tabeViewreturn1;)-(NSInteger)tableView:(UITableView*)tableViewnumberfRoWSlnSeetion:(NSIntegeljSeCtion(returlabelltems.cont;)-(UlTabIeViewCeII*)tableView:(UITableView*)tableViewCelIForRoWAundeXPath:(NSIndeXPath*)inde×PathNSUIntegerrow=indexPathrow);StaticNSString'AboutDeviceTabIeIdentifier=AboutDeviceTableIdentifier"UlTableViewCeII"cell=(self.tableViewdequeueReusableCellWithldentifier:AboutDeviceTabIeIdentifier;if(cell=nil)cellUlTableviewceIIaIIocinitWithStyle:UITableViewCellStyleValue1reuseldentifier:AboutDeviceTableldentifierautorelease;NSIntegerinde×=row;CeILtextLabeLtext=IabeiltemsobjectAtIndexjrKiex;CelI.SeIectionStyIe=UITableViewCellSelectionStyleNone;if(row=O)if(freeSize<O)celladdSubviewrfreelndicator:freelndicatorstartAnimating;freelndicalor.center-CGPointMake(280,22);)else(freelndicatorstopAnimating);IfreelndiCaIorremoveFromSuperview;)CeILdetaiITextLabeLtext(freeSize>O)?(NSStringstringWithFormati(g>,%ldMB",(log)freeSize:nil;elseif(row=1)if(totalSize<0)celladdSubviwnotallndicator;totalIndicatorstartAnimating:totallndicator.center=CGPointMake(280,22);elsetotalIndicatorstopAnimating;RotaIlndiCaIorremoveFromSuperview;)CeILdetaiITextLabel.te×t=(totalSize>=O)?NSStringstringWithFormat:"%ldMB",(Iong)IotaISize:nil:)returncell:)升pragmamark-Tableviewdelegate-(VOid)tableView:(UlTabIeView*)tableViewdidSelectRowAtlndexPath:(NSIndexPath*)inde×Path(NSIntegerrow=indexPathrow:if(row-2)UIAIertView,alert=UlAlertViewallocinitWithTitle:NSLocaliz©dString("Warmtips","")message:NSLocalizedString("FormatcommandwillERASEalldataofyourSDCard","")delegate:SeIfCanee旧UttOnTntie:NSLoCaliZedString(-Cance,"")OlherBUttOnTities:NSLOCaliZedString(-0K'nil;alertshow;)#Pragmamark-UIAIertViewDeIegate-(Void)alertView:(UIAlertVieW)alertViewClickedButtonAtlndex:(NSInteger)buttonInde×f(buttonindex-1)if(camera!»nil)(SMsgAVltrlFormatExtStorageReq*smalloc(sizeof(SMsgAVIoctrlFormatExtStorageReq);memset(s,O,Sizeof(SMsgAvioctrIFormatExtStorageReq);s->storage=O;CamerasendlOCtrIToChannekOType:IOTYPE_USER_IPCAM_FORMATEXTSTORAGE_REQData:(Char,)sDatasizeisizeof(SMsgAvioctrIFormatExtStorageReq);freefs);)- Pragmamark-CameraDeIegateMethods- (VOId)Camera:(MyCamera*)camera_CIidReCeiVelOCtrIWithTyPe:(NSlntegeIjtyPeData:(COnStehar*)dataDataSiZe:(NSlnlegerjSiZeif(camera,=camera&&type=IOTYPEUSERJPCAMDEVINFORESP)SMsgAvioctrlDeviceInfoResp*strctDevlnfo=(SMsgAVIoctrIDevicelnfoResp*)data:self,totalSize=structDevlnfo->total;self.freeSize=StructDevInfo->free;self.tableViewreloadData;elseif(camera-.Camera&&type»IOTYPE_USER_IPCAM_FORMATEXTSTORAGE_RESP)SMsgAvioctrlFormatExtStorageResp*s=(SMsgAvioctrlFormatExtStorageResp,)data;if(s->resut=O)(MBProgressHUD*hud=MBProgressHUDshowHUDAddedTo:self.viewanimated:YES);hd.mode=MBProgressHUDModeText;hud.labelText=NSLocalizedString('Formatcompleted.",hud.removeFromSuperViewOnHide=YES;hudhide:YESafterDelay:2;else(MBProgressHUD*hud=MBProgressHUDshowHUDAddedTo:self.viewanimated:YES;hud.mod=MBProgrssHUDModeText;hud.labelText=NSLocalizedString(*Formatfailed.",hud.remOVeFromSUPerVieWonHide=YES;hudhide:YESafterDeIay:2);)- (void)CheckTimeoutif(truebDoWaiting)UITabIeViewCeircell=self.tableViewcellForRowAtlndexPath:(NSIndexPathindexPathForRow:OinSection:0);UlActivityIndicatorView*waitView(UIActivityIndicatorView*)cellVieWWiIhTag:77;if(waitView)waitViewStopAnimating;waitViewremoveFromSuperview;UIAIertView,alert=(UlAlertViewaIIocinrtWithTitle:nilmessage:(NSStringstringWithFormat:NSLocalizedString("lrK»rrectpasswordfor%”,ssiddelegatemilcanCelBUttonTitle:NSLoCaHZedStringCloSe-,"")OtherButtonTitIesinil;alertshow:alertrelease;)- (IBAction)joinz(id)seder(NSString,password=nil;bDoWaiting.FALSE;if(IextFieIdBeingEdited!=nil)passwordIexlFieIdBeingEdited.Iext;f(password!=nil&&passwordlength>0)f(passwordlength<=30)SMsgAvioctrISetWifiReq,s=malloc(sizeof(SMsgAVIoctrISetWifiReq);memcpy(s->ssid,(ssidUTF8Slring,32);memcpy(s->password,passwordUTF8String132);s->enctype=enctype;s->modemode;(CamerasendioctrlTochannelX)TypeiIOTYPEUSERIPCAMSETWIFIREQData:(char*)sDatasizersizeof(SMsgAvioctrISetWifiReq);free(s);bDoWaiting=TRUE;(SeIfPerformSel©ctor:SeIeCtor(CheCkTimeOUt)WithobjeCtnlafterDelay:30;)else(UIAlertView*alert=(UlAlertViewaIIocinitWithTitle:nilmessage:NSLocalizedString("Thepasswordismorethan30characters",delegate:nilcancelButtonTitle:NSLocalizedString("Close","")OtherBUttOnTiUesmil;alertshow;alertrelease;elseUIAIertView,aert=(UlAlertViewaIIocinitWithTitle:nilmessage:(NSStringstringWithFonnat:NSLocaliz©dString("Pleaseenterpassword",delegate:nilcancelButtonTitle:NSLocalizedString("Close",OtherButtonTitIeszniI;alertshow:alertrelease;if(bDoWaitig)UITableViewCeircell=self.tableViewcellForRowAtlndexPath:NSIndexPathindexPathForRow:OinSection:0;UlActivilyIfXjicatorView*indicatorUIActivityIndicatorViewallocinilWithActivitylndicatorSty1e:UIActivitylndicatorViewStyleGray;/indicator.center=CGPointMake(SeILtextFieIdBeingEditedJrameQrigimx-20,self.textFieldBeingEdited.frame.origin.y+(self.texlFieldBeingEdited.frame.size.height/2);indicator.center=CGPointMake(260,22);indicator.lag-77;celladdSubviewdndicator;indicatorStartAnimating;(indicatorrelease;)-(IBAction)CanceIi(Id)Sender(self.navigationControllerpopViewControllerAnimatedYE

    注意事项

    本文(SDEASYCAM 手机APP软件 后30页代码.docx)为本站会员(夺命阿水)主动上传,课桌文档仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知课桌文档(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    备案号:宁ICP备20000045号-1

    经营许可证:宁B2-20210002

    宁公网安备 64010402000986号

    课桌文档
    收起
    展开