@Version("1.5") namespace org.freedesktop.DBus.Idl.Tests1 { /** * @Failed: The operation failed. * @Busy: The operation cannot be performed because the flux capicator is busy. * @Cancelled: The operation was cancelled. * @WouldBlock: The operation would block and non-blocking semantics was requested. * * An example of an error domain. * * * int foo; * * void * bar (int baz) * { * do_stuff (); * } * * * Here is a paragraph that spans multiple lines. It is pretty * long, on purpose. The quick brown fox jumped over the lazy dog. * Ipsum lorem dolor sit amet. * * Check that references work... * method: org.freedesktop.DBus.Idl.Tests1.Frobicable.VoidMethod(), * signal: #org.freedesktop.DBus.Idl.Tests1.Frobicable::ArgSignal, * property: #org.freedesktop.DBus.Idl.Tests1.Frobicable:RWProperty, * struct: #org.freedesktop.DBus.Idl.Tests1.RealPoint, * dynamic_struct: #org.freedesktop.DBus.Idl.Tests1.Struct2, * enum: #org.freedesktop.DBus.Idl.Tests1.Enum2, * enum member: #org.freedesktop.DBus.Idl.Tests1.Enum2.Replace, * error domain: #org.freedesktop.DBus.Idl.Tests1.Error, * error member: #org.freedesktop.DBus.Idl.Tests1.Error.Cancelled ... * that's it! * * And here is a third paragraph. * * @brief: Error domain */ error_domain Error { Failed, Busy, Cancelled, WouldBlock }; // An example of manual doc tags. @org.freedesktop.DBus.Typelib.Doc("Another Error Domain.") @org.freedesktop.DBus.Typelib.DocBrief("Another Error Domain") error_domain Error2 { @org.freedesktop.DBus.Typelib.Doc("Parsing failed.") ParsingFailed, @org.freedesktop.DBus.Typelib.Doc("Foo operation failed.") FooFailed }; /** * An example struct. * @bar: First member. * @baz: Second member. * @something: Third member. * @lots_of_something: An array of #Variants. * @property_bag: A property bag. * @an_enum: An enum. * * A longer explanation of the example struct. * * @brief: An example struct */ struct Struct1 { int32 bar; uint64 baz; variant something; array lots_of_something; dict property_bag; Enum1 an_enum; }; /** * @a: Blah. * @b: Baz. * @c: Dah. * @d: Frob. * @stuff: Stuff. * @foo: Foo. * * Some dynamic structure - this is marshalled as * a{sv} on the wire. * * @brief: A Dynamic Struct */ @org.freedesktop.DBus.Typelib.DynamicStruct struct Struct2 { uint64 a; uint64 b; uint64 c; string d; array stuff; Struct1 foo; }; /** * @Foo: Some value. * @Bar: Some value. * @Baz: Some value. * @BigFoo: Some value. * @BigBar: Some value. * @BigBaz: Some value. * @A: Some value. * @B: Some value. * @C: Some value. * @D: Some value. * @E: Some value. * @F: Some value. * @G: Some value. * @H: Some value. * * An enumeration. * * @brief: Brief docs for enum */ enum Enum1 { Foo, Bar, Baz, BigFoo = 1000, BigBar, BigBaz, A = 2000 + 0, B = 2100 - 10, C = -32, D = 1408 / 11, E = 2 * 5, F = 1<<5, G = (1<<5) + 10, H = 1<<5 + 10 }; /** * @None: No flags set. * @AllowReplacement: Allow replacement of bla. * @Replace: Replace exisiting bla. * @Activate: Activate the Yoyo. * * Flags used in the EnumMethod() method. * * @brief: Flags used for EnumMethod() */ @org.freedesktop.DBus.Typelib.FlagEnum enum Enum2 { None = 0, AllowReplacement = 1<<0, Replace = 1<<1, Activate = 1<<2 }; /** * @x: The X coordinate. * @y: The Y coordinate. * * A data type representing coordinates in a two-dimensional * Cartesian coordinate system using integers. * * See * * this Wikipedia article * * for more information. * * @brief: Fixed-point 2D coordinate * @see: #RealPoint */ struct Point { int32 x; int32 y; }; /** * @x: The X coordinate. * @y: The Y coordinate. * * A data type representing coordinates in a two-dimensional * Cartesian coordinate system using floating point numbers. * * @brief: 2D coordinate */ struct RealPoint { double x; double y; }; @org.freedesktop.DBus.Typelib.Doc("A data type holding a pair of 32-bit integers.") @org.freedesktop.DBus.Typelib.DocBrief("Pair of integers") struct Pair { @org.freedesktop.DBus.Typelib.Doc("First element in pair.") int32 first; @org.freedesktop.DBus.Typelib.Doc("Second element in pair.") int32 second; }; /** * Here is a longer description of the #Frobnicable interface. * * @brief: An interface for frobbing */ interface Frobnicable { /// Method doing nothing VoidMethod (); /** * @a1: A parameter. * @a2: A parameter. * @a3: A parameter. * @a4: A parameter. * @a5: A parameter. * @a6: A parameter. * @a7: A parameter. * @a8: A parameter. * @a9: A parameter. * @a10: A parameter. * @a11: A parameter. * @a12: A parameter. * * Method taking primitive types. * * Here's another paragraph for this method! */ PrimitiveMethod (in byte a1, in boolean a2, in int16 a3, in uint16 a4, in int32 a5, in uint32 a6, in int64 a7, in uint64 a8, in double a9, in string a10, in objpath a11, in signature a12); /** * @a1: An array of #int32s. * @a2: An array of #strings. * @a3: An array of an array of #int32. * @a4: A hash from #int32 to #int32. * @a5: Some weird Hash Table. * * This tests various container stuff. */ @NoReply ContainerMethod (in array a1, in array a2, in array> a3, in dict a4, in dict>> a5); /** * @a1: A parameter. * @a2: A parameter. * @a3: A parameter. * @a4: A parameter. * @a5: A parameter. * @a6: A parameter. * @a7: A parameter. * * Method for test various structs. */ @Deprecated StructsMethod (in Struct1 a1, in array a2, in array> a3, in dict a4, out Struct2 a5, out array a6, out dict a7); /** * @a1: A parameter. * @a2: A parameter. * * Method for testing enum stuff. */ @Since("1.3") EnumMethod (in Enum1 a1, out Enum2 a2); /// Signal doing nothing @Deprecated("1.2") signal VoidSignal(); /** * @points: An array of #Points. * @pairs: An array of #Pairss. * * A signal with some points and pairs. */ signal ArgSignal (array points, array pairs); /// This is a property that is both readable and writable. property int32 RWProperty; /// This is a read-only property. readonly property int32 ROProperty; /// And a write-only property. writeonly property int32 WOProperty; /** * A rather complex property. */ property dict> ComplexProperty; }; /** * This is an example of another interface. * * @brief: Another interface */ interface SecondaryProtocol { /** * @foo: Secret parameter. * * This method is secret. Shh! */ SecretMethod (in int32 foo); }; };