| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
#include <config.h> |
|---|
| 21 |
|
|---|
| 22 |
#include <glib.h> |
|---|
| 23 |
#include <glib/gi18n-lib.h> |
|---|
| 24 |
|
|---|
| 25 |
#include <tny-tp-mail-notifier.h> |
|---|
| 26 |
|
|---|
| 27 |
|
|---|
| 28 |
static GObjectClass *parent_class; |
|---|
| 29 |
|
|---|
| 30 |
|
|---|
| 31 |
typedef struct _TnyTpMailNotifierPriv TnyTpMailNotifierPriv; |
|---|
| 32 |
|
|---|
| 33 |
struct _TnyTpMailNotifierPriv |
|---|
| 34 |
{ |
|---|
| 35 |
int *thing; |
|---|
| 36 |
}; |
|---|
| 37 |
|
|---|
| 38 |
#define TNY_TP_MAIL_NOTIFIER_GET_PRIVATE(o) \ |
|---|
| 39 |
(G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_TP_MAIL_NOTIFIER, TnyTpMailNotifierPriv)) |
|---|
| 40 |
|
|---|
| 41 |
|
|---|
| 42 |
static void |
|---|
| 43 |
tny_tp_mail_notifier_finalize (GObject *object) |
|---|
| 44 |
{ |
|---|
| 45 |
|
|---|
| 46 |
|
|---|
| 47 |
parent_class->finalize (object); |
|---|
| 48 |
|
|---|
| 49 |
return; |
|---|
| 50 |
} |
|---|
| 51 |
|
|---|
| 52 |
|
|---|
| 53 |
static void |
|---|
| 54 |
tny_tp_mail_notifier_class_init (TnyTpMailNotifierClass *klass) |
|---|
| 55 |
{ |
|---|
| 56 |
GObjectClass *object_class; |
|---|
| 57 |
|
|---|
| 58 |
object_class = (GObjectClass *)klass; |
|---|
| 59 |
parent_class = g_type_class_peek_parent (klass); |
|---|
| 60 |
object_class->finalize = tny_tp_mail_notifier_finalize; |
|---|
| 61 |
g_type_class_add_private (object_class, sizeof (TnyTpMailNotifierPriv)); |
|---|
| 62 |
|
|---|
| 63 |
return; |
|---|
| 64 |
} |
|---|
| 65 |
|
|---|
| 66 |
static void |
|---|
| 67 |
tny_tp_mail_notifier_init (TnySimpleList *self) |
|---|
| 68 |
{ |
|---|
| 69 |
TnyTpMailNotifierPriv *priv = TNY_TP_MAIL_NOTIFIER_GET_PRIVATE (self); |
|---|
| 70 |
|
|---|
| 71 |
priv->thing = NULL; |
|---|
| 72 |
|
|---|
| 73 |
return; |
|---|
| 74 |
} |
|---|
| 75 |
|
|---|
| 76 |
|
|---|
| 77 |
|
|---|
| 78 |
|
|---|
| 79 |
|
|---|
| 80 |
|
|---|
| 81 |
|
|---|
| 82 |
|
|---|
| 83 |
|
|---|
| 84 |
|
|---|
| 85 |
TnyTpMailNotifier* |
|---|
| 86 |
tny_tp_mail_notifier_new (TnyFolder *folder) |
|---|
| 87 |
{ |
|---|
| 88 |
TnyTpMailNotifier *self = g_object_new (TNY_TYPE_TP_MAIL_NOTIFIER, NULL); |
|---|
| 89 |
|
|---|
| 90 |
return self; |
|---|
| 91 |
} |
|---|
| 92 |
|
|---|
| 93 |
static gpointer |
|---|
| 94 |
tny_tp_mail_notifier_register_type (gpointer notused) |
|---|
| 95 |
{ |
|---|
| 96 |
GType object_type = 0; |
|---|
| 97 |
|
|---|
| 98 |
static const GTypeInfo object_info = |
|---|
| 99 |
{ |
|---|
| 100 |
sizeof (TnyTpMailNotifierClass), |
|---|
| 101 |
NULL, |
|---|
| 102 |
NULL, |
|---|
| 103 |
(GClassInitFunc) tny_tp_mail_notifier_class_init, |
|---|
| 104 |
NULL, |
|---|
| 105 |
NULL, |
|---|
| 106 |
sizeof (TnyTpMailNotifier), |
|---|
| 107 |
0, |
|---|
| 108 |
(GInstanceInitFunc) tny_tp_mail_notifier_init, |
|---|
| 109 |
NULL |
|---|
| 110 |
}; |
|---|
| 111 |
|
|---|
| 112 |
object_type = g_type_register_static (G_TYPE_OBJECT, |
|---|
| 113 |
"TnyTpMailNotifier", &object_info, 0); |
|---|
| 114 |
|
|---|
| 115 |
return GUINT_TO_POINTER (object_type); |
|---|
| 116 |
} |
|---|
| 117 |
|
|---|
| 118 |
GType |
|---|
| 119 |
tny_tp_mail_notifier_get_type (void) |
|---|
| 120 |
{ |
|---|
| 121 |
static GOnce once = G_ONCE_INIT; |
|---|
| 122 |
g_once (&once, tny_tp_mail_notifier_register_type, NULL); |
|---|
| 123 |
return GPOINTER_TO_UINT (once.retval); |
|---|
| 124 |
} |
|---|