• 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 OHOS_DISTRIBUTED_HARDWARE_CAPABILITY_INFO_EVENT_H
17 #define OHOS_DISTRIBUTED_HARDWARE_CAPABILITY_INFO_EVENT_H
18 
19 #include <string>
20 
21 #include "distributed_hardware_log.h"
22 #include "event.h"
23 #include "event_sender.h"
24 
25 namespace OHOS {
26 namespace DistributedHardware {
27 class CapabilityInfoEvent : public Event {
28     TYPEINDENT(CapabilityInfoEvent)
29 
30 public:
31     enum class EventType : uint32_t {
32         UNDEFINED = 0,
33         RECOVER = 1,
34     };
35 
36 public:
CapabilityInfoEvent(EventSender & sender)37     explicit CapabilityInfoEvent(EventSender &sender) : Event(sender)
38     {
39         action_ = EventType::UNDEFINED;
40     }
41 
CapabilityInfoEvent(EventSender & sender,EventType action)42     CapabilityInfoEvent(EventSender &sender, EventType action) : Event(sender), action_(action) {}
43 
~CapabilityInfoEvent()44     virtual ~CapabilityInfoEvent() {}
45 
GetAction()46     EventType GetAction() const
47     {
48         return action_;
49     }
50 
51 private:
52     EventType action_;
53 };
54 } // namespace DistributedHardware
55 } // namespace OHOS
56 #endif
57