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