SFS2X Objective-C API  1.7.13
iOS / macOS / tvOS
SFSInvitation.h
1 //
2 // SFSInvitation.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 "Invitation.h"
12 #import "ISFSObject.h"
13 
14 /** An <b>Invitation</b> object provides the ability to send a generic invitation for a specific event going on
15  in your application, be it a game, visiting a personal Room or another location of the virtual world etc...
16 
17  The SFS2X <b>Invitation Manager</b> is very simple to use. All you need to provide is:
18 
19  - <b>inviter:</b> the User starting the invitation (null == Server)
20  - <b>invitee:</b> the User to invite
21  - <b>secondsForAnswer:</b> the amount of time (in seconds) that the invitee has to accept/refuse the invitation. (default is 15 sec)
22  - <b>params:</b> any custom params to send with the invitation (e.g. a message, game name etc...)
23 
24  @see InviteUsersRequest
25  */
26 @interface SFSInvitation : NSObject <Invitation>{
27 @protected
28  NSInteger _id;
29  id <User> _inviter;
30  id <User> _invitee;
31  NSInteger _secondsForAnswer;
32  id <ISFSObject> _params;
33 }
34 /**
35  @param inviter the User that sends the Invitation
36  @param invitee the User that receives the Invitation
37  @param secondsForAnswer the number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)
38  @param params custom params to send with the invitation
39  */
40 -(id)initWithInviter:(id <User>)inviter invitee:(id <User>)invitee secondsForAnswer:(NSInteger)secondsForAnswer params:(id <ISFSObject>)params;
41 /**
42  @param inviter the User that sends the Invitation
43  @param invitee the User that receives the Invitation
44  @param secondsForAnswer the number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)
45  @param params custom params to send with the invitation
46  */
47 +(id)invitationWithInviter:(id <User>)inviter invitee:(id <User>)invitee secondsForAnswer:(NSInteger)secondsForAnswer params:(id <ISFSObject>)params;
48 /**
49  @param inviter the User that sends the Invitation
50  @param invitee the User that receives the Invitation
51  */
52 +(id)invitationWithInviter:(id <User>)inviter invitee:(id <User>)invitee;
53 /**
54  The id of the invitation
55  */
56 @property (nonatomic, assign) NSInteger id;
57 /**
58  The inviter User
59  */
60 @property (weak, nonatomic, readonly) id <User> inviter;
61 /**
62  The invited User
63  */
64 @property (weak, nonatomic, readonly) id <User> invitee;
65 /**
66  The amount of time (seconds) allowed to reply to the invitation
67  */
68 @property (nonatomic, readonly) NSInteger secondsForAnswer;
69 /**
70  A custom set of parameters.
71  Can be used to provide a message for the invitation and any other relevant data
72  */
73 @property (weak, nonatomic, readonly) id <ISFSObject> params;
74 
75 @end
SFSInvitation
Definition: SFSInvitation.h:26