Changeset 1541

Show
Ignore:
Timestamp:
02/02/07 16:36:51
Author:
pvanhoof
Message:

Changed a silly API

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r1540 r1541  
    44        provider of camel-lite. This means that the POP3 support now supports 
    55        offline viewing E-mails 
     6        * Changed a silly internal libtinymail-camel API 
     7 
     8        * This was a major API change in libtinymail-camel 
    69 
    7102007-01-31  Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> 
  • trunk/libtinymail-camel/tny-camel-account.c

    r1521 r1541  
    701701 
    702702/** 
    703  * tny_camel_account_set_online_status
     703 * tny_camel_account_set_online
    704704 * @self: a #TnyCamelAccount object 
    705  * @offline: whether or not the account is offline 
     705 * @online: whether or not the account is online 
    706706 * @err: a #GError instance or NULL 
    707707 * 
     
    710710 **/ 
    711711void  
    712 tny_camel_account_set_online_status (TnyCamelAccount *self, gboolean offline, GError **err) 
    713 { 
    714         TNY_CAMEL_ACCOUNT_GET_CLASS (self)->set_online_status_func (self, offline, err); 
     712tny_camel_account_set_online (TnyCamelAccount *self, gboolean online, GError **err) 
     713{ 
     714        TNY_CAMEL_ACCOUNT_GET_CLASS (self)->set_online_func (self, online, err); 
    715715} 
    716716 
    717717void  
    718 tny_camel_account_set_online_status_default (TnyCamelAccount *self, gboolean offline, GError **err) 
     718tny_camel_account_set_online_default (TnyCamelAccount *self, gboolean online, GError **err) 
    719719{ 
    720720        TnyCamelAccountPriv *priv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
     
    737737        } 
    738738 
    739         if (offline) 
    740                 camel_service_cancel_connect (priv->service); 
     739        /* if (offline) 
     740                camel_service_cancel_connect (priv->service); */ 
    741741 
    742742        if (CAMEL_IS_DISCO_STORE (priv->service)) { 
    743                 if (!offline) { 
     743                if (online) { 
    744744                        camel_disco_store_set_status (CAMEL_DISCO_STORE (priv->service), 
    745745                                                                                  CAMEL_DISCO_STORE_ONLINE, &ex); 
     
    754754        } else if (CAMEL_IS_OFFLINE_STORE (priv->service)) { 
    755755                 
    756                 if (!offline) { 
     756                if (online) { 
    757757                         
    758758                        camel_offline_store_set_network_state (CAMEL_OFFLINE_STORE (priv->service), 
     
    768768        } 
    769769 
    770         if (offline) 
     770        if (!online) 
    771771                camel_service_disconnect (CAMEL_SERVICE (priv->service), 
    772772                                                                  TRUE, &ex); 
     
    913913 
    914914        class->add_option_func = tny_camel_account_add_option_default; 
    915         class->set_online_status_func = tny_camel_account_set_online_status_default; 
     915        class->set_online_func = tny_camel_account_set_online_default; 
    916916 
    917917        object_class->finalize = tny_camel_account_finalize; 
  • trunk/libtinymail-camel/tny-camel-account.h

    r1498 r1541  
    7575 
    7676        void (*add_option_func) (TnyCamelAccount *self, const gchar *option); 
    77         void (*set_online_status_func) (TnyCamelAccount *self, gboolean offline, GError **err); 
     77        void (*set_online_func) (TnyCamelAccount *self, gboolean online, GError **err); 
    7878 
    7979        /* Abstract methods */ 
     
    8585void tny_camel_account_add_option (TnyCamelAccount *self, const gchar *option); 
    8686void tny_camel_account_set_session (TnyCamelAccount *self, TnySessionCamel *session); 
    87 void tny_camel_account_set_online_status (TnyCamelAccount *self, gboolean offline, GError **err); 
     87void tny_camel_account_set_online (TnyCamelAccount *self, gboolean online, GError **err); 
    8888 
    8989G_END_DECLS 
  • trunk/libtinymail-camel/tny-camel-store-account.c

    r1522 r1541  
    189189                } else { 
    190190                        apriv->connected = TRUE; 
    191                         /* tny_camel_account_set_online_status (self, !apriv->connected); */ 
     191                        /* tny_camel_account_set_online (self, apriv->connected); */ 
    192192                } 
    193193 
  • trunk/libtinymail-camel/tny-camel-transport-account.c

    r1522 r1541  
    198198                } else { 
    199199                        apriv->connected = TRUE; 
    200                         tny_camel_account_set_online_status (self, !apriv->connected); 
     200                        tny_camel_account_set_online (self, apriv->connected); 
    201201                } 
    202202 
  • trunk/libtinymail-camel/tny-session-camel.c

    r1535 r1541  
    410410 
    411411                if (err == NULL) 
    412                         tny_camel_account_set_online_status (TNY_CAMEL_ACCOUNT (data), !info->online, &err); 
     412                        tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (data), info->online, &err); 
    413413 
    414414                if (err != NULL)  
  • trunk/tests/shared/account-store.c

    r1521 r1541  
    112112                tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (account), me->session); 
    113113                camel_session_set_online ((CamelSession*)me->session, me->force_online);  
    114                 tny_camel_account_set_online_status (TNY_CAMEL_ACCOUNT (account), !me->force_online, NULL); 
     114                tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, NULL); 
    115115 
    116116                tny_account_set_proto (account, "imap"); 
     
    132132                tny_camel_account_set_session (TNY_CAMEL_ACCOUNT (account), me->session); 
    133133                camel_session_set_online ((CamelSession*)me->session, me->force_online);  
    134                 tny_camel_account_set_online_status (TNY_CAMEL_ACCOUNT (account), !me->force_online, NULL); 
     134                tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (account), me->force_online, NULL); 
    135135 
    136136                tny_account_set_proto (account, "something");