Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jami::JamiAccount Class Reference

Ring Account is build on top of SIPAccountBase and uses DHT to handle call connectivity. More...

#include <jamiaccount.h>

Inheritance diagram for jami::JamiAccount:
Inheritance graph
Collaboration diagram for jami::JamiAccount:
Collaboration graph

Classes

struct  BuddyInfo
 
struct  DiscoveredPeer
 
struct  PendingCall
 
struct  PendingMessage
 

Public Member Functions

bool acceptTrustRequest (const std::string &from, bool includeConversation=true)
 
const std::shared_ptr< AccountManager > & accountManager ()
 
void addContact (const std::string &uri, bool confirmed=false)
 Add contact to the account contact list.
 
int32_t addDevice (const std::string &uriProvided)
 Initiates the process of adding a new device to this account.
 
void askForFileChannel (const std::string &conversationId, const std::string &deviceId, const std::string &interactionId, const std::string &fileId, size_t start=0, size_t end=0)
 
void askForProfile (const std::string &conversationId, const std::string &deviceId, const std::string &memberUri)
 
std::unique_ptr< AccountConfigbuildConfig () const override
 
bool cancelAddDevice (uint32_t op_token)
 
dhtnet::tls::CertificateStore & certStore () const
 
bool changeArchivePassword (const std::string &password_old, const std::string &password_new)
 
void clearProfileCache (const std::string &peerUri)
 Clear sent profiles (because of a removed contact or new trust request)
 
const JamiAccountConfigconfig () const
 
bool confirmAddDevice (uint32_t op_token)
 
void connectivityChanged () override
 Inform the account that the network status has changed.
 
JamiAccountConfig::Credentials consumeConfigCredentials ()
 
ConversationModuleconvModule (bool noCreation=false)
 Used to get the instance of the ConversationModule class which is responsible for managing conversations and messages between users.
 
std::string_view currentDeviceId () const
 
std::shared_ptr< TransferManagerdataTransfer (const std::string &id="")
 Retrieve linked transfer manager.
 
void declineConversationRequest (const std::string &conversationId)
 
std::shared_ptr< dht::DhtRunner > dht ()
 
bool discardTrustRequest (const std::string &from)
 
void doRegister () override
 Connect to the DHT.
 
void doUnregister (bool forceShutdownConnections=false) override
 Disconnect from the DHT.
 
void editConfig (std::function< void(JamiAccountConfig &conf)> &&edit)
 
bool exportArchive (const std::string &destinationPath, std::string_view scheme={}, const std::string &password={})
 Export the archive to a file.
 
bool findCertificate (const dht::InfoHash &h, std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&cb={})
 
bool findCertificate (const dht::PkId &h, std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&cb={})
 
bool findCertificate (const std::string &id)
 
void flush () override
 This method is called to request removal of possible account traces on the system, like internal account setup files.
 
void forceReloadAccount ()
 Try to reload the account to force the identity to be updated.
 
void forEachDevice (const dht::InfoHash &to, std::function< void(const std::shared_ptr< dht::crypto::PublicKey > &)> &&op, std::function< void(bool)> &&end={})
 
std::string_view getAccountType () const override
 
std::vector< std::string > getCertificatesByStatus (dhtnet::tls::TrustStore::PermissionStatus status)
 
std::vector< std::map< std::string, std::string > > getChannelList (const std::string &connectionId)
 
std::vector< std::map< std::string, std::string > > getConnectionList (const std::string &conversationId="")
 
std::map< std::string, std::string > getContactDetails (const std::string &uri) const
 Obtain details about one account contact in serializable form.
 
std::string getContactHeader (const std::shared_ptr< SipTransport > &sipTransport)
 Get the contact header for.
 
std::optional< ContactgetContactInfo (const std::string &uri) const
 
std::vector< std::map< std::string, std::string > > getContacts (bool includeRemoved=false) const
 
std::string getFromUri () const override
 
dhtnet::IceTransportOptions getIceOptions () const override
 Create and return ICE options.
 
void getIceOptions (std::function< void(dhtnet::IceTransportOptions &&)> cb) const
 
std::map< std::string, std::string > getKnownDevices () const
 
std::vector< libjami::MessagegetLastMessages (const uint64_t &base_timestamp) override
 Get last messages (should be used to retrieve messages when launching the client)
 
std::map< std::string, std::string > getNearbyPeers () const override
 Get current discovered peers account id and display name.
 
std::vector< uint8_tgetPasswordKey (const std::string &password)
 
dhtnet::IpAddr getPublishedIpAddress (uint16_t family=PF_UNSPEC) const override
 
std::string getServerUri () const
 In the current version, "srv" uri is obtained in the preformated way: hostname:port.
 
virtual bool getSrtpFallback () const override
 
std::string getToUri (const std::string &username) const override
 This method adds the correct scheme, hostname and append the ;transport= parameter at the end of the uri, in accordance with RFC3261.
 
std::map< std::string, boolgetTrackedBuddyPresence () const
 Tells for each tracked account id if it has been seen online so far in the last DeviceAnnouncement::TYPE.expiration minutes.
 
std::vector< std::map< std::string, std::string > > getTrustRequests () const
 
std::string getUserUri () const override
 
virtual std::map< std::string, std::string > getVolatileAccountDetails () const override
 Retrieve volatile details such as recent registration errors.
 
void handleIncomingConversationCall (const std::string &callId, const std::string &destination)
 Join incoming call to hosted conference.
 
bool handleMessage (const std::shared_ptr< dht::crypto::Certificate > &cert, const std::string &from, const std::pair< std::string, std::string > &message) override
 
const dht::crypto::Identity & identity () const
 
bool isConnectedWith (const DeviceId &deviceId) const
 Check if a Device is connected.
 
bool isMessageTreated (dht::Value::Id id)
 
bool isMobile () const
 The DRT component is composed on some special nodes, that are usually present but not connected.
 
bool isPasswordValid (const std::string &password)
 
bool isSrtpEnabled () const override
 
virtual bool isTlsEnabled () const override
 Determine if TLS is enabled for this account.
 
bool isValidAccountDevice (const dht::crypto::Certificate &cert) const
 
 JamiAccount (const std::string &accountId)
 Constructor.
 
void loadConfig () override
 Load the settings in this account.
 
void loadConversation (const std::string &convId)
 
MatchRank matches (std::string_view username, std::string_view hostname) const override
 
void monitor ()
 
bool needToSendProfile (const std::string &peerUri, const std::string &deviceId, const std::string &sha3Sum)
 Check (via the cache) if we need to send our profile to a specific device.
 
std::shared_ptr< SIPCallnewIncomingCall (const std::string &from, const std::vector< libjami::MediaMap > &mediaList, const std::shared_ptr< SipTransport > &sipTr={}) override
 Create incoming SIPCall.
 
std::shared_ptr< CallnewOutgoingCall (std::string_view toUrl, const std::vector< libjami::MediaMap > &mediaList) override
 Create outgoing SIPCall.
 
