Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@protocol VGBaseClientDelegate <NSObject> // Connection API - (void) client:(VGBaseClient*)client didReceiveSessionErrorWithReason:(VGSessionErrorReason)reason; // Optional Base Client Delegate methods @optional - (void) clientWillReconnect:(VGBaseClient*)client; - (void) clientDidReconnect:(VGBaseClient*)client; @end
Swift
protocol VGBaseClientDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VGLogger <NSObject> @property (readonly) NSString* name; @property (readonly) VGLoggingLevel minLogLevel; @property (readonly) NSArray<VGTopicGroup> * topics; - (void) didReceiveLogWithLogLevel:(VGLoggingLevel)logLevel andTopic:(VGTopic*)topic andMessage:(NSString*)message NS_SWIFT_NAME(didReceiveLog(logLevel:topic:message:)); @end
-
Undocumented
See moreDeclaration
Objective-C
@protocol VGVoiceClientAPI <NSObject> // Outbound Call API - (void) serverCall:(ServerCallCallback)callback NS_SWIFT_ASYNC(1); - (void) serverCall:(nullable NSDictionary *)context callback:(ServerCallCallback)callback NS_SWIFT_ASYNC(2); // Inbound Call API - (void) answer:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) reject:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); // Push API - (nullable VGCallId) processCallInvitePushData:( NSDictionary * _Nonnull )dict; // Call Leg API - (void) getLeg:(NSString *)leg callback:(GetLegCallback)callback NS_SWIFT_ASYNC(2); /** This method is used to retrieve a list of conversations that the user is a member of. - Parameters: - callId: The id of the call - callback: A callback function to be called upon completion of the method. It takes in two parameters: [Error] An exception object, if an error occurred during the fetch. [VGVoiceLegsPage] It will contain the list of legs and the cursors for the next and previous page of results, if the fetch was successful. */ - (void)getCallLegs:(VGCallId)callId callback:(nonnull void (^)(NSError * _Nullable error, VGVoiceLegsPage * _Nullable legsPage))callback NS_SWIFT_NAME(getCallLegs(_:callback:)) NS_SWIFT_ASYNC(2); /** This method is used to retrieve a list of conversations that the user is a member of. - Parameters: - callId: The id of the call - parameters: An optional [GetCallLegsParameters] object containing the parameters for the request. - callback: A callback function to be called upon completion of the method. It takes in two parameters: [Error] An exception object, if an error occurred during the fetch. [VGVoiceLegsPage] It will contain the list of legs and the cursors for the next and previous page of results, if the fetch was successful. */ - (void)getCallLegs:(VGCallId)callId parameters:(VGGetCallLegsParameters * _Nullable)parameters callback:(nonnull void (^)(NSError * _Nullable error, VGVoiceLegsPage * _Nullable legsPage))callback NS_SWIFT_NAME(getCallLegs(_:parameters:callback:)) NS_SWIFT_ASYNC(3); // Call Action API - (void) reconnect:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2) NS_SWIFT_NAME(reconnectCall(_:callback:)); - (void) hangup:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) hangup:(VGCallId)callId reason:(nullable NSString *)reasonText code:(nullable NSString *)reasonCode callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(4); - (void) say:(VGCallId)callId text:(NSString *)text callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(3); - (void) say:(VGCallId)callId text:(NSString *)text level:(nullable NSNumber*)level loop:(nullable NSNumber*)loop queue:(BOOL)queue voiceName:(nullable NSString*)voiceName ssml:(BOOL)ssml callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(8); - (void) mute:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) unmute:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) enableEarmuff:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) disableEarmuff:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) enableNoiseSuppression:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) disableNoiseSuppression:(VGCallId)callId callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(2); - (void) sendDTMF:(VGCallId)callId withDigits:(NSString *)digits callback:(VonageErrorCallback)callback NS_SWIFT_ASYNC(3); /** * Register Device VoIP Token for Voip push * @param voipToken VoIP token used for VoIP push and CallKit * @param isSandbox are tokens for sandbox APNS push environment (default production) * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken * @code [voiceClient registerVoipToken:(NSData * _Nonnull)voipToken isSandbox:(Boolean * _Nullable) callback:(void (^)(NSError * _Nullable))] */ - (void)registerVoipToken:(nonnull NSData *)voipToken isSandbox:(BOOL)isSandbox callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback NS_SWIFT_ASYNC(3); /** * Register Device VoIP Token for Voip push * @param voipToken VoIP token used for VoIP push and CallKit * @param callback with the error and success with deviceId of the registerVoipToken:withDeviceToken * @code [voiceClient registerVoipToken:(NSData * _Nonnull) callback:(void (^)(NSError * _Nullable))] */ - (void)registerVoipToken:(nonnull NSData *)voipToken callback:(nonnull void (^)(NSError * _Nullable error, NSString * _Nullable deviceId))callback NS_SWIFT_ASYNC(2); // Call Media API @property (class, nonatomic) BOOL isUsingCallKit; #if TARGET_OS_IOS + (void) enableAudio:(AVAudioSession *)audioSession; + (void) disableAudio:(AVAudioSession *)audioSession; #endif @end
Swift
protocol VGVoiceClientAPI : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol VGVoiceClientDelegate <NSObject, VGBaseClientDelegate> - (void) voiceClient:(VGVoiceClient*)client didReceiveInviteForCall:(VGCallId)callId from:(NSString*)caller withChannelType:(VGVoiceChannelType)type; - (void) voiceClient:(VGVoiceClient*)client didReceiveHangupForCall:(VGCallId)callId withQuality:(VGRTCQuality*)callQuality andReason:(VGHangupReason)reason NS_SWIFT_NAME(voiceClient(_:didReceiveHangupForCall:withQuality:reason:)); - (void) voiceClient:(VGVoiceClient*)client didReceiveInviteCancelForCall:(VGCallId)callId withReason:(VGVoiceInviteCancelReason)reason; @optional - (void) voiceClient:(VGVoiceClient*)client didReceiveCallTransferForCall:(VGCallId)callId withConversationId:(NSString *)conversationId; - (void) voiceClient:(VGVoiceClient*)client didReceiveMuteForCall:(VGCallId)callId withLegId:(NSString*)legId andStatus:(Boolean)isMuted; - (void) voiceClient:(VGVoiceClient*)client didReceiveEarmuffForCall:(VGCallId)callId withLegId:(NSString*)legId andStatus:(Boolean)earmuffStatus; - (void) voiceClient:(VGVoiceClient*)client didReceiveDTMFForCall:(VGCallId)callId withLegId:(NSString*)legId andDigits:(NSString*)digits; - (void) voiceClient:(VGVoiceClient*)client didReceiveLegStatusUpdateForCall:(VGCallId)callId withLegId:(NSString*)legId andStatus:(VGLegStatus) status; - (void) voiceClient:(VGVoiceClient*)client didReceiveMediaDisconnectForCall:(VGCallId)callId reason:(VGCallDisconnectReason) reason; - (void) voiceClient:(VGVoiceClient*)client didReceiveMediaReconnectionForCall:(VGCallId)callId; - (void) voiceClient:(VGVoiceClient*)client didReceiveMediaReconnectingForCall:(VGCallId)callId; - (void) voiceClient:(VGVoiceClient*)client didReceiveRtcStatsUpdate:(VGRTCStats*)rtcStats forCall:(VGCallId)callId; - (void) voiceClient:(VGVoiceClient*)client didReceiveMediaErrorForCall:(VGCallId)callId error:(VGError*)error; @end
Swift
protocol VGVoiceClientDelegate : VGBaseClientDelegate