summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJavier <dev.git@javispedro.com>2015-12-26 19:45:33 +0100
committerJavier <dev.git@javispedro.com>2015-12-26 19:45:33 +0100
commitffeca2b8740fba10e916fe04e89ef2fd5c606a90 (patch)
tree9deea9349bf816c1bc0948ce1fe0b71bc07d2c11
parentb91c2c3aff5c91d6afb2b9fa2f3ceceaf0642d24 (diff)
downloadlibwatchfish-ffeca2b8740fba10e916fe04e89ef2fd5c606a90.tar.gz
libwatchfish-ffeca2b8740fba10e916fe04e89ef2fd5c606a90.zip
prepare skeleton for music controller API
-rw-r--r--libwatchfish.pro7
-rw-r--r--musiccontroller.cpp44
-rw-r--r--musiccontroller.h44
-rw-r--r--musiccontroller_p.h28
4 files changed, 121 insertions, 2 deletions
diff --git a/libwatchfish.pro b/libwatchfish.pro
index 59b26ba..77bb26a 100644
--- a/libwatchfish.pro
+++ b/libwatchfish.pro
@@ -8,7 +8,10 @@ CONFIG += link_pkgconfig
PKGCONFIG += dbus-1 timed-qt5
HEADERS = notificationmonitor.h notificationmonitor_p.h notification.h \
- walltimemonitor.h walltimemonitor_p.h
+ walltimemonitor.h walltimemonitor_p.h \
+ musiccontroller.h \
+ musiccontroller_p.h
SOURCES = notificationmonitor.cpp notification.cpp \
- walltimemonitor.cpp
+ walltimemonitor.cpp \
+ musiccontroller.cpp
diff --git a/musiccontroller.cpp b/musiccontroller.cpp
new file mode 100644
index 0000000..ba9fc39
--- /dev/null
+++ b/musiccontroller.cpp
@@ -0,0 +1,44 @@
+/*
+ * libwatchfish - library with common functionality for SailfishOS smartwatch connector programs.
+ * Copyright (C) 2015 Javier S. Pedro <dev.git@javispedro.com>
+ *
+ * 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, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include "musiccontroller.h"
+#include "musiccontroller_p.h"
+
+namespace watchfish
+{
+
+MusicControllerPrivate::MusicControllerPrivate(MusicController *q)
+ : q_ptr(q)
+{
+}
+
+MusicControllerPrivate::~MusicControllerPrivate()
+{
+}
+
+MusicController::MusicController(QObject *parent)
+ : QObject(parent), d_ptr(new MusicControllerPrivate(this))
+{
+}
+
+MusicController::~MusicController()
+{
+ delete d_ptr;
+}
+
+}
diff --git a/musiccontroller.h b/musiccontroller.h
new file mode 100644
index 0000000..33f6810
--- /dev/null
+++ b/musiccontroller.h
@@ -0,0 +1,44 @@
+/*
+ * libwatchfish - library with common functionality for SailfishOS smartwatch connector programs.
+ * Copyright (C) 2015 Javier S. Pedro <dev.git@javispedro.com>
+ *
+ * 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, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * 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.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef WATCHFISH_MUSICCONTROLLER_H
+#define WATCHFISH_MUSICCONTROLLER_H
+
+#include <QtCore/QObject>
+
+namespace watchfish
+{
+
+class MusicControllerPrivate;
+
+class MusicController : public QObject
+{
+ Q_OBJECT
+ Q_DECLARE_PRIVATE(MusicController)
+
+public:
+ explicit MusicController(QObject *parent = 0);
+ ~MusicController();
+
+private:
+ MusicControllerPrivate * const d_ptr;
+};
+
+}
+
+#endif // WATCHFISH_MUSICCONTROLLER_H
diff --git a/musiccontroller_p.h b/musiccontroller_p.h
new file mode 100644
index 0000000..5711e65
--- /dev/null
+++ b/musiccontroller_p.h
@@ -0,0 +1,28 @@
+#ifndef WATCHFISH_MUSICCONTROLLER_P_H
+#define WATCHFISH_MUSICCONTROLLER_P_H
+
+#include <QtDBus/QDBusServiceWatcher>
+#include <QtDBus/QDBusContext>
+
+#include "musiccontroller.h"
+
+namespace watchfish
+{
+
+class MusicControllerPrivate : public QObject, protected QDBusContext
+{
+ Q_OBJECT
+
+public:
+ MusicControllerPrivate(MusicController *q);
+ ~MusicControllerPrivate();
+
+private:
+ MusicController * const q_ptr;
+ Q_DECLARE_PUBLIC(MusicController)
+};
+
+}
+
+#endif // WATCHFISH_MUSICCONTROLLER_P_H
+