Inherits from NSObject
Declared in RespokeEndpoint.h

Overview

Represents remote Endpoints. Endpoints are users of this application that are not the one logged into this instance of the application. An Endpoint could be logged in from multiple other instances of this app, each of which is represented by a Connection. The client can interact with endpoints by calling them or sending them messages. An endpoint can be a person using an app from a browser or a script using the APIs on a server.

Tasks

Other Methods

private Methods

Properties

connections

@property (readonly) NSArray *connections
Discussion

The connections associated with this endpoint

Declared In

RespokeEndpoint.h

delegate

@property (weak) id<RespokeEndpointDelegate> delegate
Discussion

The delegate that should receive notifications from the RespokeEndpointDelegate protocol

Declared In

RespokeEndpoint.h

directConnection

@property (readonly) RespokeDirectConnection *directConnection
Discussion

A direct connection to this endpoint. This can be used to send direct messages.

Declared In

RespokeEndpoint.h

endpointID

@property (readonly) NSString *endpointID
Discussion

The ID of this endpoint

Declared In

RespokeEndpoint.h

Instance Methods

didReceiveMessage:withTimestamp:

- (void)didReceiveMessage:(NSString *)message withTimestamp:(NSDate *)timestamp
Discussion

Process a received message

Parameters

message

The body of the message

timestamp

The message timestamp

Declared In

RespokeEndpoint+private.h

didSendMessage:withTimestamp:

- (void)didSendMessage:(NSString *)message withTimestamp:(NSDate *)timestamp
Discussion

Process a sent message

Parameters

message

The body of the message

timestamp

The message timestamp

Declared In

RespokeEndpoint+private.h

getConnectionWithID:skipCreate:

- (RespokeConnection *)getConnectionWithID:(NSString *)connectionID skipCreate:(BOOL)skipCreate
Discussion

Returns a connection with the specified ID, and optionally creates one if it does not exist

Parameters

connectionID

The ID of the connection

skipCreate

Whether or not to create a new connection if it is not found

Return Value

The connection that matches the specified ID, or nil if not found and skipCreate is true

Declared In

RespokeEndpoint+private.h

getMutableConnections

- (NSMutableArray *)getMutableConnections
Discussion

Expose the mutable version of the connections list to the rest of the SDK

Return Value

The mutable connections list for this endpoint

Declared In

RespokeEndpoint+private.h

getPresence

- (NSObject *)getPresence
Discussion

Get the current presence of this client

Return Value

The current presence value

Declared In

RespokeEndpoint.h

initWithSignalingChannel:endpointID:client:

- (instancetype)initWithSignalingChannel:(RespokeSignalingChannel *)channel endpointID:(NSString *)newEndpointID client:(RespokeClient *)newClient
Discussion

Initialize a new endpoint instance

Parameters

channel

The signaling channel to use

client

The client to which the endpoint belongs

Return Value

The newly initialized instance

Declared In

RespokeEndpoint+private.h

registerPresenceWithSuccessHandler:errorHandler:

- (void)registerPresenceWithSuccessHandler:(void ( ^ ) ( ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Register with the infrastructure to receive presence update notification messages for this endpoint

Parameters

successHandler

A block called when the operation is successful

errorHandler

A block called when an error occurred, passing a description of the error

Declared In

RespokeEndpoint.h

resolvePresence

- (void)resolvePresence
Discussion

Find the presence out of all known connections with the highest priority (most availability) and set it as the endpoint’s resolved presence.

Declared In

RespokeEndpoint+private.h

sendMessage:push:ccSelf:successHandler:errorHandler:

- (void)sendMessage:(NSString *)message push:(BOOL)push ccSelf:(BOOL)ccSelf successHandler:(void ( ^ ) ( void ))successHandler errorHandler:(void ( ^ ) ( NSString *))errorHandler
Discussion

Send a message to the endpoint through the infrastructure.

Parameters

message

The message to send

push

A flag indicating if a push notification should be sent for this message

ccSelf

A flag indicating if the message should be copied to other devices the client might be logged into

successHandler

A block called when the message is sent successfully

errorHandler

A block called when an error occurred, passing a description of the error

Declared In

RespokeEndpoint.h

setDirectConnection:

- (void)setDirectConnection:(RespokeDirectConnection *)newDirectConnection
Discussion

Associate a direct connection object with this endpoint

Parameters

newDirectConnection

The direct connection to associate

Declared In

RespokeEndpoint+private.h

setPresence:

- (void)setPresence:(NSObject *)newPresence
Discussion

Set the presence value for this endpoint

Parameters

newPresence

The new presence value

Declared In

RespokeEndpoint+private.h

startAudioCallWithDelegate:

- (RespokeCall *)startAudioCallWithDelegate:(id<RespokeCallDelegate>)delegate
Discussion

Create a new audio-only call.

Parameters

delegate

The delegate to receive notifications about the new call

Return Value

A reference to the new RespokeCall object representing this call

Declared In

RespokeEndpoint.h

startDirectConnection

- (RespokeDirectConnection *)startDirectConnection
Discussion

Create a new DirectConnection. This method creates a new Call as well, attaching this DirectConnection to it for the purposes of creating a peer-to-peer link for sending data such as messages to the other endpoint. Information sent through a DirectConnection is not handled by the cloud infrastructure.

Return Value

The DirectConnection which can be used to send data and messages directly to the other endpoint.

Declared In

RespokeEndpoint.h

startVideoCallWithDelegate:remoteVideoView:localVideoView:

- (RespokeCall *)startVideoCallWithDelegate:(id<RespokeCallDelegate>)delegate remoteVideoView:(UIView *)newRemoteView localVideoView:(UIView *)newLocalView
Discussion

Create a new call with audio and video.

Parameters

delegate

The delegate to receive notifications about the new call

newRemoteView

A UIView on which to project the remote video

newLocalView

A UIView on which to project the local video

Return Value

A reference to the new RespokeCall object representing this call

Declared In

RespokeEndpoint.h