X-Git-Url: http://git.maemo.org/git/?a=blobdiff_plain;f=src%2Fmodest-account-protocol.h;h=cf70de5cca9ce54729ace7799f1ec37c030c8ef6;hb=a89eb5f92ef6a7fed000d6c370938317c084f241;hp=18ae25a2dd95fc82bd320b6b1860b79aa5c1e696;hpb=d669ccb2e5fbf01c444fafba7f9c408609aa55bd;p=modest diff --git a/src/modest-account-protocol.h b/src/modest-account-protocol.h index 18ae25a..cf70de5 100644 --- a/src/modest-account-protocol.h +++ b/src/modest-account-protocol.h @@ -53,6 +53,13 @@ G_BEGIN_DECLS typedef struct _ModestAccountProtocol ModestAccountProtocol; typedef struct _ModestAccountProtocolClass ModestAccountProtocolClass; +typedef enum { + MODEST_ACCOUNT_PROTOCOL_ICON_MAILBOX = 0, + MODEST_ACCOUNT_PROTOCOL_ICON_PROTOCOL, + MODEST_ACCOUNT_PROTOCOL_ICON_ACCOUNT, + MODEST_ACCOUNT_PROTOCOL_ICON_FOLDER, +} ModestAccountProtocolIconType; + typedef void (*ModestAccountProtocolCheckSupportFunc) (ModestAccountProtocol *self, gboolean supported, gpointer userdata); @@ -75,7 +82,27 @@ struct _ModestAccountProtocolClass { void (*check_support) (ModestAccountProtocol *self, ModestAccountProtocolCheckSupportFunc func, gpointer userdata); gchar * (*get_from) (ModestAccountProtocol *self, const gchar *account_id, const gchar *mailbox); ModestPairList * (*get_from_list) (ModestAccountProtocol *self, const gchar *account_id); - gchar * (*get_signature) (ModestAccountProtocol *self, const gchar *account_id, const gchar *mailbox); + gchar * (*get_signature) (ModestAccountProtocol *self, const gchar *account_id, const gchar *mailbox, gboolean *has_signature); + const GdkPixbuf * (*get_icon) (ModestAccountProtocol *self, ModestAccountProtocolIconType icon_type, + GObject *object, guint icon_size); + + /* Padding for future expansions */ + void (*_reserved1) (void); + void (*_reserved2) (void); + void (*_reserved3) (void); + void (*_reserved4) (void); + void (*_reserved5) (void); + void (*_reserved6) (void); + void (*_reserved7) (void); + void (*_reserved8) (void); + void (*_reserved9) (void); + void (*_reserved10) (void); + void (*_reserved11) (void); + void (*_reserved12) (void); + void (*_reserved13) (void); + void (*_reserved14) (void); + void (*_reserved15) (void); + void (*_reserved16) (void); }; /** @@ -360,7 +387,24 @@ ModestPairList *modest_account_protocol_get_from_list (ModestAccountProtocol *se */ gchar *modest_account_protocol_get_signature (ModestAccountProtocol *self, const gchar *account_id, - const gchar *mailbox); + const gchar *mailbox, + gboolean *has_signature); + +/** + * modest_account_protocol_get_icon: + * @self: a #ModestAccountProtocl + * @icon_type: a #ModestAccountProtocolIconType + * @object: a #GObject + * @icon_size: the icon size to get + * + * Returns a @self owned #GdkPixbuf with the icon for @icon_type and @object. @object type + * should match @icon_type. + * + * Returns: a #GdkPixbuf (don't free or manipulate this, just copy) + */ +const GdkPixbuf * modest_account_protocol_get_icon (ModestAccountProtocol *self, ModestAccountProtocolIconType icon_type, + GObject *object, guint icon_size); + G_END_DECLS