mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-04 04:04:17 +01:00
DBus: rename ffDBusGetValue to ffDBusGetString; add ffDBusGetUint16
This commit is contained in:
@@ -61,11 +61,11 @@ static void detectBluetoothValue(FFDBusData* dbus, DBusMessageIter* iter, FFBlue
|
||||
dbus->lib->ffdbus_message_iter_next(&dictIter);
|
||||
|
||||
if(ffStrEquals(deviceProperty, "Address"))
|
||||
ffDBusGetValue(dbus, &dictIter, &device->address);
|
||||
ffDBusGetString(dbus, &dictIter, &device->address);
|
||||
else if(ffStrEquals(deviceProperty, "Name"))
|
||||
ffDBusGetValue(dbus, &dictIter, &device->name);
|
||||
ffDBusGetString(dbus, &dictIter, &device->name);
|
||||
else if(ffStrEquals(deviceProperty, "Icon"))
|
||||
ffDBusGetValue(dbus, &dictIter, &device->type);
|
||||
ffDBusGetString(dbus, &dictIter, &device->type);
|
||||
else if(ffStrEquals(deviceProperty, "Percentage"))
|
||||
ffDBusGetByte(dbus, &dictIter, &device->battery);
|
||||
else if(ffStrEquals(deviceProperty, "Connected"))
|
||||
|
||||
@@ -61,13 +61,13 @@ static bool getBusProperties(FFDBusData* data, const char* busName, FFMediaResul
|
||||
data->lib->ffdbus_message_iter_next(&dictIterator);
|
||||
|
||||
if(ffStrEquals(key, "xesam:title"))
|
||||
ffDBusGetValue(data, &dictIterator, &result->song);
|
||||
ffDBusGetString(data, &dictIterator, &result->song);
|
||||
else if(ffStrEquals(key, "xesam:album"))
|
||||
ffDBusGetValue(data, &dictIterator, &result->album);
|
||||
ffDBusGetString(data, &dictIterator, &result->album);
|
||||
else if(ffStrEquals(key, "xesam:artist"))
|
||||
ffDBusGetValue(data, &dictIterator, &result->artist);
|
||||
ffDBusGetString(data, &dictIterator, &result->artist);
|
||||
else if(ffStrEquals(key, "xesam:url"))
|
||||
ffDBusGetValue(data, &dictIterator, &result->url);
|
||||
ffDBusGetString(data, &dictIterator, &result->url);
|
||||
|
||||
if(result->song.length > 0 && result->artist.length > 0 && result->album.length > 0 && result->url.length > 0)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user