SmartFoxServer 2X C++ API
Sfs2X::Entities::Invitation::SFSInvitation Class Reference

Invitation object More...

#include <SFSInvitation.h>

Inheritance diagram for Sfs2X::Entities::Invitation::SFSInvitation:
Sfs2X::Entities::Invitation::Invitation

Public Member Functions

 SFSInvitation (boost::shared_ptr< User > inviter, boost::shared_ptr< User > invitee)
 Constructor More...
 
 SFSInvitation (boost::shared_ptr< User > inviter, boost::shared_ptr< User > invitee, long int secondsForAnswer)
 Constructor More...
 
 SFSInvitation (boost::shared_ptr< User > inviter, boost::shared_ptr< User > invitee, long int secondsForAnswer, boost::shared_ptr< ISFSObject > parameters)
 Constructor More...
 
long int Id ()
 The id of the invitation More...
 
void Id (long int value)
 The id of the invitation More...
 
boost::shared_ptr< UserInviter ()
 The inviter User More...
 
boost::shared_ptr< UserInvitee ()
 The invited User More...
 
long int SecondsForAnswer ()
 The amount of time (seconds) allowed to reply to the invitation More...
 
boost::shared_ptr< ISFSObjectParams ()
 A custom set of parameters. More...
 

Detailed Description

Invitation object

An Invitation object provides the ability to send a generic invitation for a specific event going on in your application, be it a game, visiting a personal Room or another location of the virtual world etc...

The SFS2X Invitation Manager is very simple to use. All you need to provide is:

  • inviter: the User starting the invitation (null == Server)
  • invitee: the User to invite
  • secondsForAnswer: the amount of time (in seconds) that the invitee has to accept/refuse the invitation. (default is 15 sec)
  • params: any custom params to send with the invitation (e.g. a message, game name etc...)
See also
Requests.Game.InviteUsersRequest, Core.SFSEvent.INVITATION

Constructor & Destructor Documentation

◆ SFSInvitation() [1/3]

Sfs2X::Entities::Invitation::SFSInvitation::SFSInvitation ( boost::shared_ptr< User inviter,
boost::shared_ptr< User invitee 
)

Constructor

Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation

◆ SFSInvitation() [2/3]

Sfs2X::Entities::Invitation::SFSInvitation::SFSInvitation ( boost::shared_ptr< User inviter,
boost::shared_ptr< User invitee,
long int  secondsForAnswer 
)

Constructor

Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation
secondsForAnswerthe number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)

◆ SFSInvitation() [3/3]

Sfs2X::Entities::Invitation::SFSInvitation::SFSInvitation ( boost::shared_ptr< User inviter,
boost::shared_ptr< User invitee,
long int  secondsForAnswer,
boost::shared_ptr< ISFSObject parameters 
)

Constructor

Parameters
inviterthe User that sends the Invitation
inviteethe User that receives the Invitation
secondsForAnswerthe number of seconds allowed for the Invitee to reply (recommended range: 15-40 seconds)
parameterscustom params to send with the invitation

Member Function Documentation

◆ Id() [1/2]

long int Sfs2X::Entities::Invitation::SFSInvitation::Id ( )
virtual

The id of the invitation

Implements Sfs2X::Entities::Invitation::Invitation.

◆ Id() [2/2]

void Sfs2X::Entities::Invitation::SFSInvitation::Id ( long int  value)
virtual

The id of the invitation

Implements Sfs2X::Entities::Invitation::Invitation.

◆ Invitee()

boost::shared_ptr< User > Sfs2X::Entities::Invitation::SFSInvitation::Invitee ( )
virtual

◆ Inviter()

boost::shared_ptr< User > Sfs2X::Entities::Invitation::SFSInvitation::Inviter ( )
virtual

◆ Params()

boost::shared_ptr< ISFSObject > Sfs2X::Entities::Invitation::SFSInvitation::Params ( )
virtual

A custom set of parameters.

Can be used to provide a message for the invitation and any other relevant data

Implements Sfs2X::Entities::Invitation::Invitation.

◆ SecondsForAnswer()

long int Sfs2X::Entities::Invitation::SFSInvitation::SecondsForAnswer ( )
virtual

The amount of time (seconds) allowed to reply to the invitation

Implements Sfs2X::Entities::Invitation::Invitation.