-#if 0
-/* Not used. */
-GSList*
-modest_account_mgr_search_server_accounts (ModestAccountMgr * self,
- const gchar * account_name,
- ModestTransportStoreProtocol proto)
-{
- GSList *accounts;
- GSList *cursor;
- ModestAccountMgrPrivate *priv;
- gchar *key;
- GError *err = NULL;
-
- g_return_val_if_fail (self, NULL);
-
- key = _modest_account_mgr_get_account_keyname (account_name, NULL, TRUE);
- priv = MODEST_ACCOUNT_MGR_GET_PRIVATE (self);
-
- /* get the list of all server accounts */
- accounts = modest_conf_list_subkeys (priv->modest_conf, key, &err);
- if (err) {
- g_printerr ("modest: failed to get subkeys for '%s' (%s)\n", key,
- err->message);
- g_error_free(err);
- return NULL;
- }
-
- /* filter out the ones with the wrong protocol */
- /* we could optimize for unknown proto / unknown type, but it will only
- * make the code more complex */
- cursor = accounts;
- while (cursor) {
- gchar *account = _modest_account_mgr_account_from_key ((gchar*)cursor->data, NULL, NULL);
- gchar *acc_proto = modest_account_mgr_get_string (self, account, MODEST_ACCOUNT_PROTO,TRUE);
- ModestTransportStoreProtocol this_proto =
- modest_protocol_info_get_transport_store_protocol (acc_proto);
- if (this_proto != MODEST_PROTOCOL_TRANSPORT_STORE_UNKNOWN && this_proto != proto) {
- GSList *nxt = cursor->next;
- accounts = g_slist_delete_link (accounts, cursor);
- cursor = nxt;
- } else
- cursor = cursor->next;
-
- g_free (account);
- g_free (acc_proto);
- }
-
- /* +1 because we must remove the ending '/' as well */
- strip_prefix_from_elements (accounts, strlen(key)+1);
- return accounts;
-}
-#endif