Skip to content

Commit

Permalink
Config/Cache split
Browse files Browse the repository at this point in the history
  • Loading branch information
Dax89 committed Nov 20, 2016
1 parent 044244e commit ed651e7
Show file tree
Hide file tree
Showing 43 changed files with 63 additions and 64 deletions.
56 changes: 28 additions & 28 deletions LibQTelegram.pro
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,6 @@ SOURCES += \
types/telegramobject.cpp \
models/dialogsmodel.cpp \
mtproto/mtprotoupdatehandler.cpp \
config/cache/telegramcache.cpp \
config/cache/cacheinitializer.cpp \
types/telegramhelper.cpp \
autogenerated/clientsyncmanager.cpp \
objects/telegraminitializer.cpp \
Expand All @@ -235,29 +233,31 @@ SOURCES += \
models/contactsmodel.cpp \
models/abstract/telegrammodel.cpp \
models/abstract/telegramsortfilterproxymodel.cpp \
config/cache/filecache.cpp \
objects/fileobject.cpp \
models/messagesmodel.cpp \
config/cache/database/cachedatabase.cpp \
config/cache/database/tables/dialogstable.cpp \
config/cache/database/tables/userstable.cpp \
config/cache/database/tables/chatstable.cpp \
config/cache/database/tables/databasetable.cpp \
config/cache/database/databasedata.cpp \
config/cache/database/tables/messagestable.cpp \
quick/qquickmediamessageitem.cpp \
quick/qquickpeerimage.cpp \
quick/qquickbaseitem.cpp \
config/cache/cachefetcher.cpp \
objects/notifications/telegramnotifications.cpp \
objects/notifications/notificationobject.cpp \
objects/sendstatus/sendstatushandler.cpp \
objects/sendstatus/sendstatusobject.cpp \
config/cache/database/tables/pendingwebpagetable.cpp \
quick/qquickwaveform.cpp \
objects/peerprofile.cpp \
config/cache/database/tables/chatfulltable.cpp \
config/cache/fileuploader.cpp
cache/cachefetcher.cpp \
cache/cacheinitializer.cpp \
cache/telegramcache.cpp \
cache/database/cachedatabase.cpp \
cache/database/databasedata.cpp \
cache/database/tables/chatfulltable.cpp \
cache/database/tables/chatstable.cpp \
cache/database/tables/databasetable.cpp \
cache/database/tables/dialogstable.cpp \
cache/database/tables/messagestable.cpp \
cache/database/tables/pendingwebpagetable.cpp \
cache/database/tables/userstable.cpp \
cache/file/fileuploader.cpp \
cache/file/filecache.cpp

HEADERS +=\
libqtelegram_global.h \
Expand Down Expand Up @@ -474,8 +474,6 @@ HEADERS +=\
types/telegramobject.h \
models/dialogsmodel.h \
mtproto/mtprotoupdatehandler.h \
config/cache/telegramcache.h \
config/cache/cacheinitializer.h \
types/telegramhelper.h \
autogenerated/clientsyncmanager.h \
objects/telegraminitializer.h \
Expand All @@ -485,28 +483,30 @@ HEADERS +=\
models/contactsmodel.h \
models/abstract/telegrammodel.h \
models/abstract/telegramsortfilterproxymodel.h \
config/cache/filecache.h \
objects/fileobject.h \
models/messagesmodel.h \
config/cache/database/cachedatabase.h \
config/cache/database/databasedata.h \
config/cache/database/tables/dialogstable.h \
config/cache/database/tables/userstable.h \
config/cache/database/tables/chatstable.h \
config/cache/database/tables/databasetable.h \
config/cache/database/tables/messagestable.h \
quick/qquickmediamessageitem.h \
quick/qquickpeerimage.h \
quick/qquickbaseitem.h \
config/cache/cachefetcher.h \
objects/notifications/telegramnotifications.h \
objects/notifications/notificationobject.h \
objects/sendstatus/sendstatushandler.h \
objects/sendstatus/sendstatusobject.h \
crypto/hash.h \
config/cache/database/tables/pendingwebpagetable.h \
types/time.h \
quick/qquickwaveform.h \
objects/peerprofile.h \
config/cache/database/tables/chatfulltable.h \
config/cache/fileuploader.h
cache/cachefetcher.h \
cache/cacheinitializer.h \
cache/telegramcache.h \
cache/database/cachedatabase.h \
cache/database/databasedata.h \
cache/database/tables/chatfulltable.h \
cache/database/tables/chatstable.h \
cache/database/tables/databasetable.h \
cache/database/tables/dialogstable.h \
cache/database/tables/messagestable.h \
cache/database/tables/pendingwebpagetable.h \
cache/database/tables/userstable.h \
cache/file/filecache.h \
cache/file/fileuploader.h
7 changes: 3 additions & 4 deletions config/cache/cachefetcher.cpp → cache/cachefetcher.cpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
#include "cachefetcher.h"
#include "../../autogenerated/telegramapi.h"
#include "../../mtproto/dc/dcsessionmanager.h"
#include "../../types/telegramhelper.h"
#include <limits>
#include "../autogenerated/telegramapi.h"
#include "../mtproto/dc/dcsessionmanager.h"
#include "../types/telegramhelper.h"

