autodiscover_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
  GoaEwsClient *client = GOA_EWS_CLIENT (source_object);
  AddAccountData *data = user_data;

  goa_ews_client_autodiscover_finish (client, res, &data->error);
  g_main_loop_quit (data->loop);
  goa_spinner_button_stop (GOA_SPINNER_BUTTON (data->spinner_button));
}
autodiscover_cb (GObject *source_object, GAsyncResult *res, gpointer user_data)
{
  GoaEwsClient *client = GOA_EWS_CLIENT (source_object);
  AddAccountData *data = user_data;

  goa_ews_client_autodiscover_finish (client, res, &data->error);
  g_main_loop_quit (data->loop);
  goa_spinner_button_stop (GOA_SPINNER_BUTTON (data->spinner_button));
}