void onTextMessage (const std::string &id, const std::string &from, const std::shared_ptr< dht::crypto::Certificate > &peerCert, const std::map< std::string, std::string > &payloads) override
 
std::filesystem::path profilePath () const
 
bool provideAccountAuthentication (const std::string &credentialsFromUser, const std::string &scheme)
 
void pushNotificationReceived (const std::string &from, const std::map< std::string, std::string > &data)
 To be called by clients with relevant data when a push notification is received.
 
void reloadContacts ()
 
void removeContact (const std::string &uri, bool banned=true)
 
bool revokeDevice (const std::string &device, std::string_view scheme={}, const std::string &password={})
 
void saveConfig () const override
 
bool searchUser (const std::string &nameQuery)
 
void sendFile (const std::string &conversationId, const std::filesystem::path &path, const std::string &name, const std::string &replyTo)
 
void sendInstantMessage (const std::string &convId, const std::map< std::string, std::string > &msg)
 
void sendMessage (const std::string &to, const std::string &deviceId, const std::map< std::string, std::string > &payloads, uint64_t id, bool retryOnTimeout=true, bool onlyConnected=false) override
 
void sendPresenceNote (const std::string &note)
 Send a presence note.
 
void sendProfile (const std::string &convId, const std::string &peerUri, const std::string &deviceId)
 Send Profile via cached SIP connection.
 
void sendProfile (const std::string &peerUri, const std::string &deviceId)
 Send profile via cached SIP connection.
 
void sendProfileToPeers ()
 
uint64_t sendTextMessage (const std::string &to, const std::string &deviceId, const std::map< std::string, std::string > &payloads, uint64_t refreshToken=0, bool onlyConnected=false) override
 If supported, send a text message from this account.
 
void sendTrustRequest (const std::string &to, const std::vector< uint8_t > &payload)
 
void setActiveCodecs (const std::vector< unsigned > &list) override
 Update both the codec order structure and the codec string used for SDP offer and configuration respectively.
 
bool setCertificateStatus (const std::shared_ptr< crypto::Certificate > &cert, dhtnet::tls::TrustStore::PermissionStatus status, bool local=true)
 
bool setCertificateStatus (const std::string &cert_id, dhtnet::tls::TrustStore::PermissionStatus status)
 
void setIsComposing (const std::string &conversationUri, bool isWriting) override
 
bool setMessageDisplayed (const std::string &conversationUri, const std::string &messageId, int status) override
 
bool setPushNotificationConfig (const std::map< std::string, std::string > &data) override
 
bool setPushNotificationToken (const std::string &pushDeviceToken="") override
 
bool setPushNotificationTopic (const std::string &topic) override
 
void setRegistrationState (RegistrationState state, int detail_code=0, const std::string &detail_str={}) override
 Set the registration state of the specified link.
 
bool setValidity (std::string_view scheme, const std::string &pwd, const dht::InfoHash &id, int64_t validity)
 Change certificate's validity period.
 
bool sha3SumVerify () const
 
std::shared_ptr< JamiAccountshared ()
 
std::shared_ptr< JamiAccount constshared () const
 
void shutdownConnections ()
 This should be called before flushing the account.
 
void startAccountDiscovery ()
 Start Discovery the Jami Account from the Network.
 
void startAccountPublish ()
 Start Publish the Jami Account onto the Network.
 
SyncModulesyncModule ()
 
void trackBuddyPresence (const std::string &buddy_id, bool track)
 Adds an account id to the list of accounts to track on the DHT for buddy presence.
 
void transferFile (const std::string &conversationId, const std::string &path, const std::string &deviceId, const std::string &fileId, const std::string &interactionId, size_t start=0, size_t end=0, const std::string &sha3Sum="", uint64_t lastWriteTime=0, std::function< void()> onFinished={})
 
void unlinkConversations (const std::set< std::string > &removedConv)
 Make sure appdata/contacts.yml contains correct information.
 
void updateProfile (const std::string &displayName, const std::string &avatar, const std::string &fileType, int32_t flag) override
 Update the profile vcard and send it to peers.
 
std::weak_ptr< JamiAccountweak ()
 
std::weak_ptr< JamiAccount constweak () const
 
 ~JamiAccount () noexcept
 
- Public Member Functions inherited from jami::SIPAccountBase
const SipAccountBaseConfigconfig () const
 
void connectivityChanged () override
 Inform the account that the network status has changed.
 
bool CreateClientDialogAndInvite (const pj_str_t *from, const pj_str_t *contact, const pj_str_t *to, const pj_str_t *target, const pjmedia_sdp_session *local_sdp, pjsip_dialog **dlg, pjsip_inv_session **inv)
 Create UAC attached dialog and invite session.
 
std::vector< MediaAttributecreateDefaultMediaList (bool addVideo, bool onHold=false)
 
uint16_t generateAudioPort () const
 Socket port generators for media Note: given ports are application wide, a port is unable to be given again by any account instances until it's released by the static method releasePort().
 
virtual std::string getDtmfType () const
 
std::vector< libjami::MessagegetLastMessages (const uint64_t &base_timestamp) override
 
const std::string & getLocalInterface () const
 Get the local interface name on which this account is bound.
 
im::MessageStatus getMessageStatus (uint64_t id) const override
 Return the status corresponding to the token.
 
std::string getPublishedAddress () const
 Get the public IP address set by the user for this account.
 
bool getPublishedSameasLocal () const
 Get a flag which determine the usage in sip headers of either the local IP address and port (localAddress and localPort) or to an address set manually (publishedAddress and publishedPort).
 
virtual pj_uint16_t getStunPort () const
 
virtual bool isStunEnabled () const
 
void loadConfig () override
 Load the settings in this account.
 
void setPublishedAddress (const dhtnet::IpAddr &ip_addr)
 
 SIPAccountBase (const std::string &accountID)
 Constructor.
 
virtual ~SIPAccountBase () noexcept
 
- Public Member Functions inherited from jami::Account
 Account (const std::string &accountID)
 
void addDefaultModerator (const std::string &peerURI)
 
void attach (const std::shared_ptr< Call > &call)
 
void attach (const std::shared_ptr< Conference > &conf)
 
virtual bool cancelMessage (uint64_t)
 
const AccountConfigconfig () const
 
bool detach (const std::shared_ptr< Call > &call)
 
void editConfig (std::function< void(AccountConfig &config)> &&edit)
 
void enableAutoLoadConversations (bool enable)
 
void enableIceCompIdRfc5245Compliance (bool enable)
 
void enableIceForMedia (bool enable)
 
void enableVideo (bool enable)
 
std::map< std::string, std::string > getAccountDetails () const
 
const std::string & getAccountID () const
 Get the account ID.
 
std::vector< std::shared_ptr< SystemCodecInfo > > getActiveAccountCodecInfoList (MediaType mediaType) const
 
std::vector< unsignedgetActiveCodecs (MediaType mediaType=MEDIA_ALL) const
 
const std::string & getAlias () const
 
std::shared_ptr< CallgetCall (const std::string &callId) const
 
std::vector< std::string > getCallList () const
 
std::shared_ptr< ConferencegetConference (const std::string &confId) const
 
std::vector< std::string > getConferenceList () const
 
std::set< std::string > getDefaultModerators () const
 
std::string getDisplayName () const
 
const std::string & getHostname () const
 
std::string getMailBox () const
 
const std::filesystem::path & getPath () const
 
std::map< std::string, std::string > getProfileVcard () const
 
RegistrationState getRegistrationState () const
 
bool getRingtoneEnabled () const
 
std::filesystem::path getRingtonePath () const
 
bool getUPnPActive () const
 returns whether or not UPnP is enabled and active ie: if it is able to make port mappings
 
dhtnet::IpAddr getUPnPIpAddress () const
 Get the UPnP IP (external router) address.
 
const std::string & getUserAgentName ()
 Get the user-agent.
 
const std::string & getUsername () const
 
void hangupCalls ()
 Free all ressources related to this account.
 
bool hasActiveCodec (MediaType mediaType) const
 
bool isActive () const noexcept
 Tell if the account is activated (can currently be used).
 
bool isAllModerators () const
 
bool isAutoAnswerEnabled () const
 
bool isComposingEnabled () const
 
bool isDenySecondCallEnabled () const
 
bool isEmptyOffersEnabled () const
 
bool isEnabled () const
 Tell if the account is enable or not.
 
bool isIceCompIdRfc5245Compliant () const
 
bool isIceForMediaEnabled () const
 
virtual bool isIP2IP () const
 Returns true if this is the IP2IP account.
 
bool isLocalModeratorsEnabled () const
 
bool isReadReceiptEnabled () const
 
bool isRendezVous () const
 
bool isUsable () const
 
bool isVideoEnabled () const
 
void loadDefaultCodecs ()
 Helper function used to load the default codec order from the codec factory.
 
bool removeConference (const std::string &confId)
 
void removeDefaultModerator (const std::string &peerURI)
 
std::shared_ptr< SystemCodecInfosearchCodecById (unsigned codecId, MediaType mediaType)
 
std::shared_ptr< SystemCodecInfosearchCodecByPayload (unsigned payload, MediaType mediaType)
 
void setAccountDetails (const std::map< std::string, std::string > &details)
 
void setActive (bool active) noexcept
 
void setCodecActive (unsigned codecId)
 
void setCodecInactive (unsigned codecId)
 
void setConfig (std::unique_ptr< AccountConfig > &&config)
 
void setEnabled (bool enable)
 
virtual ~Account ()
 Virtual destructor.
 

Static Public Attributes

static constexpr auto ACCOUNT_TYPE = ACCOUNT_TYPE_JAMI
 
static constexpr const std::pair< uint16_t, uint16_tDHT_PORT_RANGE {4000, 8888}
 
static constexpr int ICE_COMP_COUNT_PER_STREAM {1}
 
static constexpr int ICE_STREAMS_COUNT {1}
 
- Static Public Attributes inherited from jami::SIPAccountBase
static constexpr unsigned HALF_MAX_PORT {MAX_PORT / 2}
 
static constexpr unsigned MAX_PORT {65536}
 

Additional Inherited Members

- Static Public Member Functions inherited from jami::SIPAccountBase
static void releasePort (uint16_t port) noexcept
 
- Static Public Member Functions inherited from jami::Account
static std::map< std::string, std::string > getDefaultCodecDetails (const unsigned &codecId)
 
static std::vector< unsignedgetDefaultCodecsId ()
 
static bool meetMinimumRequiredVersion (const std::vector< unsigned > &jamiVersion, const std::vector< unsigned > &minRequiredVersion)
 
- Public Attributes inherited from jami::Account
std::mt19937_64 rand
 Random generator engine Logical account state shall never rely on the state of the random generator.
 
- Protected Member Functions inherited from jami::SIPAccountBase
uint16_t acquireRandomEvenPort (const std::pair< uint16_t, uint16_t > &range) const
 
uint16_t getRandomEvenPort (const std::pair< uint16_t, uint16_t > &range) const
 
- Protected Member Functions inherited from jami::Account
std::vector< unsignedgetAccountCodecInfoIdList (MediaType mediaType) const
 
std::shared_ptr< SystemCodecInfosearchCodecByName (const std::string &name, MediaType mediaType)
 private account codec searching functions
 
void setAllCodecsActive (MediaType mediaType, bool active)
 
void sortCodec ()
 
- Static Protected Member Functions inherited from jami::SIPAccountBase
static uint16_t acquirePort (uint16_t port)
 
static std::array< bool, HALF_MAX_PORT > & getPortsReservation () noexcept
 
- Static Protected Member Functions inherited from jami::Account
static std::string getDefaultUserAgent ()
 Build the user-agent string.
 
static std::string mapStateNumberToString (RegistrationState state)
 
- Protected Attributes inherited from jami::SIPAccountBase
std::deque< libjami::MessagelastMessages_
 
SIPVoIPLinklink_
 Voice over IP Link contains a listener thread and calls.
 
im::MessageEngine messageEngine_
 
std::mutex mutexLastMessages_
 The deamon can be launched without any client (or with a non ready client) Like call and file transfer, a client should be able to retrieve current messages.
 
dhtnet::IpAddr publishedIp_ [2] {}
 Published IPv4/IPv6 addresses, used only if defined by the user in account configuration.
 
std::string transportError_ {}
 
pj_status_t transportStatus_ {PJSIP_SC_TRYING}
 
std::shared_ptr< dhtnet::TurnCache > turnCache_
 
- Protected Attributes inherited from jami::Account
std::vector< std::shared_ptr< SystemCodecInfo > > accountCodecInfoList_
 Vector containing all account codecs (set of system codecs with custom parameters)
 
const std::string accountID_
 Account ID are assign in constructor and shall not changed.
 
bool active_ {true}
 Tells if the account is active now.
 
bool autoLoadConversations_ {true}
 Auto load conversations when creatinf convModule()
 
std::unique_ptr< AccountConfigconfig_ {}
 
std::recursive_mutex configurationMutex_ {}
 
bool iceCompIdRfc5245Compliant_ {false}
 
bool iceForMediaEnabled_ {true}
 
std::filesystem::path idPath_ {}
 path to account
 
RegistrationState registrationState_ {RegistrationState::UNLOADED}
 
std::filesystem::path ringtonePath_
 Ringtone .au file used for this account.
 
std::shared_ptr< SystemCodecContainersystemCodecContainer_
 Vector containing all system codecs (with default parameters)
 
std::mutex upnp_mtx {}
 UPnP IGD controller and the mutex to access it.
 
std::shared_ptr< dhtnet::upnp::Controller > upnpCtrl_
 
- Static Protected Attributes inherited from jami::SIPAccountBase
static constexpr size_t MAX_WAITING_MESSAGES_SIZE = 1000
 
