This document is about: QUANTUM 2
SWITCH TO

API-ITournamentHubCallbackHandler


Available in the Gaming Circle and Industries Circle
Circle

Namespace: Gimmebreak.Backbone.Tournaments

Inheritance: Object → ITournamentHubCallbackHandler

This interface is meant to be implemented by tournament hub for handling tournaments in progress. Tournament hub implementing this interface can be then passed to ConnectTournamentHub() method in backbone client. Purpose of this interface is to provide status changes of ongoing tournament as well as set of actions for competing user. User can with provided ITournamentHubController inform that he is ready to play, join a match etc.

C#

public interface ITournamentHubCallbackHandler

Methods

OnHubMatchStatusChanged(TournamentHubMatchStatus)

Callback informing that joined tournament match has changed status for user. If tournament hub status indicates that user should be in ongoing match then UserActiveMatch on tournament object will contain metadata for specific match. To receive match statuses use tournament hub controller and call ITournamentHubController.JoinTournamentMatch to join tournament match.

C#

public abstract virtual void OnHubMatchStatusChanged(Gimmebreak.Backbone.Tournaments.TournamentHubMatchStatus newStatus)

Parameters

  • newStatus: New tournament match status for user.

OnHubMatchUpdate()

Callback informing that user active match metadata has been updated.

C#

public abstract virtual void OnHubMatchUpdate()

Remarks

This callback does not necessary mean there have been any changes to user active match. It indicates that user active match was refreshed with the most recent data. This callback can be used to trigger UI updates.

OnHubStatusChanged(TournamentHubStatus)

Callback informing that tournament has changed status for user. Tournament hub undergoes many status changes during ongoing tournament. The status is informing of exact state of tournament for logged user.

C#

public abstract virtual void OnHubStatusChanged(Gimmebreak.Backbone.Tournaments.TournamentHubStatus newStatus)

Parameters

  • newStatus: New tournament hub status for user.

Remarks

User that is signed up for tournament will receive different statuses than user who is not. Use statuses to inform user what is happeing, if they should wait, join match, sign up etc.

OnInitialized(ITournamentHubController)

Callback informing that tournament hub was initialized and providing coresponding controller to interact with tournament. This is result of connecting tournament hub with ConnectTournamentHub() call on backbone client.

C#

public abstract virtual void OnInitialized(Gimmebreak.Backbone.Tournaments.ITournamentHubController controller)

Parameters

  • controller: Tournament hub controller for interaction with related tournament.

Remarks

This callback is not executed immediately after ConnectTournamentHub() is called. The initialization process takes few seconds after which OnInitialized is executed.

OnTournamentUpdate()

Callback informaing that tournament metadata has been updated.

C#

public abstract virtual void OnTournamentUpdate()

Remarks

This callback does not necessary mean there have been any changes to tournament metadata. It indicates that tournament was refreshed with the most recent data. This callback can be used to trigger UI updates.

Back to top