Changeset 3290

Show
Ignore:
Timestamp:
01/23/08 13:31:17
Author:
svillar
Message:

Added tny_send_queue_add_async

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3287 r3290  
     12008-01-23  Sergio Villar Senin  <svillar@igalia.com> 
     2 
     3        * libtinymail/tny-send-queue.c 
     4        libtinymail-camel/tny-camel-send-queue.c 
     5        libtinymail-camel/tny-camel-send-queue.h 
     6        (tny_send_queue_add_async): added this method that was available in 
     7        the Camel implementation to the interface 
     8 
    192008-01-22  Philip Van Hoof <pvanhoof@gnome.org> 
    210 
  • trunk/libtinymail-camel/tny-camel-send-queue.c

    r3287 r3290  
    10581058 
    10591059        klass->add_func = tny_camel_send_queue_add; 
     1060        klass->add_async_func = tny_camel_send_queue_add_async; 
    10601061        klass->get_outbox_func = tny_camel_send_queue_get_outbox; 
    10611062        klass->get_sentbox_func = tny_camel_send_queue_get_sentbox; 
  • trunk/libtinymail/tny-send-queue.c

    r3283 r3290  
    147147 
    148148        TNY_SEND_QUEUE_GET_IFACE (self)->add_func (self, msg, err); 
     149        return; 
     150} 
     151 
     152/** 
     153 * tny_send_queue_add_async: 
     154 * @self: A #TnySendQueue 
     155 * @msg: a #TnyMsg 
     156 * @callback: (null-ok): a #TnySendQueueAddCallback or NULL 
     157 * @status_callback: (null-ok): a #TnyStatusCallback or NULL 
     158 * @user_data: (null-ok): user data that will be passed to the callbacks 
     159 * 
     160 * Add a message to the send queue, usually adding it to the outbox 
     161 * too. The caller will be notified in the callback function when the 
     162 * operation finishes. 
     163 * 
     164 * since: 1.0 
     165 * audience: application-developer 
     166 **/ 
     167void  
     168tny_send_queue_add_async (TnySendQueue *self, TnyMsg *msg, TnySendQueueAddCallback callback, TnyStatusCallback status_callback, gpointer user_data) 
     169{ 
     170#ifdef DBC /* require */ 
     171        g_assert (TNY_IS_SEND_QUEUE (self)); 
     172        g_assert (msg); 
     173        g_assert (TNY_IS_MSG (msg)); 
     174        g_assert (TNY_SEND_QUEUE_GET_IFACE (self)->add_async_func != NULL); 
     175#endif 
     176 
     177        TNY_SEND_QUEUE_GET_IFACE (self)->add_async_func (self, msg, callback, status_callback, user_data); 
    149178        return; 
    150179} 
  • trunk/libtinymail/tny-send-queue.h

    r3283 r3290  
    6969        /* methods */ 
    7070        void (*add_func) (TnySendQueue *self, TnyMsg *msg, GError **err); 
     71        void (*add_async_func) (TnySendQueue *self, TnyMsg *msg, TnySendQueueAddCallback callback, TnyStatusCallback status_callback, gpointer user_data); 
    7172        TnyFolder* (*get_sentbox_func) (TnySendQueue *self); 
    7273        TnyFolder* (*get_outbox_func) (TnySendQueue *self); 
     
    7879 
    7980void tny_send_queue_add (TnySendQueue *self, TnyMsg *msg, GError **err); 
     81void tny_send_queue_add_async (TnySendQueue *self, TnyMsg *msg, TnySendQueueAddCallback callback, TnyStatusCallback status_callback, gpointer user_data); 
    8082TnyFolder* tny_send_queue_get_sentbox (TnySendQueue *self); 
    8183TnyFolder* tny_send_queue_get_outbox (TnySendQueue *self);