- Static Protected Attributes inherited from jami::Account
static const std::string DEFAULT_USER_AGENT = Account::getDefaultUserAgent()
 

Detailed Description

Ring Account is build on top of SIPAccountBase and uses DHT to handle call connectivity.

Definition at line 95 of file jamiaccount.h.

Constructor & Destructor Documentation

◆ JamiAccount()

jami::JamiAccount::JamiAccount ( const std::string &  accountId)

Constructor.

Parameters
accountIDThe account identifier

Definition at line 251 of file jamiaccount.cpp.

◆ ~JamiAccount()

jami::JamiAccount::~JamiAccount ( )
noexcept

Definition at line 262 of file jamiaccount.cpp.

Member Function Documentation

◆ acceptTrustRequest()

bool jami::JamiAccount::acceptTrustRequest ( const std::string &  from,
bool  includeConversation = true 
)

Definition at line 2964 of file jamiaccount.cpp.

References JAMI_ERROR, and JAMI_WARNING.

◆ accountManager()

const std::shared_ptr< AccountManager > & jami::JamiAccount::accountManager ( )
inline

Definition at line 558 of file jamiaccount.h.

◆ addContact()

void jami::JamiAccount::addContact ( const std::string &  uri,
bool  confirmed = false 
)

Add contact to the account contact list.

Set confirmed if we know the contact also added us.

Definition at line 2902 of file jamiaccount.cpp.

References JAMI_ERROR, and JAMI_WARNING.

◆ addDevice()

int32_t jami::JamiAccount::addDevice ( const std::string &  uriProvided)

Initiates the process of adding a new device to this account.

Parameters
uriProvidedThe URI provided by the new device to be added
Returns
A positive operation ID if successful, or a negative value indicating an AddDeviceError:
  • INVALID_URI (-1): The provided URI is invalid
  • ALREADY_LINKING (-2): A device linking operation is already in progress
  • GENERIC (-3): A generic error occurred during the process

Definition at line 1019 of file jamiaccount.cpp.

References JAMI_ERR, and JAMI_LOG.

◆ askForFileChannel()

void jami::JamiAccount::askForFileChannel ( const std::string &  conversationId,
const std::string &  deviceId,
const std::string &  interactionId,
const std::string &  fileId,
size_t  start = 0,
size_t  end = 0 
)

Definition at line 4443 of file jamiaccount.cpp.

◆ askForProfile()

void jami::JamiAccount::askForProfile ( const std::string &  conversationId,
const std::string &  deviceId,
const std::string &  memberUri 
)

Definition at line 4508 of file jamiaccount.cpp.

◆ buildConfig()

std::unique_ptr< AccountConfig > jami::JamiAccount::buildConfig ( ) const
inlineoverridevirtual

Implements jami::Account.

Definition at line 149 of file jamiaccount.h.

References jami::Account::getAccountID(), and jami::Account::idPath_.

Here is the call graph for this function:

◆ cancelAddDevice()

bool jami::JamiAccount::cancelAddDevice ( uint32_t  op_token)

Definition at line 1037 of file jamiaccount.cpp.

◆ certStore()

dhtnet::tls::CertificateStore & jami::JamiAccount::certStore ( ) const
inline

Definition at line 609 of file jamiaccount.h.

◆ changeArchivePassword()

bool jami::JamiAccount::changeArchivePassword ( const std::string &  password_old,
const std::string &  password_new 
)

Definition at line 969 of file jamiaccount.cpp.

References jami::JamiAccountConfig::archiveHasPassword, and JAMI_ERROR.

◆ clearProfileCache()

void jami::JamiAccount::clearProfileCache ( const std::string &  peerUri)

Clear sent profiles (because of a removed contact or new trust request)

Parameters
peerUriUri used to clear cache

Definition at line 4131 of file jamiaccount.cpp.

◆ config()

const JamiAccountConfig & jami::JamiAccount::config ( ) const
inline

Definition at line 122 of file jamiaccount.h.

References jami::Account::config().

Referenced by isMobile().

Here is the call graph for this function:

◆ confirmAddDevice()

bool jami::JamiAccount::confirmAddDevice ( uint32_t  op_token)

Definition at line 1045 of file jamiaccount.cpp.

◆ connectivityChanged()

void jami::JamiAccount::connectivityChanged ( )
overridevirtual

Inform the account that the network status has changed.

Reimplemented from jami::Account.

Definition at line 2515 of file jamiaccount.cpp.

References JAMI_WARN.

◆ consumeConfigCredentials()

JamiAccountConfig::Credentials jami::JamiAccount::consumeConfigCredentials ( )
inline

Definition at line 127 of file jamiaccount.h.

References jami::Account::config_, and jami::emitSignal().

Here is the call graph for this function:

◆ convModule()

ConversationModule * jami::JamiAccount::convModule ( bool  noCreation = false)

Used to get the instance of the ConversationModule class which is responsible for managing conversations and messages between users.

Parameters
noCreatewhether or not to create a new instance
Returns
conversationModule instance

Definition at line 2244 of file jamiaccount.cpp.

References JAMI_ERROR.

◆ currentDeviceId()

std::string_view jami::JamiAccount::currentDeviceId ( ) const

Definition at line 4235 of file jamiaccount.cpp.

◆ dataTransfer()

std::shared_ptr< TransferManager > jami::JamiAccount::dataTransfer ( const std::string &  id = "")

Retrieve linked transfer manager.

Parameters
idconversationId or empty for fallback
Returns
linked transfer manager

Definition at line 4243 of file jamiaccount.cpp.

◆ declineConversationRequest()

void jami::JamiAccount::declineConversationRequest ( const std::string &  conversationId)

Definition at line 3005 of file jamiaccount.cpp.

References libjami::Account::TrustRequest::CONVERSATIONID, and JAMI_DEBUG.

◆ dht()

std::shared_ptr< dht::DhtRunner > jami::JamiAccount::dht ( )
inline

Definition at line 387 of file jamiaccount.h.

◆ discardTrustRequest()

bool jami::JamiAccount::discardTrustRequest ( const std::string &  from)

◆ doRegister()

void jami::JamiAccount::doRegister ( )
overridevirtual

Connect to the DHT.

Implements jami::Account.

Definition at line 1683 of file jamiaccount.cpp.

References JAMI_LOG, and JAMI_WARNING.

◆ doUnregister()

void jami::JamiAccount::doUnregister ( bool  forceShutdownConnections = false)
overridevirtual

Disconnect from the DHT.

Implements jami::Account.

Definition at line 2429 of file jamiaccount.cpp.

References jami::Manager::instance(), JAMI_WARN, and jami::PEER_DISCOVERY_JAMI_SERVICE.

Here is the call graph for this function:

◆ editConfig()

void jami::JamiAccount::editConfig ( std::function< void(JamiAccountConfig &conf)> &&  edit)
inline

Definition at line 425 of file jamiaccount.h.

References jami::Account::editConfig(), and jami::emitSignal().

Here is the call graph for this function:

◆ exportArchive()

