• 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 public:
30     enum class EventType : uint32_t {
31         UNDEFINED = 0,
32         RECOVER = 1,
33     };
34 
35 public:
CapabilityInfoEvent(EventSender & sender)36     CapabilityInfoEvent(EventSender &sender) : Event(sender)
37     {
38         action_ = EventType::UNDEFINED;
39     }
40 
CapabilityInfoEvent(EventSender & sender,EventType action)41     CapabilityInfoEvent(EventSender &sender, EventType action) : Event(sender), action_(action) {}
42 
~CapabilityInfoEvent()43     virtual ~CapabilityInfoEvent() {}
44 
GetAction()45     EventType GetAction() const
46     {
47         return action_;
48     }
49 
50 private:
51     EventType action_;
52 };
53 }
54 }
55 #endif
56