Eolian: add API to parse all the .eo files.

This commit is contained in:
Daniel Zaoui 2014-04-27 16:23:54 +03:00
parent 66b784c804
commit fea029a0a3
2 changed files with 27 additions and 0 deletions

View File

@ -157,6 +157,18 @@ EAPI int eolian_shutdown(void);
*/
EAPI Eina_Bool eolian_directory_scan(const char *dir);
/*
* @brief Force parsing of all the files located in the directories
* given in eolian_directory_scan..
*
* @return EINA_TRUE on success, EINA_FALSE otherwise.
*
* @see eolian_directory_scan
*
* @ingroup Eolian
*/
EAPI Eina_Bool eolian_all_eo_files_parse();
/*
* @brief Show information about a given class.
*

View File

@ -1303,3 +1303,18 @@ EAPI Eina_Bool eolian_eo_file_parse(const char *filepath)
return EINA_TRUE;
}
static Eina_Bool _file_parse(const Eina_Hash *hash EINA_UNUSED, const void *key EINA_UNUSED, void *data, void *fdata)
{
Eina_Bool *ret = fdata;
if (*ret) *ret = eolian_eo_file_parse(data);
return *ret;
}
EAPI Eina_Bool
eolian_all_eo_files_parse()
{
Eina_Bool ret = EINA_TRUE;
eina_hash_foreach(_filenames, _file_parse, &ret);
return ret;
}