ex
Fork of mbed-os-example-mbed5-blinky by
DuerOS-Light-SDK-v1.1.0/duer-os-light/src/recorder/baidu_recorder_manager.h@47:9e361da97763, 2017-07-18 (annotated)
- Committer:
- TMBOY
- Date:
- Tue Jul 18 16:54:45 2017 +0800
- Revision:
- 47:9e361da97763
?
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| TMBOY | 47:9e361da97763 | 1 | // Copyright 2017 Baidu Inc. All Rights Reserved. |
| TMBOY | 47:9e361da97763 | 2 | // Author: tai xiurong (taixiurong@baidu.com) |
| TMBOY | 47:9e361da97763 | 3 | // |
| TMBOY | 47:9e361da97763 | 4 | // Description: |
| TMBOY | 47:9e361da97763 | 5 | |
| TMBOY | 47:9e361da97763 | 6 | #ifndef BAIDU_IOT_TINYDU_IOT_OS_SRC_RECORDER_BAIDU_OS_RECORDER_MANAGER_H |
| TMBOY | 47:9e361da97763 | 7 | #define BAIDU_IOT_TINYDU_IOT_OS_SRC_RECORDER_BAIDU_OS_RECORDER_MANAGER_H |
| TMBOY | 47:9e361da97763 | 8 | |
| TMBOY | 47:9e361da97763 | 9 | #include "baidu_recorder.h" |
| TMBOY | 47:9e361da97763 | 10 | |
| TMBOY | 47:9e361da97763 | 11 | namespace duer { |
| TMBOY | 47:9e361da97763 | 12 | |
| TMBOY | 47:9e361da97763 | 13 | class RecorderManager { |
| TMBOY | 47:9e361da97763 | 14 | public: |
| TMBOY | 47:9e361da97763 | 15 | RecorderManager(); |
| TMBOY | 47:9e361da97763 | 16 | |
| TMBOY | 47:9e361da97763 | 17 | ~RecorderManager(); |
| TMBOY | 47:9e361da97763 | 18 | /* |
| TMBOY | 47:9e361da97763 | 19 | * start recoder. |
| TMBOY | 47:9e361da97763 | 20 | * @return |
| TMBOY | 47:9e361da97763 | 21 | * - -1 fail |
| TMBOY | 47:9e361da97763 | 22 | * - >=0 sucess |
| TMBOY | 47:9e361da97763 | 23 | */ |
| TMBOY | 47:9e361da97763 | 24 | int start(); |
| TMBOY | 47:9e361da97763 | 25 | /* |
| TMBOY | 47:9e361da97763 | 26 | * resume recoder. |
| TMBOY | 47:9e361da97763 | 27 | * @return |
| TMBOY | 47:9e361da97763 | 28 | * - -1 fail |
| TMBOY | 47:9e361da97763 | 29 | * - >=0 sucess |
| TMBOY | 47:9e361da97763 | 30 | */ |
| TMBOY | 47:9e361da97763 | 31 | int resume(); |
| TMBOY | 47:9e361da97763 | 32 | /* |
| TMBOY | 47:9e361da97763 | 33 | * pause recoder. |
| TMBOY | 47:9e361da97763 | 34 | * @return |
| TMBOY | 47:9e361da97763 | 35 | * - -1 fail |
| TMBOY | 47:9e361da97763 | 36 | * - >=0 sucess |
| TMBOY | 47:9e361da97763 | 37 | */ |
| TMBOY | 47:9e361da97763 | 38 | int pause(); |
| TMBOY | 47:9e361da97763 | 39 | /* |
| TMBOY | 47:9e361da97763 | 40 | * stop recoder. |
| TMBOY | 47:9e361da97763 | 41 | * @return |
| TMBOY | 47:9e361da97763 | 42 | * - -1 fail |
| TMBOY | 47:9e361da97763 | 43 | * - >=0 sucess |
| TMBOY | 47:9e361da97763 | 44 | */ |
| TMBOY | 47:9e361da97763 | 45 | int stop(); |
| TMBOY | 47:9e361da97763 | 46 | /* |
| TMBOY | 47:9e361da97763 | 47 | * set recoder listener. |
| TMBOY | 47:9e361da97763 | 48 | * @return |
| TMBOY | 47:9e361da97763 | 49 | * - -1 fail |
| TMBOY | 47:9e361da97763 | 50 | * - >=0 sucess |
| TMBOY | 47:9e361da97763 | 51 | */ |
| TMBOY | 47:9e361da97763 | 52 | int set_listener(Recorder::IListener* listener); |
| TMBOY | 47:9e361da97763 | 53 | |
| TMBOY | 47:9e361da97763 | 54 | private: |
| TMBOY | 47:9e361da97763 | 55 | |
| TMBOY | 47:9e361da97763 | 56 | Recorder _recorder; |
| TMBOY | 47:9e361da97763 | 57 | Recorder::MiddleWare* _midware; |
| TMBOY | 47:9e361da97763 | 58 | }; |
| TMBOY | 47:9e361da97763 | 59 | }//duer |
| TMBOY | 47:9e361da97763 | 60 | |
| TMBOY | 47:9e361da97763 | 61 | #endif // BAIDU_IOT_TINYDU_IOT_OS_SRC_RECORDER_BAIDU_OS_RECORDER_MANAGER_H |
