/*
 * Copyright 2024 KylinSoft Co., Ltd.
 *
 * This program is free software: you can redistribute it and/or modify it under
 * the terms of the GNU General Public License as published by the Free Software
 * Foundation, either version 3 of the License, or (at your option) any later
 * version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License along with
 * this program. If not, see <https://www.gnu.org/licenses/>.
 */

/*
 * This file is generated by gdbus-codegen, do not modify it.
 *
 * The license of this code is the same as for the D-Bus interface description
 * it was derived from. Note that it links to GLib, so must comply with the
 * LGPL linking clauses.
 */

#ifndef __SPEECHPROCESSORGLUE_H__
#define __SPEECHPROCESSORGLUE_H__

#include <gio/gio.h>

G_BEGIN_DECLS


/* ------------------------------------------------------------------------ */
/* Declarations for org.openkylin.aisdk.SpeechProcessor */

#define TYPE_AISDK_SPEECH_PROCESSOR (aisdk_speech_processor_get_type ())
#define AISDK_SPEECH_PROCESSOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AISDK_SPEECH_PROCESSOR, AisdkSpeechProcessor))
#define IS_AISDK_SPEECH_PROCESSOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AISDK_SPEECH_PROCESSOR))
#define AISDK_SPEECH_PROCESSOR_GET_IFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), TYPE_AISDK_SPEECH_PROCESSOR, AisdkSpeechProcessorIface))

struct _AisdkSpeechProcessor;
typedef struct _AisdkSpeechProcessor AisdkSpeechProcessor;
typedef struct _AisdkSpeechProcessorIface AisdkSpeechProcessorIface;

struct _AisdkSpeechProcessorIface
{
  GTypeInterface parent_iface;

  gboolean (*handle_init) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_engine_name,
    const gchar *arg_app_id,
    const gchar *arg_api_key,
    const gchar *arg_secret_key);

  gboolean (*handle_input_audio_data) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_audioData,
    gint arg_audioDataLength);

  gboolean (*handle_input_continuous_text) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_text);

  gboolean (*handle_recognizing_complete_audio) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_audioProperties,
    const gchar *arg_audioData,
    gint arg_audioDataLength);

  gboolean (*handle_recognizing_complete_text) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_voiceProperties,
    const gchar *arg_text);

  gboolean (*handle_start_recognizing_audio) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_audioProperties);

  gboolean (*handle_start_synthesizing_audio) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *arg_voiceProperties);

  gboolean (*handle_stop_recognizing_audio) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

  gboolean (*handle_stop_synthesizing_audio) (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

};

GType aisdk_speech_processor_get_type (void) G_GNUC_CONST;

GDBusInterfaceInfo *aisdk_speech_processor_interface_info (void);
guint aisdk_speech_processor_override_properties (GObjectClass *klass, guint property_id_begin);


