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

Class that stores the current user data. More...

Public Member Functions

 UserData (Firebase.Auth.FirebaseUser newFireBaseUserData, List< Dictionary< string, string > > oldVisitedPlaces=null, Dictionary< string, string > baseCordsData=null, List< string > friendList=null, List< string > friendsInvitationsList=null, List< string > friendsInvitationsAcceptedList=null, List< string > deletedFriendsList=null, List< Dictionary< string, string > > challengesData=null, string userScore=null, string earnedScore=null, List< Dictionary< string, string > > rangeStory=null)
 Constructor. It initialices all the properties taking aware if they have been given with a real value or they are null. More...
 
string ToJson ()
 This method converts all the properties of the current object in a string that follows the JSON format. More...
 
bool hasVisitPlace (string type, int id)
 This method return true if the current user has visited the place that has the given type and the given id. It returns false in any other case. More...
 
int countOfVisitedPlaces ()
 
int countOfVisitedPlacesOfZone (string zone)
 returns the quantity of places of the given type that the user has visited. Zones of the map are defined on mapRulesHandler class. More...
 
int countOfAccumulatedVisits ()
 returns the accumulated sum of number of visit of all the places that the current user has visited. More...
 
string mostVisitedPlace ()
 it returns a string that contains the name of the place that the current user has visited more times. More...
 
string mostVisitedZone ()
 it returns a string that contains the most visited zone of the current user. Zones of the map are defined on mapRulesHandler class. More...
 
string mostVisitedType ()
 it returns a string that contains the most visited zone of the current user. Type of the sites are defined on mapRulesHandler class. More...
 
int countVisitedPlacesOfZone (string zone)
 it returns the sum of all visits to places that are on the given zone. Zones of the map are defined on mapRulesHandler class. More...
 
void newVisitAt (string type, int id, long visitTime)
 This method register a visit of the current user to the place that has the given type and id. It registers the visit at the given timestamp. If the user havent visit a place with the given type and id this method adds a new VisitedPlace object to the visitedPlaces_ array. It also adds to the user a bonus of score. The obtained score depends on: if its the first time that the user visit that place and the proportion of visits that place has compared to the most visited place. It is calculated using getScoreForVisitingAPlace method of gameRules class. It also checks if one of the challenges was visit that place, if that is the case it use the calculateChallengeScore method of gameRules class. More...
 
void setBase (double latitude, double longitude)
 this method should be called once per user. It stablished the user base on the given coords and set the baseEstablished_ attribute to true. More...
 
double getBaseLongitude ()
 Getter of the baseLongitude_ attribute. More...
 
double getBaseLatitude ()
 Getter of the baseLatitude_ attribute. More...
 
bool baseEstablished ()
 Getter of the baseEstablished_ attribute, true if the base of the current user has been already established, false in other case. More...
 
long getTimestampByName (string name)
 It returns the timestamp of the last visit to the place that has the given name, if the user hadn't visited a place with that name it returns 0. More...
 
int countOffriendsInvitations ()
 It returns an int with how many new friendship invitations the current user has. More...
 
string getFriendInvitation (int index)
 It returns the user id of the friendship invitation that is on the given position on the list of all friendship invitations. If the index is bigger than the list or the index is negative it will raise an exception. More...
 
void deleteInvitationByName (string name)
 this method removes the frienship invitation of the user that has the given user id. More...
 
int countOfFriends ()
 
string getFriend (int index)
 Returns the user id of the friend index-th of the current user's friend list. If the given index is bigger than the size of the current user's friend list or its negative it will raise an exception. More...
 
int countOfFriendData ()
 
FriendData getFriendData (int index)
 Returns the friendData of the friend that is on the index-th position. If the given index is bigger than the size of the friendDataList_ list or its negative it will raise an exception. More...
 
void addFriendData (FriendData friendData)
 
bool friendDataIsComplete ()
 
int countOfNewFriends ()
 
