Interface

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.


Method

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.

Method Parameters

  • Name
    TournamentHubMatchStatus
    Type
    newStatus
    Description

    New tournament match status for user.

OnHubMatchStatusChanged(TournamentHubMatchStatus)

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

Method

OnHubMatchUpdate()

Callback informing that user active match metadata has been updated.

Remarks

This callback does not necessarily 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.

OnHubMatchUpdate()

public abstract virtual void OnHubMatchUpdate()

Method

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.

Method Parameters

  • Name
    TournamentHubStatus
    Type
    newStatus
    Description

    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 happening, if they should wait, join match, sign up, etc.

OnHubStatusChanged(TournamentHubStatus)

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

Method

OnInitialized(ITournamentHubController)

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

Method Parameters

  • Name
    ITournamentHubController
    Type
    controller
    Description

    Tournament hub controller for interaction with related tournament.

Remarks

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

OnInitialized(ITournamentHubController)

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

Method

OnTournamentUpdate()

Callback informing that tournament metadata has been updated.

Remarks

This callback does not necessarily 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.

OnTournamentUpdate()

public abstract virtual void OnTournamentUpdate()