Sip Endpoint SDK for Apple OS
<GSConnectionManager> Protocol Reference

#import <GSConnectionManager.h>

List of all members.

Public Member Functions

(id< GSConnection >) - addConnectionForUser:server:transport:
(void) - removeConnection:
(NSArray *) - connectionsForUser:toServer:withTransport:
(NSArray *) - connectionsForUser:toServer:
(NSArray *) - connectionsToServer:
(NSArray *) - connectionsToServer:withTransport:
(NSArray *) - allConnections

Properties

id
< GSConnectionNotificationDelegate
notificationDelegate
id< GSConnectionPolicyDelegatepolicyDelegate

Detailed Description

This protocol defines connection manager functionality. Note: all NSArrays returned by this protocol's methods hold objects of type id<GSConnection>.

Definition at line 10 of file GSConnectionManager.h.


Member Function Documentation

- (id<GSConnection>) addConnectionForUser: (NSString *)  user
server: (NSString *)  server
transport: (NSString *)  transport 

Adds a new connection

Parameters:
userthe user id
serverthe server address
transportthe transport protocol (valid values are 'tcp' or 'udp')
Returns:
a newly created connection object or nil if the operation is not successful.
- (NSArray*) allConnections
Returns:
a snapshot of current connections
- (NSArray*) connectionsForUser: (NSString *)  user
toServer: (NSString *)  server 

Utility method to retrieve a snapshot of current connections for the specified user id and server.

Parameters:
userthe user id for the connection
serverthe server address
Returns:
a list of all connections matching the specified criteria
- (NSArray*) connectionsForUser: (NSString *)  user
toServer: (NSString *)  server
withTransport: (NSString *)  transport 

Utility method to retrieve a snapshot of current connections for the specified user id, server and transport. Note that passing 'nil' for any parameter is acceptable and means that the parameter will be excluded from the condition. For instance: [myInstance connectionsForUser:"user1" toServer:@"server1" withTransport:nil] will return either tcp or udp connections to the specified server for the specified user.

Parameters:
userthe user id for the connection
serverthe server address
transportthe transport protocol
Returns:
a list of all connections matching the specified criteria
- (NSArray*) connectionsToServer: (NSString *)  server

Utility method to retrieve a snapshot of current connections to the specified server.

Parameters:
serverthe server address
Returns:
a list of all connections to the specified server
- (NSArray*) connectionsToServer: (NSString *)  server
withTransport: (NSString *)  transport 

Utility method to retrieve a snapshot of current connections with the specified transport to the given server.

Parameters:
serverthe server address
transportthe transport protocol
Returns:
a list of all connections matching the specified criteria
- (void) removeConnection: (id< GSConnection >)  connection

Removes (and disables) the specified connection.

Parameters:
connectionthe connection to remove (note that the connection object must not be a copy).

Property Documentation

- (id<GSConnectionNotificationDelegate>) notificationDelegate [read, write, assign]

When set, the object implementing the GSConnectionNotificationDelegate protocol will be notified of all connection state changes.

See also:
GSConnectionNotificationDelegate

Definition at line 83 of file GSConnectionManager.h.

- (id<GSConnectionPolicyDelegate>) policyDelegate [read, write, assign]

Get/set the policy which defines connection behavior.

Definition at line 88 of file GSConnectionManager.h.


The documentation for this protocol was generated from the following file: