File indexing completed on 2024-12-08 05:00:53

0001 /*
0002     SPDX-FileCopyrightText: 2014-2015 Harald Sitter <sitter@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #include "client.h"
0008 
0009 #include "debug.h"
0010 
0011 namespace QPulseAudio
0012 {
0013 Client::Client(QObject *parent)
0014     : PulseObject(parent)
0015 {
0016 }
0017 
0018 Client::~Client() = default;
0019 
0020 void Client::update(const pa_client_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 }
0030 
0031 QString Client::name() const
0032 {
0033     return m_name;
0034 }
0035 
0036 } // QPulseAudio