summaryrefslogtreecommitdiff
path: root/mpris2/interfacetest.h
diff options
context:
space:
mode:
Diffstat (limited to 'mpris2/interfacetest.h')
-rw-r--r--mpris2/interfacetest.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/mpris2/interfacetest.h b/mpris2/interfacetest.h
index cfc174c..6e4d8e8 100644
--- a/mpris2/interfacetest.h
+++ b/mpris2/interfacetest.h
@@ -22,6 +22,7 @@
#define INTERFACETEST_H
class QDBusInterface;
+class QDBusVariant;
class QDBusMessage;
class QTimer;
#include <QObject>
@@ -117,8 +118,15 @@ namespace Mpris2
void delayedIncrementalCheck();
protected:
+ enum PropErrorAllowance {
+ PropDisallowErrors = 0,
+ PropAllowMissing = 1,
+ PropAllowReadOnly = 2,
+ PropAllowErrors = PropAllowMissing | PropAllowReadOnly
+ };
bool getAllProps();
- bool getProp(const QString& propName);
+ bool getProp(const QString& propName, PropErrorAllowance allowError = PropDisallowErrors);
+ bool setProp(const QString& propName, const QDBusVariant& value, PropErrorAllowance allowError = PropAllowReadOnly);
bool checkPropValid(const QString& propName, QVariant::Type expType, const QVariantMap& oldProps = QVariantMap());
bool checkNonEmptyStringPropValid(const QString& propName, const QVariantMap& oldProps = QVariantMap());