dafef240592d962b2621aa2f7a12fafbd4a56ec5
[platform/core/uifw/voice-control.git] / server / vcd_recorder.h
1 /*
2 * Copyright (c) 2011-2015 Samsung Electronics Co., Ltd All Rights Reserved
3 *
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17
18 #ifndef __VCD_RECORDER_H__
19 #define __VCD_RECORDER_H__
20
21
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25
26 #include "voice_control_plugin_engine.h"
27
28 typedef enum {
29         VCD_RECORDER_STATE_READY,       /**< Recorder is ready to start */
30         VCD_RECORDER_STATE_RECORDING,   /**< In the middle of recording */
31 } vcd_recorder_state_e;
32
33
34 typedef int (*vcd_recoder_audio_cb)(const void* data, const unsigned int length);
35
36 typedef void (*vcd_recorder_interrupt_cb)();
37
38
39 int vcd_recorder_create(vcd_recoder_audio_cb audio_cb, vcd_recorder_interrupt_cb interrupt_cb);
40
41 int vcd_recorder_destroy();
42
43 int vcd_recorder_set(const char* audio_type, vcp_audio_type_e type, int rate, int channel);
44
45 int vcd_recorder_get(char** audio_type);
46
47 int vcd_recorder_start();
48
49 int vcd_recorder_read();
50
51 int vcd_recorder_stop();
52
53 int vcd_recorder_get_state();
54
55
56 #ifdef __cplusplus
57 }
58 #endif
59
60 #endif  /* __VCD_RECORDER_H__ */
61