• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2021 Huawei Device Co., Ltd.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at
6  *
7  *     http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 #ifndef I_STANDARD_RECORDER_LISTENER_H
17 #define I_STANDARD_RECORDER_LISTENER_H
18 
19 #include "ipc_types.h"
20 #include "iremote_broker.h"
21 #include "iremote_proxy.h"
22 #include "iremote_stub.h"
23 #include "recorder.h"
24 
25 namespace OHOS {
26 namespace Media {
27 class IStandardRecorderListener : public IRemoteBroker {
28 public:
29     virtual ~IStandardRecorderListener() = default;
30     virtual void OnError(int32_t errorType, int32_t errorCode) = 0;
31     virtual void OnInfo(int32_t type, int32_t extra) = 0;
32     virtual void OnAudioCaptureChange(const AudioRecorderChangeInfo &audioRecorderChangeInfo) = 0;
33     virtual void OnPhotoAssertAvailable(const std::string &uri) = 0;
34     /**
35      * IPC code ID
36      */
37     enum RecorderListenerMsg {
38         ON_ERROR = 0,
39         ON_INFO = 1,
40         ON_AUDIO_CAPTURE_CHANGE = 2,
41         ON_PHOTO_ASSERT_AVAILABLE = 3,
42     };
43 
44     DECLARE_INTERFACE_DESCRIPTOR(u"IStandardRecorderListener");
45 };
46 } // namespace Media
47 } // namespace OHOS
48 #endif // I_STANDARD_RECORDER_SERVICE_H
49