Music Hub ..
A session-wide music playback service
 
Loading...
Searching...
No Matches
service_skeleton.h
Go to the documentation of this file.
1/*
2 * Copyright © 2013-2014 Canonical Ltd.
3 * Copyright © 2022 UBports Foundation.
4 *
5 * Contact: Alberto Mardegan <mardy@users.sourceforge.net>
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU Lesser General Public License version 3,
9 * as published by the Free Software Foundation.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU Lesser General Public License
17 * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 *
19 * Authored by: Thomas Voß <thomas.voss@canonical.com>
20 */
21
22#ifndef LOMIRI_MEDIAHUBSERVICE_SERVICE_SKELETON_H
23#define LOMIRI_MEDIAHUBSERVICE_SERVICE_SKELETON_H
24
25#include "apparmor/lomiri.h"
26#include "player.h"
27
28#include <QDBusConnection>
29#include <QDBusContext>
30#include <QDBusObjectPath>
31#include <QObject>
32#include <QScopedPointer>
33
34namespace lomiri
35{
36namespace MediaHubService
37{
38class ServiceImplementation;
39
40class ServiceSkeletonPrivate;
41class ServiceSkeleton: public QObject, protected QDBusContext
42{
43 Q_OBJECT
44 Q_CLASSINFO("D-Bus Interface", "com.lomiri.MediaHub.Service")
45
46public:
47 // Creation time arguments go here.
49 {
50 QDBusConnection connection;
51 };
52
53 ServiceSkeleton(const Configuration &configuration,
55 QObject *parent = nullptr);
57
58public Q_SLOTS:
59 void CreateSession(QDBusObjectPath &op, QString &uuid);
60 void DetachSession(const QString &uuid);
61 void ReattachSession(const QString &uuid);
62 void DestroySession(const QString &uuid);
63 QDBusObjectPath CreateFixedSession(const QString &name);
64 QDBusObjectPath ResumeSession(Player::PlayerKey key);
66
67private:
68 Q_DECLARE_PRIVATE(ServiceSkeleton)
69 QScopedPointer<ServiceSkeletonPrivate> d_ptr;
70};
71}
72}
73
74#endif // LOMIRI_MEDIAHUBSERVICE_SERVICE_SKELETON_H
void PauseOtherSessions(Player::PlayerKey key)
void CreateSession(QDBusObjectPath &op, QString &uuid)
QDBusObjectPath ResumeSession(Player::PlayerKey key)
QDBusObjectPath CreateFixedSession(const QString &name)