aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-06 23:33:37 +0800
committerRodrigo Moya <rodrigo@gnome-db.org>2011-06-30 00:42:10 +0800
commit3d651e44f40ddfaea9c4cee490b866fb8c01c784 (patch)
tree8509712ada7151929f3a528edf0f5f149fb364aa
parentdf96db8f36adee8760fc728ee512391638170ab0 (diff)
downloadgsoc2013-evolution-3d651e44f40ddfaea9c4cee490b866fb8c01c784.tar.gz
gsoc2013-evolution-3d651e44f40ddfaea9c4cee490b866fb8c01c784.tar.zst
gsoc2013-evolution-3d651e44f40ddfaea9c4cee490b866fb8c01c784.zip
Remove e_get_account_by_source_url().
Function is no longer used, or wanted.
-rw-r--r--doc/reference/shell/eshell-sections.txt1
-rw-r--r--doc/reference/shell/tmpl/e-account-utils.sgml9
-rw-r--r--e-util/e-account-utils.c68
-rw-r--r--e-util/e-account-utils.h1
4 files changed, 0 insertions, 79 deletions
diff --git a/doc/reference/shell/eshell-sections.txt b/doc/reference/shell/eshell-sections.txt
index f5b389ca84..1e75927cd4 100644
--- a/doc/reference/shell/eshell-sections.txt
+++ b/doc/reference/shell/eshell-sections.txt
@@ -434,7 +434,6 @@ e_get_default_account
e_set_default_account
e_get_account_by_name
e_get_account_by_uid
-e_get_account_by_source_url
e_get_any_enabled_account
e_get_default_transport
e_get_subscribable_accounts
diff --git a/doc/reference/shell/tmpl/e-account-utils.sgml b/doc/reference/shell/tmpl/e-account-utils.sgml
index c8b80e9010..2a069953d4 100644
--- a/doc/reference/shell/tmpl/e-account-utils.sgml
+++ b/doc/reference/shell/tmpl/e-account-utils.sgml
@@ -64,15 +64,6 @@ Mail Accounts
@Returns:
-<!-- ##### FUNCTION e_get_account_by_source_url ##### -->
-<para>
-
-</para>
-
-@source_url:
-@Returns:
-
-
<!-- ##### FUNCTION e_get_any_enabled_account ##### -->
<para>
diff --git a/e-util/e-account-utils.c b/e-util/e-account-utils.c
index fd3b6ee653..0172abc553 100644
--- a/e-util/e-account-utils.c
+++ b/e-util/e-account-utils.c
@@ -28,16 +28,6 @@
static EAccountList *global_account_list;
static gboolean
-account_has_source_url (EAccount *account)
-{
- return (account != NULL) &&
- (account->enabled) &&
- (account->source != NULL) &&
- (account->source->url != NULL) &&
- (account->source->url[0] != '\0');
-}
-
-static gboolean
account_has_transport_url (EAccount *account)
{
return (account != NULL) &&
@@ -176,64 +166,6 @@ e_get_account_by_uid (const gchar *uid)
}
/**
- * e_get_account_by_source_url:
- * @source_url: a source URL
- *
- * Returns the #EAccount with the given source URL, or %NULL if no such
- * account exists.
- *
- * Returns: an #EAccount having the given source URL, or %NULL
- **/
-EAccount *
-e_get_account_by_source_url (const gchar *source_url)
-{
- EAccountList *account_list;
- EAccount *account = NULL;
- EIterator *iterator;
- CamelProvider *provider;
- CamelURL *source_curl;
-
- g_return_val_if_fail (source_url != NULL, NULL);
-
- source_curl = camel_url_new (source_url, NULL);
- g_return_val_if_fail (source_curl != NULL, NULL);
-
- provider = camel_provider_get (source_url, NULL);
- g_return_val_if_fail (provider != NULL, NULL);
- g_return_val_if_fail (provider->url_equal != NULL, NULL);
-
- account_list = e_get_account_list ();
- iterator = e_list_get_iterator (E_LIST (account_list));
-
- while (account == NULL && e_iterator_is_valid (iterator)) {
- EAccount *candidate;
- CamelURL *curl;
-
- /* XXX EIterator misuses const. */
- candidate = (EAccount *) e_iterator_get (iterator);
-
- e_iterator_next (iterator);
-
- if (!account_has_source_url (candidate))
- continue;
-
- curl = camel_url_new (candidate->source->url, NULL);
- if (curl == NULL)
- continue;
-
- if (provider->url_equal (curl, source_curl))
- account = candidate;
-
- camel_url_free (curl);
- }
-
- g_object_unref (iterator);
- camel_url_free (source_curl);
-
- return account;
-}
-
-/**
* e_get_any_enabled_account:
*
* Returns the default mail account if it's enabled, otherwise the first
diff --git a/e-util/e-account-utils.h b/e-util/e-account-utils.h
index d5a4625ecb..41abcddf4d 100644
--- a/e-util/e-account-utils.h
+++ b/e-util/e-account-utils.h
@@ -29,7 +29,6 @@ EAccount * e_get_default_account (void);
void e_set_default_account (EAccount *account);
EAccount * e_get_account_by_name (const gchar *name);
EAccount * e_get_account_by_uid (const gchar *uid);
-EAccount * e_get_account_by_source_url (const gchar *source_url);
EAccount * e_get_any_enabled_account (void);
EAccount * e_get_default_transport (void);
GList * e_get_subscribable_accounts (CamelSession *session);