bool jami::JamiAccount::exportArchive ( const std::string &  destinationPath,
std::string_view  scheme = {},
const std::string &  password = {} 
)

Export the archive to a file.

Parameters
destinationPath
(optional)password, if not provided, will update the contacts only if the archive doesn't have a password
Returns
if the archive was exported

Definition at line 1053 of file jamiaccount.cpp.

◆ findCertificate() [1/3]

bool jami::JamiAccount::findCertificate ( const dht::InfoHash &  h,
std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&  cb = {} 
)

Definition at line 2537 of file jamiaccount.cpp.

◆ findCertificate() [2/3]

bool jami::JamiAccount::findCertificate ( const dht::PkId &  h,
std::function< void(const std::shared_ptr< dht::crypto::Certificate > &)> &&  cb = {} 
)

Definition at line 2547 of file jamiaccount.cpp.

◆ findCertificate() [3/3]

bool jami::JamiAccount::findCertificate ( const std::string &  id)

Definition at line 2556 of file jamiaccount.cpp.

◆ flush()

void jami::JamiAccount::flush ( )
overridevirtual

This method is called to request removal of possible account traces on the system, like internal account setup files.

Reimplemented from jami::SIPAccountBase.

Definition at line 297 of file jamiaccount.cpp.

References jami::SIPAccountBase::flush(), and jami::Account::idPath_.

Here is the call graph for this function:

◆ forceReloadAccount()

void jami::JamiAccount::forceReloadAccount ( )

Try to reload the account to force the identity to be updated.

Definition at line 1079 of file jamiaccount.cpp.

References jami::JamiAccountConfig::receipt, and jami::JamiAccountConfig::receiptSignature.

◆ forEachDevice()

void jami::JamiAccount::forEachDevice ( const dht::InfoHash &  to,
std::function< void(const std::shared_ptr< dht::crypto::PublicKey > &)> &&  op,
std::function< void(bool)> &&  end = {} 
)

Definition at line 3068 of file jamiaccount.cpp.

◆ getAccountType()

std::string_view jami::JamiAccount::getAccountType ( ) const
inlineoverridevirtual

Implements jami::Account.

Definition at line 103 of file jamiaccount.h.

References ACCOUNT_TYPE.

◆ getCertificatesByStatus()

std::vector< std::string > jami::JamiAccount::getCertificatesByStatus ( dhtnet::tls::TrustStore::PermissionStatus  status)

Definition at line 2592 of file jamiaccount.cpp.

◆ getChannelList()

std::vector< std::map< std::string, std::string > > jami::JamiAccount::getChannelList ( const std::string &  connectionId)

Definition at line 4287 of file jamiaccount.cpp.

◆ getConnectionList()

std::vector< std::map< std::string, std::string > > jami::JamiAccount::getConnectionList ( const std::string &  conversationId = "")

Definition at line 4264 of file jamiaccount.cpp.

◆ getContactDetails()

std::map< std::string, std::string > jami::JamiAccount::getContactDetails ( const std::string &  uri) const

Obtain details about one account contact in serializable form.

Definition at line 2930 of file jamiaccount.cpp.

◆ getContactHeader()

std::string jami::JamiAccount::getContactHeader ( const std::shared_ptr< SipTransport > &  sipTransport)

Get the contact header for.

Returns
The contact header based on account information

Definition at line 2880 of file jamiaccount.cpp.

References jami::tls::AbstractSIPTransport::getLocalAddress(), JAMI_ERR, and jami::tls::AbstractSIPTransport::TransportData::self.

Referenced by newIncomingCall().

Here is the call graph for this function:

◆ getContactInfo()

std::optional< Contact > jami::JamiAccount::getContactInfo ( const std::string &  uri) const

Definition at line 2938 of file jamiaccount.cpp.

◆ getContacts()

std::vector< std::map< std::string, std::string > > jami::JamiAccount::getContacts ( bool  includeRemoved = false) const

Definition at line 2945 of file jamiaccount.cpp.

◆ getFromUri()

std::string jami::JamiAccount::getFromUri ( ) const
overridevirtual
Returns
pj_str_t "From" uri based on account information. From RFC3261: "The To header field first and foremost specifies the desired logical" recipient of the request, or the address-of-record of the user or resource that is the target of this request. [...] As such, it is very important that the From URI not contain IP addresses or the FQDN of the host on which the UA is running, since these are not logical names."

Implements jami::Account.

Definition at line 2794 of file jamiaccount.cpp.

◆ getIceOptions() [1/2]

dhtnet::IceTransportOptions jami::JamiAccount::getIceOptions ( ) const
overridevirtual

Create and return ICE options.

Reimplemented from jami::SIPAccountBase.

Definition at line 3392 of file jamiaccount.cpp.

◆ getIceOptions() [2/2]

void jami::JamiAccount::getIceOptions ( std::function< void(dhtnet::IceTransportOptions &&)>  cb) const

Definition at line 3398 of file jamiaccount.cpp.

◆ getKnownDevices()

std::map< std::string, std::string > jami::JamiAccount::getKnownDevices ( ) const

Definition at line 2621 of file jamiaccount.cpp.

◆ getLastMessages()

std::vector< libjami::Message > jami::JamiAccount::getLastMessages ( const uint64_t base_timestamp)
overridevirtual

Get last messages (should be used to retrieve messages when launching the client)

Parameters
base_timestamp

Reimplemented from jami::Account.

Definition at line 3470 of file jamiaccount.cpp.

◆ getNearbyPeers()

std::map< std::string, std::string > jami::JamiAccount::getNearbyPeers ( ) const
overridevirtual

Get current discovered peers account id and display name.

Reimplemented from jami::Account.

Definition at line 3529 of file jamiaccount.cpp.

◆ getPasswordKey()

std::vector< uint8_t > jami::JamiAccount::getPasswordKey ( const std::string &  password)

Definition at line 1001 of file jamiaccount.cpp.

◆ getPublishedIpAddress()

dhtnet::IpAddr jami::JamiAccount::getPublishedIpAddress ( uint16_t  family = PF_UNSPEC) const
overridevirtual

Reimplemented from jami::SIPAccountBase.

Definition at line 3404 of file jamiaccount.cpp.

◆ getServerUri()

std::string jami::JamiAccount::getServerUri ( ) const
inline

In the current version, "srv" uri is obtained in the preformated way: hostname:port.

This method adds the correct scheme and append the ;transport= parameter at the end of the uri, in accordance with RFC3261.

Returns
pj_str_t "server" uri based on
Parameters
hostPort
hostPortA string formatted as : "hostname:port"

Definition at line 219 of file jamiaccount.h.

◆ getSrtpFallback()

virtual bool jami::JamiAccount::getSrtpFallback ( ) const
inlineoverridevirtual

Implements jami::SIPAccountBase.

Definition at line 270 of file jamiaccount.h.

◆ getToUri()

std::string jami::JamiAccount::getToUri ( const std::string &  username) const
overridevirtual

This method adds the correct scheme, hostname and append the ;transport= parameter at the end of the uri, in accordance with RFC3261.

