aboutsummaryrefslogtreecommitdiff
path: root/src/seen-db.c
blob: dd164f8482c870ffe941e606b23198a3de06abf2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#include "seen-db.h"

SeenDB *
seen_db_init(void)
{
	GHashTable * hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);

	return hash;
}

void
seen_db_add (SeenDB * seendb, const gchar * desktop)
{
	g_hash_table_insert(seendb,
	                    g_strdup(desktop),
	                    GINT_TO_POINTER(TRUE));

	return;
}

gboolean
seen_db_seen (SeenDB * seendb, const gchar * desktop)
{
	return GPOINTER_TO_INT(g_hash_table_lookup(seendb, desktop));
}