Twitch SDK (Internal)
Public Types | Public Member Functions | List of all members
ttv::chat::IChatRaid Class Referenceabstract

#include <ichatraid.h>

Inheritance diagram for ttv::chat::IChatRaid:
ttv::chat::ChatRaid

Public Types

using JoinCallback = std::function< void(TTV_ErrorCode ec)>
 
using LeaveCallback = std::function< void(TTV_ErrorCode ec)>
 
using StartCallback = std::function< void(TTV_ErrorCode ec)>
 
using CancelCallback = std::function< void(TTV_ErrorCode ec)>
 

Public Member Functions

virtual ~IChatRaid ()=default
 
virtual TTV_ErrorCode Dispose ()=0
 
virtual TTV_ErrorCode Join (const std::string &raidId, const JoinCallback &callback)=0
 
virtual TTV_ErrorCode Leave (const std::string &raidId, const LeaveCallback &callback)=0
 
virtual TTV_ErrorCode Start (UserId targetUserId, const StartCallback &callback)=0
 
virtual TTV_ErrorCode Cancel (const CancelCallback &callback)=0
 

Detailed Description

The interface for chat raid functionality.

A chat raid is a mass transition of users from one channel to another.

Member Typedef Documentation

◆ CancelCallback

using ttv::chat::IChatRaid::CancelCallback = std::function<void(TTV_ErrorCode ec)>

◆ JoinCallback

using ttv::chat::IChatRaid::JoinCallback = std::function<void(TTV_ErrorCode ec)>

◆ LeaveCallback

using ttv::chat::IChatRaid::LeaveCallback = std::function<void(TTV_ErrorCode ec)>

◆ StartCallback

using ttv::chat::IChatRaid::StartCallback = std::function<void(TTV_ErrorCode ec)>

Constructor & Destructor Documentation

◆ ~IChatRaid()

virtual ttv::chat::IChatRaid::~IChatRaid ( )
virtualdefault

Member Function Documentation

◆ Cancel()

virtual TTV_ErrorCode ttv::chat::IChatRaid::Cancel ( const CancelCallback callback)
pure virtual

As a channel moderator or broadcaster, this cancels a raid. This only works if a raid has been started and is currently underway.

Parameters
[in]targetUserIdThe id of the user that is being targetted by the raid.
[in]callbackCallback function called after cancelling the raid. Can be null.
Returns
  • TTV_EC_SUCCESS: The raid was cancelled successfully.
  • TTV_EC_SHUT_DOWN: The chat module is not initialized.
  • TTV_EC_NEED_TO_LOGIN: User needs to be logged in to leave the raid.
  • TTV_EC_AUTHENTICATION: User has an invalid OAuth token.

Implemented in ttv::chat::ChatRaid.

◆ Dispose()

virtual TTV_ErrorCode ttv::chat::IChatRaid::Dispose ( )
pure virtual

This should be called when the application is done with the instance.

Implemented in ttv::chat::ChatRaid.

◆ Join()

virtual TTV_ErrorCode ttv::chat::IChatRaid::Join ( const std::string &  raidId,
const JoinCallback callback 
)
pure virtual

As a viewer, joins the raid.

Parameters
[in]raidIdThe id of the raid that is being joined.
[in]callbackCallback function called after joining the raid. Can be null.
Returns
  • TTV_EC_SUCCESS: The raid was joined successfully.
  • TTV_EC_SHUT_DOWN: The chat module is not initialized.
  • TTV_EC_NEED_TO_LOGIN: User needs to be logged in to participate in raid.
  • TTV_EC_AUTHENTICATION: User has an invalid OAuth token.

Implemented in ttv::chat::ChatRaid.

◆ Leave()

virtual TTV_ErrorCode ttv::chat::IChatRaid::Leave ( const std::string &  raidId,
const LeaveCallback callback 
)
pure virtual

As a viewer, leaves the raid. You can only leave a raid if you have previously joined.

Parameters
[in]raidIdThe id of the raid that is being left.
[in]callbackCallback function called after leaving the raid. Can be null.
Returns
  • TTV_EC_SUCCESS: The raid was left successfully.
  • TTV_EC_SHUT_DOWN: The chat module is not initialized.
  • TTV_EC_NEED_TO_LOGIN: User needs to be logged in to participate in raid.
  • TTV_EC_AUTHENTICATION: User has an invalid OAuth token.

Implemented in ttv::chat::ChatRaid.

◆ Start()

virtual TTV_ErrorCode ttv::chat::IChatRaid::Start ( UserId  targetUserId,
const StartCallback callback 
)
pure virtual

As a channel moderator or broadcaster, this starts a raid on the channel targeting the given user.

Parameters
[in]targetUserIdThe id of the user that is being targetted by the raid.
[in]callbackCallback function called after starting the raid. Can be null.
Returns
  • TTV_EC_SUCCESS: The raid was started successfully.
  • TTV_EC_SHUT_DOWN: The chat module is not initialized.
  • TTV_EC_NEED_TO_LOGIN: User needs to be logged in to start a raid.
  • TTV_EC_AUTHENTICATION: User has an invalid OAuth token.

Implemented in ttv::chat::ChatRaid.


The documentation for this class was generated from the following file: