Changeset 3150
- Timestamp:
- 12/17/07 21:14:37
- Files:
-
- trunk/ChangeLog (modified) (1 diff)
- trunk/docs/devel/reference/tmpl/tny-account.sgml (modified) (1 diff)
- trunk/libtinymail/tny-account-store.c (modified) (16 diffs)
- trunk/libtinymail/tny-account.c (modified) (47 diffs)
- trunk/libtinymail/tny-account.h (modified) (2 diffs)
- trunk/libtinymail/tny-combined-account.c (modified) (4 diffs)
- trunk/libtinymail/tny-connection-policy.c (modified) (5 diffs)
- trunk/libtinymail/tny-device.c (modified) (8 diffs)
- trunk/libtinymail/tny-error.c (modified) (4 diffs)
- trunk/libtinymail/tny-folder-change.c (modified) (22 diffs)
- trunk/libtinymail/tny-folder-monitor.c (modified) (7 diffs)
- trunk/libtinymail/tny-folder-observer.c (modified) (2 diffs)
- trunk/libtinymail/tny-folder-stats.c (modified) (7 diffs)
- trunk/libtinymail/tny-folder-store-change.c (modified) (11 diffs)
- trunk/libtinymail/tny-folder-store-observer.c (modified) (2 diffs)
- trunk/libtinymail/tny-folder-store-query.c (modified) (13 diffs)
- trunk/libtinymail/tny-folder-store.c (modified) (15 diffs)
- trunk/libtinymail/tny-folder.c (modified) (59 diffs)
- trunk/libtinymail/tny-fs-stream.c (modified) (4 diffs)
- trunk/libtinymail/tny-header.c (modified) (26 diffs)
- trunk/libtinymail/tny-iterator.c (modified) (9 diffs)
- trunk/libtinymail/tny-list.c (modified) (13 diffs)
- trunk/libtinymail/tny-lockable.c (modified) (3 diffs)
- trunk/libtinymail/tny-merge-folder.c (modified) (8 diffs)
- trunk/libtinymail/tny-mime-part.c (modified) (37 diffs)
- trunk/libtinymail/tny-msg-receive-strategy.c (modified) (2 diffs)
- trunk/libtinymail/tny-msg-remove-strategy.c (modified) (3 diffs)
- trunk/libtinymail/tny-msg.c (modified) (7 diffs)
- trunk/libtinymail/tny-noop-lockable.c (modified) (2 diffs)
- trunk/libtinymail/tny-pair.c (modified) (9 diffs)
- trunk/libtinymail/tny-password-getter.c (modified) (4 diffs)
- trunk/libtinymail/tny-progress-info.c (modified) (1 diff)
- trunk/libtinymail/tny-send-queue.c (modified) (9 diffs)
- trunk/libtinymail/tny-simple-list.c (modified) (2 diffs)
- trunk/libtinymail/tny-status.c (modified) (15 diffs)
- trunk/libtinymail/tny-store-account.c (modified) (9 diffs)
- trunk/libtinymail/tny-stream.c (modified) (9 diffs)
- trunk/libtinymail/tny-transport-account.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/ChangeLog
r3149 r3150 1 2007-12-17 Philip Van Hoof <pvanhoof@gnome.org> 2 3 * New documentation style, first commit (GtkDocFuture) 4 1 5 2007-12-17 Philip Van Hoof <pvanhoof@gnome.org> 2 6 trunk/docs/devel/reference/tmpl/tny-account.sgml
r3143 r3150 360 360 361 361 @self: 362 @cancel ed:362 @cancelled: 363 363 364 364 trunk/libtinymail/tny-account-store.c
r2825 r3150 18 18 */ 19 19 20 21 /** 22 * TnyAccountStore: 23 * 24 * A account store, holding a list of accounts 25 * 26 * free-function: g_object_unref 27 */ 28 20 29 #include <config.h> 21 30 … … 36 45 /** 37 46 * tny_account_store_find_account: 38 * @self: a #TnyAccountStore object47 * @self: a #TnyAccountStore 39 48 * @url_string: the url-string of the account to find 40 49 * 41 * Try to find the account in @self that corresponds to @url_string. If this 42 * method does not return NULL, the returned value is the found account and 43 * must be unreferenced after use. 44 * 45 * Implementors: when implementing a platform-specific library, you must 46 * implement this method. Let it return the account that corresponds to 47 * @url_string or let it return NULL. Also see tny_account_matches_url_string 48 * at #TnyAccount. 49 * 50 * This method can be used to resolve url-strings to #TnyAccount instances. 51 * 52 * Return value: the found account or NULL. 50 * Try to find the first account in account store @self that corresponds to 51 * @url_string. If found, the returned value must be unreferenced. 52 * 53 * returns (null-ok) (caller-owns): the found account or NULL 54 * since: 1.0 55 * audience: application-developer 56 * complexity: high 53 57 **/ 54 58 TnyAccount* … … 61 65 g_assert (url_string); 62 66 g_assert (strlen (url_string) > 0); 63 g_assert (strstr (url_string, ": //"));67 g_assert (strstr (url_string, ":")); 64 68 g_assert (TNY_ACCOUNT_STORE_GET_IFACE (self)->find_account_func != NULL); 65 69 #endif … … 79 83 /** 80 84 * tny_account_store_alert: 81 * @self: a #TnyAccountStore object82 * @account : The account (This is NULL sometimes for some current implementations).83 * @type: the message type (severity)85 * @self: a #TnyAccountStore 86 * @account (null-ok): The account or NULL 87 * @type: alert type 84 88 * @question: whether or not this is a question 85 * @error: A GError, of domain TNY_ACCOUNT_ERROR or TNY_ACCOUNT_STORE_ERROR, 86 * which should be used to determine what to show to the user. 87 * 88 * This jump-to-the-ui method implements showing a message dialog appropriate 89 * @error: A #GError with the alert 90 * 91 * This callback method must implements showing a message dialog appropriate 89 92 * for the @error and @type as message type. It will return TRUE if the reply 90 93 * was affirmative or FALSE if not. 91 94 * 92 * You must not try reconnecting in the implementation of this method. 93 * 94 * Implementors: when implementing a platform-specific library, you must 95 * implement this method. For example in GTK+ by using the #GtkDialog API. The 96 * implementation will, for example, be used to ask the user about accepting SSL 97 * certificates. The two possible answers that must be supported are 98 * "Yes" and "No" which must result in a TRUE or a FALSE return value, though 99 * your implementation should attempt to use explicit button names such as 100 * "Accept Certificate" and "Reject Certificate". Likewise, the dialog should be 101 * arranged according the the user interface guidelines of your target platform. 95 * The two possible answers that must be supported are "Yes" and "No" which must 96 * result in a TRUE or a FALSE return value, though your implementation should 97 * attempt to use explicit button names such as "Accept Certificate" and 98 * "Reject Certificate". Likewise, the dialog should be arranged according to 99 * the user interface guidelines of your target platform. 102 100 * 103 101 * Although there is a @question parameter, there is not always certainty about … … 149 147 * </programlisting></informalexample> 150 148 * 151 * Return value: Whether the user pressed Ok/Yes (TRUE) or Cancel/No (FALSE) 149 * returns: Affirmative = TRUE, Negative = FALSE 150 * since: 1.0 151 * audience: platform-developer, application-developer, type-implementer 152 152 **/ 153 153 gboolean … … 171 171 /** 172 172 * tny_account_store_get_device: 173 * @self: a #TnyAccountStore object 174 * 175 * This method returns a #TnyDevice instance. You must unreference the return 176 * value after use. 177 * 178 * Implementors: when implementing a platform-specific library, you must 179 * implement this method by letting it return a #TnyDevice instance. You must 180 * add a reference count before returning. 181 * 182 * Return value: the device attached to this account store 183 * 173 * @self: a #TnyAccountStore 174 * 175 * This method returns the #TnyDevice instance used by #TnyAccountStore @self. You 176 * must unreference the return value after use. 177 * 178 * returns (caller-owns): the device used by @self 179 * since: 1.0 180 * audience: application-developer 184 181 **/ 185 182 TnyDevice* … … 205 202 /** 206 203 * tny_account_store_get_cache_dir: 207 * @self: a #TnyAccountStore object204 * @self: a #TnyAccountStore 208 205 * 209 * Get the local path that will be used for storing the disk cache 210 * 211 * Implementors: when implementing a platform-specific library, you must 212 * implement this method. You can for example let it return the path to some 213 * folder in $HOME on the file system. 214 * 215 * Note that the callers of this method will not free the result. The 216 * implementor of a #TnyAccountStore is responsible for freeing it up. For 217 * example when destroying @self (in its finalize method). 218 * 219 * Return value: the local path that will be used for storing the disk cache 220 * 206 * Returns the path that will be used for storing cache. Note that the callers 207 * of this method will not free up the result. The implementation of 208 * #TnyAccountStore @self is responsible for freeing up. 209 * 210 * returns: cache's path 211 * since: 1.0 212 * audience: platform-developer, type-implementer 221 213 **/ 222 214 const gchar* … … 243 235 /** 244 236 * tny_account_store_get_accounts: 245 * @self: a #TnyAccountStore object246 * @list: a #TnyList instancethat will be filled with #TnyAccount instances247 * @types: a #TnyGetAccountsRequestType that describes which account types are needed237 * @self: a #TnyAccountStore 238 * @list: a #TnyList that will be filled with #TnyAccount instances 239 * @types: a #TnyGetAccountsRequestType that indicates which account types are wanted 248 240 * 249 * Get a read-only list of accounts in the store. You must not change @list 250 * except for referencing and unreferencing. 241 * Get a list of accounts in the account store @self. 251 242 * 252 243 * Example: … … 266 257 * </programlisting></informalexample> 267 258 * 268 * Implementors: when implementing a platform-specific library, you must 269 * implement this method. 270 * 271 * It is allowed to cache the list (but not required). If you are implementing 272 * an account store for account implementations from libtinymail-camel, you must 273 * register the created accounts with a #TnySessionCamel instance using the 274 * libtinymail-camel specific tny_session_camel_set_current_accounts API. 275 * 276 * If you use the #TnySessionCamel to register accounts, you must after 277 * registering your last initial account call the tny_session_camel_set_initialized 278 * API. 279 * 280 * The implementation must fillup @list with available accounts. Note that if 259 * When implementing this API it is allowed but not required to cache the list. 260 * If you are implementing an account store for #TnyCamelAccount account 261 * instances, register the created accounts with a #TnySessionCamel instance 262 * using the API tny_session_camel_set_current_accounts right after creating 263 * the accounts for the first time. 264 * 265 * If you use the #TnySessionCamel to register accounts, register each account 266 * using tny_camel_account_set_session and after registering your last account 267 * use the API tny_session_camel_set_initialized 268 * 269 * The method must fill up @list with available accounts. Note that if 281 270 * you cache the list, you must add a reference to each account added to the 282 * list (else they will be unreferenced and if the reference count would reach 283 * zero, an account would no longer be correctly cached). 284 * 285 * With libtinymail-camel each created account must also be informed about the 286 * #TnySessionCamel instance being used. Read more about this at 287 * tny_camel_account_set_session of the libtinymail-camel specific 288 * #TnyCamelAccount. 271 * list. 289 272 * 290 273 * There are multiple samples of #TnyAccountStore implementations in … … 295 278 * The get_pass and forget_pass functionality of the example below is usually 296 279 * implemented by utilizing a #TnyPasswordGetter that is returned by the 297 * #TnyPlatformFactory , that is usually available from the #TnyAccountStore.280 * #TnyPlatformFactory. 298 281 * 299 282 * Example (that uses a cache): … … 347 330 * } 348 331 * </programlisting></informalexample> 332 * 333 * since: 1.0 334 * audience: platform-developer, application-developer, type-implementer 349 335 **/ 350 336 void … … 379 365 * @user_data: user data set when the signal handler was connected. 380 366 * 381 * Emitted when the store starts trying to connect the accounts 367 * Emitted when the store starts trying to connect the accounts. Usage of this 368 * signal is not recommended as it's a candidate for API changes. 369 * 370 * since: 1.0 382 371 */ 383 372 tny_account_store_signals[TNY_ACCOUNT_STORE_CONNECTING_STARTED] = … … 401 390 * GType system helper function 402 391 * 403 * Return value: a GType 392 * returns: a #GType 393 * since: 1.0 404 394 **/ 405 395 GType … … 436 426 * GType system helper function 437 427 * 438 * Return value: a GType 428 * returns: a #GType 429 * since: 1.0 439 430 **/ 440 431 GType … … 459 450 * GType system helper function 460 451 * 461 * Return value: a GType 452 * returns: a #GType 453 * since: 1.0 462 454 **/ 463 455 GType … … 484 476 * GType system helper function 485 477 * 486 * Return value: a GType 478 * returns: a #GType 479 * since: 1.0 487 480 **/ 488 481 GType trunk/libtinymail/tny-account.c
r3125 r3150 18 18 */ 19 19 20 /** 21 * TnyAccount: 22 * 23 * A abstract account type with API shared between #TnyStoreAccount and 24 * #TnyTransportAccount. 25 * 26 * free-function: g_object_unref 27 */ 28 20 29 #include <config.h> 21 30 … … 34 43 /** 35 44 * tny_account_get_connection_policy: 36 * @self: a #TnyAccount object45 * @self: a #TnyAccount 37 46 * 38 47 * Get the connection policy for @self. You must unreference the returned 39 48 * value when you are finished with used it. 40 49 * 41 * Return value: connection policy 50 * returns (caller-owns): connection policy 51 * since: 1.0 52 * audience: application-developer, platform-developer 42 53 **/ 43 54 TnyConnectionPolicy* … … 62 73 /** 63 74 * tny_account_set_connection_policy: 64 * @self: a #TnyAccount object65 * @policy: the#TnyConnectionStrategy75 * @self: a #TnyAccount 76 * @policy: a #TnyConnectionStrategy 66 77 * 67 78 * Set the connection strategy for @self. 79 * 80 * since: 1.0 81 * audience: application-developer, platform-developer 68 82 **/ 69 83 void … … 87 101 /** 88 102 * tny_account_is_ready: 89 * @self: a #TnyAccount object103 * @self: a #TnyAccount 90 104 * 91 105 * Some implementations of #TnyAccount need registration in a subsystem or … … 94 108 * This boolean property will tell you if @self is ready for that. 95 109 * 96 * Return value: whether @self is ready for use 110 * returns: TRUE if @self is ready for use, else FALSE 111 * since: 1.0 112 * audience: platform-developer 97 113 **/ 98 114 gboolean … … 116 132 /** 117 133 * tny_account_start_operation: 118 * @self: a #TnyAccount object119 * @domain: the domain of the #TnyStatus instancesthat will happen in @status_callback120 * @code: the code of the #TnyStatus instancesthat will happen in @status_callback134 * @self: a #TnyAccount 135 * @domain: the domain of the #TnyStatus that will happen in @status_callback 136 * @code: the code of the #TnyStatus that will happen in @status_callback 121 137 * @status_callback: status callback handler 122 138 * @status_user_data: the user-data to give to the @status_callback 123 139 * 124 * Start an operation. This only works with methods that don't end with _async. 140 * Starts an operation. This only works for methods that don't end with _async. 141 * 142 * since: 1.0 143 * audience: application-developer 125 144 **/ 126 145 void … … 142 161 /** 143 162 * tny_account_stop_operation: 144 * @self: a #TnyAccount object145 * @cancel ed: NULL or byref whether the operation got canceled146 * 147 * Stop the current operation. This only works withmethods that don't end163 * @self: a #TnyAccount 164 * @cancelled (out): NULL or byref whether the operation got canceled 165 * 166 * Stop the current operation. This only works for methods that don't end 148 167 * with _async. 168 * 169 * since: 1.0 170 * audience: application-developer 149 171 **/ 150 172 void 151 tny_account_stop_operation (TnyAccount *self, gboolean *cancel ed)173 tny_account_stop_operation (TnyAccount *self, gboolean *cancelled) 152 174 { 153 175 #ifdef DBC /* require */ … … 156 178 #endif 157 179 158 TNY_ACCOUNT_GET_IFACE (self)->stop_operation_func (self, cancel ed);180 TNY_ACCOUNT_GET_IFACE (self)->stop_operation_func (self, cancelled); 159 181 160 182 #ifdef DBC /* ensure*/ … … 166 188 /** 167 189 * tny_account_matches_url_string: 168 * @self: a #TnyAccount object190 * @self: a #TnyAccount 169 191 * @url_string: the url-string of the account to find 170 192 * 171 * Find out whether the account matches a certainurl_string.172 * 173 * Implementors: Be forgiving about things like passwords in the url_string:193 * Returns whether the account's url-string matches @url_string. 194 * 195 * When implementing be forgiving about things like passwords in the url_string: 174 196 * while matching the folder, password and message-id pieces are insignificant. 175 197 * 176 198 * An example url_string can be imap://user:password@server/INBOX/005. Only 177 199 * "imap://user@server" is significant when searching. Also take a look at 178 * RFC 1808 and RFC 4467 for more information on url_string formatting. 179 * 180 * This method must be usable with and will be used for 181 * tny_account_store_find_account. 182 * 183 * Return value: whether or not @self matches with @url_string. 200 * RFC 1808 and RFC 4467 for more information on url-string formatting. 201 * 202 * This method will be used by tny_account_store_find_account(). 203 * 204 * returns: TRUE if @self matches with @url_string, else FALSE 205 * since: 1.0 206 * audience: application-developer, platform-developer 184 207 **/ 185 208 gboolean … … 205 228 /** 206 229 * tny_account_cancel: 207 * @self: a #TnyAccount object230 * @self: a #TnyAccount 208 231 * 209 232 * Try to cancel the current operation that is happening. This API, though, 210 * guarantees nothing about any cancelations. 233 * makes no guarantees about any cancellations taking place (it's a try). 234 * 235 * Since relatively few guarantees can be made, using this API is not recommended. 236 * 237 * since: 1.0 238 * audience: application-developer 211 239 **/ 212 240 void … … 228 256 /** 229 257 * tny_account_get_account_type: 230 * @self: a #TnyAccount object258 * @self: a #TnyAccount 231 259 * 232 260 * Get the account type of @self. There are two account types: a store and … … 237 265 * 238 266 * A transport account has a send method for sending #TnyMsg instances 239 * using the transport implemented by the account (for example SMTP). 240 * 241 * Return value: The account type 267 * using the transport layer the account uses. For example SMTP. 268 * 269 * returns: The account type 270 * since: 1.0 271 * audience: application-developer 242 272 **/ 243 273 TnyAccountType … … 262 292 /** 263 293 * tny_account_get_connection_status: 264 * @self: a #TnyAccount object 265 * 266 * Get the connection status of @self 267 * 268 * Return value: the status of the connection 294 * @self: a #TnyAccount 295 * 296 * Get the status of the connection for account @self. 297 * 298 * returns: the status of the connection 299 * since: 1.0 300 * complexity: low 301 * audience: application-developer 269 302 **/ 270 303 TnyConnectionStatus … … 289 322 /** 290 323 * tny_account_get_id: 291 * @self: a #TnyAccount object292 * 293 * Get the unique id of @self 324 * @self: a #TnyAccount 325 * 326 * Get the unique id of @self. 294 327 * 295 328 * A certainty you have about this property is that the id is unique in the 296 * #TnyAccountStore. It doesn't have to be unique in the entire application. 297 * 298 * The format of the id isn't specified. The implementor of the #TnyAccountStore 329 * #TnyAccountStore that contains @self. It doesn't have to be unique in the 330 * entire application if you have multiple #TnyAccountStore instances (which 331 * is unlikely). 332 * 333 * The format of the id isn't specified. The implementer of the #TnyAccountStore 299 334 * must set this id using tny_account_set_id. 300 335 * 301 * Return value: Unique id 336 * returns: unique id 337 * since: 1.0 338 * audience: application-developer 302 339 **/ 303 340 const gchar* … … 323 360 /** 324 361 * tny_account_set_name: 325 * @self: a #TnyAccount object362 * @self: a #TnyAccount 326 363 * @name: the name 327 364 * 328 365 * Set the account's human readable name 329 366 * 367 * since: 1.0 368 * audience: platform-developer 330 369 **/ 331 370 void … … 358 397 /** 359 398 * tny_account_set_secure_auth_mech: 360 * @self: a #TnyAccount object399 * @self: a #TnyAccount 361 400 * @mech: the authentication mechanism 362 401 * … … 381 420 * Other relevant standards: 382 421 * - <ulink url="http://www.faqs.org/rfcs/rfc1731.html">RFC 1731 - IMAP4 Authentication Mechanisms</ulink> 383 * 422 * 423 * since: 1.0 424 * audience: platform-developer 384 425 **/ 385 426 void … … 404 445 /** 405 446 * tny_account_set_id: 406 * @self: a #TnyAccount object447 * @self: a #TnyAccount 407 448 * @id: the id 408 449 * … … 410 451 * can start using the account. The id must be unique in a #TnyAccountStore and 411 452 * is typically set in the implementation of a #TnyAccountStore. 412 * 453 * 454 * since: 1.0 455 * audience: platform-developer 413 456 **/ 414 457 void … … 433 476 /** 434 477 * tny_account_set_forget_pass_func: 435 * @self: a #TnyAccount object478 * @self: a #TnyAccount 436 479 * @forget_pass_func: a pointer to the function 437 480 * … … 469 512 * } 470 513 * </programlisting></informalexample> 514 * 515 * since: 1.0 516 * audience: platform-developer 471 517 **/ 472 518 void … … 489 535 /** 490 536 * tny_account_get_forget_pass_func: 491 * @self: a #TnyAccount object492 * 493 * Get a pointer to the forget-password function 494 * 495 * Return value: A pointer to the forget-password function537 * @self: a #TnyAccount 538 * 539 * Get a pointer to the forget-password function for @self. 540 * 541 * returns: A pointer to the forget-password function 496 542 **/ 497 543 TnyForgetPassFunc … … 515 561 /** 516 562 * tny_account_set_url_string: 517 * @self: a #TnyAccount object563 * @self: a #TnyAccount 518 564 * @url_string: the url string (ex. mbox://path) 519 565 * 520 566 * Set the url string of @self (RFC 1808). You don't need to use this for imap 521 * and pop where you can use the simplified API (set_proto, set_hostname, etc). 522 * This property is typically set in the implementation of a #TnyAccountStore. 523 * 524 * For example the url_string for an SMTP account that uses SSL with authentication 567 * and pop where you can use the simplified API (tny_account_set_proto(), 568 * tny_account_set_hostname(), etc). This property is typically set in the 569 * implementation of a #TnyAccountStore. 570 * 571 * For example the url-string for an SMTP account that uses SSL with authentication 525 572 * type PLAIN: smtp://user;auth=PLAIN@smtp.server.com/;use_ssl=wrapped 526 573 * 527 * Don't forget to set the name, type and proto setting of the account too. 574 * Don't forget to set the name, type and protocol setting of the account too. 575 * 576 * since: 1.0 577 * audience: platform-developer 528 578 **/ 529 579 void … … 553 603 /** 554 604 * tny_account_set_proto: 555 * @self: a #TnyAccount object605 * @self: a #TnyAccount 556 606 * @proto: the protocol (ex. "imap") 557 607 * … … 559 609 * using the account. This property is typically set in the implementation 560 610 * of a #TnyAccountStore. 561 * 611 * 612 * since: 1.0 613 * audience: platform-developer 562 614 **/ 563 615 void … … 582 634 /** 583 635 * tny_account_set_user: 584 * @self: a #TnyAccount object636 * @self: a #TnyAccount 585 637 * @user: the username 586 638 * 587 * Set the user or login of @self. You need to set this property before you 588 * can start using the account. This property is typically set in the 589 * implementation of a #TnyAccountStore. 590 * 639 * Set the user or login of account @self. You need to set this property 640 * before you can start using the account. This property is typically set 641 * in the implementation of a #TnyAccountStore. 642 * 643 * since: 1.0 644 * complexity: high 645 * audience: platform-developer 591 646 **/ 592 647 void … … 612 667 /** 613 668 * tny_account_set_hostname: 614 * @self: a #TnyAccount object669 * @self: a #TnyAccount 615 670 * @host: the hostname 616 671 * 617 * Set the hostname of @self. You need to set this property before you can start 618 * using the account. This property is typically set in the implementation of a 619 * #TnyAccountStore. 620 * 672 * Set the hostname of account @self. You need to set this property before you 673 * can start using the account. This property is typically set in the 674 * implementation of a #TnyAccountStore. 675 * 676 * since: 1.0 677 * audience: platform-developer 621 678 **/ 622 679 void … … 644 701 /** 645 702 * tny_account_set_port: 646 * @self: a #TnyAccount object647 * @port: the port to connect to on the hostname 703 * @self: a #TnyAccount 704 * @port: the port to connect to on the hostname of @self 648 705 * 649 706 * Set the port of @self. If you don't set this property, the default port for 650 * the protocol will be used (for example 143 and 993 for IMAP and 110 for POP3). 651 * 707 * the protocol will be used (for example 143, 993 for IMAP and 110, 995 for POP3). 708 * 709 * since: 1.0 710 * audience: platform-developer 652 711 **/ 653 712 void … … 670 729 /** 671 730 * tny_account_set_pass_func: 672 * @self: a #TnyAccount object731 * @self: a #TnyAccount 673 732 * @get_pass_func: a pointer to the function 674 733 * … … 681 740 * this property as the last of all properties that you will set to an account 682 741 * in the #TnyAccountStore. 742 * 743 * If possible, use the mlock() syscall on this memory. 683 744 * 684 745 * Also see #TnyGetPassFunc for more information about the function itself. … … 696 757 * retval = (gchar*) tny_password_getter_get_password (pwdgetter, 697 758 * tny_account_get_id (account), prompt, cancel); 698 * g_object_unref (G_OBJECT (pwdgetter)); 759 * mlock (retval, strlen (retval)); 760 * g_object_unref (pwdgetter); 699 761 * return retval; 700 762 * } … … 707 769 * tny_account_set_pass_func (account, per_account_get_pass_func); 708 770 * tny_list_prepend (list, (GObject*)account); 709 * g_object_unref ( G_OBJECT (account));771 * g_object_unref (account); 710 772 * ... 711 773 * } 712 774 * </programlisting></informalexample> 775 * 776 * since: 1.0 777 * audience: platform-developer 713 778 **/ 714 779 void … … 731 796 /** 732 797 * tny_account_get_proto: 733 * @self: a #TnyAccount object798 * @self: a #TnyAccount 734 799 * 735 800 * Get the protocol of @self. The returned value should not be freed. 736 801 * 737 * Return value: the protocol as a read-only string 738 * 802 * returns: the protocol as a read-only string 803 * since: 1.0 804 * audience: application-developer 739 805 **/ 740 806 const gchar* … … 760 826 /** 761 827 * tny_account_get_url_string: 762 * @self: a #TnyAccount object763 * 764 * Get the url string of @self or NULL if it's impossible to determine the url765 * string of @self. If not NULL, the returned value must be freed.828 * @self: a #TnyAccount 829 * 830 * Get the url-string of account @self or NULL if it's impossible to determine 831 * the url-string of @self. If not NULL, the returned value must be freed. 766 832 * 767 833 * The url string is specified in RFC 1808 and looks for example like this: 768 834 * imap://user@hostname. Note that it doesn't necessarily contain the password 769 * of the IMAP account. 770 * 771 * Return value: the url string or NULL. 835 * of the account. 836 * 837 * returns (null-ok) (caller-owns): the url-string or NULL. 838 * since: 1.0 839 * audience: application-developer 772 840 **/ 773 841 gchar* … … 785 853 #ifdef DBC /* ensure */ 786 854 if (retval) 787 g_assert (strstr (retval, ": //") != NULL);855 g_assert (strstr (retval, ":") != NULL); 788 856 #endif 789 857 … … 794 862 /** 795 863 * tny_account_get_user: 796 * @self: a #TnyAccount object 797 * 798 * Get the user or login of @self. The returned value should not be freed. The 799 * returned value van be NULL in case of no user. 800 * 801 * Return value: the user as a read-only string 802 * 864 * @self: a #TnyAccount 865 * 866 * Get the user or login of account @self. The returned value should 867 * not be freed. The returned value can be NULL. 868 * 869 * returns: the user as a read-only string 870 * since: 1.0 871 * audience: application-developer 803 872 **/ 804 873 const gchar* … … 822 891 /** 823 892 * tny_account_get_name: 824 * @self: a #TnyAccount object 825 * 826 * Get the human readable name of @self. The returned value should not 827 * be freed. The returned value van be NULL in case of no human reabable name. 828 * 829 * Return value: the human readable name as a read-only string 830 * 893 * @self: a #TnyAccount 894 * 895 * Get the human readable name of account@self. The returned value should not 896 * be freed. The returned value can be NULL. 897 * 898 * returns: the human readable name as a read-only string 899 * since: 1.0 900 * audience: application-developer 831 901 **/ 832 902 const gchar* … … 851 921 /** 852 922 * tny_account_get_secure_auth_mech: 853 * @self: a #TnyAccount object 854 * 855 * Get the secure authentication mechanism for this account. Default is "PLAIN". The 856 * returned value can be NULL, in which case a undefined default is used. 857 * 858 * Return value: the authentication mechanism as a read-only string 859 * 923 * @self: a #TnyAccount 924 * 925 * Get the secure authentication mechanism for this account. Default is "PLAIN". 926 * The returned value can be NULL, in which case a undefined default is used. 927 * The returned value should not be freed. 928 * 929 * returns: the authentication mechanism as a read-only string 930 * since: 1.0 931 * audience: application-developer 860 932 **/ 861 933 const gchar* … … 886 958 * for a local account). 887 959 * 888 * Return value: the hostname as a read-only string 889 * 960 * returns: the hostname as a read-only string 961 * since: 1.0 962 * audience: application-developer 890 963 **/ 891 964 const gchar* … … 910 983 /** 911 984 * tny_account_get_port: 912 * @self: a #TnyAccount object985 * @self: a #TnyAccount 913 986 * 914 987 * Get the port of @self. 915 988 * 916 * Return value: the port 989 * returns: the port 990 * since: 1.0 991 * audience: application-developer 917 992 **/ 918 993 guint … … 935 1010 /** 936 1011 * tny_account_get_pass_func: 937 * @self: a #TnyAccount object1012 * @self: a #TnyAccount 938 1013 * 939 1014 * Get a pointer to the get-password function 940 1015 * 941 * Return value: A pointer to the get-password function 1016 * returns: A pointer to the get-password function 1017 * since: 1.0 1018 * audience: application-developer 942 1019 **/ 943 1020 TnyGetPassFunc … … 975 1052 * 976 1053 * Emitted when the connection status of an account changes. 1054 * 1055 * since: 1.0 1056 * audience: application-developer 977 1057 **/ 978 1058 tny_account_signals[TNY_ACCOUNT_CONNECTION_STATUS_CHANGED] = … … 992 1072 * @user_data: user data set when the signal handler was connected. 993 1073 * 994 * Emitted when the account changes. 1074 * Emitted when one of the account's properties changes. 1075 * 1076 * since: 1.0 1077 * audience: application-developer 995 1078 **/ 996 1079 tny_account_signals[TNY_ACCOUNT_CHANGED] = … … 1012 1095 * GType system helper function 1013 1096 * 1014 * Return value: aGType1097 * returns: a #GType 1015 1098 **/ 1016 1099 GType … … 1048 1131 * GType system helper function 1049 1132 * 1050 * Return value: aGType1133 * returns: a #GType 1051 1134 **/ 1052 1135 GType … … 1072 1155 * GType system helper function 1073 1156 * 1074 * Return value: aGType1157 * returns: a #GType 1075 1158 **/ 1076 1159 GType … … 1095 1178 * GType system helper function 1096 1179 * 1097 * Return value: aGType1180 * returns: a #GType 1098 1181 **/ 1099 1182 GType trunk/libtinymail/tny-account.h
r3125 r3150 108 108 gboolean (*matches_url_string_func) (TnyAccount *self, const gchar *url_string); 109 109 void (*start_operation_func) (TnyAccount *self, TnyStatusDomain domain, TnyStatusCode code, TnyStatusCallback status_callback, gpointer status_user_data); 110 void (*stop_operation_func) (TnyAccount *self, gboolean *cancel ed);110 void (*stop_operation_func) (TnyAccount *self, gboolean *cancelled); 111 111 gboolean (*is_ready_func) (TnyAccount *self); 112 112 TnyConnectionPolicy* (*get_connection_policy_func) (TnyAccount *self); … … 148 148 gboolean tny_account_matches_url_string (TnyAccount *self, const gchar *url_string); 149 149 void tny_account_start_operation (TnyAccount *self, TnyStatusDomain domain, TnyStatusCode code, TnyStatusCallback status_callback, gpointer status_user_data); 150 void tny_account_stop_operation (TnyAccount *self, gboolean *cancel ed);150 void tny_account_stop_operation (TnyAccount *self, gboolean *cancelled); 151 151 gboolean tny_account_is_ready (TnyAccount *self); 152 152 TnyConnectionPolicy* tny_account_get_connection_policy (TnyAccount *self); trunk/libtinymail/tny-combined-account.c
r3141 r3150 18 18 */ 19 19 20 /** 21 * TnyCombinedAccount: 22 * 23 * A combined account 24 * 25 * free-function: g_object_unref 26 */ 27 20 28 #include <config.h> 21 29 #include <glib.h> … … 370 378 /** 371 379 * tny_combined_account_new: 372 * @ta: A #TnyTransportAccount instance373 * @sa: a #TnyStoreAccount instance380 * @ta: A #TnyTransportAccount 381 * @sa: a #TnyStoreAccount 374 382 * 375 383 * Create a decorator for @ta, in case the tny_transport_account_send is used, 376 * and for @sa in case a ny other method of either TnyFolderStore, TnyAccount377 * orTnyStoreAccount is used.384 * and for @sa in case a method of either #TnyFolderStore, #TnyAccount or 385 * #TnyStoreAccount is used. 378 386 * 379 387 * Note though that you must not use instances created by this constructor for 380 388 * either setting or getting members of the #TnyAccount type. You must get the 381 * actual instances to read this from using either 382 * tny_combined_account_get_transport_account or tny_combined_account_get_store_account. 383 * 384 * Return value: A new account instance that decorates both @ta and @sa 389 * actual instances to read these properties. 390 * 391 * returns (caller-owns): A new account instance that decorates both @ta and @sa 392 * 393 * since: 1.0 394 * complexity: high 395 * audience: application-developer 385 396 **/ 386 397 TnyAccount * … … 402 413 /** 403 414 * tny_combined_account_get_transport_account: 404 * @self: a #TnyCombinedAccount instance415 * @self: a #TnyCombinedAccount 405 416 * 406 417 * Get the transport account that is being decorated by @self. You must unreference 407 418 * the returned value if not needed anymore. 408 419 * 409 * Return value: the transport account being decorated 420 * returns (caller-owns): the transport account in @self 421 * since: 1.0 422 * complexity: low 423 * audience: application-developer 410 424 **/ 411 425 TnyTransportAccount* … … 419 433 /** 420 434 * tny_combined_account_get_store_account: 421 * @self: a #TnyCombinedAccount instance435 * @self: a #TnyCombinedAccount 422 436 * 423 437 * Get the store account that is being decorated by @self. You must unreference 424 438 * the returned value if not needed anymore. 425 439 * 426 * Return value: the store account being decorated 440 * returns (caller-owns): the store account in @self 441 * since: 1.0 442 * complexity: low 443 * audience: application-developer 427 444 **/ 428 445 TnyStoreAccount* trunk/libtinymail/tny-connection-policy.c
r3125
