Add unit tests for VC manager APIs
[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
27 typedef enum {
28         VCD_RECORDER_STATE_READY,       /**< Recorder is ready to start */
29         VCD_RECORDER_STATE_RECORDING,   /**< In the middle of recording */
30 } vcd_recorder_state_e;
31
32
33 typedef int (*vcd_recoder_audio_cb)(const void* data, const unsigned int length);
34
35 typedef void (*vcd_recorder_interrupt_cb)();
36
37
38 int vcd_recorder_create(vcd_recoder_audio_cb audio_cb, vcd_recorder_interrupt_cb interrupt_cb);
39
40 int vcd_recorder_destroy();
41
42 int vcd_recorder_set(const char* audio_type, vce_audio_type_e type, int rate, int channel);
43
44 int vcd_recorder_get(char** audio_type);
45
46 int vcd_recorder_set_audio_streaming_mode(vcd_audio_streaming_mode_e mode);
47
48 int vcd_recorder_start_streaming();
49
50 int vcd_recorder_send_streaming(const void* buffer, const unsigned int length);
51
52 int vcd_recorder_stop_streaming();
53
54 int vcd_recorder_change_system_volume();
55
56 int vcd_recorder_recover_system_volume();
57
58 int vcd_recorder_start();
59
60 int vcd_recorder_read();
61
62 int vcd_recorder_stop();
63
64 int vcd_recorder_get_state();
65
66 int vcd_recorder_set_pcm_path(const char *path);
67
68 #ifdef __cplusplus
69 }
70 #endif
71
72 #endif  /* __VCD_RECORDER_H__ */
73