SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
JoinRoomRequest.h
1 //
2 // JoinRoomRequest.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 
12 #import "BaseRequest.h"
13 
14 EXTERN NSString * const JoinRoomRequest_KEY_ROOM;
15 EXTERN NSString * const JoinRoomRequest_KEY_USER_LIST;
16 EXTERN NSString * const JoinRoomRequest_KEY_ROOM_NAME;
17 EXTERN NSString * const JoinRoomRequest_KEY_ROOM_ID;
18 EXTERN NSString * const JoinRoomRequest_KEY_PASS;
19 EXTERN NSString * const JoinRoomRequest_KEY_ROOM_TO_LEAVE;
20 EXTERN NSString * const JoinRoomRequest_KEY_AS_SPECTATOR;
21 
22 
23 /**
24  Join the current User in a Room.
25  */
26 @interface JoinRoomRequest : BaseRequest {
27 
28 @private
29 
30  NSInteger __id;
31  NSString *_name;
32  NSString *_pass;
33  NSNumber *_roomIdToLeave;
34  BOOL _asSpectator;
35 
36 }
37 
38 /**
39  @param numericIdOrName you can use the numeric ID of the Room or its name (you need to pass numeric id in a NSNumber object)
40  @param pass needed only if the Room is password protected
41  @param roomIdToLeave the id of a previously joined Room that you want to leave once joined in the new Room (optional). The default behavior is to leave the previous Room. You can pass a negative ID to avoid leaving any Room
42  @param asSpect if true it indicates that you want to join the room as spectator (optional, for game Rooms only)
43 
44  @see [ISFSEvents onRoomJoin:]
45  @see [ISFSEvents onRoomJoinError:]
46  @see LeaveRoomRequest
47 
48  */
49 +(id)requestWithId:(id)numericIdOrName pass:(NSString *)pass roomIdToLeave:(NSNumber *)roomIdToLeave asSpect:(BOOL)asSpect;
50 +(id)requestWithId:(id)numericIdOrName;
51 
52 @end
JoinRoomRequest
Definition: JoinRoomRequest.h:26