Update package version to 0.1.170911
[platform/core/uifw/inputdelegator.git] / inc / voice-recorder.h
1 /*
2  * Copyright (c) 2016 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 #ifndef __VOICE_RECORDER_H__
18 #define __VOICE_RECORDER_H__
19
20 #include <recorder.h>
21
22 #ifndef TRUE
23 #define TRUE 1
24 #endif
25 #ifndef FALSE
26 #define FALSE 0
27 #endif
28
29 struct _voice_recorder {
30         recorder_h recorder;
31         recorder_audio_codec_e *codec_list;
32         int codec_list_len;
33         char file_path[PATH_MAX];
34         char file_name[PATH_MAX];
35         recorder_audio_codec_e codec;
36         recorder_file_format_e file_format;
37         FILE *preproc_file;
38         app_control_h service;
39         int bitrate;
40         int sample_rate;
41         bool is_recording;
42         long long int limitsize;
43 };
44 typedef struct _voice_recorder voice_recorder;
45
46 void init_voice_recorder(app_control_h service);
47 void destroy_voice_recorder();
48 void start_voice_recorder();
49 void stop_voice_recorder();
50 void _voice_recorder_set_data(void *data);
51 voice_recorder *_voice_recorder_get_data();
52
53 #endif // __VOICE_RECORDER_H__