Ref T24, preparations to read dbinfo.json for shared files

This will replace http header file timestamps
* read function in info reader has retrieval mode flag, unused parameters removed
* waitForDbInfoObjects/getDbInfoDataReader (added "Db"), there will be a 2nd reader
* CWebReaderFlags::DbInfoDataReader (added "Db")
* removed ps_read, only read (public)
This commit is contained in:
Klaus Basan
2017-04-20 02:26:21 +02:00
parent 65f4d1f9e2
commit 485c95101b
7 changed files with 79 additions and 97 deletions

View File

@@ -46,19 +46,18 @@ namespace BlackCore
bool areAllDataRead() const;
//! URL info objects web service
BlackMisc::Network::CUrl getInfoObjectsUrl() const;
BlackMisc::Network::CUrl getDbInfoObjectsUrl() const;
// cache handling for base class
//! Allow to call directly, special for info objects reader
void read();
// cache handling for base class: no cache handling here in that case
virtual BlackMisc::Network::CEntityFlags::Entity getSupportedEntities() const override;
virtual QDateTime getCacheTimestamp(BlackMisc::Network::CEntityFlags::Entity entity) const override;
virtual int getCacheCount(BlackMisc::Network::CEntityFlags::Entity entity) const override;
virtual void synchronizeCaches(BlackMisc::Network::CEntityFlags::Entity entities) override;
virtual void admitCaches(BlackMisc::Network::CEntityFlags::Entity entities) override;
public slots:
//! Allow to call CInfoDataReader::ps_read directly, special for info objects
void read(BlackMisc::Network::CEntityFlags::Entity entities = BlackMisc::Network::CEntityFlags::InfoObjectEntity, const QDateTime &newerThan = QDateTime());
protected:
// cache handling for base class
virtual void invalidateCaches(BlackMisc::Network::CEntityFlags::Entity entities) override;
@@ -69,10 +68,6 @@ namespace BlackCore
//! Info objects have been read
void ps_parseInfoObjectsData(QNetworkReply *nwReply);
//! Read / re-read data file
void ps_read(BlackMisc::Network::CEntityFlags::Entity entities = BlackMisc::Network::CEntityFlags::InfoObjectEntity,
BlackMisc::Db::CDbFlags::DataRetrievalModeFlag mode = BlackMisc::Db::CDbFlags::DbReading, const QDateTime &newerThan = QDateTime());
private:
BlackMisc::Db::CDbInfoList m_infoObjects;
BlackMisc::Network::CUrl m_urlInfoObjects;