string getNewFriend (int index)
 It returns the user id of the index-th invitation of the friendsInvitationsList_ attribute. If the index is bigger than the list's size or its negative it will raise an exception. More...
 
int countOfNewFriendData ()
 
newFriendData getNewFriendData (int index)
 It returns the user id of the index-th friendship invitation data of the friendDataList_ attribute. If the index is bigger than the list's size or its negative it will raise an exception. More...
 
void addNewFriendData (newFriendData friendData)
 
bool newFriendDataIsComplete ()
 
void acceptFriend (string uid)
 This method add the given user id to the friend list and removes the friendship invitation and the friendship invitation data of the attributes of the current user. More...
 
void deleteFriend (string uid)
 This method remove either the given user id of the friend list and the correspondent data from the properties of the current user. More...
 
VisitedPlace getStoryPlaceData (int index)
 This method returns the VisitedPlace that is stored on the given position. If the given position is bigger than the visitedPlaces_ size or the given index is negative it will raise an exception. More...
 
string getUid ()
 getter of the user id. More...
 
bool isAFriendByDisplayName (string displayName)
 This method checks if on the current user's friend list exists any user with the given display name. More...
 
FriendData getFriendDataByUID (string uid)
 This method returns the FriendData object that contains the information of the current user's friend that has the given id. More...
 
void destroyChallengeByChallengerId (string uid)
 This method deletes the challenge that has been sended by the user that has the given user id. More...
 
int getQuantityOfChallenges ()
 This method returns the cuantity of active challenges that the current user has. More...
 
challengeData getChallenge (int index)
 This method returns the challengeData object that is on the given index-th position. More...
 
int lastChallengeScore ()
 getter of the lastChallengeScore_ property. More...
 
int lastVisitScore ()
 getter of the lastVisitScore_ property. More...
 
bool hasToBeNotified (string uid)
 true if the user with the given user id is on the acceptedFriendsToNotify_ list, false in another case. More...
 
string nextFriendToBeNotified ()
 
void hasBeenNotified (string uid)
 This method removes the given user id of the acceptedFriendsToNotify_ list. More...
 
bool anyUserHasToBeNotified ()
 This method returns true if the acceptedFriendsToNotify_ isnt empty, false in any other case. More...
 
int getScore ()
 Getter of the score_ property. More...
 
string getDisplayName ()
 Getter of the displayName_ property. More...
 
int getRangeStoryCount ()
 Getter of the rangeStory_.Count property. More...
 
Dictionary< string, string > getRangeStory (int index)
 Getter of the elements rangeStory_ property. More...
 
void addRangeElementOnRangeStory (Dictionary< string, string > toAdd)
 This method adds the given dictionary to the rangeStory_ property. The rangeStory_ expects dictionaries with at least range_ and date_ entries. More...
 
string getJSONof (string property)
 this method returns the json conversion of the property of this user that has the given name More...
 
bool IsAnonymous ()
 

Public Attributes

Firebase.Auth.FirebaseUser firebaseUserData_
 Reference to the current user firebase data. More...
 
List< VisitedPlacevisitedPlaces_
 List of the places that the current user has visited. More...
 
List< string > friendsInvitationsDeletedList_
 List<string> that stores all the friends invitations that the user accepts or denies in order to prevent the database incongruences. More...
 
List< string > deletedFriends_
 List<string> that stores all the friends that the user deletes in order to prevent the database incongruences. More...
 
List< challengeDatadeletedChallenges_
 List<challengeData> that stores all the challenges that the user completes or removes in order to prevent the database incongruences. More...
 
List< string > acceptedFriends_
 List<string> that stores all the friends invitations that the other user has accepted. More...
 
int earnedScoreBeforeAdding_
 int that stores the score that this user had before adding the score that is on the database version. This has to be done on this way because other users can add score to this user so the database version could be different of the local score version More...
 

Static Public Attributes

static List< string > safeProperties_
 static List<string> that store the names of the properties that are considered safe to write on the database because they only can be modified by the user that own them More...
 