/* D-Bus method call completion functions: */
void aisdk_speech_processor_complete_init (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

void aisdk_speech_processor_complete_start_recognizing_audio (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

void aisdk_speech_processor_complete_input_audio_data (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *textData,
    gint textDataLength,
    gint errorMsg);

void aisdk_speech_processor_complete_stop_recognizing_audio (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

void aisdk_speech_processor_complete_recognizing_complete_audio (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *textData,
    gint textDataLength,
    gint errorMsg);

void aisdk_speech_processor_complete_start_synthesizing_audio (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

void aisdk_speech_processor_complete_input_continuous_text (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *audioFormat,
    gint audioRate,
    gint audioChannel,
    const gchar *audioData,
    gint audioDataLength,
    gint errorMsg);

void aisdk_speech_processor_complete_stop_synthesizing_audio (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation);

void aisdk_speech_processor_complete_recognizing_complete_text (
    AisdkSpeechProcessor *object,
    GDBusMethodInvocation *invocation,
    const gchar *audioFormat,
    gint audioRate,
    gint audioChannel,
    const gchar *audioData,
    gint audioDataLength,
    gint errorMsg);



/* D-Bus method calls: */
void aisdk_speech_processor_call_init (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_engine_name,
    const gchar *arg_app_id,
    const gchar *arg_api_key,
    const gchar *arg_secret_key,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_init_finish (
    AisdkSpeechProcessor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_init_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_engine_name,
    const gchar *arg_app_id,
    const gchar *arg_api_key,
    const gchar *arg_secret_key,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_start_recognizing_audio (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioProperties,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_start_recognizing_audio_finish (
    AisdkSpeechProcessor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_start_recognizing_audio_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioProperties,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_input_audio_data (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioData,
    gint arg_audioDataLength,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_input_audio_data_finish (
    AisdkSpeechProcessor *proxy,
    gchar **out_textData,
    gint *out_textDataLength,
    gint *out_errorMsg,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_input_audio_data_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioData,
    gint arg_audioDataLength,
    gchar **out_textData,
    gint *out_textDataLength,
    gint *out_errorMsg,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_stop_recognizing_audio (
    AisdkSpeechProcessor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_stop_recognizing_audio_finish (
    AisdkSpeechProcessor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_stop_recognizing_audio_sync (
    AisdkSpeechProcessor *proxy,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_recognizing_complete_audio (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioProperties,
    const gchar *arg_audioData,
    gint arg_audioDataLength,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_recognizing_complete_audio_finish (
    AisdkSpeechProcessor *proxy,
    gchar **out_textData,
    gint *out_textDataLength,
    gint *out_errorMsg,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_recognizing_complete_audio_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_audioProperties,
    const gchar *arg_audioData,
    gint arg_audioDataLength,
    gchar **out_textData,
    gint *out_textDataLength,
    gint *out_errorMsg,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_start_synthesizing_audio (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_voiceProperties,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_start_synthesizing_audio_finish (
    AisdkSpeechProcessor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_start_synthesizing_audio_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_voiceProperties,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_input_continuous_text (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_text,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_input_continuous_text_finish (
    AisdkSpeechProcessor *proxy,
    gchar **out_audioFormat,
    gint *out_audioRate,
    gint *out_audioChannel,
    gchar **out_audioData,
    gint *out_audioDataLength,
    gint *out_errorMsg,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_input_continuous_text_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_text,
    gchar **out_audioFormat,
    gint *out_audioRate,
    gint *out_audioChannel,
    gchar **out_audioData,
    gint *out_audioDataLength,
    gint *out_errorMsg,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_stop_synthesizing_audio (
    AisdkSpeechProcessor *proxy,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_stop_synthesizing_audio_finish (
    AisdkSpeechProcessor *proxy,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_stop_synthesizing_audio_sync (
    AisdkSpeechProcessor *proxy,
    GCancellable *cancellable,
    GError **error);

void aisdk_speech_processor_call_recognizing_complete_text (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_voiceProperties,
    const gchar *arg_text,
    GCancellable *cancellable,
    GAsyncReadyCallback callback,
    gpointer user_data);

gboolean aisdk_speech_processor_call_recognizing_complete_text_finish (
    AisdkSpeechProcessor *proxy,
    gchar **out_audioFormat,
    gint *out_audioRate,
    gint *out_audioChannel,
    gchar **out_audioData,
    gint *out_audioDataLength,
    gint *out_errorMsg,
    GAsyncResult *res,
    GError **error);

gboolean aisdk_speech_processor_call_recognizing_complete_text_sync (
    AisdkSpeechProcessor *proxy,
    const gchar *arg_voiceProperties,
    const gchar *arg_text,
    gchar **out_audioFormat,
    gint *out_audioRate,
    gint *out_audioChannel,
    gchar **out_audioData,
    gint *out_audioDataLength,
    gint *out_errorMsg,
    GCancellable *cancellable,
    GError **error);



/* ---- */

#define TYPE_AISDK_SPEECH_PROCESSOR_PROXY (aisdk_speech_processor_proxy_get_type ())
#define AISDK_SPEECH_PROCESSOR_PROXY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AISDK_SPEECH_PROCESSOR_PROXY, AisdkSpeechProcessorProxy))
#define AISDK_SPEECH_PROCESSOR_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AISDK_SPEECH_PROCESSOR_PROXY, AisdkSpeechProcessorProxyClass))
#define AISDK_SPEECH_PROCESSOR_PROXY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AISDK_SPEECH_PROCESSOR_PROXY, AisdkSpeechProcessorProxyClass))
#define IS_AISDK_SPEECH_PROCESSOR_PROXY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AISDK_SPEECH_PROCESSOR_PROXY))
#define IS_AISDK_SPEECH_PROCESSOR_PROXY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AISDK_SPEECH_PROCESSOR_PROXY))

typedef struct _AisdkSpeechProcessorProxy AisdkSpeechProcessorProxy;
typedef struct _AisdkSpeechProcessorProxyClass AisdkSpeechProcessorProxyClass;
typedef struct _AisdkSpeechProcessorProxyPrivate AisdkSpeechProcessorProxyPrivate;

struct _AisdkSpeechProcessorProxy
{
  /*< private >*/
  GDBusProxy parent_instance;
  AisdkSpeechProcessorProxyPrivate *priv;
};

struct _AisdkSpeechProcessorProxyClass
{
  GDBusProxyClass parent_class;
};

GType aisdk_speech_processor_proxy_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AisdkSpeechProcessorProxy, g_object_unref)
#endif

void aisdk_speech_processor_proxy_new (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
AisdkSpeechProcessor *aisdk_speech_processor_proxy_new_finish (
    GAsyncResult        *res,
    GError             **error);
AisdkSpeechProcessor *aisdk_speech_processor_proxy_new_sync (
    GDBusConnection     *connection,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);

void aisdk_speech_processor_proxy_new_for_bus (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GAsyncReadyCallback  callback,
    gpointer             user_data);
AisdkSpeechProcessor *aisdk_speech_processor_proxy_new_for_bus_finish (
    GAsyncResult        *res,
    GError             **error);
AisdkSpeechProcessor *aisdk_speech_processor_proxy_new_for_bus_sync (
    GBusType             bus_type,
    GDBusProxyFlags      flags,
    const gchar         *name,
    const gchar         *object_path,
    GCancellable        *cancellable,
    GError             **error);


/* ---- */

#define TYPE_AISDK_SPEECH_PROCESSOR_SKELETON (aisdk_speech_processor_skeleton_get_type ())
#define AISDK_SPEECH_PROCESSOR_SKELETON(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), TYPE_AISDK_SPEECH_PROCESSOR_SKELETON, AisdkSpeechProcessorSkeleton))
#define AISDK_SPEECH_PROCESSOR_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), TYPE_AISDK_SPEECH_PROCESSOR_SKELETON, AisdkSpeechProcessorSkeletonClass))
#define AISDK_SPEECH_PROCESSOR_SKELETON_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), TYPE_AISDK_SPEECH_PROCESSOR_SKELETON, AisdkSpeechProcessorSkeletonClass))
#define IS_AISDK_SPEECH_PROCESSOR_SKELETON(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), TYPE_AISDK_SPEECH_PROCESSOR_SKELETON))
#define IS_AISDK_SPEECH_PROCESSOR_SKELETON_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), TYPE_AISDK_SPEECH_PROCESSOR_SKELETON))

typedef struct _AisdkSpeechProcessorSkeleton AisdkSpeechProcessorSkeleton;
typedef struct _AisdkSpeechProcessorSkeletonClass AisdkSpeechProcessorSkeletonClass;
typedef struct _AisdkSpeechProcessorSkeletonPrivate AisdkSpeechProcessorSkeletonPrivate;

struct _AisdkSpeechProcessorSkeleton
{
  /*< private >*/
  GDBusInterfaceSkeleton parent_instance;
  AisdkSpeechProcessorSkeletonPrivate *priv;
};

struct _AisdkSpeechProcessorSkeletonClass
{
  GDBusInterfaceSkeletonClass parent_class;
};

GType aisdk_speech_processor_skeleton_get_type (void) G_GNUC_CONST;

#if GLIB_CHECK_VERSION(2, 44, 0)
G_DEFINE_AUTOPTR_CLEANUP_FUNC (AisdkSpeechProcessorSkeleton, g_object_unref)
#endif

AisdkSpeechProcessor *aisdk_speech_processor_skeleton_new (void);


G_END_DECLS

#endif /* __SPEECHPROCESSORGLUE_H__ */
