Class ConversationSpaceComponent

Inheritance Relationships

Base Types

Class Documentation

class ConversationSpaceComponent : public csp::multiplayer::ComponentBase, public csp::multiplayer::IPositionComponent, public csp::multiplayer::IRotationComponent

Add a conversation with comment thread to your space.

These conversations have a spatial representation.

Public Functions

ConversationSpaceComponent(SpaceEntity *Parent)

Constructs the conversation component, and associates it with the specified Parent space entity.

Parameters

Parent – The Space entity that owns this component.

void CreateConversation(const csp::common::String &Message, csp::systems::StringResultCallback Callback)

Create a new conversation.

Parameters
  • Messagecsp::common::String : the message to be stored.

  • Callback – StringResultCallback : callback when asynchronous task finishes

void DeleteConversation(csp::systems::NullResultCallback Callback)

Deletes all the messages that are part of the conversation.

Parameters

Callback – NullResultCallback : callback when asynchronous task finishes

void AddMessage(const csp::common::String &Message, MessageResultCallback Callback)

Adds a message to conversation Make sure that the user has entered a space through SpaceSystem::EnterSpace() before calling this.

Parameters
  • Messagecsp::common::String : the message to be stored.

  • Callback – MessageResultCallback : callback when asynchronous task finishes

void DeleteMessage(const csp::common::String &MessageId, csp::systems::NullResultCallback Callback)

Deletes a particular message.

Parameters
  • MessageIdcsp::common::String : if of the message that will be deleted

  • Callback – NullResultCallback : callback when asynchronous task finishes

void GetMessage(const csp::common::String &MessageId, MessageResultCallback Callback)

Retrieves one particular message.

Parameters
  • MessageIdcsp::common::String : id of the message to be retrieved

  • Callback – MessageResultCallback : callback when asynchronous task finishes

void GetAllMessages(MessageCollectionResultCallback Callback)

Retrieves all messages in conversation.

Parameters

Callback – MessageCollectionResultCallback : callback when asynchronous task finishes

void GetConversationInfo(ConversationResultCallback Callback)

Get Conversation Info.

Parameters

Callback – ConversationResultCallback : callback when asynchronous task finishes

void SetConversationInfo(const ConversationInfo &ConversationData, ConversationResultCallback Callback)

Set Conversation Info.

Parameters
  • ConversationDataConversationInfo : Conversation Information

  • Callback – ConversationResultCallback : callback when asynchronous task finishes

void GetMessageInfo(const csp::common::String &MessageId, MessageResultCallback Callback)

Get Message Info.

Parameters
  • MessageIdcsp::common::String : message Id

  • Callback – MessageResultCallback : callback when asynchronous task finishes

void SetMessageInfo(const csp::common::String &MessageId, const MessageInfo &MessageData, MessageResultCallback Callback)

Set Message Info.

Parameters
  • MessageIdcsp::common::String : message Id

  • MessageDataMessageInfo : Conversation Information

  • Callback – MessageResultCallback : callback when asynchronous task finishes

bool GetIsVisible() const
void SetIsVisible(bool Value)
bool GetIsActive() const
void SetIsActive(bool Value)
bool MoveConversationFromComponent(ConversationSpaceComponent &OtherConversationComponent)

Moves the conversation associated with the other component to this one and remmove the association with the other component.

Parameters

OtherConversationComponent – - The component to move the conversation from.

Returns

true if successful, false if there is already a conversation associated with this component

void SetTitle(const csp::common::String &Value)

Sets the Title of the conversation.

Parameters

Value – - The new title.

const csp::common::String &GetTitle() const

Gets the Title of the conversation.

void SetDate(const csp::common::String &Value)

Sets the Date of the conversation.

Parameters

Value – - The new Date.

const csp::common::String &GetDate() const

Gets the Date of the conversation.

void SetNumberOfReplies(const int64_t Value)

Sets the Number Of Replies of the conversation.

Parameters

Value – - The new Number Of Replies.

const int64_t GetNumberOfReplies() const

Gets the Number Of Replies of the conversation.