DSInput: add DeviceSubclass enum 85/241585/1
authorjeon <jhyuni.kang@samsung.com>
Wed, 8 Jul 2020 05:23:40 +0000 (14:23 +0900)
committerSung-Jin Park <sj76.park@samsung.com>
Thu, 20 Aug 2020 09:46:02 +0000 (18:46 +0900)
Change-Id: I9588a1c34876b72fb3fcf9e866907ff8fbcb188c

src/DSInput/DSInput.cpp
src/DSInput/DSInput.h

index 9a71a11..43b31d7 100644 (file)
@@ -26,14 +26,16 @@ DSInput::~DSInput()
 DSInputDevice::DSInputDevice()
        : __deviceName(nullptr),
          __deviceIdentifier(nullptr),
-         __deviceClass(DSInput::DeviceClass::None)
+         __deviceClass(DSInput::DeviceClass::NoneClass),
+         __deviceSubclass(DSInput::DeviceSubclass::NoneSubclass)
 {
 }
 
-DSInputDevice::DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass clas)
+DSInputDevice::DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass devClass, DSInput::DeviceSubclass devSubclass)
        : __deviceName(name),
          __deviceIdentifier(identifier),
-         __deviceClass(clas)
+         __deviceClass(devClass),
+         __deviceSubclass(devSubclass)
 {
 }
 
@@ -66,10 +68,19 @@ DSInput::DeviceClass DSInputDevice::getClass() const
        return __deviceClass;
 }
 
-void DSInputDevice::setClass(DSInput::DeviceClass clas)
+void DSInputDevice::setClass(DSInput::DeviceClass devClass)
 {
-       __deviceClass = clas;
+       __deviceClass = devClass;
 }
 
+DSInput::DeviceSubclass DSInputDevice::getSubclass() const
+{
+       return __deviceSubclass;
+}
+
+void DSInputDevice::setSubclass(DSInput::DeviceSubclass devSubclass)
+{
+       __deviceSubclass = devSubclass;
+}
 
 } // namespace display_server
index 2568878..a05d5e3 100644 (file)
@@ -14,10 +14,13 @@ class DSInput : public DSObject
 DS_PIMPL_USE_PRIVATE(DSInput);
 public:
        enum DeviceClass {
-               None     = 0,
-               Pointer  = (1 << 0),
-               Keyboard = (1 << 1),
-               Touch    = (1 << 2),
+               NoneClass,
+               PointerClass,
+               KeyboardClass,
+               TouchClass,
+       };
+       enum DeviceSubclass {
+               NoneSubclass,
        };
 public:
        DSInput();
@@ -28,7 +31,7 @@ class DSInputDevice
 {
 public:
        DSInputDevice();
-       DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass clas);
+       DSInputDevice(std::string name, std::string identifier, DSInput::DeviceClass devClass, DSInput::DeviceSubclass devSubclass);
        ~DSInputDevice();
 
        std::string getName() const;
@@ -38,13 +41,16 @@ public:
        void setIdentifier(std::string identifier);
 
        DSInput::DeviceClass getClass() const;
-       void setClass(DSInput::DeviceClass clas);
+       void setClass(DSInput::DeviceClass devClass);
+
+       DSInput::DeviceSubclass getSubclass() const;
+       void setSubclass(DSInput::DeviceSubclass devSubclass);
 
 private:
        std::string __deviceName;
        std::string __deviceIdentifier;
        DSInput::DeviceClass __deviceClass;
-
+       DSInput::DeviceSubclass __deviceSubclass;
 };
 
 }