17 #ifndef __NUGU_DIRECTIVE_H__
18 #define __NUGU_DIRECTIVE_H__
82 const char *version,
const char *msg_id,
83 const char *dialog_id,
const char *referrer_id,
84 const char *json,
const char *groups);
193 const unsigned char *data);
287 NUGU_API
const char *
NUGU_API int nugu_directive_is_data_end(const NuguDirective *ndir)
Get the attachment data status.
struct _nugu_directive NuguDirective
Directive object.
Definition: nugu_directive.h:48
NUGU_API int nugu_directive_close_data(NuguDirective *ndir)
Set the attachment data status to "Received all data".
NUGU_API int nugu_directive_set_data_callback(NuguDirective *ndir, NuguDirectiveDataCallback callback, void *userdata)
Set attachment received event callback.
NUGU_API int nugu_directive_set_media_type(NuguDirective *ndir, const char *type)
Set the attachment mime type.
NUGU_API int nugu_directive_is_active(const NuguDirective *ndir)
Get the active status of directive. "active" means the directive is added to the directive sequencer.
NUGU_API void nugu_directive_ref(NuguDirective *ndir)
Increment the reference count of the directive object.
NUGU_API int nugu_directive_remove_data_callback(NuguDirective *ndir)
Remove attachment received event callback.
NUGU_API const char * nugu_directive_peek_referrer_id(const NuguDirective *ndir)
Get the referer-dialog-request-id of directive.
NUGU_API int nugu_directive_set_blocking_policy(NuguDirective *ndir, enum nugu_directive_medium medium, int is_block)
Set the medium of BlockingPolicy for the directive.
NUGU_API int nugu_directive_is_blocking(const NuguDirective *ndir)
Get the blocking status of BlockingPolicy for the directive.
NUGU_API const char * nugu_directive_peek_name(const NuguDirective *ndir)
Get the name of directive.
NUGU_API const char * nugu_directive_peek_namespace(const NuguDirective *ndir)
Get the namespace of directive.
NUGU_API int nugu_directive_add_data(NuguDirective *ndir, size_t length, const unsigned char *data)
Add attachment data to directive. (e.g. TTS payload)
NUGU_API const char * nugu_directive_peek_dialog_id(const NuguDirective *ndir)
Get the dialog-request-id of directive.
NUGU_API int nugu_directive_set_active(NuguDirective *ndir, int flag)
Set the active status of directive.
NUGU_API unsigned char * nugu_directive_get_data(NuguDirective *ndir, size_t *length)
Get the attachment data received so far. When this function is called, the internal receive buffer is...
NUGU_API const char * nugu_directive_peek_version(const NuguDirective *ndir)
Get the version of directive.
NUGU_API size_t nugu_directive_get_data_size(const NuguDirective *ndir)
Get the size of attachment data received so far.
NUGU_API enum nugu_directive_medium nugu_directive_get_blocking_medium(const NuguDirective *ndir)
Get the medium of BlockingPolicy for the directive.
NUGU_API NuguDirective * nugu_directive_new(const char *name_space, const char *name, const char *version, const char *msg_id, const char *dialog_id, const char *referrer_id, const char *json, const char *groups)
Create new directive object.
NUGU_API const char * nugu_directive_peek_msg_id(const NuguDirective *ndir)
Get the message-id of directive.
NUGU_API const char * nugu_directive_peek_media_type(const NuguDirective *ndir)
Get the attachment mime type.
NUGU_API const char * nugu_directive_peek_groups(const NuguDirective *ndir)
Get the group of directive.
void(* NuguDirectiveDataCallback)(NuguDirective *ndir, int seq, void *userdata)
Callback prototype for receiving an attachment.
Definition: nugu_directive.h:64
NUGU_API const char * nugu_directive_get_blocking_medium_string(const NuguDirective *ndir)
Get the medium string of BlockingPolicy for the directive.
nugu_directive_medium
event types
Definition: nugu_directive.h:53
NUGU_API const char * nugu_directive_peek_json(const NuguDirective *ndir)
Get the payload of directive.
NUGU_API void nugu_directive_unref(NuguDirective *ndir)
Decrement the reference count of the directive object.
@ NUGU_DIRECTIVE_MEDIUM_ANY
Definition: nugu_directive.h:57
@ NUGU_DIRECTIVE_MEDIUM_NONE
Definition: nugu_directive.h:56
@ NUGU_DIRECTIVE_MEDIUM_VISUAL
Definition: nugu_directive.h:55
@ NUGU_DIRECTIVE_MEDIUM_MAX
Definition: nugu_directive.h:58
@ NUGU_DIRECTIVE_MEDIUM_AUDIO
Definition: nugu_directive.h:54