linphone-ios/Classes/LinphoneManager.h
Yann Diorcet d2253e0532 Merge branch 'new_ui' of git://git.linphone.org/linphone-iphone into buschjaeger_new_ui
Conflicts:
	Classes/AboutViewController.h
	Classes/AboutViewController.m
	Classes/AboutViewController.xib
	Classes/ChatRoomTableViewController.m
	Classes/ChatRoomViewController.m
	Classes/ChatTableViewController.m
	Classes/ContactDetailsTableViewController.m
	Classes/ContactDetailsViewController.m
	Classes/ContactsTableViewController.m
	Classes/HistoryDetailsViewController.m
	Classes/HistoryTableViewController.m
	Classes/HistoryViewController.m
	Classes/ImageViewController.h
	Classes/ImageViewController.m
	Classes/InCallTableViewController.h
	Classes/InCallTableViewController.m
	Classes/InCallViewController.m
	Classes/IncomingCallViewController.h
	Classes/IncomingCallViewController.m
	Classes/LinphoneAppDelegate.m
	Classes/LinphoneCoreSettingsStore.m
	Classes/LinphoneManager.m
	Classes/LinphoneUI/UICallBar.m
	Classes/LinphoneUI/UICallCell.h
	Classes/LinphoneUI/UICallCell.m
	Classes/LinphoneUI/UIChatCell.m
	Classes/LinphoneUI/UIChatRoomCell.m
	Classes/LinphoneUI/UIChatRoomCell.xib
	Classes/LinphoneUI/UICompositeViewController.m
	Classes/LinphoneUI/UIContactDetailsHeader.m
	Classes/LinphoneUI/UIMainBar.m
	Classes/LinphoneUI/UIStateBar.m
	Classes/LinphoneUI/en.lproj/UICallBar.xib
	Classes/LinphoneUI/en.lproj/UICallBar~ipad.xib
	Classes/LinphoneUI/en.lproj/UICallCell.xib
	Classes/LinphoneUI/en.lproj/UIConferenceHeader.xib
	Classes/LinphoneUI/fr.lproj/UICallBar.xib
	Classes/LinphoneUI/fr.lproj/UICallBar~ipad.xib
	Classes/LinphoneUI/fr.lproj/UICallCell.xib
	Classes/LinphoneUI/fr.lproj/UIConferenceHeader.xib
	Classes/PhoneMainView.m
	Classes/SettingsViewController.m
	Classes/WizardViewController.h
	Classes/WizardViewController.m
	Classes/en.lproj/DialerViewController.xib
	Classes/en.lproj/IncomingCallViewController.xib
	Classes/fr.lproj/DialerViewController.xib
	Classes/fr.lproj/IncomingCallViewController.xib
	Resources/en.lproj/Localizable.strings
	Resources/fr.lproj/Localizable.strings
	Settings.bundle/Root.plist
	Settings/InAppSettings.bundle/en.lproj/Audio.strings
	Settings/InAppSettings.bundle/fr.lproj/Audio.strings
	linphone-Info.plist
	linphone.ldb/Contents.plist
	linphone.ldb/Resources/Classes/DialerViewController/5/DialerViewController.xib
	linphone.ldb/Resources/Classes/ImageViewController/11/ImageViewController.xib
	linphone.ldb/Resources/Classes/IncomingCallViewController/9/IncomingCallViewController.xib
	linphone.ldb/Resources/InAppSettings.bundle/Audio/1/Audio.strings
	linphone.ldb/Resources/LinphoneUI/UICallBar/10/UICallBar.xib
	linphone.ldb/Resources/LinphoneUI/UICallBar~ipad/8/UICallBar~ipad.xib
	linphone.ldb/Resources/LinphoneUI/UICallCell/10/UICallCell.xib
	linphone.ldb/Resources/LinphoneUI/UIConferenceHeader/6/UIConferenceHeader.xib
	linphone.ldb/Resources/Resources/Localizable/1/Localizable.strings
	linphone.xcodeproj/project.pbxproj
	submodules/build/builders.d/openssl.mk
2012-10-10 13:04:05 +02:00

175 lines
6 KiB
Objective-C

