Add connected headset SystemName property in dbus
This commit is contained in:
@@ -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());
|
||||
|
||||
@@ -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);
|
||||
};
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user