SmartFoxServer 3 C++ Client API 3.1.0-beta
Client API for SmartFoxServer 3
Loading...
Searching...
No Matches
SFSEvent.h File Reference

Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block. More...

#include "entities/Buddy.h"
#include "entities/Invitation.h"
#include "entities/MMOItem.h"
#include "entities/MMORoom.h"
#include "entities/Variable.h"
#include "entities/Room.h"
#include "entities/SFSObject.h"
#include "entities/SFSUser.h"
#include "entities/User.h"
#include "net/ISocketClient.h"
#include <cstdint>
#include <memory>
#include <optional>
#include <string>
#include <memory.h>
#include <type_traits>
#include <utility>
#include <vector>

Classes

struct  sfs3::event::ApiEvent
 The base of every event dispatched by the API. More...
struct  sfs3::event::Connection
 Dispatched when a connection to a SmartFoxServer 3 instance is attempted. More...
struct  sfs3::event::ConnectionRetry
 Dispatched when the connection to the server is interrupted abruptly, while the SmartFoxServer 3 HRC system is available in the Zone. More...
struct  sfs3::event::ConnectionResume
 Dispatched when the connection to the server is re-established after a temporary loss, while the SmartFoxServer 3 HRC system is available in the Zone. More...
struct  sfs3::event::ConnectionLost
 Dispatched when the connection to the server is interrupted. More...
struct  sfs3::event::UdpConnection
 Dispatched with the result of the UDP handshake. More...
struct  sfs3::event::UdpConnectionLost
 Dispatched when an active UDP connection is lost. More...
struct  sfs3::event::Login
 Dispatched after a successful login in a Zone. More...
struct  sfs3::event::Logout
 Dispatched when the current user logs out of the Zone. More...
struct  sfs3::event::LoginError
 Dispatched when the login fails. More...
struct  sfs3::event::RoomAdd
 Dispatched when a Room is created in a Group this client subscribes to, whoever created it. More...
struct  sfs3::event::RoomRemove
 Dispatched when a Room is destroyed in a Group this client subscribes to. More...
struct  sfs3::event::RoomCreationError
 Dispatched when the creation of a Room fails. More...
struct  sfs3::event::RoomJoin
 Dispatched when a Room is joined by the current user. More...
struct  sfs3::event::RoomJoinError
 Dispatched when the current user fails to join a Room. More...
struct  sfs3::event::UserVariablesUpdate
 Dispatched when one or more User Variables are updated. More...
struct  sfs3::event::RoomVariablesUpdate
 Dispatched when one or more Room Variables are updated. More...
struct  sfs3::event::MMOItemVariablesUpdate
 Dispatched when one or more MMOItem Variables are updated in the current MMORoom. More...
struct  sfs3::event::UserCountChange
 Dispatched when the number of users, players or spectators inside a Room changes. More...
struct  sfs3::event::UserEnterRoom
 Dispatched when another user enters one of the Rooms joined by the current user. More...
struct  sfs3::event::UserExitRoom
 Dispatched when one of the Rooms joined by the current user is left by another user, or by the current user himself. More...
struct  sfs3::event::PlayerToSpectator
 Dispatched when a player is turned into a spectator inside a Game Room. More...
struct  sfs3::event::PlayerToSpectatorError
 Dispatched when the current user cannot be turned from player into spectator in a Game Room. More...
struct  sfs3::event::SpectatorToPlayer
 Dispatched when a spectator is turned into a player inside a Game Room. More...
struct  sfs3::event::SpectatorToPlayerError
 Dispatched when the current user cannot be turned from spectator into player in a Game Room. More...
struct  sfs3::event::ExtensionResponse
 Dispatched when data from a server-side Extension is received. More...
struct  sfs3::event::PublicMessage
 Dispatched when a public message is received. More...
struct  sfs3::event::PrivateMessage
 Dispatched when a private message is received. More...
struct  sfs3::event::ObjectMessage
 Dispatched when an object with custom data is received from another user in one of the joined Rooms. More...
struct  sfs3::event::ModeratorMessage
 Dispatched when the current user receives a message from a moderator. More...
struct  sfs3::event::AdminMessage
 Dispatched when the current user receives a message from an administrator. More...
struct  sfs3::event::BuddyMessage
 Dispatched when a buddy message is received. More...
struct  sfs3::event::BuddyListInit
 Dispatched when the Buddy List system is initialized successfully. More...
struct  sfs3::event::BuddyAdd
 Dispatched when a buddy is added successfully to the current user's buddies list. More...
