开发版本-developer——01 first commit
This commit is contained in:
@@ -18,7 +18,6 @@
|
||||
@property(nonatomic,copy) NSString * isMaster;
|
||||
//是否授权
|
||||
@property(nonatomic,copy) NSString * isActive;
|
||||
|
||||
//摄像头密码写死 全一样 123 md5 加密
|
||||
@property(nonatomic,copy) NSString *cameraPass;
|
||||
//
|
||||
|
||||
+6
-10
@@ -4,26 +4,22 @@
|
||||
//
|
||||
// Created by imac on 16/6/7.
|
||||
// Copyright © 2016年 xiang. All rights reserved.
|
||||
//
|
||||
//摄像头详情页面
|
||||
|
||||
#import <UIKit/UIKit.h>
|
||||
|
||||
#import "P2PClient.h"
|
||||
#import <AVFoundation/AVFoundation.h>
|
||||
|
||||
#import "TouchButton.h"
|
||||
#import "OpenGLView.h"
|
||||
//#import "OpenGLView.h"
|
||||
#import <GWP2P/GWP2P.h>
|
||||
#import "CustomBorderButton.h"
|
||||
#import "CustomView.h"
|
||||
#import "ProgressImageView.h"
|
||||
//#import "MainController.h"
|
||||
//#import "CustomTopBar.h"
|
||||
#import "AppDelegate.h"
|
||||
#define FocalLength_Elongation_btnTag 300
|
||||
#define FocalLength_Shorten_btnTag 301
|
||||
#define FocalLength_Change_sliderTag 302
|
||||
#import "MonitorBootmView.h"
|
||||
//#import "Socketsingleton.h"
|
||||
#import "SongBaoViewController.h"
|
||||
//竖屏
|
||||
#define STOPBTN_TAG 1603227
|
||||
@@ -53,10 +49,10 @@
|
||||
#import "IifshSegmentView.h"
|
||||
|
||||
@interface IfishP2PMonitorController : UIViewController<
|
||||
AVCaptureVideoDataOutputSampleBufferDelegate,UIGestureRecognizerDelegate,TouchButtonDelegate,
|
||||
OpenGLViewDelegate,UIScrollViewDelegate,UIAlertViewDelegate,P2PClientDelegate,MonitorBottomCollcetionSelectDelegate,LxPopViewDelegate,CameraBottomHViewDelegate,IfishSegmentViewDelegate>
|
||||
AVCaptureVideoDataOutputSampleBufferDelegate,UIGestureRecognizerDelegate,TouchButtonDelegate,UIScrollViewDelegate,UIAlertViewDelegate,MonitorBottomCollcetionSelectDelegate,LxPopViewDelegate,CameraBottomHViewDelegate,IfishSegmentViewDelegate>
|
||||
|
||||
@property (nonatomic, strong) OpenGLView *remoteView;
|
||||
//@property (nonatomic, strong) OpenGLView *remoteView;
|
||||
@property (nonatomic, strong) GWP2PVideoPlayer *player;//摄像头页面
|
||||
@property (nonatomic) BOOL isReject;
|
||||
@property (nonatomic) BOOL isFullScreen4B3;
|
||||
@property (nonatomic) BOOL isShowControllerBar;
|
||||
|
||||
+312
-362
File diff suppressed because it is too large
Load Diff
-3
@@ -1331,9 +1331,6 @@
|
||||
}
|
||||
NSString* pwdHead = PASSWORD_HEAD; //密码长度上限为30个字符
|
||||
self.camera.cameraPass = [NSString stringWithFormat:@"%@%@", pwdHead, box.yMsgInputText];
|
||||
//[[FListManager sharedFList] updatee:self.camera];
|
||||
//[[FListManager sharedFList] getDefenceStates];
|
||||
|
||||
if ([box.theTagString isEqualToString:@"Msg_flist_pwd_error"]) {//获取列表文件错误,就重发获取列表的命令
|
||||
[[P2PClient sharedClient] setCurrentLabel:1];
|
||||
[[P2PClient sharedClient] getPlaybackFilesWithId:self.camera.cameraId password:self.camera.cameraPass timeInterval:1];
|
||||
|
||||
+1
-1
@@ -651,7 +651,7 @@
|
||||
}
|
||||
}else if([[P2PClient sharedClient] gwplaybackState]==PLAYBACK_STATE_STOP){
|
||||
_isPause=YES;
|
||||
[[P2PClient sharedClient] sendCommandType:USR_CMD_PLAY_CTL
|
||||
[[P2PClient sharedClient] sendCommandType:USR_CMD_REMOTLY_PLAY_CTL
|
||||
andOption:USR_CMD_OPTION_PLAY];
|
||||
if (!_isSilence) {
|
||||
[self stSilence:NO];
|
||||
|
||||
+6
-9
@@ -12,7 +12,8 @@
|
||||
#import "UDPManager.h"
|
||||
#import "UDManager.h"
|
||||
#import "LoginResult.h"
|
||||
#import "P2PClient.h"
|
||||
//#import "P2PClient.h"
|
||||
#import <GWP2P/GWP2P.h>
|
||||
@interface YooseConnectFirstViewController ()
|
||||
|
||||
@property(nonatomic)BOOL isInitDevice;
|
||||
@@ -62,10 +63,7 @@
|
||||
_isInitDevice = NO;
|
||||
|
||||
// LoginResult *loginResult = [UDManager getLoginInfo];
|
||||
|
||||
// NSString * P2PVerifyCode1 = @"1528438234";
|
||||
// NSString * P2PVerifyCode2 = @"992805759";
|
||||
// NSString *UserID = @"-2144354932";
|
||||
|
||||
UserModel *model=[[DataCenter defaultDtacenter] valueForKey:@"UserLogIn"];
|
||||
NSString *userIDName=[NSString stringWithFormat:@"%d",(int)[model.gwellUserID integerValue]&0x7fffffff];
|
||||
|
||||
@@ -84,9 +82,7 @@
|
||||
[self.view makeToast:@"摄像头P2PVerifyCode2空错误码10003"];
|
||||
return;
|
||||
}
|
||||
|
||||
_isInitDevice = [[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
|
||||
|
||||
_isInitDevice = [[GWP2PClient sharedClient] connectWithAccount:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2 sessionID1:model.sessionID sessionID2:model.sessionID2 customerIDs:nil];
|
||||
}
|
||||
|
||||
- (void)didReceiveMemoryWarning {
|
||||
@@ -185,7 +181,8 @@
|
||||
|
||||
|
||||
[self showTitle:@"" messsage:@" 暂未检测到设备"];
|
||||
self.isInitDevice = [[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
|
||||
// self.isInitDevice = [[P2PClient sharedClient] p2pConnectWithId:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2];
|
||||
self.isInitDevice = [[GWP2PClient sharedClient] connectWithAccount:userIDName codeStr1:model.P2PVerifyCode1 codeStr2:model.P2PVerifyCode2 sessionID1:model.sessionID sessionID2:model.sessionID2 customerIDs:nil];
|
||||
//loginResult.contactId 用户ID号
|
||||
NSLog(@"%@%@%@",userIDName,model.P2PVerifyCode1,model.P2PVerifyCode2);
|
||||
|
||||
|
||||
+3
@@ -20,6 +20,9 @@ enum
|
||||
conectType_qrcode
|
||||
};
|
||||
|
||||
/**
|
||||
添加摄像头详情页面
|
||||
*/
|
||||
@interface YooseeNextConnectViewController : BaseViewController
|
||||
@property (nonatomic,strong) NSString *uuidString;
|
||||
@property (nonatomic,strong) NSString *wifiPwd;
|
||||
|
||||
+1
-4
@@ -31,7 +31,7 @@
|
||||
#import "UDManager.h"
|
||||
#import "LoginResult.h"
|
||||
#import "Utils.h"
|
||||
#import "MD5Manager.h"
|
||||
#import <GWP2P/MD5Manager.h>
|
||||
#import "RightViewController.h"
|
||||
#import "LeftViewController.h"
|
||||
#import "ICSDrawerController.h"
|
||||
@@ -91,11 +91,8 @@ typedef NS_ENUM(NSInteger,lodingViewdissMissStyle) {
|
||||
|
||||
- (void)viewDidLoad {
|
||||
[super viewDidLoad];
|
||||
//[self getWifiLoop];
|
||||
// Do any additional setup after loading the view from its nib.
|
||||
//智能联机
|
||||
_initPwSuc = NO;
|
||||
// [[P2PClient sharedClient] setDelegate:self];
|
||||
self.conectType = conectType_Intelligent;
|
||||
self.addresses = [[NSMutableDictionary alloc] initWithCapacity:1];
|
||||
self.view.backgroundColor = [UIColor whiteColor];
|
||||
|
||||
@@ -30,8 +30,6 @@
|
||||
-(NSInteger)getMessageCount:(NSString*)contactId;
|
||||
-(void)setMessageCountWithId:(NSString*)contactId count:(NSInteger)count;
|
||||
|
||||
-(void)getDefenceStates;
|
||||
|
||||
-(void)setIsClickDefenceStateBtnWithId:(NSString*)contactId isClick:(BOOL)isClick;
|
||||
-(BOOL)getIsClickDefenceStateBtn:(NSString*)contactId;
|
||||
@end
|
||||
|
||||
+1
-14
@@ -11,7 +11,7 @@
|
||||
#import "ContactDAO.h"
|
||||
#import "Constants.h"
|
||||
#import "UDManager.h"
|
||||
#import "P2PClient.h"
|
||||
#import <GWP2P/GWP2P.h>
|
||||
#import "ShakeManager.h"
|
||||
#import "LocalDevice.h"
|
||||
#import "AppDelegate.h"
|
||||
@@ -234,17 +234,4 @@
|
||||
oldContact = contact;
|
||||
}
|
||||
|
||||
|
||||
|
||||
-(void)getDefenceStates{
|
||||
NSArray *array = [self getContacts];
|
||||
for(Contact *contact in array){
|
||||
if(contact.contactType==CONTACT_TYPE_NPC||
|
||||
contact.contactType==CONTACT_TYPE_IPC||
|
||||
contact.contactType==CONTACT_TYPE_DOORBELL){
|
||||
[[P2PClient sharedClient] getDefenceState:contact.contactId password:contact.contactPassword];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
+12
-16
@@ -14,8 +14,7 @@
|
||||
#import <OpenGLES/ES2/glext.h>
|
||||
#import "Constants.h"
|
||||
#import "Utils.h"
|
||||
#import "P2PClient.h"
|
||||
|
||||
#import <GWP2P/GWP2P.h>
|
||||
#import "AppDelegate.h"
|
||||
#import "ShapeRenderNotifyMsg.h"
|
||||
//////////////////////////////////////////////////////////
|
||||
@@ -428,9 +427,9 @@ static GLfloat modelviewProj[16];
|
||||
const char * cVersion = [strSysVersion UTF8String];
|
||||
NSLog(@"系统版本号:%@", strSysVersion);// e.g. @"4.0"
|
||||
|
||||
NSString *contactId = [[P2PClient sharedClient] callId];
|
||||
int callID = [contactId intValue];
|
||||
NSLog(@"callid:%@", contactId);// e.g. @"4.0"
|
||||
// NSString *contactId = [[P2PClient sharedClient] callId];
|
||||
int callID = [[GWP2PClient sharedClient] getDeviceIDInAPMode];
|
||||
// NSLog(@"callid:%@", contactId);// e.g. @"4.0"
|
||||
|
||||
if (self.isFisheyeDevice) {//can delete
|
||||
_shapeWarp.initData(self.bounds.size.width, self.bounds.size.height, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.width, _shapeWarp.SHAPE_CIRCLE, cVersion, callID, uuid, _uniformMatrix,_shapeWarp.FISHEYE_360);
|
||||
@@ -591,13 +590,13 @@ static GLfloat modelviewProj[16];
|
||||
UIImage *image = [[UIImage alloc] initWithCGImage:[self glToUIImage].CGImage];
|
||||
|
||||
NSData *imgData = [NSData dataWithData:UIImagePNGRepresentation(image)];
|
||||
NSString* contactid = [[P2PClient sharedClient] callId];
|
||||
int contactid = [[GWP2PClient sharedClient] getDeviceIDInAPMode];
|
||||
int dwApContactID = [[AppDelegate sharedDefault] dwApContactID];
|
||||
if (dwApContactID != 0)
|
||||
{
|
||||
contactid = [NSString stringWithFormat:@"%d", dwApContactID];
|
||||
contactid = dwApContactID;
|
||||
}
|
||||
[Utils saveHeaderFileWithId:contactid data:imgData];
|
||||
[Utils saveHeaderFileWithId:[NSString stringWithFormat:@"%d",contactid] data:imgData];
|
||||
|
||||
if (dwApContactID != 0)
|
||||
{
|
||||
@@ -1072,13 +1071,13 @@ exit:
|
||||
|
||||
|
||||
NSData *imgData = [NSData dataWithData:UIImagePNGRepresentation(image)];
|
||||
NSString* contactid = [[P2PClient sharedClient] callId];
|
||||
int contactid = [[GWP2PClient sharedClient] getDeviceIDInAPMode];
|
||||
int dwApContactID = [[AppDelegate sharedDefault] dwApContactID];
|
||||
if (dwApContactID != 0)
|
||||
{
|
||||
contactid = [NSString stringWithFormat:@"%d", dwApContactID];
|
||||
contactid = dwApContactID;
|
||||
}
|
||||
[Utils saveHeaderFileWithId:contactid data:imgData];
|
||||
[Utils saveHeaderFileWithId:[NSString stringWithFormat:@"%d",contactid] data:imgData];
|
||||
|
||||
if (dwApContactID != 0)
|
||||
{
|
||||
@@ -1137,12 +1136,9 @@ exit:
|
||||
if (!image) {
|
||||
return;
|
||||
}
|
||||
|
||||
NSData *imgData = [NSData dataWithData:UIImagePNGRepresentation(image)];
|
||||
NSString* contactid = [[P2PClient sharedClient] callId];
|
||||
[Utils saveHeaderFileWithId:contactid data:imgData];
|
||||
|
||||
|
||||
int contactid = [[GWP2PClient sharedClient] getDeviceIDInAPMode];
|
||||
[Utils saveHeaderFileWithId:[NSString stringWithFormat:@"%d",contactid] data:imgData];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
#import <Foundation/Foundation.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <MediaPlayer/MediaPlayer.h>
|
||||
#import "P2PClient.h"
|
||||
|
||||
//#import "P2PClient.h"
|
||||
#import <GWP2P/GWP2P.h>
|
||||
@interface PAIOUnit : NSObject
|
||||
|
||||
@property (nonatomic, assign) BOOL isRunning;
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
#import "PAIOUnit.h"
|
||||
#import <AudioUnit/AudioUnit.h>
|
||||
#import "AppDelegate.h"
|
||||
|
||||
#import "P2PCInterface.h"
|
||||
//什么含义
|
||||
#define kOutputBus 0
|
||||
#define kInputBus 1
|
||||
@@ -122,7 +122,8 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
AudioBufferList *ioData)
|
||||
{
|
||||
BOOL isGetAudioOk = NO;
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
// if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
if ([[GWP2PClient sharedClient] linkStatus] == P2PLinkStatusOK)
|
||||
{
|
||||
isGetAudioOk = fgGetAudioDataToPlay(ioData->mBuffers[0].mData, ioData->mBuffers[0].mDataByteSize );
|
||||
}
|
||||
@@ -366,7 +367,8 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
}
|
||||
else
|
||||
{
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
// if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P)
|
||||
if ([[GWP2PClient sharedClient] linkStatus] == P2PLinkStatusOK)
|
||||
{
|
||||
vFillAudioRawData(bufferList->mBuffers[0].mData, bufferList->mBuffers[0].mDataByteSize);
|
||||
}
|
||||
@@ -475,20 +477,4 @@ static OSStatus playbackCallback(void *inRefCon,
|
||||
AudioSessionSetProperty(kAudioSessionProperty_OverrideAudioRoute, sizeof(UInt32), &audioRoute);
|
||||
}
|
||||
|
||||
-(void)setSpeckState:(BOOL)state{
|
||||
|
||||
if ([[P2PClient sharedClient]p2pCallState] == P2PCALL_STATUS_READY_P2P) {
|
||||
self.silentAudio = state;
|
||||
if(self.callType==P2PCALL_TYPE_MONITOR){
|
||||
if(self.silentAudio){
|
||||
fgSendUserData(5, 0, NULL, 0);
|
||||
}else{
|
||||
fgSendUserData(5, 1, NULL, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@end
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
NSString* ssid = [Utils currentWifiSSID];
|
||||
|
||||
//ap模式不搜索
|
||||
int dwApContactID = [[AppDelegate sharedDefault]dwApContactID];
|
||||
int dwApContactID = [[AppDelegate sharedDefault] dwApContactID];
|
||||
|
||||
//后台运行不搜索
|
||||
UIApplicationState iState = [UIApplication sharedApplication].applicationState;
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
//
|
||||
|
||||
#import "P2PClient.h"
|
||||
#import "P2PCInterface.h"
|
||||
#import "Utils.h"
|
||||
#import "Constants.h"
|
||||
#import "config.h"
|
||||
@@ -439,7 +438,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
|
||||
|
||||
|
||||
if (dwCmd == USR_CMD_PLAY_CTL) {
|
||||
if (dwCmd == USR_CMD_REMOTLY_PLAY_CTL) {
|
||||
|
||||
DLog(@"%i",dwOption);
|
||||
switch (dwOption) {
|
||||
@@ -568,7 +567,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
BYTE prm[8];
|
||||
playbackCurrentFileIndex -= 1;
|
||||
memcpy(prm, &(playbackFiles[playbackCurrentFileIndex]), sizeof(sRecFilenameType));
|
||||
fgSendUserData(USR_CMD_PLAY_CTL, USR_CMD_OPTION_NEXT_FILE, prm, sizeof(sRecFilenameType));
|
||||
fgSendUserData(USR_CMD_REMOTLY_PLAY_CTL, USR_CMD_OPTION_NEXT_FILE, prm, sizeof(sRecFilenameType));
|
||||
|
||||
}
|
||||
|
||||
@@ -585,7 +584,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
BYTE prm[8];
|
||||
playbackCurrentFileIndex += 1;
|
||||
memcpy(prm, &(playbackFiles[playbackCurrentFileIndex]), sizeof(sRecFilenameType));
|
||||
fgSendUserData(USR_CMD_PLAY_CTL, USR_CMD_OPTION_NEXT_FILE, prm, sizeof(sRecFilenameType));
|
||||
fgSendUserData(USR_CMD_REMOTLY_PLAY_CTL, USR_CMD_OPTION_NEXT_FILE, prm, sizeof(sRecFilenameType));
|
||||
vSetSupperDrop(TRUE);
|
||||
}
|
||||
|
||||
@@ -593,7 +592,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
UInt64 jumpValue = (self.playback_startTime+value*1000000);
|
||||
|
||||
|
||||
fgSendUserData(USR_CMD_PLAY_CTL, USR_CMD_OPTION_JUMP, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
fgSendUserData(USR_CMD_REMOTLY_PLAY_CTL, USR_CMD_OPTION_JUMP, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
vSetSupperDrop(TRUE);
|
||||
}
|
||||
|
||||
@@ -603,7 +602,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
// UInt64 jumpValue =32;
|
||||
NSLog(@"fastBeginValue=%lld",(long long)jumpValue);
|
||||
|
||||
fgSendUserData(USR_CMD_PLAY_CTL, USR_CMD_OPTION_FAST_PLAY, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
fgSendUserData(USR_CMD_REMOTLY_PLAY_CTL, USR_CMD_OPTION_FAST_PLAY, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
vSetSupperDrop(TRUE);
|
||||
}
|
||||
/**不要快进*/
|
||||
@@ -612,7 +611,7 @@ void commandSettingInAction(DWORD dwCmd, DWORD dwOption , DWORD * pdwData, DWO
|
||||
// UInt64 jumpValue =32;
|
||||
NSLog(@"fastEndValue=%lld",(long long)jumpValue);
|
||||
|
||||
fgSendUserData(USR_CMD_PLAY_CTL, USR_CMD_OPTION_FAST_PLAY_CANCEL, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
fgSendUserData(USR_CMD_REMOTLY_PLAY_CTL, USR_CMD_OPTION_FAST_PLAY_CANCEL, (BYTE*)(&jumpValue), sizeof(UInt64));
|
||||
vSetSupperDrop(TRUE);
|
||||
}
|
||||
|
||||
@@ -944,7 +943,7 @@ void vP2PConnReady(void)
|
||||
tables[i] = contactId.intValue;
|
||||
}
|
||||
}
|
||||
fgP2PGetFriendsStatus(tables, [contacts count]);
|
||||
fgGetFriendsStatusFromP2PServer(tables, [contacts count]);
|
||||
}
|
||||
|
||||
//设备在线状态更新
|
||||
@@ -3844,7 +3843,7 @@ void vRecvRemoteMessage(DWORD dwSrcID, unsigned int fgHasCheckdPassword, void
|
||||
|
||||
memcpy(sMessage.cString, messageStr, length);
|
||||
mesg_id++;
|
||||
fgP2PSendRemoteMessage(contactId.intValue|0x80000000, 0, mesg_id, &sMessage, length+4, sMessage.cString, length, (DWORD)PUSH_MESG_FRIEND);
|
||||
fgP2PSendRemoteMessage(contactId.intValue|0x80000000, 0, mesg_id, &sMessage, length+4, sMessage.cString, length, (DWORD)PUSH_MESG_TYPE_NORMAL);
|
||||
return mesg_id;
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#import <CommonCrypto/CommonCrypto.h>
|
||||
#import <AudioToolbox/AudioToolbox.h>
|
||||
#import <SystemConfiguration/CaptiveNetwork.h>
|
||||
#import "MD5Manager.h"
|
||||
#import <GWP2P/MD5Manager.h>
|
||||
#import "AppDelegate.h"
|
||||
#import "IfishCameraModel.h"
|
||||
@implementation Utils
|
||||
|
||||
+429
-115
@@ -1,4 +1,4 @@
|
||||
#ifndef _P2PC_INTERFACE_H_
|
||||
#ifndef _P2PC_INTERFACE_H_
|
||||
#define _P2PC_INTERFACE_H_
|
||||
|
||||
#ifdef WIN32
|
||||
@@ -14,39 +14,78 @@
|
||||
|
||||
|
||||
#define KTRUE 1
|
||||
#define KFALSE 0
|
||||
#define DWORD unsigned int //32bits
|
||||
#define WORD unsigned short //16bits
|
||||
#define BYTE unsigned char //8bits
|
||||
#define KBOOL unsigned int //32bits
|
||||
#define UINT64 unsigned long long //64bits
|
||||
|
||||
#define KFALSE 0
|
||||
#define DWORD unsigned int //32bits
|
||||
#define WORD unsigned short //16bits
|
||||
#define BYTE unsigned char //8bits
|
||||
#define KBOOL unsigned int //32bits
|
||||
#define UINT64 unsigned long long //64bits
|
||||
|
||||
|
||||
|
||||
enum{
|
||||
DEV_TYPE_NULL,
|
||||
DEV_TYPE_SERVER,
|
||||
DEV_TYPE_NPC,
|
||||
DEV_TYPE_NPC, // 2
|
||||
DEV_TYPE_MOBILE,
|
||||
DEV_TYPE_PC,
|
||||
|
||||
DEV_TYPE_DOORBELL,
|
||||
DEV_TYPE_ALERTOR,
|
||||
DEV_TYPE_IPC
|
||||
DEV_TYPE_IPC, // 7
|
||||
DEV_TYPE_LOCK, //8
|
||||
DEV_TYPE_WIFI, //9
|
||||
DEV_TYPE_QQ_IPC, //10
|
||||
DEV_TYPE_NVR,
|
||||
};
|
||||
|
||||
///dwServerType
|
||||
enum{
|
||||
SERVER_TYPE_NULL,
|
||||
SERVER_TYPE_P2P,
|
||||
SERVER_TYPE_LIST,
|
||||
SERVER_TYPE_EMAIL,
|
||||
SERVER_TYPE_IOS_PUSH,
|
||||
SERVER_TYPE_INDEX = 9,
|
||||
SERVER_TYPE_DEV_UPG = 10,
|
||||
SERVER_TYPE_LOG = 11,
|
||||
|
||||
enum
|
||||
{
|
||||
IPC_DEV_SUB_TYPE_NORMAL, ////摇头机,全功能
|
||||
IPC_DEV_SUB_TYPE_SIMPLE, ////卡片机, 不带马达,
|
||||
IPC_DEV_SUB_TYPE_38X38, ////38板,不带马达,不带人体红外, 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_DOORBELL,//门铃 ,不带马达,带语音优化
|
||||
IPC_DEV_SUB_TYPE_COSTDOWN_IPC, //costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_38_MODULE,
|
||||
|
||||
IPC_DEV_SUB_TYPE_NVR_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_NVR_NO_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_SMARTHOME_868,//预留
|
||||
IPC_DEV_SUB_TYPE_Rsv4,//预留 //9
|
||||
|
||||
IPC_DEV_SUB_TYPE_130W_NORMAL, ////摇头机,全功能
|
||||
IPC_DEV_SUB_TYPE_130W_SIMPLE, ////卡片机, 不带马达,
|
||||
IPC_DEV_SUB_TYPE_130W_38X38, ////38板,不带马达,不带人体红外, 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_130W_DOORBELL,//门铃 ,不带马达,带语音优化
|
||||
IPC_DEV_SUB_TYPE_130W_COSTDOWN_IPC, //costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_130W_38_MODULE,
|
||||
|
||||
IPC_DEV_SUB_TYPE_130W_NVR_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_130W_NVR_NO_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_130W_SMARTHOME_868,//预留
|
||||
IPC_DEV_SUB_TYPE_130W_Rsv4,//预留 //19
|
||||
|
||||
IPC_DEV_SUB_TYPE_200W_NORMAL, ////摇头机,全功能
|
||||
IPC_DEV_SUB_TYPE_200W_SIMPLE, ////卡片机, 不带马达,
|
||||
IPC_DEV_SUB_TYPE_200W_38X38, ////38板,不带马达,不带人体红外, 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_200W_DOORBELL,//门铃 ,不带马达,带语音优化
|
||||
IPC_DEV_SUB_TYPE_200W_COSTDOWN_IPC, //costdown版的摇头机,不带人体红外,不带外部无线传感器. 不带回音消除
|
||||
IPC_DEV_SUB_TYPE_200W_38_MODULE,
|
||||
|
||||
IPC_DEV_SUB_TYPE_200W_NVR_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_200W_NVR_NO_PTZ,//预留
|
||||
IPC_DEV_SUB_TYPE_200W_SMARTHOME_868,//预留
|
||||
IPC_DEV_SUB_TYPE_200W_Rsv4,//预留 //29
|
||||
|
||||
IPC_DEV_SUB_TYPE_FISHEYE,//鱼眼
|
||||
IPC_DEV_SUB_TYPE_SMARTHOME,//868 + 情景模式
|
||||
IPC_DEV_SUB_TYPE_SMARTHOME_FISHEYE, //
|
||||
IPC_DEV_SUB_TYPE_SC1135_FISHEYE_360D,
|
||||
IPC_DEV_SUB_TYPE_SC1135_FISHEYE_180D,
|
||||
IPC_DEV_SUB_TYPE_SC3035_FISHEYE_360D,
|
||||
IPC_DEV_SUB_TYPE_SC3035_FISHEYE_180D,
|
||||
|
||||
IPC_DEV_SUB_TYPE_MAX
|
||||
|
||||
};
|
||||
|
||||
#define CONN_TYPE_VIDEO_CALL 0x00
|
||||
@@ -78,6 +117,7 @@ enum
|
||||
CALL_ERROR_NOT_SUPPORT,
|
||||
};
|
||||
|
||||
|
||||
enum
|
||||
{
|
||||
MESG_TYPE_GET_SETTING, // 0
|
||||
@@ -132,10 +172,13 @@ enum
|
||||
MESG_TYPE_UPG_CREATE_WHOLEFLASH_TO_FILE_RET, // 38
|
||||
MESG_TYPE_GET_SYS_VERSION, // 39
|
||||
MESG_TYPE_GET_SYS_VERSION_RET, // 40
|
||||
|
||||
|
||||
LAN_TRANS_SET_INIT_PASSWD = 48, // 48
|
||||
LAN_TRANS_RET_INIT_PASSWD, // 49
|
||||
|
||||
MESG_TYPE_CLEAR_MULTI_CODE, // 41
|
||||
MESG_TYPE_CLEAR_MULTI_CODE_RET, // 42
|
||||
|
||||
MESG_TYPE_CLEAR_FILES, // 43
|
||||
MESG_TYPE_CLEAR_FILES_RET, // 44
|
||||
|
||||
|
||||
MESG_TYPE_DRBL_ACK_GET = 58,
|
||||
MESG_TYPE_DRBL_ACK_RET, // 59
|
||||
@@ -154,6 +197,9 @@ enum
|
||||
MESG_TYPE_SET_DEFENCE_SWITCH_STATE, //83 设置防区开关
|
||||
MESG_TYPE_RET_DEFENCE_SWITCH_STATE, //84 设置返回值
|
||||
|
||||
MESG_TYPE_UART1_GPIO_CTL, //85
|
||||
MESG_TYPE_UART1_GPIO_CTL_RET, //86
|
||||
|
||||
MESG_TYPE_SET_MOTOR_PRESET_POS = 87, //预置位
|
||||
MESG_TYPE_RET_MOTOR_PRESET_POS = 88,
|
||||
|
||||
@@ -164,16 +210,67 @@ enum
|
||||
MESG_TYPE_SET_GPIO_CTL = 95,
|
||||
MESG_TYPE_RET_GPIO_CTL, //值:96
|
||||
|
||||
MESG_TYPE_WORKMODE_SETTING =149,
|
||||
MESG_TYPE_GET_LOWVOLTAGE_STATE, //97
|
||||
MESG_TYPE_SET_LOWVOLTAGE_STATE, //98
|
||||
MESG_TYPE_RET_LOWVOLTAGE_STATE, //99
|
||||
|
||||
MESG_TYPE_QRCODE_LEARN_CODE =216,
|
||||
MESG_TYPE_GET_ALARM_CENTER_PARAM, // 100
|
||||
MESG_TYPE_SET_ALARM_CENTER_PARAM, // 101
|
||||
MESG_TYPE_RET_ALARM_CENTER_PARAM, //102
|
||||
|
||||
MESG_TYPE_CUSTOM_CMD_NO_VERRIFY_SET = 127,
|
||||
MESG_TYPE_CUSTOM_CMD_NO_VERRIFY_RET, //128
|
||||
MESG_TYPE_GET_IP_CONFIG,//103
|
||||
MESG_TYPE_SET_IP_CONFIG,//104
|
||||
MESG_TYPE_RET_IP_CONFIG,//105
|
||||
|
||||
MESG_TYPE_GET_CSC_ATTR,//106
|
||||
MESG_TYPE_SET_CSC_ATTR,//107
|
||||
MESG_TYPE_RET_CSC_ATTR,//108
|
||||
|
||||
MESG_TYPE_SET_REMOTE_REBOOT,//109
|
||||
MESG_TYPE_RET_REMOTE_REBOOT,//110
|
||||
|
||||
MESG_TYPE_GET_IRLED_STATE,//111
|
||||
MESG_TYPE_SET_IRLED_STATE,//112
|
||||
MESG_TYPE_RET_IRLED_STATE,//113
|
||||
|
||||
MESG_TYPE_SET_CERINFO, //114
|
||||
MESG_TYPE_RET_CERINFO, //115
|
||||
|
||||
MESG_TYPE_GET_MOTOR_POS, //116
|
||||
MESG_TYPE_RET_MOTOR_POS, //117
|
||||
|
||||
MESG_TYPE_GET_LOG_FILE, // 118
|
||||
MESG_TYPE_RET_LOG_FILE, //119
|
||||
|
||||
MESG_TYPE_DEFENSE_NOTIFY, // 120
|
||||
|
||||
MESG_TYPE_GET_ALARM_INFO, // 121
|
||||
MESG_TYPE_RET_ALARM_INFO, //122
|
||||
MESG_TYPE_WHITELIST_RET,//123
|
||||
|
||||
MESG_TYPE_SET_CUSTOM_CMD, // 124
|
||||
MESG_TYPE_RET_CUSTOM_CMD, // 125
|
||||
|
||||
MEST_TYPE_SET_FOCUS_LENS,//126
|
||||
|
||||
MESG_TYPE_CUSTOM_CMD_NO_VERRIFY_SET, // 127
|
||||
MESG_TYPE_CUSTOM_CMD_NO_VERRIFY_RET, // 128
|
||||
|
||||
#ifdef PUSH_SERVER_REMOTE_CONFIG_SUPPORT
|
||||
MESG_TYPE_SET_PUSH_SERVER_CONFIG_CMD,//129
|
||||
MESG_TYPE_RET_PUSH_SERVER_CONFIG_CMD,//130
|
||||
#endif
|
||||
|
||||
MESG_TYPE_GET_NVR_INFO = 131,
|
||||
MESG_TYPE_RET_NVR_INFO,
|
||||
|
||||
MESG_TYPE_WORKMODE_SETTING =149, //DSD
|
||||
|
||||
//150 till 210 will be use on the smartJack device
|
||||
|
||||
|
||||
|
||||
|
||||
MESG_TYPE_GET_DEVICE_LANGUAGE = 211,
|
||||
MESG_TYPE_SET_DEVICE_LANGUAGE, //212
|
||||
MESG_TYPE_RET_DEVICE_LANGUAGE, //213
|
||||
@@ -181,23 +278,178 @@ enum
|
||||
MESG_TYPE_GET_SCHEDULE_DEFENCE_INFO, //214 获取布撤防
|
||||
MESG_TYPE_SET_SCHEDULE_DEFENCE_INFO, //215
|
||||
|
||||
MESG_TYPE_QRCODE_LEARN_CODE =216,
|
||||
//MESG_TYPE_QRCODE_LEARN_CODE_RET,//
|
||||
MESG_TYPE_SEND_UART2_DATA = 218,//
|
||||
MESG_TYPE_GET_UART2_DATA,//219
|
||||
MESG_TYPE_GET_MEMBER_LIST=220,
|
||||
MESG_TYPE_GET_MEMBER_LIST_RET=221,
|
||||
MESG_TYPE_MAIN_NONEED_PASSPWD=222,
|
||||
MESG_TYPE_MAIN_NEED_PASSPWD = 223, //223 获取和修改433传感器名字 预置位转动好后截图
|
||||
|
||||
MESG_TYPE_SETORGET_LENS_FOCUS_PARAMS = 224, // 自动变焦 获取和设置变焦镜头马达当前位置的命令是一样滴 消息头命令
|
||||
|
||||
MESG_TYPE_GET_FTP, // 225
|
||||
MESG_TYPE_SET_FTP, // 226
|
||||
MESG_TYPE_RET_FTP, // 227
|
||||
|
||||
MESG_TYPE_GET_FISHEYE = 228, //获取当前全景相机配置信息
|
||||
MESG_TYPE_SET_FISHEYE,//229 设置当前全景相机配置信息
|
||||
MESG_TYPE_RET_FISHEYE,//230 返回当前全景相机配置信息
|
||||
MESG_TYPE_EXT_ALARM_INFO =228,//科立信海思方案
|
||||
|
||||
MESG_TYPE_SET_AUTO_TEST_MODE=232,
|
||||
MESG_TYPE_SET_AUTO_TEST_CAPTURE,
|
||||
MESG_TYPE_TEST_IOS_PUSH,
|
||||
MESG_TYPE_SET_AUTO_TEST_VOICELINK,//235
|
||||
MESG_TYPE_SET_AUTO_TEST_STATS_SAVE,// 保存句柄、内存统计信息
|
||||
|
||||
MESG_TYPE_RET_RECORD_STATE = 237, //设备当前的录像状态、有没有TF卡
|
||||
MESG_TYPE_TO_UART2_CMD,//238
|
||||
|
||||
MESG_TYPE_SET_VIDEO_CLEAR_LEVEL = 239, /**< 设置录像质量 */
|
||||
MESG_TYPE_GET_VIDEO_CLEAR_LEVEL = 240, /**< 获取录像质量 */
|
||||
MESG_TYPE_RET_VIDEO_CLEAR_LEVEL = 241, /**< 录像质量返回 */
|
||||
|
||||
|
||||
MESG_TYPE_GET_IF_WIFI_SETTED = 242,
|
||||
MESG_TYPE_RET_IF_WIFI_SETTED = 243,
|
||||
|
||||
MESG_TYPE_SET_STA_WIFI_INFO = 244, //ap转sta时设置wifi密码
|
||||
MESG_TYPE_RET_STA_WIFI_INFO = 245,
|
||||
|
||||
MESG_TYPE_SET_WELOCK_INFO,//246
|
||||
MESG_TYPE_GET_WELOCK_INFO,//247
|
||||
MESG_TYPE_RET_WELOCK_INFO,//248
|
||||
|
||||
MESG_TYPE_DEVICE_NOT_SUPPORT_RET = 0XFF,
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
enum{
|
||||
MESG_SUBTYPE_SETTING_WORKMODE_DEFAULT,//0
|
||||
|
||||
MESG_SUBTYPE_SETTING_IPC_WORKMODE, //1
|
||||
MESG_SUBTYPE_SETTING_IPC_WORKMODE_RET,//2
|
||||
|
||||
MESG_SUBTYPE_SETTING_SENSOR_WORKMODE,//3
|
||||
MESG_SUBTYPE_SETTING_SENSOR_WORKMODE_RET,//4
|
||||
|
||||
MESG_SUBTYPE_SETTING_SCHEDULE_WORKMODE,//5
|
||||
MESG_SUBTYPE_SETTING_SCHEDULE_WORKMODE_RET,//6
|
||||
|
||||
MESG_SUBTYPE_DELETE_SCHEDULE,//7
|
||||
MESG_SUBTYPE_DELETE_SCHEDULE_RET,//8
|
||||
|
||||
MESG_SUBTYPE_GET_CURRENTWORKMODE,//9
|
||||
MESG_SUBTYPE_GET_CURRENTWORKMODE_RET,//10
|
||||
|
||||
MESG_SUBTYPE_GET_SENSORWORKMODE,//11
|
||||
MESG_SUBTYPE_GET_SENSORWORKMODE_RET,//12
|
||||
|
||||
MESG_SUBTYPE_GET_WORKMODE_SCHEDULE, //13
|
||||
MESG_SUBTYPE_GET_WORKMODE_SCHEDULE_RET,//14
|
||||
|
||||
MESG_SUBTYPE_SETTING_ALL_SENSOR_SWITCH,//15
|
||||
MESG_SUBTYPE_SETTING_ALL_SENSOR_SWITCH_RET,//16
|
||||
|
||||
MESG_SUBTYPE_GET_ALL_SENSOR_SWITCH,//17
|
||||
MESG_SUBTYPE_GET_ALL_SENSOR_SWITCH_RET,//18
|
||||
|
||||
MESG_SUBTYPE_SET_LOW_VOL_TIMEINTERVAL,//19
|
||||
MESG_SUBTYPE_SET_LOW_VOL_TIMEINTERVAL_RET,//20
|
||||
|
||||
MESG_SUBTYPE_GET_LOW_VOL_TIMEINTERVAL,//21
|
||||
MESG_SUBTYPE_GET_LOW_VOL_TIMEINTERVAL_RET,//22
|
||||
|
||||
MESG_SUBTYPE_DELETE_ONE_CONTROLER,//23
|
||||
MESG_SUBTYPE_DELETE_ONE_CONTROLER_RET,//24
|
||||
|
||||
MESG_SUBTYPE_DELETE_ONE_SENSOR,//25
|
||||
MESG_SUBTYPE_DELETE_ONE_SENSOR_RET,//26
|
||||
|
||||
MESG_SUBTYPE_CHANGE_CONTROLER_NAME,//27
|
||||
MESG_SUBTYPE_CHANGE_CONTROLER_NAME_RET,//28
|
||||
|
||||
MESG_SUBTYPE_CHANGE_SENSOR_NAME,//29
|
||||
MESG_SUBTYPE_CHANGE_SENSOR_NAME_RET,//30
|
||||
|
||||
MESG_SUBTYPE_INTO_LEARN_STATE,//31
|
||||
MESG_SUBTYPE_INTO_LEARN_STATE_RET,//32
|
||||
|
||||
MESG_SUBTYPE_TURN_SENSOR,//33
|
||||
MESG_SUBTYPE_TURN_SENSOR_RET,//34
|
||||
|
||||
MESG_SUBTYPE_SHARE_TO_MEMBER,//35
|
||||
MESG_SUBTYPE_SHARE_TO_MEMBER_RET,//36
|
||||
MESG_SUBTYPE_GOT_SHARE_MESG,//37
|
||||
|
||||
MESG_SUBTYPE_GOT_SHARE_MESG_RET,//38
|
||||
MESG_SUBTYPE_DEV_RECV_MEMBER_FEEDBACK,//39
|
||||
|
||||
MESG_SUBTYPE_ADMIN_DELETE_ONE_MEMBER,//40
|
||||
MESG_SUBTYPE_ADMIN_DELETE_ONE_MEMBER_RET,//41
|
||||
|
||||
MESG_SUBTYPE_DELETE_DEV,//42
|
||||
MESG_SUBTYPE_DELETE_DEV_RET,//43
|
||||
|
||||
MESG_SUBTYPE_SET_ONE_SPECIAL_ALARM=46, //46
|
||||
MESG_SUBTYPE_SET_ONE_SPECIAL_ALARM_RET, //47
|
||||
|
||||
MESG_SUBTYPE_GET_ALL_SPECIAL_ALARM, //48
|
||||
MESG_SUBTYPE_GET_ALL_SPECIAL_ALARM_RET, //49
|
||||
|
||||
MESG_SUBTYPE_DEAL_LAMP, //50
|
||||
MESG_SUBTYPE_DEAL_LAMP_RET, //51
|
||||
|
||||
MESG_SUBTYPE_KEEPCLIENT, //52
|
||||
MESG_SUBTYPE_KEEPCLIENT_RET, //53
|
||||
|
||||
MESG_SUBTYPE_CONTROL_LED=60,//60 //2016-7-19 设置指示灯led
|
||||
MESG_SUBTYPE_CONTROL_LED_RET=61, //61
|
||||
|
||||
MESG_SUBTYPE_GET_LED_STATU,//62 //2016-7-19 获取指示灯led
|
||||
MESG_SUBTYPE_GET_LED_STATU_RET,//63
|
||||
|
||||
MESG_SUBTYPE_SET_SESOR_PRESET_POS = 64,
|
||||
MESG_SUBTYPE_SET_SESOR_PRESET_POS_RET,//65
|
||||
|
||||
MESG_SUBTYPE_MAX
|
||||
};
|
||||
|
||||
enum{
|
||||
MESG_SUBTYPE_GET_MONITOR_LOG,//0
|
||||
MESG_SUBTYPE_GET_MONITOR_LOG_RET,//1
|
||||
|
||||
MESG_SUBTYPE_GET_433_SENSOR_NAME,//2 获取433传感器名字
|
||||
MESG_SUBTYPE_GET_433_SENSOR_NAME_RET,//3
|
||||
|
||||
MESG_SUBTYPE_EDIT_433_SENSOR_NAME,//4 修改433传感器名字
|
||||
MESG_SUBTYPE_EDIT_433_SENSOR_NAME_RET,//5
|
||||
|
||||
MESG_SUBTYPE_SETTING_LIGHT_CONTROL,//6
|
||||
MESG_SUBTYPE_SETTING_LIGHT_CONTROL_RET,//7
|
||||
MESG_SUBTYPE_GET_LIGHT_CONTROL_SETTING,//8
|
||||
MESG_SUBTYPE_GET_LIGHT_CONTROL_SETTING_RET,//9
|
||||
MESG_SUBTYPE_SET_IRCUT_ADCVALUE,//10
|
||||
MESG_SUBTYPE_SET_IRCUT_ADCVALUE_RET,//11
|
||||
MESG_SUBTYPE_GET_IRCUT_ADCVALUE,//12
|
||||
MESG_SUBTYPE_GET_IRCUT_ADCVALUE_RET,//13
|
||||
MESG_SUBTYPE_SET_MANUAL_GRAY,//14 manual to gray mode
|
||||
MESG_SUBTYPE_GET_MANUAL_GRAY,//15 manual to gray mode
|
||||
MESG_SUBTYPE_SET_MANUAL_GRAY_RET,//16
|
||||
MESG_SUBTYPE_TURNTO_PRESETPOS_OK =17 //17
|
||||
|
||||
};
|
||||
|
||||
enum{
|
||||
MESG_SDCARD_DONOT_HAVE_ENOUGH_SPACE=2, //2
|
||||
MESG_SDCARD_NOT_EXIST, //3
|
||||
MESG_MONITOR_LOG_FILE_NOT_EXIST,//4
|
||||
MESG_GET_MONITOR_LOG_NOT_SUPPORT,//5
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
OS_ARM_LINUX,
|
||||
@@ -213,14 +465,15 @@ enum
|
||||
|
||||
|
||||
|
||||
enum {
|
||||
PUSH_MESG_SYSTEM,
|
||||
PUSH_MESG_VERIFY,
|
||||
PUSH_MESG_FRIEND,
|
||||
PUSH_MESG_ALARM,
|
||||
PUSH_MESG_CALL,
|
||||
PUSH_MESG_DOORBELL
|
||||
};
|
||||
enum
|
||||
{
|
||||
PUSH_MESG_TYPE_SYSTEM,
|
||||
PUSH_MESG_TYPE_VERIFY,
|
||||
PUSH_MESG_TYPE_NORMAL,
|
||||
PUSH_MESG_TYPE_ALARM,
|
||||
PUSH_MESG_TYPE_CALLING,
|
||||
PUSH_MESG_TYPE_BELL,
|
||||
};
|
||||
|
||||
enum
|
||||
{
|
||||
@@ -240,6 +493,27 @@ typedef struct sFriendsType
|
||||
|
||||
}PACKED sFriendsType;
|
||||
|
||||
typedef struct sFriendsTypeV2
|
||||
{
|
||||
DWORD dwFriendsCount; //好友总数
|
||||
BYTE bRequestResult; //请求结果,等于0,则代表请求失败
|
||||
BYTE bReseve[3];
|
||||
|
||||
DWORD dwFriends[MAX_FRIENDS_NS]; //好友ID,注意:实际读取时为dwFriends[dwFriendsCount];
|
||||
DWORD dwFriendsIdProperty[MAX_FRIENDS_NS]; //好友ID属性,注意:实际读取时为bFriendsIdProperty[dwFriendsCount];
|
||||
BYTE bStatus[MAX_FRIENDS_NS]; //好友在线状态,注意:实际读取时为bStatus[dwFriendsCount];
|
||||
BYTE bDevType[MAX_FRIENDS_NS]; //好友帐号大类型,注意:实际读取时为bDevType[dwFriendsCount];
|
||||
BYTE bSubType[MAX_FRIENDS_NS]; //好友帐号子类型,注意:实际读取时为bSubType[dwFriendsCount];
|
||||
BYTE bDefenceState[MAX_FRIENDS_NS]; //设备布防状态,注意:实际读取时为bSubType[dwFriendsCount], 0xFF则不支持Index服务器获取,需要从设备端获取此值;
|
||||
DWORD dwDefenceFlag[MAX_FRIENDS_NS];
|
||||
|
||||
}PACKED sFriendsTypeV2;
|
||||
/*
|
||||
dwFriendsIdProperty 好友ID属性说明:
|
||||
Bit 0 : 1 代表该设备是支持设备布撤防信息和设备子类型上传服务器的, 0 则反之
|
||||
*/
|
||||
|
||||
|
||||
typedef struct sCallingPrmType
|
||||
{
|
||||
KBOOL fgBCalled;
|
||||
@@ -280,7 +554,10 @@ typedef struct sCallingPrmType
|
||||
DWORD dwChBufSize[MAX_P2PCH_NS]; // 每个通道的缓存大小,请统一设置为(1024*512)
|
||||
DWORD dwPassword; //密码,请设为十进制数: 123456
|
||||
DWORD dwCustomerID[10];
|
||||
|
||||
|
||||
DWORD SessionID1; // App端需要填写此ID,设备端不填
|
||||
DWORD SessionID2; // App端需要填写此ID,设备端不填
|
||||
|
||||
// 被呼叫 时,当有人拨打进来,通过此函数 告知上层。
|
||||
// 主叫时,拨打已经通了。对方正在响铃,也回调此函数。
|
||||
// fgBCalled : TRUE 表示 被呼叫, FALSE 表示主叫。
|
||||
@@ -293,7 +570,8 @@ typedef struct sCallingPrmType
|
||||
//呼叫被拒绝或者连接断开的回调函数
|
||||
// fgBCalled : TRUE 表示 被呼叫, FALSE 表示主叫。
|
||||
// dwErrorOption: 断开的原因,请参见前述枚举。
|
||||
void (* vRejectSignal )(BOOL fgBCalled, DWORD dwErrorOption);
|
||||
// dwErrorCode : 断开的错误码,非0时要在UI呈现给用户
|
||||
void (* vRejectSignal )(BOOL fgBCalled, DWORD dwErrorOption, DWORD dwErrorCode);
|
||||
|
||||
//接听回调函数, 当对方接通了或本机接听了来电,通过此函数告知上层。
|
||||
// fgBCalled : TRUE 表示 被呼叫, FALSE 表示主叫。
|
||||
@@ -306,19 +584,21 @@ typedef struct sCallingPrmType
|
||||
void (* vSendMessageAck)(DWORD dwDesID, DWORD dwMesgID, DWORD dwError);
|
||||
|
||||
void (* vFriendsStatusUpdate)(sFriendsType * pFriends);
|
||||
|
||||
void (*vIndexFriendsStatusUpdate)(sFriendsTypeV2 *pFriends);
|
||||
|
||||
#ifdef UPDATE_FLAG_SUPPORT
|
||||
void (* vFlagUpdate)(DWORD *pdwFlags );
|
||||
void (* vFlagUpdate)(DWORD *pdwFlags );
|
||||
#endif
|
||||
|
||||
//【远程获取文件结果回调】
|
||||
//参数-dwDesID: 目标设备ID
|
||||
//参数-pFilename: 文件名
|
||||
//参数-dwErrorCode: 错误代码(详情见上枚举)
|
||||
void (* vGetFileCmdACK)(DWORD dwDesID, char *pFilename, DWORD dwErrorCode);
|
||||
|
||||
}sP2PInitPrm;
|
||||
|
||||
//【远程获取文件结果回调】
|
||||
//参数-dwDesID: 目标设备ID
|
||||
//参数-pFilename: 文件名
|
||||
//参数-dwErrorCode: 错误代码(详情见上枚举)
|
||||
void (* vGetFileCmdACK)(DWORD dwDesID, char *pFilename, DWORD dwErrorCode);
|
||||
|
||||
void (* LoginInAnotherOne)(DWORD LoginStatus); //APP在别处登录
|
||||
|
||||
}sP2PInitPrm;
|
||||
|
||||
#ifdef UPDATE_FLAG_SUPPORT
|
||||
void vP2PSetUpdateFlag(DWORD *pdwFlag);
|
||||
@@ -335,6 +615,13 @@ enum
|
||||
KBOOL fgP2PInit(sP2PInitPrm * pPrm); // 网络库初始化
|
||||
void vP2PExit(void); // 网络库退出并释放资源
|
||||
|
||||
/*
|
||||
函数:DWORD ReLogin(DWORD SessionID1, DWORD SessionID2)
|
||||
功能:P2P重新登录
|
||||
返回值: 0 成功; 1 P2P未初始化 ; 2 参数错误 ;
|
||||
*/
|
||||
DWORD ReLogin(DWORD SessionID1, DWORD SessionID2);
|
||||
|
||||
|
||||
KBOOL fgP2PLinkOK(void); // 查看网络库状态.(类似与QQ 是否在线)
|
||||
|
||||
@@ -349,8 +636,8 @@ void vP2PHungup(KBOOL fgWaitFinish); // 挂断连接
|
||||
void vP2PAccept(DWORD *pdwPrm); // 接受呼叫
|
||||
|
||||
KBOOL fgP2PSendRemoteMessage(DWORD dwDesID, DWORD dwRemotePW, DWORD dwMesgID, void * pMesg, DWORD dwMesgSize, char * pPushMesg, DWORD dwPushMesgLen, DWORD dwType);
|
||||
KBOOL fgP2PGetFriendsStatus(DWORD *pFriendsTable, DWORD dwCount);
|
||||
|
||||
KBOOL fgGetFriendsStatusFromP2PServer(DWORD *pFriendsTable, DWORD dwCount);
|
||||
KBOOL fgGetFriendsStatusFromIndexServer(DWORD *pFriendsTable, DWORD dwCount);
|
||||
|
||||
//--------------------------------------------
|
||||
//【获取远程文件】
|
||||
@@ -414,20 +701,19 @@ typedef struct sAVBlockHeaderType
|
||||
|
||||
|
||||
|
||||
|
||||
typedef struct sAVInfoType
|
||||
{
|
||||
WORD AudioType: 3; //音频编码格式
|
||||
WORD AudioCodecOption: 4; //音频编码的参数
|
||||
WORD AudioMode: 1; // 音频模式: 单声道/双声道
|
||||
WORD AudioBitWidth: 2; // 音频位宽,目前只支持16bit
|
||||
WORD AudioSampleRate : 3; // 音频采样率
|
||||
WORD SampleNumPerFrame : 3; //每帧数据里的采样数
|
||||
|
||||
DWORD VideoType: 4; /// 视频类型,目前只支持H264
|
||||
DWORD VideoWidth: 12; // 视频像素宽度
|
||||
DWORD VideoHeight: 10; //视频像素高度
|
||||
DWORD videoFrameRate: 6; // 视频帧率
|
||||
WORD AudioType: 3; //音频编码格式
|
||||
WORD AudioCodecOption: 4; //音频编码的参数
|
||||
WORD AudioMode: 1; // 音频模式: 单声道/双声道
|
||||
WORD AudioBitWidth: 2; // 音频位宽,目前只支持16bit
|
||||
WORD AudioSampleRate : 3; // 音频采样率
|
||||
WORD SampleNumPerFrame : 3; //每帧数据里的采样数
|
||||
|
||||
DWORD VideoType: 4; /// 视频类型,目前只支持H264
|
||||
DWORD VideoWidth: 12; // 视频像素宽度
|
||||
DWORD VideoHeight: 10; //视频像素高度
|
||||
DWORD videoFrameRate: 6; // 视频帧率
|
||||
}PACKED sAVInfoType;
|
||||
|
||||
|
||||
@@ -445,6 +731,7 @@ typedef struct sAVBlockHeader2Type
|
||||
}PACKED sAVBlockHeader2Type;
|
||||
|
||||
|
||||
|
||||
/////音频类型
|
||||
enum
|
||||
{
|
||||
@@ -505,13 +792,12 @@ enum
|
||||
////音频每帧采样数
|
||||
enum
|
||||
{
|
||||
SAMPLE_NUM_80 = 0,
|
||||
SAMPLE_NUM_160 ,
|
||||
SAMPLE_NUM_320 ,
|
||||
SAMPLE_NUM_480 ,
|
||||
SAMPLE_NUM_1024 ,
|
||||
SAMPLE_NUM_2048 ,
|
||||
|
||||
SAMPLE_NUM_80 = 0,
|
||||
SAMPLE_NUM_160 ,
|
||||
SAMPLE_NUM_320 ,
|
||||
SAMPLE_NUM_480 ,
|
||||
SAMPLE_NUM_1024 ,
|
||||
SAMPLE_NUM_2048 ,
|
||||
};
|
||||
|
||||
|
||||
@@ -532,10 +818,14 @@ enum
|
||||
USR_CMD_PTZ_CTL, //云台控制
|
||||
USR_CMD_VIDEO_CTL, // 视频控制
|
||||
USR_CMD_REMOTLY_DEFENCE_CTL, //
|
||||
USR_CMD_PLAY_CTL,
|
||||
USR_CMD_REMOTLY_PLAY_CTL,
|
||||
USR_CMD_AUDIO_ONLY,
|
||||
USR_CMD_FM1188_CTL,
|
||||
USR_CMD_CURRENT_USERS_NS,
|
||||
USR_CMD_CAR_DIR_CTL, // 车子方向控制
|
||||
USR_CMD_FILE_INFO,
|
||||
USER_CMD_FOCALIZE = 0x09,
|
||||
USR_CMD_RECORD_STATUS,
|
||||
USR_CMD_MAX_NS,
|
||||
};
|
||||
|
||||
@@ -557,6 +847,9 @@ enum
|
||||
USR_CMD_OPTION_VIDEO_FAST_FORWARD, // 快进
|
||||
USR_CMD_OPTION_VIDEO_SLOW_FORWARD, //慢进
|
||||
USR_CMD_OPTION_VIDEO_STEP, // 单步
|
||||
USR_CMD_OPTION_VIDEO_LD, //high definition NPC:640*480 IPC:640*360
|
||||
USR_CMD_OPTION_VIDEO_FL, //low definition NPC:320*240 IPC:320*180
|
||||
USR_CMD_OPTION_VIDEO_HD, //low definition NPC:None IPC:1280*720
|
||||
};
|
||||
|
||||
//bCommandOption
|
||||
@@ -678,49 +971,49 @@ BOOL fgGetServerIPAddr(DWORD *pdwIPAddr,WORD *pwPort,const DWORD dwSerType);
|
||||
#ifdef __cplusplus
|
||||
class ShapeWarp
|
||||
{
|
||||
|
||||
|
||||
public:
|
||||
ShapeWarp();
|
||||
~ShapeWarp();
|
||||
|
||||
//key status
|
||||
const static int KEY_NONE = -1;
|
||||
const static int KEY_DOWN = 0;
|
||||
const static int KEY_UP = 1;
|
||||
const static int KEY_MOVE = 2;
|
||||
|
||||
//animation
|
||||
const static int ANI_NONE = 0;
|
||||
const static int ANI_ZOOM_AUTO_IN = 1;
|
||||
const static int ANI_ZOOM_AUTO_OUT = 2;
|
||||
const static int ANI_FLING = 3;
|
||||
const static int ROTE_SLOWLY = 4;
|
||||
|
||||
// graph mode
|
||||
const static int MANUL = 0; //manual
|
||||
const static int PANORAMA = 1; //panorama
|
||||
const static int PLAN = 2; //plan
|
||||
|
||||
//GestrueMode
|
||||
const static int GESTRUE_MODE_NONE = -1;
|
||||
const static int GESTRUE_MODE_FINGER = 0;
|
||||
const static int GESTRUE_MODE_SENSOR = 1;
|
||||
|
||||
//fisheye position
|
||||
const static int FISHEYE_TOP = 0;
|
||||
const static int FISHEYE_BOTTOM = 1;
|
||||
const static int FISHEYE_WALL = 2;
|
||||
|
||||
//fisheye type
|
||||
const static int FISHEYE_360 = 0;
|
||||
const static int FISHEYE_180 = 1;
|
||||
|
||||
// shape type
|
||||
const static int SHAPE_CIRCLE = 0;
|
||||
const static int SHAPE_180_HALF_SPHERE = 1;
|
||||
const static int SHAPE_CYLIDER = 2;
|
||||
const static int SHAPE_BOWLE = 3;
|
||||
|
||||
ShapeWarp();
|
||||
~ShapeWarp();
|
||||
|
||||
//key status
|
||||
const static int KEY_NONE = -1;
|
||||
const static int KEY_DOWN = 0;
|
||||
const static int KEY_UP = 1;
|
||||
const static int KEY_MOVE = 2;
|
||||
|
||||
//animation
|
||||
const static int ANI_NONE = 0;
|
||||
const static int ANI_ZOOM_AUTO_IN = 1;
|
||||
const static int ANI_ZOOM_AUTO_OUT = 2;
|
||||
const static int ANI_FLING = 3;
|
||||
const static int ROTE_SLOWLY = 4;
|
||||
|
||||
// graph mode
|
||||
const static int MANUL = 0; //manual
|
||||
const static int PANORAMA = 1; //panorama
|
||||
const static int PLAN = 2; //plan
|
||||
|
||||
//GestrueMode
|
||||
const static int GESTRUE_MODE_NONE = -1;
|
||||
const static int GESTRUE_MODE_FINGER = 0;
|
||||
const static int GESTRUE_MODE_SENSOR = 1;
|
||||
|
||||
//fisheye position
|
||||
const static int FISHEYE_TOP = 0;
|
||||
const static int FISHEYE_BOTTOM = 1;
|
||||
const static int FISHEYE_WALL = 2;
|
||||
|
||||
//fisheye type
|
||||
const static int FISHEYE_360 = 0;
|
||||
const static int FISHEYE_180 = 1;
|
||||
|
||||
// shape type
|
||||
const static int SHAPE_CIRCLE = 0;
|
||||
const static int SHAPE_180_HALF_SPHERE = 1;
|
||||
const static int SHAPE_CYLIDER = 2;
|
||||
const static int SHAPE_BOWLE = 3;
|
||||
const static int SHAPE_QUAD = 4;
|
||||
|
||||
|
||||
typedef void (*ShapeNotify)(int MsgType, int MsgAction);
|
||||
@@ -867,4 +1160,25 @@ public:
|
||||
#endif
|
||||
|
||||
|
||||
//return bytes per second
|
||||
DWORD dwGetAvBytesPerSec();
|
||||
|
||||
|
||||
/*
|
||||
BYTE bMainVersion = (wValue >> 8) & 0xff
|
||||
BYTE bSubVersion = wValue & 0xff
|
||||
*/
|
||||
WORD wGetSDKVersion();
|
||||
|
||||
#define LINK_OK 0 //link success
|
||||
#define LINK_ERROR_NONE 0x20104001 //no error, opertion is running.
|
||||
#define LINK_DNS_PARSE_FAILED 0x20104002 //parse DNS failed
|
||||
#define LINK_CHECK_LISTSERVER_RESPONSE_FAILED 0x20104003 //response from ListServer is invalidate
|
||||
#define LINK_GET_SERVERLIST_TIMEOUT 0x20104004 //get servers form ListServer timeout
|
||||
#define LINK_GET_P2PSERVER_HEARTBEAT_RESPONSE_FAILED 0x20104005 //wait heart beat from P2PServer failed
|
||||
#define LINK_LOGIN_ANOTHER_MACHINE 0x20104006 // login with another App Or Pc
|
||||
|
||||
unsigned int iP2PLinkStatus();
|
||||
|
||||
|
||||
#endif //_P2PC_INTERFACE_H
|
||||
|
||||
Executable → Regular
BIN
Binary file not shown.
Reference in New Issue
Block a user