It is expected that "port" is present in the internal hostname_.

Returns
pj_str_t "To" uri based on
Parameters
username
usernameA string formatted as : "username"

Implements jami::SIPAccountBase.

Definition at line 2803 of file jamiaccount.cpp.

References jami::string_replace().

Here is the call graph for this function:

◆ getTrackedBuddyPresence()

std::map< std::string, bool > jami::JamiAccount::getTrackedBuddyPresence ( ) const

Tells for each tracked account id if it has been seen online so far in the last DeviceAnnouncement::TYPE.expiration minutes.

Returns
map of buddy_uri to bool (online or not)

Definition at line 1810 of file jamiaccount.cpp.

◆ getTrustRequests()

std::vector< std::map< std::string, std::string > > jami::JamiAccount::getTrustRequests ( ) const

Definition at line 2956 of file jamiaccount.cpp.

◆ getUserUri()

std::string jami::JamiAccount::getUserUri ( ) const
overridevirtual

Implements jami::SIPAccountBase.

Definition at line 3460 of file jamiaccount.cpp.

References jami::JAMI_URI_PREFIX.

◆ getVolatileAccountDetails()

std::map< std::string, std::string > jami::JamiAccount::getVolatileAccountDetails ( ) const
overridevirtual

◆ handleIncomingConversationCall()

void jami::JamiAccount::handleIncomingConversationCall ( const std::string &  callId,
const std::string &  destination 
)

◆ handleMessage()

bool jami::JamiAccount::handleMessage ( const std::shared_ptr< dht::crypto::Certificate > &  cert,
const std::string &  from,
const std::pair< std::string, std::string > &  message 
)
overridevirtual

Reimplemented from jami::Account.

Definition at line 3664 of file jamiaccount.cpp.

References libjami::Account::DISPLAYED, JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, jami::MIME_TYPE_IMDN, jami::MIME_TYPE_INVITE_JSON, jami::MIME_TYPE_PIDF, and std::regex_search().

Here is the call graph for this function:

◆ identity()

const dht::crypto::Identity & jami::JamiAccount::identity ( ) const
inline

Definition at line 389 of file jamiaccount.h.

◆ isConnectedWith()

bool jami::JamiAccount::isConnectedWith ( const DeviceId deviceId) const

Check if a Device is connected.

Parameters
deviceId
Returns
true if connected

Definition at line 3938 of file jamiaccount.cpp.

◆ isMessageTreated()

bool jami::JamiAccount::isMessageTreated ( dht::Value::Id  id)
Returns
true if the given DHT message identifier has been treated
Note
if message has not been treated yet this method store this id and returns true at further calls

Definition at line 2600 of file jamiaccount.cpp.

◆ isMobile()

bool jami::JamiAccount::isMobile ( ) const
inline

The DRT component is composed on some special nodes, that are usually present but not connected.

This kind of node corresponds to devices with push notifications & proxy and are stored in the mobile nodes

Definition at line 600 of file jamiaccount.h.

References config(), jami::AccountConfig::deviceKey, jami::emitSignal(), and jami::JamiAccountConfig::proxyEnabled.

Here is the call graph for this function:

◆ isPasswordValid()

bool jami::JamiAccount::isPasswordValid ( const std::string &  password)

Definition at line 995 of file jamiaccount.cpp.

◆ isSrtpEnabled()

bool jami::JamiAccount::isSrtpEnabled ( ) const
inlineoverridevirtual

Implements jami::SIPAccountBase.

Definition at line 268 of file jamiaccount.h.

◆ isTlsEnabled()

virtual bool jami::JamiAccount::isTlsEnabled ( ) const
inlineoverridevirtual

Determine if TLS is enabled for this account.

TLS provides a secured channel for SIP signalization. It is independent of the media encryption (as provided by SRTP).

Reimplemented from jami::SIPAccountBase.

Definition at line 267 of file jamiaccount.h.

◆ isValidAccountDevice()

bool jami::JamiAccount::isValidAccountDevice ( const dht::crypto::Certificate &  cert) const

Definition at line 1108 of file jamiaccount.cpp.

◆ loadConfig()

void jami::JamiAccount::loadConfig ( )
overridevirtual

Load the settings in this account.

Reimplemented from jami::Account.

Definition at line 925 of file jamiaccount.cpp.

References JAMI_LOG.

◆ loadConversation()

void jami::JamiAccount::loadConversation ( const std::string &  convId)

Definition at line 2422 of file jamiaccount.cpp.

◆ matches()

MatchRank jami::JamiAccount::matches ( std::string_view  username,
std::string_view  hostname 
) const
overridevirtual

Implements jami::SIPAccountBase.

Definition at line 2778 of file jamiaccount.cpp.

References JAMI_LOG.

◆ monitor()

void jami::JamiAccount::monitor ( )

Definition at line 4251 of file jamiaccount.cpp.

References JAMI_DEBUG.

◆ needToSendProfile()

bool jami::JamiAccount::needToSendProfile ( const std::string &  peerUri,
const std::string &  deviceId,
const std::string &  sha3Sum 
)

Check (via the cache) if we need to send our profile to a specific device.

Parameters
peerUriUri that will receive the profile
deviceIdDevice that will receive the profile
sha3SumSHA3 hash of the profile

Definition at line 4014 of file jamiaccount.cpp.

◆ newIncomingCall()

std::shared_ptr< SIPCall > jami::JamiAccount::newIncomingCall ( const std::string &  from,
const std::vector< libjami::MediaMap > &  mediaList,
const std::shared_ptr< SipTransport > &  sipTr = {} 
)
overridevirtual

Create incoming SIPCall.

Parameters
[in]fromThe origin of the call
mediaListA list of media
sipTrSIP Transport
Returns
A shared pointer on the created call.

Implements jami::SIPAccountBase.

Definition at line 308 of file jamiaccount.cpp.

References jami::Manager::callFactory, jami::emitSignal(), getContactHeader(), jami::Call::INCOMING, jami::Manager::instance(), JAMI_DEBUG, JAMI_ERR, jami::JAMI_URI_PREFIX, jami::CallFactory::newSipCall(), and shared().

Here is the call graph for this function:

◆ newOutgoingCall()

std::shared_ptr< Call > jami::JamiAccount::newOutgoingCall ( std::string_view  toUrl,
const std::vector< libjami::MediaMap > &  mediaList 
)
overridevirtual

Create outgoing SIPCall.

Note
Accepts several urls:
  • jami:uri for calling someone
  • swarm:id for calling a group (will host or join if an active call is detected)
  • rdv:id/uri/device/confId to join a specific conference hosted on (uri, device)
Parameters
[in]toUrlThe address to call
[in]mediaListlist of medias
Returns
A shared pointer on the created call.

Implements jami::Account.

Definition at line 331 of file jamiaccount.cpp.

