Configure device classes for evdev devices.
Change-Id: Ia75b71253771d9d558c59411e27f8a51e352fb8b
diff --git a/modules/input/evdev/InputHost.cpp b/modules/input/evdev/InputHost.cpp
index 6a65fcd..74a5f8a 100644
--- a/modules/input/evdev/InputHost.cpp
+++ b/modules/input/evdev/InputHost.cpp
@@ -51,11 +51,16 @@
mCallbacks.input_free_device_property(mHost, mProperty);
}
-const char* InputProperty::getKey() {
+InputProperty::InputProperty(InputProperty&& rhs) :
+ InputHostBase(rhs), mProperty(std::move(rhs.mProperty)) {
+ rhs.mProperty = nullptr;
+}
+
+const char* InputProperty::getKey() const {
return mCallbacks.input_get_property_key(mHost, mProperty);
}
-const char* InputProperty::getValue() {
+const char* InputProperty::getValue() const {
return mCallbacks.input_get_property_value(mHost, mProperty);
}
@@ -63,7 +68,12 @@
mCallbacks.input_free_device_property_map(mHost, mMap);
}
-InputProperty InputPropertyMap::getDeviceProperty(const char* key) {
+InputPropertyMap::InputPropertyMap(InputPropertyMap&& rhs) :
+ InputHostBase(rhs), mMap(std::move(rhs.mMap)) {
+ rhs.mMap = nullptr;
+}
+
+InputProperty InputPropertyMap::getDeviceProperty(const char* key) const {
return InputProperty(mHost, mCallbacks,
mCallbacks.input_get_device_property(mHost, mMap, key));
}