Changeset 876

Show
Ignore:
Timestamp:
09/04/06 21:36:10
Author:
pvanhoof
Message:

Renamed the GPE types and several fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r875 r876  
    1 2006-09004  Philip Van Hoof <pvanhoof@gnome.org> 
     12006-09-04  Philip Van Hoof <pvanhoof@gnome.org> 
     2 
     3        * Renamed the GPE types in libtinymail-gpe 
     4        * Made compilation of the demo-ui optional 
     5        * Added some ifdefs to the demo-ui 
     6 
     7        * This was a major API change in libtinymail-gpe 
     8 
     92006-09-04  Philip Van Hoof <pvanhoof@gnome.org> 
    210         
    311        * Renamed TnyDevice of libtestshared to TnyTestDevice 
  • trunk/Makefile.am

    r802 r876  
    1414endif 
    1515 
    16 SUBDIRS += $(PLATFORMDIR) libtinymail-camel tinymail docs bindings po tests  
     16SUBDIRS += $(PLATFORMDIR) libtinymail-camel  
     17 
     18if BUILD_DEMOUI 
     19SUBDIRS += tinymail  
     20endif 
     21 
     22SUBDIRS += docs bindings po tests  
    1723 
    1824if BUILD_UNITTESTS 
  • trunk/configure.ac

    r820 r876  
    5353dnl ### default values (will get overwritten) 
    5454build_gnome=true 
     55build_demoui=true 
    5556build_mozembed=true 
    5657build_gtkhtml=false 
     
    6263[  --with-platform=gnome-desktop                platform to compile [gnome-desktop]], 
    6364[case "${with_platform}" in 
    64   gnome-desktop) PLATFORMDIR=libtinymail-gnome-desktop ;; 
     65  gnome-desktop)  
     66        PLATFORMDIR=libtinymail-gnome-desktop  
     67        build_demoui=true 
     68        PLATFORM="gnome" 
     69        ;; 
    6570  olpc) 
    6671        PLATFORMDIR=libtinymail-olpc 
     
    6974        build_gnome=false 
    7075        with_html_component=none 
     76        build_demoui=true 
     77        PLATFORM="olpc" 
    7178        ;; 
    7279  maemo) 
     
    7683        build_gnome=false 
    7784        with_html_component=none 
     85        build_demoui=true 
     86        PLATFORM="maemo" 
    7887        ;; 
    79   gpe) PLATFORMDIR=libtinymail-gpe ;; 
    80   *) PLATFORMDIR=${with_platform} 
     88  gpe)  
     89        PLATFORMDIR=libtinymail-gpe  
     90        build_demoui=true 
     91        PLATFORM="gpe" 
     92        ;; 
     93  *)  
     94        PLATFORMDIR=${with_platform} 
     95        build_demoui=false 
     96        PLATFORM="unknown" 
    8197esac], [PLATFORMDIR=libtinymail-gnome-desktop 
    8298        with_platform=gnome-desktop]) 
     99 
    83100AC_SUBST(PLATFORMDIR) 
    84  
     101AC_SUBST(PLATFORM) 
     102 
     103dnl ### Enable demoui ## 
     104AC_ARG_ENABLE(demoui, 
     105[  --enable-demoui               build the demo user interface [default=$build_demoui]], 
     106[case "${enableval}" in 
     107  yes) build_demoui=true ;; 
     108  no)  build_demoui=false ;; 
     109  *) AC_MSG_ERROR(bad value ${enableval} for --enable-demoui) ;; 
     110esac],[build_demoui=$build_demoui]) 
     111AM_CONDITIONAL(BUILD_DEMOUI, test x$build_demoui = xtrue) 
    85112 
    86113dnl ### Enable gnome features ## 
  • trunk/libtinymail-camel/tny-camel-account.c

    r843 r876  
    2727#include <tny-session-camel.h> 
    2828#include <tny-account-store-iface.h> 
    29 #include <tny-account-store.h> 
    3029#include <tny-folder-iface.h> 
    3130#include <tny-camel-folder.h> 
  • trunk/libtinymail-gnome-desktop/tny-platform-factory.c

    r865 r876  
    6363{ 
    6464        TnySaveStrategyIface *save_strategy = tny_gtk_save_strategy_new (); 
     65        TnyMsgViewIface *retval; 
     66     
     67#ifdef MOZEMBED 
     68        retval = tny_moz_embed_msg_view_new (save_strategy); 
     69#else 
     70        retval = tny_gtk_msg_view_new (save_strategy); 
     71#endif 
    6572 
    66 #ifdef MOZEMBED 
    67         return tny_moz_embed_msg_view_new (save_strategy); 
    68 #else 
    69         return tny_gtk_msg_view_new (save_strategy); 
    70 #endif 
     73        g_object_unref (G_OBJECT (save_strategy)); 
     74 
     75        return retval; 
    7176} 
    7277 
  • trunk/libtinymail-gpe/Makefile.am

    r848 r876  
    1111lib_LTLIBRARIES = libtinymail-gpe-1.0.la 
    1212 
    13 libtinymail_gpe_1_0_headers =                  
    14         tny-account-store.h                     
    15         tny-password-dialog.h                   
    16         tny-device.h                           
    17         tny-platform-factory.h 
     13libtinymail_gpe_1_0_headers =           
     14        tny-gpe-account-store.h               
     15        tny-gpe-password-dialog.h     
     16        tny-gpe-device.h               
     17        tny-gpe-platform-factory.h 
    1818 
    19 libtinymail_gpe_1_0_la_SOURCES =               
    20         $(libtinymail_gpe_1_0_headers)         
    21         tny-account-store.c                     
    22         tny-device-priv.h                       
    23         tny-device.c                           
    24         tny-password-dialog.c                   
    25         tny-platform-factory.c 
     19libtinymail_gpe_1_0_la_SOURCES =       
     20        $(libtinymail_gpe_1_0_headers)
     21        tny-gpe-account-store.c               
     22        tny-gpe-device-priv.h         
     23        tny-gpe-device.c               
     24        tny-gpe-password-dialog.c     
     25        tny-gpe-platform-factory.c 
    2626 
    27 libtinymail_gpe_1_0_la_LIBADD =        
     27libtinymail_gpe_1_0_la_LIBADD =
    2828        $(LIBTINYMAIL_GPE_LIBS) \ 
    29         $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la    
     29        $(top_builddir)/libtinymail/libtinymail-$(API_VERSION).la
    3030        $(top_builddir)/libtinymailui/libtinymailui-$(API_VERSION).la \ 
    3131        $(top_builddir)/libtinymailui-gtk/libtinymailui-gtk-$(API_VERSION).la 
     
    4545 
    4646DISTCLEANFILES = $(pkgconfig_DATA) 
     47 
  • trunk/libtinymail-gpe/tny-gpe-account-store.c

    r858 r876  
    2929 
    3030#include <tny-platform-factory-iface.h> 
    31 #include <tny-platform-factory.h> 
     31#include <tny-gpe-platform-factory.h> 
    3232#include <tny-account-store-iface.h> 
    33 #include <tny-account-store.h> 
    34 #include <tny-password-dialog.h> 
     33#include <tny-gpe-account-store.h> 
     34#include <tny-gpe-password-dialog.h> 
    3535 
    3636#include <tny-account-iface.h> 
     
    4343#include <tny-camel-transport-account.h> 
    4444#include <tny-session-camel.h> 
    45 #include <tny-device.h> 
     45#include <tny-gpe-device.h> 
    4646 
    4747 
     
    5050static GObjectClass *parent_class = NULL; 
    5151 
    52 typedef struct _TnyAccountStorePriv TnyAccountStorePriv; 
    53  
    54 struct _TnyAccountStorePriv 
     52typedef struct _TnyGpeAccountStorePriv TnyGpeAccountStorePriv; 
     53 
     54struct _TnyGpeAccountStorePriv 
    5555{ 
    5656        GConfClient *client; 
     
    6161}; 
    6262 
    63 #define TNY_ACCOUNT_STORE_GET_PRIVATE(o)      \ 
    64         (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_ACCOUNT_STORE, TnyAccountStorePriv)) 
     63#define TNY_GPE_ACCOUNT_STORE_GET_PRIVATE(o)  \ 
     64        (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_GPE_ACCOUNT_STORE, TnyGpeAccountStorePriv)) 
    6565 
    6666 
     
    8080        if (G_UNLIKELY (!retval)) 
    8181        { 
    82                 GtkDialog *dialog = GTK_DIALOG (tny_password_dialog_new ()); 
     82                GtkDialog *dialog = tny_gpe_password_dialog_new (); 
    8383         
    84                 tny_password_dialog_set_prompt (TNY_PASSWORD_DIALOG (dialog), prompt); 
     84                tny_gpe_password_dialog_set_prompt (TNY_GPE_PASSWORD_DIALOG (dialog), prompt); 
    8585 
    8686                if (G_LIKELY (gtk_dialog_run (dialog) == GTK_RESPONSE_OK)) 
    8787                { 
    88                         const gchar *pwd = tny_password_dialog_get_password  
    89                                 (TNY_PASSWORD_DIALOG (dialog)); 
     88                        const gchar *pwd = tny_gpe_password_dialog_get_password  
     89                                (TNY_GPE_PASSWORD_DIALOG (dialog)); 
    9090         
    9191                        retval = g_strdup (pwd); 
     
    138138 
    139139static gboolean 
    140 tny_account_store_alert (TnyAccountStoreIface *self, TnyAlertType type, const gchar *prompt) 
     140tny_gpe_account_store_alert (TnyAccountStoreIface *self, TnyAlertType type, const gchar *prompt) 
    141141{ 
    142142        GtkMessageType gtktype; 
     
    174174{ 
    175175        TnyAccountStoreIface *self = user_data; 
    176         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     176        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    177177 
    178178 
     
    194194 
    195195static const gchar* 
    196 tny_account_store_get_cache_dir (TnyAccountStoreIface *self) 
    197 { 
    198         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     196tny_gpe_account_store_get_cache_dir (TnyAccountStoreIface *self) 
     197{ 
     198        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    199199 
    200200        if (G_UNLIKELY (!priv->cache_dir)) 
     
    225225 
    226226static void 
    227 tny_account_store_get_accounts (TnyAccountStoreIface *self, TnyListIface *list, TnyGetAccountsRequestType types) 
    228 { 
    229         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     227tny_gpe_account_store_get_accounts (TnyAccountStoreIface *self, TnyListIface *list, TnyGetAccountsRequestType types) 
     228{ 
     229        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    230230        gint i=0, count; 
    231231 
     
    377377 
    378378static void 
    379 tny_account_store_notify_add (TnyAccountStoreIface *self) 
    380 { 
    381         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     379tny_gpe_account_store_notify_add (TnyAccountStoreIface *self) 
     380{ 
     381        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    382382        priv->notify = gconf_client_notify_add (priv->client,  
    383383                "/apps/tinymail/accounts", gconf_listener_account_changed, 
     
    387387 
    388388static void 
    389 tny_account_store_notify_remove (TnyAccountStoreIface *self) 
    390 { 
    391         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     389tny_gpe_account_store_notify_remove (TnyAccountStoreIface *self) 
     390{ 
     391        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    392392        gconf_client_notify_remove (priv->client, priv->notify); 
    393393        return; 
     
    409409 
    410410static void 
    411 tny_account_store_add_account (TnyAccountStoreIface *self, TnyAccountIface *account, const gchar *type) 
    412 { 
    413         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     411tny_gpe_account_store_add_account (TnyAccountStoreIface *self, TnyAccountIface *account, const gchar *type) 
     412{ 
     413        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    414414        gchar *key = NULL; 
    415415        gint count = gconf_client_get_int (priv->client, "/apps/tinymail/accounts/count", NULL); 
     
    445445 
    446446static void 
    447 tny_account_store_add_store_account (TnyAccountStoreIface *self, TnyStoreAccountIface *account) 
    448 { 
    449         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
    450  
    451         tny_account_store_notify_remove (self); 
    452         tny_account_store_add_account (self, TNY_ACCOUNT_IFACE (account), "store"); 
    453         tny_account_store_notify_add (self); 
     447tny_gpe_account_store_add_store_account (TnyAccountStoreIface *self, TnyStoreAccountIface *account) 
     448{ 
     449        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
     450 
     451        tny_gpe_account_store_notify_remove (self); 
     452        tny_gpe_account_store_add_account (self, TNY_ACCOUNT_IFACE (account), "store"); 
     453        tny_gpe_account_store_notify_add (self); 
    454454 
    455455        g_signal_emit (self, tny_account_store_iface_signals [TNY_ACCOUNT_STORE_IFACE_ACCOUNT_INSERTED], 0, account); 
     
    459459 
    460460static void 
    461 tny_account_store_add_transport_account (TnyAccountStoreIface *self, TnyTransportAccountIface *account) 
    462 { 
    463         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
    464  
    465         tny_account_store_notify_remove (self); 
    466         tny_account_store_add_account (self, TNY_ACCOUNT_IFACE (account), "transport"); 
    467         tny_account_store_notify_add (self); 
     461tny_gpe_account_store_add_transport_account (TnyAccountStoreIface *self, TnyTransportAccountIface *account) 
     462{ 
     463        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
     464 
     465        tny_gpe_account_store_notify_remove (self); 
     466        tny_gpe_account_store_add_account (self, TNY_ACCOUNT_IFACE (account), "transport"); 
     467        tny_gpe_account_store_notify_add (self); 
    468468 
    469469        g_signal_emit (self, tny_account_store_iface_signals [TNY_ACCOUNT_STORE_IFACE_ACCOUNT_INSERTED], 0, account); 
     
    473473 
    474474static TnyDeviceIface* 
    475 tny_account_store_get_device (TnyAccountStoreIface *self) 
    476 { 
    477         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     475tny_gpe_account_store_get_device (TnyAccountStoreIface *self) 
     476{ 
     477        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    478478 
    479479        return priv->device; 
     
    481481 
    482482/** 
    483  * tny_account_store_new: 
     483 * tny_gpe_account_store_new: 
    484484 * 
    485485 * 
    486  * Return value: A new #TnyAccountStoreIface instance 
     486 * Return value: A new #TnyAccountStoreIface instance implemented for GPE 
    487487 **/ 
    488 TnyAccountStore
    489 tny_account_store_new (void) 
    490 { 
    491         TnyAccountStore *self = g_object_new (TNY_TYPE_ACCOUNT_STORE, NULL); 
    492         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     488TnyAccountStoreIface
     489tny_gpe_account_store_new (void) 
     490{ 
     491        TnyGpeAccountStore *self = g_object_new (TNY_TYPE_GPE_ACCOUNT_STORE, NULL); 
     492        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    493493        priv->session = tny_session_camel_new (TNY_ACCOUNT_STORE_IFACE (self)); 
    494494 
    495         return self
    496 } 
    497  
    498  
    499 static void 
    500 tny_account_store_instance_init (GTypeInstance *instance, gpointer g_class) 
    501 { 
    502         TnyAccountStore *self = (TnyAccountStore *)instance; 
    503         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     495        return TNY_ACCOUNT_STORE_IFACE (self)
     496} 
     497 
     498 
     499static void 
     500tny_gpe_account_store_instance_init (GTypeInstance *instance, gpointer g_class) 
     501{ 
     502        TnyGpeAccountStore *self = (TnyGpeAccountStore *)instance; 
     503        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    504504        TnyPlatformFactoryIface *platfact; 
    505505     
     
    509509                GCONF_CLIENT_PRELOAD_RECURSIVE, NULL); 
    510510 
    511         tny_account_store_notify_add (TNY_ACCOUNT_STORE_IFACE (self)); 
    512  
    513         platfact = TNY_PLATFORM_FACTORY_IFACE ( 
    514                 tny_platform_factory_get_instance ()); 
     511        tny_gpe_account_store_notify_add (TNY_ACCOUNT_STORE_IFACE (self)); 
     512 
     513        platfact = tny_gpe_platform_factory_get_instance (); 
    515514 
    516515        priv->device = tny_platform_factory_iface_new_device (platfact); 
     
    522521 
    523522static void 
    524 tny_account_store_finalize (GObject *object) 
    525 { 
    526         TnyAccountStore *self = (TnyAccountStore *)object;     
    527         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
    528  
    529         tny_account_store_notify_remove (TNY_ACCOUNT_STORE_IFACE (self)); 
     523tny_gpe_account_store_finalize (GObject *object) 
     524{ 
     525        TnyGpeAccountStore *self = (TnyGpeAccountStore *)object;       
     526        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
     527 
     528        tny_gpe_account_store_notify_remove (TNY_ACCOUNT_STORE_IFACE (self)); 
    530529        g_object_unref (G_OBJECT (priv->client)); 
    531530 
     
    540539 
    541540/** 
    542  * tny_account_store_get_session: 
    543  * @self: The #TnyAccountStore instance 
     541 * tny_gpe_account_store_get_session: 
     542 * @self: The #TnyGpeAccountStore instance 
    544543 * 
    545544 * Return value: A #TnySessionCamel instance 
    546545 **/ 
    547546TnySessionCamel* 
    548 tny_account_store_get_session (TnyAccountStore *self) 
    549 { 
    550         TnyAccountStorePriv *priv = TNY_ACCOUNT_STORE_GET_PRIVATE (self); 
     547tny_gpe_account_store_get_session (TnyGpeAccountStore *self) 
     548{ 
     549        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    551550 
    552551        return priv->session; 
     
    554553 
    555554static void  
    556 tny_account_store_class_init (TnyAccountStoreClass *class) 
     555tny_gpe_account_store_class_init (TnyGpeAccountStoreClass *class) 
    557556{ 
    558557        GObjectClass *object_class; 
     
    561560        object_class = (GObjectClass*) class; 
    562561 
    563         object_class->finalize = tny_account_store_finalize; 
    564  
    565         g_type_class_add_private (object_class, sizeof (TnyAccountStorePriv)); 
     562        object_class->finalize = tny_gpe_account_store_finalize; 
     563 
     564        g_type_class_add_private (object_class, sizeof (TnyGpeAccountStorePriv)); 
    566565 
    567566        return; 
     
    573572        TnyAccountStoreIfaceClass *klass = (TnyAccountStoreIfaceClass *)g_iface; 
    574573 
    575         klass->get_accounts_func = tny_account_store_get_accounts; 
    576         klass->add_store_account_func = tny_account_store_add_store_account; 
    577         klass->add_transport_account_func = tny_account_store_add_transport_account; 
    578         klass->get_cache_dir_func = tny_account_store_get_cache_dir; 
    579         klass->get_device_func = tny_account_store_get_device; 
    580         klass->alert_func = tny_account_store_alert; 
     574        klass->get_accounts_func = tny_gpe_account_store_get_accounts; 
     575        klass->add_store_account_func = tny_gpe_account_store_add_store_account; 
     576        klass->add_transport_account_func = tny_gpe_account_store_add_transport_account; 
     577        klass->get_cache_dir_func = tny_gpe_account_store_get_cache_dir; 
     578        klass->get_device_func = tny_gpe_account_store_get_device; 
     579        klass->alert_func = tny_gpe_account_store_alert; 
    581580 
    582581        return; 
     
    585584 
    586585GType  
    587 tny_account_store_get_type (void) 
     586tny_gpe_account_store_get_type (void) 
    588587{ 
    589588        static GType type = 0; 
     
    593592                static const GTypeInfo info =  
    594593                { 
    595                   sizeof (TnyAccountStoreClass), 
     594                  sizeof (TnyGpeAccountStoreClass), 
    596595                  NULL,   /* base_init */ 
    597596                  NULL,   /* base_finalize */ 
    598                   (GClassInitFunc) tny_account_store_class_init,   /* class_init */ 
     597                  (GClassInitFunc) tny_gpe_account_store_class_init,   /* class_init */ 
    599598                  NULL,   /* class_finalize */ 
    600599                  NULL,   /* class_data */ 
    601                   sizeof (TnyAccountStore), 
     600                  sizeof (TnyGpeAccountStore), 
    602601                  0,      /* n_preallocs */ 
    603                   tny_account_store_instance_init    /* instance_init */ 
     602                  tny_gpe_account_store_instance_init    /* instance_init */ 
    604603                }; 
    605604 
     
    612611 
    613612                type = g_type_register_static (G_TYPE_OBJECT, 
    614                         "TnyAccountStore", 
     613                        "TnyGpeAccountStore", 
    615614                        &info, 0); 
    616615 
  • trunk/libtinymail-gpe/tny-gpe-account-store.h

    r858 r876  
    1 #ifndef TNY_ACCOUNT_STORE_H 
    2 #define TNY_ACCOUNT_STORE_H 
     1#ifndef TNY_GPE_ACCOUNT_STORE_H 
     2#define TNY_GPE_ACCOUNT_STORE_H 
    33 
    44/* tinymail - Tiny Mail 
     
    2828G_BEGIN_DECLS 
    2929 
    30 #define TNY_TYPE_ACCOUNT_STORE             (tny_account_store_get_type ()) 
    31 #define TNY_ACCOUNT_STORE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_ACCOUNT_STORE, TnyAccountStore)) 
    32 #define TNY_ACCOUNT_STORE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_ACCOUNT_STORE, TnyAccountStoreClass)) 
    33 #define TNY_IS_ACCOUNT_STORE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_ACCOUNT_STORE)) 
    34 #define TNY_IS_ACCOUNT_STORE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_ACCOUNT_STORE)) 
    35 #define TNY_ACCOUNT_STORE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_ACCOUNT_STORE, TnyAccountStoreClass)) 
     30#define TNY_TYPE_GPE_ACCOUNT_STORE             (tny_gpe_account_store_get_type ()) 
     31#define TNY_GPE_ACCOUNT_STORE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_GPE_ACCOUNT_STORE, TnyGpeAccountStore)) 
     32#define TNY_GPE_ACCOUNT_STORE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_GPE_ACCOUNT_STORE, TnyGpeAccountStoreClass)) 
     33#define TNY_IS_GPE_ACCOUNT_STORE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_GPE_ACCOUNT_STORE)) 
     34#define TNY_IS_GPE_ACCOUNT_STORE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_GPE_ACCOUNT_STORE)) 
     35#define TNY_GPE_ACCOUNT_STORE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_GPE_ACCOUNT_STORE, TnyGpeAccountStoreClass)) 
    3636 
    37 typedef struct _TnyAccountStore TnyAccountStore; 
    38 typedef struct _TnyAccountStoreClass TnyAccountStoreClass; 
     37typedef struct _TnyGpeAccountStore TnyGpeAccountStore; 
     38typedef struct _TnyGpeAccountStoreClass TnyGpeAccountStoreClass; 
    3939 
    40 struct _TnyAccountStore 
     40struct _TnyGpeAccountStore 
    4141{ 
    4242        GObject parent; 
    4343}; 
    4444 
    45 struct _TnyAccountStoreClass 
     45struct _TnyGpeAccountStoreClass 
    4646{ 
    4747        GObjectClass parent; 
    4848}; 
    4949 
    50 GType               tny_account_store_get_type      (void); 
    51 TnyAccountStore*    tny_account_store_new            (void); 
    52 TnySessionCamel*    tny_account_store_get_session    (TnyAccountStore *self); 
     50GType tny_gpe_account_store_get_type (void); 
     51TnyAccountStoreIface* tny_gpe_account_store_new (void); 
     52TnySessionCamel* tny_gpe_account_store_get_session (TnyGpeAccountStore *self); 
    5353 
    5454G_END_DECLS 
  • trunk/libtinymail-gpe/tny-gpe-device-priv.h

    r858 r876  
    1 #ifndef TNY_DEVICE_PRIV_H 
    2 #define TNY_DEVICE_PRIV_H 
     1#ifndef TNY_GPE_DEVICE_PRIV_H 
     2#define TNY_GPE_DEVICE_PRIV_H 
    33 
    44/* libtinymail-camel - The Tiny Mail base library for Camel 
     
    2121 */ 
    2222 
    23 typedef struct _TnyDevicePriv TnyDevicePriv; 
     23typedef struct _TnyGpeDevicePriv TnyGpeDevicePriv; 
    2424 
    25 struct _TnyDevicePriv 
     25struct _TnyGpeDevicePriv 
    2626{ 
    27         gboolean forced, fset; 
     27        gboolean forced; 
     28        gboolean fset; 
    2829}; 
    2930 
    3031 
    31 #define TNY_DEVICE_GET_PRIVATE(o)     \ 
    32         (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_DEVICE, TnyDevicePriv)) 
     32#define TNY_GPE_DEVICE_GET_PRIVATE(o) \ 
     33        (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_GPE_DEVICE, TnyGpeDevicePriv)) 
    3334 
    3435#endif 
  • trunk/libtinymail-gpe/tny-gpe-device.c

    r858 r876  
    2222#include <glib/gi18n-lib.h> 
    2323 
    24 #include <tny-device.h> 
     24#include <tny-gpe-device.h> 
    2525 
    2626static GObjectClass *parent_class = NULL; 
    2727 
    28 #include "tny-device-priv.h" 
     28#include "tny-gpe-device-priv.h" 
    2929 
    30 static void tny_device_on_online (TnyDeviceIface *self); 
    31 static void tny_device_on_offline (TnyDeviceIface *self); 
    32 static gboolean tny_device_is_online (TnyDeviceIface *self); 
     30static void tny_gpe_device_on_online (TnyDeviceIface *self); 
     31static void tny_gpe_device_on_offline (TnyDeviceIface *self); 
     32static gboolean tny_gpe_device_is_online (TnyDeviceIface *self); 
    3333 
    3434 
    3535static void  
    36 tny_device_reset (TnyDeviceIface *self) 
     36tny_gpe_device_reset (TnyDeviceIface *self) 
    3737{ 
    38         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
     38        TnyGpeDevicePriv *priv = TNY_GPE_DEVICE_GET_PRIVATE (self); 
    3939 
    4040        priv->fset = FALSE; 
     
    4444 
    4545static void  
    46 tny_device_force_online (TnyDeviceIface *self) 
     46tny_gpe_device_force_online (TnyDeviceIface *self) 
    4747{ 
    48         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
     48        TnyGpeDevicePriv *priv = TNY_GPE_DEVICE_GET_PRIVATE (self); 
    4949 
    5050        priv->fset = TRUE; 
    5151        priv->forced = TRUE; 
    5252 
    53         tny_device_on_online (self); 
     53        tny_gpe_device_on_online (self); 
    5454 
    5555        return; 
     
    5858 
    5959static void 
    60 tny_device_force_offline (TnyDeviceIface *self) 
     60tny_gpe_device_force_offline (TnyDeviceIface *self) 
    6161{ 
    62         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
     62        TnyGpeDevicePriv *priv = TNY_GPE_DEVICE_GET_PRIVATE (self); 
    6363 
    6464        priv->fset = TRUE; 
     
    6666 
    6767 
    68         tny_device_on_offline (self); 
     68        tny_gpe_device_on_offline (self); 
    6969         
    7070        return; 
     
    7272 
    7373static void 
    74 tny_device_on_online (TnyDeviceIface *self) 
     74tny_gpe_device_on_online (TnyDeviceIface *self) 
    7575{ 
    7676        g_signal_emit (self, tny_device_iface_signals [TNY_DEVICE_IFACE_CONNECTION_CHANGED], 0, TRUE); 
     
    8080 
    8181static void 
    82 tny_device_on_offline (TnyDeviceIface *self) 
     82tny_gpe_device_on_offline (TnyDeviceIface *self) 
    8383{ 
    8484        g_signal_emit (self, tny_device_iface_signals [TNY_DEVICE_IFACE_CONNECTION_CHANGED], 0, FALSE); 
     
    8888 
    8989static gboolean 
    90 tny_device_is_online (TnyDeviceIface *self) 
     90tny_gpe_device_is_online (TnyDeviceIface *self) 
    9191{ 
    92         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
     92        TnyGpeDevicePriv *priv = TNY_GPE_DEVICE_GET_PRIVATE (self); 
    9393        gboolean retval = TRUE; 
    9494        return retval; 
     
    9696 
    9797static void 
    98 tny_device_instance_init (GTypeInstance *instance, gpointer g_class) 
     98tny_gpe_device_instance_init (GTypeInstance *instance, gpointer g_class) 
    9999{ 
    100         TnyDevice *self = (TnyDevice *)instance; 
    101         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
     100        TnyGpeDevice *self = (TnyGpeDevice *)instance; 
     101        TnyGpeDevicePriv *priv = TNY_GPE_DEVICE_GET_PRIVATE (self); 
    102102 
    103103        return; 
     
    107107 
    108108/** 
    109  * tny_device_new: 
     109 * tny_gpe_device_new: 
    110110 * 
    111111 * Return value: A new #TnyDeviceIface instance 
    112112 **/ 
    113 TnyDevice
    114 tny_device_new (void) 
     113TnyDeviceIface
     114tny_gpe_device_new (void) 
    115115{ 
    116         TnyDevice *self = g_object_new (TNY_TYPE_DEVICE, NULL); 
     116        TnyGpeDevice *self = g_object_new (TNY_TYPE_GPE_DEVICE, NULL); 
    117117 
    118         return self
     118        return TNY_DEVICE_IFACE (self)
    119119} 
    120120 
    121121 
    122122static void 
    123 tny_device_finalize (GObject *object) 
     123tny_gpe_device_finalize (GObject *object) 
    124124{ 
    125         TnyDevice *self = (TnyDevice *)object;   
    126         TnyDevicePriv *priv = TNY_DEVICE_GET_PRIVATE (self); 
    127  
    128125        (*parent_class->finalize) (object); 
    129  
     126     
    130127        return; 
    131128} 
     
    137134        TnyDeviceIfaceClass *klass = (TnyDeviceIfaceClass *)g_iface; 
    138135 
    139         klass->is_online_func = tny_device_is_online; 
    140         klass->reset_func = tny_device_reset; 
    141         klass->force_offline_func = tny_device_force_offline; 
    142         klass->force_online_func = tny_device_force_online; 
     136        klass->is_online_func = tny_gpe_device_is_online; 
     137        klass->reset_func = tny_gpe_device_reset; 
     138        klass->force_offline_func = tny_gpe_device_force_offline; 
     139        klass->force_online_func = tny_gpe_device_force_online; 
    143140 
    144141        return; 
     
    148145 
    149146static void  
    150 tny_device_class_init (TnyDeviceClass *class) 
     147tny_gpe_device_class_init (TnyGpeDeviceClass *class) 
    151148{ 
    152149        GObjectClass *object_class; 
     
    155152        object_class = (GObjectClass*) class; 
    156153 
    157         object_class->finalize = tny_device_finalize; 
     154        object_class->finalize = tny_gpe_device_finalize; 
    158155 
    159         g_type_class_add_private (object_class, sizeof (TnyDevicePriv)); 
     156        g_type_class_add_private (object_class, sizeof (TnyGpeDevicePriv)); 
    160157 
    161158        return; 
     
    163160 
    164161GType  
    165 tny_device_get_type (void) 
     162tny_gpe_device_get_type (void) 
    166163{ 
    167164        static GType type = 0; 
     
    171168                static const GTypeInfo info =  
    172169                { 
    173                   sizeof (TnyDeviceClass), 
     170                  sizeof (TnyGpeDeviceClass), 
    174171                  NULL,   /* base_init */ 
    175172                  NULL,   /* base_finalize */ 
    176                   (GClassInitFunc) tny_device_class_init,   /* class_init */ 
     173                  (GClassInitFunc) tny_gpe_device_class_init,   /* class_init */ 
    177174                  NULL,   /* class_finalize */ 
    178175                  NULL,   /* class_data */ 
    179                   sizeof (TnyDevice), 
     176                  sizeof (TnyGpeDevice), 
    180177                  0,      /* n_preallocs */ 
    181                   tny_device_instance_init    /* instance_init */ 
     178                  tny_gpe_device_instance_init    /* instance_init */ 
    182179                }; 
    183180 
     
    190187 
    191188                type = g_type_register_static (G_TYPE_OBJECT, 
    192                         "TnyDevice", 
     189                        "TnyGpeDevice", 
    193190                        &info, 0); 
    194191 
  • trunk/libtinymail-gpe/tny-gpe-device.h

    r858 r876  
    1 #ifndef TNY_DEVICE_H 
    2 #define TNY_DEVICE_H 
     1#ifndef TNY_GPE_DEVICE_H 
     2#define TNY_GPE_DEVICE_H 
    33 
    44/* libtinymail-camel - The Tiny Mail base library for Camel 
     
    2828G_BEGIN_DECLS 
    2929 
    30 #define TNY_TYPE_DEVICE             (tny_device_get_type ()) 
    31 #define TNY_DEVICE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_DEVICE, TnyDevice)) 
    32 #define TNY_DEVICE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_DEVICE, TnyDeviceClass)) 
    33 #define TNY_IS_DEVICE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_DEVICE)) 
    34 #define TNY_IS_DEVICE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_DEVICE)) 
    35 #define TNY_DEVICE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_DEVICE, TnyDeviceClass)) 
     30#define TNY_TYPE_GPE_DEVICE             (tny_gpe_device_get_type ()) 
     31#define TNY_GPE_DEVICE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), TNY_TYPE_GPE_DEVICE, TnyGpeDevice)) 
     32#define TNY_GPE_DEVICE_CLASS(vtable)    (G_TYPE_CHECK_CLASS_CAST ((vtable), TNY_TYPE_GPE_DEVICE, TnyGpeDeviceClass)) 
     33#define TNY_IS_GPE_DEVICE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), TNY_TYPE_GPE_DEVICE)) 
     34#define TNY_IS_GPE_DEVICE_CLASS(vtable) (G_TYPE_CHECK_CLASS_TYPE ((vtable), TNY_TYPE_GPE_DEVICE)) 
     35#define TNY_GPE_DEVICE_GET_CLASS(inst)  (G_TYPE_INSTANCE_GET_CLASS ((inst), TNY_TYPE_GPE_DEVICE, TnyGpeDeviceClass)) 
    3636 
    3737/* This is an abstract type */ 
    3838 
    39 typedef struct _TnyDevice TnyDevice; 
    40 typedef struct _TnyDeviceClass TnyDeviceClass; 
     39typedef struct _TnyGpeDevice TnyGpeDevice; 
     40typedef struct _TnyGpeDeviceClass TnyGpeDeviceClass; 
    4141 
    42 struct _TnyDevice 
     42struct _TnyGpeDevice 
    4343{ 
    4444        GObject parent; 
    4545}; 
    4646 
    47 struct _TnyDeviceClass  
     47struct _TnyGpeDeviceClass  
    4848{ 
    4949        GObjectClass parent; 
    5050}; 
    5151 
    52 GType tny_device_get_type (void); 
     52GType tny_gpe_device_get_type (void); 
    5353 
    54 TnyDevice* tny_device_new (void); 
     54TnyDeviceIface* tny_gpe_device_new (void); 
    5555 
    5656G_END_DECLS 
  • trunk/libtinymail-gpe/tny-gpe-password-dialog.c

    r858 r876  
    2222 
    2323#include <gtk/gtk.h> 
    24 #include <tny-password-dialog.h> 
     24#include <tny-gpe-password-dialog.h> 
    2525 
    2626static GObjectClass *parent_class = NULL; 
    2727 
    28 typedef struct _TnyPasswordDialogPriv TnyPasswordDialogPriv; 
     28typedef struct _TnyGpePasswordDialogPriv TnyGpePasswordDialogPriv; 
    2929 
    30 struct _TnyPasswordDialogPriv 
     30struct _TnyGpePasswordDialogPriv 
    3131{ 
    3232        GtkEntry *pwd_entry; 
     
    3434}; 
    3535 
    36 #define TNY_PASSWORD_DIALOG_GET_PRIVATE(o)    \ 
    37         (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_PASSWORD_DIALOG, TnyPasswordDialogPriv)) 
     36#define TNY_GPE_PASSWORD_DIALOG_GET_PRIVATE(o)        \ 
     37        (G_TYPE_INSTANCE_GET_PRIVATE ((o), TNY_TYPE_GPE_PASSWORD_DIALOG, TnyGpePasswordDialogPriv)) 
    3838 
    3939 
    4040/** 
    41  * tny_password_dialog_set_prompt: 
    42  * @self: A #TnyPasswordDialog object 
     41 * tny_gpe_password_dialog_set_prompt: 
     42 * @self: A #TnyGpePasswordDialog object 
    4343 * @prompt: The prompt to set 
    4444 *  
    4545 **/ 
    4646void 
    47 tny_password_dialog_set_prompt (TnyPasswordDialog *self, const gchar *prompt) 
     47tny_gpe_password_dialog_set_prompt (TnyGpePasswordDialog *self, const gchar *prompt) 
    4848{ 
    49         TnyPasswordDialogPriv *priv = TNY_PASSWORD_DIALOG_GET_PRIVATE (self); 
     49        TnyGpePasswordDialogPriv *priv = TNY_GPE_PASSWORD_DIALOG_GET_PRIVATE (self); 
    5050 
    5151        gtk_label_set_text (priv->prompt_label, prompt); 
     
    5555 
    5656/** 
    57  * tny_password_dialog_get_password: 
    58  * @self: A #TnyPasswordDialog object 
     57 * tny_gpe_password_dialog_get_password: 
     58 * @self: A #TnyGpePasswordDialog object 
    5959 * 
    6060 * Return value: The password (read-only) as typed by the user 
    6161 **/ 
    6262const gchar* 
    63 tny_password_dialog_get_password (TnyPasswordDialog *self) 
     63tny_gpe_password_dialog_get_password (TnyGpePasswordDialog *self) 
    6464{ 
    65         TnyPasswordDialogPriv *priv = TNY_PASSWORD_DIALOG_GET_PRIVATE (self); 
     65        TnyGpePasswordDialogPriv *priv = TNY_GPE_PASSWORD_DIALOG_GET_PRIVATE (self); 
    6666 
    6767        return gtk_entry_get_text (priv->pwd_entry); 
     
    69