[evolution-data-server] Remove unused camel_multipart_remove_part_at().
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Remove unused camel_multipart_remove_part_at().
- Date: Wed, 2 Oct 2013 19:18:43 +0000 (UTC)
commit 00e1ac5465133cd3d80070d566f600f2f22ac161
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Oct 2 10:06:12 2013 -0400
Remove unused camel_multipart_remove_part_at().
camel/camel-multipart-signed.c | 10 ------
camel/camel-multipart.c | 52 -------------------------------
camel/camel-multipart.h | 3 --
docs/reference/camel/camel-sections.txt | 1 -
4 files changed, 0 insertions(+), 66 deletions(-)
---
diff --git a/camel/camel-multipart-signed.c b/camel/camel-multipart-signed.c
index e87a288..5cf2ce1 100644
--- a/camel/camel-multipart-signed.c
+++ b/camel/camel-multipart-signed.c
@@ -419,15 +419,6 @@ multipart_signed_add_part (CamelMultipart *multipart,
}
static CamelMimePart *
-multipart_signed_remove_part_at (CamelMultipart *multipart,
- guint index)
-{
- g_warning ("Cannot remove parts from a signed part using remove_part");
-
- return NULL;
-}
-
-static CamelMimePart *
multipart_signed_get_part (CamelMultipart *multipart,
guint index)
{
@@ -591,7 +582,6 @@ camel_multipart_signed_class_init (CamelMultipartSignedClass *class)
multipart_class = CAMEL_MULTIPART_CLASS (class);
multipart_class->add_part = multipart_signed_add_part;
- multipart_class->remove_part_at = multipart_signed_remove_part_at;
multipart_class->get_part = multipart_signed_get_part;
multipart_class->get_number = multipart_signed_get_number;
multipart_class->construct_from_parser = multipart_signed_construct_from_parser;
diff --git a/camel/camel-multipart.c b/camel/camel-multipart.c
index 951c99e..6ebf4c6 100644
--- a/camel/camel-multipart.c
+++ b/camel/camel-multipart.c
@@ -168,33 +168,6 @@ multipart_add_part (CamelMultipart *multipart,
}
static CamelMimePart *
-multipart_remove_part_at (CamelMultipart *multipart,
- guint index)
-{
- CamelMimePart *removed_part;
- GList *link;
-
- if (!(multipart->parts))
- return NULL;
-
- link = g_list_nth (multipart->parts, index);
- if (link == NULL) {
- g_warning (
- "CamelMultipart::remove_part_at: "
- "part to remove is NULL\n");
- return NULL;
- }
- removed_part = CAMEL_MIME_PART (link->data);
-
- multipart->parts = g_list_remove_link (multipart->parts, link);
- if (link->data)
- g_object_unref (link->data);
- g_list_free_1 (link);
-
- return removed_part;
-}
-
-static CamelMimePart *
multipart_get_part (CamelMultipart *multipart,
guint index)
{
@@ -326,7 +299,6 @@ camel_multipart_class_init (CamelMultipartClass *class)
data_wrapper_class->decode_to_stream_sync = multipart_write_to_stream_sync;
class->add_part = multipart_add_part;
- class->remove_part_at = multipart_remove_part_at;
class->get_part = multipart_get_part;
class->get_number = multipart_get_number;
class->set_boundary = multipart_set_boundary;
@@ -386,30 +358,6 @@ camel_multipart_add_part (CamelMultipart *multipart,
}
/**
- * camel_multipart_remove_part_at:
- * @multipart: a #CamelMultipart object
- * @index: a zero-based index indicating the part to remove
- *
- * Remove the indicated part from the multipart object.
- *
- * Returns: the removed part. Note that it is g_object_unref()'ed
- * before being returned, which may cause it to be destroyed.
- **/
-CamelMimePart *
-camel_multipart_remove_part_at (CamelMultipart *multipart,
- guint index)
-{
- CamelMultipartClass *class;
-
- g_return_val_if_fail (CAMEL_IS_MULTIPART (multipart), NULL);
-
- class = CAMEL_MULTIPART_GET_CLASS (multipart);
- g_return_val_if_fail (class->remove_part_at != NULL, NULL);
-
- return class->remove_part_at (multipart, index);
-}
-
-/**
* camel_multipart_get_part:
* @multipart: a #CamelMultipart object
* @index: a zero-based index indicating the part to get
diff --git a/camel/camel-multipart.h b/camel/camel-multipart.h
index 3f9396e..ff91bf6 100644
--- a/camel/camel-multipart.h
+++ b/camel/camel-multipart.h
@@ -71,7 +71,6 @@ struct _CamelMultipartClass {
/* Virtual methods */
void (*add_part) (CamelMultipart *multipart, CamelMimePart *part);
- CamelMimePart * (*remove_part_at) (CamelMultipart *multipart, guint index);
CamelMimePart * (*get_part) (CamelMultipart *multipart, guint index);
guint (*get_number) (CamelMultipart *multipart);
void (*set_boundary) (CamelMultipart *multipart, const gchar *boundary);
@@ -87,8 +86,6 @@ GType camel_multipart_get_type (void);
CamelMultipart * camel_multipart_new (void);
void camel_multipart_add_part (CamelMultipart *multipart,
CamelMimePart *part);
-CamelMimePart * camel_multipart_remove_part_at (CamelMultipart *multipart,
- guint index);
CamelMimePart * camel_multipart_get_part (CamelMultipart *multipart,
guint index);
guint camel_multipart_get_number (CamelMultipart *multipart);
diff --git a/docs/reference/camel/camel-sections.txt b/docs/reference/camel/camel-sections.txt
index 6223b08..aa19a36 100644
--- a/docs/reference/camel/camel-sections.txt
+++ b/docs/reference/camel/camel-sections.txt
@@ -1791,7 +1791,6 @@ camel_multipart_signed_get_type
CamelMultipart
camel_multipart_new
camel_multipart_add_part
-camel_multipart_remove_part_at
camel_multipart_get_part
camel_multipart_get_number
camel_multipart_set_boundary
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]