Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Client generation #15

Merged
merged 34 commits into from
Mar 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
ba7eea2
Add initial client generation implementation
colonelpanic8 Mar 7, 2018
9153644
Finish type conversion function for client generation
colonelpanic8 Mar 7, 2018
b083b1e
Add property generation
colonelpanic8 Mar 7, 2018
ab5df27
Add generateClient function
colonelpanic8 Mar 7, 2018
ef549cb
Use provided interface name when generating client
colonelpanic8 Mar 7, 2018
6d4782e
Support setting constant object paths and bus names in generation
colonelpanic8 Mar 7, 2018
087d649
Use th-lift instead of extension to support old versions of haskell
colonelpanic8 Mar 8, 2018
490da95
Add signal generation
colonelpanic8 Mar 8, 2018
f7870ff
Add generation of signal registration functions
colonelpanic8 Mar 8, 2018
416b89b
Handle unnamed args in generation
colonelpanic8 Mar 13, 2018
5e3222c
Hide prelude's mapM for old versions of haskell
colonelpanic8 Mar 8, 2018
29be011
Add test for client generation
colonelpanic8 Mar 9, 2018
962db3e
Rename DBus.Generate -> DBus.Generation
colonelpanic8 Mar 9, 2018
41ae10c
Supply buildGetTHType for creation of custom types for clients and si…
colonelpanic8 Mar 9, 2018
36df4f1
Import symbolic fmap in generation for old haskell
colonelpanic8 Mar 9, 2018
c8347a3
Always type Word8 arrays as ByteStrings
colonelpanic8 Mar 11, 2018
86268d5
Export autoMethodWithMsg for making a method that accepts the MethodCall
colonelpanic8 Mar 11, 2018
8a3c8b1
Import Data.Traversable for sequenceA in old haskell versions
colonelpanic8 Mar 8, 2018
9a3bd4e
Avoid generating redundant case statements when 0 args
colonelpanic8 Mar 14, 2018
ee835c4
Implement properties and introspection as Interface objects
colonelpanic8 Mar 15, 2018
96fc91b
Fix hlint issues
colonelpanic8 Mar 15, 2018
86a695d
Add properties changed signal
colonelpanic8 Mar 15, 2018
82ceb9b
Add generated client for org.freedesktop.DBus
colonelpanic8 Mar 16, 2018
46aab52
Export ErrorName type
colonelpanic8 Mar 16, 2018
4c877b1
Improve void/structure return logic
colonelpanic8 Mar 16, 2018
71e93a2
Add bus and path to default values when registering for signal
colonelpanic8 Mar 16, 2018
fafeb37
Change method error type in generated code to be MethodError
colonelpanic8 Mar 16, 2018
291b6a1
Add Reader monads for Client
colonelpanic8 Mar 17, 2018
b2f463b
Add option to take signal handler in registration function
colonelpanic8 Mar 19, 2018
1fb4fb4
Fix introspection test
colonelpanic8 Mar 23, 2018
716c4ea
Fix hlint issues, remove mtl dependency
colonelpanic8 Mar 23, 2018
22cfde7
Get rid of Defined but not used in generated code
colonelpanic8 Mar 24, 2018
5755d13
Fix a few compiler warnings in test code
colonelpanic8 Mar 24, 2018
be569d8
Add type for buildEmptyObject
colonelpanic8 Mar 24, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions dbus.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extra-source-files:
examples/export.hs
examples/introspect.hs
examples/list-names.hs
idlxml/dbus.xml

source-repository head
type: git
Expand All @@ -84,13 +85,16 @@ library
, cereal
, containers
, deepseq
, filepath
, lens
, libxml-sax
, network
, parsec
, random
, split
, template-haskell
, text
, th-lift
, transformers
, unix
, vector
Expand All @@ -99,13 +103,15 @@ library
exposed-modules:
DBus
DBus.Client
DBus.Introspection
DBus.Socket
DBus.Transport
DBus.Generation
DBus.Internal.Address
DBus.Internal.Message
DBus.Internal.Types
DBus.Internal.Wire
DBus.Introspection
DBus.Socket
DBus.TH
DBus.Transport

test-suite dbus_tests
type: exitcode-stdio-1.0
Expand Down Expand Up @@ -143,6 +149,7 @@ test-suite dbus_tests
DBusTests.BusName
DBusTests.Client
DBusTests.ErrorName
DBusTests.Generation
DBusTests.Integration
DBusTests.InterfaceName
DBusTests.Introspection
Expand All @@ -152,6 +159,7 @@ test-suite dbus_tests
DBusTests.Serialization
DBusTests.Signature
DBusTests.Socket
DBusTests.TH
DBusTests.Transport
DBusTests.Util
DBusTests.Variant
Expand Down
90 changes: 90 additions & 0 deletions idlxml/dbus.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
<node>
<interface name="org.freedesktop.DBus">
<method name="Hello">
<arg direction="out" type="s"/>
</method>
<method name="RequestName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="ReleaseName">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="StartServiceByName">
<arg direction="in" type="s"/>
<arg direction="in" type="u"/>
<arg direction="out" type="u"/>
</method>
<method name="UpdateActivationEnvironment">
<arg direction="in" type="a{ss}"/>
</method>
<method name="NameHasOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="b"/>
</method>
<method name="ListNames">
<arg direction="out" type="as"/>
</method>
<method name="ListActivatableNames">
<arg direction="out" type="as"/>
</method>
<method name="AddMatch">
<arg direction="in" type="s"/>
</method>
<method name="RemoveMatch">
<arg direction="in" type="s"/>
</method>
<method name="GetNameOwner">
<arg direction="in" type="s"/>
<arg direction="out" type="s"/>
</method>
<method name="ListQueuedOwners">
<arg direction="in" type="s"/>
<arg direction="out" type="as"/>
</method>
<method name="GetConnectionUnixUser">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetConnectionUnixProcessID">
<arg direction="in" type="s"/>
<arg direction="out" type="u"/>
</method>
<method name="GetAdtAuditSessionData">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="GetConnectionSELinuxSecurityContext">
<arg direction="in" type="s"/>
<arg direction="out" type="ay"/>
</method>
<method name="ReloadConfig">
</method>
<method name="GetId">
<arg direction="out" type="s"/>
</method>
<method name="GetConnectionCredentials">
<arg direction="in" type="s"/>
<arg direction="out" type="a{sv}"/>
</method>
<property name="Features" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<property name="Interfaces" type="as" access="read">
<annotation name="org.freedesktop.DBus.Property.EmitsChangedSignal" value="const"/>
</property>
<signal name="NameOwnerChanged">
<arg type="s"/>
<arg type="s"/>
<arg type="s"/>
</signal>
<signal name="NameLost">
<arg type="s"/>
</signal>
<signal name="NameAcquired">
<arg type="s"/>
</signal>
</interface>
</node>
Loading