Ref T24, shared info file name and flag for SharedInfoObjectEntity

This commit is contained in:
Klaus Basan
2017-04-20 02:32:26 +02:00
parent 485c95101b
commit db3370f8f7
6 changed files with 35 additions and 23 deletions

View File

@@ -35,13 +35,13 @@ namespace BlackMisc
DbReading = 1 << 0, //!< directly from DB
DbWriting = 1 << 1, //!< DB writing
Shared = 1 << 2, //!< shared directory
SharedHeadersOnly = 1 << 3, //!< shared headers only
SharedInfoOnly = 1 << 3, //!< shared info file only
Cached = 1 << 4, //!< from cache
Canceled = 1 << 5, //!< canceled DB reading
Ignore = 1 << 6, //!< ignore this entity
CacheThenDb = DbReading | Cached, //!< Cache where possible, otherwise DB
CacheThenShared = Shared | Cached, //!< Cache where possible, otherwise shared
CacheAndSharedHeaders = SharedHeadersOnly | Cached
CacheAndSharedHeaders = SharedInfoOnly | Cached
};
Q_DECLARE_FLAGS(DataRetrievalMode, DataRetrievalModeFlag)

View File

@@ -159,6 +159,12 @@ namespace BlackMisc
return names;
}
const QString &CDbInfo::sharedInfoFileName()
{
static const QString f("dbinfo.json");
return f;
}
const QStringList &CDbInfo::serviceNames()
{
static const QStringList names({"jsonaircrafticao.php", "jsonairlineicao.php", "jsonairport.php", "jsoncountry.php", "jsondistributor.php", "jsonlivery.php", "jsonaircraftmodel.php" });

View File

@@ -92,6 +92,9 @@ namespace BlackMisc
//! The shared file names
static const QStringList &sharedFileNames();
//! Get shared info file name
static const QString &sharedInfoFileName();
//! Service names
static const QStringList &serviceNames();