References jami::SIPAccountBase::createDefaultMediaList(), jami::emitSignal(), jami::Manager::instance(), jami::Account::isVideoEnabled(), JAMI_DBG, JAMI_WARN, jami::MediaAttribute::mediaAttributesToMediaMaps(), jami::Call::OUTGOING, jami::Uri::RENDEZVOUS, shared(), jami::Uri::SWARM, and weak().

Here is the call graph for this function:

◆ onTextMessage()

void jami::JamiAccount::onTextMessage ( const std::string &  id,
const std::string &  from,
const std::shared_ptr< dht::crypto::Certificate > &  peerCert,
const std::map< std::string, std::string > &  payloads 
)
overridevirtual

Reimplemented from jami::SIPAccountBase.

Definition at line 2409 of file jamiaccount.cpp.

References jami::parseJamiUri().

Here is the call graph for this function:

◆ profilePath()

std::filesystem::path jami::JamiAccount::profilePath ( ) const

Definition at line 4138 of file jamiaccount.cpp.

◆ provideAccountAuthentication()

bool jami::JamiAccount::provideAccountAuthentication ( const std::string &  credentialsFromUser,
const std::string &  scheme 
)

Definition at line 1007 of file jamiaccount.cpp.

References JAMI_ERR.

◆ pushNotificationReceived()

void jami::JamiAccount::pushNotificationReceived ( const std::string &  from,
const std::map< std::string, std::string > &  data 
)

To be called by clients with relevant data when a push notification is received.

Definition at line 3450 of file jamiaccount.cpp.

◆ reloadContacts()

void jami::JamiAccount::reloadContacts ( )

Definition at line 2509 of file jamiaccount.cpp.

◆ removeContact()

void jami::JamiAccount::removeContact ( const std::string &  uri,
bool  banned = true 
)

Definition at line 2920 of file jamiaccount.cpp.

References JAMI_WARNING.

◆ revokeDevice()

bool jami::JamiAccount::revokeDevice ( const std::string &  device,
std::string_view  scheme = {},
const std::string &  password = {} 
)

Definition at line 1120 of file jamiaccount.cpp.

◆ saveConfig()

void jami::JamiAccount::saveConfig ( ) const
overridevirtual

Reimplemented from jami::Account.

Definition at line 909 of file jamiaccount.cpp.

References JAMI_ERROR, and JAMI_LOG.

◆ searchUser()

bool jami::JamiAccount::searchUser ( const std::string &  nameQuery)

Definition at line 1552 of file jamiaccount.cpp.

References jami::emitSignal().

Here is the call graph for this function:

◆ sendFile()

void jami::JamiAccount::sendFile ( const std::string &  conversationId,
const std::filesystem::path &  path,
const std::string &  name,
const std::string &  replyTo 
)

Definition at line 4296 of file jamiaccount.cpp.

References JAMI_ERROR.

◆ sendInstantMessage()

void jami::JamiAccount::sendInstantMessage ( const std::string &  convId,
const std::map< std::string, std::string > &  msg 
)

Definition at line 3646 of file jamiaccount.cpp.

◆ sendMessage()

void jami::JamiAccount::sendMessage ( const std::string &  to,
const std::string &  deviceId,
const std::map< std::string, std::string > &  payloads,
uint64_t  id,
bool  retryOnTimeout = true,
bool  onlyConnected = false 
)
overridevirtual

Track sending state for a single message to one or more devices.

Track new pending message for device

Call after all messages are sent

Complete pending message for device

Implements jami::SIPAccountBase.

Definition at line 3103 of file jamiaccount.cpp.

References jami::ctx::acc, JAMI_ERROR, and jami::parseJamiUri().

Here is the call graph for this function:

◆ sendPresenceNote()

void jami::JamiAccount::sendPresenceNote ( const std::string &  note)

Send a presence note.

Parameters
note

Definition at line 3947 of file jamiaccount.cpp.

References jami::MessageChannelHandler::getChannels(), jami::getPIDF(), and jami::MIME_TYPE_PIDF.

Here is the call graph for this function:

◆ sendProfile() [1/2]

void jami::JamiAccount::sendProfile ( const std::string &  convId,
const std::string &  peerUri,
const std::string &  deviceId 
)

Send Profile via cached SIP connection.

Parameters
convIdConversation's identifier (can be empty for self profile on sync)
peerUriUri that will receive the profile
deviceIdDevice that will receive the profile

Definition at line 3978 of file jamiaccount.cpp.

References JAMI_DEBUG.

◆ sendProfile() [2/2]

void jami::JamiAccount::sendProfile ( const std::string &  peerUri,
const std::string &  deviceId 
)

Send profile via cached SIP connection.

Parameters
peerUriUri that will receive the profile
deviceIdDevice that will receive the profile

◆ sendProfileToPeers()

void jami::JamiAccount::sendProfileToPeers ( )

Definition at line 3535 of file jamiaccount.cpp.

References jami::AccountPeerInfo::accountId.

◆ sendTextMessage()

uint64_t jami::JamiAccount::sendTextMessage ( const std::string &  ,
const std::string &  ,
const std::map< std::string, std::string > &  ,
uint64_t  = 0,
bool  = false 
)
overridevirtual

If supported, send a text message from this account.

Returns
a token to query the message status

Reimplemented from jami::SIPAccountBase.

Definition at line 3076 of file jamiaccount.cpp.

References jami::Uri::authority(), JAMI_ERROR, jami::parseJamiUri(), and jami::Uri::scheme().

Here is the call graph for this function:

◆ sendTrustRequest()

void jami::JamiAccount::sendTrustRequest ( const std::string &  to,
const std::vector< uint8_t > &  payload 
)

Definition at line 3026 of file jamiaccount.cpp.

References JAMI_ERROR, JAMI_WARN, and JAMI_WARNING.

◆ setActiveCodecs()

void jami::JamiAccount::setActiveCodecs ( const std::vector< unsigned > &  list)
overridevirtual

Update both the codec order structure and the codec string used for SDP offer and configuration respectively.

Reimplemented from jami::Account.

Definition at line 3632 of file jamiaccount.cpp.

References jami::MEDIA_ALL, jami::MEDIA_AUDIO, and jami::MEDIA_VIDEO.

◆ setCertificateStatus() [1/2]

bool jami::JamiAccount::setCertificateStatus ( const std::shared_ptr< crypto::Certificate > &  cert,
dhtnet::tls::TrustStore::PermissionStatus  status,
bool  local = true 
)

Definition at line 2577 of file jamiaccount.cpp.

◆ setCertificateStatus() [2/2]

bool jami::JamiAccount::setCertificateStatus ( const std::string &  cert_id,
dhtnet::tls::TrustStore::PermissionStatus  status 
)

Definition at line 2564 of file jamiaccount.cpp.

◆ setIsComposing()

void jami::JamiAccount::setIsComposing ( const std::string &  conversationUri,
bool  isWriting 
)
overridevirtual

Reimplemented from jami::Account.

Definition at line 2840 of file jamiaccount.cpp.

References jami::Uri::authority(), and jami::Uri::scheme().

Here is the call graph for this function:

