aboutsummaryrefslogtreecommitdiffstats
path: root/e-util/e-pilot-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'e-util/e-pilot-map.c')
-rw-r--r--e-util/e-pilot-map.c25
1 files changed, 24 insertions, 1 deletions
diff --git a/e-util/e-pilot-map.c b/e-util/e-pilot-map.c
index 4b364f39bd..3a1b660c60 100644
--- a/e-util/e-pilot-map.c
+++ b/e-util/e-pilot-map.c
@@ -98,7 +98,7 @@ map_write_foreach (gpointer key, gpointer value, gpointer data)
}
gboolean
-e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pilot_id)
+e_pilot_map_pid_is_archived (EPilotMap *map, guint32 pid)
{
return FALSE;
}
@@ -122,6 +122,29 @@ e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean archi
g_hash_table_insert (map->uid_map, new_uid, new_pid);
}
+guint32
+e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
+{
+ guint32 *pid;
+
+ pid = g_hash_table_lookup (map->uid_map, uid);
+
+ if (pid == NULL)
+ return 0;
+
+ return *pid;
+}
+
+const char *
+e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid)
+{
+ const char *uid;
+
+ uid = g_hash_table_lookup (map->pid_map, &pid);
+
+ return uid;
+}
+
int
e_pilot_map_read (const char *filename, EPilotMap **map)
{