1794c9f46Sopenharmony_ci/*
2794c9f46Sopenharmony_ci * Copyright (c) 2021-2024 Huawei Device Co., Ltd.
3794c9f46Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
4794c9f46Sopenharmony_ci * you may not use this file except in compliance with the License.
5794c9f46Sopenharmony_ci * You may obtain a copy of the License at
6794c9f46Sopenharmony_ci *
7794c9f46Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
8794c9f46Sopenharmony_ci *
9794c9f46Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
10794c9f46Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
11794c9f46Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12794c9f46Sopenharmony_ci * See the License for the specific language governing permissions and
13794c9f46Sopenharmony_ci * limitations under the License.
14794c9f46Sopenharmony_ci */
15794c9f46Sopenharmony_ci
16794c9f46Sopenharmony_ci#ifndef OHOS_IDISTRIBUTED_HARDWARE_H
17794c9f46Sopenharmony_ci#define OHOS_IDISTRIBUTED_HARDWARE_H
18794c9f46Sopenharmony_ci
19794c9f46Sopenharmony_ci#include <cstdint>
20794c9f46Sopenharmony_ci#include <string>
21794c9f46Sopenharmony_ci#include <unordered_map>
22794c9f46Sopenharmony_ci
23794c9f46Sopenharmony_ci#include "iremote_broker.h"
24794c9f46Sopenharmony_ci#include "device_type.h"
25794c9f46Sopenharmony_ci
26794c9f46Sopenharmony_ci#include "distributed_hardware_fwk_kit_paras.h"
27794c9f46Sopenharmony_ci#include "iav_trans_control_center_callback.h"
28794c9f46Sopenharmony_ci#include "ipublisher_listener.h"
29794c9f46Sopenharmony_ci
30794c9f46Sopenharmony_cinamespace OHOS {
31794c9f46Sopenharmony_cinamespace DistributedHardware {
32794c9f46Sopenharmony_ciclass IDistributedHardware : public OHOS::IRemoteBroker {
33794c9f46Sopenharmony_cipublic:
34794c9f46Sopenharmony_ci    DECLARE_INTERFACE_DESCRIPTOR(u"ohos.distributedhardware.accessToken");
35794c9f46Sopenharmony_ci    IDistributedHardware() = default;
36794c9f46Sopenharmony_ci    virtual ~IDistributedHardware() = default;
37794c9f46Sopenharmony_ci    virtual int32_t RegisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) = 0;
38794c9f46Sopenharmony_ci    virtual int32_t UnregisterPublisherListener(const DHTopic topic, const sptr<IPublisherListener> listener) = 0;
39794c9f46Sopenharmony_ci    virtual int32_t PublishMessage(const DHTopic topic, const std::string &msg) = 0;
40794c9f46Sopenharmony_ci    virtual std::string QueryLocalSysSpec(QueryLocalSysSpecType spec) = 0;
41794c9f46Sopenharmony_ci
42794c9f46Sopenharmony_ci    virtual int32_t InitializeAVCenter(const TransRole &transRole, int32_t &engineId) = 0;
43794c9f46Sopenharmony_ci    virtual int32_t ReleaseAVCenter(int32_t engineId) = 0;
44794c9f46Sopenharmony_ci    virtual int32_t CreateControlChannel(int32_t engineId, const std::string &peerDevId) = 0;
45794c9f46Sopenharmony_ci    virtual int32_t NotifyAVCenter(int32_t engineId, const AVTransEvent &event) = 0;
46794c9f46Sopenharmony_ci    virtual int32_t RegisterCtlCenterCallback(int32_t engineId,
47794c9f46Sopenharmony_ci        const sptr<IAVTransControlCenterCallback> callback) = 0;
48794c9f46Sopenharmony_ci    virtual int32_t NotifySourceRemoteSinkStarted(std::string &deviceId) = 0;
49794c9f46Sopenharmony_ci    virtual int32_t PauseDistributedHardware(DHType dhType, const std::string &networkId) = 0;
50794c9f46Sopenharmony_ci    virtual int32_t ResumeDistributedHardware(DHType dhType, const std::string &networkId) = 0;
51794c9f46Sopenharmony_ci    virtual int32_t StopDistributedHardware(DHType dhType, const std::string &networkId) = 0;
52794c9f46Sopenharmony_ci};
53794c9f46Sopenharmony_ci} // namespace DistributedHardware
54794c9f46Sopenharmony_ci} // namespace OHOS
55794c9f46Sopenharmony_ci#endif // OHOS_IDISTRIBUTED_HARDWARE_H
56