static List< string > unsafeProperties_
 static List<string> that store the names of the properties that are considered unsafe to write on the database because they could be modified by the user that own them and other users. More...
 

Private Attributes

string displayName_
 String that contains the display name of the current user. More...
 
double baseLatitude_
 double that contains the latitude of the base of the current user. More...
 
double baseLongitude_
 double that contains the longitude of the base of the current user. More...
 
bool baseEstablished_
 bool true if the user has already stablished his base, false in other case. More...
 
List< string > friendList_
 list of strings that contains all the user ids of the friends of the current user. More...
 
List< FriendDatafriendDataList_
 list that contains all the data of the friends of the current user. More...
 
List< string > friendsInvitationsList_
 list that contains strings with the user ids of all the user that has sended a friendship invitation to the current user and the current user hasnt accepted or denied. More...
 
List< newFriendDatanewFriendDataList_
 list that stores all the necessary information of the users those that the current user has a new friendship invitation. More...
 
List< challengeDatachallenges_
 List that stores all the data of the challenges that this user has. More...
 
int score_
 Int that stores the score of the current user. More...
 
int lastVisitScore_
 int that stores the score obtained by the last visit done. More...
 
int lastChallengeScore_
 int that stores the score obtained by the last challenge done. More...
 
List< string > acceptedFriendsToNotify_
 List<string> that stores the user ids that have to been notified that this user accepted the friendship invitation. More...
 
List< Dictionary< string, string > > rangeStory_
 List<Dictionary<string,string>> that stores all the user range story. It has an element for each time the user has reached a new range. Each element stores the range that is reached and the date of the achievement. The rangeStory_ expects dictionaries with at least range_ and date_ entries. More...
 

Detailed Description

Class that stores the current user data.

Constructor & Destructor Documentation

◆ UserData()

UserData.UserData ( Firebase.Auth.FirebaseUser  newFireBaseUserData,
List< Dictionary< string, string > >  oldVisitedPlaces = null,
Dictionary< string, string >  baseCordsData = null,
List< string >  friendList = null,
List< string >  friendsInvitationsList = null,
List< string >  friendsInvitationsAcceptedList = null,
List< string >  deletedFriendsList = null,
List< Dictionary< string, string > >  challengesData = null,
string  userScore = null,
string  earnedScore = null,
List< Dictionary< string, string > >  rangeStory = null 
)

Constructor. It initialices all the properties taking aware if they have been given with a real value or they are null.

Parameters
Firebase.Auth.FirebaseUserfirebase user data
List<Dictionary<string,string>>(Optional) Information of the sites that the user has already visited
Dictionary<string,string>(Optional) Information of the geographical coords of the user's base.
List<string>(Optional) List of user ids of the current user's friends.
List<string>(Optional) List of user ids of the current user's new friendship invitations.
List<string>(Optional) List of user ids of the users that has accepted current user's friendships invitations.
List<string>(Optional) List of user ids of the users that has deleted current user's friendship.
List<Dictionary<string,string>>(Optional) List of the current user's challenges.
string(Optional) the user's current score
string(Optional) the user's score that has earned by the completion of challenges that the user has sended.
List<Dictionary<string,string>>(Optional) the user's story of range achievements.
  • If the baseCordsData parameter isnt null, it sets baseEstablished_ attribute to true, it sets it as false in other case.
  • If the friendsInvitationsAcceptedList parameter isnt null, it adds each element of the list to the friendList_ attribute.
  • If the deletedFriendsList parameter isnt null, it deletes each element of that list from the friendList_ attribute.

Member Function Documentation

◆ acceptFriend()

void UserData.acceptFriend ( string  uid)

This method add the given user id to the friend list and removes the friendship invitation and the friendship invitation data of the attributes of the current user.

Parameters
stringthat contains the user id of the user that the current user wants to add as a friend.

◆ addFriendData()

