You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

104 lines
2.4 KiB

//
// JCManager.h
// watch
//
// Created by Apple on 2019/4/29.
// Copyright © 2019年 xTT. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <JCSDKOC/JCSDKOC.h>
#import "JuPhoonCallViewController.h"
#import "JuphoonModel.h"
//默认是等待时间 60
#define DefineCallWaitTime 60
//默认 限制时间 60*3
#define DefineVideoLimitTime 60*3
//默认 限制时间前的提示 的倒数时间 30
#define DefineVideoLimitBeforeShowTime 30
//通话状态改变
#define kCallNotification @"kCallNotification"
//拨打设备
#define kCallWatchNotification @"kCallWatchNotification"
//登录状态
#define kClientOnLoginSuccessNotification @"kClientOnLoginNotification"
#define kClientOnLoginFailNotification @"kClientOnLoginFailNotification"
#define kClientOnLogoutNotification @"kClientOnLogoutNotification"
NS_ASSUME_NONNULL_BEGIN
@class JCClient;
@class JCMediaDevice;
@class JCCall;
@class JCAccount;
/**
能再次点击视频通话按钮的回调
*/
typedef void (^CanReCallBlock)(void);
@interface JCManager : NSObject
@property (nonatomic, strong) UIViewController* gMianVC;
@property (nonatomic, strong) JCClient* client;
/**
是否登录
*/
@property (nonatomic, readonly) BOOL islogin;
@property (nonatomic, strong) JCMediaDevice* mediaDevice;
@property (nonatomic, strong) JCCall* call;
@property (nonatomic, strong) JCAccount* account;
@property (nonatomic, strong) JCPush* push;
@property (nonatomic, strong) JuPhoonCallViewController *callViewController;
@property (nonatomic) bool pstnMode;
@property (nonatomic) bool uriMode;
/**
拨打时的等待时间(单位:s)
*/
@property (nonatomic, assign) int wait_time;
/**
限制视频通话时长(单位:s)
*/
@property (nonatomic, assign) int limit_time;
/**
视频通话的设备 对象
*/
@property (nonatomic, strong) Device * device;
@property (strong, nonatomic) JuphoonModel *model;
/**
推送内容 可能是空的
*/
@property (strong, nonatomic) NSDictionary *pushData;
/**
是否查询后拨打
*/
@property (nonatomic) BOOL isSeachAndCall;
/**
能再次点击视频通话按钮的回调
*/
@property (copy, nonatomic)CanReCallBlock canReCallBlock;
+ (JCManager*)shared;
-(bool)initializeWithAPPKey:(NSString*)appkey;
-(void)uninitialize;
/**
拨打视频电话
@param userName 用户名
*/
-(void)callVideoWithUserName;
- (void)_stopCallTimeoutTimer;
- (void)_stopVideoLimitTimeoutTimer;
@end
NS_ASSUME_NONNULL_END