SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
QuickJoinGameRequest.h
1 //
2 // QuickJoinGameRequest.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 #import "Room.h"
13 
14 EXTERN NSString * const QuickJoinGameRequest_KEY_ROOM_LIST;
15 EXTERN NSString * const QuickJoinGameRequest_KEY_GROUP_LIST;
16 EXTERN NSString * const QuickJoinGameRequest_KEY_ROOM_TO_LEAVE;
17 EXTERN NSString * const QuickJoinGameRequest_KEY_MATCH_EXPRESSION;
18 
19 @class MatchExpression;
20 
21 /** Quick join a User in a public game.
22 
23  By providing a MatchExpression and a list of Rooms or Groups the system can search for matching Rooms and immediately teleport the player in the game action.
24  */
25 @interface QuickJoinGameRequest : BaseRequest {
26 @private
27  NSArray *_whereToSearch;
28  MatchExpression *_matchExpression;
29  id <Room> _roomToLeave;
30 }
31 
32 @property (nonatomic, strong) NSArray *whereToSearch;
33 @property (nonatomic, strong) MatchExpression *matchExpression;
34 @property (nonatomic, strong) id <Room> roomToLeave;
35 
36 
37 -(id)initWithMatchExpression:(MatchExpression *)matchExpression whereToSearch:(NSArray *)whereToSearch roomToLeave:(id <Room>)roomToLeave;
38 /**
39  @param matchExpression a MatchExpression to filter Rooms
40  @param whereToSearch this parameter accepts an array of Room objects or an array of Strings representing valid Room Group names
41  @param roomToLeave an optional Room that the User will leave after joining the game
42 
43 
44  @see [ISFSEvents onRoomJoin:]
45  @see MatchExpression
46  */
47 
48 +(id)requestWithMatchExpression:(MatchExpression *)matchExpression whereToSearch:(NSArray *)whereToSearch roomToLeave:(id <Room>)roomToLeave;
49 +(id)requestWithMatchExpression:(MatchExpression *)matchExpression whereToSearch:(NSArray *)whereToSearch;
50 
51 @end
MatchExpression
Definition: MatchExpression.h:42
QuickJoinGameRequest
Definition: QuickJoinGameRequest.h:25