SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
ObjectMessageRequest.h
1 //
2 // ObjectMessageRequest.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 "GenericMessageRequest.h"
12 
13 /** Send a custom data Object to all users in a Room or a sub-selection of them
14 
15  (If you are familiar with SmartFoxServer 1.x this request the equivalent of sendObject)
16  The request allow to send a custom data object to all users in the same Room.
17  A typical use of this request is for sending game moves to other players
18 
19  */
20 @interface ObjectMessageRequest : GenericMessageRequest {
21 
22 }
23 
24 -(id)initWithObject:(id <ISFSObject>)obj targetRoom:(id <Room>)targetRoom recipients:(NSArray *)recipients;
25 
26 
27 /**
28 
29  @param obj the custom object
30  @param targetRoom an optional target room. This room must be joined and by default it is the last joined Room
31  @param recipients an optional selection of Users in the target Room (by default the message is sent to all Users)
32 
33  @see [ISFSEvents onObjectMessage:]
34 
35 */
36 
37 +(id)requestWithObject:(id <ISFSObject>)obj targetRoom:(id <Room>)targetRoom recipients:(NSArray *)recipients;
38 +(id)requestWithObject:(id <ISFSObject>)obj;
39 
40 @end
ObjectMessageRequest
Definition: ObjectMessageRequest.h:20