void UserData.addFriendData ( FriendData  friendData)
Parameters
FriendDatato add to the friendDataList_ attribute.

◆ addNewFriendData()

void UserData.addNewFriendData ( newFriendData  friendData)
Parameters
newFriendDatathe data that you want to add to the newFriendDataList_ attribute.

◆ addRangeElementOnRangeStory()

void UserData.addRangeElementOnRangeStory ( Dictionary< string, string >  toAdd)

This method adds the given dictionary to the rangeStory_ property. The rangeStory_ expects dictionaries with at least range_ and date_ entries.

Parameters
Dictionary<string,string>that contains the information of the rangeStory that you want to add.

◆ anyUserHasToBeNotified()

bool UserData.anyUserHasToBeNotified ( )

This method returns true if the acceptedFriendsToNotify_ isnt empty, false in any other case.

Returns
bool true if the acceptedFriendsToNotify_ list isnt empty, false in any other case.

◆ baseEstablished()

bool UserData.baseEstablished ( )

Getter of the baseEstablished_ attribute, true if the base of the current user has been already established, false in other case.

Returns
bool the baseEstablished_ attribute.

◆ countOfAccumulatedVisits()

int UserData.countOfAccumulatedVisits ( )

returns the accumulated sum of number of visit of all the places that the current user has visited.

Returns
int Accumulated sum of number of visit of all the places that the current user has visited.

◆ countOfFriendData()

int UserData.countOfFriendData ( )
Returns
int with the friendDataList_ size.

◆ countOfFriends()

int UserData.countOfFriends ( )
Returns
int how many friends has the current user.

◆ countOffriendsInvitations()

int UserData.countOffriendsInvitations ( )

It returns an int with how many new friendship invitations the current user has.

Returns
int how many new friendship invitations the current user has.

◆ countOfNewFriendData()

int UserData.countOfNewFriendData ( )
Returns
int of the newFriendDataList_ attribute size.

◆ countOfNewFriends()

int UserData.countOfNewFriends ( )
Returns
Count of the size of the friendsInvitationsList_ attribute.

◆ countOfVisitedPlaces()

int UserData.countOfVisitedPlaces ( )
Returns
int Quantity of places that the current user has visited.

◆ countOfVisitedPlacesOfZone()

int UserData.countOfVisitedPlacesOfZone ( string  zone)

returns the quantity of places of the given type that the user has visited. Zones of the map are defined on mapRulesHandler class.

Returns
int Quantity of places of the given type that the user has visited.

◆ countVisitedPlacesOfZone()

int UserData.countVisitedPlacesOfZone ( string  zone)

it returns the sum of all visits to places that are on the given zone. Zones of the map are defined on mapRulesHandler class.

Parameters
stringZone that you want to know how many visit the current user has done.
Returns
int Accumulated sum of all visit to places that are on the given zone.

◆ deleteFriend()

void UserData.deleteFriend ( string  uid)

This method remove either the given user id of the friend list and the correspondent data from the properties of the current user.

Parameters
stringthat contains the user id of the user that the current user wants to delete friendship.

◆ deleteInvitationByName()

void UserData.deleteInvitationByName ( string  name)

this method removes the frienship invitation of the user that has the given user id.

@string user id to delete the friendship invitation.

◆ destroyChallengeByChallengerId()

void UserData.destroyChallengeByChallengerId ( string  uid)

This method deletes the challenge that has been sended by the user that has the given user id.

Parameters
stringthat contains the challenger's user id of the challenge that will be removed.

◆ friendDataIsComplete()

bool UserData.friendDataIsComplete ( )
Returns
bool true if all the friendData was downloaded, false in other case.

◆ getBaseLatitude()

double UserData.getBaseLatitude ( )

Getter of the baseLatitude_ attribute.

Returns
double the baseLatitude_ attribute.

◆ getBaseLongitude()

double UserData.getBaseLongitude ( )

Getter of the baseLongitude_ attribute.

Returns
double the baseLongitude_ attribute.