◆ setMessageDisplayed()

bool jami::JamiAccount::setMessageDisplayed ( const std::string &  conversationUri,
const std::string &  messageId,
int  status 
)
overridevirtual

Reimplemented from jami::Account.

Definition at line 2861 of file jamiaccount.cpp.

References jami::Uri::authority(), libjami::Account::DISPLAYED, and jami::Uri::scheme().

Here is the call graph for this function:

◆ setPushNotificationConfig()

bool jami::JamiAccount::setPushNotificationConfig ( const std::map< std::string, std::string > &  data)
overridevirtual

Reimplemented from jami::Account.

Definition at line 3433 of file jamiaccount.cpp.

◆ setPushNotificationToken()

bool jami::JamiAccount::setPushNotificationToken ( const std::string &  pushDeviceToken = "")
overridevirtual

Reimplemented from jami::Account.

Definition at line 3410 of file jamiaccount.cpp.

References JAMI_WARNING.

◆ setPushNotificationTopic()

bool jami::JamiAccount::setPushNotificationTopic ( const std::string &  topic)
overridevirtual

Reimplemented from jami::Account.

Definition at line 3422 of file jamiaccount.cpp.

◆ setRegistrationState()

void jami::JamiAccount::setRegistrationState ( RegistrationState  state,
int  detail_code = 0,
const std::string &  detail_str = {} 
)
overridevirtual

Set the registration state of the specified link.

Parameters
stateThe registration state of underlying VoIPLink

Reimplemented from jami::SIPAccountBase.

Definition at line 2487 of file jamiaccount.cpp.

References JAMI_WARNING.

◆ setValidity()

bool jami::JamiAccount::setValidity ( std::string_view  scheme,
const std::string &  pwd,
const dht::InfoHash &  id,
int64_t  validity 
)

Change certificate's validity period.

Parameters
pwdPassword for the archive
idCertificate to update ({} for updating the whole chain)
validityNew validity
Note
forceReloadAccount may be necessary to retrigger the migration

Definition at line 1064 of file jamiaccount.cpp.

References jami::DEVICE_ID_PATH.

◆ sha3SumVerify()

bool jami::JamiAccount::sha3SumVerify ( ) const

Definition at line 2607 of file jamiaccount.cpp.

◆ shared() [1/2]

std::shared_ptr< JamiAccount > jami::JamiAccount::shared ( )
inline

Definition at line 105 of file jamiaccount.h.

References jami::emitSignal().

Referenced by newIncomingCall(), and newOutgoingCall().

Here is the call graph for this function:

◆ shared() [2/2]

std::shared_ptr< JamiAccount const > jami::JamiAccount::shared ( ) const
inline

Definition at line 109 of file jamiaccount.h.

References jami::emitSignal().

Here is the call graph for this function:

◆ shutdownConnections()

void jami::JamiAccount::shutdownConnections ( )

This should be called before flushing the account.

ConnectionManager needs the account to exists

Definition at line 269 of file jamiaccount.cpp.

References jami::emitSignal(), jami::Account::getAccountID(), and JAMI_DBG.

Here is the call graph for this function:

◆ startAccountDiscovery()

void jami::JamiAccount::startAccountDiscovery ( )

Start Discovery the Jami Account from the Network.

Definition at line 3485 of file jamiaccount.cpp.

References JAMI_INFO, JAMI_LOG, jami::PEER_DISCOVERY_EXPIRATION, and jami::PEER_DISCOVERY_JAMI_SERVICE.

◆ startAccountPublish()

void jami::JamiAccount::startAccountPublish ( )

Start Publish the Jami Account onto the Network.

Definition at line 3476 of file jamiaccount.cpp.

References jami::AccountPeerInfo::accountId, jami::AccountPeerInfo::displayName, and jami::PEER_DISCOVERY_JAMI_SERVICE.

◆ syncModule()

SyncModule * jami::JamiAccount::syncModule ( )

Definition at line 2396 of file jamiaccount.cpp.

References JAMI_ERR.

◆ trackBuddyPresence()

void jami::JamiAccount::trackBuddyPresence ( const std::string &  buddy_id,
bool  track 
)

Adds an account id to the list of accounts to track on the DHT for buddy presence.

Parameters
buddy_idThe buddy id.

Definition at line 1724 of file jamiaccount.cpp.

References JAMI_ERROR, JAMI_LOG, and jami::parseJamiUri().

Here is the call graph for this function:

◆ transferFile()

void jami::JamiAccount::transferFile ( const std::string &  conversationId,
const std::string &  path,
const std::string &  deviceId,
const std::string &  fileId,
const std::string &  interactionId,
size_t  start = 0,
size_t  end = 0,
const std::string &  sha3Sum = "",
uint64_t  lastWriteTime = 0,
std::function< void()>  onFinished = {} 
)

Definition at line 4376 of file jamiaccount.cpp.

◆ unlinkConversations()

void jami::JamiAccount::unlinkConversations ( const std::set< std::string > &  removedConv)

Make sure appdata/contacts.yml contains correct information.

Parameters
removedConvThe current removed conversations

Definition at line 1089 of file jamiaccount.cpp.

References JAMI_WARNING.

◆ updateProfile()

void jami::JamiAccount::updateProfile ( const std::string &  displayName,
const std::string &  avatar,
const std::string &  fileType,
int32_t  flag 
)
overridevirtual

Update the profile vcard and send it to peers.

Parameters
displayNameCurrent or new display name
avatarCurrent or new avatar
flag0 for path to avatar, 1 for base64 avatar

Implements jami::Account.

Definition at line 3559 of file jamiaccount.cpp.

References jami::AccountConfig::displayName, vCard::utils::initVcard(), JAMI_ERROR, vCard::utils::removeByKey(), and vCard::utils::toString().

Here is the call graph for this function:

◆ weak() [1/2]

std::weak_ptr< JamiAccount > jami::JamiAccount::weak ( )
inline

Definition at line 113 of file jamiaccount.h.

References jami::emitSignal().

Referenced by newOutgoingCall().

Here is the call graph for this function:

◆ weak() [2/2]

std::weak_ptr< JamiAccount const > jami::JamiAccount::weak ( ) const
inline

Definition at line 117 of file jamiaccount.h.

References jami::emitSignal().

Here is the call graph for this function:

Member Data Documentation

◆ ACCOUNT_TYPE

◆ DHT_PORT_RANGE

constexpr const std::pair<uint16_t, uint16_t> jami::JamiAccount::DHT_PORT_RANGE {4000, 8888}
staticconstexpr

Definition at line 99 of file jamiaccount.h.

◆ ICE_COMP_COUNT_PER_STREAM

constexpr int jami::JamiAccount::ICE_COMP_COUNT_PER_STREAM {1}
staticconstexpr

Definition at line 101 of file jamiaccount.h.

◆ ICE_STREAMS_COUNT

constexpr int jami::JamiAccount::ICE_STREAMS_COUNT {1}
staticconstexpr

Definition at line 100 of file jamiaccount.h.


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