dbus 1.3.11 → 1.4.0
raw patch · 2 files changed
+18/−4 lines, 2 filesdep ~template-haskellPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: template-haskell
API changes (from Hackage documentation)
Files
- dbus.cabal +2/−2
- lib/DBus/Client.hs +16/−2
dbus.cabal view
@@ -1,5 +1,5 @@ name: dbus-version: 1.3.11+version: 1.4.0 license: Apache-2.0 license-file: license.txt author: John Millikin <john@john-millikin.com>@@ -94,7 +94,7 @@ , parsec < 3.2 , random < 1.4 , split < 0.3- , template-haskell >= 2.18 && < 2.23+ , template-haskell >= 2.18 && < 2.24 , text < 2.2 , th-lift < 0.9 , transformers < 0.7
lib/DBus/Client.hs view
@@ -897,7 +897,7 @@ , methodErrorSender = sender } $ fromVariant variant --- | Retrieve a property using the method call parameters that were provided.+-- | Like `getPropertyValue`, but returns the value as a 'Variant'. -- -- Throws a 'ClientError' if the property request couldn't be sent. getProperty :: Client -> MethodCall -> IO (Either MethodError Variant)@@ -913,10 +913,19 @@ ] } +-- | Get a property using the standard @\"org.freedesktop.DBus.Properties.Get\"@ method.+-- The interface and property name are given by the 'methodCallInterface' and 'methodCallMember'+-- fields of the supplied 'MethodCall'. This function handles properties of fixed type. For+-- properties of varying types, use 'getProperty'.+--+-- Throws a 'ClientError' if the property request couldn't be sent. getPropertyValue :: IsValue a => Client -> MethodCall -> IO (Either MethodError a) getPropertyValue client msg = (>>= unpackVariant msg) <$> getProperty client msg +-- | Like 'setPropertyValue', but expects the new value to be wrapped in a 'Variant'.+--+-- Throws a 'ClientError' if the property request couldn't be sent. setProperty :: Client -> MethodCall -> Variant -> IO (Either MethodError MethodReturn) setProperty client msg@MethodCall { methodCallInterface = interface@@ -927,10 +936,15 @@ , methodCallBody = [ toVariant (coerce (orDefaultInterface interface) :: String) , toVariant (coerce member :: String)- , value+ , toVariant value ] } +-- | Set a property using the standard @\"org.freedesktop.DBus.Properties.Set\"@ method.+-- The interface and property name are given by the 'methodCallInterface' and 'methodCallMember'+-- fields of the supplied 'MethodCall'. See `setProperty` for a version that accepts a 'Variant'.+--+-- Throws a 'ClientError' if the property request couldn't be sent. setPropertyValue :: IsValue a => Client -> MethodCall -> a -> IO (Maybe MethodError)