cache

cache

Synopsis

#define             CACHE_SIGNATURE
#define             CACHE_VERSION
#define             CACHE_FILE
#define             CACHE_START_OFFSET
gchar*              get_cache_file                      (gint mode);
gint                cache_get_number_of_plugins         (FILE *f);
HildonIMPluginInfo* cache_get_iminfo                    (FILE *f);
GSList*             cache_get_languages                 (FILE *f);
FILE*               init_cache                          (void);
void                free_language_list                  (GSList *list);
gchar*              cache_get_soname                    (FILE *f);
void                free_iminfo                         (HildonIMPluginInfo *info);

Description

Details

CACHE_SIGNATURE

#define CACHE_SIGNATURE   "HIM"


CACHE_VERSION

#define CACHE_VERSION     0


CACHE_FILE

#define CACHE_FILE        "hildon-im-plugins.cache"


CACHE_START_OFFSET

#define CACHE_START_OFFSET 4


get_cache_file ()

gchar*              get_cache_file                      (gint mode);

Gets the location of the desired file/folder.

mode : One of CACHE_FILENAME, CACHE_FILENAME_TMP or CACHE_DIRECTORY.
Returns : a newly allocated string with the desired location.

cache_get_number_of_plugins ()

gint                cache_get_number_of_plugins         (FILE *f);

Gets the number of plugins stored in the cache file.

f : the cache file
Returns : the number of plugins.

cache_get_iminfo ()

HildonIMPluginInfo* cache_get_iminfo                    (FILE *f);

f : the cache file
Returns :

cache_get_languages ()

GSList*             cache_get_languages                 (FILE *f);

Gets the languages from a cache file.

f : the cache file
Returns : list with the language codes.

init_cache ()

FILE*               init_cache                          (void);

Gets the cache file.

Returns : the cache file.

free_language_list ()

void                free_language_list                  (GSList *list);

Convenience function to free a list of gchar*.

list : the list to be freed

cache_get_soname ()

gchar*              cache_get_soname                    (FILE *f);

Gets the name of the .so file associated with the cache.

f : the cache file
Returns : the name of the .so file.

free_iminfo ()

void                free_iminfo                         (HildonIMPluginInfo *info);

Frees a HildonIMPluginInfo.

info : struct of type HildonIMPluginInfo to be freed.