struct  sfs3::event::BuddyRemove
 Dispatched when a buddy is removed successfully from the current user's buddies list. More...
struct  sfs3::event::BuddyBlock
 Dispatched when a buddy is blocked or unblocked by the current user. More...
struct  sfs3::event::BuddyOnlineStateChange
 Dispatched when a buddy in the current user's buddies list changes his online state. More...
struct  sfs3::event::BuddyVariablesUpdate
 Dispatched when a buddy updates one or more of his Buddy Variables. More...
struct  sfs3::event::BuddyError
 Dispatched when a request related to the Buddy List system fails. More...
struct  sfs3::event::PingPong
 Dispatched when a new lag measurement is available. More...
struct  sfs3::event::RoomNameChange
 Dispatched when the name of a Room is changed. More...
struct  sfs3::event::RoomNameChangeError
 Dispatched when the name of a Room cannot be changed. More...
struct  sfs3::event::RoomPasswordStateChange
 Dispatched when the password of a Room is set, changed or removed. More...
struct  sfs3::event::RoomPasswordStateChangeError
 Dispatched when the password of a Room cannot be set, changed or removed. More...
struct  sfs3::event::RoomCapacityChange
 Dispatched when the capacity of a Room is changed. More...
struct  sfs3::event::RoomCapacityChangeError
 Dispatched when the capacity of a Room cannot be changed. More...
struct  sfs3::event::UserFindResult
 Dispatched when a users search is completed. More...
struct  sfs3::event::RoomFindResult
 Dispatched when a Rooms search is completed. More...
struct  sfs3::event::RoomGroupSubscribe
 Dispatched when a Room Group is subscribed successfully. More...
struct  sfs3::event::RoomGroupSubscribeError
 Dispatched when a Room Group cannot be subscribed. More...
struct  sfs3::event::RoomGroupUnsubscribe
 Dispatched when a Room Group is unsubscribed successfully. More...
struct  sfs3::event::RoomGroupUnsubscribeError
 Dispatched when a Room Group cannot be unsubscribed. More...
struct  sfs3::event::Invitation
 Dispatched when the current user receives an invitation from another user. More...
struct  sfs3::event::InvitationReply
 Dispatched to the inviter when one of the users he invited replies to the invitation, and when an invitation left unanswered expires. More...
struct  sfs3::event::InvitationReplyError
 Dispatched when an error occurs while the current user replies to an invitation, usually because the invitation already expired. More...
struct  sfs3::event::ProximityListUpdate
 Dispatched when the current user's proximity list changes in an MMORoom, after he or another user moved: it reports who and what entered or left his Area of Interest. More...

Enumerations

enum class  sfs3::event::SFSEvent {
}
 The type of an event dispatched by the SmartFoxServer 3 client API. More...

Detailed Description

Doxygen only documents namespace-scope entities (enums, aliases, constants, free functions) in a header that carries this block.

Enumeration Type Documentation

◆ SFSEvent

enum class sfs3::event::SFSEvent
strong

The type of an event dispatched by the SmartFoxServer 3 client API.

You register a handler for one of these types with SmartFox::addEventListener. Each type has its own payload struct, listed here: the handler receives it as an ApiEvent reference and casts it to the struct that matches the type.

Enumerator
CONNECTION 

The result of a connection attempt.

See also
Connection
CONNECTION_LOST 

The connection was lost, or closed on request.

See also
ConnectionLost
CONNECTION_RETRY 

The connection dropped and the API is trying to re-establish it.

See also
ConnectionRetry
CONNECTION_RESUME 

The connection was re-established after a temporary loss.

See also
ConnectionResume
UDP_CONNECTION 

The result of the UDP handshake.

See also
UdpConnection
UDP_CONNECTION_LOST 

An active UDP connection was lost.

See also
UdpConnectionLost
LOGIN 

The login in a Zone succeeded.

See also
Login
LOGIN_ERROR 

The login in a Zone failed.

See also
LoginError
LOGOUT 

The current user logged out of the Zone.

See also
Logout
ROOM_ADD 

A Room was created in one of the subscribed Groups.

See also
RoomAdd
ROOM_REMOVE 

A Room was removed from one of the subscribed Groups.

See also
RoomRemove
ROOM_CREATION_ERROR 

The creation of a Room failed.

See also
RoomCreationError
ROOM_JOIN 

The current user joined a Room.

See also
RoomJoin
ROOM_JOIN_ERROR 

