Changeset 906

Show
Ignore:
Timestamp:
09/08/06 17:36:59
Author:
pvanhoof
Message:

Documentation and API fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r905 r906  
    22 
    33        * Fixed the Python bindings 
    4  
     4        * Fixed the TnyIterator API (current -> get_current, as it's a 
     5        property like any other property) 
     6        * Added lots of samples to the API reference documentation 
     7 
     8        * This was a major API change in all libraries 
     9         
    5102006-09-06  Philip Van Hoof <pvanhoof@gnome.org> 
    611 
  • trunk/bindings/python/tinymail.override

    r900 r906  
    135135                 
    136136                tny_iterator_nth (iter, index); 
    137         ret = tny_iterator_current (iter); 
     137        ret = tny_iterator_get_current (iter); 
    138138        g_object_unref (G_OBJECT (ret)); 
    139139        g_object_unref (G_OBJECT (iter)); 
  • trunk/docs/devel/reference/tmpl/libtinymail-unused.sgml

    r904 r906  
    213213<!-- ##### SECTION ./tmpl/tny-password-dialog.sgml:Title ##### --> 
    214214TnyPasswordDialog 
    215  
    216  
    217 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Long_Description ##### --> 
    218 <para> 
    219  
    220 </para> 
    221  
    222  
    223 <!-- ##### SECTION ./tmpl/tny-shared.sgml:See_Also ##### --> 
    224 <para> 
    225  
    226 </para> 
    227  
    228  
    229 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Short_Description ##### --> 
    230 Shared include file with forward typedefs 
    231  
    232  
    233 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Stability_Level ##### --> 
    234  
    235  
    236  
    237 <!-- ##### SECTION ./tmpl/tny-shared.sgml:Title ##### --> 
    238 tny-shared 
    239215 
    240216 
     
    698674@get_folders_async_func:  
    699675 
    700 <!-- ##### STRUCT TnyFolderStoreQueryClass ##### --> 
    701 <para> 
    702  
    703 </para> 
    704  
    705 @parent:  
    706  
    707 <!-- ##### STRUCT TnyFolderStoreQueryItemClass ##### --> 
    708 <para> 
    709  
    710 </para> 
    711  
    712 @parent:  
    713  
    714676<!-- ##### USER_FUNCTION TnyForgetPassFunc ##### --> 
    715677<para> 
     
    721683 
    722684@self:  The #TnyAccount instance of which the password was not accepted 
    723  
    724 <!-- ##### STRUCT TnyFsStreamClass ##### --> 
    725 <para> 
    726  
    727 </para> 
    728  
    729 @parent:  
    730685 
    731686<!-- ##### USER_FUNCTION TnyGetFoldersCallback ##### --> 
     
    10531008@user_data: user data 
    10541009 
    1055 <!-- ##### STRUCT TnySimpleListClass ##### --> 
    1056 <para> 
    1057  
    1058 </para> 
    1059  
    1060 @parent:  
    1061  
    10621010<!-- ##### STRUCT TnyStoreAccountClass ##### --> 
    10631011<para> 
     
    13651313@folder:  
    13661314 
     1315<!-- ##### FUNCTION tny_iterator_current ##### --> 
     1316<para> 
     1317 
     1318</para> 
     1319 
     1320@self:  
     1321@Returns:  
     1322 
    13671323<!-- ##### FUNCTION tny_iterator_has_first ##### --> 
    13681324<para> 
  • trunk/docs/devel/reference/tmpl/tny-account-store.sgml

    r904 r906  
    3333 
    3434<!-- ##### VARIABLE tny_account_store_signals ##### --> 
    35 <para> 
    36  
    37 </para> 
    38  
    39  
    40 <!-- ##### STRUCT TnyAccountStore ##### --> 
    4135<para> 
    4236 
  • trunk/docs/devel/reference/tmpl/tny-account.sgml

    r904 r906  
    2323</para> 
    2424 
    25  
    26  
    27 <!-- ##### STRUCT TnyAccount ##### --> 
    28 <para> 
    29  
    30 </para> 
    3125 
    3226 
  • trunk/docs/devel/reference/tmpl/tny-device.sgml

    r904 r906  
    2020 
    2121<!-- ##### VARIABLE tny_device_signals ##### --> 
    22 <para> 
    23  
    24 </para> 
    25  
    26  
    27 <!-- ##### STRUCT TnyDevice ##### --> 
    2822<para> 
    2923 
  • trunk/docs/devel/reference/tmpl/tny-folder-store.sgml

    r904 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
    18  
    19  
    20 <!-- ##### STRUCT TnyFolderStore ##### --> 
    21 <para> 
    22  
    23 </para> 
    2418 
    2519 
  • trunk/docs/devel/reference/tmpl/tny-folder.sgml

    r904 r906  
    3131 
    3232 
    33 <!-- ##### STRUCT TnyFolder ##### --> 
    34 <para> 
    35  
    36 </para> 
    37  
    38  
    39 <!-- ##### SIGNAL TnyFolder::folder-inserted ##### --> 
    40 <para> 
    41  
    42 </para> 
    43  
    44 @tnyfolderiface: the object which received the signal. 
    45 @arg1:  
    46  
    47 <!-- ##### SIGNAL TnyFolder::folders-reloaded ##### --> 
    48 <para> 
    49  
    50 </para> 
    51  
    52 @tnyfolderiface: the object which received the signal. 
     33<!-- ##### MACRO TNY_TYPE_FOLDER_TYPE ##### --> 
     34<para> 
     35 
     36</para> 
     37 
     38 
    5339 
    5440<!-- ##### STRUCT TnyFolderIface ##### --> 
     
    7662@refresh_func:  
    7763 
    78 <!-- ##### MACRO TNY_TYPE_FOLDER_TYPE ##### --> 
    79 <para> 
    80  
    81 </para> 
    82  
    83  
    84  
    8564<!-- ##### FUNCTION tny_folder_type_get_type ##### --> 
    8665<para> 
  • trunk/docs/devel/reference/tmpl/tny-header.sgml

    r904 r906  
    2525</para> 
    2626 
    27  
    28  
    29 <!-- ##### STRUCT TnyHeader ##### --> 
    30 <para> 
    31  
    32 </para> 
    3327 
    3428 
  • trunk/docs/devel/reference/tmpl/tny-iterator.sgml

    r904 r906  
    1818 
    1919 
    20 <!-- ##### STRUCT TnyIterator ##### --> 
    21 <para> 
    22  
    23 </para> 
    24  
    25  
    2620<!-- ##### STRUCT TnyIteratorIface ##### --> 
    2721<para> 
     
    3428@first_func:  
    3529@nth_func:  
    36 @current_func:  
     30@get_current_func:  
    3731@is_done:  
    3832@get_list_func:  
     
    7165 
    7266 
    73 <!-- ##### FUNCTION tny_iterator_current ##### --> 
    74 <para> 
    75  
    76 </para> 
    77  
    78 @self:  
    79 @Returns:  
    80  
    81  
    8267<!-- ##### FUNCTION tny_iterator_is_done ##### --> 
    8368<para> 
  • trunk/docs/devel/reference/tmpl/tny-list.sgml

    r904 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
    18  
    19  
    20 <!-- ##### STRUCT TnyList ##### --> 
    21 <para> 
    22  
    23 </para> 
    2418 
    2519 
  • trunk/docs/devel/reference/tmpl/tny-mime-part.sgml

    r904 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
    18  
    19  
    20 <!-- ##### STRUCT TnyMimePart ##### --> 
    21 <para> 
    22  
    23 </para> 
    2418 
    2519 
  • trunk/docs/devel/reference/tmpl/tny-msg.sgml

    r904 r906  
    1717 
    1818<!-- ##### SECTION Stability_Level ##### --> 
    19  
    20  
    21 <!-- ##### STRUCT TnyMsg ##### --> 
    22 <para> 
    23  
    24 </para> 
    2519 
    2620 
  • trunk/docs/devel/reference/tmpl/tny-shared.sgml

    r903 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
     18 
     19 
     20<!-- ##### STRUCT TnyList ##### --> 
     21<para> 
     22 
     23</para> 
     24 
     25 
     26<!-- ##### STRUCT TnyIterator ##### --> 
     27<para> 
     28 
     29</para> 
    1830 
    1931 
     
    4254@first_func:  
    4355@nth_func:  
    44 @current_func:  
     56@get_current_func:  
    4557@is_done:  
    4658@get_list_func:  
     59 
     60<!-- ##### STRUCT TnyMsg ##### --> 
     61<para> 
     62 
     63</para> 
     64 
    4765 
    4866<!-- ##### STRUCT TnyMsgIface ##### --> 
     
    5876@del_part_func:  
    5977@add_part_func:  
     78 
     79<!-- ##### STRUCT TnyFolder ##### --> 
     80<para> 
     81 
     82</para> 
     83 
     84 
     85<!-- ##### SIGNAL TnyFolder::folder-inserted ##### --> 
     86<para> 
     87 
     88</para> 
     89 
     90@tnyfolderiface: the object which received the signal. 
     91@arg1:  
     92 
     93<!-- ##### SIGNAL TnyFolder::folders-reloaded ##### --> 
     94<para> 
     95 
     96</para> 
     97 
     98@tnyfolderiface: the object which received the signal. 
    6099 
    61100<!-- ##### STRUCT TnyFolderIface ##### --> 
     
    82121@refresh_async_func:  
    83122@refresh_func:  
     123 
     124<!-- ##### STRUCT TnyHeader ##### --> 
     125<para> 
     126 
     127</para> 
     128 
    84129 
    85130<!-- ##### STRUCT TnyHeaderIface ##### --> 
     
    110155@unset_flags_func:  
    111156 
     157<!-- ##### STRUCT TnyMimePart ##### --> 
     158<para> 
     159 
     160</para> 
     161 
     162 
    112163<!-- ##### STRUCT TnyMimePartIface ##### --> 
    113164<para> 
     
    132183@set_content_type_func:  
    133184@is_attachment_func:  
     185 
     186<!-- ##### STRUCT TnyAccount ##### --> 
     187<para> 
     188 
     189</para> 
     190 
    134191 
    135192<!-- ##### STRUCT TnyAccountIface ##### --> 
     
    158215@get_account_type_func:  
    159216 
     217<!-- ##### STRUCT TnyDevice ##### --> 
     218<para> 
     219 
     220</para> 
     221 
     222 
    160223<!-- ##### STRUCT TnyDeviceIface ##### --> 
    161224<para> 
     
    170233@connection_changed:  
    171234 
     235<!-- ##### STRUCT TnyStoreAccount ##### --> 
     236<para> 
     237 
     238</para> 
     239 
     240 
    172241<!-- ##### STRUCT TnyStoreAccountIface ##### --> 
    173242<para> 
     
    179248@unsubscribe_func:  
    180249 
     250<!-- ##### STRUCT TnyTransportAccount ##### --> 
     251<para> 
     252 
     253</para> 
     254 
     255 
    181256<!-- ##### STRUCT TnyTransportAccountIface ##### --> 
    182257<para> 
     
    188263 
    189264<!-- ##### STRUCT TnyAccountStore ##### --> 
     265<para> 
     266 
     267</para> 
     268 
     269 
     270<!-- ##### STRUCT TnyStream ##### --> 
    190271<para> 
    191272 
     
    243324 
    244325 
    245 <!-- ##### STRUCT TnyFsStreamClass ##### --> 
    246 <para> 
    247  
    248 </para> 
    249  
    250 @parent:  
     326<!-- ##### TYPEDEF TnyFsStreamClass ##### --> 
     327<para> 
     328 
     329</para> 
     330 
     331 
     332<!-- ##### STRUCT TnyFolderStore ##### --> 
     333<para> 
     334 
     335</para> 
     336 
    251337 
    252338<!-- ##### STRUCT TnyFolderStoreIface ##### --> 
  • trunk/docs/devel/reference/tmpl/tny-store-account.sgml

    r904 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
    18  
    19  
    20 <!-- ##### STRUCT TnyStoreAccount ##### --> 
    21 <para> 
    22  
    23 </para> 
    2418 
    2519 
  • trunk/docs/devel/reference/tmpl/tny-stream.sgml

    r904 r906  
    1616 
    1717<!-- ##### SECTION Stability_Level ##### --> 
    18  
    19  
    20 <!-- ##### STRUCT TnyStream ##### --> 
    21 <para> 
    22  
    23 </para> 
    2418 
    2519 
  • trunk/docs/devel/reference/tmpl/tny-transport-account.sgml

    r904 r906  
    1818 
    1919 
    20 <!-- ##### STRUCT TnyTransportAccount ##### --> 
    21 <para> 
    22  
    23 </para> 
    24  
    25  
    2620<!-- ##### STRUCT TnyTransportAccountIface ##### --> 
    2721<para> 
  • trunk/libtinymail-camel/tny-camel-common.c

    r900 r906  
    3939                while (!tny_iterator_is_done (iterator)) 
    4040                { 
    41                         TnyFolderStoreQueryItem *item = (TnyFolderStoreQueryItem*) tny_iterator_current (iterator); 
     41                        TnyFolderStoreQueryItem *item = (TnyFolderStoreQueryItem*) tny_iterator_get_current (iterator); 
    4242                        TnyFolderStoreQueryOption options = tny_folder_store_query_item_get_options (item); 
    4343                        regex_t *regex = tny_folder_store_query_item_get_regex (item); 
  • trunk/libtinymail-camel/tny-session-camel.c

    r900 r906  
    466466                while (!tny_iterator_is_done (iterator)) 
    467467                { 
    468                         TnyStoreAccount *account = (TnyStoreAccount*)tny_iterator_current (iterator); 
     468                        TnyStoreAccount *account = (TnyStoreAccount*)tny_iterator_get_current (iterator); 
    469469                         
    470470                        tny_camel_account_set_online_status (TNY_CAMEL_ACCOUNT (account), !online); 
     
    526526        CamelSession *session = (CamelSession*) self; 
    527527        TnyDevice *device = (TnyDevice*)tny_account_store_get_device (account_store); 
    528  
    529         self->account_store = (gpointer)account_store; 
    530  
    531         gchar *base_directory = g_strdup (tny_account_store_get_cache_dir (account_store)); 
     528        gchar *base_directory = NULL; 
    532529        gchar *camel_dir = NULL; 
     530 
     531        self->account_store = (gpointer)account_store;     
     532        base_directory = g_strdup (tny_account_store_get_cache_dir (account_store)); 
    533533     
    534534        if (G_LIKELY (camel_init (base_directory, TRUE) != 0)) 
    535535        { 
    536536                g_error (_("Critical ERROR: Cannot init %s as camel directory\n"), base_directory); 
     537                g_object_unref (G_OBJECT (device)); 
    537538                exit (1); 
    538539        } 
     
    552553 
    553554        tny_session_camel_set_device (self, device); 
     555     
     556        g_object_unref (G_OBJECT (device)); 
    554557 
    555558        return; 
  • trunk/libtinymail-gnome-desktop/tny-gnome-account-store.c

    r900 r906  
    590590        TnyGnomeAccountStorePriv *priv = TNY_GNOME_ACCOUNT_STORE_GET_PRIVATE (self); 
    591591 
    592         return priv->device
     592        return g_object_ref (G_OBJECT (priv->device))
    593593} 
    594594 
  • trunk/libtinymail-gpe/tny-gpe-account-store.c

    r900 r906  
    477477        TnyGpeAccountStorePriv *priv = TNY_GPE_ACCOUNT_STORE_GET_PRIVATE (self); 
    478478 
    479         return priv->device
     479        return g_object_ref (G_OBJECT (priv->device))
    480480} 
    481481 
  • trunk/libtinymail-maemo/tny-maemo-account-store.c

    r900 r906  
    479479        TnyMaemoAccountStorePriv *priv = TNY_MAEMO_ACCOUNT_STORE_GET_PRIVATE (self); 
    480480 
    481         return priv->device
     481        return g_object_ref (G_OBJECT (priv->device))
    482482} 
    483483 
  • trunk/libtinymail-olpc/tny-olpc-account-store.c

    r900 r906  
    351351        TnyOlpcAccountStorePriv *priv = TNY_OLPC_ACCOUNT_STORE_GET_PRIVATE (self); 
    352352 
    353         return priv->device
     353        return g_object_ref (G_OBJECT (priv->device))
    354354} 
    355355 
  • trunk/libtinymail-test/tny-account-test.c

    r900 r906  
    5555        tny_iterator_first (aiter); 
    5656     
    57         iface = TNY_ACCOUNT (tny_iterator_current (aiter)); 
     57        iface = TNY_ACCOUNT (tny_iterator_get_current (aiter)); 
    5858     
    5959        if (!iface) 
  • trunk/libtinymail-test/tny-folder-store-query-test.c

    r900 r906  
    5757        tny_iterator_first (aiter); 
    5858         
    59         account = TNY_STORE_ACCOUNT (tny_iterator_current (aiter)); 
     59        account = TNY_STORE_ACCOUNT (tny_iterator_get_current (aiter)); 
    6060        g_object_unref (G_OBJECT (aiter)); 
    6161 
     
    108108                 
    109109                iter = tny_list_create_iterator (folders); 
    110                 folder = (TnyFolder *) tny_iterator_current (iter); 
     110                folder = (TnyFolder *) tny_iterator_get_current (iter); 
    111111                tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 
    112112                                subfolders, query); 
     
    155155        {        
    156156                iter = tny_list_create_iterator (folders); 
    157                 folder = (TnyFolder *) tny_iterator_current (iter); 
     157                folder = (TnyFolder *) tny_iterator_get_current (iter); 
    158158                tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 
    159159                                subfolders, query); 
     
    201201        {        
    202202                iter = tny_list_create_iterator (folders); 
    203                 folder = (TnyFolder *) tny_iterator_current (iter); 
     203                folder = (TnyFolder *) tny_iterator_get_current (iter); 
    204204                tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 
    205205                                subfolders, query); 
     
    248248        {        
    249249                iter = tny_list_create_iterator (folders); 
    250                 folder = (TnyFolder *) tny_iterator_current (iter); 
     250                folder = (TnyFolder *) tny_iterator_get_current (iter); 
    251251                tny_folder_store_get_folders (TNY_FOLDER_STORE (folder), 
    252252                                subfolders, query); 
  • trunk/libtinymail-test/tny-folder-test.c

    r900 r906  
    6060        while (!tny_iterator_is_done (iter)) 
    6161        { 
    62                 TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_current (iter); 
     62                TnyFolderStore *folder = (TnyFolderStore*) tny_iterator_get_current (iter); 
    6363 
    6464                if (!strcmp (tny_folder_get_id (TNY_FOLDER (folder)), folname)) 
     
    8585        aiter = tny_list_create_iterator (accounts); 
    8686        tny_iterator_first (aiter); 
    87         account = TNY_STORE_ACCOUNT (tny_iterator_current (aiter)); 
     87        account = TNY_STORE_ACCOUNT (tny_iterator_get_current (aiter)); 
    8888         
    8989        recurse_folders (TNY_FOLDER_STORE (account), NULL, "INBOX/tny-folder-test", do_test_folder); 
     
    172172        iter = tny_list_create_iterator (headers); 
    173173        tny_iterator_first (iter); 
    174         header = (TnyHeader*)tny_iterator_current (iter); 
     174        header = (TnyHeader*)tny_iterator_get_current (iter); 
    175175 
    176176        /* Flag as removed */ 
  • trunk/libtinymail-test/tny-list-test.c

    r900 r906  
    104104     
    105105        tny_iterator_nth (iterator, 2); 
    106         item = (TnyTestObject*)tny_iterator_current (iterator); 
     106        item = (TnyTestObject*)tny_iterator_get_current (iterator); 
    107107         
    108108        str = g_strdup_printf ("Item should be \"3\" but is \"%s\"\n", item->str); 
     
    112112         
    113113        tny_iterator_next (iterator); 
    114         item = (TnyTestObject*)tny_iterator_current (iterator);        
     114        item = (TnyTestObject*)tny_iterator_get_current (iterator);    
    115115        str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 
    116116        gunit_fail_unless (!strcmp (item->str, "4"), str); 
     
    119119         
    120120        tny_iterator_prev (iterator); 
    121         item = (TnyTestObject*)tny_iterator_current (iterator);        
     121        item = (TnyTestObject*)tny_iterator_get_current (iterator);    
    122122        str = g_strdup_printf ("Item should be \"3\" but is \"%s\"\n", item->str); 
    123123        gunit_fail_unless (!strcmp (item->str, "3"), str); 
     
    126126         
    127127        tny_iterator_next (iterator); 
    128         item = (TnyTestObject*)tny_iterator_current (iterator);        
     128        item = (TnyTestObject*)tny_iterator_get_current (iterator);    
    129129        str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 
    130130        gunit_fail_unless (!strcmp (item->str, "4"), str); 
     
    132132        g_object_unref (G_OBJECT(item)); 
    133133 
    134         item = (TnyTestObject*)tny_iterator_current (iterator); 
     134        item = (TnyTestObject*)tny_iterator_get_current (iterator); 
    135135        str = g_strdup_printf ("Item should be \"4\" but is \"%s\"\n", item->str); 
    136136        gunit_fail_unless (!strcmp (item->str, "4"), str); 
     
    150150 
    151151        tny_iterator_first (iterator); 
    152         item = (TnyTestObject*)tny_iterator_current (iterator); 
     152        item = (TnyTestObject*)tny_iterator_get_current (iterator); 
    153153         
    154154        str = g_strdup_printf ("Item should be \"1\" but is %s\n", item->str); 
  • trunk/libtinymail/tny-account-store.c

    r900 r906  
    4242 * 
    4343 * This jump-to-the-ui method implements showing a message dialog with prompt 
    44  * as prompt. It will return TRUE if the reply was affirmative. Or FALSE if not. 
     44 * as prompt. It will return TRUE if the reply was affirmative or FALSE if not. 
    4545 * 
    4646 * Implementors: when implementing a platform-specific library, you must 
    47  * implement this method. For example in Gtk+ by using the GtkDialog API. 
     47 * implement this method. For example in Gtk+ by using the #GtkDialog API. 
     48 * 
     49 * Example implementation for Gtk+: 
     50 * <informalexample><programlisting> 
     51 * static gboolean 
     52 * tny_gnome_account_store_alert (TnyAccountStore *self, TnyAlertType type, const gchar *prompt) 
     53 * { 
     54 *      GtkMessageType gtktype; 
     55 *      gboolean retval = FALSE; 
     56 *      GtkWidget *dialog; 
     57 *      switch (type) 
     58 *      { 
     59 *              case TNY_ALERT_TYPE_INFO: 
     60 *              gtktype = GTK_MESSAGE_INFO; 
     61 *              break; 
     62 *              case TNY_ALERT_TYPE_WARNING: 
     63 *              gtktype = GTK_MESSAGE_WARNING; 
     64 *              break; 
     65 *              case TNY_ALERT_TYPE_ERROR: 
     66 *              default: 
     67 *              gtktype = GTK_MESSAGE_ERROR; 
     68 *              break; 
     69 *      } 
     70 *      dialog = gtk_message_dialog_new (NULL, GTK_DIALOG_MODAL, 
     71 *              gtktype, GTK_BUTTONS_YES_NO, prompt); 
     72 *      if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_YES) 
     73 *              retval = TRUE; 
     74 *      gtk_widget_destroy (dialog); 
     75 *      return retval; 
     76 * } 
     77 * </programlisting></informalexample> 
     78 * 
     79 * The @prompt will be a message like a question to the user whether or not he 
     80 * accepts the SSL certificate of the service. 
    4881 * 
    4982 * Return value: Whether the user pressed Ok/Yes (TRUE) or Cancel/No (FALSE) 
     
    6497 * @self: a #TnyAccountTransport object 
    6598 * 
    66  * This method returns a #TnyDevice instance 
     99 * This method returns a #TnyDevice instance. You must unreference the return 
     100 * value after use. 
    67101 * 
    68102 * Implementors: when implementing a platform-specific library, you must 
    69  * implement this method and a #TnyDevice implementation. 
     103 * implement this method and a #TnyDevice implementation.  
     104  
     105 * As the implementor of this method, you must add a reference count before  
     106 * returning. 
    70107 * 
    71108 * Return value: the device attached to this account store 
     
    90127 * Implementors: when implementing a platform-specific library, you must 
    91128 * implement this method. You can for example let it return the path to some 
    92  * folder on the file system. 
    93  * 
    94  * Note that the callers of this method will not free the result. You 
    95  * are responsible of freeing it up. For example when destroying the  
    96  * #TnyAccountStore implementation instance. 
    97  *  
     129 * folder in $HOME on the file system. 
     130 * 
     131 * Note that the callers of this method will not free the result. The 
     132 * implementor of a #TnyAccountStore is responsible of freeing it up. For 
     133 * example when destroying the instance. 
     134 * 
    98135 * Return value: the local path that will be used for storing the disk cache 
    99136 * 
     
    118155 * Get a read-only list of accounts in the store 
    119156 * 
     157 * Example: 
     158 * <informalexample><programlisting> 
     159 * TnyList *list = tny_simple_list_new (); 
     160 * tny_account_store_get_accounts (astore, list, TNY_ACCOUNT_STORE_STORE_ACCOUNTS); 
     161 * TnyIterator *iter = tny_list_create_iterator (list); 
     162 * while (!tny_iterator_is_done (iter)) 
     163 * { 
     164 *    TnyStoreAccount *cur = TNY_STORE_ACCOUNT (tny_iterator_get_current (iter)); 
     165 *    printf ("%s\n", tny_store_account_get_name (cur)); 
     166 *    g_object_unref (G_OBJECT (cur)); 
     167 *    tny_iterator_next (iter); 
     168 * } 
     169 * g_object_unref (G_OBJECT (iter)); 
     170 * g_object_unref (G_OBJECT (list)); 
     171 * </programlisting></informalexample> 
     172 * 
    120173 * Implementors: when implementing a platform-specific library, you must  
    121174 * implement this method. 
     
    126179 * libtinymail-camel specific tny_session_camel_set_current_accounts API. 
    127180 * 
    128  * The implementation must fillup @list with instances to the available accounts. 
     181 * The implementation must obviously fillup @list with available accounts. 
    129182 * Note that if you cache the list, you must add a reference to each account 
    130  * added to the list (they will be unreferenced and if the reference count 
    131  * would reaches zero, an account would no longer be cached). 
     183 * added to the list (else they will be unreferenced and if the reference count 
     184 * would reach zero, an account would no longer be cached). 
    132185 * 
    133186 * With libtinymail-camel each created account must also be informed about the 
    134187 * #TnySessionCamel instance being used. Read more about this at 
    135  * tny_account_set_session of the libtinymail-camel specific #TnyAccount. 
     188 * tny_camel_account_set_session of the libtinymail-camel specific  
     189 * #TnyCamelAccount. 
    136190 * 
    137191 * There are multiple samples of #TnyAccountStore implementations in 
  • trunk/libtinymail/tny-account.c

    r900 r906  
    2727 * @self: a #TnyAccount object 
    2828 * 
    29  * Get the account type. There's two account types: a store and a transport 
     29 * Get the account type. There are two account types: a store and a transport 
    3030 * account type. A store account will implement the #TnyFolderStore  
    3131 * interfaces which defines that the type contains folders. 
    3232 * 
    3333 * A transport account has a send method for sending #TnyMsg instances 
    34  * using the transport protocol of the account (for example using SMTP). 
     34 * using the transport protocol of the account (for example SMTP). 
    3535 * 
    3636 * Return value: The account type 
     
    7272 * @self: a #TnyAccount object 
    7373 *  
    74  * Get an unique id for the account. The only certainty you have is that the 
     74 * Get the unique id of the account. The only certainty you have is that the 
    7575 * id is unique. The format of the id isn't specified. The implementor of the 
    76  * #TnyAccountStore will set this id using tny_account_set_id. 
     76 * #TnyAccountStore must set this id using tny_account_set_id. 
    7777 *  
    7878 * Return value: Unique id 
     
    114114 * @id: the id 
    115115 * 
    116  * Set the account's unique id. You need to set this property before you can  
    117  * start using the account. The id must be unique and is typically set in the 
     116 * Set the unique id of the account. You need to set this property before you  
     117 * can start using the account. The id must be unique and is typically set in the 
    118118 * implementation of a #TnyAccountStore. 
    119119 *  
  • trunk/libtinymail/tny-device.c