A user with an account on GiGa.GG. Cf: https://giga.gg/users/profile/1704781. More...
#include <User.h>
Classes | |
| class | ContactData |
| class | PersonalData |
Public Member Functions | |
| User (User &&)=default | |
| User (const User &)=default | |
| User & | operator= (const User &) |
| User & | operator= (User &&rhs) noexcept |
| User (std::shared_ptr< data::User > u, const Application &app, std::shared_ptr< data::UsersRelation > r=nullptr) | |
| uint64_t | id () const |
| const utility::string_t & | login () const |
| web::uri | avatarUri () const |
| web::uri | bigAvatarUri () const |
| std::chrono::system_clock::time_point | creationDate () const |
| std::chrono::system_clock::time_point | lastConnectionDate () const |
| Activity | activity () const |
| bool | isUnlimited () const |
| SeederStatus | isSeeder () const |
| uint64_t | contactCount () const |
| const std::vector < utility::string_t > & | tags () const |
| Country | country () const |
| Language | language () const |
| const utility::string_t & | description () const |
| bool | hasContactData () const |
| ContactData & | contactData () |
| Get the data shared by this user. More... | |
| bool | hasPersonalData () const |
| const PersonalData & | personalData () const |
| Get the personal data of the currentUser. More... | |
| bool | hasRelation () const |
| UserRelation | relation () const |
| Get the UserRelation data between this user and the currentUser. More... | |
| User | invite () |
| Send an invitation from the currentUser to this user. More... | |
| User | block () |
| The currentUser blocks this user. More... | |
| User | acceptInvitation () |
| Accept an invitation received from this user to the currentUser. More... | |
| void | suggest (const User &contact) |
Suggest contact to this user. More... | |
| void | removeRelation () |
Remove a relation. Make sure this user hasRelation() const More... | |
Friends | |
| class | giga::Application |
Detailed Description
A user with an account on GiGa.GG. Cf: https://giga.gg/users/profile/1704781.
Member Function Documentation
| User giga::core::User::acceptInvitation | ( | ) |
Accept an invitation received from this user to the currentUser.
- Returns
- A new User with the
relation()set to a contact UserRelation (andcontactData()set).
- Exceptions
-
HttpError
| User giga::core::User::block | ( | ) |
The currentUser blocks this user.
- Returns
- A new User with the
relation()set to a block UserRelation.
- Exceptions
-
HttpError
| User::ContactData & giga::core::User::contactData | ( | ) |
Get the data shared by this user.
Make sure this user hasContactData().
To get a user with contact data, you can user Application::getContacts() or Application::getContact().
- Returns
- The data shared by this user.
- Exceptions
-
ErrorException if there is no contactData.
| bool giga::core::User::hasContactData | ( | ) | const |
- Returns
trueif the user has contact data.
| bool giga::core::User::hasPersonalData | ( | ) | const |
- Returns
trueif the user has personal data (this is true only for the currentUser)
| bool giga::core::User::hasRelation | ( | ) | const |
- Returns
trueif this user has a UserRelation set.
| User giga::core::User::invite | ( | ) |
Send an invitation from the currentUser to this user.
- Returns
- A new User with the
relation()set to an invitation.
- Exceptions
-
HttpError
| User::SeederStatus giga::core::User::isSeeder | ( | ) | const |
The seederStatus defines if a user share some nodes to other users.
| const User::PersonalData & giga::core::User::personalData | ( | ) | const |
Get the personal data of the currentUser.
Make sure this user hasPersonalData().
To get the currentUser uses Application::currentUser().
- Exceptions
-
ErrorException if there is no personalData.
| UserRelation giga::core::User::relation | ( | ) | const |
Get the UserRelation data between this user and the currentUser.
Make sure this user hasRelation() const.
To get users with relational data with the currentUser, you may use one of these functions:
Application::getContacts()Application::getContact()Application::getInvitingUsers()Application::getInvitedUsers()Application::getSuggestedUsers()Application::getBlockedUsers()
- Exceptions
-
ErrorException if there is no relation.
| void giga::core::User::removeRelation | ( | ) |
Remove a relation. Make sure this user hasRelation() const
- Exceptions
-
HttpError
- See Also
- UserRelation
| void giga::core::User::suggest | ( | const User & | contact | ) |
| const std::vector< string_t > & giga::core::User::tags | ( | ) | const |
A user may add a list of Tags to describe is account. The tags do not include the leading '#'. You should always display them with a '#' first.
The documentation for this class was generated from the following files:
- /home/thomas/code/GiGaSdk/src/giga/core/User.h
- /home/thomas/code/GiGaSdk/src/giga/core/User.cpp
1.8.6