summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2012-05-31 23:45:36 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2012-05-31 23:45:36 +0200
commitc7b2ae9a97612e3ee32ae0837a6da9d091c5487c (patch)
treeb82d42c68fa274aaf4d836810ecb63dcb203c03e /src
parent94c19497f4d163f86e20dbce9e6a03d62a576c23 (diff)
downloadedoors-c7b2ae9a97612e3ee32ae0837a6da9d091c5487c.zip
edoors-c7b2ae9a97612e3ee32ae0837a6da9d091c5487c.tar.gz
add eiotas_particle_match
Diffstat (limited to 'src')
-rw-r--r--src/include/eiotas_particle.h10
-rw-r--r--src/lib/eiotas_particle.c5
2 files changed, 15 insertions, 0 deletions
diff --git a/src/include/eiotas_particle.h b/src/include/eiotas_particle.h
index c683a4b..f094904 100644
--- a/src/include/eiotas_particle.h
+++ b/src/include/eiotas_particle.h
@@ -147,6 +147,16 @@ EAPI Eina_Bool eiotas_particle_data_set(Eiotas_Particle *particle, const char *k
EAPI Eina_Bool eiotas_particle_data_del(Eiotas_Particle *particle, const char *key);
/**
+ * @brief Check if two @ref Eiotas_Particle have the same lnk_value
+ *
+ * @param particle The @ref Eiotas_Particle to compare with
+ * @param p The @ref Eiotas_Particle to compare with
+ *
+ * @return EINA_TRUE if the link value is the same, EINA_FALSE otherwise.
+ */
+EAPI Eina_Bool eiotas_particle_match(Eiotas_Particle *particle, const Eiotas_Particle *p);
+
+/**
* @}
*/
diff --git a/src/lib/eiotas_particle.c b/src/lib/eiotas_particle.c
index be453e6..74e1d23 100644
--- a/src/lib/eiotas_particle.c
+++ b/src/lib/eiotas_particle.c
@@ -177,6 +177,11 @@ EAPI Eina_Bool eiotas_particle_data_del(Eiotas_Particle *particle, const char* k
return EINA_TRUE;
}
+EAPI Eina_Bool eiotas_particle_match(Eiotas_Particle *particle, const Eiotas_Particle *p)
+{
+ return ( (particle->link_value==p->link_value) ? EINA_TRUE : EINA_FALSE );
+}
+
static void update_link_value(Eiotas_Particle *particle, const char *field)
{
unsigned int i;