102 lines
3.3 KiB
Objective-C
Executable File
102 lines
3.3 KiB
Objective-C
Executable File
//
|
||
// talk_Class.h
|
||
// myhome
|
||
//
|
||
// Created by user on 12-11-15.
|
||
// Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
|
||
//
|
||
|
||
#import <Foundation/Foundation.h>
|
||
|
||
//#import "myPlayer.h"
|
||
#import "playAudio.h"
|
||
#import "recordAudio.h"
|
||
#import "IframeInfo.h"
|
||
//#import "recordAndplayAudio.h"
|
||
//#import "g722_interface.h"
|
||
|
||
|
||
#define ABUF_NUM 100
|
||
#define POS_iframe_index 63
|
||
#define POS_alen 65
|
||
#define POS_blen 73
|
||
#define POS_bag_index 71
|
||
#define POS_bag_num 69
|
||
#define POS_data 77
|
||
#define FIRSTINDEX 1
|
||
|
||
|
||
@interface talk_Class : NSObject{
|
||
NSTimer *timer;
|
||
NSData *connect_data;
|
||
NSString *remoteEquid;
|
||
NSString *remoteIp;
|
||
int remotePort;
|
||
IframeInfo *iframe;
|
||
//NSString *groupIp;
|
||
|
||
//BOOL isShort;
|
||
playAudio *audio;
|
||
recordAudio *arecord;
|
||
//recordAndplayAudio *recordAndPaly;
|
||
//int status;//0:初始状态 1:等待监视 2:等待呼叫 3:监视中 4:呼叫成功 5:主角通话中 6:被叫通话 8:被叫通话中
|
||
}
|
||
|
||
@property (nonatomic, retain) NSString *groupIp;
|
||
@property (nonatomic, retain) playAudio *audio;
|
||
@property (nonatomic, retain) recordAudio *arecord;
|
||
@property (nonatomic, retain) IframeInfo *iframe;
|
||
@property int status;//0:初始状态 1:等待监视 2: 3:监视中 4:呼叫成功 5:主角通话中 6:被叫通话 8:被叫通话中
|
||
@property int Version;
|
||
@property BOOL isShort;
|
||
@property (nonatomic) int vedioCodecMode; //1: 8130 2: h264视频编码
|
||
@property (nonatomic) int audioEquMode;
|
||
@property (nonatomic) long connect_reg_time;
|
||
@property (nonatomic) long talkOnTime;
|
||
//@property BOOL isAudioInit;
|
||
|
||
- (void)status_ini;
|
||
- (void)status_ini_onMain;
|
||
|
||
- (void)connect_rec;
|
||
- (void)watch;
|
||
- (void)watchByServer;
|
||
- (void)watchSucc:(Byte *)bb Len:(int)bblen Formip:(NSString *)ip fromport:(int)port;
|
||
- (void)watchEnd;
|
||
- (void)talkOn;
|
||
- (void)talkEnd;
|
||
- (void)talkOnByRemote;
|
||
- (void)getImgData:(Byte *)bb len:(int)l;
|
||
- (void)getAVData:(Byte *)bb;
|
||
- (void)getAVData:(Byte *)bb length:(int)blen;
|
||
- (void)openDoor:(NSString *)pwd;
|
||
- (void) showplayer;
|
||
- (void)NSAsk:(Byte *)bb Len:(int)bblen Formip:(NSString *)ip fromport:(int)port;
|
||
//-(void)RecvNSReply:(NSData *)data fromHost:(NSString *)host fromPort:(NSString *)port;
|
||
//-(void)getdadong:(NSData *)data fromHost:(NSString *)host fromPort:(NSString *)port;
|
||
- (void)RecvNSReply:(NSData *)data fromHost:(NSString *)host fromPort:(int)port;
|
||
- (void)getdadong:(NSData *)data fromHost:(NSString *)host fromPort:(int)port;
|
||
- (void)WatchCallAnswer:(NSData *)data fromHost:(NSString *)host;
|
||
- (void)BeCall:(Byte *)bb Len:(int)bblen Formip:(NSString *)ip fromport:(int)port;//收到呼叫
|
||
- (void)talkOnRec:(Byte *)bb;
|
||
- (void)NSToServer;
|
||
//- (void)getH264AVData:(Byte *)bb length:(int)blen;
|
||
- (void)getAVData:(Byte *)bb withLength:(unsigned long)blen;
|
||
|
||
- (void)audioStartWithMode:(int)mod;
|
||
- (void)audioEnd;
|
||
|
||
- (BOOL)isVideoPlaying;
|
||
- (NSString *)getRemoteEqu;
|
||
- (void)SetRemoteEqu:(NSString *)equid;
|
||
- (void)addHead:(NSString *)head toByte:(Byte *)bb;
|
||
- (void)addEquid:(NSString *)equid addIp:(NSString *)ip toByte:(Byte *)bb at:(int)pos;
|
||
- (NSString *)getIpv6FromBtye:(Byte *)bb At:(int)pos;
|
||
- (NSString *)getIpFromBtye:(Byte *)bb At:(int)pos;
|
||
- (int)getPortFromBtye:(Byte *)bb At:(int)pos;
|
||
- (NSString *)getRemoteIp;
|
||
- (void)SetRemoteIp:(NSString *)ip;
|
||
- (int)getRemotePort;
|
||
- (void)SetRemotePort:(int)port;
|
||
@end
|