/* LinphoneManager.h
*
* Copyright (C) 2011 Belledonne Comunications, Grenoble, France
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#import <Foundation/Foundation.h>
#import <AVFoundation/AVAudioSession.h>
#import <SystemConfiguration/SCNetworkReachability.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AssetsLibrary/ALAssetsLibrary.h>
#import <CoreTelephony/CTCallCenter.h>
#import <sqlite3.h>
#import "FastAddressBook.h"
#import "Utils.h"
/* MODIFICATION: Add buschjaeger configuration */
#import "BuschJaegerConfiguration.h"
/**/
#include "linphonecore.h"
extern const char *const LINPHONERC_APPLICATION_KEY;
extern NSString *const kLinphoneCoreUpdate;
extern NSString *const kLinphoneDisplayStatusUpdate;
extern NSString *const kLinphoneTextReceived;
extern NSString *const kLinphoneCallUpdate;
extern NSString *const kLinphoneRegistrationUpdate;
extern NSString *const kLinphoneMainViewChange;
/* MODIFICATION: Add buschjaeger configuration event */
extern NSString *const kLinphoneConfigurationUpdate;
extern NSString *const kLinphoneConfigurationPath;
extern NSString *const kLinphonePEMPath;
extern NSString *const kLinphoneDERPath;
/**/
extern NSString *const kLinphoneAddressBookUpdate;
extern NSString *const kLinphoneLogsUpdate;
extern NSString *const kLinphoneSettingsUpdate;
extern NSString *const kContactSipField;
typedef enum _Connectivity {
wifi,
wwan
,none
} Connectivity;
/* Application specific call context */
typedef struct _CallContext {
LinphoneCall* call;
bool_t cameraIsEnabled;
} CallContext;
struct NetworkReachabilityContext {
bool_t testWifi, testWWan;
void (*networkStateChanged) (Connectivity newConnectivity);
};
@interface LinphoneCallAppData :NSObject {
@public
bool_t batteryWarningShown;
UILocalNotification *notification;
NSMutableDictionary *userInfos;
bool_t videoRequested; /*set when user has requested for video*/
};
@end
typedef struct _LinphoneManagerSounds {
SystemSoundID call;
/* MODIFICATION add level ringtone */
SystemSoundID level;
/**/
SystemSoundID message;
} LinphoneManagerSounds;
@interface LinphoneManager : NSObject <AVAudioSessionDelegate> {
@protected
SCNetworkReachabilityRef proxyReachability;
@private
NSTimer* mIterateTimer;
NSMutableArray* pendindCallIdFromRemoteNotif;
Connectivity connectivity;
BOOL stopWaitingRegisters;
UIBackgroundTaskIdentifier pausedCallBgTask;
UIBackgroundTaskIdentifier incallBgTask;
CTCallCenter* callCenter;
/* MODIFICATION: Add NSUSerdefault settings */
NSDictionary *currentSettings;
/**/
@public
CallContext currentCallContextBeforeGoingBackground;
}
+ (LinphoneManager*)instance;
#ifdef DEBUG
+ (void)instanceRelease;
#endif
+ (LinphoneCore*) getLc;
+ (BOOL)isLcReady;
+ (BOOL)runningOnIpad;
+ (BOOL)isNotIphone3G;
+ (NSString *)getPreferenceForCodec: (const char*) name withRate: (int) rate;
+ (NSSet *)unsupportedCodecs;
+ (NSString *)getUserAgent;
- (void)startLibLinphone;
- (void)destroyLibLinphone;
- (BOOL)resignActive;
- (void)becomeActive;
- (BOOL)enterBackgroundMode;
- (void)enableAutoAnswerForCallId:(NSString*) callid;
- (void)addPushTokenToProxyConfig: (LinphoneProxyConfig*)cfg;
- (BOOL)shouldAutoAcceptCallForCallId:(NSString*) callId;
- (void)acceptCallForCallId:(NSString*)callid;
- (void)waitForRegisterToArrive;
+ (void)kickOffNetworkConnection;
- (void)setupNetworkReachabilityCallback;
- (void)refreshRegisters;
+ (BOOL)copyFile:(NSString*)src destination:(NSString*)dst override:(BOOL)override;
+ (NSString*)bundleFile:(NSString*)file;
+ (NSString*)documentFile:(NSString*)file;
- (void)call:(NSString *)address displayName:(NSString*)displayName transfer:(BOOL)transfer;
- (void)lpConfigSetString:(NSString*)value forKey:(NSString*)key;
- (NSString*)lpConfigStringForKey:(NSString*)key;
- (void)lpConfigSetString:(NSString*)value forKey:(NSString*)key forSection:(NSString*)section;
- (NSString*)lpConfigStringForKey:(NSString*)key forSection:(NSString*)section;
- (void)lpConfigSetInt:(NSInteger)value forKey:(NSString*)key;
- (NSInteger)lpConfigIntForKey:(NSString*)key;
- (void)lpConfigSetInt:(NSInteger)value forKey:(NSString*)key forSection:(NSString*)section;
- (NSInteger)lpConfigIntForKey:(NSString*)key forSection:(NSString*)section;
- (void)lpConfigSetBool:(BOOL)value forKey:(NSString*)key;
- (BOOL)lpConfigBoolForKey:(NSString*)key;
- (void)lpConfigSetBool:(BOOL)value forKey:(NSString*)key forSection:(NSString*)section;
- (BOOL)lpConfigBoolForKey:(NSString*)key forSection:(NSString*)section;
/* MODIFICATION: Add NSUSerdefault settings */
- (BOOL)reconfigureLinphone;
/**/
/* MODIFICATION: Disable addressbook
@property (readonly) FastAddressBook* fastAddressBook;
*/
@property Connectivity connectivity;
@property (readonly) const char* frontCamId;
@property (readonly) const char* backCamId;
@property (readonly) sqlite3* database;
@property (readonly) BuschJaegerConfiguration *configuration;
@property (nonatomic, retain) NSData *pushNotificationToken;
@property (readonly) LinphoneManagerSounds sounds;
@property (readonly) NSMutableArray *logs;
@property (nonatomic, assign) BOOL speakerEnabled;
@property (readonly) ALAssetsLibrary *photoLibrary;
@end