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

Class that the panel element that shows a new friendship invitation. More...

Inheritance diagram for newFriendInvitation:

Public Member Functions

void setData (newFriendData friendData)
 The constructor of the class. It stores the given newFriendData object, it sets the shown text as the display name of the user. More...
 
void setPanel (GameObject panel)
 Setter of the panel_ property. More...
 
void acceptFriend ()
 This method should be called when the current user accepts the friendship invitation of the current user. If there is internet connection it calls the acceptFriend method of UserData class and it calls both downloadFriendData and writeUserData firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage. More...
 
void refuseFriend ()
 This method should be called when the current user denies the friendship invitation of the current user. If there is internet connection it calls the deleteInvitationByName method of UserData class and it calls writeUserData of firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage. More...
 
string getUid ()
 Getter of the user id property. More...
 

Private Member Functions

void destroyAndAdvice ()
 This method destroy this GameObject and it also calls the elementDeleted method of the newFriendInvitationPanel class. More...
 

Private Attributes

GameObject toastMessageObject_
 GameObject that references the toastMessage object that will shown the information to the user. More...
 
GameObject displayName_
 GameObject that has the text where the displayName will be shown. More...
 
GameObject panel_
 GameObject that references the panel that this GameObject is attached. More...
 
newFriendData newFriendData_
 Reference to a newFriendData object that contains all the information of the shown friendship invitation. More...
 

Detailed Description

Class that the panel element that shows a new friendship invitation.

Member Function Documentation

◆ acceptFriend()

void newFriendInvitation.acceptFriend ( )

This method should be called when the current user accepts the friendship invitation of the current user. If there is internet connection it calls the acceptFriend method of UserData class and it calls both downloadFriendData and writeUserData firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage.

◆ destroyAndAdvice()

void newFriendInvitation.destroyAndAdvice ( )
private

This method destroy this GameObject and it also calls the elementDeleted method of the newFriendInvitationPanel class.

◆ getUid()

string newFriendInvitation.getUid ( )

Getter of the user id property.

Parameters
stringthat contains the user ID of the represented user.

◆ refuseFriend()

void newFriendInvitation.refuseFriend ( )

This method should be called when the current user denies the friendship invitation of the current user. If there is internet connection it calls the deleteInvitationByName method of UserData class and it calls writeUserData of firebaseHandler class. If there is no internet connection it just shows an error message on a toastMessage.

◆ setData()

void newFriendInvitation.setData ( newFriendData  friendData)

The constructor of the class. It stores the given newFriendData object, it sets the shown text as the display name of the user.

Parameters
thenewFriendData object that contains all the information of the represented frienship invitation.

◆ setPanel()

void newFriendInvitation.setPanel ( GameObject  panel)

Setter of the panel_ property.

Parameters
GameObjectthat contains the panel that this object is attached.

Member Data Documentation

◆ displayName_

GameObject newFriendInvitation.displayName_
private

GameObject that has the text where the displayName will be shown.

◆ newFriendData_

newFriendData newFriendInvitation.newFriendData_
private

Reference to a newFriendData object that contains all the information of the shown friendship invitation.

◆ panel_

GameObject newFriendInvitation.panel_
private

GameObject that references the panel that this GameObject is attached.

◆ toastMessageObject_

GameObject newFriendInvitation.toastMessageObject_
private

GameObject that references the toastMessage object that will shown the information to the user.


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