SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
LoginRequest.h
1 //
2 // LoginRequest.h
3 // SFS2X
4 //
5 // Original development by Infosfer Game Technologies Ltd. | http://www.infosfer.com.
6 //
7 // Maintained and developed by A51 Integrated.
8 // Copyright 2012 A51 Integrated | http://a51integrated.com. All rights reserved.
9 //
10 
11 #import "BaseRequest.h"
12 
13 EXTERN NSString * const LoginRequest_KEY_ZONE_NAME;
14 EXTERN NSString * const LoginRequest_KEY_USER_NAME;
15 EXTERN NSString * const LoginRequest_KEY_PASSWORD;
16 EXTERN NSString * const LoginRequest_KEY_PARAMS;
17 EXTERN NSString * const LoginRequest_KEY_PRIVILEGE_ID;
18 EXTERN NSString * const LoginRequest_KEY_ID;
19 EXTERN NSString * const LoginRequest_KEY_ROOMLIST;
20 EXTERN NSString * const LoginRequest_KEY_RECONNECTION_SECONDS;
21 
22 
23 /** Join one of the Zones in the Server.
24 
25  Each Zone represents a different application running independently
26  In order to join a Zone a user name and password are usually required.
27  If the Zone allows guest users, user name and password are not needed and a guest name will be created on the server side
28  If the Zone uses a server side extension to handle the login, you can also send a custom SFSObject with any extra parameters.
29  */
30 @interface LoginRequest : BaseRequest {
31 
32 @private
33 
34  NSString *_zoneName;
35  NSString *_userName;
36  NSString *_password;
37  id <ISFSObject> _params;
38 }
39 
40 
41 @property (strong) NSString *zoneName;
42 @property (strong) NSString *userName;
43 @property (strong) NSString *password;
44 @property (strong) id <ISFSObject> params;
45 
46 -(id)initWithUserName:(NSString *)userName password:(NSString *)password zoneName:(NSString *)zoneName params:(id <ISFSObject>)params;
47 /**
48  @param userName the user name.
49  @param password the password.
50  @param zoneName the name of an existing Zone in the server (case sensitive, 'SimpleChat' != 'simplechat'). If no Zone is specified the SmartFox.config.zone parameter will be used.
51  @param params the custom parameters (optional, if you use an Extension on server side to handle the login)
52 
53  @see [ISFSEvents onLogin:]
54  @see [ISFSEvents onLoginError:]
55  @see [SmartFox2XClient loadConfig:connectOnSuccess:]
56 
57  */
58 +(id)requestWithUserName:(NSString *)userName password:(NSString *)password zoneName:(NSString *)zoneName params:(id <ISFSObject>)params;
59 +(id)request;
60 
61 @end
LoginRequest
Definition: LoginRequest.h:30