g_return_val_if_fail (session, NULL);
g_return_val_if_fail (server_account_name, NULL);
g_return_val_if_fail (session, NULL);
g_return_val_if_fail (server_account_name, NULL);
- tny_account_set_connection_policy (tny_account, modest_default_connection_policy_new ());
+ policy = modest_default_connection_policy_new ();
+ tny_account_set_connection_policy (tny_account, policy);
+ g_object_unref (policy);
- tny_account_set_connection_policy (tny_account, modest_default_connection_policy_new ());
+ policy = modest_default_connection_policy_new ();
+ tny_account_set_connection_policy (tny_account, policy);
+ g_object_unref (policy);
/* The callback will have an error for you if the reconnect
* failed. Please handle it (this is TODO). */
/* The callback will have an error for you if the reconnect
* failed. Please handle it (this is TODO). */
ModestAccountSettings *settings = NULL;
ModestServerAccountSettings *server_settings = NULL;
const gchar *display_name;
ModestAccountSettings *settings = NULL;
ModestServerAccountSettings *server_settings = NULL;
const gchar *display_name;
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (account_name, NULL);
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (account_name, NULL);
tny_account_set_pass_func (tny_account,
get_pass_func ? get_pass_func: get_pass_dummy);
tny_account_set_pass_func (tny_account,
get_pass_func ? get_pass_func: get_pass_dummy);
- tny_account_set_connection_policy (tny_account, modest_default_connection_policy_new ());
+ policy = modest_default_connection_policy_new ();
+ tny_account_set_connection_policy (tny_account, policy);
+ g_object_unref (policy);
modest_tny_account_new_for_local_folders (ModestAccountMgr *account_mgr, TnySessionCamel *session,
const gchar* location_filepath)
{
modest_tny_account_new_for_local_folders (ModestAccountMgr *account_mgr, TnySessionCamel *session,
const gchar* location_filepath)
{
TnyStoreAccount *tny_account;
CamelURL *url;
gchar *maildir, *url_string;
TnyStoreAccount *tny_account;
CamelURL *url;
gchar *maildir, *url_string;
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (session, NULL);
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (session, NULL);
tny_account_set_forget_pass_func (TNY_ACCOUNT(tny_account), forget_pass_dummy);
tny_account_set_pass_func (TNY_ACCOUNT(tny_account), get_pass_dummy);
tny_account_set_forget_pass_func (TNY_ACCOUNT(tny_account), forget_pass_dummy);
tny_account_set_pass_func (TNY_ACCOUNT(tny_account), get_pass_dummy);
- tny_account_set_connection_policy (TNY_ACCOUNT (tny_account), modest_default_connection_policy_new ());
+ policy = modest_default_connection_policy_new ();
+ tny_account_set_connection_policy (TNY_ACCOUNT (tny_account), policy);
+ g_object_unref (policy);
modest_tny_account_set_parent_modest_account_name_for_server_account (
TNY_ACCOUNT (tny_account), id);
modest_tny_account_set_parent_modest_account_name_for_server_account (
TNY_ACCOUNT (tny_account), id);
const gchar* account_name,
TnySessionCamel *session)
{
const gchar* account_name,
TnySessionCamel *session)
{
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (account_name, NULL);
g_return_val_if_fail (session, NULL);
g_return_val_if_fail (account_mgr, NULL);
g_return_val_if_fail (account_name, NULL);
g_return_val_if_fail (session, NULL);
/* Notice that we create a ModestTnyOutboxAccount here,
* instead of just a TnyCamelStoreAccount,
* so that we can later identify this as a special account for internal use only.
*/
/* Notice that we create a ModestTnyOutboxAccount here,
* instead of just a TnyCamelStoreAccount,
* so that we can later identify this as a special account for internal use only.
*/
tny_account_set_forget_pass_func (TNY_ACCOUNT(tny_account), forget_pass_dummy);
tny_account_set_pass_func (TNY_ACCOUNT(tny_account), get_pass_dummy);
tny_account_set_forget_pass_func (TNY_ACCOUNT(tny_account), forget_pass_dummy);
tny_account_set_pass_func (TNY_ACCOUNT(tny_account), get_pass_dummy);
- tny_account_set_connection_policy (TNY_ACCOUNT (tny_account), modest_default_connection_policy_new ());
+ policy = modest_default_connection_policy_new ();
+ tny_account_set_connection_policy (TNY_ACCOUNT (tny_account), policy);
+ g_object_unref (policy);
/* Make this think that it belongs to the modest local-folders parent account: */
modest_tny_account_set_parent_modest_account_name_for_server_account (
/* Make this think that it belongs to the modest local-folders parent account: */
modest_tny_account_set_parent_modest_account_name_for_server_account (