Project 'savoirfairelinux/ring-daemon' was moved to 'savoirfairelinux/jami-daemon'. Please update any links and bookmarks that may still have the old path.
Select Git revision
configurationmanager.cpp
-
Sébastien Blin authored
Because a client can receives messages before a client is ready to receive it and because the daemon does not store any message, we should have, like calls or file transfers, have a method to get these messages. So, this patch introduces a new method which gives the ability to retrieve messages since the daemon has been launched. To do that, when the daemon will receives a new message, it will store this message into a queue (limited to 1000 messages) and save the related timestamp. When the client is ready it can call getLastMessages with its last known timestamp. This method will return all messages received after this timestamp. Note: the perfect way to do that is to store messages directly in the daemon not clients. We also need some synchronization processes. Change-Id: Iceb1654088a843f9be5b4a47bcc23201e9b38c01
Sébastien Blin authoredBecause a client can receives messages before a client is ready to receive it and because the daemon does not store any message, we should have, like calls or file transfers, have a method to get these messages. So, this patch introduces a new method which gives the ability to retrieve messages since the daemon has been launched. To do that, when the daemon will receives a new message, it will store this message into a queue (limited to 1000 messages) and save the related timestamp. When the client is ready it can call getLastMessages with its last known timestamp. This method will return all messages received after this timestamp. Note: the perfect way to do that is to store messages directly in the daemon not clients. We also need some synchronization processes. Change-Id: Iceb1654088a843f9be5b4a47bcc23201e9b38c01
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
configurationmanager.cpp 26.81 KiB
/*
* Copyright (C) 2004-2018 Savoir-faire Linux Inc.
*
* Author: Pierre-Luc Beaudoin <pierre-luc.beaudoin@savoirfairelinux.com>
* Author: Emmanuel Milou <emmanuel.milou@savoirfairelinux.com>
* Author: Guillaume Carmel-Archambault <guillaume.carmel-archambault@savoirfairelinux.com>
* Author: Guillaume Roguez <Guillaume.Roguez@savoirfairelinux.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
#include "configurationmanager_interface.h"
#include "account_schema.h"
#include "manager.h"
#include "security/tlsvalidator.h"
#include "security/certstore.h"
#include "logger.h"
#include "fileutils.h"
#include "archiver.h"
#include "ip_utils.h"
#include "sip/sipaccount.h"
#include "ringdht/ringaccount.h"
#include "audio/audiolayer.h"
#include "system_codec_container.h"
#include "account_const.h"
#include "client/ring_signal.h"
#include "upnp/upnp_context.h"
#ifdef __APPLE__
#include <TargetConditionals.h>
#endif
#ifdef RING_UWP
#include "windirent.h"
#else
#include <dirent.h>
#endif
#include <cerrno>
#include <cstring>
#include <sstream>
#ifdef _WIN32
#undef interface
#endif
namespace DRing {
constexpr unsigned CODECS_NOT_LOADED = 0x1000; /** Codecs not found */
using ring::SIPAccount;
using ring::RingAccount;
using ring::tls::TlsValidator;
using ring::tls::CertificateStore;