Emeric Vigier | 2f62582 | 2012-08-06 11:09:52 -0400 | [diff] [blame^] | 1 | |
| 2 | /* |
| 3 | * This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT! |
| 4 | */ |
| 5 | |
| 6 | #ifndef __dbusxx__TestAppIntroProviderPrivate_h__ADAPTOR_MARSHAL_H |
| 7 | #define __dbusxx__TestAppIntroProviderPrivate_h__ADAPTOR_MARSHAL_H |
| 8 | |
| 9 | #include <dbus-c++/dbus.h> |
| 10 | #include <cassert> |
| 11 | |
| 12 | namespace DBusCpp { |
| 13 | namespace Test { |
| 14 | namespace Com { |
| 15 | |
| 16 | class Intro_adaptor |
| 17 | : public ::DBus::InterfaceAdaptor |
| 18 | { |
| 19 | public: |
| 20 | |
| 21 | Intro_adaptor() |
| 22 | : ::DBus::InterfaceAdaptor("DBusCpp.Test.Com.Intro") |
| 23 | { |
| 24 | register_method(Intro_adaptor, test1, _test1_stub); |
| 25 | register_method(Intro_adaptor, testByte, _testByte_stub); |
| 26 | } |
| 27 | |
| 28 | ::DBus::IntrospectedInterface *introspect() const |
| 29 | { |
| 30 | static ::DBus::IntrospectedArgument test1_args[] = |
| 31 | { |
| 32 | { 0, 0, 0 } |
| 33 | }; |
| 34 | static ::DBus::IntrospectedArgument testByte_args[] = |
| 35 | { |
| 36 | { "Byte", "y", true }, |
| 37 | { 0, 0, 0 } |
| 38 | }; |
| 39 | static ::DBus::IntrospectedArgument test1Result_args[] = |
| 40 | { |
| 41 | { 0, 0, 0 } |
| 42 | }; |
| 43 | static ::DBus::IntrospectedArgument testByteResult_args[] = |
| 44 | { |
| 45 | { "Byte", "y", true }, |
| 46 | { 0, 0, 0 } |
| 47 | }; |
| 48 | static ::DBus::IntrospectedMethod Intro_adaptor_methods[] = |
| 49 | { |
| 50 | { "test1", test1_args }, |
| 51 | { "testByte", testByte_args }, |
| 52 | { 0, 0 } |
| 53 | }; |
| 54 | static ::DBus::IntrospectedMethod Intro_adaptor_signals[] = |
| 55 | { |
| 56 | { "test1Result", test1Result_args }, |
| 57 | { "testByteResult", testByteResult_args }, |
| 58 | { 0, 0 } |
| 59 | }; |
| 60 | static ::DBus::IntrospectedProperty Intro_adaptor_properties[] = |
| 61 | { |
| 62 | { 0, 0, 0, 0 } |
| 63 | }; |
| 64 | static ::DBus::IntrospectedInterface Intro_adaptor_interface = |
| 65 | { |
| 66 | "DBusCpp.Test.Com.Intro", |
| 67 | Intro_adaptor_methods, |
| 68 | Intro_adaptor_signals, |
| 69 | Intro_adaptor_properties |
| 70 | }; |
| 71 | return &Intro_adaptor_interface; |
| 72 | } |
| 73 | |
| 74 | public: |
| 75 | |
| 76 | /* properties exposed by this interface, use |
| 77 | * property() and property(value) to get and set a particular property |
| 78 | */ |
| 79 | |
| 80 | public: |
| 81 | |
| 82 | /* methods exported by this interface, |
| 83 | * you will have to implement them in your ObjectAdaptor |
| 84 | */ |
| 85 | virtual void test1() = 0; |
| 86 | virtual void testByte(const uint8_t& Byte) = 0; |
| 87 | |
| 88 | public: |
| 89 | |
| 90 | /* signal emitters for this interface |
| 91 | */ |
| 92 | void test1Result() |
| 93 | { |
| 94 | ::DBus::SignalMessage sig("test1Result"); |
| 95 | emit_signal(sig); |
| 96 | } |
| 97 | void testByteResult(const uint8_t& arg1) |
| 98 | { |
| 99 | ::DBus::SignalMessage sig("testByteResult"); |
| 100 | ::DBus::MessageIter wi = sig.writer(); |
| 101 | wi << arg1; |
| 102 | emit_signal(sig); |
| 103 | } |
| 104 | |
| 105 | private: |
| 106 | |
| 107 | /* unmarshalers (to unpack the DBus message before calling the actual interface method) |
| 108 | */ |
| 109 | ::DBus::Message _test1_stub(const ::DBus::CallMessage &call) |
| 110 | { |
| 111 | ::DBus::MessageIter ri = call.reader(); |
| 112 | |
| 113 | test1(); |
| 114 | ::DBus::ReturnMessage reply(call); |
| 115 | return reply; |
| 116 | } |
| 117 | ::DBus::Message _testByte_stub(const ::DBus::CallMessage &call) |
| 118 | { |
| 119 | ::DBus::MessageIter ri = call.reader(); |
| 120 | |
| 121 | uint8_t argin1; ri >> argin1; |
| 122 | testByte(argin1); |
| 123 | ::DBus::ReturnMessage reply(call); |
| 124 | return reply; |
| 125 | } |
| 126 | }; |
| 127 | |
| 128 | } } } |
| 129 | #endif //__dbusxx__TestAppIntroProviderPrivate_h__ADAPTOR_MARSHAL_H |