|
Ring Daemon
|

Public Attributes | |
| std::weak_ptr< JamiAccount > | account_ |
| const std::string | accountId_ |
| std::filesystem::path | conversationDataPath_ {} |
| const std::string | deviceId_ |
| std::map< std::string, std::string > | deviceToUri_ |
| std::mutex | deviceToUriMtx_ |
| const std::string | id_ |
| std::vector< ConversationMember > | members_ {} |
| std::filesystem::path | membersCache_ {} |
| std::mutex | membersMtx_ {} |
| std::optional< ConversationMode > | mode_ {} |
| OnMembersChanged | onMembersChanged_ {} |
| std::mutex | opMtx_ |
| MemberRole | updateProfilePermLvl_ {MemberRole::ADMIN} |
| const std::string | userId_ |
Definition at line 83 of file conversationrepository.cpp.
|
inline |
Definition at line 86 of file conversationrepository.cpp.
References accountId_, checkLocks(), conversationDataPath_, jami::fileutils::get_data_dir(), id_, initMembers(), loadMembers(), members_, and membersCache_.

Definition at line 1035 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.
Referenced by addUserDevice().

| void jami::ConversationRepository::Impl::addUserDevice | ( | ) |
Definition at line 3428 of file conversationrepository.cpp.
References account_, add(), deviceId_, jami::emitSignal(), JAMI_ERROR, JAMI_WARNING, and repository().

| std::vector< ConversationCommit > jami::ConversationRepository::Impl::behind | ( | const std::string & | from | ) | const |
Definition at line 2281 of file conversationrepository.cpp.
References jami::emitSignal(), JAMI_ERROR, and jami::ConversationRepository::log().

| bool jami::ConversationRepository::Impl::checkEdit | ( | const std::string & | userDevice, |
| const ConversationCommit & | commit | ||
| ) | const |
Definition at line 1118 of file conversationrepository.cpp.
References jami::ConversationRepository::convCommitToMap(), jami::emitSignal(), jami::ConversationRepository::getCommit(), jami::ConversationCommit::id, JAMI_ERROR, and jami::ConversationRepository::uriFromDevice().

| bool jami::ConversationRepository::Impl::checkInitialCommit | ( | const std::string & | userDevice, |
| const std::string & | commitId, | ||
| const std::string & | commitMsg | ||
| ) | const |
Definition at line 1881 of file conversationrepository.cpp.
References jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, JAMI_WARNING, jami::ConversationRepository::mode(), jami::ONE_TO_ONE, jami::json::parse(), and jami::ConversationRepository::uriFromDevice().

|
inline |
Definition at line 102 of file conversationrepository.cpp.
References accountId_, jami::emitSignal(), id_, JAMI_ERROR, JAMI_WARNING, and repository().
Referenced by Impl().

| bool jami::ConversationRepository::Impl::checkValidAdd | ( | const std::string & | userDevice, |
| const std::string & | uriMember, | ||
| const std::string & | commitid, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1276 of file conversationrepository.cpp.
References jami::as_view(), jami::MemberPath::BANNED, jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), jami::ConversationRepository::getInitialMembers(), JAMI_ERROR, jami::MemberPath::MEMBERS, jami::ConversationRepository::mode(), jami::ONE_TO_ONE, and jami::ConversationRepository::uriFromDevice().

| bool jami::ConversationRepository::Impl::checkValidJoins | ( | const std::string & | userDevice, |
| const std::string & | uriMember, | ||
| const std::string & | commitid, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1364 of file conversationrepository.cpp.
References jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), and JAMI_ERROR.

