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;
31 class Sounds : public QObject {
34 Q_PROPERTY(bool mute READ isMuted WRITE setMuted NOTIFY muteChanged);
35 Q_PROPERTY(QString imageCaptureStart READ imageCaptureStart WRITE setImageCaptureStart NOTIFY imageCaptureStartChanged);
36 Q_PROPERTY(QString imageCaptureEnd READ imageCaptureEnd WRITE setImageCaptureEnd NOTIFY imageCaptureEndChanged);
37 Q_PROPERTY(QString videoRecordingStart READ videoRecordingStart WRITE setVideoRecordingStart NOTIFY videoRecordingStartChanged);
38 Q_PROPERTY(QString videoRecordingEnd READ videoRecordingEnd WRITE setVideoRecordingEnd NOTIFY videoRecordingEndChanged);
39 Q_PROPERTY(QString autoFocusAcquired READ autoFocusAcquired WRITE setAutoFocusAcquired NOTIFY autoFocusAcquiredChanged);
40 Q_PROPERTY(Volume volume READ volume WRITE setVolume NOTIFY volumeChanged);
44 Sounds(QObject *parent = 0);
52 void playImageCaptureStartedSound();
53 void playImageCaptureEndedSound();
54 void playVideoRecordingStartedSound();
55 void playVideoRecordingEndedSound();
56 void playAutoFocusAcquiredSound();
59 void setMuted(bool mute);
61 Volume volume() const;
62 void setVolume(const Volume& volume);
66 QString imageCaptureStart() const;
67 void setImageCaptureStart(const QString& path);
69 QString imageCaptureEnd() const;
70 void setImageCaptureEnd(const QString& path);
72 QString videoRecordingStart() const;
73 void setVideoRecordingStart(const QString& path);
75 QString videoRecordingEnd() const;
76 void setVideoRecordingEnd(const QString& path);
78 QString autoFocusAcquired() const;
79 void setAutoFocusAcquired(const QString& path);
84 void imageCaptureStartChanged();
85 void imageCaptureEndChanged();
86 void videoRecordingStartChanged();
87 void videoRecordingEndChanged();
88 void autoFocusAcquiredChanged();
91 void serviceOwnerChanged(const QString& serviceName, const QString& oldOwner,
92 const QString& newOwner);
95 void cache(const QString& path, const char *id);
96 void play(const char *id);
97 void playAndBlock(const char *id);
102 QDBusServiceWatcher *m_watcher;
103 QString m_volumeString;
104 QString m_imageCaptureStart;
105 QString m_imageCaptureEnd;
106 QString m_videoRecordingStart;
107 QString m_videoRecordingEnd;
108 QString m_autoFocusAcquired;
111 #endif /* SOUNDS_H */