sms: new method to check if the SMS has a given part
This commit is contained in:
@@ -138,6 +138,24 @@ mm_sms_multipart_is_complete (MMSms *self)
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static guint
|
||||
cmp_sms_part_index (MMSmsPart *part,
|
||||
gpointer user_data)
|
||||
{
|
||||
return (GPOINTER_TO_UINT (user_data) - mm_sms_part_get_index (part));
|
||||
}
|
||||
|
||||
gboolean
|
||||
mm_sms_has_part_index (MMSms *self,
|
||||
guint index)
|
||||
{
|
||||
return !!g_list_find_custom (self->priv->parts,
|
||||
GUINT_TO_POINTER (index),
|
||||
(GCompareFunc)cmp_sms_part_index);
|
||||
}
|
||||
|
||||
/*****************************************************************************/
|
||||
|
||||
static guint
|
||||
cmp_sms_part_sequence (MMSmsPart *a,
|
||||
MMSmsPart *b)
|
||||
|
||||
@@ -66,6 +66,10 @@ gboolean mm_sms_multipart_take_part (MMSms *self,
|
||||
|
||||
void mm_sms_export (MMSms *self);
|
||||
const gchar *mm_sms_get_path (MMSms *self);
|
||||
|
||||
gboolean mm_sms_has_part_index (MMSms *self,
|
||||
guint index);
|
||||
|
||||
gboolean mm_sms_is_multipart (MMSms *self);
|
||||
guint mm_sms_get_multipart_reference (MMSms *self);
|
||||
gboolean mm_sms_multipart_is_complete (MMSms *self);
|
||||
|
||||
Reference in New Issue
Block a user