00001
00002 #ifndef __EGG_RECENT_ITEM_H__
00003 #define __EGG_RECENT_ITEM_H__
00004
00005 #include <time.h>
00006 #include <glib.h>
00007 #include <glib-object.h>
00008
00009 G_BEGIN_DECLS
00010
00011 #define EGG_TYPE_RECENT_ITEM (egg_recent_item_get_type ())
00012
00013 #define EGG_RECENT_ITEM_LIST_UNREF(list) \
00014 g_list_foreach (list, (GFunc)egg_recent_item_unref, NULL); \
00015 g_list_free (list);
00016
00017 typedef struct _EggRecentItem EggRecentItem;
00018
00019 struct _EggRecentItem {
00020
00021 gchar *uri;
00022 gchar *mime_type;
00023 time_t timestamp;
00024
00025 gboolean private_data;
00026
00027 GList *groups;
00028
00029 int refcount;
00030 };
00031
00032 GType egg_recent_item_get_type (void) G_GNUC_CONST;
00033
00034
00035 EggRecentItem * egg_recent_item_new (void);
00036
00037 EggRecentItem * egg_recent_item_ref (EggRecentItem *item);
00038 EggRecentItem * egg_recent_item_unref (EggRecentItem *item);
00039
00040
00041 EggRecentItem * egg_recent_item_new_from_uri (const gchar *uri);
00042
00043 gboolean egg_recent_item_set_uri (EggRecentItem *item, const gchar *uri);
00044 gchar * egg_recent_item_get_uri (const EggRecentItem *item);
00045 gchar * egg_recent_item_get_uri_utf8 (const EggRecentItem *item);
00046 gchar * egg_recent_item_get_uri_for_display (const EggRecentItem *item);
00047
00048 void egg_recent_item_set_mime_type (EggRecentItem *item, const gchar *mime);
00049 gchar * egg_recent_item_get_mime_type (const EggRecentItem *item);
00050
00051 void egg_recent_item_set_timestamp (EggRecentItem *item, time_t timestamp);
00052 time_t egg_recent_item_get_timestamp (const EggRecentItem *item);
00053
00054 G_CONST_RETURN gchar *egg_recent_item_peek_uri (const EggRecentItem *item);
00055
00056
00057
00058 G_CONST_RETURN GList * egg_recent_item_get_groups (const EggRecentItem *item);
00059
00060 gboolean egg_recent_item_in_group (const EggRecentItem *item,
00061 const gchar *group_name);
00062
00063 void egg_recent_item_add_group (EggRecentItem *item,
00064 const gchar *group_name);
00065
00066 void egg_recent_item_remove_group (EggRecentItem *item,
00067 const gchar *group_name);
00068
00069 void egg_recent_item_set_private (EggRecentItem *item,
00070 gboolean priv);
00071
00072 gboolean egg_recent_item_get_private (const EggRecentItem *item);
00073
00074
00075 G_END_DECLS
00076
00077 #endif