Loading...
Searching...
No Matches
AccelByte::FAccelByteMessagingSystem Class Reference
Inheritance diagram for AccelByte::FAccelByteMessagingSystem:

Public Member Functions

bool SendMessage (const EAccelByteMessagingTopic Topic)
 Send message without payload to the messaging system which later will be notified to the subscribers.
template<typename T>
bool SendMessage (const EAccelByteMessagingTopic Topic, const T &Payload)
 Send message with payload to the messaging system which later will be notified to the subscribers.
bool SendMessage (const EAccelByteMessagingTopic Topic, const FString &Payload)
 Send message with string payload to the messaging system which later will be notified to the subscribers.
FDelegateHandle SubscribeToTopic (const EAccelByteMessagingTopic &Topic, const FOnMessagingSystemReceivedMessage &Delegate)
 Subscribe to particular topic in messaging system.
bool UnsubscribeFromTopic (const EAccelByteMessagingTopic &Topic, const FDelegateHandle &DelegateHandle)
 Unsubscribe to a topic in messaging system.
void UnsubscribeAll ()
 Unsubscribe all subscribers from messaging system.
int32 GetAllSubscribersCount ()
 Get the number of all subscribers to all of the topics.

Member Function Documentation

◆ GetAllSubscribersCount()

int32 FAccelByteMessagingSystem::GetAllSubscribersCount ( )

Get the number of all subscribers to all of the topics.

Returns
The number of all subscribers to all of the topics.

◆ SendMessage() [1/3]

bool FAccelByteMessagingSystem::SendMessage ( const EAccelByteMessagingTopic Topic)

Send message without payload to the messaging system which later will be notified to the subscribers.

Parameters
TopicThe topic of the message
Returns
true if message successfully queued

◆ SendMessage() [2/3]

bool FAccelByteMessagingSystem::SendMessage ( const EAccelByteMessagingTopic Topic,
const FString & Payload )

Send message with string payload to the messaging system which later will be notified to the subscribers.

Parameters
TopicThe topic of the message
PayloadThe payload of the message.
Returns
true if message successfully queued

◆ SendMessage() [3/3]

template<typename T>
bool AccelByte::FAccelByteMessagingSystem::SendMessage ( const EAccelByteMessagingTopic Topic,
const T & Payload )
inline

Send message with payload to the messaging system which later will be notified to the subscribers.

Parameters
TopicThe topic of the message
PayloadThe payload of the message. It should be USTRUCT type.
Returns
true if message successfully queued

◆ SubscribeToTopic()

FDelegateHandle FAccelByteMessagingSystem::SubscribeToTopic ( const EAccelByteMessagingTopic & Topic,
const FOnMessagingSystemReceivedMessage & Delegate )

Subscribe to particular topic in messaging system.

Parameters
TopicThe topic to subscribe, list of available topic is in EAccelByteMessagingTopic
DelegateThe delegate that will be executed when new message for this topic arrived
Returns
FString representing unique id for the subscriber and can be used to unsubscribe from the topic. Empty string returned if failed to subscribe.

◆ UnsubscribeFromTopic()

bool FAccelByteMessagingSystem::UnsubscribeFromTopic ( const EAccelByteMessagingTopic & Topic,
const FDelegateHandle & DelegateHandle )

Unsubscribe to a topic in messaging system.

Parameters
TopicThe topic to unsubscribe
DelegateHandleThe delegate handle returned by the SubscribeToTopic method
Returns
true if the SubscriberID found and successfully unsubscribe from topic