From: cedric Date: Fri, 6 Aug 2010 15:24:21 +0000 (+0000) Subject: * eet: add an helper to setup hash with string content. X-Git-Tag: submit/2.0alpha-wayland/20121127.222001~287 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=948f58e6a00b5bf6d5b8f225b0285b6e765f38c3;p=profile%2Fivi%2Feet.git * eet: add an helper to setup hash with string content. git-svn-id: http://svn.enlightenment.org/svn/e/trunk/eet@50863 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- diff --git a/ChangeLog b/ChangeLog index 7508cd0..73ea9a6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -413,3 +413,8 @@ 2010-08-02 Cedric BAIL * Fix bug in eet_connection code when running on 32bits machine. + +2010-08-06 Cedric BAIL + + * Add EET_DATA_DESCRIPTOR_ADD_HASH_STRING. + diff --git a/src/lib/Eet.h b/src/lib/Eet.h index 7aee6ae..9a5b3d1 100644 --- a/src/lib/Eet.h +++ b/src/lib/Eet.h @@ -2381,6 +2381,30 @@ EAPI void * eet_data_descriptor_encode(Eet_Data_Descriptor *edd, } while (0) /** + * Add a hash of string to a data descriptor + * @param edd The data descriptor to add the type to. + * @param struct_type The type of the struct. + * @param name The string name to use to encode/decode this member + * (must be a constant global and never change). + * @param member The struct member itself to be encoded. + * + * This macro lets you easily add a hash of string. All the + * parameters are the same as for EET_DATA_DESCRIPTOR_ADD_BASIC(). + * + * @since 1.3.4 + * @ingroup Eet_Data_Group + */ +#define EET_DATA_DESCRIPTOR_ADD_HASH_STRING(edd, struct_type, name, member)\ + do {\ + struct_type ___ett;\ +\ + eet_data_descriptor_element_add(edd, name, EET_T_STRING, EET_G_HASH,\ + (char *)(& (___ett.member)) -\ + (char *)(& (___ett)),\ + 0, /* 0, */ NULL, subtype);\ + } while (0) + +/** * Add a fixed size array type to a data descriptor * @param edd The data descriptor to add the type to. * @param struct_type The type of the struct.