Ring Daemon 16.0.0
Loading...
Searching...
No Matches
jamiaccount_config.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2004-2025 Savoir-faire Linux Inc.
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
19
20namespace jami {
21constexpr static std::string_view ACCOUNT_TYPE_JAMI = "RING";
22constexpr static const char* const DHT_DEFAULT_BOOTSTRAP = "bootstrap.jami.net";
23constexpr static const char* DEFAULT_TURN_SERVER = "turn.jami.net";
24constexpr static const char* DEFAULT_TURN_USERNAME = "ring";
25constexpr static const char* DEFAULT_TURN_PWD = "ring";
26constexpr static const char* DEFAULT_TURN_REALM = "ring";
27
29{
30 JamiAccountConfig(const std::string& id = {}, const std::filesystem::path& path = {})
31 : SipAccountBaseConfig(std::string(ACCOUNT_TYPE_JAMI), id, path)
32 {
33 // Default values specific to Jami accounts
39 turnEnabled = true;
40 upnpEnabled = true;
41 }
42 void serialize(YAML::Emitter& out) const override;
43 void unserialize(const YAML::Node& node) override;
44 std::map<std::string, std::string> toMap() const override;
45 void fromMap(const std::map<std::string, std::string>&) override;
46
47 std::string deviceName {};
49 bool dhtPeerDiscovery {false};
51 bool accountPublish {false};
52 std::string bootstrapListUrl {"https://config.jami.net/bootstrapList"};
53
54 bool proxyEnabled {false};
55 bool proxyListEnabled {true};
56 std::string proxyServer {"dhtproxy.jami.net:[80-95]"};
57 std::string proxyListUrl {"https://config.jami.net/proxyList"};
58
59 std::string nameServer {};
60 std::string registeredName {};
61
66
67 std::string managerUri {};
68 std::string managerUsername {};
69
70 std::string archivePath {"archive.gz"};
71 bool archiveHasPassword {true};
72
73 // not saved, only used client->daemon
75 {
77 std::string archive_password;
78 std::string archive_pin;
79 std::string archive_path;
81 std::string archive_url; // TODO discuss removal or impl. This is currently unused.
82
83 std::string receipt {};
84 std::vector<uint8_t> receiptSignature {};
85
86 bool dhtPublicInCalls {true};
87};
88
89} // namespace jami
static constexpr const char * DEFAULT_TURN_PWD
void emitSignal(Args... args)
Definition ring_signal.h:64
static constexpr const char *const DHT_DEFAULT_BOOTSTRAP
static constexpr const char * DEFAULT_TURN_SERVER
static constexpr std::string_view ACCOUNT_TYPE_JAMI
static constexpr const char * DEFAULT_TURN_USERNAME
static constexpr const char * DEFAULT_TURN_REALM
std::string hostname
SIP hostname (SIP account) or DHT bootstrap nodes (Jami account)
bool upnpEnabled
UPnP IGD controller and the mutex to access it.
const std::filesystem::path path
Path where the configuration file is stored.
const std::string id
Account id.
JamiAccountConfig(const std::string &id={}, const std::filesystem::path &path={})
std::map< std::string, std::string > toMap() const override
void serialize(YAML::Emitter &out) const override
std::vector< uint8_t > receiptSignature
void unserialize(const YAML::Node &node) override
void fromMap(const std::map< std::string, std::string > &) override
struct jami::JamiAccountConfig::Credentials credentials
bool turnEnabled
Determine if TURN public address resolution is required to register this account.
std::string turnServer
The TURN server hostname (optional), used to provide the public IP address in case the softphone stay...