When listing DBus services, also list activatable services.
This commit is contained in:
parent
2d7e11cd3e
commit
ef0e3ac22e
1 changed files with 8 additions and 2 deletions
|
@ -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 $
|
||||
|
|
Loading…
Reference in a new issue