aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
Diffstat (limited to 'e-util')
-rw-r--r--e-util/ChangeLog6
-rw-r--r--e-util/e-pilot-map.c13
-rw-r--r--e-util/e-pilot-map.h2
3 files changed, 20 insertions, 1 deletions
diff --git a/e-util/ChangeLog b/e-util/ChangeLog
index 1b7dcf1da4..178ec7aa8b 100644
--- a/e-util/ChangeLog
+++ b/e-util/ChangeLog
@@ -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
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
index 93ec68c050..a113427da3 100644
--- a/e-util/e-pilot-map.c
+++ b/e-util/e-pilot-map.c
@@ -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)
{
diff --git a/e-util/e-pilot-map.h b/e-util/e-pilot-map.h
index ddb1e043c8..ff02994645 100644
--- a/e-util/e-pilot-map.h
+++ b/e-util/e-pilot-map.h
@@ -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 */