• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2022 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 OHOS_IPUBLISHER_LISTENER_H
17 #define OHOS_IPUBLISHER_LISTENER_H
18 
19 #include <cstdint>
20 #include <string>
21 
22 #include <iremote_broker.h>
23 
24 namespace OHOS {
25 namespace DistributedHardware {
26 enum class DHTopic : uint32_t {
27     // Topic min border, not use for real topic
28     TOPIC_MIN = 0,
29     // Start project distributed screen
30     TOPIC_START_DSCREEN = 1,
31     // Publish Sink Project Window Info
32     TOPIC_SINK_PROJECT_WINDOW_INFO = 2,
33     // Stop distributed screen project
34     TOPIC_STOP_DSCREEN = 3,
35     // publish device offline message
36     TOPIC_DEV_OFFLINE = 4,
37     // publish low latency message
38     TOPIC_LOW_LATENCY = 5,
39     // Topic max border, not use for real topic
40     TOPIC_MAX = 6
41 };
42 
43 class IPublisherListener : public IRemoteBroker {
44 public:
45     virtual void OnMessage(const DHTopic topic, const std::string& message) = 0;
46 
47     enum class Message : uint32_t {
48         ON_MESSAGE,
49     };
50 
51     DECLARE_INTERFACE_DESCRIPTOR(u"ohos.DistributedHardware.DistributedHardwareFwk.IPublisherListener");
52 };
53 } // namespace DistributedHardware
54 } // namespace OHOS
55 #endif // OHOS_IPUBLISHER_LISTENER_H