* lib: cleanups: remove mu-msg-cache (WIP)
This commit is contained in:
@ -63,15 +63,12 @@ mu_msg_doc_destroy (MuMsgDoc *self)
|
||||
|
||||
|
||||
gchar*
|
||||
mu_msg_doc_get_str_field (MuMsgDoc *self, MuMsgFieldId mfid,
|
||||
gboolean *do_free)
|
||||
mu_msg_doc_get_str_field (MuMsgDoc *self, MuMsgFieldId mfid)
|
||||
{
|
||||
g_return_val_if_fail (self, NULL);
|
||||
g_return_val_if_fail (mu_msg_field_id_is_valid(mfid), NULL);
|
||||
g_return_val_if_fail (mu_msg_field_is_string(mfid), NULL);
|
||||
|
||||
*do_free = TRUE;
|
||||
|
||||
try {
|
||||
const std::string s (self->doc().get_value(mfid));
|
||||
return s.empty() ? NULL : g_strdup (s.c_str());
|
||||
@ -81,15 +78,12 @@ mu_msg_doc_get_str_field (MuMsgDoc *self, MuMsgFieldId mfid,
|
||||
|
||||
|
||||
GSList*
|
||||
mu_msg_doc_get_str_list_field (MuMsgDoc *self, MuMsgFieldId mfid,
|
||||
gboolean *do_free)
|
||||
mu_msg_doc_get_str_list_field (MuMsgDoc *self, MuMsgFieldId mfid)
|
||||
{
|
||||
g_return_val_if_fail (self, NULL);
|
||||
g_return_val_if_fail (mu_msg_field_id_is_valid(mfid), NULL);
|
||||
g_return_val_if_fail (mu_msg_field_is_string_list(mfid), NULL);
|
||||
|
||||
*do_free = TRUE;
|
||||
|
||||
try {
|
||||
/* return a comma-separated string as a GSList */
|
||||
const std::string s (self->doc().get_value(mfid));
|
||||
@ -122,5 +116,3 @@ mu_msg_doc_get_num_field (MuMsgDoc *self, MuMsgFieldId mfid)
|
||||
|
||||
} MU_XAPIAN_CATCH_BLOCK_RETURN(-1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user