Changeset 2443

Show
Ignore:
Timestamp:
07/10/07 13:33:41
Author:
murrayc
Message:

2007-07-10 Murray Cumming <murrayc@murrayc.com>

        • libtinymail/tny-account-store.h: alert_func vfunc:
        • libtinymail/tny-account-store.c: (tny_account_store_alert):
        • libtinymail-acap/tny-acap-account-store.c:

(tny_acap_account_store_alert):

        • libtinymail-camel/tny-session-camel.c:

(tny_session_camel_do_an_error), (tny_session_camel_alert_user),
(foreach_account_set_connectivity):

        • libtinymail-gnome-desktop/tny-gnome-account-store.c:

(tny_gnome_account_store_alert):

        • libtinymail-gpe/tny-gpe-account-store.c:

(tny_gpe_account_store_alert):

        • libtinymail-maemo/tny-maemo-account-store.c:

(tny_maemo_account_store_alert):

        • libtinymail-olpc/tny-olpc-account-store.c:

(tny_olpc_account_store_alert):

        • tests/shared/account-store.c: (tny_test_account_store_alert):

Add a TnyAcccount* parameter to the alert_func vfunc, so that
applications an show information about the account (and server)
that failed. This is documented as sometimes being NULL for current
implementations (see the *ssl.c comment below).

        • camel/camel-session.h:
        • camel/camel-session.c: (camel_session_alert_user),

(camel_session_alert_user_with_id),
(camel_session_alert_user_generic): Added a CamelService*
paramteter to these functions. For tinymail, this allows us to use

CamelService?
data to get the TnyAccount*.

        • camel/camel-disco-diary.c: (camel_disco_diary_log),
(diary_decode_folder):
        • camel/providers/imap/camel-imap-command.c:
(camel_imap_command_response), (camel_imap_command_response_idle):
        • camel/providers/imap4/camel-imap4-engine.c:
(camel_imap4_engine_parse_resp_code):
        • camel/providers/imap4/camel-imap4-summary.c:
(courier_imap_is_a_piece_of_shit):
        • camel/providers/smtp/camel-smtp-transport.c: (smtp_connect):
Pass the CamelService?
data to camel_session_alert_user*().
        • camel/camel-tcp-stream-openssl.c: (ssl_verify):
        • camel/camel-tcp-stream-ssl.c: (ssl_bad_cert): Pass NULL for
