Add connected headset SystemName property in dbus

This commit is contained in:
Patrick Nicolas
2026-01-06 13:07:32 +01:00
parent b284daca6a
commit 12cddd4d6f
4 changed files with 15 additions and 0 deletions
+5
View File
@@ -439,6 +439,11 @@ void wivrn_server::on_server_properties_changed(const QString & interface_name,
supportedCodecsChanged(m_supportedCodecs = changed_properties["SupportedCodecs"].toStringList());
}
if (changed_properties.contains("SystemName"))
{
systemNameChanged(m_systemName = changed_properties["SystemName"].toString());
}
if (changed_properties.contains("SteamCommand"))
{
steamCommandChanged(m_steamCommand = changed_properties["SteamCommand"].toString());
+8
View File
@@ -204,6 +204,7 @@ public:
Q_PROPERTY(int speakerChannels READ speakerChannels NOTIFY speakerChannelsChanged)
Q_PROPERTY(int speakerSampleRate READ speakerSampleRate NOTIFY speakerSampleRateChanged)
Q_PROPERTY(QStringList supportedCodecs READ supportedCodecs NOTIFY supportedCodecsChanged)
Q_PROPERTY(QString systemName READ systemName NOTIFY systemNameChanged)
Q_PROPERTY(QString steamCommand READ steamCommand NOTIFY steamCommandChanged)
// hostnamed
@@ -317,6 +318,11 @@ public:
return m_supportedCodecs;
}
QString systemName() const
{
return m_systemName;
}
QString steamCommand() const
{
return m_steamCommand;
@@ -368,6 +374,7 @@ private:
int m_speakerChannels{};
int m_speakerSampleRate{};
QStringList m_supportedCodecs{};
QString m_systemName{};
QString m_steamCommand{};
Q_SIGNALS:
@@ -394,6 +401,7 @@ Q_SIGNALS:
void speakerSampleRateChanged(int);
void supportedCodecsChanged(QStringList);
void steamCommandChanged(QString);
void systemNameChanged(QString);
void serverLogsChanged(QString);
void serverError(serverErrorData);
};
+1
View File
@@ -63,6 +63,7 @@
<property name="EyeGaze" type="b" access="read"/>
<property name="FaceTracking" type="b" access="read"/>
<property name="SupportedCodecs" type="as" access="read"/>
<property name="SystemName" type="s" access="read"/>
<property name="Pin" type="s" access="read"/>
<property name="KnownKeys" type="a(ssx)" access="read">
+1
View File
@@ -769,6 +769,7 @@ void on_headset_info_packet(const wivrn::from_headset::headset_info_packet & inf
}
codecs.push_back(nullptr);
wivrn_server_set_supported_codecs(dbus_server, codecs.data());
wivrn_server_set_system_name(dbus_server, info.system_name.c_str());
}
void on_name_acquired(GDBusConnection * connection, const gchar * name, gpointer user_data)