1/*
2 * Copyright (C) by Krzesimir Nowak <krzesimir@endocode.com>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
11 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * for more details.
13 */
14
15#ifndef MIRALL_ACCESS_MANAGER_H
16#define MIRALL_ACCESS_MANAGER_H
17
18#include "owncloudlib.h"
19#include <QNetworkAccessManager>
20
21class QByteArray;
22class QUrl;
23
24namespace OCC {
25
26/**
27 * @brief The AccessManager class
28 * @ingroup libsync
29 */
30class OWNCLOUDSYNC_EXPORT AccessManager : public QNetworkAccessManager
31{
32 Q_OBJECT
33
34public:
35 AccessManager(QObject *parent = 0);
36
37 void setRawCookie(const QByteArray &rawCookie, const QUrl &url);
38
39protected:
40 QNetworkReply *createRequest(QNetworkAccessManager::Operation op, const QNetworkRequest &request, QIODevice *outgoingData = 0) Q_DECL_OVERRIDE;
41};
42
43} // namespace OCC
44
45#endif
46