4 * This file is part of CameraPlus.
6 * Copyright (C) 2012-2013 Mohammed Sameer <msameer@foolab.org>
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2.1 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public
19 * License along with this library; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
29 class QDBusServiceWatcher;
30 class ContextProperty;
32 class Sounds : public QObject {
35 Q_PROPERTY(bool mute READ isMuted WRITE setMuted NOTIFY muteChanged);
36 Q_PROPERTY(QString imageCaptureStart READ imageCaptureStart WRITE setImageCaptureStart NOTIFY imageCaptureStartChanged);
37 Q_PROPERTY(QString imageCaptureEnd READ imageCaptureEnd WRITE setImageCaptureEnd NOTIFY imageCaptureEndChanged);
38 Q_PROPERTY(QString videoRecordingStart READ videoRecordingStart WRITE setVideoRecordingStart NOTIFY videoRecordingStartChanged);
39 Q_PROPERTY(QString videoRecordingEnd READ videoRecordingEnd WRITE setVideoRecordingEnd NOTIFY videoRecordingEndChanged);
40 Q_PROPERTY(QString autoFocusAcquired READ autoFocusAcquired WRITE setAutoFocusAcquired NOTIFY autoFocusAcquiredChanged);
41 Q_PROPERTY(Volume volume READ volume WRITE setVolume NOTIFY volumeChanged);
45 Sounds(QObject *parent = 0);
53 void playImageCaptureStartedSound();
54 void playImageCaptureEndedSound();
55 void playVideoRecordingStartedSound();
56 void playVideoRecordingEndedSound();
57 void playAutoFocusAcquiredSound();
60 void setMuted(bool mute);
62 Volume volume() const;
63 void setVolume(const Volume& volume);
67 QString imageCaptureStart() const;
68 void setImageCaptureStart(const QString& path);
70 QString imageCaptureEnd() const;
71 void setImageCaptureEnd(const QString& path);
73 QString videoRecordingStart() const;
74 void setVideoRecordingStart(const QString& path);
76 QString videoRecordingEnd() const;
77 void setVideoRecordingEnd(const QString& path);
79 QString autoFocusAcquired() const;
80 void setAutoFocusAcquired(const QString& path);
85 void imageCaptureStartChanged();
86 void imageCaptureEndChanged();
87 void videoRecordingStartChanged();
88 void videoRecordingEndChanged();
89 void autoFocusAcquiredChanged();
92 void serviceOwnerChanged(const QString& serviceName, const QString& oldOwner,
93 const QString& newOwner);
94 void audioConnectionChanged();
97 void cache(const QString& path, const char *id);
98 void play(const char *id);
99 void playAndBlock(const char *id);
103 QDBusServiceWatcher *m_watcher;
104 ContextProperty *m_audioRoute;
106 QString m_imageCaptureStart;
107 QString m_imageCaptureEnd;
108 QString m_videoRecordingStart;
109 QString m_videoRecordingEnd;
110 QString m_autoFocusAcquired;
113 #endif /* SOUNDS_H */