diff options
author | Sebastian Reuße <seb@wirrsal.net> | 2015-06-02 15:58:48 +0200 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-06-02 12:51:13 -0400 |
commit | 334954d8bf9113b679f8af29ad481b0daece86f7 (patch) | |
tree | a0edd9a08128060a9ba3a7e235ccc2d25858cb37 /Utility | |
parent | 6fba7b737dd20e108e79bb5ff8b5b87008b73b59 (diff) |
When listing DBus services, also list activatable services.
Diffstat (limited to 'Utility')
-rw-r--r-- | Utility/DBus.hs | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Utility/DBus.hs b/Utility/DBus.hs index 5b0470301..108ef735b 100644 --- a/Utility/DBus.hs +++ b/Utility/DBus.hs @@ -22,8 +22,14 @@ type ServiceName = String listServiceNames :: Client -> IO [ServiceName] listServiceNames client = do - reply <- callDBus client "ListNames" [] - return $ fromMaybe [] $ fromVariant =<< headMaybe (methodReturnBody reply) + active <- do + reply <- callDBus client "ListNames" [] + return $ fromVariant =<< headMaybe (methodReturnBody reply) + activatable <- do + reply <- callDBus client "ListActivatableNames" [] + return $ fromVariant =<< headMaybe (methodReturnBody reply) + let service_names = fromMaybe [] active ++ fromMaybe [] activatable + return service_names callDBus :: Client -> MemberName -> [Variant] -> IO MethodReturn callDBus client name params = call_ client $ |