开发版本-developer——01 first commit
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user