File indexing completed on 2024-07-14 15:04:32

0001 /*
0002     SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 #ifndef INDEXEDPULSEOBJECT_P_H
0007 #define INDEXEDPULSEOBJECT_P_H
0008 
0009 #include "debug.h"
0010 
0011 #include "pulseobject_p.h"
0012 
0013 #include <pulse/introspect.h>
0014 
0015 namespace PulseAudioQt
0016 {
0017 class IndexedPulseObjectPrivate
0018 {
0019 public:
0020     explicit IndexedPulseObjectPrivate(IndexedPulseObject *q);
0021     virtual ~IndexedPulseObjectPrivate();
0022 
0023     PulseObject *q;
0024     quint32 m_index = 0;
0025 
0026     template<typename PAInfo>
0027     void updatePulseObject(PAInfo *info)
0028     {
0029         m_index = info->index;
0030 
0031         q->PulseObject::d->updatePulseObject(info);
0032     }
0033 };
0034 }
0035 #endif