update proto
2001-10-27 JP Rosevear <jpr@ximian.com> * e-pilot-map.h: update proto * e-pilot-map.c (e_pilot_map_lookup_pid): touch the nodes if indicated and found (e_pilot_map_lookup_uid): ditto svn path=/trunk/; revision=14208
This commit is contained in:
@ -1,3 +1,11 @@
|
|||||||
|
2001-10-27 JP Rosevear <jpr@ximian.com>
|
||||||
|
|
||||||
|
* e-pilot-map.h: update proto
|
||||||
|
|
||||||
|
* e-pilot-map.c (e_pilot_map_lookup_pid): touch the nodes if
|
||||||
|
indicated and found
|
||||||
|
(e_pilot_map_lookup_uid): ditto
|
||||||
|
|
||||||
2001-10-26 JP Rosevear <jpr@ximian.com>
|
2001-10-26 JP Rosevear <jpr@ximian.com>
|
||||||
|
|
||||||
* e-pilot-map.c (real_e_pilot_map_insert): take an extra param on
|
* e-pilot-map.c (real_e_pilot_map_insert): take an extra param on
|
||||||
|
@ -258,7 +258,7 @@ e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid)
|
|||||||
|
|
||||||
|
|
||||||
guint32
|
guint32
|
||||||
e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
|
e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch)
|
||||||
{
|
{
|
||||||
EPilotMapUidNode *unode = NULL;
|
EPilotMapUidNode *unode = NULL;
|
||||||
|
|
||||||
@ -270,11 +270,20 @@ e_pilot_map_lookup_pid (EPilotMap *map, const char *uid)
|
|||||||
if (unode == NULL)
|
if (unode == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (touch) {
|
||||||
|
EPilotMapPidNode *pnode = NULL;
|
||||||
|
|
||||||
|
pnode = g_hash_table_lookup (map->pid_map, &unode->pid);
|
||||||
|
if (pnode != NULL)
|
||||||
|
pnode->touched = TRUE;
|
||||||
|
unode->touched = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return unode->pid;
|
return unode->pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *
|
const char *
|
||||||
e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid)
|
e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid, gboolean touch)
|
||||||
{
|
{
|
||||||
EPilotMapPidNode *pnode = NULL;
|
EPilotMapPidNode *pnode = NULL;
|
||||||
|
|
||||||
@ -285,6 +294,16 @@ e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid)
|
|||||||
if (pnode == NULL)
|
if (pnode == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (touch) {
|
||||||
|
EPilotMapUidNode *unode = NULL;
|
||||||
|
|
||||||
|
unode = g_hash_table_lookup (map->uid_map, pnode->uid);
|
||||||
|
g_assert (unode != NULL);
|
||||||
|
|
||||||
|
unode->touched = TRUE;
|
||||||
|
pnode->touched = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
return pnode->uid;
|
return pnode->uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,8 +45,8 @@ void e_pilot_map_insert (EPilotMap *map, guint32 pid, const char *uid, gboolean
|
|||||||
void e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid);
|
void e_pilot_map_remove_by_pid (EPilotMap *map, guint32 pid);
|
||||||
void e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid);
|
void e_pilot_map_remove_by_uid (EPilotMap *map, const char *uid);
|
||||||
|
|
||||||
guint32 e_pilot_map_lookup_pid (EPilotMap *map, const char *uid);
|
guint32 e_pilot_map_lookup_pid (EPilotMap *map, const char *uid, gboolean touch);
|
||||||
const char * e_pilot_map_lookup_uid (EPilotMap *map, guint32 pid);
|
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_read (const char *filename, EPilotMap **map);
|
||||||
int e_pilot_map_write (const char *filename, EPilotMap *map);
|
int e_pilot_map_write (const char *filename, EPilotMap *map);
|
||||||
|
Reference in New Issue
Block a user