summaryrefslogtreecommitdiffstats
path: root/src/PulseAudioQt/indexedpulseobject.h
blob: 135afb985c3af34f8a5642a8348463bb67e55e48 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
    SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>

    SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/

#ifndef INDEXEDPULSEOBJECT_H
#define INDEXEDPULSEOBJECT_H

#include <QObject>

#include "pulseaudioqt_export.h"
#include "pulseobject.h"

namespace PulseAudioQt
{
class PULSEAUDIOQT_EXPORT IndexedPulseObject : public PulseObject
{
    Q_OBJECT
    Q_PROPERTY(quint32 index READ index CONSTANT)

public:
    ~IndexedPulseObject();

    /**
     * Index of this object.
     */
    quint32 index() const;

protected:
    /** @private */
    explicit IndexedPulseObject(QObject *parent);
    /** @private */
    class IndexedPulseObjectPrivate *const d;

private:
    // Ensure that we get properly parented.
    IndexedPulseObject();
    friend class ClientPrivate;
    friend class CardPrivate;
    friend class ModulePrivate;
    friend class VolumeObjectPrivate;
    friend class ProfilePrivate;
};

} // PulseAudioQt

#endif // INDEXEDPULSEOBJECT_H