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

#ifndef __dbusxx___home_ysq_code_kaiming_dbus_autogenserveradaptor_h__ADAPTOR_MARSHAL_H
#define __dbusxx___home_ysq_code_kaiming_dbus_autogenserveradaptor_h__ADAPTOR_MARSHAL_H

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

namespace org {
namespace kylin {
namespace kaiming {

class interface_adaptor
: public ::DBus::InterfaceAdaptor
{
public:

    interface_adaptor()
    : ::DBus::InterfaceAdaptor("org.kylin.kaiming.interface")
    {
        register_method(interface_adaptor, install, _install_stub);
        register_method(interface_adaptor, update, _update_stub);
        register_method(interface_adaptor, uninstall, _uninstall_stub);
        register_method(interface_adaptor, getLocalInfo, _getLocalInfo_stub);
        register_method(interface_adaptor, getRemoteInfo, _getRemoteInfo_stub);
        register_method(interface_adaptor, isInstalled, _isInstalled_stub);
        register_method(interface_adaptor, isUpgradable, _isUpgradable_stub);
    }

    ::DBus::IntrospectedInterface *introspect() const 
    {
        static ::DBus::IntrospectedArgument install_args[] = 
        {
            { "name", "s", true },
            { "branch", "s", true },
            { 0, "b", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument update_args[] = 
        {
            { "name", "s", true },
            { "branch", "s", true },
            { 0, "b", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument uninstall_args[] = 
        {
            { "name", "s", true },
            { "branch", "s", true },
            { 0, "b", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument getLocalInfo_args[] = 
        {
            { "name", "s", true },
            { 0, "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument getRemoteInfo_args[] = 
        {
            { "name", "s", true },
            { 0, "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument isInstalled_args[] = 
        {
            { "name", "s", true },
            { 0, "b", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument isUpgradable_args[] = 
        {
            { "name", "s", true },
            { 0, "b", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument progresschangesignal_args[] = 
        {
            { "progressInfo", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument finishsignal_args[] = 
        {
            { "refId", "s", false },
            { "operateType", "i", false },
            { "errorCode", "i", false },
            { "errorMessage", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument getlocalinfosignal_args[] = 
        {
            { "name", "s", false },
            { "localinfo", "s", false },
            { "errorCode", "i", false },
            { "errorMessage", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument getremoteinfosignal_args[] = 
        {
            { "name", "s", false },
            { "remoteinfo", "s", false },
            { "errorCode", "i", false },
            { "errorMessage", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument isinstalledsignal_args[] = 
        {
            { "name", "s", false },
            { "isinstalled", "b", false },
            { "errorCode", "i", false },
            { "errorMessage", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedArgument isupgradablesignal_args[] = 
        {
            { "name", "s", false },
            { "isupgradable", "b", false },
            { "errorCode", "i", false },
            { "errorMessage", "s", false },
            { 0, 0, 0 }
        };
        static ::DBus::IntrospectedMethod interface_adaptor_methods[] = 
        {
            { "install", install_args },
            { "update", update_args },
            { "uninstall", uninstall_args },
            { "getLocalInfo", getLocalInfo_args },
            { "getRemoteInfo", getRemoteInfo_args },
            { "isInstalled", isInstalled_args },
            { "isUpgradable", isUpgradable_args },
            { 0, 0 }
        };
        static ::DBus::IntrospectedMethod interface_adaptor_signals[] = 
        {
            { "progresschangesignal", progresschangesignal_args },
            { "finishsignal", finishsignal_args },
            { "getlocalinfosignal", getlocalinfosignal_args },
            { "getremoteinfosignal", getremoteinfosignal_args },
            { "isinstalledsignal", isinstalledsignal_args },
            { "isupgradablesignal", isupgradablesignal_args },
            { 0, 0 }
        };
        static ::DBus::IntrospectedProperty interface_adaptor_properties[] = 
        {
            { 0, 0, 0, 0 }
        };
        static ::DBus::IntrospectedInterface interface_adaptor_interface = 
        {
            "org.kylin.kaiming.interface",
            interface_adaptor_methods,
            interface_adaptor_signals,
            interface_adaptor_properties
        };
        return &interface_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 bool install(const std::string& name, const std::string& branch) = 0;
    virtual bool update(const std::string& name, const std::string& branch) = 0;
    virtual bool uninstall(const std::string& name, const std::string& branch) = 0;
    virtual std::string getLocalInfo(const std::string& name) = 0;
    virtual std::string getRemoteInfo(const std::string& name) = 0;
    virtual bool isInstalled(const std::string& name) = 0;
    virtual bool isUpgradable(const std::string& name) = 0;

public:

    /* signal emitters for this interface
     */
    void progresschangesignal(const std::string& arg1)
    {
        ::DBus::SignalMessage sig("progresschangesignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        emit_signal(sig);
    }
    void finishsignal(const std::string& arg1, const int32_t& arg2, const int32_t& arg3, const std::string& arg4)
    {
        ::DBus::SignalMessage sig("finishsignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        wi << arg2;
        wi << arg3;
        wi << arg4;
        emit_signal(sig);
    }
    void getlocalinfosignal(const std::string& arg1, const std::string& arg2, const int32_t& arg3, const std::string& arg4)
    {
        ::DBus::SignalMessage sig("getlocalinfosignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        wi << arg2;
        wi << arg3;
        wi << arg4;
        emit_signal(sig);
    }
    void getremoteinfosignal(const std::string& arg1, const std::string& arg2, const int32_t& arg3, const std::string& arg4)
    {
        ::DBus::SignalMessage sig("getremoteinfosignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        wi << arg2;
        wi << arg3;
        wi << arg4;
        emit_signal(sig);
    }
    void isinstalledsignal(const std::string& arg1, const bool& arg2, const int32_t& arg3, const std::string& arg4)
    {
        ::DBus::SignalMessage sig("isinstalledsignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        wi << arg2;
        wi << arg3;
        wi << arg4;
        emit_signal(sig);
    }
    void isupgradablesignal(const std::string& arg1, const bool& arg2, const int32_t& arg3, const std::string& arg4)
    {
        ::DBus::SignalMessage sig("isupgradablesignal");
        ::DBus::MessageIter wi = sig.writer();
        wi << arg1;
        wi << arg2;
        wi << arg3;
        wi << arg4;
        emit_signal(sig);
    }

private:

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

        std::string argin1; ri >> argin1;
        std::string argin2; ri >> argin2;
        bool argout1 = install(argin1, argin2);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _update_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        std::string argin2; ri >> argin2;
        bool argout1 = update(argin1, argin2);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _uninstall_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        std::string argin2; ri >> argin2;
        bool argout1 = uninstall(argin1, argin2);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _getLocalInfo_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        std::string argout1 = getLocalInfo(argin1);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _getRemoteInfo_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        std::string argout1 = getRemoteInfo(argin1);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _isInstalled_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        bool argout1 = isInstalled(argin1);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
    ::DBus::Message _isUpgradable_stub(const ::DBus::CallMessage &call)
    {
        ::DBus::MessageIter ri = call.reader();

        std::string argin1; ri >> argin1;
        bool argout1 = isUpgradable(argin1);
        ::DBus::ReturnMessage reply(call);
        ::DBus::MessageIter wi = reply.writer();
        wi << argout1;
        return reply;
    }
};

} } } 
#endif //__dbusxx___home_ysq_code_kaiming_dbus_autogenserveradaptor_h__ADAPTOR_MARSHAL_H
