refs #602, CWebDataServices and CCookieManager now part of CApplication

* New hint flag: DB data for the client will no longer be web loaded but fetched from cache whenever possible
* No public constructors for the 2 classes
* adjusted main
This commit is contained in:
Klaus Basan
2016-02-24 00:01:04 +01:00
committed by Mathew Sutcliffe
parent 4b7ba4f117
commit 65af7d87da
11 changed files with 54 additions and 71 deletions

View File

@@ -21,14 +21,17 @@
namespace BlackCore
{
class CApplication;
/*!
* Centralized cookie manager,
* which allows thread safe sharing of cookies
* Cookie manager, which allows thread safe sharing of cookies
*/
class BLACKCORE_EXPORT CCookieManager : QNetworkCookieJar
class BLACKCORE_EXPORT CCookieManager : public QNetworkCookieJar
{
Q_OBJECT
friend class CApplication;
public:
//! cookiesForUrl::setCookiesFromUrl
//! \threadsafe
@@ -58,19 +61,10 @@ namespace BlackCore
//! \threadsafe
virtual bool updateCookie(const QNetworkCookie &cookie) override;
//! Our central access manager
static CCookieManager *instance();
//! Set the central instance to the given access manager
static void setToAccessManager(QNetworkAccessManager *manager);
private:
//! Constructor
CCookieManager(QObject *parent = nullptr);
//! Reset the parent, required when CookieManager is set to QNetworkAccessManager
static void resetParent();
mutable QReadWriteLock m_lock { QReadWriteLock::Recursive };
};