Changeset 19

Show
Ignore:
Timestamp:
02/08/06 00:42:12
Author:
pvanhoof
Message:

Rename msg_account to account

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/libtinymail-camel/tny-camel-session.c

    r15 r19  
    3939        CamelSession *session; 
    4040        GetPassFunc func; 
    41         TnyMsgAccountIface *account; 
     41        TnyAccountIface *account; 
    4242 
    4343} PrivPassFunc; 
     
    4747        CamelSession *session; 
    4848        ForgetPassFunc func; 
    49         TnyMsgAccountIface *account; 
     49        TnyAccountIface *account; 
    5050 
    5151} PrivForgetPassFunc; 
     
    5353 
    5454void 
    55 tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyMsgAccountIface *account, ForgetPassFunc get_forget_pass_func) 
     55tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyAccountIface *account, ForgetPassFunc get_forget_pass_func) 
    5656{ 
    5757        GList *copy = forget_password_funcs, *mark_del = NULL; 
     
    102102 
    103103void 
    104 tny_camel_session_set_pass_func (TnyCamelSession *self, TnyMsgAccountIface *account, GetPassFunc get_pass_func) 
     104tny_camel_session_set_pass_func (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func) 
    105105{ 
    106106        GList *copy = password_funcs, *mark_del = NULL; 
     
    169169        GList *copy = password_funcs; 
    170170        GetPassFunc func; 
    171         TnyMsgAccountIface *account; 
     171        TnyAccountIface *account; 
    172172        gboolean found = FALSE; 
    173173 
     
    198198        GList *copy = forget_password_funcs; 
    199199        ForgetPassFunc func; 
    200         TnyMsgAccountIface *account; 
     200        TnyAccountIface *account; 
    201201        gboolean found = FALSE; 
    202202 
  • trunk/libtinymail-camel/tny-camel-session.h

    r15 r19  
    4949        CamelSessionClass parent_class; 
    5050 
    51         void        (*set_pass_func_func) (TnyCamelSession *self, TnyMsgAccountIface *account, GetPassFunc get_pass_func); 
     51        void        (*set_pass_func_func) (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func); 
    5252        GetPassFunc (*get_pass_func_func) (TnyCamelSession *self); 
    5353}; 
     
    5656TnyCamelSession*  tny_camel_session_new           (void); 
    5757 
    58 void              tny_camel_session_set_pass_func (TnyCamelSession *self, TnyMsgAccountIface *account, GetPassFunc get_pass_func); 
     58void              tny_camel_session_set_pass_func (TnyCamelSession *self, TnyAccountIface *account, GetPassFunc get_pass_func); 
    5959GetPassFunc       tny_camel_session_get_pass_func (TnyCamelSession *self); 
    6060 
    6161 
    62 void              tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyMsgAccountIface *account, ForgetPassFunc get_forget_pass_func); 
     62void              tny_camel_session_set_forget_pass_func (TnyCamelSession *self, TnyAccountIface *account, ForgetPassFunc get_forget_pass_func); 
    6363ForgetPassFunc    tny_camel_session_get_forget_pass_func (TnyCamelSession *self); 
    6464 
  • trunk/libtinymail-camel/tny-msg-folder-priv.h

    r5 r19  
    2222#include <glib.h> 
    2323#include <camel/camel-folder.h> 
    24 #include <tny-msg-account-iface.h> 
     24#include <tny-account-iface.h> 
    2525#include <tny-msg-folder-iface.h> 
    2626 
     
    3434        CamelFolder *folder; 
    3535        gchar *folder_name; 
    36         TnyMsgAccountIface *account; 
     36        TnyAccountIface *account; 
    3737        GList *folders; 
    3838}; 
  • trunk/libtinymail-camel/tny-msg-folder.c

    r12 r19  
    2424#include <tny-msg.h> 
    2525#include <tny-msg-header.h> 
    26 #include <tny-msg-account-iface.h> 
    27 #include <tny-msg-account.h> 
     26#include <tny-account-iface.h> 
     27#include <tny-account.h> 
    2828 
    2929#include <camel/camel-folder.h> 
     
    3737 
    3838#include <tny-camel-session.h> 
    39 #include "tny-msg-account-priv.h" 
     39#include "tny-account-priv.h" 
    4040#include "tny-msg-folder-priv.h" 
    4141#include <camel/camel.h> 
     
    5555        { 
    5656                CamelException ex; 
    57                 CamelStore *store = (CamelStore*) _tny_msg_account_get_service  
    58                         (TNY_MSG_ACCOUNT (priv->account)); 
     57                CamelStore *store = (CamelStore*) _tny_account_get_service  
     58                        (TNY_ACCOUNT (priv->account)); 
    5959 
    6060                priv->folder = camel_store_get_folder (store, priv->folder_name, 0, &ex); 
     
    9292} 
    9393 
    94 const TnyMsgAccountIface*   
     94const TnyAccountIface*   
    9595tny_msg_folder_get_account (TnyMsgFolderIface *self) 
    9696{ 
     
    101101 
    102102void 
    103 tny_msg_folder_set_account (TnyMsgFolderIface *self, const TnyMsgAccountIface *account) 
    104 { 
    105         TnyMsgFolderPriv *priv = TNY_MSG_FOLDER_GET_PRIVATE (TNY_MSG_FOLDER (self)); 
    106  
    107         priv->account = TNY_MSG_ACCOUNT_IFACE (account); 
     103tny_msg_folder_set_account (TnyMsgFolderIface *self, const TnyAccountIface *account) 
     104{ 
     105        TnyMsgFolderPriv *priv = TNY_MSG_FOLDER_GET_PRIVATE (TNY_MSG_FOLDER (self)); 
     106 
     107        priv->account = TNY_ACCOUNT_IFACE (account); 
    108108 
    109109        return; 
  • trunk/libtinymail/Makefile.am

    r6 r19  
    1010        tny-msg-header-iface.h          \ 
    1111        tny-msg-iface.h                 \ 
    12         tny-msg-account-iface.h               \        
     12        tny-account-iface.h           \        
    1313        tny-msg-header-proxy.h 
    1414 
     
    2222        tny-msg-attachment-iface.c      \ 
    2323        tny-msg-folder-iface.c          \ 
    24         tny-msg-account-iface.c               \ 
     24        tny-account-iface.c           \ 
    2525        tny-msg-header-proxy.c   
    2626 
  • trunk/libtinymail/tny-account-iface.c

    r17 r19  
    1818 */ 
    1919 
    20 #include <tny-msg-account-iface.h> 
     20#include <tny-account-iface.h> 
    2121 
    2222void 
    23 tny_msg_account_iface_set_forget_pass_func (TnyMsgAccountIface *self, ForgetPassFunc get_forget_pass_func) 
     23tny_account_iface_set_forget_pass_func (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func) 
    2424{ 
    25         TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_forget_pass_func_func (self, get_forget_pass_func); 
     25        TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_forget_pass_func_func (self, get_forget_pass_func); 
    2626        return; 
    2727} 
    2828 
    2929ForgetPassFunc 
    30 tny_msg_account_iface_get_forget_pass_func (TnyMsgAccountIface *self) 
     30tny_account_iface_get_forget_pass_func (TnyAccountIface *self) 
    3131{ 
    32         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_forget_pass_func_func (self); 
     32        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_forget_pass_func_func (self); 
    3333} 
    3434 
    3535const GList* 
    36 tny_msg_account_iface_get_folders (TnyMsgAccountIface *self) 
     36tny_account_iface_get_folders (TnyAccountIface *self) 
    3737{ 
    38         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_folders_func (self); 
     38        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_folders_func (self); 
    3939} 
    4040 
    4141void 
    42 tny_msg_account_iface_set_proto (TnyMsgAccountIface *self, const gchar *proto) 
     42tny_account_iface_set_proto (TnyAccountIface *self, const gchar *proto) 
    4343{ 
    44         TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_proto_func (self, proto); 
     44        TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_proto_func (self, proto); 
    4545        return; 
    4646} 
    4747 
    4848void 
    49 tny_msg_account_iface_set_user (TnyMsgAccountIface *self, const gchar *user) 
     49tny_account_iface_set_user (TnyAccountIface *self, const gchar *user) 
    5050{ 
    51         TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_user_func (self, user); 
     51        TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_user_func (self, user); 
    5252        return; 
    5353} 
    5454 
    5555void 
    56 tny_msg_account_iface_set_hostname (TnyMsgAccountIface *self, const gchar *host) 
     56tny_account_iface_set_hostname (TnyAccountIface *self, const gchar *host) 
    5757{ 
    58         TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_hostname_func (self, host); 
     58        TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_hostname_func (self, host); 
    5959        return; 
    6060} 
    6161 
    6262void 
    63 tny_msg_account_iface_set_pass_func (TnyMsgAccountIface *self, GetPassFunc get_pass_func) 
     63tny_account_iface_set_pass_func (TnyAccountIface *self, GetPassFunc get_pass_func) 
    6464{ 
    65         TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->set_pass_func_func (self, get_pass_func); 
     65        TNY_ACCOUNT_IFACE_GET_CLASS (self)->set_pass_func_func (self, get_pass_func); 
    6666        return; 
    6767} 
    6868 
    6969const gchar* 
    70 tny_msg_account_iface_get_proto (TnyMsgAccountIface *self) 
     70tny_account_iface_get_proto (TnyAccountIface *self) 
    7171{ 
    72         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_proto_func (self); 
     72        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_proto_func (self); 
    7373} 
    7474 
    7575const gchar* 
    76 tny_msg_account_iface_get_user (TnyMsgAccountIface *self) 
     76tny_account_iface_get_user (TnyAccountIface *self) 
    7777{ 
    78         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_user_func (self); 
     78        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_user_func (self); 
    7979} 
    8080 
    8181const gchar* 
    82 tny_msg_account_iface_get_hostname (TnyMsgAccountIface *self) 
     82tny_account_iface_get_hostname (TnyAccountIface *self) 
    8383{ 
    84         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_hostname_func (self); 
     84        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_hostname_func (self); 
    8585} 
    8686 
    8787GetPassFunc 
    88 tny_msg_account_iface_get_pass_func (TnyMsgAccountIface *self) 
     88tny_account_iface_get_pass_func (TnyAccountIface *self) 
    8989{ 
    90         return TNY_MSG_ACCOUNT_IFACE_GET_CLASS (self)->get_pass_func_func (self); 
     90        return TNY_ACCOUNT_IFACE_GET_CLASS (self)->get_pass_func_func (self); 
    9191} 
    9292 
    9393 
    9494static void 
    95 tny_msg_account_iface_base_init (gpointer g_class) 
     95tny_account_iface_base_init (gpointer g_class) 
    9696{ 
    9797        static gboolean initialized = FALSE; 
     
    104104 
    105105GType 
    106 tny_msg_account_iface_get_type (void) 
     106tny_account_iface_get_type (void) 
    107107{ 
    108108        static GType type = 0; 
     
    111111                static const GTypeInfo info =  
    112112                { 
    113                   sizeof (TnyMsgAccountIfaceClass), 
    114                   tny_msg_account_iface_base_init,   /* base_init */ 
     113                  sizeof (TnyAccountIfaceClass), 
     114                  tny_account_iface_base_init,   /* base_init */ 
    115115                  NULL,   /* base_finalize */ 
    116116                  NULL,   /* class_init */ 
     
    122122                }; 
    123123                type = g_type_register_static (G_TYPE_INTERFACE,  
    124                         "TnyMsgAccountIface", &info, 0); 
     124                        "TnyAccountIface", &info, 0); 
    125125 
    126126                g_type_interface_add_prerequisite (type, G_TYPE_OBJECT); 
  • trunk/libtinymail/tny-account-iface.h

    r17 r19  
    1 #ifndef TNY_MSG_ACCOUNT_IFACE_H 
    2 #define TNY_MSG_ACCOUNT_IFACE_H 
     1#ifndef TNY_ACCOUNT_IFACE_H 
     2#define TNY_ACCOUNT_IFACE_H 
    33 
    44/* libtinymail - The Tiny Mail base library 
     
    2727G_BEGIN_DECLS 
    2828 
    29 #define TNY_MSG_ACCOUNT_IFACE_TYPE             (tny_msg_account_iface_get_type ()) 
    30 #define TNY_MSG_ACCOUNT_IFACE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIface)) 
    31 #define TNY_MSG_ACCOUNT_IFACE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIfaceClass)) 
    32 #define TNY_IS_MSG_ACCOUNT_IFACE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_MSG_ACCOUNT_IFACE_TYPE)) 
    33 #define TNY_IS_MSG_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_MSG_ACCOUNT_IFACE_TYPE)) 
    34 #define TNY_MSG_ACCOUNT_IFACE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), TNY_MSG_ACCOUNT_IFACE_TYPE, TnyMsgAccountIfaceClass)) 
     29#define TNY_ACCOUNT_IFACE_TYPE             (tny_account_iface_get_type ()) 
     30#define TNY_ACCOUNT_IFACE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIface)) 
     31#define TNY_ACCOUNT_IFACE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIfaceClass)) 
     32#define TNY_IS_MSG_ACCOUNT_IFACE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_ACCOUNT_IFACE_TYPE)) 
     33#define TNY_IS_MSG_ACCOUNT_IFACE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_ACCOUNT_IFACE_TYPE)) 
     34#define TNY_ACCOUNT_IFACE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_INTERFACE ((inst), TNY_ACCOUNT_IFACE_TYPE, TnyAccountIfaceClass)) 
    3535 
    36 struct _TnyMsgAccountIfaceClass 
     36struct _TnyAccountIfaceClass 
    3737{ 
    3838        GTypeInterface parent; 
    3939 
    40         const GList* (*get_folders_func)   (TnyMsgAccountIface *self); 
     40        const GList* (*get_folders_func)   (TnyAccountIface *self); 
    4141 
    42         void (*set_proto_func)             (TnyMsgAccountIface *self, const gchar *proto); 
    43         void (*set_user_func)              (TnyMsgAccountIface *self, const gchar *user); 
    44         void (*set_hostname_func)          (TnyMsgAccountIface *self, const gchar *host); 
    45         void (*set_pass_func_func)         (TnyMsgAccountIface *self, GetPassFunc get_pass_func); 
    46         void (*set_forget_pass_func_func)  (TnyMsgAccountIface *self, ForgetPassFunc get_forget_pass_func); 
     42        void (*set_proto_func)             (TnyAccountIface *self, const gchar *proto); 
     43        void (*set_user_func)              (TnyAccountIface *self, const gchar *user); 
     44        void (*set_hostname_func)          (TnyAccountIface *self, const gchar *host); 
     45        void (*set_pass_func_func)         (TnyAccountIface *self, GetPassFunc get_pass_func); 
     46        void (*set_forget_pass_func_func)  (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func); 
    4747 
    48         const gchar*    (*get_proto_func )           (TnyMsgAccountIface *self); 
    49         const gchar*    (*get_user_func)             (TnyMsgAccountIface *self); 
    50         const gchar*    (*get_hostname_func)         (TnyMsgAccountIface *self); 
    51         GetPassFunc     (*get_pass_func_func)        (TnyMsgAccountIface *self); 
    52         ForgetPassFunc  (*get_forget_pass_func_func) (TnyMsgAccountIface *self); 
     48        const gchar*    (*get_proto_func )           (TnyAccountIface *self); 
     49        const gchar*    (*get_user_func)             (TnyAccountIface *self); 
     50        const gchar*    (*get_hostname_func)         (TnyAccountIface *self); 
     51        GetPassFunc     (*get_pass_func_func)        (TnyAccountIface *self); 
     52        ForgetPassFunc  (*get_forget_pass_func_func) (TnyAccountIface *self); 
    5353}; 
    5454 
    55 GType        tny_msg_account_iface_get_type        (void); 
    56 const GList* tny_msg_account_iface_get_folders     (TnyMsgAccountIface *self); 
     55GType        tny_account_iface_get_type        (void); 
     56const GList* tny_account_iface_get_folders     (TnyAccountIface *self); 
    5757 
    58 void         tny_msg_account_iface_set_proto       (TnyMsgAccountIface *self, const gchar *proto); 
    59 void         tny_msg_account_iface_set_user        (TnyMsgAccountIface *self, const gchar *user); 
    60 void         tny_msg_account_iface_set_hostname    (TnyMsgAccountIface *self, const gchar *host); 
    61 void         tny_msg_account_iface_set_pass_func   (TnyMsgAccountIface *self, GetPassFunc get_pass_func); 
     58void         tny_account_iface_set_proto       (TnyAccountIface *self, const gchar *proto); 
     59void         tny_account_iface_set_user        (TnyAccountIface *self, const gchar *user); 
     60void         tny_account_iface_set_hostname    (TnyAccountIface *self, const gchar *host); 
     61void         tny_account_iface_set_pass_func   (TnyAccountIface *self, GetPassFunc get_pass_func); 
    6262 
    63 const gchar* tny_msg_account_iface_get_proto       (TnyMsgAccountIface *self); 
    64 const gchar* tny_msg_account_iface_get_user        (TnyMsgAccountIface *self); 
    65 const gchar* tny_msg_account_iface_get_hostname    (TnyMsgAccountIface *self); 
    66 GetPassFunc  tny_msg_account_iface_get_pass_func   (TnyMsgAccountIface *self); 
     63const gchar* tny_account_iface_get_proto       (TnyAccountIface *self); 
     64const gchar* tny_account_iface_get_user        (TnyAccountIface *self); 
     65const gchar* tny_account_iface_get_hostname    (TnyAccountIface *self); 
     66GetPassFunc  tny_account_iface_get_pass_func   (TnyAccountIface *self); 
    6767 
    68 void tny_msg_account_iface_set_forget_pass_func           (TnyMsgAccountIface *self, ForgetPassFunc get_forget_pass_func); 
    69 ForgetPassFunc tny_msg_account_iface_get_forget_pass_func (TnyMsgAccountIface *self); 
     68void tny_account_iface_set_forget_pass_func           (TnyAccountIface *self, ForgetPassFunc get_forget_pass_func); 
     69ForgetPassFunc tny_account_iface_get_forget_pass_func (TnyAccountIface *self); 
    7070 
    7171G_END_DECLS 
  • trunk/libtinymail/tny-msg-folder-iface.c

    r12 r19  
    2222 
    2323 
    24 const TnyMsgAccountIface*   
     24const TnyAccountIface*   
    2525tny_msg_folder_iface_get_account (TnyMsgFolderIface *self) 
    2626{ 
     
    2929 
    3030void 
    31 tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const TnyMsgAccountIface *account) 
     31tny_msg_folder_iface_set_account (TnyMsgFolderIface *self, const TnyAccountIface *account) 
    3232{ 
    3333        TNY_MSG_FOLDER_IFACE_GET_CLASS (self)->set_account_func (self, account); 
  • trunk/libtinymail/tny-msg-folder-iface.h

    r12 r19  
    2626#include <tny-msg-iface.h> 
    2727#include <tny-msg-header-iface.h> 
    28 #include <tny-msg-account-iface.h> 
     28#include <tny-account-iface.h> 
    2929 
    3030G_BEGIN_DECLS 
     
    5050        const gchar*   (*get_name_func)    (TnyMsgFolderIface *self); 
    5151        const gchar*   (*get_id_func)      (TnyMsgFolderIface *self); 
    52         const TnyMsgAccountIface*    
     52        const TnyAccountIface*    
    5353                       (*get_account_func) (TnyMsgFolderIface *self); 
    5454 
    5555        void           (*set_name_func)    (TnyMsgFolderIface *self, const gchar *name); 
    5656        void           (*set_id_func)      (TnyMsgFolderIface *self, const gchar *id); 
    57         void           (*set_account_func) (TnyMsgFolderIface *self, const TnyMsgAccountIface *account); 
     57        void           (*set_account_func) (TnyMsgFolderIface *self, const TnyAccountIface *account); 
    5858         
    5959        void           (*uncache_func)     (TnyMsgFolderIface *self); 
     
    7070const GList*   tny_msg_folder_iface_get_headers  (TnyMsgFolderIface *self); 
    7171 
    72 const TnyMsgAccountIface*   
     72const TnyAccountIface*   
    7373               tny_msg_folder_iface_get_account  (TnyMsgFolderIface *self); 
    7474const gchar*   tny_msg_folder_iface_get_id       (TnyMsgFolderIface *self); 
    7575const gchar*   tny_msg_folder_iface_get_name     (TnyMsgFolderIface *self); 
    7676 
    77 void           tny_msg_folder_iface_set_account  (TnyMsgFolderIface *self, const TnyMsgAccountIface *account); 
     77void           tny_msg_folder_iface_set_account  (TnyMsgFolderIface *self, const TnyAccountIface *account); 
    7878void           tny_msg_folder_iface_set_id       (TnyMsgFolderIface *self, const gchar *id); 
    7979void           tny_msg_folder_iface_set_name     (TnyMsgFolderIface *self, const gchar *name); 
  • trunk/libtinymail/tny-shared.h

    r15 r19  
    3535typedef struct _TnyMsgAttachmentIface TnyMsgAttachmentIface; 
    3636typedef struct _TnyMsgAttachmentIfaceClass TnyMsgAttachmentIfaceClass; 
    37 typedef struct _TnyMsgAccountIface TnyMsgAccountIface; 
    38 typedef struct _TnyMsgAccountIfaceClass TnyMsgAccountIfaceClass; 
     37typedef struct _TnyAccountIface TnyAccountIface; 
     38typedef struct _TnyAccountIfaceClass TnyAccountIfaceClass; 
    3939typedef struct _TnyMsgHeaderProxy TnyMsgHeaderProxy; 
    4040typedef struct _TnyMsgHeaderProxyClass TnyMsgHeaderProxyClass; 
    41 typedef gchar* (*GetPassFunc) (TnyMsgAccountIface *self); 
    42 typedef gchar* (*ForgetPassFunc) (TnyMsgAccountIface *self); 
     41typedef gchar* (*GetPassFunc) (TnyAccountIface *self); 
     42typedef gchar* (*ForgetPassFunc) (TnyAccountIface *self); 
    4343 
    4444G_END_DECLS 
  • trunk/libtinymailui/Makefile.am

    r1 r19  
    77libtinymailui_1_0_headers =             \ 
    88        tny-msg-header-list-model.h     \ 
    9         tny-msg-account-tree-model.h 
     9        tny-account-tree-model.h 
    1010 
    1111libtinymailui_1_0_la_SOURCES =          \ 
    1212        $(libtinymailui_1_0_headers)    \ 
    1313        tny-msg-header-list-model.c     \ 
    14         tny-msg-account-tree-model.c 
     14        tny-account-tree-model.c 
    1515 
    1616libtinymailui_1_0_la_LIBADD =           \ 
  • trunk/tinymail/Makefile.in

    r1 r19  
    152152 
    153153tinymail_SOURCES = \ 
    154         tny-main.c 
     154        tny-main.c                                                      \ 
     155        tny-account-factory.c                                           \ 
     156        tny-account-factory.h 
    155157 
    156158 
     
    171173PROGRAMS = $(bin_PROGRAMS) 
    172174 
    173 am_tinymail_OBJECTS = tny-main.$(OBJEXT) 
     175am_tinymail_OBJECTS = tny-main.$(OBJEXT) tny-account-factory.$(OBJEXT) 
    174176tinymail_OBJECTS = $(am_tinymail_OBJECTS) 
    175177tinymail_DEPENDENCIES = \ 
     
    182184depcomp = $(SHELL) $(top_srcdir)/depcomp 
    183185am__depfiles_maybe = depfiles 
    184 @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tny-main.Po 
     186@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/tny-account-factory.Po \ 
     187@AMDEP_TRUE@    ./$(DEPDIR)/tny-main.Po 
    185188COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ 
    186189        $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) 
     
    260263        -rm -f *.tab.c 
    261264 
     265@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tny-account-factory.Po@am__quote@ 
    262266@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tny-main.Po@am__quote@ 
    263267 
  • trunk/tinymail/tny-main.c

    r15 r19  
    2121#include <gtk/gtk.h> 
    2222 
    23 #include <tny-msg-account-iface.h> 
    24 #include <tny-msg-account.h> 
     23#include <tny-account-iface.h> 
     24#include <tny-account.h> 
    2525 
    2626#include <tny-msg-folder-iface.h> 
    27 #include <tny-msg-account-tree-model.h> 
     27#include <tny-account-tree-model.h> 
    2828#include <tny-msg-header-iface.h> 
    2929#include <tny-msg-header-list-model.h> 
     
    4545 
    4646                gtk_tree_model_get (model, &iter,  
    47                         TNY_MSG_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN,  
     47                        TNY_ACCOUNT_TREE_MODEL_INSTANCE_COLUMN,  
    4848                        &folder, -1); 
    4949 
     
    163163 
    164164static gchar* 
    165 get_password (TnyMsgAccountIface *account) 
     165get_password (TnyAccountIface *account) 
    166166{ 
    167167        if (!pwd) 
     
    173173 
    174174static gchar* 
    175 forget_password (TnyMsgAccountIface *account) 
     175forget_password (TnyAccountIface *account) 
    176176{ 
    177177        g_print ("Forgetting password\n"); 
     
    180180} 
    181181 
    182 static TnyMsgAccountIface* 
     182static TnyAccountIface* 
    183183create_account (void) 
    184184{ 
    185         TnyMsgAccountIface* retval = TNY_MSG_ACCOUNT_IFACE (tny_msg_account_new ()); 
    186  
    187         tny_msg_account_iface_set_hostname (retval, PERSONAL_HOSTNAME); 
    188         tny_msg_account_iface_set_user (retval, PERSONAL_USERNAME); 
    189         tny_msg_account_iface_set_proto (retval, PERSONAL_PROTOCOL); 
    190  
    191         tny_msg_account_iface_set_pass_func (retval, get_password); 
    192         tny_msg_account_iface_set_forget_pass_func (retval, forget_password); 
     185        TnyAccountIface* retval = TNY_ACCOUNT_IFACE (tny_account_new ()); 
     186 
     187        tny_account_iface_set_hostname (retval, PERSONAL_HOSTNAME); 
     188        tny_account_iface_set_user (retval, PERSONAL_USERNAME); 
     189        tny_account_iface_set_proto (retval, PERSONAL_PROTOCOL); 
     190 
     191        tny_account_iface_set_pass_func (retval, get_password); 
     192        tny_account_iface_set_forget_pass_func (retval, forget_password); 
    193193 
    194194        return retval; 
     
    209209        GtkTreeSelection *select; 
    210210        gint t = 0, i = 0; 
    211         TnyMsgAccountIface *account; 
     211        TnyAccountIface *account; 
    212212         
    213213        gtk_init (&argc, &argv); 
     
    244244        renderer = gtk_cell_renderer_text_new (); 
    245245        column = gtk_tree_view_column_new_with_attributes ("Folder", renderer, 
    246                         "text", TNY_MSG_ACCOUNT_TREE_MODEL_NAME_COLUMN, NULL); 
     246                        "text", TNY_ACCOUNT_TREE_MODEL_NAME_COLUMN, NULL); 
    247247        gtk_tree_view_append_column (GTK_TREE_VIEW(mailbox_view), column); 
    248248 
    249249        renderer = gtk_cell_renderer_text_new (); 
    250250        column = gtk_tree_view_column_new_with_attributes ("Folder", renderer, 
    251                         "text", TNY_MSG_ACCOUNT_TREE_MODEL_UNREAD_COLUMN, NULL); 
     251                        "text", TNY_ACCOUNT_TREE_MODEL_UNREAD_COLUMN, NULL); 
    252252        gtk_tree_view_append_column (GTK_TREE_VIEW(mailbox_view), column); 
    253253 
     
    278278        gtk_tree_view_append_column (GTK_TREE_VIEW(header_view), column); 
    279279 
    280         mailbox_model = GTK_TREE_MODEL (tny_msg_account_tree_model_new ()); 
     280        mailbox_model = GTK_TREE_MODEL (tny_account_tree_model_new ()); 
    281281 
    282282        account = create_account (); 
    283283 
    284         tny_msg_account_tree_model_add (TNY_MSG_ACCOUNT_TREE_MODEL  
     284        tny_account_tree_model_add (TNY_ACCOUNT_TREE_MODEL  
    285285                (mailbox_model), account); 
    286286