CacheFetcher::CacheFetcher(QObject *parent) : QObject(parent), _update(NULL)
{
Expand Down
6 changes: 3 additions & 3 deletions config/cache/cachefetcher.h → cache/cachefetcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
#define CACHEFETCHER_H

#include <QObject>
#include "../../autogenerated/types/types.h"
#include "../../types/basic.h"
#include "../../mtproto/mtprotoreply.h"
#include "../autogenerated/types/types.h"
#include "../types/basic.h"
#include "../mtproto/mtprotoreply.h"

class CacheFetcher : public QObject
{
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "cacheinitializer.h"
#include "../../autogenerated/telegramapi.h"
#include "../../mtproto/dc/dcsessionmanager.h"
#include "../autogenerated/telegramapi.h"
#include "../mtproto/dc/dcsessionmanager.h"
#include "telegramcache.h"

#define DialogsFirstLoad 20
Expand Down
4 changes: 2 additions & 2 deletions config/cache/cacheinitializer.h → cache/cacheinitializer.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define CACHEINITIALIZER_H

#include <QObject>
#include "../../mtproto/mtprotoreply.h"
#include "../../autogenerated/types/types.h"
#include "../mtproto/mtprotoreply.h"
#include "../autogenerated/types/types.h"

class CacheInitializer : public QObject
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@
#include <QObject>
#include <QtSql>
#include "../databasedata.h"
#include "../../../../types/telegramhelper.h"
#include "../../../../types/telegramobject.h"
#include "../../../../autogenerated/types/types.h"
#include "../../../types/telegramhelper.h"
#include "../../../types/telegramobject.h"
#include "../../../autogenerated/types/types.h"

class DatabaseTable : public QObject
{
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config/cache/filecache.cpp → cache/file/filecache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "../../autogenerated/telegramapi.h"
#include "../../types/telegramhelper.h"
#include "../../crypto/hash.h"
#include "telegramcache.h"
#include "../telegramcache.h"
#include <QStandardPaths>
#include <QDir>

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion config/cache/telegramcache.cpp → cache/telegramcache.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "telegramcache.h"
#include "../../mtproto/mtprotoupdatehandler.h"
#include "../mtproto/mtprotoupdatehandler.h"

TelegramCache* TelegramCache::_instance = NULL;

Expand Down
8 changes: 4 additions & 4 deletions config/cache/telegramcache.h → cache/telegramcache.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
#include <QObject>
#include <QList>
#include <QDir>
#include "../../autogenerated/types/types.h"
#include "../../mtproto/mtprotoreply.h"
#include "../../types/telegramhelper.h"
#include "../telegramconfig.h"
#include "../autogenerated/types/types.h"
#include "../mtproto/mtprotoreply.h"
#include "../types/telegramhelper.h"
#include "../config/telegramconfig.h"
#include "database/cachedatabase.h"
#include "cachefetcher.h"

Expand Down
2 changes: 1 addition & 1 deletion models/abstract/telegrammodel.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "telegrammodel.h"
#include "../../config/telegramconfig.h"
#include "../../config/cache/telegramcache.h"
#include "../../cache/telegramcache.h"

TelegramModel::TelegramModel(QObject *parent) : QAbstractListModel(parent), _telegram(NULL), _initializing(false), _loading(false)
{
Expand Down
2 changes: 1 addition & 1 deletion models/contactsmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "contactsmodel.h"
#include "../config/cache/telegramcache.h"
#include "cache/telegramcache.h"

ContactsModel::ContactsModel(QObject *parent) : TelegramModel(parent), _pendingdialogid(0)
{
Expand Down
2 changes: 1 addition & 1 deletion models/dialogsmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "dialogsmodel.h"
#include "../config/cache/telegramcache.h"
#include "../cache/telegramcache.h"
#include "../objects/sendstatus/sendstatushandler.h"

DialogsModel::DialogsModel(QObject *parent) : TelegramModel(parent), _clouddialog(NULL)
Expand Down
2 changes: 1 addition & 1 deletion models/messagesmodel.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "messagesmodel.h"
#include "../config/cache/telegramcache.h"
#include "../cache/telegramcache.h"
#include "../objects/sendstatus/sendstatushandler.h"
#include "../crypto/math.h"
#include <QImageReader>
Expand Down
2 changes: 1 addition & 1 deletion models/messagesmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#define MESSAGESMODEL_H

#include "abstract/telegrammodel.h"
#include "../config/cache/filecache.h"
#include "../cache/file/filecache.h"

class MessagesModel : public TelegramModel
{
Expand Down
2 changes: 1 addition & 1 deletion objects/fileobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "../autogenerated/types/types.h"
#include "../mtproto/mtprotorequest.h"
#include "../mtproto/dc/dcsessionmanager.h"
#include "../config/cache/fileuploader.h"
#include "../cache/file/fileuploader.h"

class FileObject : public QObject
{
Expand Down
2 changes: 1 addition & 1 deletion objects/notifications/telegramnotifications.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "telegramnotifications.h"
#include "../../mtproto/mtprotoupdatehandler.h"
#include "../../config/cache/telegramcache.h"
#include "../../cache/telegramcache.h"

TelegramNotifications::TelegramNotifications(QObject *parent) : QObject(parent), _telegram(NULL), _currentdialog(NULL), _mute(false)
{
Expand Down
2 changes: 1 addition & 1 deletion objects/peerprofile.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "peerprofile.h"
#include "../types/telegramhelper.h"
#include "../config/cache/telegramcache.h"
#include "../cache/telegramcache.h"

PeerProfile::PeerProfile(QObject *parent) : QObject(parent), _telegram(NULL), _peer(NULL), _dialog(NULL), _chat(NULL), _user(NULL)
{
Expand Down
2 changes: 1 addition & 1 deletion objects/sendstatus/sendstatushandler.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include "sendstatushandler.h"
#include "../../mtproto/mtprotoupdatehandler.h"
#include "../../config/cache/telegramcache.h"
#include "../../cache/telegramcache.h"

SendStatusHandler* SendStatusHandler::_instance = NULL;

Expand Down
4 changes: 2 additions & 2 deletions objects/telegraminitializer.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "telegraminitializer.h"
#include "mtproto/mtprotoupdatehandler.h"
#include "config/cache/cacheinitializer.h"
#include "config/cache/telegramcache.h"
#include "cache/cacheinitializer.h"
#include "cache/telegramcache.h"
#include <QDebug>

TelegramInitializer::TelegramInitializer(QObject *parent) : QObject(parent), _apiid(0), _port(0), _dcid(0), _debugmode(false), _accountpassword(NULL), _floodlocktimer(0)
Expand Down
2 changes: 1 addition & 1 deletion quick/qquickbaseitem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <QtQuick>
#include <QHash>
#include "../config/cache/filecache.h"
#include "../cache/file/filecache.h"
#include "../types/telegramhelper.h"

class QQuickBaseItem : public QQuickItem
Expand Down
2 changes: 1 addition & 1 deletion quick/qquickpeerimage.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "qquickpeerimage.h"
#include "../config/cache/telegramcache.h"
#include "../cache/telegramcache.h"

QQuickPeerImage::QQuickPeerImage(QQuickItem* parent): QQuickBaseItem(parent), _peer(NULL), _size(0)
{
Expand Down
4 changes: 2 additions & 2 deletions telegram.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "telegram.h"
#include "mtproto/mtprotoupdatehandler.h"
#include "config/cache/telegramcache.h"
#include "config/cache/filecache.h"
#include "cache/telegramcache.h"
#include "cache/file/filecache.h"
#include "types/telegramhelper.h"

Telegram::Telegram(QObject *parent) : QObject(parent), _initializer(NULL), _autodownload(false)
Expand Down
2 changes: 1 addition & 1 deletion types/telegramhelper.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "basic.h"
#include "../autogenerated/types/types.h"
#include "../config/cache/fileuploader.h"
#include "../cache/file/fileuploader.h"
#include "../types/time.h"

class TelegramHelper
Expand Down

0 comments on commit ed651e7

Please sign in to comment.