aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-medium.c
diff options
context:
space:
mode:
Diffstat (limited to 'camel/camel-medium.c')
-rw-r--r--camel/camel-medium.c69
1 files changed, 35 insertions, 34 deletions
diff --git a/camel/camel-medium.c b/camel/camel-medium.c
index b3964f29e3..5699a29ee6 100644
--- a/camel/camel-medium.c
+++ b/camel/camel-medium.c
@@ -40,11 +40,11 @@ static CamelDataWrapperClass *parent_class = NULL;
#define CM_CLASS(so) CAMEL_MEDIUM_CLASS (CAMEL_OBJECT_GET_CLASS(so))
static gboolean is_offline (CamelDataWrapper *data_wrapper);
-static void add_header (CamelMedium *medium, const char *name,
- const void *value);
-static void set_header (CamelMedium *medium, const char *name, const void *value);
-static void remove_header (CamelMedium *medium, const char *name);
-static const void *get_header (CamelMedium *medium, const char *name);
+static void add_header (CamelMedium *medium, const gchar *header_name,
+ const void *header_value);
+static void set_header (CamelMedium *medium, const gchar *header_name, const void *header_value);
+static void remove_header (CamelMedium *medium, const gchar *header_name);
+static const void *get_header (CamelMedium *medium, const gchar *header_name);
static GArray *get_headers (CamelMedium *medium);
static void free_headers (CamelMedium *medium, GArray *headers);
@@ -121,16 +121,17 @@ is_offline (CamelDataWrapper *data_wrapper)
}
static void
-add_header (CamelMedium *medium, const char *name, const void *value)
+add_header (CamelMedium *medium, const gchar *header_name,
+ const void *header_value)
{
- g_warning("No %s::add_header implemented, adding %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::add_header implemented, adding %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), header_name);
}
/**
* camel_medium_add_header:
* @medium: a CamelMedium
- * @name: name of the header
- * @value: value of the header
+ * @header_name: name of the header
+ * @header_value: value of the header
*
* Adds a header to a medium.
*
@@ -139,78 +140,78 @@ add_header (CamelMedium *medium, const char *name, const void *value)
* headers. No we dont, order isn't important! Z
**/
void
-camel_medium_add_header (CamelMedium *medium, const char *name, const void *value)
+camel_medium_add_header (CamelMedium *medium, const gchar *header_name, const void *header_value)
{
g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
- g_return_if_fail (value != NULL);
+ g_return_if_fail (header_name != NULL);
+ g_return_if_fail (header_value != NULL);
- CM_CLASS (medium)->add_header(medium, name, value);
+ CM_CLASS (medium)->add_header(medium, header_name, header_value);
}
static void
-set_header (CamelMedium *medium, const char *name, const void *value)
+set_header (CamelMedium *medium, const char *header_name, const void *header_value)
{
- g_warning("No %s::set_header implemented, setting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::set_header implemented, setting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), header_name);
}
/**
* camel_medium_set_header:
* @medium: a CamelMedium
- * @name: name of the header
- * @value: value of the header
+ * @header_name: name of the header
+ * @header_value: value of the header
*
* Sets the value of a header. Any other occurances of the header
* will be removed. Setting a %NULL header can be used to remove
* the header also.
**/
void
-camel_medium_set_header (CamelMedium *medium, const char *name, const void *value)
+camel_medium_set_header (CamelMedium *medium, const char *header_name, const void *header_value)
{
g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
+ g_return_if_fail (header_name != NULL);
- if (value == NULL)
- CM_CLASS(medium)->remove_header(medium, name);
+ if (header_value == NULL)
+ CM_CLASS(medium)->remove_header(medium, header_name);
else
- CM_CLASS(medium)->set_header(medium, name, value);
+ CM_CLASS(medium)->set_header(medium, header_name, header_value);
}
static void
-remove_header(CamelMedium *medium, const char *name)
+remove_header(CamelMedium *medium, const char *header_name)
{
- g_warning("No %s::remove_header implemented, removing %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::remove_header implemented, removing %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), header_name);
}
/**
* camel_medium_remove_header:
* @medium: a medium
- * @name: the name of the header
+ * @header_name: the name of the header
*
* Removes the named header from the medium. All occurances of the
* header are removed.
**/
void
-camel_medium_remove_header(CamelMedium *medium, const char *name)
+camel_medium_remove_header(CamelMedium *medium, const char *header_name)
{
g_return_if_fail (CAMEL_IS_MEDIUM (medium));
- g_return_if_fail (name != NULL);
+ g_return_if_fail (header_name != NULL);
- CM_CLASS(medium)->remove_header(medium, name);
+ CM_CLASS(medium)->remove_header(medium, header_name);
}
static const void *
-get_header(CamelMedium *medium, const char *name)
+get_header(CamelMedium *medium, const char *header_name)
{
- g_warning("No %s::get_header implemented, getting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), name);
+ g_warning("No %s::get_header implemented, getting %s", camel_type_to_name(CAMEL_OBJECT_GET_TYPE(medium)), header_name);
return NULL;
}
/**
* camel_medium_get_header:
* @medium: a medium
- * @name: the name of the header
+ * @header_name: the name of the header
*
* Returns the value of the named header in the medium, or %NULL if
* it is unset. The caller should not modify or free the data.
@@ -222,12 +223,12 @@ get_header(CamelMedium *medium, const char *name)
* Return value: the value of the named header, or %NULL
**/
const void *
-camel_medium_get_header(CamelMedium *medium, const char *name)
+camel_medium_get_header(CamelMedium *medium, const char *header_name)
{
g_return_val_if_fail (CAMEL_IS_MEDIUM (medium), NULL);
- g_return_val_if_fail (name != NULL, NULL);
+ g_return_val_if_fail (header_name != NULL, NULL);
- return CM_CLASS (medium)->get_header (medium, name);
+ return CM_CLASS (medium)->get_header (medium, header_name);
}