
/*
 *	This file was automatically generated by dbusxx-xml2cpp; DO NOT EDIT!
 */

#ifndef __dbusxx__src_mc_hid_server_glue_hpp__ADAPTOR_MARSHAL_H
#define __dbusxx__src_mc_hid_server_glue_hpp__ADAPTOR_MARSHAL_H

#include <dbus-c++/dbus.h>
#include <cassert>

namespace nl {
namespace miqra {
namespace MediaCore {

class Hid_adaptor
: public ::DBus::InterfaceAdaptor
{
public:

    Hid_adaptor()
    : ::DBus::InterfaceAdaptor("nl.miqra.MediaCore.Hid")
    {
        register_method(Hid_adaptor, SetColor, _SetColor_stub);
        register_method(Hid_adaptor, ClearColor, _ClearColor_stub);
        register_method(Hid_adaptor, PulseColor, _PulseColor_stub);
    }

    ::DBus::IntrospectedInterface *introspect() const 
    {
        static ::DBus::IntrospectedArgument SetColor_args[] = 
        {
            { "r", "y", true },
            { "g", "y", true },
            { "b", "y", true },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument ClearColor_args[] = 
        {
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument PulseColor_args[] = 
        {
            { "r", "y", true },
            { "g", "y", true },
            { "b", "y", true },
            { "interval", "d", true },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument ButtonDown_args[] = 
        {
            { "button", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument ButtonUp_args[] = 
        {
            { "button", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument ButtonPress_args[] = 
        {
            { "button", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument ButtonLongPress_args[] = 
        {
            { "button", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedMethod Hid_adaptor_methods[] = 
        {
            { "SetColor", SetColor_args },
            { "ClearColor", ClearColor_args },
            { "PulseColor", PulseColor_args },
            { 0, 0 }
        };
        static ::DBus::IntrospectedMethod Hid_adaptor_signals[] = 
        {
            { "ButtonDown", ButtonDown_args },
            { "ButtonUp", ButtonUp_args },
            { "ButtonPress", ButtonPress_args },
            { "ButtonLongPress", ButtonLongPress_args },
            { 0, 0 }
        };
        static ::DBus::IntrospectedProperty Hid_adaptor_properties[] = 
        {
            { 0, 0, 0, 0 }
        };
        static ::DBus::IntrospectedInterface Hid_adaptor_interface = 
        {
            "nl.miqra.MediaCore.Hid",
            Hid_adaptor_methods,
            Hid_adaptor_signals,
            Hid_adaptor_properties
        };
        return &Hid_adaptor_interface;
    }

public:

    /* properties exposed by this interface, use
     * property() and property(value) to get and set a particular property
     */

public:

    /* methods exported by this interface,
     * you will have to implement them in your ObjectAdaptor
     */
    virtual void SetColor(const uint8_t& r, const uint8_t& g, const uint8_t& b) = 0;
    virtual void ClearColor() = 0;
    virtual void PulseColor(const uint8_t& r, const uint8_t& g, const uint8_t& b, const double& interval) = 0;

public:

    /* signal emitters for this interface
     */
    void ButtonDown(const std::string& arg1)
    {
        ::DBus::SignalMessage sig("ButtonDown");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        emit_signal(sig);
    }
    void ButtonUp(const std::string& arg1)
    {
        ::DBus::SignalMessage sig("ButtonUp");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        emit_signal(sig);
    }
    void ButtonPress(const std::string& arg1)
    {
        ::DBus::SignalMessage sig("ButtonPress");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        emit_signal(sig);
    }
    void ButtonLongPress(const std::string& arg1)
    {
        ::DBus::SignalMessage sig("ButtonLongPress");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        emit_signal(sig);
    }

private:

    /* unmarshalers (to unpack the DBus message before calling the actual interface method)
     */
    ::DBus::Message _SetColor_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        uint8_t argin1; ri >> argin1;
        uint8_t argin2; ri >> argin2;
        uint8_t argin3; ri >> argin3;
        SetColor(argin1, argin2, argin3);
        ::DBus::ReturnMessage reply(call);
        return reply;
    }
    ::DBus::Message _ClearColor_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        ClearColor();
        ::DBus::ReturnMessage reply(call);
        return reply;
    }
    ::DBus::Message _PulseColor_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        uint8_t argin1; ri >> argin1;
        uint8_t argin2; ri >> argin2;
        uint8_t argin3; ri >> argin3;
        double argin4; ri >> argin4;
        PulseColor(argin1, argin2, argin3, argin4);
        ::DBus::ReturnMessage reply(call);
        return reply;
    }
};

} } } 
#endif //__dbusxx__src_mc_hid_server_glue_hpp__ADAPTOR_MARSHAL_H