| bool jami::ConversationRepository::Impl::checkValidMergeCommit | ( | const std::string & | mergeId, |
| const std::vector< std::string > & | parents | ||
| ) | const |
Validate the merge commit by ensuring the absence of invalid files.
| mergeId | The id of the merge commit |
| parents | The two commit IDs of parent's of the merge commit |
Definition at line 1707 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| bool jami::ConversationRepository::Impl::checkValidProfileUpdate | ( | const std::string & | userDevice, |
| const std::string & | commitid, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1618 of file conversationrepository.cpp.
References jami::ADMIN, jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, jami::MEMBER, and jami::ConversationRepository::uriFromDevice().

| bool jami::ConversationRepository::Impl::checkValidRemove | ( | const std::string & | userDevice, |
| const std::string & | uriMember, | ||
| const std::string & | commitid, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1438 of file conversationrepository.cpp.
References jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, and std::regex_match().

| bool jami::ConversationRepository::Impl::checkValidUserDiff | ( | const std::string & | userDevice, |
| const std::string & | commitId, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1056 of file conversationrepository.cpp.
References jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, jami::ConversationRepository::mode(), and jami::ConversationRepository::uriFromDevice().

| bool jami::ConversationRepository::Impl::checkValidVoteResolution | ( | const std::string & | userDevice, |
| const std::string & | uriMember, | ||
| const std::string & | commitId, | ||
| const std::string & | parentId, | ||
| const std::string & | voteType | ||
| ) | const |
Definition at line 1497 of file conversationrepository.cpp.
References jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, JAMI_WARNING, std::regex_match(), and jami::ConversationRepository::uriFromDevice().

| bool jami::ConversationRepository::Impl::checkVote | ( | const std::string & | userDevice, |
| const std::string & | commitId, | ||
| const std::string & | parentId | ||
| ) | const |
Definition at line 1155 of file conversationrepository.cpp.
References jami::as_view(), jami::ConversationRepository::changedFiles(), jami::ConversationRepository::diffStats(), jami::emitSignal(), JAMI_ERROR, JAMI_WARNING, std::regex_match(), and jami::ConversationRepository::uriFromDevice().

| std::string jami::ConversationRepository::Impl::commit | ( | const std::string & | msg, |
| bool | verifyDevice = true |
||
| ) |
Definition at line 2051 of file conversationrepository.cpp.
References jami::ECOMMIT, jami::emitSignal(), jami::base64::encode(), JAMI_ERROR, and JAMI_LOG.
Referenced by getCommit().

| std::string jami::ConversationRepository::Impl::commitMessage | ( | const std::string & | msg, |
| bool | verifyDevice = true |
||
| ) |
Definition at line 3486 of file conversationrepository.cpp.
References jami::emitSignal().

| std::optional< std::map< std::string, std::string > > jami::ConversationRepository::Impl::convCommitToMap | ( | const ConversationCommit & | commit | ) | const |
Definition at line 2607 of file conversationrepository.cpp.
References jami::ConversationCommit::author, jami::ConversationCommit::commit_msg, jami::GitAuthor::email, jami::emitSignal(), jami::getFileId(), jami::ConversationCommit::id, jami::ConversationRepository::id(), JAMI_ERROR, jami::ConversationCommit::linearized_parent, jami::ConversationCommit::parents, jami::json::parse(), jami::ConversationCommit::timestamp, and jami::ConversationRepository::uriFromDevice().

| std::string jami::ConversationRepository::Impl::createMergeCommit | ( | git_index * | index, |
| const std::string & | wanted_ref | ||
| ) |
Definition at line 806 of file conversationrepository.cpp.
References jami::ECOMMIT, jami::emitSignal(), jami::base64::encode(), JAMI_ERROR, and JAMI_LOG.

|
inline |
Definition at line 314 of file conversationrepository.cpp.
References account_, jami::emitSignal(), jami::fileutils::loadFile(), and repository().

| GitDiff jami::ConversationRepository::Impl::diff | ( | git_repository * | repo, |
| const std::string & | idNew, | ||
| const std::string & | idOld | ||
| ) | const |
Definition at line 2212 of file conversationrepository.cpp.
References jami::emitSignal(), JAMI_ERROR, and JAMI_WARNING.

Definition at line 2660 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| std::string jami::ConversationRepository::Impl::diffStats | ( | const std::string & | newId, |
| const std::string & | oldId | ||
| ) | const |
Definition at line 2202 of file conversationrepository.cpp.
References jami::ConversationRepository::diffStats(), and jami::emitSignal().

| GitObject jami::ConversationRepository::Impl::fileAtTree | ( | const std::string & | path, |
| const GitTree & | tree | ||
| ) | const |
Definition at line 2432 of file conversationrepository.cpp.
References jami::emitSignal().
Referenced by uriFromDeviceAtCommit().

| void jami::ConversationRepository::Impl::forEachCommit | ( | PreConditionCb && | preCondition, |
| std::function< void(ConversationCommit &&)> && | emplaceCb, | ||
| PostConditionCb && | postCondition, | ||
| const std::string & | from = "", |
||
| bool | logIfNotFound = true |
||
| ) | const |
Definition at line 2318 of file conversationrepository.cpp.
References jami::ConversationCommit::author, jami::Break, jami::emitSignal(), JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, and jami::Skip.

|
inline |
Definition at line 371 of file conversationrepository.cpp.
References commit(), jami::emitSignal(), parseCommit(), and repository().

| std::optional< std::set< std::string_view > > jami::ConversationRepository::Impl::getDeltaPathsFromDiff | ( | const GitDiff & | diff | ) | const |
Get the deltas from a git diff.
| diff | The diff object to extract deltas from |
Definition at line 1684 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_LOG.

|
inline |
Definition at line 211 of file conversationrepository.cpp.
References account_, deviceId_, and jami::regex_display_name().
Referenced by signature().

| std::vector< std::string > jami::ConversationRepository::Impl::getInitialMembers | ( | ) | const |
Definition at line 2470 of file conversationrepository.cpp.
References jami::emitSignal(), jami::ConversationRepository::getCommit(), jami::ConversationRepository::mode(), jami::ONE_TO_ONE, and jami::json::parse().

Definition at line 353 of file conversationrepository.cpp.
References jami::emitSignal(), and repository().

| void jami::ConversationRepository::Impl::initMembers | ( | ) |
Definition at line 2564 of file conversationrepository.cpp.
References jami::ADMIN, jami::MemberPath::ADMINS, jami::BANNED, jami::MemberPath::BANNED, jami::emitSignal(), jami::ConversationRepository::getInitialMembers(), jami::INVITED, jami::MemberPath::INVITED, jami::LEFT, jami::MEMBER, jami::MemberPath::MEMBERS, jami::ConversationRepository::mode(), and jami::ONE_TO_ONE.
Referenced by Impl().

| bool jami::ConversationRepository::Impl::isValidUserAtCommit | ( | const std::string & | userDevice, |
| const std::string & | commitId, | ||
| const git_buf & | sig, | ||
| const git_buf & | sig_data | ||
| ) | const |
Definition at line 1791 of file conversationrepository.cpp.
References jami::as_view(), jami::base64::decode(), jami::emitSignal(), JAMI_ERROR, and JAMI_WARNING.

|
inline |
Definition at line 168 of file conversationrepository.cpp.
References jami::emitSignal(), jami::fileutils::loadFile(), members_, membersCache_, and membersMtx_.
Referenced by Impl().

| std::vector< ConversationCommit > jami::ConversationRepository::Impl::log | ( | const LogOptions & | options | ) | const |
Definition at line 2381 of file conversationrepository.cpp.
References jami::Break, jami::emitSignal(), jami::Ok, jami::Skip, and jami::ConversationRepository::uriFromDevice().

| GitObject jami::ConversationRepository::Impl::memberCertificate | ( | std::string_view | memberUri, |
| const GitTree & | tree | ||
| ) | const |
Definition at line 2443 of file conversationrepository.cpp.
References jami::emitSignal().

|
inline |
Definition at line 305 of file conversationrepository.cpp.
References jami::emitSignal(), members_, and membersMtx_.

|
inline |
Definition at line 391 of file conversationrepository.cpp.
References jami::emitSignal(), members_, and membersMtx_.
Referenced by saveMembers().

| bool jami::ConversationRepository::Impl::mergeFastforward | ( | const git_oid * | target_oid, |
| int | is_unborn | ||
| ) |
Definition at line 956 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| ConversationMode jami::ConversationRepository::Impl::mode | ( | ) | const |
Definition at line 2154 of file conversationrepository.cpp.
References jami::ADMIN_INVITES_ONLY, jami::EINVALIDMODE, jami::emitSignal(), jami::ConversationRepository::getCommit(), jami::INVITES_ONLY, jami::ConversationRepository::mode(), jami::ONE_TO_ONE, jami::json::parse(), and jami::PUBLIC.

| ConversationCommit jami::ConversationRepository::Impl::parseCommit | ( | git_repository * | repo, |
| const git_commit * | commit | ||
| ) | const |
Definition at line 2682 of file conversationrepository.cpp.
References jami::base64::decode(), jami::GitAuthor::email, jami::emitSignal(), jami::ConversationCommit::id, JAMI_WARNING, and jami::GitAuthor::name.
Referenced by getCommit().

|
inline |
Definition at line 199 of file conversationrepository.cpp.
References accountId_, jami::emitSignal(), jami::fileutils::get_data_dir(), id_, and JAMI_ERROR.
Referenced by addUserDevice(), checkLocks(), devices(), getCommit(), hasCommit(), uriFromDevice(), and uriFromDeviceAtCommit().

| void jami::ConversationRepository::Impl::resetHard | ( | ) |
Definition at line 3458 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| bool jami::ConversationRepository::Impl::resolveBan | ( | const std::string_view | type, |
| const std::string & | uri | ||
| ) |
Definition at line 3939 of file conversationrepository.cpp.
References jami::BANNED, jami::emitSignal(), JAMI_ERROR, and jami::fileutils::loadFile().

| bool jami::ConversationRepository::Impl::resolveConflicts | ( | git_index * | index, |
| const std::string & | other_id | ||
| ) |
Definition at line 2498 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| bool jami::ConversationRepository::Impl::resolveUnban | ( | const std::string_view | type, |
| const std::string & | uri | ||
| ) |
Definition at line 3998 of file conversationrepository.cpp.
References jami::ADMIN, jami::emitSignal(), jami::INVITED, JAMI_ERROR, and jami::MEMBER.

|
inline |
Definition at line 181 of file conversationrepository.cpp.
References jami::emitSignal(), members_, membersCache_, memberUris(), and onMembersChanged_.

| GitSignature jami::ConversationRepository::Impl::signature | ( | ) |
Definition at line 784 of file conversationrepository.cpp.
References accountId_, deviceId_, jami::emitSignal(), getDisplayName(), id_, and JAMI_ERROR.

| GitTree jami::ConversationRepository::Impl::treeAtCommit | ( | git_repository * | repo, |
| const std::string & | commitId | ||
| ) | const |
Definition at line 2452 of file conversationrepository.cpp.
References jami::emitSignal(), JAMI_ERROR, and JAMI_WARNING.
Referenced by uriFromDeviceAtCommit().

|
inline |
Retrieve the user related to a device using the account's certificate store.
Definition at line 415 of file conversationrepository.cpp.
References account_, deviceToUri_, deviceToUriMtx_, jami::emitSignal(), JAMI_WARNING, jami::fileutils::loadFile(), repository(), and uriFromDeviceAtCommit().

|
inline |
Retrieve the user related to a device using certificate directly from the repository at a specific commit.
Definition at line 467 of file conversationrepository.cpp.
References jami::as_view(), jami::emitSignal(), fileAtTree(), JAMI_ERROR, repository(), and treeAtCommit().
Referenced by uriFromDevice().

| bool jami::ConversationRepository::Impl::validateDevice | ( | ) |
Definition at line 1955 of file conversationrepository.cpp.
References jami::emitSignal(), JAMI_ERROR, JAMI_WARNING, and jami::fileutils::loadFile().

| bool jami::ConversationRepository::Impl::validCommits | ( | const std::vector< ConversationCommit > & | commits | ) | const |
Definition at line 2870 of file conversationrepository.cpp.
References jami::emitSignal(), jami::EVALIDFETCH, jami::ConversationRepository::isValidUserAtCommit(), JAMI_DEBUG, JAMI_ERROR, JAMI_WARNING, and jami::json::parse().

|
inline |
Verify that a certificate modification is correct.
| certPath | Where the certificate is saved (relative path) |
| userUri | Account we want for this certificate |
| oldCert | Previous certificate. getId() should return the same id as the new certificate. |
Definition at line 491 of file conversationrepository.cpp.
References jami::emitSignal(), and JAMI_ERROR.

| std::weak_ptr<JamiAccount> jami::ConversationRepository::Impl::account_ |
Definition at line 294 of file conversationrepository.cpp.
Referenced by addUserDevice(), devices(), getDisplayName(), and uriFromDevice().
| const std::string jami::ConversationRepository::Impl::accountId_ |
Definition at line 296 of file conversationrepository.cpp.
Referenced by checkLocks(), Impl(), repository(), and signature().
| std::filesystem::path jami::ConversationRepository::Impl::conversationDataPath_ {} |
Definition at line 311 of file conversationrepository.cpp.
Referenced by Impl().
| const std::string jami::ConversationRepository::Impl::deviceId_ |
Definition at line 298 of file conversationrepository.cpp.
Referenced by addUserDevice(), getDisplayName(), and signature().
|
mutable |
Definition at line 460 of file conversationrepository.cpp.
Referenced by uriFromDevice().
|
mutable |
Definition at line 459 of file conversationrepository.cpp.
Referenced by uriFromDevice().
| const std::string jami::ConversationRepository::Impl::id_ |
Definition at line 295 of file conversationrepository.cpp.
Referenced by checkLocks(), Impl(), repository(), and signature().
| std::vector<ConversationMember> jami::ConversationRepository::Impl::members_ {} |
Definition at line 303 of file conversationrepository.cpp.
Referenced by Impl(), loadMembers(), members(), memberUris(), and saveMembers().
| std::filesystem::path jami::ConversationRepository::Impl::membersCache_ {} |
Definition at line 312 of file conversationrepository.cpp.
Referenced by Impl(), loadMembers(), and saveMembers().
|
mutable |
Definition at line 302 of file conversationrepository.cpp.
Referenced by loadMembers(), members(), and memberUris().
|
mutable |
Definition at line 299 of file conversationrepository.cpp.
| OnMembersChanged jami::ConversationRepository::Impl::onMembersChanged_ {} |
Definition at line 195 of file conversationrepository.cpp.
Referenced by saveMembers().
| std::mutex jami::ConversationRepository::Impl::opMtx_ |
Definition at line 541 of file conversationrepository.cpp.
| MemberRole jami::ConversationRepository::Impl::updateProfilePermLvl_ {MemberRole::ADMIN} |
Definition at line 409 of file conversationrepository.cpp.
| const std::string jami::ConversationRepository::Impl::userId_ |
Definition at line 297 of file conversationrepository.cpp.