giga::core::UserRelation Class Reference

#include <UserRelation.h>

Public Types

enum  Type {
  contact = 0, invite, block, should_invite,
  entice_into_giga
}
 
enum  Initiator { other = 0, me, na }
 

Public Member Functions

 UserRelation (std::shared_ptr< data::UsersRelation > r)
 
 UserRelation (UserRelation &&)=default
 
 UserRelation (const UserRelation &)=default
 
UserRelationoperator= (const UserRelation &)=default
 
UserRelationoperator= (UserRelation &&)=default
 
Type type () const
 
std::chrono::system_clock::time_point creationDate () const
 
const std::vector< uint64_t > & userList () const
 Get a list of users ids. More...
 
Initiator initiator () const
 Tells if a contact was initiated by the currentUser or the contact.
 

Friends

class giga::Application
 

Detailed Description

A UserRelation represents the relation between the currentUser and an other user. The UserRelation::Type enum tells what type of relation it is. Depending on this type, the UserRelation may have different fields set.

For most usage, you will not need much more than the Type of relation.

Member Function Documentation

const std::vector< uint64_t > & giga::core::UserRelation::userList ( ) const

Get a list of users ids.

Returns
  • for a Type::should_invite: The list of suggested users
  • for a Type::invite: The list of users that has suggested this invitation
  • for a Type::contact: The list of users that has suggested this contact

The documentation for this class was generated from the following files:
  • /home/thomas/code/GiGaSdk/src/giga/core/UserRelation.h
  • /home/thomas/code/GiGaSdk/src/giga/core/UserRelation.cpp