This is an automated email from the git hooks/post-receive script.

git pushed a commit to branch prefer-libddcutil5
in repository enlightenment.

View the commit online.

commit ffd51d8fca3d7cd0c61f10d9b942d286d5bd5fb1
Author: rafspiny <rafsp...@gmail.com>
AuthorDate: Thu Aug 10 12:45:35 2023 +0200

    WIP
---
 src/modules/convertible/dbus_acceleration.c | 50 +++++++++++++++--------------
 1 file changed, 26 insertions(+), 24 deletions(-)

diff --git a/src/modules/convertible/dbus_acceleration.c b/src/modules/convertible/dbus_acceleration.c
index 2a33c25c1..4fd0a2c27 100644
--- a/src/modules/convertible/dbus_acceleration.c
+++ b/src/modules/convertible/dbus_acceleration.c
@@ -10,6 +10,32 @@
 
 static DbusAccelerometer* accelerometer_dbus;
 
+
+/**
+ * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
+ * @param data DbusAccelerometer
+ * @param msg The message
+ * @param pending
+ */
+static void
+on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
+{
+    const char *errname, *errmsg;
+    Eina_Bool has_accelerometer = EINA_FALSE;
+    Eldbus_Message_Iter *variant = NULL;
+
+    if (eldbus_message_error_get(msg, &errname, &errmsg))
+    {
+        ERR("Error: %s %s", errname, errmsg);
+    }
+
+    _access_bool_property(msg, &variant, &has_accelerometer);
+    DbusAccelerometer *accelerometer = data;
+    accelerometer->has_accelerometer = has_accelerometer;
+    DBG("Has Accelerometer: %d", accelerometer->has_accelerometer);
+}
+
+
 DbusAccelerometer*
 sensor_proxy_init(void)
 {
@@ -211,30 +237,6 @@ _access_bool_property(const Eldbus_Message *msg, Eldbus_Message_Iter **variant,
    return res;
 }
 
-/**
- * Callback definition to handle the request of the hasAccelerometer property of DBUS interface net.hadess.SensorProxy
- * @param data DbusAccelerometer
- * @param msg The message
- * @param pending
- */
-static void
-on_has_accelerometer(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
-{
-   const char *errname, *errmsg;
-   Eina_Bool has_accelerometer = EINA_FALSE;
-   Eldbus_Message_Iter *variant = NULL;
-
-   if (eldbus_message_error_get(msg, &errname, &errmsg))
-   {
-      ERR("Error: %s %s", errname, errmsg);
-   }
-
-   _access_bool_property(msg, &variant, &has_accelerometer);
-   DbusAccelerometer *accelerometer = data;
-   accelerometer->has_accelerometer = has_accelerometer;
-   DBG("Has Accelerometer: %d", accelerometer->has_accelerometer);
-}
-
 void
 on_accelerometer_orientation(void *data, const Eldbus_Message *msg, Eldbus_Pending *pending EINA_UNUSED)
 {

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.

Reply via email to