[Galago-commits] r2360 - in trunk/libgalago: . libgalago
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Sun Dec 4 02:57:48 PST 2005
Author: chipx86
Date: 2005-12-04 02:56:42 -0800 (Sun, 04 Dec 2005)
New Revision: 2360
Modified:
trunk/libgalago/ChangeLog
trunk/libgalago/libgalago/galago-account.c
trunk/libgalago/libgalago/galago-image.c
trunk/libgalago/libgalago/galago-image.h
trunk/libgalago/libgalago/galago-person.c
Log:
- GalagoImage is no longer mutable. It represents the image data it was created with, and never anything else.
- We no longer assign an object path to a GalagoImage.
Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog 2005-12-03 09:33:35 UTC (rev 2359)
+++ trunk/libgalago/ChangeLog 2005-12-04 10:56:42 UTC (rev 2360)
@@ -1,3 +1,13 @@
+Sun Dec 04 02:54:37 PST 2005 Christian Hammond <chipx86 at chipx86.com>
+
+ * libgalago/galago-account.c:
+ * libgalago/galago-image.c:
+ * libgalago/galago-image.h:
+ * libgalago/galago-person.c:
+ - GalagoImage is no longer mutable. It represents the image data
+ it was created with, and never anything else.
+ - We no longer assign an object path to a GalagoImage.
+
Sat Dec 03 01:32:17 PST 2005 Christian Hammond <chipx86 at chipx86.com>
* docs/protocol/protocol.hh:
Modified: trunk/libgalago/libgalago/galago-account.c
===================================================================
--- trunk/libgalago/libgalago/galago-account.c 2005-12-03 09:33:35 UTC (rev 2359)
+++ trunk/libgalago/libgalago/galago-account.c 2005-12-04 10:56:42 UTC (rev 2360)
@@ -871,19 +871,6 @@
account->priv->avatar = avatar;
- if (avatar != NULL)
- {
- const gchar *obj_prefix =
- galago_object_get_dbus_path(GALAGO_OBJECT(account));
-
- if (obj_prefix != NULL)
- {
- gchar *obj_path = g_strdup_printf("%s/avatar", obj_prefix);
- galago_object_set_dbus_path(GALAGO_OBJECT(avatar), obj_path);
- g_free(obj_path);
- }
- }
-
if (GALAGO_OBJECT_IS_LOCAL(account))
_galago_dbus_account_set_avatar(account, avatar);
Modified: trunk/libgalago/libgalago/galago-image.c
===================================================================
--- trunk/libgalago/libgalago/galago-image.c 2005-12-03 09:33:35 UTC (rev 2359)
+++ trunk/libgalago/libgalago/galago-image.c 2005-12-04 10:56:42 UTC (rev 2360)
@@ -40,6 +40,8 @@
const GalagoObject *object);
static void *galago_image_dbus_message_get(DBusMessageIter *iter);
static gchar *galago_image_dbus_get_signature(void);
+static void galago_image_set_data(GalagoImage *image, const guchar *data,
+ gsize len);
static GalagoObjectClass *parent_class = NULL;
@@ -184,12 +186,13 @@
return image;
}
-void
+static void
galago_image_set_data(GalagoImage *image, const guchar *data, gsize len)
{
g_return_if_fail(image != NULL);
g_return_if_fail(GALAGO_IS_IMAGE(image));
g_return_if_fail(data == NULL || len > 0);
+ g_return_if_fail(image->priv->data == NULL);
if (image->priv->data != NULL)
g_free(image->priv->data);
@@ -198,17 +201,6 @@
memcpy(image->priv->data, data, len);
image->priv->len = len;
-
- if (GALAGO_OBJECT_IS_LOCAL(image) && galago_is_connected() &&
- galago_object_get_dbus_path(GALAGO_OBJECT(image)) != NULL)
- {
- galago_dbus_send_message(GALAGO_OBJECT(image), "SetData",
- galago_value_new_array(GALAGO_VALUE_TYPE_CHAR,
- image->priv->data,
- image->priv->len,
- NULL),
- NULL);
- }
}
void
Modified: trunk/libgalago/libgalago/galago-image.h
===================================================================
--- trunk/libgalago/libgalago/galago-image.h 2005-12-03 09:33:35 UTC (rev 2359)
+++ trunk/libgalago/libgalago/galago-image.h 2005-12-04 10:56:42 UTC (rev 2360)
@@ -122,15 +122,6 @@
GalagoImage *galago_image_new_from_data(const guchar *data, gsize len);
/**
- * Sets the image's data.
- *
- * @param image The image.
- * @param data The image data.
- * @param len The image data length.
- */
-void galago_image_set_data(GalagoImage *image, const guchar *data, gsize len);
-
-/**
* Returns an image's data.
*
* @param image The image.
Modified: trunk/libgalago/libgalago/galago-person.c
===================================================================
--- trunk/libgalago/libgalago/galago-person.c 2005-12-03 09:33:35 UTC (rev 2359)
+++ trunk/libgalago/libgalago/galago-person.c 2005-12-04 10:56:42 UTC (rev 2360)
@@ -491,19 +491,6 @@
person->priv->photo = photo;
- if (photo != NULL)
- {
- const gchar *obj_prefix =
- galago_object_get_dbus_path(GALAGO_OBJECT(person));
-
- if (obj_prefix != NULL)
- {
- gchar *obj_path = g_strdup_printf("%s/photo", obj_prefix);
- galago_object_set_dbus_path(GALAGO_OBJECT(photo), obj_path);
- g_free(obj_path);
- }
- }
-
if (GALAGO_OBJECT_IS_LOCAL(person))
_galago_dbus_person_set_photo(person, photo);
More information about the galago-commits
mailing list