Commit 367243d2 authored by Ronan's avatar Ronan

feat(MainDb): chatroom fetch in progress

parent 91fc02db
......@@ -82,7 +82,7 @@ set(LINPHONE_CXX_OBJECTS_PRIVATE_HEADER_FILES
core/core.h
db/abstract/abstract-db-p.h
db/abstract/abstract-db.h
db/events-db.h
db/main-db.h
db/session/db-session-p.h
db/session/db-session-provider.h
db/session/db-session.h
......@@ -159,7 +159,7 @@ set(LINPHONE_CXX_OBJECTS_SOURCE_FILES
content/content.cpp
core/core.cpp
db/abstract/abstract-db.cpp
db/events-db.cpp
db/main-db.cpp
db/session/db-session-provider.cpp
db/session/db-session.cpp
event-log/call-event.cpp
......
......@@ -26,7 +26,6 @@
#include "chat/notification/imdn.h"
#include "content/content.h"
#include "content/content-type.h"
#include "db/events-db.h"
#include "object/object-p.h"
#include "sal/sal.h"
......@@ -137,7 +136,6 @@ private:
std::list<Content > contents;
Content internalContent;
std::unordered_map<std::string, std::string> customHeaders;
std::shared_ptr<EventsDb> eventsDb;
mutable LinphoneErrorInfo * errorInfo = NULL;
belle_http_request_t *httpRequest = NULL;
belle_http_request_listener_t *httpListener = NULL;
......
......@@ -17,7 +17,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "db/events-db.h"
#include "object/object-p.h"
#include "linphone/core.h"
......
This diff is collapsed.
/*
* events-db.h
* main-db.h
* Copyright (C) 2010-2017 Belledonne Communications SARL
*
* This program is free software; you can redistribute it and/or
......@@ -17,8 +17,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef _EVENTS_DB_H_
#define _EVENTS_DB_H_
#ifndef _MAIN_DB_H_
#define _MAIN_DB_H_
#include <list>
......@@ -28,10 +28,13 @@
LINPHONE_BEGIN_NAMESPACE
class ChatRoom;
class EventLog;
class EventsDbPrivate;
class MainDbPrivate;
class LINPHONE_PUBLIC MainDb : public AbstractDb {
friend class ChatRoomProvider;
class LINPHONE_PUBLIC EventsDb : public AbstractDb {
public:
enum Filter {
NoFilter = 0x0,
......@@ -42,7 +45,7 @@ public:
typedef int FilterMask;
EventsDb ();
MainDb ();
// Generic.
bool addEvent (const EventLog &eventLog);
......@@ -66,6 +69,9 @@ public:
) const;
void cleanHistory (const std::string &peerAddress = "", FilterMask mask = NoFilter);
// ChatRooms.
std::shared_ptr<ChatRoom> findChatRoom (const std::string &peerAddress) const;
// Import legacy messages from old db.
bool import (Backend backend, const std::string &parameters) override;
......@@ -73,10 +79,10 @@ protected:
void init () override;
private:
L_DECLARE_PRIVATE(EventsDb);
L_DISABLE_COPY(EventsDb);
L_DECLARE_PRIVATE(MainDb);
L_DISABLE_COPY(MainDb);
};
LINPHONE_END_NAMESPACE
#endif // ifndef _EVENTS_DB_H_
#endif // ifndef _MAIN_DB_H_
......@@ -32,7 +32,7 @@ LINPHONE_BEGIN_NAMESPACE
class EventLogPrivate;
class LINPHONE_PUBLIC EventLog : public ClonableObject {
friend class EventsDb;
friend class MainDb;
public:
L_DECLARE_ENUM(Type, L_ENUM_VALUES_EVENT_LOG_TYPE);
......
......@@ -16,7 +16,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "db/events-db.h"
#include "db/main-db.h"
#include "liblinphone_tester.h"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment