SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
PlayerToSpectatorRequest.h
1 //
2 // PlayerToSpectatorRequest.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 #import "Room.h"
14 
15 EXTERN NSString * const PlayerToSpectatorRequest_KEY_ROOM_ID;
16 EXTERN NSString * const PlayerToSpectatorRequest_KEY_USER_ID;
17 
18 /** Attempt to turn the current User from Player to a Spectator (in a Game Room)
19 
20  This could fail if no Spectator slots are available in the Room at the time of the request
21  */
22 @interface PlayerToSpectatorRequest : BaseRequest {
23 @private
24  id <Room> _room;
25 }
26 
27 @property (strong) id <Room> room;
28 
29 -(id)initWithTargetRoom:(id <Room>)room;
30 /**
31  @param room the Room where the change has to be performed, a null value indicates the last joined Room (default)
32 
33  @see [ISFSEvents onPlayerToSpectator:]
34  @see [ISFSEvents onPlayerToSpectatorError:]
35  @see SpectatorToPlayerRequest
36 
37  */
38 +(id)requestWithTargetRoom:(id <Room>)room;
39 +(id)request;
40 
41 @end
PlayerToSpectatorRequest
Definition: PlayerToSpectatorRequest.h:22