clear all info from the map
2001-12-17 JP Rosevear <jpr@ximian.com> * e-pilot-map.c (e_pilot_map_clear): clear all info from the map * e-pilot-map.h: add proto svn path=/trunk/; revision=15177
This commit is contained in:
@ -1,3 +1,9 @@
|
||||
2001-12-17 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* e-pilot-map.c (e_pilot_map_clear): clear all info from the map
|
||||
|
||||
* e-pilot-map.h: add proto
|
||||
|
||||
2001-12-10 JP Rosevear <jpr@ximian.com>
|
||||
|
||||
* e-pilot-util.c (e_pilot_utf8_to_pchar): use UTF-8 instead of
|
||||
|
@ -275,7 +275,6 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
|
||||
EPilotMapPidNode *pnode = NULL;
|
||||
EPilotMapUidNode *unode = NULL;
|
||||
gpointer pkey, ukey;
|
||||
gboolean found;
|
||||
|
||||
g_return_if_fail (map != NULL);
|
||||
g_return_if_fail (uid != NULL);
|
||||
@ -425,6 +424,18 @@ foreach_remove (gpointer key, gpointer value, gpointer data)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
void
|
||||
e_pilot_map_clear (EPilotMap *map)
|
||||
{
|
||||
g_return_if_fail (map != NULL);
|
||||
|
||||
g_hash_table_foreach_remove (map->pid_map, foreach_remove, NULL);
|
||||
g_hash_table_foreach_remove (map->uid_map, foreach_remove, NULL);
|
||||
|
||||
map->since = 0;
|
||||
map->write_touched_only = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
e_pilot_map_destroy (EPilotMap *map)
|
||||
{
|
||||
|
@ -51,6 +51,8 @@ const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch
|
||||
int e_pilot_map_read (const char *filename, EPilotMap **map);
|
||||
int e_pilot_map_write (const char *filename, EPilotMap *map);
|
||||
|
||||
void e_pilot_map_clear (EPilotMap *map);
|
||||
|
||||
void e_pilot_map_destroy (EPilotMap *map);
|
||||
|
||||
#endif /* E_PILOT_MAP_H */
|
||||
|
Reference in New Issue
Block a user