From aa9d2698c4a07e3de0ee81a485b5cab00e4b8e2a Mon Sep 17 00:00:00 2001 From: Mikkel Krautz Date: Sun, 20 Nov 2011 22:42:50 +0100 Subject: Access token support. --- src/MumbleKit/MKConnection.h | 6 +++++- src/MumbleKit/MKServerModel.h | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 1 deletion(-) (limited to 'src/MumbleKit') diff --git a/src/MumbleKit/MKConnection.h b/src/MumbleKit/MKConnection.h index 4c67126..bf36bc4 100644 --- a/src/MumbleKit/MKConnection.h +++ b/src/MumbleKit/MKConnection.h @@ -431,8 +431,12 @@ typedef enum { * @param pass The password to authenticate with. If the specified username is that * of a registered user, the password will be treated as a user password. * Otherwise, it will be treated as a server password. + * + * @param tokens The initial set of access tokens for the user we are connecting as, in + * the form of an NSArray of NSStrings. + * This parameter may be nil if the user does not have any access tokens. */ -- (void) authenticateWithUsername:(NSString *)user password:(NSString *)pass; +- (void) authenticateWithUsername:(NSString *)user password:(NSString *)pass accessTokens:(NSArray *)tokens; ///---------------------- /// @name Message Handler diff --git a/src/MumbleKit/MKServerModel.h b/src/MumbleKit/MKServerModel.h index 2c54b48..7b89b49 100644 --- a/src/MumbleKit/MKServerModel.h +++ b/src/MumbleKit/MKServerModel.h @@ -480,6 +480,20 @@ */ - (void) removeDelegate:(id)delegate; +///------------------------- +/// @name Server Information +///------------------------- + +/** + * Returns the hostname of the server that the MKServerModel is currently connected to. + */ +- (NSString *) hostname; + +/** + * Returns the port of the server that the MKServerModel is currently connected to. + */ +- (NSInteger) port; + ///----------------------- /// @name Users operations ///----------------------- @@ -537,4 +551,16 @@ */ - (void) joinChannel:(MKChannel *)channel; +///------------------------ +/// @name Server operations +///------------------------ + +/** + * Set the list of access tokens for the currently connected user. + * + * @param tokens An NSArray of strings containing the tokens to use as access tokens for the + * connected user. + */ +- (void) setAccessTokens:(NSArray *)tokens; + @end -- cgit v1.2.3