service_user_data because I cannot see a suitable CamelService?.
See the TODOs.
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r2442 r2443  
     12007-07-10  Murray Cumming  <murrayc@murrayc.com> 
     2 
     3        * libtinymail/tny-account-store.h: alert_func vfunc: 
     4        * libtinymail/tny-account-store.c: (tny_account_store_alert): 
     5        * libtinymail-acap/tny-acap-account-store.c: 
     6        (tny_acap_account_store_alert): 
     7        * libtinymail-camel/tny-session-camel.c: 
     8        (tny_session_camel_do_an_error), (tny_session_camel_alert_user), 
     9        (foreach_account_set_connectivity): 
     10        * libtinymail-gnome-desktop/tny-gnome-account-store.c: 
     11        (tny_gnome_account_store_alert): 
     12        * libtinymail-gpe/tny-gpe-account-store.c: 
     13        (tny_gpe_account_store_alert): 
     14        * libtinymail-maemo/tny-maemo-account-store.c: 
     15        (tny_maemo_account_store_alert): 
     16        * libtinymail-olpc/tny-olpc-account-store.c: 
     17        (tny_olpc_account_store_alert): 
     18        * tests/shared/account-store.c: (tny_test_account_store_alert): 
     19        Add a TnyAcccount* parameter to the alert_func vfunc, so that  
     20        applications an show information about the account (and server)  
     21        that failed. This is documented as sometimes being NULL for current  
     22        implementations (see the *ssl.c comment below). 
     23 
     24        * camel/camel-session.h: 
     25        * camel/camel-session.c: (camel_session_alert_user), 
     26        (camel_session_alert_user_with_id), 
     27        (camel_session_alert_user_generic): Added a CamelService*  
     28        paramteter to these functions. For tinymail, this allows us to use  
     29        CamelService::data to get the TnyAccount*.  
     30        * camel/camel-disco-diary.c: (camel_disco_diary_log), 
     31        (diary_decode_folder): 
     32        * camel/providers/imap/camel-imap-command.c: 
     33        (camel_imap_command_response), (camel_imap_command_response_idle): 
     34        * camel/providers/imap4/camel-imap4-engine.c: 
     35        (camel_imap4_engine_parse_resp_code): 
     36        * camel/providers/imap4/camel-imap4-summary.c: 
     37        (courier_imap_is_a_piece_of_shit): 
     38        * camel/providers/smtp/camel-smtp-transport.c: (smtp_connect): 
     39        Pass the CamelService::data to camel_session_alert_user*(). 
     40        * camel/camel-tcp-stream-openssl.c: (ssl_verify): 
     41        * camel/camel-tcp-stream-ssl.c: (ssl_bad_cert): Pass NULL for  
     42        service_user_data because I cannot see a suitable CamelService.  
     43        See the TODOs. 
     44 
    1452007-07-10  Philip Van Hoof  <pvanhoof@gnome.org> 
    246 
  • trunk/libtinymail-acap/tny-acap-account-store.c

    r1911 r2443  
    4848 
    4949static gboolean 
    50 tny_acap_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
    51 { 
    52         TnyAcapAccountStorePriv *priv = TNY_ACAP_ACCOUNT_STORE_GET_PRIVATE (self); 
    53         return tny_account_store_alert (priv->real, type, error); 
     50tny_acap_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, const GError *error) 
     51{ 
     52        TnyAcapAccountStorePriv *priv = TNY_ACAP_ACCOUNT_STORE_GET_PRIVATE (self); 
     53        return tny_account_store_alert (priv->real, account, type, error); 
    5454} 
    5555 
  • trunk/libtinymail-camel/camel-lite/ChangeLog

    r2420 r2443  
    1  
    2  
    3  
    41Note: Please use this ChangeLog file only for merge changes (from upstream to 
    52this version, and the other way around). Changes to camel-lite that are 
  • trunk/libtinymail-camel/camel-lite/camel/camel-disco-diary.c

    r2420 r2443  
    203203                camel_session_alert_user_generic (camel_service_get_session (CAMEL_SERVICE (diary->store)), 
    204204                                          CAMEL_SESSION_ALERT_ERROR, 
    205                                           msg, FALSE); 
     205                                          msg, FALSE, CAMEL_SERVICE (diary->store)->data); 
    206206                g_free (msg); 
    207207 
     
    264264                        camel_session_alert_user_generic (camel_service_get_session (CAMEL_SERVICE (diary->store)), 
    265265                                                  CAMEL_SESSION_ALERT_WARNING, 
    266                                                   msg, FALSE); 
     266                                                  msg, FALSE, CAMEL_SERVICE (diary->store)->data); 
    267267                        g_free (msg); 
    268268                        g_free (name); 
  • trunk/libtinymail-camel/camel-lite/camel/camel-session.c

    r2420 r2443  
    415415 * @cancel: whether or not to provide a "Cancel" option in addition to 
    416416 * an "OK" option. 
     417 * @service: The CamelService. 
    417418 * 
    418419 * Presents an appropriate prompt to the user, in the style indicated by 
     
    424425gboolean 
    425426camel_session_alert_user (CamelSession *session, CamelSessionAlertType type, 
    426                           CamelException *ex, gboolean cancel
     427                          CamelException *ex, gboolean cancel, CamelService *service
    427428{ 
    428429        g_return_val_if_fail (CAMEL_IS_SESSION (session), FALSE); 
    429430        g_return_val_if_fail (ex, FALSE); 
    430431 
    431         return CS_CLASS (session)->alert_user (session, type, ex, cancel); 
     432        return CS_CLASS (session)->alert_user (session, type, ex, cancel, service); 
    432433} 
    433434 
     
    441442gboolean 
    442443camel_session_alert_user_with_id (CamelSession *session, CamelSessionAlertType type, 
    443                           ExceptionId id, const gchar* message, gboolean cancel
     444                          ExceptionId id, const gchar* message, gboolean cancel, CamelService *service
    444445{ 
    445446        g_return_val_if_fail (message, FALSE); 
     
    447448        CamelException ex = CAMEL_EXCEPTION_INITIALISER; 
    448449        camel_exception_set (&ex, id, message); 
    449         gboolean result = camel_session_alert_user (session, type, &ex, cancel); 
     450        gboolean result = camel_session_alert_user (session, type, &ex, cancel, service); 
    450451        camel_exception_clear (&ex); 
    451452        return result; 
     
    462463gboolean 
    463464camel_session_alert_user_generic (CamelSession *session, CamelSessionAlertType type, 
    464                           const gchar* message, gboolean cancel
     465                          const gchar* message, gboolean cancel, CamelService *service
    465466{ 
    466467        return camel_session_alert_user_with_id (session, type,  
    467                 CAMEL_EXCEPTION_SYSTEM, message, cancel); 
     468                CAMEL_EXCEPTION_SYSTEM, message, cancel, service); 
    468469} 
    469470 
  • trunk/libtinymail-camel/camel-lite/camel/camel-session.h

    r2420 r2443  
    9797                                              CamelSessionAlertType type, 
    9898                                              CamelException *ex, 
    99                                               gboolean cancel); 
     99                                              gboolean cancel, 
     100                                              CamelService *service); 
    100101 
    101102        CamelFilterDriver * (*get_filter_driver) (CamelSession *session, 
     
    154155                                                     CamelSessionAlertType type, 
    155156                                                     CamelException *ex, 
    156                                                      gboolean cancel); 
     157                                                     gboolean cancel, 
     158                                                     CamelService *service); 
    157159gboolean           camel_session_alert_user_generic (CamelSession *session, 
    158160                                                     CamelSessionAlertType type, 
    159161                                                     const gchar* message, 
    160                                                      gboolean cancel); 
     162                                                     gboolean cancel, 
     163                                                     CamelService *service); 
    161164gboolean           camel_session_alert_user_with_id (CamelSession *session, 
    162165                                                     CamelSessionAlertType type, 
    163166                                                     ExceptionId id, 
    164167                                                     const gchar* message, 
    165                                                      gboolean cancel); 
     168                                                     gboolean cancel, 
     169                                                     CamelService *service); 
    166170 
    167171gboolean           camel_session_is_online          (CamelSession *session); 
  • trunk/libtinymail-camel/camel-lite/camel/camel-tcp-stream-openssl.c

    r2420 r2443  
    861861                                    cert_str, x509_strerror (err)); 
    862862         
    863         ok = camel_session_alert_user_with_id (session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE); 
     863        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     864        ok = camel_session_alert_user_with_id (session, CAMEL_SESSION_ALERT_WARNING,  
     865                CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service); 
    864866        g_free (prompt); 
    865867         
  • trunk/libtinymail-camel/camel-lite/camel/camel-tcp-stream-ssl.c

    r2420 r2443  
    12001200         
    12011201                /* query the user to find out if we want to accept this certificate */ 
    1202                 accept = camel_session_alert_user_with_id (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE); 
     1202                CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1203                accept = camel_session_alert_user_with_id (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service); 
    12031204                g_free(prompt); 
    12041205                if (accept) { 
     
    12431244                        prompt = g_strdup_printf(_("Certificate problem: %s\nIssuer: %s"), cert->subjectName, cert->issuerName); 
    12441245 
    1245                         if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE)) { 
     1246                        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1247                        if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service)) { 
    12461248 
    12471249                                nick = get_nickname(cert); 
     
    12951297                        prompt = g_strdup_printf(_("Bad certificate domain: %s\nIssuer: %s"), cert->subjectName, cert->issuerName); 
    12961298 
    1297                         if (camel_session_alert_user_with_id (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE)) { 
     1299                        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1300                        if (camel_session_alert_user_with_id (ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service)) { 
    12981301                                host = SSL_RevealURL(sockfd); 
    12991302                                status = CERT_AddOKDomainName(cert, host); 
     
    13131316                        prompt = g_strdup_printf(_("Certificate expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName); 
    13141317 
    1315                         if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE)) { 
     1318                        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1319                        if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service)) { 
    13161320                                cert->timeOK = PR_TRUE; 
    13171321                                status = CERT_VerifyCertNow(cert->dbhandle, cert, TRUE, certUsageSSLClient, NULL); 
     
    13301334                        prompt = g_strdup_printf(_("Certificate revocation list expired: %s\nIssuer: %s"), cert->subjectName, cert->issuerName); 
    13311335 
    1332                         if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE)) { 
     1336                        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1337                        if (camel_session_alert_user_with_id(ssl->priv->session, CAMEL_SESSION_ALERT_WARNING, CAMEL_EXCEPTION_SERVICE_CERTIFICATE, prompt, TRUE, service)) { 
    13331338                                host = SSL_RevealURL(sockfd); 
    13341339                                status = CERT_AddOKDomainName(cert, host); 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-command.c

    r2420 r2443  
    445445                        msg = g_strdup_printf(_("Alert from IMAP server %s@%s:\n%s"), 
    446446                                              ((CamelService *)store)->url->user, ((CamelService *)store)->url->host, respbuf+12); 
    447                         camel_session_alert_user_generic(((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE); 
     447                        camel_session_alert_user_generic(((CamelService *)store)->session,  
     448                                CAMEL_SESSION_ALERT_WARNING, msg, FALSE, ((CamelService *)store)->data); 
    448449                        g_free(msg); 
    449450                } 
     
    506507                        msg = g_strdup_printf(_("Alert from IMAP server %s@%s:\n%s"), 
    507508                                              ((CamelService *)store)->url->user, ((CamelService *)store)->url->host, respbuf+12); 
    508                         camel_session_alert_user_generic(((CamelService *)store)->session, CAMEL_SESSION_ALERT_WARNING, msg, FALSE); 
     509                        camel_session_alert_user_generic(((CamelService *)store)->session,  
     510                                CAMEL_SESSION_ALERT_WARNING, msg, FALSE, ((CamelService *)store)->data); 
    509511                        g_free(msg); 
    510512                } else if (!g_ascii_strncasecmp (respbuf, "* BAD Invalid tag",17)) 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap4/camel-imap4-engine.c

    r2420 r2443  
    10311031                        goto exception; 
    10321032                 
    1033                 camel_session_alert_user_generic (engine->session, CAMEL_SESSION_ALERT_INFO, linebuf, FALSE); 
     1033                CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     1034                camel_session_alert_user_generic (engine->session, CAMEL_SESSION_ALERT_INFO, linebuf, FALSE, service ); 
    10341035                g_free (linebuf); 
    10351036        } else if (resp != NULL && code == CAMEL_IMAP4_RESP_CODE_PARSE) { 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap4/camel-imap4-summary.c

    r2420 r2443  
    751751                                   "message is simply unreadable by the IMAP server and will need " 
    752752                                   "to be given read permissions.", msg); 
    753          
    754         camel_session_alert_user_generic (session, CAMEL_SESSION_ALERT_WARNING, warning, FALSE); 
     753 
     754        CamelService *service = NULL; /* TODO: Is there a CamelService that we can use? */ 
     755        camel_session_alert_user_generic (session, CAMEL_SESSION_ALERT_WARNING, warning, FALSE, service); 
    755756        g_free (warning); 
    756757} 
  • trunk/libtinymail-camel/camel-lite/camel/providers/smtp/camel-smtp-transport.c

    r2420 r2443  
    507507 
    508508                        camel_session_alert_user (session, CAMEL_SESSION_ALERT_ERROR,  
    509                                 ex, FALSE); 
     509                                ex, FALSE, service->data); 
    510510 
    511511                        camel_service_disconnect (service, TRUE, NULL); 
  • trunk/libtinymail-camel/tny-session-camel.c

    r2439 r2443  
    169169 
    170170static gboolean 
    171 tny_session_camel_do_an_error (TnySessionCamel *self, TnyAlertType tnytype, gboolean question, GError *err) 
     171tny_session_camel_do_an_error (TnySessionCamel *self, TnyAccount *account, TnyAlertType tnytype, gboolean question, GError *err) 
    172172{ 
    173173        return tny_account_store_alert ( 
    174174                (TnyAccountStore*) self->priv->account_store,  
    175                 tnytype, question, (const GError *) err); 
     175                account, tnytype, question, (const GError *) err); 
    176176} 
    177177 
     
    183183 
    184184static gboolean 
    185 tny_session_camel_alert_user (CamelSession *session, CamelSessionAlertType type, CamelException *ex, gboolean cancel
     185tny_session_camel_alert_user (CamelSession *session, CamelSessionAlertType type, CamelException *ex, gboolean cancel, CamelService *service
    186186{ 
    187187        TnySessionCamel *self = (TnySessionCamel *)session; 
     
    189189        gboolean retval = FALSE; 
    190190        GError *err = NULL; 
     191 
     192        TnyAccount *account = NULL; 
     193        if (service && service->data) 
     194                account = TNY_ACCOUNT (service->data); 
    191195 
    192196        if (priv->account_store) 
     
    219223                tny_lockable_lock (self->priv->ui_lock); 
    220224 
    221                 retval = tny_session_camel_do_an_error (self, tnytype, TRUE, err); 
     225                TnyAccount *account = NULL; /* TODO. */ 
     226                retval = tny_session_camel_do_an_error (self, account, tnytype, TRUE, err); 
    222227 
    223228                tny_lockable_unlock (self->priv->ui_lock); 
     
    430435        BackgroundConnectInfo *info = udata; 
    431436        TnySessionCamel *self = info->user_data; 
    432  
     437         
    433438        if (data && TNY_IS_CAMEL_ACCOUNT (data)) 
    434439        { 
     440                TnyCamelAccount *account = TNY_CAMEL_ACCOUNT (data); 
     441                 
    435442                GError *err = NULL; 
    436443                TnyCamelAccountPriv *apriv = NULL; 
    437444 
    438445                /* We don't go online on transport accounts, yet */ 
    439                 if (TNY_IS_CAMEL_TRANSPORT_ACCOUNT (data)) 
     446                if (TNY_IS_CAMEL_TRANSPORT_ACCOUNT (account)) 
    440447                { 
    441                         g_signal_emit (TNY_CAMEL_ACCOUNT (data),  
     448                        g_signal_emit (account,  
    442449                                tny_camel_account_signals [TNY_CAMEL_ACCOUNT_SET_ONLINE_HAPPENED], 0, info->online); 
    443450                        return; 
    444451                } 
    445452 
    446                 apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (data); 
     453                apriv = TNY_CAMEL_ACCOUNT_GET_PRIVATE (account); 
    447454 
    448455                apriv->is_connecting = TRUE; 
    449456 
    450                 _tny_camel_account_try_connect (TNY_CAMEL_ACCOUNT (data), info->online, &err); 
     457                _tny_camel_account_try_connect (account, info->online, &err); 
    451458 
    452459                if (err == NULL) 
    453                         _tny_camel_account_set_online (TNY_CAMEL_ACCOUNT (data), info->online, &err); 
     460                        _tny_camel_account_set_online (account, info->online, &err); 
    454461 
    455462                if (err != NULL)  
     
    460467                                        tny_lockable_lock (self->priv->ui_lock); 
    461468 
    462                                 tny_session_camel_do_an_error (self, TNY_ALERT_TYPE_ERROR, FALSE, err); 
     469                                tny_session_camel_do_an_error (self, TNY_ACCOUNT (account), TNY_ALERT_TYPE_ERROR, FALSE, err); 
    463470 
    464471                                if (info->as_thread) 
  • trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c

    r2432 r2443  
    100100 
    101101static gboolean 
    102 tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     102tny_gnome_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    103103{ 
    104104        GtkMessageType gtktype; 
  • trunk/libtinymail-gpe/tny-gpe-account-store.c

    r2154 r2443  
    9898 
    9999static gboolean 
    100 tny_gpe_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     100tny_gpe_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    101101{ 
    102102        GtkMessageType gtktype; 
  • trunk/libtinymail-maemo/tny-maemo-account-store.c

    r2188 r2443  
    102102 
    103103static gboolean 
    104 tny_maemo_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     104tny_maemo_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    105105{ 
    106106        GtkMessageType gtktype; 
  • trunk/libtinymail-olpc/tny-olpc-account-store.c

    r2154 r2443  
    9797 
    9898static gboolean 
    99 tny_olpc_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     99tny_olpc_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    100100{ 
    101101        GtkMessageType gtktype; 
  • trunk/libtinymail/tny-account-store.c

    r2336 r2443  
    8080 * tny_account_store_alert: 
    8181 * @self: a #TnyAccountStore object 
     82 * @account: The account (This is NULL sometimes for some current implementations). 
    8283 * @type: the message type (severity) 
    8384 * @question: whether or not this is a question 
     
    108109 * <informalexample><programlisting> 
    109110 * static gboolean 
    110  * tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, const GError *error) 
     111 * tny_gnome_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, const GError *error) 
    111112 * { 
    112113 *     GtkMessageType gtktype; 
     
    151152 **/ 
    152153gboolean  
    153 tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     154tny_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    154155{ 
    155156        gboolean retval; 
     
    160161#endif 
    161162 
    162         retval = TNY_ACCOUNT_STORE_GET_IFACE (self)->alert_func (self, type, question, error); 
     163        retval = TNY_ACCOUNT_STORE_GET_IFACE (self)->alert_func (self, account, type, question, error); 
    163164 
    164165#ifdef DBC /* ensure */ 
  • trunk/libtinymail/tny-account-store.h

    r2335 r2443  
    7777        const gchar* (*get_cache_dir_func) (TnyAccountStore *self); 
    7878        TnyDevice* (*get_device_func) (TnyAccountStore *self); 
    79         gboolean (*alert_func) (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error); 
     79        gboolean (*alert_func) (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error); 
    8080        TnyAccount* (*find_account_func) (TnyAccountStore *self, const gchar *url_string); 
    8181 
     
    9797const gchar*  tny_account_store_get_cache_dir (TnyAccountStore *self); 
    9898TnyDevice* tny_account_store_get_device (TnyAccountStore *self); 
    99 gboolean tny_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error); 
     99gboolean tny_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error); 
    100100TnyAccount* tny_account_store_find_account (TnyAccountStore *self, const gchar *url_string); 
    101101 
  • trunk/tests/shared/account-store.c

    r2081 r2443  
    6666 
    6767static gboolean 
    68 tny_test_account_store_alert (TnyAccountStore *self, TnyAlertType type, gboolean question, const GError *error) 
     68tny_test_account_store_alert (TnyAccountStore *self, TnyAccount *account, TnyAlertType type, gboolean question, const GError *error) 
    6969{ 
    7070        return TRUE;