Changeset 3631

Show
Ignore:
Timestamp:
04/25/08 13:35:39
Author:
pvanhoof
Message:
        • Added tny_camel_transport_account_get_from and

tny_camel_transport_account_set_from

        • This was a minor API change
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3630 r3631  
    33        * Error reporting when sending a message without From, and a crash-fix 
    44        about it too 
     5        * Added tny_camel_transport_account_get_from and 
     6        tny_camel_transport_account_set_from 
     7 
     8        * This was a minor API change 
    59 
    6102008-04-24  Philip Van Hoof <pvanhoof@gnome.org> 
  • trunk/libtinymail-camel/tny-camel-transport-account-priv.h

    r2825 r3631  
    2525struct _TnyCamelTransportAccountPriv 
    2626{ 
    27         int i
     27        gchar *from
    2828}; 
    2929 
  • trunk/libtinymail-camel/tny-camel-transport-account.c

    r3630 r3631  
    264264} 
    265265 
     266/** 
     267 * tny_camel_transport_account_get_from: 
     268 * @self: a #TnyTransportAccount 
     269 *  
     270 * Get the from of @self. Returned value must not be freed. 
     271 *  
     272 * returns: (null-ok): a read-only string 
     273 **/ 
     274const gchar * 
     275tny_camel_transport_account_get_from (TnyTransportAccount *self) 
     276{ 
     277        TnyCamelTransportAccountPriv *priv = TNY_CAMEL_TRANSPORT_ACCOUNT_GET_PRIVATE (self); 
     278        return priv->from; 
     279} 
     280 
     281/** 
     282 * tny_camel_transport_account_set_from: 
     283 * @self: a #TnyTransportAccount 
     284 * @from: (null-ok): a string or NULL 
     285 *  
     286 * Set the from of @self. 
     287 **/ 
     288void 
     289tny_camel_transport_account_set_from (TnyTransportAccount *self, const gchar *from) 
     290{ 
     291        TnyCamelTransportAccountPriv *priv = TNY_CAMEL_TRANSPORT_ACCOUNT_GET_PRIVATE (self); 
     292        if (priv->from) 
     293                g_free (priv->from); 
     294        priv->from = g_strdup (from); 
     295} 
    266296 
    267297/** 
     
    270300 * Create a new #TnyTransportAccount instance implemented for Camel 
    271301 *  
    272  * Return value: A new #TnyTransportAccount instance implemented for Camel 
     302 * returns: (caller-owns): A new #TnyTransportAccount instance implemented for Camel 
    273303 **/ 
    274304TnyTransportAccount* 
     
    285315        TnyCamelTransportAccount *self = (TnyCamelTransportAccount *)instance; 
    286316        TnyCamelAccountPriv *apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (self); 
    287  
     317        TnyCamelTransportAccountPriv *priv = TNY_CAMEL_TRANSPORT_ACCOUNT_GET_PRIVATE (self); 
     318 
     319        priv->from = NULL; 
    288320        apriv->service = NULL; 
    289321        apriv->type = CAMEL_PROVIDER_TRANSPORT; 
     
    301333tny_camel_transport_account_finalize (GObject *object) 
    302334{ 
     335        TnyCamelTransportAccountPriv *priv = TNY_CAMEL_TRANSPORT_ACCOUNT_GET_PRIVATE (object); 
     336 
     337        if (priv->from) 
     338                g_free (priv->from); 
     339 
    303340        (*parent_class->finalize) (object); 
    304341 
  • trunk/libtinymail-camel/tny-camel-transport-account.h

    r3304 r3631  
    5555TnyTransportAccount* tny_camel_transport_account_new (void); 
    5656 
     57const gchar *tny_camel_transport_account_get_from (TnyTransportAccount *self); 
     58void tny_camel_transport_account_set_from (TnyTransportAccount *self, const gchar *from); 
     59 
    5760G_END_DECLS 
    5861