The current user failed to join a Room.

See also
RoomJoinError
ROOM_NAME_CHANGE 

The name of a Room was changed.

See also
RoomNameChange
ROOM_NAME_CHANGE_ERROR 

The name of a Room could not be changed.

See also
RoomNameChangeError
ROOM_PASSWORD_STATE_CHANGE 

The password of a Room was set, changed or removed.

See also
RoomPasswordStateChange
ROOM_PASSWORD_STATE_CHANGE_ERROR 

The password of a Room could not be changed.

See also
RoomPasswordStateChangeError
ROOM_CAPACITY_CHANGE 

The capacity of a Room was changed.

See also
RoomCapacityChange
ROOM_CAPACITY_CHANGE_ERROR 

The capacity of a Room could not be changed.

See also
RoomCapacityChangeError
USER_COUNT_CHANGE 

The number of users or spectators in a Room changed.

See also
UserCountChange
USER_ENTER_ROOM 

Another user entered one of the joined Rooms.

See also
UserEnterRoom
USER_EXIT_ROOM 

A user left one of the joined Rooms.

See also
UserExitRoom
USER_VARIABLES_UPDATE 

One or more User Variables were updated.

See also
UserVariablesUpdate
ROOM_VARIABLES_UPDATE 

One or more Room Variables were updated.

See also
RoomVariablesUpdate
MMOITEM_VARIABLES_UPDATE 

One or more MMOItem Variables were updated.

See also
MMOItemVariablesUpdate
PLAYER_TO_SPECTATOR 

A player was turned into a spectator.

See also
PlayerToSpectator
PLAYER_TO_SPECTATOR_ERROR 

A player could not be turned into a spectator.

See also
PlayerToSpectatorError
SPECTATOR_TO_PLAYER 

A spectator was turned into a player.

See also
SpectatorToPlayer
SPECTATOR_TO_PLAYER_ERROR 

A spectator could not be turned into a player.

See also
SpectatorToPlayerError
EXTENSION_RESPONSE 

Data was received from a server-side Extension.

See also
ExtensionResponse
PUBLIC_MESSAGE 

A public message was received.

See also
PublicMessage
PRIVATE_MESSAGE 

A private message was received.

See also
PrivateMessage
OBJECT_MESSAGE 

An object message was received.

See also
ObjectMessage
MODERATOR_MESSAGE 

A message from a moderator was received.

See also
ModeratorMessage
ADMIN_MESSAGE 

A message from an administrator was received.

See also
AdminMessage
BUDDY_MESSAGE 

A buddy message was received.

See also
BuddyMessage
BUDDY_LIST_INIT 

The Buddy List system was initialized.

See also
BuddyListInit
BUDDY_ADD 

A buddy was added to the buddies list.

See also
BuddyAdd
BUDDY_REMOVE 

A buddy was removed from the buddies list.

See also
BuddyRemove
BUDDY_BLOCK 

A buddy was blocked or unblocked.

See also
BuddyBlock
BUDDY_ONLINE_STATE_CHANGE 

A buddy changed his online state.

See also
BuddyOnlineStateChange
BUDDY_VARIABLES_UPDATE 

One or more Buddy Variables were updated.

See also
BuddyVariablesUpdate
BUDDY_ERROR 

A Buddy List request failed.

See also
BuddyError
PING_PONG 

A new lag measurement is available.

See also
PingPong
USER_FIND_RESULT 

The result of a users search.

See also
UserFindResult
ROOM_FIND_RESULT 

The result of a Rooms search.

See also
RoomFindResult
ROOM_GROUP_SUBSCRIBE 

A Room Group was subscribed.

See also
RoomGroupSubscribe
ROOM_GROUP_SUBSCRIBE_ERROR 

A Room Group could not be subscribed.

See also
RoomGroupSubscribeError
ROOM_GROUP_UNSUBSCRIBE 

A Room Group was unsubscribed.

See also
RoomGroupUnsubscribe
ROOM_GROUP_UNSUBSCRIBE_ERROR 

A Room Group could not be unsubscribed.

See also
RoomGroupUnsubscribeError
INVITATION 

An invitation was received.

See also
Invitation
INVITATION_REPLY 

An invited user replied to an invitation.

See also
InvitationReply
INVITATION_REPLY_ERROR 

A reply to an invitation could not be sent.

See also
InvitationReplyError
PROXIMITY_LIST_UPDATE 

The proximity list of an MMORoom changed.

See also
ProximityListUpdate