DBUS_STRUCT_BEGIN_CHAR_AS_STRING \
DBUS_TYPE_STRING_AS_STRING \
DBUS_TYPE_STRING_AS_STRING \
+ DBUS_TYPE_STRING_AS_STRING \
DBUS_TYPE_ARRAY_AS_STRING \
ACCOUNT_HIT_DBUS_TYPE \
DBUS_STRUCT_END_CHAR_AS_STRING
typedef struct {
gchar *account_id;
gchar *account_name;
+ gchar *store_protocol;
gchar *mailbox_id;
GList *header_list;
} AccountHits;
AccountHits *ah = (AccountHits *) node->data;
const char *account_id;
const char *account_name;
+ const char *store_protocol;
DBusMessageIter ah_struct_iter;
DBusMessageIter sh_array_iter;
GList *result_node;
&ah_struct_iter);
account_id = ah->account_id;
account_name = ah->account_name;
+ store_protocol = ah->store_protocol;
dbus_message_iter_append_basic (&ah_struct_iter,
DBUS_TYPE_STRING,
&account_id);
dbus_message_iter_append_basic (&ah_struct_iter,
DBUS_TYPE_STRING,
&account_name);
+ dbus_message_iter_append_basic (&ah_struct_iter,
+ DBUS_TYPE_STRING,
+ &store_protocol);
dbus_message_iter_open_container (&ah_struct_iter,
DBUS_TYPE_ARRAY,
&ah_struct_iter);
g_free (ah->account_id);
g_free (ah->account_name);
+ g_free (ah->store_protocol);
g_list_free (ah->header_list);
}
AccountHits *account_hits;
const gchar *folder_id;
const gchar *bar;
+ ModestProtocolType store_protocol_type;
+ ModestProtocol *store_protocol;
acc_iterator = tny_list_create_iterator (helper->accounts_list);
account = TNY_ACCOUNT (tny_iterator_get_current (acc_iterator));
account_hits = g_slice_new (AccountHits);
account_hits->account_id = g_strdup (modest_tny_account_get_parent_modest_account_name_for_server_account (account));
account_hits->account_name = g_strdup (tny_account_get_name (account));
+ store_protocol_type = modest_tny_account_get_protocol_type (account);
+ store_protocol = modest_protocol_registry_get_protocol_by_type (modest_runtime_get_protocol_registry (),
+ store_protocol_type);
+ account_hits->store_protocol = g_strdup (modest_protocol_get_name (store_protocol));
account_hits->header_list = result_list;
account_hits->mailbox_id = NULL;