summaryrefslogtreecommitdiffstats
path: root/src/lib
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-31 16:37:59 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-31 16:37:59 +0200
commit047577a3e1837bf34f40ca6e1c8e0401f068a41d (patch)
treec03b4492741464bb2f95c193bddad44fedd544cb /src/lib
parent31d939efaaa6cda68aec56e859b3c00852fa7ede (diff)
downloadedoors-047577a3e1837bf34f40ca6e1c8e0401f068a41d.zip
edoors-047577a3e1837bf34f40ca6e1c8e0401f068a41d.tar.gz
Particle : add eiotas_particle_data_set
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/eiotas_particle.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c
index 5a37ae0..38fc263 100644
--- a/src/lib/eiotas_particle.c
+++ b/src/lib/eiotas_particle.c
@@ -152,6 +152,19 @@ EAPI const char* eiotas_particle_data_get(Eiotas_Particle *particle, const char*
return eina_hash_find(particle->payload,key);
}
+EAPI Eina_Bool eiotas_particle_data_set(Eiotas_Particle *particle, const char* key, const char* value)
+{
+ unsigned int i;
+ Eina_Stringshare *s;
+ Eina_Array_Iterator it;
+
+ s = eina_stringshare_add(value);
+ if(!eina_hash_add(particle->payload,key,s)) return EINA_FALSE;
+ update_link_value(particle,key);
+
+ return EINA_TRUE;
+}
+
static void update_link_value(Eiotas_Particle *particle, const char *field)
{
unsigned int i;