◆ getChallenge()

challengeData UserData.getChallenge ( int  index)

This method returns the challengeData object that is on the given index-th position.

Parameters
intthe position of the challenge that will be returned
Returns
challengeData that is on the index-th position

◆ getDisplayName()

string UserData.getDisplayName ( )

Getter of the displayName_ property.

Returns
string with the current user's display name

◆ getFriend()

string UserData.getFriend ( int  index)

Returns the user id of the friend index-th of the current user's friend list. If the given index is bigger than the size of the current user's friend list or its negative it will raise an exception.

Parameters
intposition of the user id that you want to get.
Returns
string that contains the user id that is on the index-th position of the current user friend list.

◆ getFriendData()

FriendData UserData.getFriendData ( int  index)

Returns the friendData of the friend that is on the index-th position. If the given index is bigger than the size of the friendDataList_ list or its negative it will raise an exception.

Parameters
intposition of the friendData that you want to get.
Returns
FriendData of the friend that is on the index-th position of the current user friendDataList_.

◆ getFriendDataByUID()

FriendData UserData.getFriendDataByUID ( string  uid)

This method returns the FriendData object that contains the information of the current user's friend that has the given id.

Parameters
stringuser id that we want to get the information.
Returns
FriendData object that contains the information of the current user's friend that has the given id.

◆ getFriendInvitation()

string UserData.getFriendInvitation ( int  index)

It returns the user id of the friendship invitation that is on the given position on the list of all friendship invitations. If the index is bigger than the list or the index is negative it will raise an exception.

Parameters
intthe index for choose the friendship invitation.
Returns
the user id of the index-th friendship invitation.

◆ getJSONof()

string UserData.getJSONof ( string  property)

this method returns the json conversion of the property of this user that has the given name

Parameters
stringwith the name of the property that you want to obtain the json conversion of.
Returns
string with the json conversion of the given property

◆ getNewFriend()

string UserData.getNewFriend ( int  index)

It returns the user id of the index-th invitation of the friendsInvitationsList_ attribute. If the index is bigger than the list's size or its negative it will raise an exception.

Parameters
intthe position of the invitation that you want to get.
Returns
string the user id of the invitation that is on the index-th position of the friendsInvitationsList_ attribute.

◆ getNewFriendData()

newFriendData UserData.getNewFriendData ( int  index)

It returns the user id of the index-th friendship invitation data of the friendDataList_ attribute. If the index is bigger than the list's size or its negative it will raise an exception.

Parameters
intthe position of the friendship invitation data that you want to get.
Returns
string the user id of the friendship invitation data that is on the index-th position of the friendDataList_ attribute.

◆ getQuantityOfChallenges()

int UserData.getQuantityOfChallenges ( )

This method returns the cuantity of active challenges that the current user has.

Returns
int with the quantity of challenges.

◆ getRangeStory()

Dictionary< string, string > UserData.getRangeStory ( int  index)

Getter of the elements rangeStory_ property.

Parameters
intwith the index of the element that you want to obtain
Returns
Dictionary<string,string> with the information of the element that is on the given position of the rangeStory_

◆ getRangeStoryCount()

int UserData.getRangeStoryCount ( )

Getter of the rangeStory_.Count property.

Returns
int with the quantity of elements of the current user's range story

◆ getScore()

int UserData.getScore ( )

Getter of the score_ property.

Returns
int with the current user's score.

◆ getStoryPlaceData()

VisitedPlace UserData.getStoryPlaceData ( int  index)

This method returns the VisitedPlace that is stored on the given position. If the given position is bigger than the visitedPlaces_ size or the given index is negative it will raise an exception.

Parameters
intthe position of the visited place that you want to get.
Returns
VisitedPlace that is on the index-th position of the visitedPlaces_ list.

◆ getTimestampByName()

long UserData.getTimestampByName ( string  name)

It returns the timestamp of the last visit to the place that has the given name, if the user hadn't visited a place with that name it returns 0.

