From ffeca2b8740fba10e916fe04e89ef2fd5c606a90 Mon Sep 17 00:00:00 2001 From: Javier Date: Sat, 26 Dec 2015 19:45:33 +0100 Subject: prepare skeleton for music controller API --- libwatchfish.pro | 7 +++++-- musiccontroller.cpp | 44 ++++++++++++++++++++++++++++++++++++++++++++ musiccontroller.h | 44 ++++++++++++++++++++++++++++++++++++++++++++ musiccontroller_p.h | 28 ++++++++++++++++++++++++++++ 4 files changed, 121 insertions(+), 2 deletions(-) create mode 100644 musiccontroller.cpp create mode 100644 musiccontroller.h create mode 100644 musiccontroller_p.h 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 + * + * 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 . + */ + +#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 + * + * 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 . + */ + +#ifndef WATCHFISH_MUSICCONTROLLER_H +#define WATCHFISH_MUSICCONTROLLER_H + +#include + +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 +#include + +#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 + -- cgit v1.2.3