getAllProperties method
Called when all properties are requested on this object. On success, return DBusGetAllPropertiesResponse
.
Implementation
@override
Future<DBusMethodResponse> getAllProperties(String interface) async {
var properties = <String, DBusValue>{};
if (interface == 'org.mpris.MediaPlayer2') {
properties = {
'CanQuit': getCanQuit(),
// 'Fullscreen': getFullscreen(),
// 'CanSetFullscreen': getCanSetFullscreen(),
'CanRaise': getCanRaise(),
'HasTrackList': getHasTrackList(),
'Identity': getIdentity(),
// 'DesktopEntry': getDesktopEntry(),
'SupportedUriSchemes': getSupportedUriSchemes(),
'SupportedMimeTypes': getSupportedMimeTypes(),
};
} else if (interface == 'org.mpris.MediaPlayer2.Player') {
properties = {
'PlaybackStatus': _getPlaybackStatus(),
'LoopStatus': getLoopStatus(),
'Rate': getRate(),
'Metadata': getMetadata(),
'Volume': getVolume(),
'Position': getPosition(),
'MinimumRate': getMinimumRate(),
'MaximumRate': getMaximumRate(),
'CanGoNext': getCanGoNext(),
'CanGoPrevious': getCanGoPrevious(),
'CanPlay': getCanPlay(),
'CanPause': getCanPause(),
'CanSeek': getCanSeek(),
'CanControl': getCanControl(),
};
}
return DBusMethodSuccessResponse([DBusDict.stringVariant(properties)]);
}