Parameters
stringname of the visited place.
Returns
long the timestamp of the last visit to the place that has the given name.

◆ getUid()

string UserData.getUid ( )

getter of the user id.

Returns
string with the user id of the current user.

◆ hasBeenNotified()

void UserData.hasBeenNotified ( string  uid)

This method removes the given user id of the acceptedFriendsToNotify_ list.

Parameters
stringwith the user id that was notified.

◆ hasToBeNotified()

bool UserData.hasToBeNotified ( string  uid)

true if the user with the given user id is on the acceptedFriendsToNotify_ list, false in another case.

Parameters
stringwith the user id that will be check if it has to be notified.
Returns
bool true if the use with the given user id has to be notified of this user has accepted the friendship invitation.

◆ hasVisitPlace()

bool UserData.hasVisitPlace ( string  type,
int  id 
)

This method return true if the current user has visited the place that has the given type and the given id. It returns false in any other case.

Returns
bool true if the current user has visited the place that has the given type and id.
Parameters
stringtype of the searched place.
intid of the searched place.

◆ isAFriendByDisplayName()

bool UserData.isAFriendByDisplayName ( string  displayName)

This method checks if on the current user's friend list exists any user with the given display name.

Parameters
stringthat contains the user's display name.
Returns
true if the current user has a friend with the given display name.

◆ IsAnonymous()

bool UserData.IsAnonymous ( )
Returns
bool true if the current user is an anonymous user, false in other case

◆ lastChallengeScore()

int UserData.lastChallengeScore ( )

getter of the lastChallengeScore_ property.

Returns
int with the score that this user has earned with the last challenge completed.

◆ lastVisitScore()

int UserData.lastVisitScore ( )

getter of the lastVisitScore_ property.

Returns
int with the score that this user has earned with the last visited.

◆ mostVisitedPlace()

string UserData.mostVisitedPlace ( )

it returns a string that contains the name of the place that the current user has visited more times.

Returns
string that contains the name of the place that the current user has visited more times.

◆ mostVisitedType()

string UserData.mostVisitedType ( )

it returns a string that contains the most visited zone of the current user. Type of the sites are defined on mapRulesHandler class.

Returns
string that contains the most visited zone of the current user.

◆ mostVisitedZone()

string UserData.mostVisitedZone ( )

it returns a string that contains the most visited zone of the current user. Zones of the map are defined on mapRulesHandler class.

Returns
string that contains the most visited zone of the current user.

◆ newFriendDataIsComplete()

bool UserData.newFriendDataIsComplete ( )
Returns
bool True if all frienship invitation data is downloaded, false in other case.

◆ newVisitAt()

void UserData.newVisitAt ( string  type,
int  id,
long  visitTime 
)

This method register a visit of the current user to the place that has the given type and id. It registers the visit at the given timestamp. If the user havent visit a place with the given type and id this method adds a new VisitedPlace object to the visitedPlaces_ array. It also adds to the user a bonus of score. The obtained score depends on: if its the first time that the user visit that place and the proportion of visits that place has compared to the most visited place. It is calculated using getScoreForVisitingAPlace method of gameRules class. It also checks if one of the challenges was visit that place, if that is the case it use the calculateChallengeScore method of gameRules class.

Parameters
stringtype of the site that the current user has visit.
intid of the site that the current user has visit.
longtimestamp of the visit.

◆ nextFriendToBeNotified()

string UserData.nextFriendToBeNotified ( )
Returns
string with the user id of the user that needs to be notified next. @bried This method returns the first element of the acceptedFriendsToNotify_ list. If you call this method without checking if the list is empty with the anyUserHasToBeNotified method, it will raise an exception.

◆ setBase()

void UserData.setBase ( double  latitude,
double  longitude 
)

this method should be called once per user. It stablished the user base on the given coords and set the baseEstablished_ attribute to true.

Parameters
doublelatitude of the base
doublelongitude of the base

