summaryrefslogtreecommitdiff
path: root/src/lib/eo
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2019-02-15 13:48:59 -0800
committerCedric BAIL <cedric.bail@free.fr>2019-03-08 14:31:08 -0800
commitbc12d9feb5e2904bc9d8e294d922e5de1a95757f (patch)
treebaec76e11965779e96f8688c51f3398d9a0f1864 /src/lib/eo
parent6bb197caa9181f6c2639ecd25649a8237c158dd4 (diff)
eo: make reflection getter const function.
Getter are usually not modifying there object. This is going to put a strong limit on what a getter property for MVVM is, as it will prevent any side effect on getting a property from a View. Reviewed-by: Xavi Artigas <xavierartigas@yahoo.es> Differential Revision: https://phab.enlightenment.org/D7969
Diffstat (limited to 'src/lib/eo')
-rw-r--r--src/lib/eo/Eo.h4
-rw-r--r--src/lib/eo/eo.c2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h
index a43baef9b5..ea865a8d2d 100644
--- a/src/lib/eo/Eo.h
+++ b/src/lib/eo/Eo.h
@@ -832,7 +832,7 @@ typedef Eina_Error (*Efl_Object_Property_Reflection_Setter)(Eo *obj, Eina_Value
832/** 832/**
833 * Getter type which is used to get an #Eina_Value, this function should access one particular property field 833 * Getter type which is used to get an #Eina_Value, this function should access one particular property field
834 */ 834 */
835typedef Eina_Value (*Efl_Object_Property_Reflection_Getter)(Eo *obj); 835typedef Eina_Value (*Efl_Object_Property_Reflection_Getter)(const Eo *obj);
836 836
837/** 837/**
838 * @struct _Efl_Object_Property_Reflection 838 * @struct _Efl_Object_Property_Reflection
@@ -1997,7 +1997,7 @@ EAPI Eina_Error efl_property_reflection_set(Eo *obj, const char *property_name,
1997 * 1997 *
1998 * @see efl_property_reflection_set() and efl_property_reflection_exist() 1998 * @see efl_property_reflection_set() and efl_property_reflection_exist()
1999 */ 1999 */
2000EAPI Eina_Value efl_property_reflection_get(Eo *obj, const char *property_name); 2000EAPI Eina_Value efl_property_reflection_get(const Eo *obj, const char *property_name);
2001 2001
2002/** 2002/**
2003 * @brief Check if a property exist for reflection. 2003 * @brief Check if a property exist for reflection.
diff --git a/src/lib/eo/eo.c b/src/lib/eo/eo.c
index a5da8c0289..301a015859 100644
--- a/src/lib/eo/eo.c
+++ b/src/lib/eo/eo.c
@@ -3661,7 +3661,7 @@ efl_property_reflection_set(Eo *obj_id, const char *property_name, Eina_Value va
3661} 3661}
3662 3662
3663EAPI Eina_Value 3663EAPI Eina_Value
3664efl_property_reflection_get(Eo *obj_id, const char *property_name) 3664efl_property_reflection_get(const Eo *obj_id, const char *property_name)
3665{ 3665{
3666 Eina_Value r = eina_value_error_init(EINA_ERROR_NOT_IMPLEMENTED); 3666 Eina_Value r = eina_value_error_init(EINA_ERROR_NOT_IMPLEMENTED);
3667 3667