[Galago-commits] r2508 - in trunk/libgalago: . libgalago
galago-commits at freedesktop.org
galago-commits at freedesktop.org
Fri Jan 27 11:11:29 PST 2006
Author: chipx86
Date: 2006-01-27 11:11:20 -0800 (Fri, 27 Jan 2006)
New Revision: 2508
Modified:
trunk/libgalago/ChangeLog
trunk/libgalago/libgalago/galago-account.c
trunk/libgalago/libgalago/galago-account.h
trunk/libgalago/libgalago/galago-core.c
trunk/libgalago/libgalago/galago-core.h
trunk/libgalago/libgalago/galago-person.c
trunk/libgalago/libgalago/galago-person.h
trunk/libgalago/libgalago/galago-presence.c
trunk/libgalago/libgalago/galago-private.h
trunk/libgalago/libgalago/galago-service.c
trunk/libgalago/libgalago/galago-service.h
Log:
Make several functions internal that were previously marked as internal.
"Daddy, why is there a function for adding an account to a service when the service already owns the account?" "Because the developer's an idiot, son.
Modified: trunk/libgalago/ChangeLog
===================================================================
--- trunk/libgalago/ChangeLog 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/ChangeLog 2006-01-27 19:11:20 UTC (rev 2508)
@@ -1,3 +1,20 @@
+Fri Jan 27 11:07:47 PST 2006 Christian Hammond <chipx86 at chipx86.com>
+
+ * libgalago/galago-account.c:
+ * libgalago/galago-account.h:
+ * libgalago/galago-core.c:
+ * libgalago/galago-core.h:
+ * libgalago/galago-person.c:
+ * libgalago/galago-person.h:
+ * libgalago/galago-presence.c:
+ * libgalago/galago-private.h:
+ * libgalago/galago-service.c:
+ * libgalago/galago-service.h:
+ - Make several functions internal that were previously marked as
+ internal. "Daddy, why is there a function for adding an account to a
+ service when the service already owns the account?" "Because the
+ developer's an idiot, son."
+
Wed Jan 25 23:09:21 PST 2006 Christian Hammond <chipx86 at chipx86.com>
* AUTHORS:
Modified: trunk/libgalago/libgalago/galago-account.c
===================================================================
--- trunk/libgalago/libgalago/galago-account.c 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-account.c 2006-01-27 19:11:20 UTC (rev 2508)
@@ -230,11 +230,11 @@
service = galago_account_get_service(account);
person = galago_account_get_person(account);
- galago_service_remove_account(service, account);
+ _galago_service_remove_account(service, account);
if (person != NULL)
{
- galago_person_remove_account(person, account);
+ _galago_person_remove_account(person, account);
account->priv->person = NULL;
}
@@ -394,7 +394,7 @@
break;
case PROP_PRESENCE:
- galago_account_set_presence(account,
+ _galago_account_set_presence(account,
(GalagoPresence *)g_value_get_object(value));
break;
@@ -500,8 +500,8 @@
/* Set the object path, if specified. */
galago_object_set_dbus_path(GALAGO_OBJECT(account), obj_path);
- galago_person_add_account(person, account);
- galago_service_add_account(service, account);
+ _galago_person_add_account(person, account);
+ _galago_service_add_account(service, account);
galago_context_pop();
}
@@ -586,25 +586,6 @@
return account->priv->service;
}
-void
-galago_account_set_person(GalagoAccount *account, GalagoPerson *person)
-{
- g_return_if_fail(account != NULL);
- g_return_if_fail(person != NULL);
- g_return_if_fail(GALAGO_IS_ACCOUNT(account));
- g_return_if_fail(GALAGO_IS_PERSON(person));
- g_return_if_fail(galago_object_get_origin(GALAGO_OBJECT(person)) ==
- galago_object_get_origin(GALAGO_OBJECT(account)));
-
- if (account->priv->person == person)
- return;
-
- galago_person_remove_account(account->priv->person, account);
- account->priv->person = person;
- galago_person_add_account(person, account);
-}
-
-
GalagoPerson *
galago_account_get_person(const GalagoAccount *account)
{
@@ -817,7 +798,7 @@
}
void
-galago_account_set_presence(GalagoAccount *account, GalagoPresence *presence)
+_galago_account_set_presence(GalagoAccount *account, GalagoPresence *presence)
{
g_return_if_fail(account != NULL);
g_return_if_fail(GALAGO_IS_ACCOUNT(account));
@@ -877,7 +858,7 @@
g_free(obj_path);
}
- galago_account_set_presence(account, presence);
+ _galago_account_set_presence(account, presence);
}
return presence;
Modified: trunk/libgalago/libgalago/galago-account.h
===================================================================
--- trunk/libgalago/libgalago/galago-account.h 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-account.h 2006-01-27 19:11:20 UTC (rev 2508)
@@ -135,16 +135,6 @@
GalagoService *galago_account_get_service(const GalagoAccount *account);
/**
- * Sets the account's person.
- *
- * @internal This is used internally.
- *
- * @param account The account.
- * @param person The account's person.
- */
-void galago_account_set_person(GalagoAccount *account, GalagoPerson *person);
-
-/**
* Returns the person that owns an account.
*
* @param account The account.
@@ -254,17 +244,6 @@
gboolean query);
/**
- * Sets the account's presence.
- *
- * @internal This is used internally.
- *
- * @param account The account.
- * @param presence The presence to set.
- */
-void galago_account_set_presence(GalagoAccount *account,
- GalagoPresence *presence);
-
-/**
* Creates an account's presence.
*
* The account should be a local account.
Modified: trunk/libgalago/libgalago/galago-core.c
===================================================================
--- trunk/libgalago/libgalago/galago-core.c 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-core.c 2006-01-27 19:11:20 UTC (rev 2508)
@@ -548,7 +548,7 @@
account = GALAGO_ACCOUNT(galago_context_get_object(path));
if (account != NULL)
- galago_account_set_presence(account, NULL);
+ _galago_account_set_presence(account, NULL);
}
else if (dbus_message_is_signal(message, GALAGO_DBUS_ACCOUNT_INTERFACE,
"Connected"))
@@ -1116,28 +1116,6 @@
return services;
}
-void
-galago_add_person(GalagoPerson *person)
-{
- g_return_if_fail(galago_is_initted());
- g_return_if_fail(person != NULL);
-
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(_core)));
- galago_context_add_person(person);
- galago_context_pop();
-}
-
-void
-galago_remove_person(GalagoPerson *person)
-{
- g_return_if_fail(galago_is_initted());
- g_return_if_fail(person != NULL);
-
- galago_context_push(galago_object_get_context(GALAGO_OBJECT(_core)));
- galago_context_remove_person(person);
- galago_context_pop();
-}
-
GalagoPerson *
galago_get_person(const char *id, GalagoOrigin origin, gboolean query)
{
Modified: trunk/libgalago/libgalago/galago-core.h
===================================================================
--- trunk/libgalago/libgalago/galago-core.h 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-core.h 2006-01-27 19:11:20 UTC (rev 2508)
@@ -228,24 +228,6 @@
GalagoPerson *galago_create_person(const char *id);
/**
- * Adds a person to Galago's person cache.
- *
- * @internal This is used internally.
- *
- * @param person The person to add.
- */
-void galago_add_person(GalagoPerson *person);
-
-/**
- * Removes a person from Galago's person cache.
- *
- * @internal This is used internally.
- *
- * @param person The person to remove.
- */
-void galago_remove_person(GalagoPerson *person);
-
-/**
* Returns the person with the specified UID.
*
* @param uid The person's UID.
Modified: trunk/libgalago/libgalago/galago-person.c
===================================================================
--- trunk/libgalago/libgalago/galago-person.c 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-person.c 2006-01-27 19:11:20 UTC (rev 2508)
@@ -589,7 +589,7 @@
}
void
-galago_person_add_account(GalagoPerson *person, GalagoAccount *account)
+_galago_person_add_account(GalagoPerson *person, GalagoAccount *account)
{
const char *username;
GalagoService *service;
@@ -627,7 +627,7 @@
}
void
-galago_person_remove_account(GalagoPerson *person, GalagoAccount *account)
+_galago_person_remove_account(GalagoPerson *person, GalagoAccount *account)
{
AccountCacheKey key;
GalagoService *service;
Modified: trunk/libgalago/libgalago/galago-person.h
===================================================================
--- trunk/libgalago/libgalago/galago-person.h 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-person.h 2006-01-27 19:11:20 UTC (rev 2508)
@@ -227,27 +227,6 @@
GalagoAccount *galago_person_get_priority_account(const GalagoPerson *person);
/**
- * Adds an account to a person.
- *
- * @internal This is used internally.
- *
- * @param person The person.
- * @param account The account to add.
- */
-void galago_person_add_account(GalagoPerson *person, GalagoAccount *account);
-
-/**
- * Removes an account from a person.
- *
- * @internal This is used internally.
- *
- * @param person The person.
- * @param account The account to remove.
- */
-void galago_person_remove_account(GalagoPerson *person,
- GalagoAccount *account);
-
-/**
* Returns the account with the specified username and service.
*
* @param person The person.
Modified: trunk/libgalago/libgalago/galago-presence.c
===================================================================
--- trunk/libgalago/libgalago/galago-presence.c 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-presence.c 2006-01-27 19:11:20 UTC (rev 2508)
@@ -22,6 +22,7 @@
#include <libgalago/galago-context.h>
#include <libgalago/galago-core.h>
#include <libgalago/galago-marshal.h>
+#include <libgalago/galago-private.h>
#include <stdio.h>
#include <string.h>
@@ -178,7 +179,7 @@
if (account != NULL &&
galago_account_get_presence(account, FALSE) == presence)
{
- galago_account_set_presence(account, NULL);
+ _galago_account_set_presence(account, NULL);
}
if (presence->priv != NULL)
Modified: trunk/libgalago/libgalago/galago-private.h
===================================================================
--- trunk/libgalago/libgalago/galago-private.h 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-private.h 2006-01-27 19:11:20 UTC (rev 2508)
@@ -55,5 +55,58 @@
GalagoPerson *person,
const char *username,
const char *obj_path);
+/**
+ * Sets the account's presence.
+ *
+ * @internal This is used internally.
+ *
+ * @param account The account.
+ * @param presence The presence to set.
+ */
+void _galago_account_set_presence(GalagoAccount *account,
+ GalagoPresence *presence);
+/**
+ * Adds an account to a service.
+ *
+ * @internal This is used internally.
+ *
+ * @param service The service.
+ * @param account The account to add.
+ */
+void _galago_service_add_account(GalagoService *service,
+ GalagoAccount *account);
+
+/**
+ * Removes an account from a service.
+ *
+ * @internal This is used internally.
+ *
+ * @param service The service.
+ * @param account The account to remove.
+ */
+void _galago_service_remove_account(GalagoService *service,
+ GalagoAccount *account);
+
+/**
+ * Adds an account to a person.
+ *
+ * @internal This is used internally.
+ *
+ * @param person The person.
+ * @param account The account to add.
+ */
+void _galago_person_add_account(GalagoPerson *person, GalagoAccount *account);
+
+/**
+ * Removes an account from a person.
+ *
+ * @internal This is used internally.
+ *
+ * @param person The person.
+ * @param account The account to remove.
+ */
+void _galago_person_remove_account(GalagoPerson *person,
+ GalagoAccount *account);
+
#endif /* _GALAGO_PRIVATE_H_ */
Modified: trunk/libgalago/libgalago/galago-service.c
===================================================================
--- trunk/libgalago/libgalago/galago-service.c 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-service.c 2006-01-27 19:11:20 UTC (rev 2508)
@@ -537,9 +537,8 @@
return service->priv->accounts;
}
-/* XXX Make this private */
void
-galago_service_add_account(GalagoService *service, GalagoAccount *account)
+_galago_service_add_account(GalagoService *service, GalagoAccount *account)
{
const char *username;
@@ -572,7 +571,7 @@
}
void
-galago_service_remove_account(GalagoService *service, GalagoAccount *account)
+_galago_service_remove_account(GalagoService *service, GalagoAccount *account)
{
const char *username;
Modified: trunk/libgalago/libgalago/galago-service.h
===================================================================
--- trunk/libgalago/libgalago/galago-service.h 2006-01-27 09:19:35 UTC (rev 2507)
+++ trunk/libgalago/libgalago/galago-service.h 2006-01-27 19:11:20 UTC (rev 2508)
@@ -219,28 +219,6 @@
gboolean query);
/**
- * Adds an account to a service.
- *
- * @internal This is used internally.
- *
- * @param service The service.
- * @param account The account to add.
- */
-void galago_service_add_account(GalagoService *service,
- GalagoAccount *account);
-
-/**
- * Removes an account from a service.
- *
- * @internal This is used internally.
- *
- * @param service The service.
- * @param account The account to remove.
- */
-void galago_service_remove_account(GalagoService *service,
- GalagoAccount *account);
-
-/**
* Normalizes an account username based on the service's normalization
* flags.
*
More information about the galago-commits
mailing list