Merge "Add DeviceInfo event" into devel/master
[platform/core/uifw/dali-adaptor.git] / dali / devel-api / adaptor-framework / device-info-event.h
1 #ifndef DALI_WINDOW_DEVEL_DEVICE_INFO_EVENT_H
2 #define DALI_WINDOW_DEVEL_DEVICE_INFO_EVENT_H
3
4 /*
5  * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6  *
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  *
11  * http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  *
19  */
20
21 // EXTERNAL INCLUDES
22 #include <dali/public-api/events/device.h>
23 #include <dali/public-api/math/vector2.h>
24
25 // INTERNAL INCLUDES
26 #include <dali/public-api/dali-adaptor-common.h>
27
28 namespace Dali
29 {
30 namespace DevelWindow
31 {
32 /**
33  * @brief DeviceInfoEvent occurs when a device such as a mouse or keyboard is connected or disconnected.
34  *
35  * A signal is emitted whenever when a device such as a mouse or keyboard is connected or disconnected.
36  */
37 struct DALI_ADAPTOR_API DeviceInfoEvent
38 {
39   enum class Type
40   {
41     NONE = 0,
42     CONNECTED,
43     DISCONNECTED
44   };
45
46   /**
47    * @brief Constructor which creates a DeviceInfoEvent instance
48    * @param[in] type The type of the event.
49    * @param[in] name The device name.
50    * @param[in] identifier The identifier.
51    * @param[in] seatname The seat name.
52    * @param[in] deviceClass The device class the event originated from.
53    * @param[in] deviceSubclass The device subclass the event originated from.
54    */
55   DeviceInfoEvent(Type type, const std::string& name, const std::string& identifier, const std::string& seatname, const Device::Class::Type deviceClass, const Device::Subclass::Type deviceSubclass)
56   : type(type),
57     name(name),
58     identifier(identifier),
59     seatname(seatname),
60     deviceClass(deviceClass),
61     deviceSubclass(deviceSubclass)
62   {
63   }
64
65   Type                         type;
66   const std::string            name;
67   const std::string            identifier;
68   const std::string            seatname;
69   const Device::Class::Type    deviceClass;
70   const Device::Subclass::Type deviceSubclass;
71 };
72
73 } // namespace DevelWindow
74
75 } // namespace Dali
76
77 #endif // DALI_WINDOW_DEVEL_DEVICE_INFO_EVENT_H