ios-app-delegate.h 1.79 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
/*
* Copyright (c) 2010-2019 Belledonne Communications SARL.
*
* This file is part of Liblinphone.
*
* 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 3 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, see <http://www.gnu.org/licenses/>.
*/

#include <UIKit/UIKit.h>
#include "private.h"
22
#import <UserNotifications/UserNotifications.h>
23

24
@interface IosObject : NSObject {
25 26 27
	std::shared_ptr<LinphonePrivate::Core> pcore;
}

28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
- (id)initWithCore:(std::shared_ptr<LinphonePrivate::Core>)core;

@end

/*
 Used only by mais core.
 IosAppDelegate is an object taking care of all application delegate's notifications and iteartion:
 UIApplicationDidEnterBackgroundNotification
 UIApplicationWillEnterForegroundNotification
 iteration
 Its lifecicle is the same as the one from linphonecore init to destroy.
 */
@interface IosAppDelegate : IosObject

- (id)initWithCore:(std::shared_ptr<LinphonePrivate::Core>)core;
DanmeiChen's avatar
DanmeiChen committed
43
- (void)configure:(std::shared_ptr<LinphonePrivate::Core>)core;
44 45 46 47 48 49 50 51 52 53 54

@end

/*
 IosHandler is an object taking cahrge of all ios system's notifications:
 AVAudioSessionRouteChangeNotification
 Its lifecicle is the same as the one from core start to stop.
 */
@interface IosHandler : IosObject

- (id)initWithCore:(std::shared_ptr<LinphonePrivate::Core>)core;
55
- (void)reloadDeviceOnRouteChangeCallback: (NSNotification *) notif;
56 57

@end