• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2025 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 AUDIO_SERVICE_HPAE_DUMP_CALLBACK_H
17 #define AUDIO_SERVICE_HPAE_DUMP_CALLBACK_H
18 #include <string>
19 #include "audio_info.h"
20 #include "hpae_info.h"
21 namespace OHOS {
22 namespace AudioStandard {
23 typedef struct {
24     std::string deviceName;
25     std::string config;
26 } HpaeSinkSourceInfo;
27 
28 typedef struct {
29     uint32_t sessionId;
30     std::string deviceName;
31     int32_t uid;
32     int32_t pid;
33     uint32_t tokenId;
34     bool offloadEnable;
35     AudioPrivacyType privacyType;
36     std::string config;
37     HPAE::HpaeSessionState state;
38     uint64_t startTime;
39 } HpaeInputOutputInfo;
40 
41 typedef struct {
42     std::vector<HpaeSinkSourceInfo> sinkInfos;
43     std::vector<HpaeSinkSourceInfo> sourceInfos;
44 } HpaeDeviceInfo;
45 
46 class AudioServiceHpaeDumpCallback {
47 public:
48     virtual void OnDumpSinkInfoCb(std::string& dumpStr, int32_t result) = 0;
49     virtual void OnDumpSourceInfoCb(std::string &dumpStr, int32_t result) = 0;
50     virtual void OnDumpAllAvailableDeviceCb(int32_t result) = 0;
51     virtual void OnDumpSinkInputsInfoCb(std::vector<HpaeInputOutputInfo> &sinkInputs, int32_t result) = 0;
52     virtual void OnDumpSourceOutputsInfoCb(std::vector<HpaeInputOutputInfo> &sourceOutputs, int32_t result) = 0;
~AudioServiceHpaeDumpCallback()53     virtual ~AudioServiceHpaeDumpCallback()
54     {}
55 };
56 }  // namespace AudioStandard
57 }  // namespace OHOS
58 #endif // AUDIO_SERVICE_HPAE_DUMP_CALLBACK_H