2 #ifndef __EGG_RECENT_ITEM_H__
3 #define __EGG_RECENT_ITEM_H__
7 #include <glib-object.h>
11 #define EGG_TYPE_RECENT_ITEM (egg_recent_item_get_type ())
13 #define EGG_RECENT_ITEM_LIST_UNREF(list) \
14 g_list_foreach (list, (GFunc)egg_recent_item_unref, NULL); \
17 typedef struct _EggRecentItem EggRecentItem;
19 struct _EggRecentItem {
20 /* do not access any of these directly */
25 gboolean private_data;
31 guint mime_type_is_explicit : 1;
34 GType egg_recent_item_get_type (void) G_GNUC_CONST;
37 EggRecentItem * egg_recent_item_new (void);
39 EggRecentItem * egg_recent_item_ref (EggRecentItem *item);
40 EggRecentItem * egg_recent_item_unref (EggRecentItem *item);
42 /* automatically fetches the mime type, etc */
43 EggRecentItem * egg_recent_item_new_from_uri (const gchar *uri);
45 gboolean egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri);
46 gchar * egg_recent_item_get_uri (const EggRecentItem *item);
47 gchar * egg_recent_item_get_uri_utf8 (const EggRecentItem *item);
48 gchar * egg_recent_item_get_uri_for_display (const EggRecentItem *item);
49 gchar * egg_recent_item_get_short_name (const EggRecentItem *item);
51 void egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime);
52 gchar * egg_recent_item_get_mime_type (EggRecentItem *item);
54 void egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp);
55 time_t egg_recent_item_get_timestamp (const EggRecentItem *item);
57 G_CONST_RETURN gchar *egg_recent_item_peek_uri (const EggRecentItem *item);
61 G_CONST_RETURN GList * egg_recent_item_get_groups (const EggRecentItem *item);
63 gboolean egg_recent_item_in_group (const EggRecentItem *item,
64 const gchar *group_name);
66 void egg_recent_item_add_group (EggRecentItem *item,
67 const gchar *group_name);
69 void egg_recent_item_remove_group (EggRecentItem *item,
70 const gchar *group_name);
72 void egg_recent_item_set_private (EggRecentItem *item,
75 gboolean egg_recent_item_get_private (const EggRecentItem *item);
80 #endif /* __EGG_RECENT_ITEM_H__ */