File indexing completed on 2024-04-21 16:20:31

0001 /*
0002     SPDX-FileCopyrightText: 2017 David Rosca <nowrep@gmail.com>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "module.h"
0008 
0009 #include "debug.h"
0010 
0011 #include "context.h"
0012 
0013 namespace QPulseAudio
0014 {
0015 Module::Module(QObject *parent)
0016     : PulseObject(parent)
0017 {
0018 }
0019 
0020 void Module::update(const pa_module_info *info)
0021 {
0022     updatePulseObject(info);
0023 
0024     const QString infoName = QString::fromUtf8(info->name);
0025     if (m_name != infoName) {
0026         m_name = infoName;
0027         Q_EMIT nameChanged();
0028     }
0029     const QString infoArgument = QString::fromUtf8(info->argument);
0030     if (m_argument != infoArgument) {
0031         m_argument = infoArgument;
0032         Q_EMIT argumentChanged();
0033     }
0034 }
0035 
0036 QString Module::name() const
0037 {
0038     return m_name;
0039 }
0040 
0041 QString Module::argument() const
0042 {
0043     return m_argument;
0044 }
0045 
0046 } // QPulseAudio