2008-08-23 16:32:53 +00:00
|
|
|
/*
|
|
|
|
Copyright (C) 2008 Christian Dywan <christian@twotoasts.de>
|
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or
|
|
|
|
modify it under the terms of the GNU Lesser General Public
|
|
|
|
License as published by the Free Software Foundation; either
|
|
|
|
version 2.1 of the License, or (at your option) any later version.
|
|
|
|
|
|
|
|
See the file COPYING for the full license text.
|
|
|
|
*/
|
|
|
|
|
2008-08-25 23:19:38 +00:00
|
|
|
#ifndef __KATZE_ITEM_H__
|
|
|
|
#define __KATZE_ITEM_H__
|
2008-08-23 16:32:53 +00:00
|
|
|
|
|
|
|
#include <glib-object.h>
|
|
|
|
|
|
|
|
G_BEGIN_DECLS
|
|
|
|
|
|
|
|
#define KATZE_TYPE_ITEM \
|
|
|
|
(katze_item_get_type ())
|
|
|
|
#define KATZE_ITEM(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_CAST ((obj), KATZE_TYPE_ITEM, KatzeItem))
|
|
|
|
#define KATZE_ITEM_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_CAST ((klass), KATZE_TYPE_ITEM, KatzeItemClass))
|
|
|
|
#define KATZE_IS_ITEM(obj) \
|
|
|
|
(G_TYPE_CHECK_INSTANCE_TYPE ((obj), KATZE_TYPE_ITEM))
|
|
|
|
#define KATZE_IS_ITEM_CLASS(klass) \
|
|
|
|
(G_TYPE_CHECK_CLASS_TYPE ((klass), KATZE_TYPE_ITEM))
|
|
|
|
#define KATZE_ITEM_GET_CLASS(obj) \
|
|
|
|
(G_TYPE_INSTANCE_GET_CLASS ((obj), KATZE_TYPE_ITEM, KatzeItemClass))
|
|
|
|
|
|
|
|
typedef struct _KatzeItem KatzeItem;
|
|
|
|
typedef struct _KatzeItemClass KatzeItemClass;
|
|
|
|
|
|
|
|
struct _KatzeItem
|
|
|
|
{
|
|
|
|
GObject parent_instance;
|
|
|
|
|
|
|
|
gchar* name;
|
|
|
|
gchar* text;
|
|
|
|
gchar* uri;
|
|
|
|
gchar* icon;
|
|
|
|
gchar* token;
|
2008-10-15 23:31:47 +00:00
|
|
|
gint64 added;
|
2009-07-04 22:58:59 +00:00
|
|
|
GHashTable* metadata;
|
2008-10-01 02:00:16 +00:00
|
|
|
|
|
|
|
KatzeItem* parent;
|
2008-08-23 16:32:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct _KatzeItemClass
|
|
|
|
{
|
|
|
|
GObjectClass parent_class;
|
2009-01-26 02:41:12 +00:00
|
|
|
|
|
|
|
gpointer
|
|
|
|
(*copy) (KatzeItem* item);
|
2008-08-23 16:32:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
GType
|
2010-01-16 06:01:34 +00:00
|
|
|
katze_item_get_type (void) G_GNUC_CONST;
|
2008-08-23 16:32:53 +00:00
|
|
|
|
|
|
|
KatzeItem*
|
|
|
|
katze_item_new (void);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_name (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_name (KatzeItem* item,
|
|
|
|
const gchar* name);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_text (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_text (KatzeItem* item,
|
|
|
|
const gchar* text);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_uri (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_uri (KatzeItem* item,
|
|
|
|
const gchar* uri);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_icon (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_icon (KatzeItem* item,
|
|
|
|
const gchar* icon);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_token (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_token (KatzeItem* item,
|
|
|
|
const gchar* token);
|
|
|
|
|
2008-10-15 23:31:47 +00:00
|
|
|
gint64
|
2008-10-07 00:19:33 +00:00
|
|
|
katze_item_get_added (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_added (KatzeItem* item,
|
2008-10-15 23:31:47 +00:00
|
|
|
gint64 added);
|
2008-10-07 00:19:33 +00:00
|
|
|
|
2009-07-04 22:58:59 +00:00
|
|
|
GList*
|
|
|
|
katze_item_get_meta_keys (KatzeItem* item);
|
|
|
|
|
|
|
|
const gchar*
|
|
|
|
katze_item_get_meta_string (KatzeItem* item,
|
|
|
|
const gchar* key);
|
|
|
|
|
2009-07-06 17:28:28 +00:00
|
|
|
void
|
|
|
|
katze_item_set_meta_string (KatzeItem* item,
|
|
|
|
const gchar* key,
|
|
|
|
const gchar* value);
|
|
|
|
|
2009-07-04 22:58:59 +00:00
|
|
|
gint64
|
|
|
|
katze_item_get_meta_integer (KatzeItem* item,
|
|
|
|
const gchar* key);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_meta_integer (KatzeItem* item,
|
|
|
|
const gchar* key,
|
|
|
|
gint64 value);
|
|
|
|
|
2008-10-01 02:00:16 +00:00
|
|
|
gpointer
|
|
|
|
katze_item_get_parent (KatzeItem* item);
|
|
|
|
|
|
|
|
void
|
|
|
|
katze_item_set_parent (KatzeItem* item,
|
|
|
|
gpointer parent);
|
|
|
|
|
2009-01-26 02:41:12 +00:00
|
|
|
KatzeItem*
|
|
|
|
katze_item_copy (KatzeItem* item);
|
|
|
|
|
2008-08-23 16:32:53 +00:00
|
|
|
G_END_DECLS
|
|
|
|
|
|
|
|
#endif /* __MIDORI_WEB_ITEM_H__ */
|