2015-07-16 22:49:12 +03:00
|
|
|
/*
|
|
|
|
* Copyright (C) by Roeland Jago Douma <roeland@famdouma.nl>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful, but
|
|
|
|
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
|
|
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
|
|
|
* for more details.
|
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef CAPABILITIES_H
|
|
|
|
#define CAPABILITIES_H
|
|
|
|
|
|
|
|
#include "owncloudlib.h"
|
|
|
|
|
|
|
|
#include <QVariantMap>
|
2015-10-02 11:58:29 +03:00
|
|
|
#include <QStringList>
|
2015-07-16 22:49:12 +03:00
|
|
|
|
|
|
|
namespace OCC {
|
|
|
|
|
|
|
|
/**
|
2015-10-05 06:20:09 +03:00
|
|
|
* @brief The Capabilities class represents the capabilities of an ownCloud
|
2015-07-16 22:49:12 +03:00
|
|
|
* server
|
|
|
|
* @ingroup libsync
|
|
|
|
*/
|
2015-07-30 12:04:49 +03:00
|
|
|
class OWNCLOUDSYNC_EXPORT Capabilities {
|
2015-07-16 22:49:12 +03:00
|
|
|
|
|
|
|
public:
|
2015-07-29 13:05:00 +03:00
|
|
|
Capabilities(const QVariantMap &capabilities);
|
2015-07-16 22:49:12 +03:00
|
|
|
|
2015-10-06 10:07:45 +03:00
|
|
|
bool shareAPI() const;
|
|
|
|
bool sharePublicLink() const;
|
2015-08-20 14:39:44 +03:00
|
|
|
bool sharePublicLinkAllowUpload() const;
|
2015-10-06 10:07:45 +03:00
|
|
|
bool sharePublicLinkEnforcePassword() const;
|
|
|
|
bool sharePublicLinkEnforceExpireDate() const;
|
|
|
|
int sharePublicLinkExpireDateDays() const;
|
|
|
|
bool shareResharing() const;
|
2015-10-15 10:54:01 +03:00
|
|
|
|
2016-03-09 19:19:36 +03:00
|
|
|
/// returns true if the capabilities report notifications
|
|
|
|
bool notificationsAvailable() const;
|
|
|
|
|
|
|
|
/// returns true if the capabilities are loaded already.
|
|
|
|
bool isValid() const;
|
|
|
|
|
2015-10-15 10:54:01 +03:00
|
|
|
/// Returns the checksum types the server explicitly advertises
|
2015-10-28 16:22:29 +03:00
|
|
|
QList<QByteArray> supportedChecksumTypesAdvertised() const;
|
2015-10-15 10:54:01 +03:00
|
|
|
|
|
|
|
/// Like supportedChecksumTypesRaw(), but includes the type from the config
|
2015-10-14 16:03:40 +03:00
|
|
|
QList<QByteArray> supportedChecksumTypes() const;
|
2015-07-16 22:49:12 +03:00
|
|
|
|
2015-10-15 10:54:01 +03:00
|
|
|
/// Returns the checksum type that should be used for new uploads.
|
|
|
|
QByteArray preferredChecksumType() const;
|
|
|
|
|
2015-07-16 22:49:12 +03:00
|
|
|
private:
|
|
|
|
QVariantMap _capabilities;
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif //CAPABILITIES_H
|