edbus: add helper function edbus_message_iter_struct_like_to_eina_value()
authorJosé Roberto de Souza <zehortigoza@profusion.mobi>
Thu, 20 Dec 2012 21:38:15 +0000 (21:38 +0000)
committerLucas De Marchi <lucas.demarchi@profusion.mobi>
Thu, 20 Dec 2012 21:38:15 +0000 (21:38 +0000)
Patch by: José Roberto de Souza  <zehortigoza@profusion.mobi>

SVN revision: 81489

legacy/edbus/src/lib/edbus_message_eina_value.h
legacy/edbus/src/lib/edbus_message_to_eina_value.c

index 1875166..a57c1f7 100644 (file)
 EAPI Eina_Value *edbus_message_to_eina_value(const EDBus_Message *msg) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT;
 
 /**
+ * Convert EDBus_Message_Iter of type variant, struct or dict entry to
+ * Eina_Value.
+ *
+ * @param iter Message iterator
+ * @return Eina_Value of type Eina_Value_Type_Struct
+ */
+EAPI Eina_Value *edbus_message_iter_struct_like_to_eina_value(const EDBus_Message_Iter *iter);
+
+/**
  * Convert Eina_Value to EDBus_Message
  *
  * @param signature dbus signature
index 8c302d4..caee35d 100644 (file)
@@ -441,3 +441,10 @@ edbus_message_to_eina_value(const EDBus_Message *msg)
    EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL);
    return _message_iter_struct_to_eina_value(iter);
 }
+
+EAPI Eina_Value *
+edbus_message_iter_struct_like_to_eina_value(const EDBus_Message_Iter *iter)
+{
+   EINA_SAFETY_ON_NULL_RETURN_VAL(iter, NULL);
+   return _message_iter_struct_to_eina_value((EDBus_Message_Iter *)iter);
+}