/*
 * This file was generated by qdbusxml2cpp-fix version 0.8
 * Command line was: qdbusxml2cpp-fix -c session -p generated/com_iflytek_aiservice_session ../xml/com.iflytek.aiservice.session.xml
 *
 * qdbusxml2cpp-fix is Copyright (C) 2016 Deepin Technology Co., Ltd.
 *
 * This is an auto-generated file.
 * Do not edit! All changes made to it will be lost.
 */

#ifndef COM_IFLYTEK_AISERVICE_SESSION_H
#define COM_IFLYTEK_AISERVICE_SESSION_H

#include <QtCore/QObject>
#include <QtCore/QByteArray>
#include <QtCore/QList>
#include <QtCore/QMap>
#include <QtCore/QString>
#include <QtCore/QStringList>
#include <QtCore/QVariant>

#include <DBusExtendedAbstractInterface>
#include <QtDBus/QtDBus>


/*
 * Proxy class for interface com.iflytek.aiservice.session
 */
class __sessionPrivate;
class __session : public DBusExtendedAbstractInterface
{
    Q_OBJECT

public:
    static inline const char *staticInterfaceName()
    { return "com.iflytek.aiservice.session"; }

public:
    explicit __session(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = 0);

    ~__session();

public Q_SLOTS: // METHODS
    inline QDBusPendingReply<QDBusObjectPath, int> createSession(const QString &appId, const QString &ability)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(appId) << QVariant::fromValue(ability);
        return asyncCallWithArgumentList(QStringLiteral("createSession"), argumentList);
    }


    inline QDBusReply<QDBusObjectPath> createSession(const QString &appId, const QString &ability, int &errorcode)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(appId) << QVariant::fromValue(ability);
        QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("createSession"), argumentList);
        if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 2) {
            errorcode = qdbus_cast<int>(reply.arguments().at(1));
        }
        return reply;
    }

    inline QDBusPendingReply<int> freeSession(const QString &appId, const QString &ability)
    {
        QList<QVariant> argumentList;
        argumentList << QVariant::fromValue(appId) << QVariant::fromValue(ability);
        return asyncCallWithArgumentList(QStringLiteral("freeSession"), argumentList);
    }




Q_SIGNALS: // SIGNALS
    // begin property changed signals

public Q_SLOTS:
    void CallQueued(const QString &callName, const QList<QVariant> &args);

private Q_SLOTS:
    void onPendingCallFinished(QDBusPendingCallWatcher *w);

private:
    __sessionPrivate *d_ptr;
};

namespace com {
  namespace iflytek {
    namespace aiservice {
      typedef ::__session session;
    }
  }
}
#endif
