Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::Contact Struct Reference

#include <jami_contact.h>

Collaboration diagram for jami::Contact:
Collaboration graph

Public Member Functions

 Contact ()=default
 
 Contact (const Json::Value &json)
 
bool hasDifferentState (const Contact &other) const
 
bool isActive () const
 True if the contact is an active contact (not banned nor removed)
 
bool isBanned () const
 
Json::Value toJson () const
 
std::map< std::string, std::string > toMap () const
 
bool update (const Contact &c)
 Update this contact using other known contact information, return true if contact state was changed.
 

Public Attributes

time_t added {0}
 Time of contact addition.
 
bool banned {false}
 True if the contact is banned (if not active)
 
bool confirmed {false}
 True if we got confirmation that this contact also added us.
 
std::string conversationId {}
 Non empty if a swarm is linked.
 
time_t removed {0}
 Time of contact removal.
 

Detailed Description

Definition at line 35 of file jami_contact.h.

Constructor & Destructor Documentation

◆ Contact() [1/2]

jami::Contact::Contact ( )
default

◆ Contact() [2/2]

jami::Contact::Contact ( const Json::Value &  json)
inline

Definition at line 57 of file jami_contact.h.

References added, banned, confirmed, conversationId, and removed.

Member Function Documentation

◆ hasDifferentState()

bool jami::Contact::hasDifferentState ( const Contact other) const
inline

Definition at line 93 of file jami_contact.h.

References confirmed, jami::emitSignal(), isActive(), and isBanned().

Referenced by update().

Here is the call graph for this function:

◆ isActive()

bool jami::Contact::isActive ( ) const
inline

True if the contact is an active contact (not banned nor removed)

Definition at line 53 of file jami_contact.h.

References added, and removed.

Referenced by hasDifferentState(), isBanned(), toMap(), and update().

◆ isBanned()

bool jami::Contact::isBanned ( ) const
inline

Definition at line 54 of file jami_contact.h.

References banned, jami::emitSignal(), and isActive().

Referenced by hasDifferentState(), and toMap().

Here is the call graph for this function:

◆ toJson()

Json::Value jami::Contact::toJson ( ) const
inline

Definition at line 99 of file jami_contact.h.

References added, banned, confirmed, conversationId, and removed.

◆ toMap()

std::map< std::string, std::string > jami::Contact::toMap ( ) const
inline

Definition at line 114 of file jami_contact.h.

References added, confirmed, conversationId, jami::FALSE_STR, isActive(), isBanned(), removed, and jami::TRUE_STR.

Here is the call graph for this function:

◆ update()

bool jami::Contact::update ( const Contact c)
inline

Update this contact using other known contact information, return true if contact state was changed.

Definition at line 70 of file jami_contact.h.

References added, banned, confirmed, conversationId, jami::emitSignal(), hasDifferentState(), isActive(), and removed.

Here is the call graph for this function:

Member Data Documentation

◆ added

time_t jami::Contact::added {0}

Time of contact addition.

Definition at line 38 of file jami_contact.h.

Referenced by Contact(), isActive(), toJson(), toMap(), and update().

◆ banned

bool jami::Contact::banned {false}

True if the contact is banned (if not active)

Definition at line 47 of file jami_contact.h.

Referenced by Contact(), isBanned(), toJson(), and update().

◆ confirmed

bool jami::Contact::confirmed {false}

True if we got confirmation that this contact also added us.

Definition at line 44 of file jami_contact.h.

Referenced by Contact(), hasDifferentState(), toJson(), toMap(), and update().

◆ conversationId

std::string jami::Contact::conversationId {}

Non empty if a swarm is linked.

Definition at line 50 of file jami_contact.h.

Referenced by Contact(), toJson(), toMap(), and update().

◆ removed

time_t jami::Contact::removed {0}

Time of contact removal.

Definition at line 41 of file jami_contact.h.

Referenced by Contact(), isActive(), toJson(), toMap(), and update().


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