◆ ToJson()

string UserData.ToJson ( )

This method converts all the properties of the current object in a string that follows the JSON format.

Returns
string that contains the JSON formated conversion of the current object.

Member Data Documentation

◆ acceptedFriends_

List<string> UserData.acceptedFriends_

List<string> that stores all the friends invitations that the other user has accepted.

◆ acceptedFriendsToNotify_

List<string> UserData.acceptedFriendsToNotify_
private

List<string> that stores the user ids that have to been notified that this user accepted the friendship invitation.

◆ baseEstablished_

bool UserData.baseEstablished_
private

bool true if the user has already stablished his base, false in other case.

◆ baseLatitude_

double UserData.baseLatitude_
private

double that contains the latitude of the base of the current user.

◆ baseLongitude_

double UserData.baseLongitude_
private

double that contains the longitude of the base of the current user.

◆ challenges_

List<challengeData> UserData.challenges_
private

List that stores all the data of the challenges that this user has.

◆ deletedChallenges_

List<challengeData> UserData.deletedChallenges_

List<challengeData> that stores all the challenges that the user completes or removes in order to prevent the database incongruences.

◆ deletedFriends_

List<string> UserData.deletedFriends_

List<string> that stores all the friends that the user deletes in order to prevent the database incongruences.

◆ displayName_

string UserData.displayName_
private

String that contains the display name of the current user.

◆ earnedScoreBeforeAdding_

int UserData.earnedScoreBeforeAdding_

int that stores the score that this user had before adding the score that is on the database version. This has to be done on this way because other users can add score to this user so the database version could be different of the local score version

◆ firebaseUserData_

Firebase.Auth.FirebaseUser UserData.firebaseUserData_

Reference to the current user firebase data.

◆ friendDataList_

List<FriendData> UserData.friendDataList_
private

list that contains all the data of the friends of the current user.

◆ friendList_

List<string> UserData.friendList_
private

list of strings that contains all the user ids of the friends of the current user.

◆ friendsInvitationsDeletedList_

List<string> UserData.friendsInvitationsDeletedList_

List<string> that stores all the friends invitations that the user accepts or denies in order to prevent the database incongruences.

◆ friendsInvitationsList_

List<string> UserData.friendsInvitationsList_
private

list that contains strings with the user ids of all the user that has sended a friendship invitation to the current user and the current user hasnt accepted or denied.

◆ lastChallengeScore_

int UserData.lastChallengeScore_
private

int that stores the score obtained by the last challenge done.

◆ lastVisitScore_

int UserData.lastVisitScore_
private

int that stores the score obtained by the last visit done.

◆ newFriendDataList_

List<newFriendData> UserData.newFriendDataList_
private

list that stores all the necessary information of the users those that the current user has a new friendship invitation.

◆ rangeStory_

List<Dictionary<string,string> > UserData.rangeStory_
private

List<Dictionary<string,string>> that stores all the user range story. It has an element for each time the user has reached a new range. Each element stores the range that is reached and the date of the achievement. The rangeStory_ expects dictionaries with at least range_ and date_ entries.

◆ safeProperties_

List<string> UserData.safeProperties_
static
Initial value:
= new List<string>() {"baseCords_", "displayName_", "score_", "visitedPlaces_", "friends_",
"rangeStory_"}

static List<string> that store the names of the properties that are considered safe to write on the database because they only can be modified by the user that own them

◆ score_

int UserData.score_
private

Int that stores the score of the current user.

◆ unsafeProperties_

List<string> UserData.unsafeProperties_
static
Initial value:
= new List<string>() {"friendsInvitations_", "deletedFriends_", "challenges_", "earnedScore_",
"acceptedFriendsInvitations_"}

static List<string> that store the names of the properties that are considered unsafe to write on the database because they could be modified by the user that own them and other users.

◆ visitedPlaces_

List<VisitedPlace> UserData.visitedPlaces_

List of the places that the current user has visited.


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