summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
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;