2 * Copyright © 2019 Samsung Electronics co., Ltd. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining
5 * a copy of this software and associated documentation files (the
6 * "Software"), to deal in the Software without restriction, including
7 * without limitation the rights to use, copy, modify, merge, publish,
8 * distribute, sublicense, and/or sell copies of the Software, and to
9 * permit persons to whom the Software is furnished to do so, subject to
10 * the following conditions:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial
14 * portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
20 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
21 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 #include <PUI_backend.h>
30 #include <json-c/json.h>
38 #define ANI_COLLECTION_DIR "/usr/share/pui/"
42 #define PI 3.1415926545
45 #define LED_MASK_RED 0xFF0000
46 #define LED_MASK_GREEN 0x00FF00
47 #define LED_MASK_BLUE 0x0000FF
49 #define ERROR_CHECK(exp, action, fmt, ...) \
53 printf(fmt, ##__VA_ARGS__); \
68 typedef struct _default_ani_info default_ani_info;
69 typedef struct _default_frame_info_t default_frame_info_t;
70 typedef struct _default_led_info_t default_led_info_t;
72 struct _default_ani_info
75 pui_ani_status status;
76 pui_ani_control_buffer *buffer;
79 unsigned int num_key_frames;
80 default_frame_info_t *frames;
82 pui_effect_func effect_func;
84 unsigned int frame_idx;
87 struct _default_frame_info_t
89 default_led_info_t *leds;
93 struct _default_led_info_t
98 void pui_default_backend_ani_listening_func_set(pui_backend_ani_func *func);
99 void pui_default_backend_ani_speaking_func_set(pui_backend_ani_func *func);
100 void pui_default_backend_ani_processing_func_set(pui_backend_ani_func *func);
101 void pui_default_backend_ani_streaming_func_set(pui_backend_ani_func *func);
102 void pui_default_backend_ani_timeout_func_set(pui_backend_ani_func *func);
103 void pui_default_backend_ani_normal_func_set(pui_backend_ani_func *func);
104 void pui_default_backend_ani_emergency_func_set(pui_backend_ani_func *func);
105 void pui_default_backend_ani_easysetup_func_set(pui_backend_ani_func *func);
106 void pui_default_backend_ani_swupdatedone_func_set(pui_backend_ani_func *func);
107 void pui_default_backend_ani_micoff_func_set(pui_backend_ani_func *func);