DiscoverTenerife
Public Member Functions | Private Attributes | List of all members
anonymousButtonHandler Class Reference

class that controls the button of anonymous login. More...

Inheritance diagram for anonymousButtonHandler:

Public Member Functions

void tryToLoginAnoymous ()
 if the inProgress flag is false, this method calls the AnonymousUser method of firebaseHandler class. It also set the inProgress flag to true. If it is called when the inProcess flag is on this method wont do nothing, this is like this for avoid more than one parallel call to the logging process. More...
 
void anonymousUserLoginSucessfully ()
 This method should be called when the logging process worked sucessfully, it makes the transition to the main screen calling the changeSceneWithAnimation method of the ChangeScene class. This method also put the inProgress flag to false. More...
 
void errorLoginAnonymousUser (string error)
 This method sould be called when the logging process failed. It shows the given error on the console. This method also put the inProgress flag to false. More...
 

Private Attributes

bool inProgress = false
 if this flag is true, the logging process is working right now, if the logging process didnt started or it finished this flag will be false. More...
 

Detailed Description

class that controls the button of anonymous login.

Member Function Documentation

◆ anonymousUserLoginSucessfully()

void anonymousButtonHandler.anonymousUserLoginSucessfully ( )

This method should be called when the logging process worked sucessfully, it makes the transition to the main screen calling the changeSceneWithAnimation method of the ChangeScene class. This method also put the inProgress flag to false.

◆ errorLoginAnonymousUser()

void anonymousButtonHandler.errorLoginAnonymousUser ( string  error)

This method sould be called when the logging process failed. It shows the given error on the console. This method also put the inProgress flag to false.

Parameters
stringThat contains the error that happened during the logging process.

◆ tryToLoginAnoymous()

void anonymousButtonHandler.tryToLoginAnoymous ( )

if the inProgress flag is false, this method calls the AnonymousUser method of firebaseHandler class. It also set the inProgress flag to true. If it is called when the inProcess flag is on this method wont do nothing, this is like this for avoid more than one parallel call to the logging process.

Member Data Documentation

◆ inProgress

bool anonymousButtonHandler.inProgress = false
private

if this flag is true, the logging process is working right now, if the logging process didnt started or it finished this flag will be false.


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