[gmime] Renamed 'priv' member of GMimeContentType/Disposition to 'changed'
- From: Jeffrey Stedfast <fejj src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gmime] Renamed 'priv' member of GMimeContentType/Disposition to 'changed'
- Date: Wed, 15 Mar 2017 16:20:27 +0000 (UTC)
commit 18df49d3d6a055c1b1a851df6342f890f45247a6
Author: Jeffrey Stedfast <jestedfa microsoft com>
Date: Wed Mar 15 12:18:53 2017 -0400
Renamed 'priv' member of GMimeContentType/Disposition to 'changed'
gmime/gmime-content-type.c | 12 ++++++------
gmime/gmime-content-type.h | 13 +++++--------
gmime/gmime-disposition.c | 10 +++++-----
gmime/gmime-disposition.h | 12 +++++-------
gmime/gmime-object.c | 16 ++++++++--------
5 files changed, 29 insertions(+), 34 deletions(-)
---
diff --git a/gmime/gmime-content-type.c b/gmime/gmime-content-type.c
index 3a8e477..b1cfb4f 100644
--- a/gmime/gmime-content-type.c
+++ b/gmime/gmime-content-type.c
@@ -100,7 +100,7 @@ static void
g_mime_content_type_init (GMimeContentType *content_type, GMimeContentTypeClass *klass)
{
content_type->param_hash = g_hash_table_new (g_mime_strcase_hash, g_mime_strcase_equal);
- content_type->priv = g_mime_event_new ((GObject *) content_type);
+ content_type->changed = g_mime_event_new ((GObject *) content_type);
content_type->params = NULL;
content_type->subtype = NULL;
content_type->type = NULL;
@@ -113,7 +113,7 @@ g_mime_content_type_finalize (GObject *object)
g_hash_table_destroy (content_type->param_hash);
g_mime_param_free (content_type->params);
- g_mime_event_free (content_type->priv);
+ g_mime_event_free (content_type->changed);
g_free (content_type->subtype);
g_free (content_type->type);
@@ -289,7 +289,7 @@ g_mime_content_type_set_media_type (GMimeContentType *mime_type, const char *typ
g_free (mime_type->type);
mime_type->type = buf;
- g_mime_event_emit (mime_type->priv, NULL);
+ g_mime_event_emit (mime_type->changed, NULL);
}
@@ -329,7 +329,7 @@ g_mime_content_type_set_media_subtype (GMimeContentType *mime_type, const char *
g_free (mime_type->subtype);
mime_type->subtype = buf;
- g_mime_event_emit (mime_type->priv, NULL);
+ g_mime_event_emit (mime_type->changed, NULL);
}
@@ -372,7 +372,7 @@ g_mime_content_type_set_params (GMimeContentType *mime_type, GMimeParam *params)
params = params->next;
}
- g_mime_event_emit (mime_type->priv, NULL);
+ g_mime_event_emit (mime_type->changed, NULL);
}
@@ -422,7 +422,7 @@ g_mime_content_type_set_parameter (GMimeContentType *mime_type, const char *name
g_hash_table_insert (mime_type->param_hash, param->name, param);
}
- g_mime_event_emit (mime_type->priv, NULL);
+ g_mime_event_emit (mime_type->changed, NULL);
}
diff --git a/gmime/gmime-content-type.h b/gmime/gmime-content-type.h
index 0f366ca..077dee4 100644
--- a/gmime/gmime-content-type.h
+++ b/gmime/gmime-content-type.h
@@ -42,24 +42,21 @@ typedef struct _GMimeContentTypeClass GMimeContentTypeClass;
/**
* GMimeContentType:
* @parent_object: parent #GObject
- * @param_hash: parameter hash keyed by param name
- * @params: a #GMimeParam list
- * @priv: private fields
* @type: media type
* @subtype: media subtype
+ * @params: a #GMimeParam list
*
* A data structure representing a Content-Type.
**/
struct _GMimeContentType {
GObject parent_object;
- GHashTable *param_hash;
+ char *type, *subtype;
GMimeParam *params;
- gpointer priv;
-
- char *type;
- char *subtype;
+ /* < private > */
+ GHashTable *param_hash;
+ gpointer changed;
};
struct _GMimeContentTypeClass {
diff --git a/gmime/gmime-disposition.c b/gmime/gmime-disposition.c
index 2fd026d..af388e0 100644
--- a/gmime/gmime-disposition.c
+++ b/gmime/gmime-disposition.c
@@ -89,7 +89,7 @@ static void
g_mime_content_disposition_init (GMimeContentDisposition *disposition, GMimeContentDispositionClass *klass)
{
disposition->param_hash = g_hash_table_new (g_mime_strcase_hash, g_mime_strcase_equal);
- disposition->priv = g_mime_event_new ((GObject *) disposition);
+ disposition->changed = g_mime_event_new ((GObject *) disposition);
disposition->disposition = NULL;
disposition->params = NULL;
}
@@ -101,7 +101,7 @@ g_mime_content_disposition_finalize (GObject *object)
g_hash_table_destroy (disposition->param_hash);
g_mime_param_free (disposition->params);
- g_mime_event_free (disposition->priv);
+ g_mime_event_free (disposition->changed);
g_free (disposition->disposition);
G_OBJECT_CLASS (parent_class)->finalize (object);
@@ -194,7 +194,7 @@ g_mime_content_disposition_set_disposition (GMimeContentDisposition *disposition
g_free (disposition->disposition);
disposition->disposition = buf;
- g_mime_event_emit (disposition->priv, NULL);
+ g_mime_event_emit (disposition->changed, NULL);
}
@@ -238,7 +238,7 @@ g_mime_content_disposition_set_params (GMimeContentDisposition *disposition, GMi
params = params->next;
}
- g_mime_event_emit (disposition->priv, NULL);
+ g_mime_event_emit (disposition->changed, NULL);
}
@@ -288,7 +288,7 @@ g_mime_content_disposition_set_parameter (GMimeContentDisposition *disposition,
g_hash_table_insert (disposition->param_hash, param->name, param);
}
- g_mime_event_emit (disposition->priv, NULL);
+ g_mime_event_emit (disposition->changed, NULL);
}
diff --git a/gmime/gmime-disposition.h b/gmime/gmime-disposition.h
index 6d9b04c..9446c43 100644
--- a/gmime/gmime-disposition.h
+++ b/gmime/gmime-disposition.h
@@ -58,22 +58,20 @@ typedef struct _GMimeContentDispositionClass GMimeContentDispositionClass;
/**
* GMimeContentDisposition:
* @parent_object: parent #GObject
- * @param_hash: parameter hash table keyed by param name
- * @params: a #GMimeParam list
- * @priv: private fields
* @disposition: disposition
+ * @params: a #GMimeParam list
*
* A data structure representing a Content-Disposition.
**/
struct _GMimeContentDisposition {
GObject parent_object;
- GHashTable *param_hash;
+ char *disposition;
GMimeParam *params;
- gpointer priv;
-
- char *disposition;
+ /* < private > */
+ GHashTable *param_hash;
+ gpointer changed;
};
struct _GMimeContentDispositionClass {
diff --git a/gmime/gmime-object.c b/gmime/gmime-object.c
index 366b36a..caa1268 100644
--- a/gmime/gmime-object.c
+++ b/gmime/gmime-object.c
@@ -155,13 +155,13 @@ g_mime_object_finalize (GObject *object)
GMimeEvent *event;
if (mime->content_type) {
- event = mime->content_type->priv;
+ event = mime->content_type->changed;
g_mime_event_remove (event, (GMimeEventCallback) content_type_changed, object);
g_object_unref (mime->content_type);
}
if (mime->disposition) {
- event = mime->disposition->priv;
+ event = mime->disposition->changed;
g_mime_event_remove (event, (GMimeEventCallback) content_disposition_changed, object);
g_object_unref (mime->disposition);
}
@@ -254,7 +254,7 @@ object_header_removed (GMimeObject *object, GMimeHeader *header)
switch (i) {
case HEADER_CONTENT_DISPOSITION:
if (object->disposition) {
- event = object->disposition->priv;
+ event = object->disposition->changed;
g_mime_event_remove (event, (GMimeEventCallback) content_disposition_changed, object);
g_object_unref (object->disposition);
object->disposition = NULL;
@@ -276,7 +276,7 @@ object_headers_cleared (GMimeObject *object)
GMimeEvent *event;
if (object->disposition) {
- event = object->disposition->priv;
+ event = object->disposition->changed;
g_mime_event_remove (event, (GMimeEventCallback) content_disposition_changed, object);
g_object_unref (object->disposition);
object->disposition = NULL;
@@ -567,11 +567,11 @@ static void
object_set_content_type (GMimeObject *object, GMimeContentType *content_type)
{
if (object->content_type) {
- g_mime_event_remove (object->content_type->priv, (GMimeEventCallback) content_type_changed,
object);
+ g_mime_event_remove (object->content_type->changed, (GMimeEventCallback)
content_type_changed, object);
g_object_unref (object->content_type);
}
- g_mime_event_add (content_type->priv, (GMimeEventCallback) content_type_changed, object);
+ g_mime_event_add (content_type->changed, (GMimeEventCallback) content_type_changed, object);
object->content_type = content_type;
g_object_ref (content_type);
}
@@ -711,11 +711,11 @@ static void
_g_mime_object_set_content_disposition (GMimeObject *object, GMimeContentDisposition *disposition)
{
if (object->disposition) {
- g_mime_event_remove (object->disposition->priv, (GMimeEventCallback)
content_disposition_changed, object);
+ g_mime_event_remove (object->disposition->changed, (GMimeEventCallback)
content_disposition_changed, object);
g_object_unref (object->disposition);
}
- g_mime_event_add (disposition->priv, (GMimeEventCallback) content_disposition_changed, object);
+ g_mime_event_add (disposition->changed, (GMimeEventCallback) content_disposition_changed, object);
object->disposition = disposition;
g_object_ref (disposition);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]