mirror of https://github.com/oxen-io/session-ios
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
51 lines
1.5 KiB
Objective-C
51 lines
1.5 KiB
Objective-C
//
|
|
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "CallAudioManager.h"
|
|
#import "CallConnectUtil.h"
|
|
#import "CallController.h"
|
|
#import "Contact.h"
|
|
#import "Environment.h"
|
|
#import "InitiatorSessionDescriptor.h"
|
|
#import "Logging.h"
|
|
#import "PhoneNumber.h"
|
|
#import "ResponderSessionDescriptor.h"
|
|
#import "Terminable.h"
|
|
|
|
/**
|
|
*
|
|
* PhoneManager is the highest level class, just below the UI layer.
|
|
* It is in charge of the state of the phone (calling, busy, etc).
|
|
* User actions like 'make a call' should roughly translate one-to-one with the exposed methods.
|
|
*
|
|
*/
|
|
@interface PhoneManager : NSObject <Terminable> {
|
|
@private
|
|
ObservableValueController *currentCallControllerObservable;
|
|
@private
|
|
ObservableValueController *currentCallStateObservable;
|
|
@private
|
|
int64_t lastIncomingSessionId;
|
|
}
|
|
|
|
@property (readonly, nonatomic, copy) ErrorHandlerBlock errorHandler;
|
|
|
|
- (void)initiateOutgoingCallToRemoteNumber:(PhoneNumber *)remoteNumber;
|
|
- (void)initiateOutgoingCallToContact:(Contact *)contact atRemoteNumber:(PhoneNumber *)remoteNumber;
|
|
- (void)incomingCallWithSession:(ResponderSessionDescriptor *)session;
|
|
- (void)hangupOrDenyCall;
|
|
- (void)answerCall;
|
|
- (BOOL)toggleMute;
|
|
- (void)backgroundTimeExpired;
|
|
|
|
// Returns YES IFF there is an ongoing RedPhone call.
|
|
- (BOOL)hasOngoingRedphoneCall;
|
|
|
|
- (ObservableValue *)currentCallObservable;
|
|
|
|
+ (PhoneManager *)phoneManagerWithErrorHandler:(ErrorHandlerBlock)errorHandler;
|
|
|
|
@end
|