#import <MumbleKit/MKServerModel.h>
MKServerModel wraps an MKConnection and acts as its message handler. It provides an easy to use interface for interacting with a Mumble server.
- (void) addDelegate: |
|
(id) |
delegate |
|
Add a delegate. The delegate may only implement parts of the MKServerModelDelegate protocol.
- Parameters
-
delegate | The delegate to add. |
- (MKChannel *) channelWithId: |
|
(NSUInteger) |
channelId |
|
Look up a channel by its channel ID.
- Parameters
-
channelId | The channel ID to look up. |
- (void) createChannelWithName: |
|
(NSString *) |
channelName |
parent: |
|
(MKChannel *) |
parent |
temporary: |
|
(BOOL) |
temp |
|
|
| |
Create a new channel in the server the underlying MKConnection is currently connected to.
- Parameters
-
channelName | The name of the channel to create. |
parent | The MKChannel that must contain the newly created one. |
temp | Specify if the channel is temporary or not. |
Ask the underlying connection to join the given channel.
- Parameters
-
channel | The channel to join. |
- (void) removeDelegate: |
|
(id) |
delegate |
|
Remove a delegate from the MKServerModel.
- Parameters
-
delegate | The delegate to remove. |
- (void) requestAccessControlForChannel: |
|
(MKChannel *) |
channel |
|
Ask the underlying connection to receive the access control for the given channel.
- Parameters
-
channel | The channel for which you are requesting the access control. |
Get the root channel of the server the underlying MKConnection is currently connected to.
- Returns
- Returns a MKChannel object pointing to the root channel.
Send a message to all users in the the channel chan.
- Parameters
-
txtMsg | The text message to send. |
chan | The destination channel. |
Send a message to all users in the channel chan and all of its descendants (subchannels, children of subchannels, and so on).
- Parameters
-
txtMsg | The text message to send. |
chan | The destination channel. |
- (void) sendTextMessage: |
|
(MKTextMessage *) |
txtMsg |
toTreeChannels: |
|
(NSArray *) |
trees |
andChannels: |
|
(NSArray *) |
channels |
andUsers: |
|
(NSArray *) |
users |
|
|
| |
Send a text message to the given destinations.
One, or multiple of tree, channels and users must be passed to the method.
Sending a message to a chnanel is the same as sending to all users in that channel; receivers cannot distinguish between receiving a 'channel' message, and a message specifically targetted at them.
- Parameters
-
txtMsg | The text message to send. |
trees | An NSArray of MKChannel objects (or nil). The message will be sent to all channels in this array, and recursively to their descendants (subchannels, children of subchannels, and so on). |
channels | An NSArray of MKChannel objects (or nil). The message will be sent to all channels in this array. |
users | An NSArray of MKUser objects (or nil). |
Send a message to the user user.
- Parameters
-
txtMsg | The text message to send. |
user | The user to send the message to. |
Set access control for a channel.
- Parameters
-
acl | The access control you want to set. |
channel | The channel for which you are setting the access control. |
- (void) setAccessTokens: |
|
(NSArray *) |
tokens |
|
Set the list of access tokens for the currently connected user.
- Parameters
-
tokens | An NSArray of strings containing the tokens to use as access tokens for the connected user. |
- (MKUser *) userWithHash: |
|
(NSString *) |
hash |
|
Look up a user by hash. Most commonly, the hash of a user is the SHA1 digest of their X.509 certificate.
- Parameters
-
hash | The hash to look up. (Typically a hex-encoded SHA1 digest). |
- Returns
- Returns the user with the given hash. Returns nil if the user does not exist on the server.
- (MKUser *) userWithSession: |
|
(NSUInteger) |
session |
|
Look up a user by session ID.
- Parameters
-
session | The session ID to look up. |
- Returns
- Returns the user with the given session ID. Returns nil if the user does not exist on the server.
The documentation for this class was generated from the following file:
- /Users/mkrautz/Documents/mumble-iphoneos/MumbleKit/src/MumbleKit/MKServerModel.h