gossip r2858 - in trunk: . libgossip src
- From: mr svn gnome org
- To: svn-commits-list gnome org
- Subject: gossip r2858 - in trunk: . libgossip src
- Date: Sat, 29 Nov 2008 14:21:05 +0000 (UTC)
Author: mr
Date: Sat Nov 29 14:21:05 2008
New Revision: 2858
URL: http://svn.gnome.org/viewvc/gossip?rev=2858&view=rev
Log:
* libgossip/gossip-account-manager.c:
* libgossip/gossip-account.c:
* libgossip/gossip-avatar.[ch]:
* libgossip/gossip-chatroom-invite.[ch]:
* libgossip/gossip-chatroom-manager.c:
* libgossip/gossip-chatroom-provider.c:
* libgossip/gossip-chatroom.c:
* libgossip/gossip-conf-cocoa.c:
* libgossip/gossip-conf-gnome.c:
* libgossip/gossip-conf-windows.c:
* libgossip/gossip-contact-manager.c:
* libgossip/gossip-contact.c:
* libgossip/gossip-debug.c:
* libgossip/gossip-ebook.[ch]:
* libgossip/gossip-event-manager.c:
* libgossip/gossip-event.c:
* libgossip/gossip-ft-provider.c:
* libgossip/gossip-ft.c:
* libgossip/gossip-jabber-chatrooms.c:
* libgossip/gossip-jabber-ft.c:
* libgossip/gossip-jabber-register.c:
* libgossip/gossip-jabber-services.c:
* libgossip/gossip-jabber-vcard.c:
* libgossip/gossip-jabber.[ch]:
* libgossip/gossip-jid.c:
* libgossip/gossip-log.c:
* libgossip/gossip-message.c:
* libgossip/gossip-paths-gnome.c:
* libgossip/gossip-presence.c:
* libgossip/gossip-session.c:
* libgossip/gossip-sha.c:
* libgossip/gossip-stock.c:
* libgossip/gossip-time.c:
* libgossip/gossip-transport-protocol.c:
* libgossip/gossip-utils.c:
* libgossip/gossip-vcard.c:
* libgossip/gossip-version-info.c:
* src/gossip-account-widget-jabber.c: Code cleanups and
consistency. Also fixed places where we weren't using g_object_notify().
Modified:
trunk/ChangeLog
trunk/libgossip/gossip-account-manager.c
trunk/libgossip/gossip-account.c
trunk/libgossip/gossip-avatar.c
trunk/libgossip/gossip-avatar.h
trunk/libgossip/gossip-chatroom-invite.c
trunk/libgossip/gossip-chatroom-invite.h
trunk/libgossip/gossip-chatroom-manager.c
trunk/libgossip/gossip-chatroom-provider.c
trunk/libgossip/gossip-chatroom.c
trunk/libgossip/gossip-conf-cocoa.c
trunk/libgossip/gossip-conf-gnome.c
trunk/libgossip/gossip-conf-windows.c
trunk/libgossip/gossip-contact-manager.c
trunk/libgossip/gossip-contact.c
trunk/libgossip/gossip-debug.c
trunk/libgossip/gossip-ebook.c
trunk/libgossip/gossip-ebook.h
trunk/libgossip/gossip-event-manager.c
trunk/libgossip/gossip-event.c
trunk/libgossip/gossip-ft-provider.c
trunk/libgossip/gossip-ft.c
trunk/libgossip/gossip-jabber-chatrooms.c
trunk/libgossip/gossip-jabber-ft.c
trunk/libgossip/gossip-jabber-register.c
trunk/libgossip/gossip-jabber-services.c
trunk/libgossip/gossip-jabber-vcard.c
trunk/libgossip/gossip-jabber.c
trunk/libgossip/gossip-jabber.h
trunk/libgossip/gossip-jid.c
trunk/libgossip/gossip-log.c
trunk/libgossip/gossip-message.c
trunk/libgossip/gossip-paths-gnome.c
trunk/libgossip/gossip-presence.c
trunk/libgossip/gossip-session.c
trunk/libgossip/gossip-sha.c
trunk/libgossip/gossip-stock.c
trunk/libgossip/gossip-time.c
trunk/libgossip/gossip-transport-protocol.c
trunk/libgossip/gossip-utils.c
trunk/libgossip/gossip-vcard.c
trunk/libgossip/gossip-version-info.c
trunk/src/gossip-account-widget-jabber.c
Modified: trunk/libgossip/gossip-account-manager.c
==============================================================================
--- trunk/libgossip/gossip-account-manager.c (original)
+++ trunk/libgossip/gossip-account-manager.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
#include <sys/types.h>
@@ -40,11 +40,11 @@
#define ACCOUNTS_XML_FILENAME "accounts.xml"
#define ACCOUNTS_DTD_FILENAME "gossip-account.dtd"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_ACCOUNT_MANAGER, GossipAccountManagerPriv))
+#define GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_ACCOUNT_MANAGER, GossipAccountManagerPrivate))
-typedef struct _GossipAccountManagerPriv GossipAccountManagerPriv;
+typedef struct _GossipAccountManagerPrivate GossipAccountManagerPrivate;
-struct _GossipAccountManagerPriv {
+struct _GossipAccountManagerPrivate {
GList *accounts;
gchar *accounts_file_name;
@@ -105,8 +105,7 @@
G_TYPE_NONE,
1, GOSSIP_TYPE_ACCOUNT);
- g_type_class_add_private (object_class,
- sizeof (GossipAccountManagerPriv));
+ g_type_class_add_private (object_class, sizeof (GossipAccountManagerPrivate));
}
static void
@@ -117,9 +116,9 @@
static void
account_manager_finalize (GObject *object)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (object);
g_list_foreach (priv->accounts, (GFunc) g_object_unref, NULL);
g_list_free (priv->accounts);
@@ -137,11 +136,11 @@
{
GossipAccountManager *manager;
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
manager = g_object_new (GOSSIP_TYPE_ACCOUNT_MANAGER, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
if (filename) {
priv->accounts_file_name = g_strdup (filename);
@@ -157,14 +156,14 @@
gossip_account_manager_add (GossipAccountManager *manager,
GossipAccount *account)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
GList *l;
const gchar *name;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), FALSE);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
/* Don't add more than once */
for (l = priv->accounts; l; l = l->next) {
@@ -188,12 +187,12 @@
gossip_account_manager_remove (GossipAccountManager *manager,
GossipAccount *account)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Removing account with name:'%s'",
@@ -209,12 +208,12 @@
GList *
gossip_account_manager_get_accounts (GossipAccountManager *manager)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
GList *accounts;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
accounts = g_list_copy (priv->accounts);
g_list_foreach (accounts, (GFunc) g_object_ref, NULL);
@@ -225,11 +224,11 @@
guint
gossip_account_manager_get_count (GossipAccountManager *manager)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), 0);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
return g_list_length (priv->accounts);
}
@@ -239,13 +238,13 @@
gossip_account_manager_find (GossipAccountManager *manager,
const gchar *name)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
GList *l;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), NULL);
g_return_val_if_fail (name != NULL, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
for (l = priv->accounts; l; l = l->next) {
GossipAccount *account;
@@ -266,13 +265,13 @@
gossip_account_manager_find_by_id (GossipAccountManager *manager,
const gchar *id)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
GList *l;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), NULL);
g_return_val_if_fail (!G_STR_EMPTY (id), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
for (l = priv->accounts; l; l = l->next) {
GossipAccount *account;
@@ -294,12 +293,12 @@
gossip_account_manager_set_overridden_default (GossipAccountManager *manager,
const gchar *name)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager));
g_return_if_fail (name != NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Setting overriding default account with name:'%s'",
@@ -313,13 +312,13 @@
gossip_account_manager_set_default (GossipAccountManager *manager,
GossipAccount *account)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
const gchar *name;
g_return_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Setting default account with name:'%s'",
@@ -340,12 +339,12 @@
GossipAccount *
gossip_account_manager_get_default (GossipAccountManager *manager)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
const gchar *name;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
/* use override name first */
name = priv->default_name_override;
@@ -397,11 +396,11 @@
static gboolean
account_manager_get_all (GossipAccountManager *manager)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
gchar *dir;
gchar *file_with_path = NULL;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
/* Use default if no file specified. */
if (!priv->accounts_file_name) {
@@ -507,14 +506,14 @@
account_manager_file_parse (GossipAccountManager *manager,
const gchar *filename)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNodePtr accounts;
xmlNodePtr node;
gchar *str;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Attempting to parse file:'%s'...",
@@ -575,7 +574,7 @@
static gboolean
account_manager_file_save (GossipAccountManager *manager)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
xmlDocPtr doc;
xmlDocPtr old_doc;
xmlNodePtr root;
@@ -588,7 +587,7 @@
mode_t old_mask;
#endif /* G_OS_WIN32 */
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
if (priv->accounts_file_name) {
xml_file = g_strdup (priv->accounts_file_name);
@@ -699,13 +698,13 @@
gossip_account_manager_set_unique_name (GossipAccountManager *manager,
GossipAccount *account)
{
- GossipAccountManagerPriv *priv;
+ GossipAccountManagerPrivate *priv;
GList *l;
gchar *new_name;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (manager), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_ACCOUNT_MANAGER_GET_PRIVATE (manager);
new_name = g_strdup (gossip_account_get_name (account));
l = priv->accounts;
Modified: trunk/libgossip/gossip-account.c
==============================================================================
--- trunk/libgossip/gossip-account.c (original)
+++ trunk/libgossip/gossip-account.c Sat Nov 29 14:21:05 2008
@@ -41,11 +41,11 @@
#define DEBUG_DOMAIN "Account"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_ACCOUNT, GossipAccountPriv))
+#define GOSSIP_ACCOUNT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_ACCOUNT, GossipAccountPrivate))
-typedef struct _GossipAccountPriv GossipAccountPriv;
+typedef struct _GossipAccountPrivate GossipAccountPrivate;
-struct _GossipAccountPriv {
+struct _GossipAccountPrivate {
gchar *name;
gchar *id;
gchar *password;
@@ -200,7 +200,7 @@
TRUE,
G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
- g_type_class_add_private (object_class, sizeof (GossipAccountPriv));
+ g_type_class_add_private (object_class, sizeof (GossipAccountPrivate));
}
static void
@@ -211,9 +211,9 @@
static void
account_finalize (GObject *object)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (object);
g_free (priv->name);
@@ -232,9 +232,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (object);
switch (param_id) {
case PROP_NAME:
@@ -288,9 +288,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (object);
switch (param_id) {
case PROP_NAME:
@@ -373,22 +373,23 @@
const gchar *
gossip_account_get_name (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
return priv->name;
}
const gchar *
gossip_account_get_id (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->id;
}
@@ -397,7 +398,7 @@
const gchar *
gossip_account_get_password (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
GnomeKeyringNetworkPasswordData *data;
GnomeKeyringResult result;
GList *passwords;
@@ -406,7 +407,7 @@
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
/* Note: We don't use the port because usually that just
* defines a secure or insecure method of using the same
@@ -474,11 +475,11 @@
const gchar *
gossip_account_get_password (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
return priv->password;
}
@@ -488,11 +489,11 @@
const gchar *
gossip_account_get_password_tmp (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
return priv->password_tmp;
}
@@ -500,88 +501,96 @@
const gchar *
gossip_account_get_resource (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->resource;
}
const gchar *
gossip_account_get_server (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->server;
}
guint16
gossip_account_get_port (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), 0);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->port;
}
gboolean
gossip_account_get_auto_connect (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), TRUE);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->auto_connect;
}
gboolean
gossip_account_get_use_ssl (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->use_ssl;
}
gboolean
gossip_account_get_use_proxy (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->use_proxy;
}
gboolean
gossip_account_get_force_old_ssl (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->force_old_ssl;
}
gboolean
gossip_account_get_ignore_ssl_errors (GossipAccount *account)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), TRUE);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
+
return priv->ignore_ssl_errors;
}
@@ -589,12 +598,12 @@
gossip_account_set_name (GossipAccount *account,
const gchar *name)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (name != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->name);
priv->name = g_strdup (name);
@@ -606,12 +615,12 @@
gossip_account_set_id (GossipAccount *account,
const gchar *id)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (id != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->id);
priv->id = g_strdup (id);
@@ -625,7 +634,7 @@
gossip_account_set_password (GossipAccount *account,
const gchar *password)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
GnomeKeyringResult result;
gchar *user;
gchar *server;
@@ -634,7 +643,7 @@
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (password != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
/* Note: We don't use the port because usually that just
* defines a secure or insecure method of using the same
@@ -692,12 +701,12 @@
gossip_account_set_password (GossipAccount *account,
const gchar *password)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (password != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->password);
priv->password = g_strdup (password);
@@ -711,11 +720,11 @@
gossip_account_set_password_tmp (GossipAccount *account,
const gchar *password)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->password_tmp);
@@ -732,12 +741,12 @@
gossip_account_set_resource (GossipAccount *account,
const gchar *resource)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (resource != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->resource);
priv->resource = g_strdup (resource);
@@ -749,12 +758,12 @@
gossip_account_set_server (GossipAccount *account,
const gchar *server)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (server != NULL);
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
g_free (priv->server);
priv->server = g_strdup (server);
@@ -766,11 +775,11 @@
gossip_account_set_port (GossipAccount *account,
guint16 port)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->port = port;
g_object_notify (G_OBJECT (account), "port");
@@ -780,11 +789,11 @@
gossip_account_set_auto_connect (GossipAccount *account,
gboolean auto_connect)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->auto_connect = auto_connect;
g_object_notify (G_OBJECT (account), "auto-connect");
@@ -794,11 +803,11 @@
gossip_account_set_use_ssl (GossipAccount *account,
gboolean use_ssl)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->use_ssl = use_ssl;
g_object_notify (G_OBJECT (account), "use-ssl");
@@ -808,11 +817,11 @@
gossip_account_set_use_proxy (GossipAccount *account,
gboolean use_proxy)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->use_proxy = use_proxy;
g_object_notify (G_OBJECT (account), "use-proxy");
@@ -822,11 +831,11 @@
gossip_account_set_force_old_ssl (GossipAccount *account,
gboolean force_old_ssl)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->force_old_ssl = force_old_ssl;
g_object_notify (G_OBJECT (account), "force-old-ssl");
@@ -836,11 +845,11 @@
gossip_account_set_ignore_ssl_errors (GossipAccount *account,
gboolean ignore_ssl_errors)
{
- GossipAccountPriv *priv;
+ GossipAccountPrivate *priv;
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (account);
+ priv = GOSSIP_ACCOUNT_GET_PRIVATE (account);
priv->ignore_ssl_errors = ignore_ssl_errors;
g_object_notify (G_OBJECT (account), "ignore-ssl-errors");
Modified: trunk/libgossip/gossip-avatar.c
==============================================================================
--- trunk/libgossip/gossip-avatar.c (original)
+++ trunk/libgossip/gossip-avatar.c Sat Nov 29 14:21:05 2008
@@ -18,9 +18,9 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
-#include "string.h"
+#include <string.h>
#include "gossip-avatar.h"
@@ -28,9 +28,6 @@
#define AVATAR_SIZE 32
-static gboolean avatar_pixbuf_is_opaque (GdkPixbuf *pixbuf);
-static void avatar_pixbuf_roundify (GdkPixbuf *pixbuf);
-
static gboolean
avatar_pixbuf_is_opaque (GdkPixbuf *pixbuf)
{
Modified: trunk/libgossip/gossip-avatar.h
==============================================================================
--- trunk/libgossip/gossip-avatar.h (original)
+++ trunk/libgossip/gossip-avatar.h Sat Nov 29 14:21:05 2008
@@ -41,13 +41,13 @@
};
GType gossip_avatar_get_gtype (void) G_GNUC_CONST;
-GossipAvatar * gossip_avatar_new (guchar *avatar,
+GossipAvatar *gossip_avatar_new (guchar *avatar,
gsize len,
const gchar *format);
GdkPixbuf * gossip_avatar_get_pixbuf (GossipAvatar *avatar);
GdkPixbuf * gossip_avatar_create_pixbuf_with_size (GossipAvatar *avatar,
gint size);
-GossipAvatar * gossip_avatar_ref (GossipAvatar *avatar);
+GossipAvatar *gossip_avatar_ref (GossipAvatar *avatar);
void gossip_avatar_unref (GossipAvatar *avatar);
G_END_DECLS
Modified: trunk/libgossip/gossip-chatroom-invite.c
==============================================================================
--- trunk/libgossip/gossip-chatroom-invite.c (original)
+++ trunk/libgossip/gossip-chatroom-invite.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <glib.h>
@@ -63,17 +63,16 @@
invite->inviter = g_object_ref (inviter);
invite->id = g_strdup (id);
-
- if (reason) {
invite->reason = g_strdup (reason);
- }
return invite;
}
GossipChatroomInvite *
-gossip_chatroom_invite_ref (GossipChatroomInvite *invite)
+gossip_chatroom_invite_ref (gpointer data)
{
+ GossipChatroomInvite *invite = data;
+
g_return_val_if_fail (invite != NULL, NULL);
g_return_val_if_fail (invite->ref_count > 0, NULL);
@@ -83,8 +82,10 @@
}
void
-gossip_chatroom_invite_unref (GossipChatroomInvite *invite)
+gossip_chatroom_invite_unref (gpointer data)
{
+ GossipChatroomInvite *invite = data;
+
g_return_if_fail (invite != NULL);
g_return_if_fail (invite->ref_count > 0);
Modified: trunk/libgossip/gossip-chatroom-invite.h
==============================================================================
--- trunk/libgossip/gossip-chatroom-invite.h (original)
+++ trunk/libgossip/gossip-chatroom-invite.h Sat Nov 29 14:21:05 2008
@@ -35,8 +35,8 @@
GossipChatroomInvite *gossip_chatroom_invite_new (GossipContact *invitor,
const gchar *id,
const gchar *reason);
-GossipChatroomInvite *gossip_chatroom_invite_ref (GossipChatroomInvite *invite);
-void gossip_chatroom_invite_unref (GossipChatroomInvite *invite);
+GossipChatroomInvite *gossip_chatroom_invite_ref (gpointer invite);
+void gossip_chatroom_invite_unref (gpointer invite);
GossipContact * gossip_chatroom_invite_get_inviter (GossipChatroomInvite *invite);
const gchar * gossip_chatroom_invite_get_id (GossipChatroomInvite *invite);
const gchar * gossip_chatroom_invite_get_reason (GossipChatroomInvite *invite);
Modified: trunk/libgossip/gossip-chatroom-manager.c
==============================================================================
--- trunk/libgossip/gossip-chatroom-manager.c (original)
+++ trunk/libgossip/gossip-chatroom-manager.c Sat Nov 29 14:21:05 2008
@@ -16,10 +16,9 @@
* License along with this program; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
- *
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
#include <sys/types.h>
@@ -38,14 +37,14 @@
#define DEBUG_DOMAIN "ChatroomManager"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHATROOM_MANAGER, GossipChatroomManagerPriv))
+#define GOSSIP_CHATROOM_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHATROOM_MANAGER, GossipChatroomManagerPrivate))
#define CHATROOMS_XML_FILENAME "chatrooms.xml"
#define CHATROOMS_DTD_FILENAME "gossip-chatroom.dtd"
-typedef struct _GossipChatroomManagerPriv GossipChatroomManagerPriv;
+typedef struct _GossipChatroomManagerPrivate GossipChatroomManagerPrivate;
-struct _GossipChatroomManagerPriv {
+struct _GossipChatroomManagerPrivate {
GossipAccountManager *account_manager;
GossipContactManager *contact_manager;
@@ -137,7 +136,7 @@
1, GOSSIP_TYPE_CHATROOM);
g_type_class_add_private (object_class,
- sizeof (GossipChatroomManagerPriv));
+ sizeof (GossipChatroomManagerPrivate));
}
static void
@@ -148,9 +147,9 @@
static void
chatroom_manager_finalize (GObject *object)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (object);
g_free (priv->chatrooms_file_name);
g_free (priv->default_name);
@@ -176,14 +175,14 @@
{
GossipChatroomManager *manager;
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_ACCOUNT_MANAGER (account_manager), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT_MANAGER (contact_manager), NULL);
manager = g_object_new (GOSSIP_TYPE_CHATROOM_MANAGER, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
if (account_manager) {
priv->account_manager = g_object_ref (account_manager);
@@ -232,14 +231,14 @@
gossip_chatroom_manager_add (GossipChatroomManager *manager,
GossipChatroom *chatroom)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GossipContact *own_contact;
const gchar *name;
g_return_val_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager), FALSE);
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
/* Don't add more than once */
if (gossip_chatroom_manager_find (manager, gossip_chatroom_get_id (chatroom))) {
@@ -286,13 +285,13 @@
gossip_chatroom_manager_remove (GossipChatroomManager *manager,
GossipChatroom *chatroom)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *link;
g_return_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Removing chatroom with name:'%s'",
@@ -323,12 +322,12 @@
GossipChatroom *chatroom,
gint index)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Indexing chatroom with name:'%s' to position %d",
@@ -351,13 +350,13 @@
GParamSpec *arg1,
GossipChatroomManager *manager)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
/* We sort here so we resort the list when a chatroom is
* marked as a favorite, this way, newly added favorites
* appear correctly in the right order.
*/
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
priv->chatrooms = g_list_sort (priv->chatrooms, chatroom_sort_func);
@@ -369,13 +368,13 @@
GParamSpec *arg1,
GossipChatroomManager *manager)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
/* We sort here so we resort the list when a chatroom name
* changes, this way, the list in the favorites menu stays up
* to date.
*/
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
priv->chatrooms = g_list_sort (priv->chatrooms, chatroom_sort_func);
}
@@ -384,12 +383,12 @@
gossip_chatroom_manager_get_chatrooms (GossipChatroomManager *manager,
GossipAccount *account)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *chatrooms, *l;
g_return_val_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
if (!account) {
return g_list_copy (priv->chatrooms);
@@ -420,13 +419,13 @@
gossip_chatroom_manager_get_count (GossipChatroomManager *manager,
GossipAccount *account)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *l;
guint count = 0;
g_return_val_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager), 0);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
if (!account) {
return g_list_length (priv->chatrooms);
@@ -455,13 +454,13 @@
gossip_chatroom_manager_find (GossipChatroomManager *manager,
GossipChatroomId id)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *l;
g_return_val_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager), NULL);
g_return_val_if_fail (id >= 1, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
for (l = priv->chatrooms; l; l = l->next) {
GossipChatroom *chatroom;
@@ -482,7 +481,7 @@
const gchar *server,
const gchar *room)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *found = NULL;
GList *l;
@@ -490,7 +489,7 @@
g_return_val_if_fail (server != NULL, NULL);
g_return_val_if_fail (room != NULL, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
for (l = priv->chatrooms; l; l = l->next) {
GossipChatroom *chatroom;
@@ -566,13 +565,13 @@
gossip_chatroom_manager_set_default (GossipChatroomManager *manager,
GossipChatroom *chatroom)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
const gchar *name;
g_return_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Setting default chatroom with name:'%s'",
@@ -593,12 +592,12 @@
GossipChatroom *
gossip_chatroom_manager_get_default (GossipChatroomManager *manager)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GList *l;
g_return_val_if_fail (GOSSIP_IS_CHATROOM_MANAGER (manager), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
for (l = priv->chatrooms; l && priv->default_name; l = l->next) {
GossipChatroom *chatroom;
@@ -636,11 +635,11 @@
static gboolean
chatroom_manager_get_all (GossipChatroomManager *manager)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
gchar *dir;
gchar *file_with_path = NULL;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
/* Use default if no file specified. */
if (!priv->chatrooms_file_name) {
@@ -671,7 +670,7 @@
chatroom_manager_parse_chatroom (GossipChatroomManager *manager,
xmlNodePtr node)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
GossipChatroom *chatroom;
xmlNodePtr child;
gchar *str;
@@ -679,7 +678,7 @@
gchar *room, *password, *account_name;
gboolean auto_connect;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
/* Default values. */
name = NULL;
@@ -773,14 +772,14 @@
chatroom_manager_file_parse (GossipChatroomManager *manager,
const gchar *filename)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNodePtr chatrooms;
xmlNodePtr node;
gchar *str;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN, "Attempting to parse file:'%s'...", filename);
@@ -838,7 +837,7 @@
static gboolean
chatroom_manager_file_save (GossipChatroomManager *manager)
{
- GossipChatroomManagerPriv *priv;
+ GossipChatroomManagerPrivate *priv;
xmlDocPtr doc;
xmlNodePtr root;
GList *chatrooms;
@@ -846,7 +845,7 @@
gchar *dir;
gchar *file;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CHATROOM_MANAGER_GET_PRIVATE (manager);
if (priv->chatrooms_file_name) {
file = g_strdup (priv->chatrooms_file_name);
Modified: trunk/libgossip/gossip-chatroom-provider.c
==============================================================================
--- trunk/libgossip/gossip-chatroom-provider.c (original)
+++ trunk/libgossip/gossip-chatroom-provider.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <glib/gi18n.h>
Modified: trunk/libgossip/gossip-chatroom.c
==============================================================================
--- trunk/libgossip/gossip-chatroom.c (original)
+++ trunk/libgossip/gossip-chatroom.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -31,11 +31,11 @@
#include "libgossip-marshal.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHATROOM, GossipChatroomPriv))
+#define GOSSIP_CHATROOM_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CHATROOM, GossipChatroomPrivate))
-typedef struct _GossipChatroomPriv GossipChatroomPriv;
+typedef struct _GossipChatroomPrivate GossipChatroomPrivate;
-struct _GossipChatroomPriv {
+struct _GossipChatroomPrivate {
GossipAccount *account;
GossipChatroomId id;
@@ -348,16 +348,16 @@
G_TYPE_NONE,
1, GOSSIP_TYPE_CONTACT);
- g_type_class_add_private (object_class, sizeof (GossipChatroomPriv));
+ g_type_class_add_private (object_class, sizeof (GossipChatroomPrivate));
}
static void
gossip_chatroom_init (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
static guint id = 1;
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->id = id++;
@@ -375,9 +375,9 @@
static void
chatroom_finalize (GObject *object)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (object);
if (priv->account) {
g_object_unref (priv->account);
@@ -406,9 +406,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (object);
switch (param_id) {
case PROP_ACCOUNT:
@@ -474,9 +474,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (object);
switch (param_id) {
case PROP_ACCOUNT:
@@ -548,9 +548,9 @@
static void
update_id_str (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (priv->room && priv->server) {
g_free (priv->id_str);
@@ -561,9 +561,9 @@
static void
update_own_contact_id_str (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (priv->id_str && priv->nick) {
g_free (priv->own_contact_id_str);
@@ -574,9 +574,9 @@
static void
update_own_contact (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
/* We can't do anything without an account, own contact or
* id_str (room and server) to generate the own
@@ -632,11 +632,11 @@
GossipAccount *
gossip_chatroom_get_account (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (!priv->account) {
return NULL;
@@ -648,22 +648,23 @@
GossipChatroomId
gossip_chatroom_get_id (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), 0);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->id;
}
const gchar *
gossip_chatroom_get_id_str (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (!priv->id_str) {
priv->id_str = g_strdup ("");
@@ -675,99 +676,107 @@
const gchar *
gossip_chatroom_get_name (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->name;
}
const gchar *
gossip_chatroom_get_description (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->description;
}
const gchar *
gossip_chatroom_get_subject (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->subject;
}
const gchar *
gossip_chatroom_get_nick (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->nick;
}
const gchar *
gossip_chatroom_get_server (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->server;
}
const gchar *
gossip_chatroom_get_room (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->room;
}
const gchar *
gossip_chatroom_get_password (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->password;
}
gboolean
gossip_chatroom_get_auto_connect (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
+
return priv->auto_connect;
}
gboolean
gossip_chatroom_get_favorite (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->favorite;
}
@@ -775,11 +784,11 @@
GossipChatroomFeature
gossip_chatroom_get_features (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), 0);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->features;
}
@@ -787,12 +796,12 @@
GossipChatroomStatus
gossip_chatroom_get_status (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom),
GOSSIP_CHATROOM_STATUS_UNKNOWN);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->status;
}
@@ -800,11 +809,11 @@
GossipChatroomStatus
gossip_chatroom_get_occupants (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), 0);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->occupants;
}
@@ -812,11 +821,11 @@
GossipChatroomError
gossip_chatroom_get_last_error (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), GOSSIP_CHATROOM_ERROR_NONE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->last_error;
}
@@ -825,12 +834,12 @@
gossip_chatroom_get_contact_info (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return g_hash_table_lookup (priv->contacts, contact);
}
@@ -838,11 +847,11 @@
GList *
gossip_chatroom_get_contacts (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return g_hash_table_get_keys (priv->contacts);
}
@@ -850,11 +859,11 @@
GossipContact *
gossip_chatroom_get_own_contact (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
return priv->own_contact;
}
@@ -862,11 +871,11 @@
const gchar *
gossip_chatroom_get_own_contact_id_str (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (!priv->own_contact_id_str) {
priv->own_contact_id_str = g_strdup ("");
@@ -879,12 +888,12 @@
gossip_chatroom_set_account (GossipChatroom *chatroom,
GossipAccount *account)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (priv->account) {
g_object_unref (priv->account);
}
@@ -901,12 +910,12 @@
gossip_chatroom_set_name (GossipChatroom *chatroom,
const gchar *name)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (name != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->name);
priv->name = g_strdup (name);
@@ -918,12 +927,12 @@
gossip_chatroom_set_description (GossipChatroom *chatroom,
const gchar *description)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (description != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->description);
priv->description = g_strdup (description);
@@ -935,12 +944,12 @@
gossip_chatroom_set_subject (GossipChatroom *chatroom,
const gchar *subject)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (subject != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->subject);
priv->subject = g_strdup (subject);
@@ -952,12 +961,12 @@
gossip_chatroom_set_nick (GossipChatroom *chatroom,
const gchar *nick)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (nick != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->nick);
priv->nick = g_strdup (nick);
@@ -973,12 +982,12 @@
gossip_chatroom_set_server (GossipChatroom *chatroom,
const gchar *server)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (server != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->server);
priv->server = g_strdup (server);
@@ -995,12 +1004,12 @@
gossip_chatroom_set_room (GossipChatroom *chatroom,
const gchar *room)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (room != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->room);
priv->room = g_strdup (room);
@@ -1017,12 +1026,12 @@
gossip_chatroom_set_password (GossipChatroom *chatroom,
const gchar *password)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (password != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_free (priv->password);
priv->password = g_strdup (password);
@@ -1034,11 +1043,11 @@
gossip_chatroom_set_auto_connect (GossipChatroom *chatroom,
gboolean auto_connect)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->auto_connect = auto_connect;
g_object_notify (G_OBJECT (chatroom), "auto-connect");
@@ -1048,11 +1057,11 @@
gossip_chatroom_set_favorite (GossipChatroom *chatroom,
gboolean favorite)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->favorite = favorite;
g_object_notify (G_OBJECT (chatroom), "favorite");
@@ -1061,9 +1070,9 @@
static void
chatroom_clear_contacts (GossipChatroom *chatroom)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
g_hash_table_remove_all (priv->contacts);
}
@@ -1072,11 +1081,11 @@
gossip_chatroom_set_features (GossipChatroom *chatroom,
GossipChatroomFeature features)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->features = features;
@@ -1087,11 +1096,11 @@
gossip_chatroom_set_status (GossipChatroom *chatroom,
GossipChatroomStatus status)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->status = status;
@@ -1106,11 +1115,11 @@
gossip_chatroom_set_occupants (GossipChatroom *chatroom,
guint occupants)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->occupants = occupants;
@@ -1121,11 +1130,11 @@
gossip_chatroom_set_last_error (GossipChatroom *chatroom,
GossipChatroomError last_error)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
priv->last_error = last_error;
@@ -1143,14 +1152,14 @@
GossipContact *contact,
GossipChatroomContactInfo *info)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *chatroom_contact;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (info != NULL);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
chatroom_contact = g_new0 (GossipChatroomContactInfo, 1);
chatroom_contact->role = info->role;
@@ -1167,12 +1176,12 @@
gossip_chatroom_set_own_contact (GossipChatroom *chatroom,
GossipContact *own_contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (GOSSIP_IS_CONTACT (own_contact));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (priv->own_contact) {
g_object_unref (priv->own_contact);
@@ -1230,14 +1239,14 @@
gossip_chatroom_equal_full (gconstpointer a,
gconstpointer b)
{
- GossipChatroomPriv *priv1;
- GossipChatroomPriv *priv2;
+ GossipChatroomPrivate *priv1;
+ GossipChatroomPrivate *priv2;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (a), FALSE);
g_return_val_if_fail (GOSSIP_IS_CHATROOM (b), FALSE);
- priv1 = GET_PRIV (a);
- priv2 = GET_PRIV (b);
+ priv1 = GOSSIP_CHATROOM_GET_PRIVATE (a);
+ priv2 = GOSSIP_CHATROOM_GET_PRIVATE (b);
if (!priv1 || !priv2) {
return FALSE;
@@ -1385,13 +1394,13 @@
GossipContact *contact,
GossipChatroomContactInfo *info)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *chatroom_contact;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
chatroom_contact = g_new0 (GossipChatroomContactInfo, 1);
if (info) {
@@ -1414,12 +1423,12 @@
gossip_chatroom_contact_left (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
if (g_hash_table_lookup (priv->contacts, contact)) {
g_signal_emit (chatroom, signals[CONTACT_LEFT], 0, contact);
@@ -1431,13 +1440,13 @@
gossip_chatroom_contact_can_message_all (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *info;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
info = gossip_chatroom_get_contact_info (chatroom, contact);
if (!info) {
@@ -1456,13 +1465,13 @@
gossip_chatroom_contact_can_change_subject (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *info;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
info = gossip_chatroom_get_contact_info (chatroom, contact);
if (!info) {
@@ -1481,13 +1490,13 @@
gossip_chatroom_contact_can_kick (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *info;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
info = gossip_chatroom_get_contact_info (chatroom, contact);
if (!info) {
@@ -1505,13 +1514,13 @@
gossip_chatroom_contact_can_change_role (GossipChatroom *chatroom,
GossipContact *contact)
{
- GossipChatroomPriv *priv;
+ GossipChatroomPrivate *priv;
GossipChatroomContactInfo *info;
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), FALSE);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (chatroom);
+ priv = GOSSIP_CHATROOM_GET_PRIVATE (chatroom);
info = gossip_chatroom_get_contact_info (chatroom, contact);
if (!info) {
Modified: trunk/libgossip/gossip-conf-cocoa.c
==============================================================================
--- trunk/libgossip/gossip-conf-cocoa.c (original)
+++ trunk/libgossip/gossip-conf-cocoa.c Sat Nov 29 14:21:05 2008
@@ -31,11 +31,11 @@
#define POOL_ALLOC NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]
#define POOL_RELEASE [pool release]
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPriv))
+#define GOSSIP_CONF_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPrivate))
typedef struct {
NSUserDefaults *defaults;
-} GossipConfPriv;
+} GossipConfPrivate;
typedef struct {
GossipConf *conf;
@@ -58,16 +58,16 @@
object_class->finalize = conf_finalize;
- g_type_class_add_private (object_class, sizeof (GossipConfPriv));
+ g_type_class_add_private (object_class, sizeof (GossipConfPrivate));
}
static void
gossip_conf_init (GossipConf *conf)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSDictionary *dict;
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
priv->defaults = [NSUserDefaults standardUserDefaults];
@@ -137,9 +137,9 @@
static void
conf_finalize (GObject *object)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONF_GET_PRIVATE (object);
/* gconf_client_remove_dir (priv->gconf_client,
GOSSIP_CONF_ROOT,
@@ -181,12 +181,12 @@
const gchar *key,
gint value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -203,12 +203,12 @@
const gchar *key,
gint *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -227,12 +227,12 @@
const gchar *key,
gboolean value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -251,12 +251,12 @@
const gchar *key,
gboolean *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -273,12 +273,12 @@
const gchar *key,
const gchar *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string, *nsvalue;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -298,12 +298,12 @@
const gchar *key,
gchar **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
NSString *string, *nsvalue;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
POOL_ALLOC;
@@ -322,11 +322,11 @@
const gchar *key,
GSList *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
return TRUE; /*gconf_client_set_string_list (priv->gconf_client,
key,
@@ -340,11 +340,11 @@
const gchar *key,
GSList **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*value = NULL; /*gconf_client_get_string_list (priv->gconf_client,
key,
@@ -383,13 +383,13 @@
GossipConfNotifyFunc func,
gpointer user_data)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
guint id;
GossipConfNotifyData *data;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), 0);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
data = g_slice_new (GossipConfNotifyData);
data->func = func;
@@ -410,11 +410,11 @@
gossip_conf_notify_remove (GossipConf *conf,
guint id)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
/*gconf_client_notify_remove (priv->gconf_client, id);*/
@@ -432,11 +432,12 @@
gchar **username,
gchar **password)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
+
/*
*use_http_proxy = gconf_client_get_bool (priv->gconf_client,
HTTP_PROXY_ROOT "/use_http_proxy",
Modified: trunk/libgossip/gossip-conf-gnome.c
==============================================================================
--- trunk/libgossip/gossip-conf-gnome.c (original)
+++ trunk/libgossip/gossip-conf-gnome.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Richard Hult <richard imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -35,11 +35,11 @@
#define HTTP_PROXY_ROOT "/system/http_proxy"
#define DESKTOP_INTERFACE_ROOT "/desktop/gnome/interface"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPriv))
+#define GOSSIP_CONF_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPrivate))
typedef struct {
GConfClient *gconf_client;
-} GossipConfPriv;
+} GossipConfPrivate;
typedef struct {
GossipConf *conf;
@@ -62,15 +62,15 @@
object_class->finalize = conf_finalize;
- g_type_class_add_private (object_class, sizeof (GossipConfPriv));
+ g_type_class_add_private (object_class, sizeof (GossipConfPrivate));
}
static void
gossip_conf_init (GossipConf *conf)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
priv->gconf_client = gconf_client_get_default ();
@@ -91,9 +91,9 @@
static void
conf_finalize (GObject *object)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONF_GET_PRIVATE (object);
gconf_client_remove_dir (priv->gconf_client,
GOSSIP_CONF_ROOT,
@@ -134,13 +134,13 @@
const gchar *key,
gint value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
gossip_debug (DEBUG_DOMAIN, "Setting int:'%s' to %d", key, value);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
return gconf_client_set_int (priv->gconf_client,
key,
@@ -153,7 +153,7 @@
const gchar *key,
gint *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
*value = 0;
@@ -161,7 +161,7 @@
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*value = gconf_client_get_int (priv->gconf_client,
key,
@@ -183,14 +183,14 @@
const gchar *key,
gboolean value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
gossip_debug (DEBUG_DOMAIN, "Setting bool:'%s' to %d ---> %s",
key, value, value ? "true" : "false");
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
return gconf_client_set_bool (priv->gconf_client,
key,
@@ -203,7 +203,7 @@
const gchar *key,
gboolean *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
*value = FALSE;
@@ -211,7 +211,7 @@
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*value = gconf_client_get_bool (priv->gconf_client,
key,
@@ -234,14 +234,14 @@
const gchar *key,
const gchar *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
gossip_debug (DEBUG_DOMAIN, "Setting string:'%s' to '%s'",
key, value);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
return gconf_client_set_string (priv->gconf_client,
key,
@@ -254,14 +254,14 @@
const gchar *key,
gchar **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
*value = NULL;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*value = gconf_client_get_string (priv->gconf_client,
key,
@@ -283,11 +283,11 @@
const gchar *key,
GSList *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
return gconf_client_set_list (priv->gconf_client,
key,
@@ -301,14 +301,14 @@
const gchar *key,
GSList **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
*value = NULL;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*value = gconf_client_get_list (priv->gconf_client,
key,
@@ -350,13 +350,13 @@
GossipConfNotifyFunc func,
gpointer user_data)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
guint id;
GossipConfNotifyData *data;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), 0);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
data = g_slice_new (GossipConfNotifyData);
data->func = func;
@@ -377,11 +377,11 @@
gossip_conf_notify_remove (GossipConf *conf,
guint id)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
gconf_client_notify_remove (priv->gconf_client, id);
@@ -399,11 +399,11 @@
gchar **username,
gchar **password)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*use_http_proxy = gconf_client_get_bool (priv->gconf_client,
HTTP_PROXY_ROOT "/use_http_proxy",
Modified: trunk/libgossip/gossip-conf-windows.c
==============================================================================
--- trunk/libgossip/gossip-conf-windows.c (original)
+++ trunk/libgossip/gossip-conf-windows.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Richard Hult <richard imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -37,11 +37,11 @@
#define HTTP_PROXY_ROOT "/system/http_proxy"
#define DESKTOP_INTERFACE_ROOT "/desktop/gnome/interface"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPriv))
+#define GOSSIP_CONF_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONF, GossipConfPriv))
typedef struct {
void *fixme;
-} GossipConfPriv;
+} GossipConfPrivate;
typedef struct {
GossipConf *conf;
@@ -64,23 +64,23 @@
object_class->finalize = conf_finalize;
- g_type_class_add_private (object_class, sizeof (GossipConfPriv));
+ g_type_class_add_private (object_class, sizeof (GossipConfPrivate));
}
static void
gossip_conf_init (GossipConf *conf)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
}
static void
conf_finalize (GObject *object)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONF_GET_PRIVATE (object);
G_OBJECT_CLASS (gossip_conf_parent_class)->finalize (object);
}
@@ -329,7 +329,7 @@
const gchar *key,
gint value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
gchar *reg_key;
HKEY hk;
LONG success;
@@ -339,7 +339,7 @@
gossip_debug (DEBUG_DOMAIN, "Setting int:'%s' to %d", key, value);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_INT, TRUE);
if (!hk) {
@@ -373,7 +373,7 @@
const gchar *key,
gint *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
gchar *reg_key;
wchar_t *wc_key;
@@ -386,7 +386,7 @@
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_INT, TRUE);
if (!hk) {
@@ -413,7 +413,7 @@
const gchar *key,
gboolean value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
gchar *reg_key;
HKEY hk;
LONG success;
@@ -424,7 +424,7 @@
gossip_debug (DEBUG_DOMAIN, "Setting bool:'%s' to %d ---> %s",
key, value, value ? "true" : "false");
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_BOOLEAN, TRUE);
if (!hk) {
@@ -459,7 +459,7 @@
const gchar *key,
gboolean *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
gchar *reg_key;
wchar_t *wc_key;
@@ -472,7 +472,7 @@
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
g_return_val_if_fail (value != NULL, FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_BOOLEAN, TRUE);
if (!hk) {
@@ -500,7 +500,7 @@
const gchar *key,
const gchar *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
gchar *reg_key;
HKEY hk;
LONG success;
@@ -510,7 +510,7 @@
gossip_debug (DEBUG_DOMAIN, "Setting string:'%s' to '%s'",
key, value);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_STRING, TRUE);
if (!hk) {
@@ -544,7 +544,7 @@
const gchar *key,
gchar **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
gchar *reg_key;
wchar_t *wc_key;
@@ -557,7 +557,7 @@
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
hk = conf_get_hkey (key, G_TYPE_STRING, TRUE);
if (!hk) {
@@ -590,11 +590,11 @@
const gchar *key,
GSList *value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
/* FIXME: Set value */
return TRUE;
@@ -605,14 +605,14 @@
const gchar *key,
GSList **value)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
GError *error = NULL;
*value = NULL;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
/* FIXME: Get value */
@@ -652,13 +652,13 @@
GossipConfNotifyFunc func,
gpointer user_data)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
guint id;
GossipConfNotifyData *data;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), 0);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
data = g_slice_new (GossipConfNotifyData);
data->func = func;
@@ -682,11 +682,11 @@
gossip_conf_notify_remove (GossipConf *conf,
guint id)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
/* FIXME: Implement */
/* gconf_client_notify_remove (priv->gconf_client, id); */
@@ -705,11 +705,11 @@
gchar **username,
gchar **password)
{
- GossipConfPriv *priv;
+ GossipConfPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONF (conf), FALSE);
- priv = GET_PRIV (conf);
+ priv = GOSSIP_CONF_GET_PRIVATE (conf);
*use_http_proxy = FALSE;
*host = NULL;
Modified: trunk/libgossip/gossip-contact-manager.c
==============================================================================
--- trunk/libgossip/gossip-contact-manager.c (original)
+++ trunk/libgossip/gossip-contact-manager.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
#include <sys/types.h>
@@ -42,11 +42,11 @@
#define CONTACTS_XML_FILENAME "contacts.xml"
#define CONTACTS_DTD_FILENAME "gossip-contact.dtd"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT_MANAGER, GossipContactManagerPriv))
+#define GOSSIP_CONTACT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT_MANAGER, GossipContactManagerPrivate))
-typedef struct _GossipContactManagerPriv GossipContactManagerPriv;
+typedef struct _GossipContactManagerPrivate GossipContactManagerPrivate;
-struct _GossipContactManagerPriv {
+struct _GossipContactManagerPrivate {
GossipSession *session;
GHashTable *contacts;
@@ -74,7 +74,7 @@
object_class->finalize = contact_manager_finalize;
- g_type_class_add_private (object_class, sizeof (GossipContactManagerPriv));
+ g_type_class_add_private (object_class, sizeof (GossipContactManagerPrivate));
}
static void
@@ -85,9 +85,9 @@
static void
contact_manager_finalize (GObject *object)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (object);
g_hash_table_unref (priv->contacts);
@@ -113,14 +113,14 @@
gossip_contact_manager_new (GossipSession *session,
const gchar *filename)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipContactManager *manager;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
manager = g_object_new (GOSSIP_TYPE_CONTACT_MANAGER, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
priv->session = g_object_ref (session);
@@ -147,14 +147,14 @@
gossip_contact_manager_add (GossipContactManager *manager,
GossipContact *contact)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipAccount *account;
GossipContact *own_contact;
g_return_val_if_fail (GOSSIP_IS_CONTACT_MANAGER (manager), FALSE);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
account = gossip_contact_get_account (contact);
own_contact = gossip_contact_manager_get_own_contact (manager, account);
@@ -185,13 +185,13 @@
gossip_contact_manager_remove (GossipContactManager *manager,
GossipContact *contact)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipAccount *account;
g_return_if_fail (GOSSIP_IS_CONTACT_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
account = gossip_contact_get_account (contact);
gossip_debug (DEBUG_DOMAIN,
@@ -207,7 +207,7 @@
GossipAccount *account,
const gchar *contact_id)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipContact *found = NULL;
GList *contacts;
GList *l;
@@ -215,7 +215,7 @@
g_return_val_if_fail (GOSSIP_IS_CONTACT_MANAGER (manager), NULL);
g_return_val_if_fail (contact_id != NULL, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
contacts = g_hash_table_get_keys (priv->contacts);
@@ -258,7 +258,7 @@
GossipContactType contact_type,
const gchar *contact_id)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipContact *found = NULL;
GList *contacts;
GList *l;
@@ -267,7 +267,7 @@
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
g_return_val_if_fail (contact_id != NULL, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
contacts = g_hash_table_get_keys (priv->contacts);
@@ -399,7 +399,7 @@
return contact;
} else {
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
gchar *name;
gossip_debug (DEBUG_DOMAIN,
@@ -416,7 +416,7 @@
g_free (name);
/* Don't use _manager_add() - recursive loop */
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
g_hash_table_insert (priv->contacts,
contact,
@@ -431,9 +431,9 @@
static gboolean
contact_manager_store_cb (GossipContactManager *manager)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN, "Saving contacts");
@@ -449,11 +449,11 @@
gboolean
gossip_contact_manager_store (GossipContactManager *manager)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT_MANAGER (manager), FALSE);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
if (priv->store_timeout_id) {
g_source_remove (priv->store_timeout_id);
@@ -482,11 +482,11 @@
static gboolean
contact_manager_get_all (GossipContactManager *manager)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
gchar *directory;
gchar *filename = NULL;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN, "Loading contacts");
@@ -549,7 +549,7 @@
GossipAccount *account,
xmlNodePtr node)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipContact *own_contact;
const gchar *id;
const gchar *name;
@@ -560,7 +560,7 @@
return;
}
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
own_contact = gossip_contact_manager_get_own_contact (manager, account);
@@ -584,14 +584,14 @@
contact_manager_file_parse (GossipContactManager *manager,
const gchar *filename)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipAccountManager *account_manager;
xmlParserCtxtPtr ctxt;
xmlDocPtr doc;
xmlNodePtr contacts;
xmlNodePtr node, child;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Attempting to parse file:'%s'...",
@@ -681,7 +681,7 @@
static gboolean
contact_manager_file_save (GossipContactManager *manager)
{
- GossipContactManagerPriv *priv;
+ GossipContactManagerPrivate *priv;
GossipAccountManager *account_manager;
GossipAccount *account;
gchar *directory;
@@ -698,7 +698,7 @@
GHashTable *nodes;
gboolean create_file = FALSE;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN, "Attempting to save...");
Modified: trunk/libgossip/gossip-contact.c
==============================================================================
--- trunk/libgossip/gossip-contact.c (original)
+++ trunk/libgossip/gossip-contact.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -28,14 +28,14 @@
#include "gossip-jid.h"
#include "gossip-utils.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT, GossipContactPriv))
+#define GOSSIP_CONTACT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_CONTACT, GossipContactPrivate))
/* Make sure any additions to the private contact structure are copied
* in the gossip_contact_copy_values() function further down.
*/
-typedef struct _GossipContactPriv GossipContactPriv;
+typedef struct _GossipContactPrivate GossipContactPrivate;
-struct _GossipContactPriv {
+struct _GossipContactPrivate {
GossipContactType type;
gchar *id;
@@ -123,8 +123,8 @@
"The type of the contact",
GOSSIP_CONTACT_TYPE_TEMPORARY,
GOSSIP_CONTACT_TYPE_USER,
- GOSSIP_CONTACT_TYPE_CONTACTLIST,
- G_PARAM_READWRITE));
+ GOSSIP_CONTACT_TYPE_TEMPORARY,
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_NAME,
@@ -164,7 +164,7 @@
GOSSIP_SUBSCRIPTION_NONE,
GOSSIP_SUBSCRIPTION_BOTH,
GOSSIP_SUBSCRIPTION_NONE,
- G_PARAM_READWRITE));
+ G_PARAM_READWRITE | G_PARAM_CONSTRUCT));
g_object_class_install_property (object_class,
PROP_AVATAR,
@@ -189,25 +189,20 @@
GOSSIP_TYPE_VCARD,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipContactPriv));
+ g_type_class_add_private (object_class, sizeof (GossipContactPrivate));
}
static void
contact_init (GossipContact *contact)
{
- GossipContactPriv *priv;
-
- priv = GET_PRIV (contact);
-
- priv->type = GOSSIP_CONTACT_TYPE_TEMPORARY;
}
static void
contact_finalize (GObject *object)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (object);
g_free (priv->name);
g_free (priv->id);
@@ -243,9 +238,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (object);
switch (param_id) {
case PROP_TYPE:
@@ -290,9 +285,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (object);
switch (param_id) {
case PROP_TYPE:
@@ -365,11 +360,11 @@
gossip_contact_copy (GossipContact *contact)
{
GossipContact *new_contact;
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
new_contact = gossip_contact_new_full (gossip_contact_get_type (contact),
priv->account,
@@ -387,12 +382,12 @@
GossipContactType
gossip_contact_get_type (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact),
GOSSIP_CONTACT_TYPE_TEMPORARY);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->type;
}
@@ -400,11 +395,11 @@
const gchar *
gossip_contact_get_id (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), "");
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->id) {
return priv->id;
@@ -416,11 +411,11 @@
const gchar *
gossip_contact_get_name (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), "");
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->name == NULL) {
return gossip_contact_get_id (contact);
@@ -432,11 +427,11 @@
GossipAvatar *
gossip_contact_get_avatar (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->avatar;
}
@@ -444,11 +439,11 @@
GdkPixbuf *
gossip_contact_get_avatar_pixbuf (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (!priv->avatar) {
return NULL;
@@ -460,11 +455,11 @@
GossipAccount *
gossip_contact_get_account (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->account;
}
@@ -472,11 +467,11 @@
GossipVCard *
gossip_contact_get_vcard (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->vcard;
}
@@ -484,11 +479,11 @@
GossipPresence *
gossip_contact_get_active_presence (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->presences) {
/* Highest priority of the presences is first */
@@ -502,13 +497,13 @@
gossip_contact_get_presence_for_resource (GossipContact *contact,
const gchar *resource)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
GList *l;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
g_return_val_if_fail (resource != NULL, NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
for (l = priv->presences; l; l = l->next) {
const gchar *p_res;
@@ -525,11 +520,11 @@
GList *
gossip_contact_get_presence_list (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->presences;
}
@@ -538,11 +533,11 @@
gossip_contact_set_presence_list (GossipContact *contact,
GList *presences)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->presences) {
g_list_foreach (priv->presences, (GFunc) g_object_unref, NULL);
@@ -562,11 +557,11 @@
GList *
gossip_contact_get_groups (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->groups;
}
@@ -574,12 +569,12 @@
GossipSubscription
gossip_contact_get_subscription (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact),
GOSSIP_SUBSCRIPTION_NONE);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
return priv->subscription;
}
@@ -588,9 +583,9 @@
gossip_contact_set_type (GossipContact *contact,
GossipContactType type)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
priv->type = type;
@@ -601,12 +596,12 @@
gossip_contact_set_id (GossipContact *contact,
const gchar *id)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (id != NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
g_free (priv->id);
priv->id = g_strdup (id);
@@ -618,12 +613,12 @@
gossip_contact_set_name (GossipContact *contact,
const gchar *name)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (name != NULL);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
g_free (priv->name);
priv->name = g_strdup (name);
@@ -635,11 +630,11 @@
gossip_contact_set_avatar (GossipContact *contact,
GossipAvatar *avatar)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->avatar) {
gossip_avatar_unref (priv->avatar);
@@ -657,12 +652,12 @@
gossip_contact_set_account (GossipContact *contact,
GossipAccount *account)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->account) {
g_object_unref (priv->account);
@@ -680,12 +675,12 @@
void
gossip_contact_set_vcard (GossipContact *contact, GossipVCard *vcard)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->vcard) {
g_object_unref (priv->vcard);
@@ -700,14 +695,14 @@
gossip_contact_add_presence (GossipContact *contact,
GossipPresence *presence)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
GossipPresence *this_presence;
GList *l;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
for (l = priv->presences; l && presence; l = l->next) {
this_presence = l->data;
@@ -748,14 +743,14 @@
gossip_contact_remove_presence (GossipContact *contact,
GossipPresence *presence)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
GossipPresence *this_presence;
GList *l;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
for (l = priv->presences; l; l = l->next) {
this_presence = l->data;
@@ -794,12 +789,12 @@
gossip_contact_set_groups (GossipContact *contact,
GList *groups)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
GList *old_groups, *l;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
old_groups = priv->groups;
priv->groups = NULL;
@@ -819,11 +814,11 @@
gossip_contact_set_subscription (GossipContact *contact,
GossipSubscription subscription)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
priv->subscription = subscription;
@@ -833,12 +828,12 @@
guint
gossip_contact_hash (gconstpointer key)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
guint hash = 0;
g_return_val_if_fail (GOSSIP_IS_CONTACT (key), +1);
- priv = GET_PRIV (key);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (key);
hash += gossip_account_hash (gossip_contact_get_account (GOSSIP_CONTACT (key)));
@@ -895,11 +890,11 @@
gboolean
gossip_contact_is_online (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->presences == NULL) {
return FALSE;
@@ -912,12 +907,12 @@
gossip_contact_is_in_group (GossipContact *contact,
const gchar *group)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), FALSE);
g_return_val_if_fail (!G_STR_EMPTY (group), FALSE);
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (g_list_find_custom (priv->groups, group, (GCompareFunc) strcmp)) {
return TRUE;
@@ -929,11 +924,11 @@
const gchar *
gossip_contact_get_status (GossipContact *contact)
{
- GossipContactPriv *priv;
+ GossipContactPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), "");
- priv = GET_PRIV (contact);
+ priv = GOSSIP_CONTACT_GET_PRIVATE (contact);
if (priv->presences) {
GossipPresence *p;
Modified: trunk/libgossip/gossip-debug.c
==============================================================================
--- trunk/libgossip/gossip-debug.c (original)
+++ trunk/libgossip/gossip-debug.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Richard Hult <richard imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <stdarg.h>
#include <string.h>
@@ -90,4 +90,3 @@
}
}
-#include "gossip-debug.h"
Modified: trunk/libgossip/gossip-ebook.c
==============================================================================
--- trunk/libgossip/gossip-ebook.c (original)
+++ trunk/libgossip/gossip-ebook.c Sat Nov 29 14:21:05 2008
@@ -35,8 +35,8 @@
#define EVO_UNKNOWN_IMAGE "image/X-EVOLUTION-UNKNOWN"
-static EContact *me = NULL;
-static EBook *book = NULL;
+static EContact *me;
+static EBook *book;
static void
ebook_init (void)
Modified: trunk/libgossip/gossip-ebook.h
==============================================================================
--- trunk/libgossip/gossip-ebook.h (original)
+++ trunk/libgossip/gossip-ebook.h Sat Nov 29 14:21:05 2008
@@ -65,4 +65,4 @@
G_END_DECLS
-#endif
+#endif /* __GOSSIP_EBOOK_H__ */
Modified: trunk/libgossip/gossip-event-manager.c
==============================================================================
--- trunk/libgossip/gossip-event-manager.c (original)
+++ trunk/libgossip/gossip-event-manager.c Sat Nov 29 14:21:05 2008
@@ -20,47 +20,36 @@
* Authors: Mikael Hallendal <micke imendio com>
*/
-#include "config.h"
+#include <config.h>
#include "gossip-event-manager.h"
#include "libgossip-marshal.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_EVENT_MANAGER, GossipEventManagerPriv))
+#define GOSSIP_EVENT_MANAGER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_EVENT_MANAGER, GossipEventManagerPrivate))
-typedef struct _GossipEventManagerPriv GossipEventManagerPriv;
+typedef struct _GossipEventManagerPrivate GossipEventManagerPrivate;
-struct _GossipEventManagerPriv {
+struct _GossipEventManagerPrivate {
GHashTable *events;
};
-enum {
- EVENT_ADDED,
- EVENT_REMOVED,
- LAST_SIGNAL
-};
-
-static guint signals[LAST_SIGNAL] = {0};
-
typedef struct {
GossipEvent *event;
GossipEventActivateFunction callback;
GObject *issuer;
} EventData;
-struct FindEvent {
- GossipEventId event_id;
- GossipEvent *event;
-};
-
static void event_manager_finalize (GObject *object);
static void event_manager_free_event (EventData *data);
-static void event_manager_get_events_foreach_cb (GossipEvent *event,
- EventData *data,
- GList **list);
-static gboolean event_manager_find_foreach (GossipEvent *event,
- EventData *event_data,
- gpointer *p);
+
+enum {
+ EVENT_ADDED,
+ EVENT_REMOVED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = {0};
G_DEFINE_TYPE (GossipEventManager, gossip_event_manager, G_TYPE_OBJECT);
@@ -91,15 +80,15 @@
1, GOSSIP_TYPE_EVENT);
g_type_class_add_private (object_class,
- sizeof (GossipEventManagerPriv));
+ sizeof (GossipEventManagerPrivate));
}
static void
gossip_event_manager_init (GossipEventManager *manager)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
priv->events = g_hash_table_new_full (gossip_event_hash,
gossip_event_equal,
@@ -110,9 +99,9 @@
static void
event_manager_finalize (GObject *object)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (object);
g_hash_table_destroy (priv->events);
@@ -141,7 +130,7 @@
GObject *object)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
EventData *data;
g_return_if_fail (GOSSIP_IS_EVENT_MANAGER (manager));
@@ -149,7 +138,7 @@
g_return_if_fail (G_IS_OBJECT (object));
g_return_if_fail (callback != NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
data = g_slice_new0 (EventData);
@@ -167,12 +156,12 @@
GossipEvent *event,
GObject *object)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
EventData *data;
g_return_if_fail (GOSSIP_IS_EVENT_MANAGER (manager));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
data = g_hash_table_lookup (priv->events, event);
@@ -189,13 +178,13 @@
gossip_event_manager_activate (GossipEventManager *manager,
GossipEvent *event)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
EventData *data;
GObject *issuer;
g_return_if_fail (GOSSIP_IS_EVENT_MANAGER (manager));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
data = g_hash_table_lookup (priv->events, event);
if (!data) {
@@ -214,13 +203,15 @@
}
static gboolean
-event_manager_find_foreach (GossipEvent *event,
- EventData *event_data,
- gpointer *p)
+event_manager_find_foreach (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
+ GossipEvent *event;
GossipEventId event_id;
- event_id = GPOINTER_TO_INT (p);
+ event = key;
+ event_id = GPOINTER_TO_INT (user_data);
if (gossip_event_get_id (event) == event_id) {
return TRUE;
@@ -233,17 +224,17 @@
gossip_event_manager_activate_by_id (GossipEventManager *manager,
GossipEventId event_id)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
EventData *data;
GossipEvent *event;
GObject *issuer;
g_return_if_fail (GOSSIP_IS_EVENT_MANAGER (manager));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
data = g_hash_table_find (priv->events,
- (GHRFunc) event_manager_find_foreach,
+ event_manager_find_foreach,
GINT_TO_POINTER (event_id));
if (!data) {
@@ -262,10 +253,16 @@
}
static void
-event_manager_get_events_foreach_cb (GossipEvent *event,
- EventData *data,
- GList **list)
+event_manager_get_events_foreach_cb (gpointer key,
+ gpointer value,
+ gpointer user_data)
{
+ GossipEvent *event;
+ GList **list;
+
+ event = key;
+ list = user_data;
+
if (list) {
*list = g_list_append (*list, event);
}
@@ -274,15 +271,15 @@
GList *
gossip_event_manager_get_events (GossipEventManager *manager)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
GList *list = NULL;
g_return_val_if_fail (GOSSIP_IS_EVENT_MANAGER (manager), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
g_hash_table_foreach (priv->events,
- (GHFunc) event_manager_get_events_foreach_cb,
+ event_manager_get_events_foreach_cb,
&list);
return list;
@@ -291,11 +288,11 @@
guint
gossip_event_manager_get_event_count (GossipEventManager *manager)
{
- GossipEventManagerPriv *priv;
+ GossipEventManagerPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_EVENT_MANAGER (manager), 0);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_EVENT_MANAGER_GET_PRIVATE (manager);
return g_hash_table_size (priv->events);
}
Modified: trunk/libgossip/gossip-event.c
==============================================================================
--- trunk/libgossip/gossip-event.c (original)
+++ trunk/libgossip/gossip-event.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <gtk/gtk.h>
@@ -31,11 +31,11 @@
#define DEBUG_DOMAIN "Event"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_EVENT, GossipEventPriv))
+#define GOSSIP_EVENT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_EVENT, GossipEventPrivate))
-typedef struct _GossipEventPriv GossipEventPriv;
+typedef struct _GossipEventPrivate GossipEventPrivate;
-struct _GossipEventPriv {
+struct _GossipEventPrivate {
GossipEventId id;
GossipEventType type;
@@ -144,16 +144,16 @@
G_TYPE_OBJECT,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipEventPriv));
+ g_type_class_add_private (object_class, sizeof (GossipEventPrivate));
}
static void
gossip_event_init (GossipEvent *event)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
static GossipEventId id = 0;
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
priv->msg = NULL;
priv->data = NULL;
@@ -164,9 +164,9 @@
static void
gossip_event_finalize (GObject *object)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_EVENT_GET_PRIVATE (object);
g_free (priv->msg);
if (priv->data) {
@@ -182,9 +182,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_EVENT_GET_PRIVATE (object);
switch (param_id) {
case PROP_ID:
@@ -217,9 +217,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_EVENT_GET_PRIVATE (object);
switch (param_id) {
case PROP_TYPE:
@@ -255,11 +255,11 @@
GossipEventId
gossip_event_get_id (GossipEvent *event)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_EVENT (event), -1);
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
return priv->id;
}
@@ -267,11 +267,11 @@
const gchar *
gossip_event_get_message (GossipEvent *event)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_EVENT (event), "");
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
return priv->msg;
}
@@ -312,11 +312,11 @@
GossipEventType
gossip_event_get_type (GossipEvent *event)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_EVENT (event), -1);
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
return priv->type;
}
@@ -324,11 +324,11 @@
GObject *
gossip_event_get_data (GossipEvent *event)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_EVENT (event), NULL);
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
return priv->data;
}
@@ -337,11 +337,11 @@
gossip_event_set_data (GossipEvent *event,
GObject *data)
{
- GossipEventPriv *priv;
+ GossipEventPrivate *priv;
g_return_if_fail (GOSSIP_IS_EVENT (event));
- priv = GET_PRIV (event);
+ priv = GOSSIP_EVENT_GET_PRIVATE (event);
if (priv->data) {
g_object_unref (priv->data);
Modified: trunk/libgossip/gossip-ft-provider.c
==============================================================================
--- trunk/libgossip/gossip-ft-provider.c (original)
+++ trunk/libgossip/gossip-ft-provider.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include "gossip-ft-provider.h"
Modified: trunk/libgossip/gossip-ft.c
==============================================================================
--- trunk/libgossip/gossip-ft.c (original)
+++ trunk/libgossip/gossip-ft.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#ifdef HAVE_PLATFORM_X11
#include <libgnomevfs/gnome-vfs.h>
@@ -31,11 +31,11 @@
#define DEBUG_DOMAIN "GossipFT"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_FT, GossipFTPriv))
+#define GOSSIP_FT_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_FT, GossipFTPrivate))
-typedef struct _GossipFTPriv GossipFTPriv;
+typedef struct _GossipFTPrivate GossipFTPrivate;
-struct _GossipFTPriv {
+struct _GossipFTPrivate {
GossipFTId id;
GossipFTType type;
@@ -183,16 +183,16 @@
NULL,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipFTPriv));
+ g_type_class_add_private (object_class, sizeof (GossipFTPrivate));
}
static void
ft_init (GossipFT *ft)
{
static GossipFTId id = 1;
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
priv->id = id++;
@@ -213,9 +213,9 @@
static void
ft_finalize (GObject *object)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_FT_GET_PRIVATE (object);
gossip_debug (DEBUG_DOMAIN, "Finalizing GossipFT with id:%d", priv->id);
@@ -237,9 +237,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_FT_GET_PRIVATE (object);
switch (param_id) {
case PROP_ID:
@@ -278,9 +278,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_FT_GET_PRIVATE (object);
switch (param_id) {
case PROP_TYPE:
@@ -326,11 +326,11 @@
GossipFTId
gossip_ft_get_id (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), 0);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->id;
}
@@ -338,11 +338,11 @@
GossipFTType
gossip_ft_get_type (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), 0);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->type;
}
@@ -351,13 +351,13 @@
gossip_ft_set_type (GossipFT *ft,
GossipFTType type)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
g_return_if_fail (type >= GOSSIP_FT_TYPE_RECEIVING ||
type <= GOSSIP_FT_TYPE_SENDING);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
priv->type = type;
}
@@ -365,11 +365,11 @@
GossipContact *
gossip_ft_get_contact (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->contact;
}
@@ -378,12 +378,12 @@
gossip_ft_set_contact (GossipFT *ft,
GossipContact *contact)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
if (priv->contact) {
g_object_unref (priv->contact);
@@ -395,11 +395,11 @@
const gchar *
gossip_ft_get_file_name (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->file_name;
}
@@ -408,11 +408,11 @@
gossip_ft_set_file_name (GossipFT *ft,
const gchar *file_name)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
g_free (priv->file_name);
priv->file_name = g_strdup (file_name);
@@ -421,11 +421,11 @@
guint64
gossip_ft_get_file_size (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), 0);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->file_size;
}
@@ -434,11 +434,11 @@
gossip_ft_set_file_size (GossipFT *ft,
guint64 file_size)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
priv->file_size = file_size;
}
@@ -446,11 +446,11 @@
gchar *
gossip_ft_get_file_size_for_display (GossipFT *ft)
{
- GossipFTPriv *priv;
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
#ifdef HAVE_PLATFORM_X11
return gnome_vfs_format_file_size_for_display (priv->file_size);
@@ -459,102 +459,102 @@
#endif
}
-const gchar *
-gossip_ft_get_file_mime_type (GossipFT *ft)
-{
- GossipFTPriv *priv;
+ const gchar *
+ gossip_ft_get_file_mime_type (GossipFT *ft)
+ {
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->file_mime_type;
-}
+ }
-void
-gossip_ft_set_file_mime_type (GossipFT *ft,
+ void
+ gossip_ft_set_file_mime_type (GossipFT *ft,
const gchar *file_mime_type)
-{
- GossipFTPriv *priv;
+ {
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
g_free (priv->file_mime_type);
priv->file_mime_type = g_strdup (file_mime_type);
-}
+ }
-const gchar *
-gossip_ft_get_sid (GossipFT *ft)
-{
- GossipFTPriv *priv;
+ const gchar *
+ gossip_ft_get_sid (GossipFT *ft)
+ {
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->sid;
-}
+ }
-void
-gossip_ft_set_sid (GossipFT *ft,
+ void
+ gossip_ft_set_sid (GossipFT *ft,
const gchar *sid)
-{
- GossipFTPriv *priv;
+ {
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
g_free (priv->sid);
priv->sid = g_strdup (sid);
-}
+ }
-const gchar *
-gossip_ft_get_location (GossipFT *ft)
-{
- GossipFTPriv *priv;
+ const gchar *
+ gossip_ft_get_location (GossipFT *ft)
+ {
+ GossipFTPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_FT (ft), NULL);
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
return priv->location;
-}
+ }
-void
-gossip_ft_set_location (GossipFT *ft,
+ void
+ gossip_ft_set_location (GossipFT *ft,
const gchar *location)
-{
- GossipFTPriv *priv;
+ {
+ GossipFTPrivate *priv;
g_return_if_fail (GOSSIP_IS_FT (ft));
- priv = GET_PRIV (ft);
+ priv = GOSSIP_FT_GET_PRIVATE (ft);
g_free (priv->location);
priv->location = g_strdup (location);
-}
+ }
-gboolean
-gossip_ft_equal (gconstpointer a,
+ gboolean
+ gossip_ft_equal (gconstpointer a,
gconstpointer b)
-{
- GossipFTPriv *priv1;
- GossipFTPriv *priv2;
+ {
+ GossipFTPrivate *priv1;
+ GossipFTPrivate *priv2;
g_return_val_if_fail (GOSSIP_IS_FT (a), FALSE);
g_return_val_if_fail (GOSSIP_IS_FT (b), FALSE);
- priv1 = GET_PRIV (a);
- priv2 = GET_PRIV (b);
+ priv1 = GOSSIP_FT_GET_PRIVATE (a);
+ priv2 = GOSSIP_FT_GET_PRIVATE (b);
if (priv1->id == priv2->id) {
return TRUE;
}
return FALSE;
-}
+ }
Modified: trunk/libgossip/gossip-jabber-chatrooms.c
==============================================================================
--- trunk/libgossip/gossip-jabber-chatrooms.c (original)
+++ trunk/libgossip/gossip-jabber-chatrooms.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <stdlib.h>
#include <string.h>
Modified: trunk/libgossip/gossip-jabber-ft.c
==============================================================================
--- trunk/libgossip/gossip-jabber-ft.c (original)
+++ trunk/libgossip/gossip-jabber-ft.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <sys/types.h>
#include <sys/stat.h>
Modified: trunk/libgossip/gossip-jabber-register.c
==============================================================================
--- trunk/libgossip/gossip-jabber-register.c (original)
+++ trunk/libgossip/gossip-jabber-register.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <stdlib.h>
Modified: trunk/libgossip/gossip-jabber-services.c
==============================================================================
--- trunk/libgossip/gossip-jabber-services.c (original)
+++ trunk/libgossip/gossip-jabber-services.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
#include <stdlib.h>
Modified: trunk/libgossip/gossip-jabber-vcard.c
==============================================================================
--- trunk/libgossip/gossip-jabber-vcard.c (original)
+++ trunk/libgossip/gossip-jabber-vcard.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <stdlib.h>
#include <string.h>
Modified: trunk/libgossip/gossip-jabber.c
==============================================================================
--- trunk/libgossip/gossip-jabber.c (original)
+++ trunk/libgossip/gossip-jabber.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <stdlib.h>
#include <string.h>
@@ -77,9 +77,9 @@
/* How many rand char should be happend to the resource */
#define N_RAND_CHAR 6
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_JABBER, GossipJabberPriv))
+#define GOSSIP_JABBER_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_JABBER, GossipJabberPrivate))
-struct _GossipJabberPriv {
+struct _GossipJabberPrivate {
GossipSession *session;
LmConnection *connection;
@@ -407,15 +407,15 @@
2, GOSSIP_TYPE_ACCOUNT, G_TYPE_POINTER);
- g_type_class_add_private (object_class, sizeof (GossipJabberPriv));
+ g_type_class_add_private (object_class, sizeof (GossipJabberPrivate));
}
static void
gossip_jabber_init (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
priv->contact_list =
g_hash_table_new_full (gossip_contact_hash,
@@ -452,10 +452,10 @@
gossip_jabber_finalize (GObject *object)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
jabber = GOSSIP_JABBER (object);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->account) {
g_object_unref (priv->account);
@@ -515,13 +515,13 @@
gossip_jabber_new (gpointer session)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
jabber = g_object_new (GOSSIP_TYPE_JABBER, NULL);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
priv->session = g_object_ref (session);
return jabber;
@@ -567,13 +567,13 @@
gossip_jabber_setup (GossipJabber *jabber,
GossipAccount *account)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageHandler *handler;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
priv->account = g_object_ref (account);
@@ -629,7 +629,7 @@
void
gossip_jabber_login (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *own_contact;
const gchar *id;
const gchar *password;
@@ -638,7 +638,7 @@
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_debug (DEBUG_DOMAIN, "Refreshing connection details");
@@ -746,9 +746,9 @@
static gboolean
jabber_login_timeout_cb (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
priv->connection_timeout_id = 0;
@@ -760,11 +760,11 @@
void
gossip_jabber_logout (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_debug (DEBUG_DOMAIN,
"Disconnecting for account:'%s'",
@@ -836,11 +836,11 @@
LmSSLStatus status,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipAccount *account;
const gchar *str;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
str = jabber_ssl_status_to_string (status);
gossip_debug (DEBUG_DOMAIN, "%s", str);
@@ -881,7 +881,7 @@
gboolean result,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
const gchar *id;
const gchar *resource;
const gchar *jid_str;
@@ -893,7 +893,7 @@
gint i;
#endif
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->disconnect_request) {
/* This is so we go no further that way we don't issue
@@ -992,12 +992,12 @@
gboolean result,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *own_contact;
LmMessage *m;
LmMessageNode *node;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (result == FALSE) {
gossip_jabber_logout (jabber);
@@ -1044,10 +1044,10 @@
LmDisconnectReason reason,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipJabberDisconnectReason gossip_reason;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->connection_timeout_id != 0) {
g_source_remove (priv->connection_timeout_id);
@@ -1088,12 +1088,12 @@
LmMessage *m,
GossipJabberAsyncData *ad)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageNode *node;
GossipResult result = GOSSIP_RESULT_OK;
GError *error = NULL;
- priv = GET_PRIV (ad->jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (ad->jabber);
if (priv->change_password_cancel) {
gossip_jabber_async_data_free (ad);
@@ -1175,7 +1175,7 @@
GossipErrorCallback callback,
gpointer user_data)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipJID *jid;
const gchar *id;
const gchar *server;
@@ -1190,7 +1190,7 @@
gossip_debug (DEBUG_DOMAIN, "Changing password to '%s'...", new_password);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
/* Set flags up */
priv->change_password_cancel = FALSE;
@@ -1250,13 +1250,13 @@
void
gossip_jabber_change_password_cancel (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
gossip_debug (DEBUG_DOMAIN, "Changing password canceled");
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
priv->change_password_cancel = TRUE;
}
@@ -1293,11 +1293,11 @@
gboolean
gossip_jabber_is_connected (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), FALSE);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->connection == NULL) {
return FALSE;
@@ -1309,12 +1309,12 @@
gboolean
gossip_jabber_is_connecting (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmConnectionState state;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), FALSE);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->connection == NULL) {
return FALSE;
@@ -1375,7 +1375,7 @@
void
gossip_jabber_send_message (GossipJabber *jabber, GossipMessage *message)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *recipient;
LmMessage *m;
const gchar *recipient_id;
@@ -1384,7 +1384,7 @@
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
recipient = gossip_message_get_recipient (message);
@@ -1434,7 +1434,7 @@
GossipContact *contact,
gboolean typing)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
LmMessageNode *node;
const gchar *id = NULL;
@@ -1444,7 +1444,7 @@
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (!g_hash_table_lookup (priv->composing_requests, contact)) {
return;
@@ -1491,7 +1491,7 @@
void
gossip_jabber_set_presence (GossipJabber *jabber, GossipPresence *presence)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
LmMessageNode *node;
GossipContact *contact;
@@ -1502,7 +1502,7 @@
gchar *sha1;
GossipAvatar *avatar;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->presence) {
g_object_unref (priv->presence);
@@ -1626,7 +1626,7 @@
{
LmMessage *m;
LmMessageNode *node;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipJID *jid;
GossipContact *contact;
GossipSubscription subscription;
@@ -1638,7 +1638,7 @@
gossip_debug (DEBUG_DOMAIN, "Adding contact:'%s' with name:'%s' and group:'%s'",
id, name, group);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
jid = gossip_jid_new (id);
@@ -1719,13 +1719,13 @@
GossipContact *contact,
const gchar *new_name)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
LmMessageNode *node;
gchar *escaped;
GList *l;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
m = lm_message_new_with_sub_type (NULL,
LM_MESSAGE_TYPE_IQ,
@@ -1758,13 +1758,13 @@
gossip_jabber_remove_contact (GossipJabber *jabber,
GossipContact *contact)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
LmMessageNode *node;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
/* Next remove the contact from the roster */
m = lm_message_new_with_sub_type (NULL,
@@ -1810,11 +1810,11 @@
GossipVCard *vcard,
gpointer user_data)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
JabberData *data;
data = user_data;
- priv = GET_PRIV (data->jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (data->jabber);
if (result == GOSSIP_RESULT_OK) {
GossipContact *own_contact;
@@ -1867,10 +1867,10 @@
GossipContact *contact,
gboolean force_update)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
JabberData *data;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (!force_update) {
/* We use this instead of the regular lookup because
@@ -1940,7 +1940,7 @@
gpointer value,
gpointer user_data)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *contact;
RenameGroupData *rg;
LmMessage *m;
@@ -1952,7 +1952,7 @@
contact = GOSSIP_CONTACT (key);
rg = (RenameGroupData *) user_data;
- priv = GET_PRIV (rg->jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (rg->jabber);
for (l = gossip_contact_get_groups (contact); l && !found; l = l->next) {
gchar *group = (gchar*)l->data;
@@ -2010,11 +2010,10 @@
const gchar *group,
const gchar *new_name)
{
- GossipJabberPriv *priv;
-
+ GossipJabberPrivate *priv;
RenameGroupData *rg;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
rg = g_new0 (RenameGroupData, 1);
@@ -2122,10 +2121,10 @@
GList *
gossip_jabber_get_groups (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GList *list = NULL;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
g_hash_table_foreach (priv->contact_list,
(GHFunc) jabber_get_groups_foreach_cb,
@@ -2143,10 +2142,10 @@
gpointer user_data,
GError **error)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
const gchar *jid_str;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (contact) {
jid_str = gossip_contact_get_id (contact);
@@ -2176,9 +2175,9 @@
gpointer user_data,
GError **error)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_services_get_version (priv->connection,
contact,
@@ -2189,9 +2188,9 @@
static gboolean
jabber_composing_timeout_cb (JabberData *data)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
- priv = GET_PRIV (data->jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (data->jabber);
gossip_debug (DEBUG_DOMAIN, "Contact:'%s' is NOT composing (timed out)",
gossip_contact_get_id (data->contact));
@@ -2211,7 +2210,7 @@
{
LmMessageNode *node;
LmMessageSubType sub_type;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipMessage *message;
const gchar *from_str;
GossipContact *from;
@@ -2222,7 +2221,7 @@
GossipChatroomInvite *invite;
const gchar *resource;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_debug (DEBUG_DOMAIN, "New message from:'%s'",
lm_message_node_get_attribute (m->node, "from"));
@@ -2412,12 +2411,12 @@
LmMessage *m,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *contact;
const gchar *from;
const gchar *type;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
from = lm_message_node_get_attribute (m->node, "from");
@@ -2506,11 +2505,11 @@
LmMessage *m,
GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageNode *node;
const gchar *xmlns;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (lm_message_get_sub_type (m) != LM_MESSAGE_SUB_TYPE_GET &&
lm_message_get_sub_type (m) != LM_MESSAGE_SUB_TYPE_SET &&
@@ -2617,13 +2616,13 @@
jabber_request_version (GossipJabber *jabber,
LmMessage *m)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *r;
const gchar *from, *id;
LmMessageNode *node;
GossipVersionInfo *info;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
from = lm_message_node_get_attribute (m->node, "from");
id = lm_message_node_get_attribute (m->node, "id");
@@ -2671,12 +2670,12 @@
static void
jabber_request_ping (GossipJabber *jabber, LmMessage *m)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *reply;
const gchar *from;
const gchar *id;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
from = lm_message_node_get_attribute (m->node, "from");
id = lm_message_node_get_attribute (m->node, "id");
@@ -2701,10 +2700,10 @@
jabber_request_roster (GossipJabber *jabber,
LmMessage *m)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageNode *node;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
node = lm_message_node_get_child (m->node, "query");
if (!node) {
@@ -2812,13 +2811,13 @@
jabber_request_unknown (GossipJabber *jabber,
LmMessage *m)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageNode *node;
LmMessage *new_m;
const gchar *from_str, *xmlns;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
/* get details */
from_str = lm_message_node_get_attribute (m->node, "from");
@@ -2880,13 +2879,13 @@
gpointer user_data)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (provider), 0);
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), 0);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_chatrooms_join (priv->chatrooms, chatroom,
callback, user_data);
@@ -2897,13 +2896,13 @@
GossipChatroomId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (id >= 1);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_cancel (priv->chatrooms, id);
}
@@ -2914,12 +2913,12 @@
const gchar *message)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_send (priv->chatrooms, id, message);
}
@@ -2930,12 +2929,12 @@
const gchar *new_subject)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_change_subject (priv->chatrooms, id, new_subject);
}
@@ -2946,12 +2945,12 @@
const gchar *new_nick)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_change_nick (priv->chatrooms, id, new_nick);
}
@@ -2961,12 +2960,12 @@
GossipChatroomId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_leave (priv->chatrooms, id);
}
@@ -2978,13 +2977,13 @@
const gchar *reason)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_kick (priv->chatrooms, id, contact, reason);
}
@@ -2994,12 +2993,12 @@
GossipChatroomId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (provider), NULL);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_chatrooms_find_by_id (priv->chatrooms, id);
}
@@ -3009,13 +3008,13 @@
GossipChatroom *chatroom)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (provider), NULL);
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_chatrooms_find (priv->chatrooms, chatroom);
}
@@ -3027,13 +3026,13 @@
const gchar *reason)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_invite (priv->chatrooms, id, contact, reason);
}
@@ -3045,12 +3044,12 @@
const gchar *nickname)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_invite_accept (priv->chatrooms,
callback,
@@ -3064,12 +3063,12 @@
const gchar *reason)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_invite_decline (priv->chatrooms,
invite,
@@ -3080,12 +3079,12 @@
jabber_chatroom_get_rooms (GossipChatroomProvider *provider)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (provider), NULL);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_chatrooms_get_rooms (priv->chatrooms);
}
@@ -3097,14 +3096,14 @@
gpointer user_data)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (server != NULL);
g_return_if_fail (callback != NULL);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_chatrooms_browse_rooms (priv->chatrooms, server,
callback, user_data);
@@ -3129,14 +3128,14 @@
const gchar *file)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (provider), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
g_return_val_if_fail (file != NULL, NULL);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return gossip_jabber_ft_send (priv->fts, contact, file);
}
@@ -3146,13 +3145,13 @@
GossipFTId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (id >= 1);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_ft_cancel (priv->fts, id);
}
@@ -3162,13 +3161,13 @@
GossipFTId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (id >= 1);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_ft_accept (priv->fts, id);
}
@@ -3178,13 +3177,13 @@
GossipFTId id)
{
GossipJabber *jabber;
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (provider));
g_return_if_fail (id >= 1);
jabber = GOSSIP_JABBER (provider);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_ft_decline (priv->fts, id);
}
@@ -3248,11 +3247,11 @@
GossipAccount *
gossip_jabber_get_account (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), NULL);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return priv->account;
}
@@ -3260,12 +3259,12 @@
GossipContact *
gossip_jabber_get_own_contact (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *own_contact;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), NULL);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
own_contact = gossip_jabber_get_contact_from_jid (jabber,
gossip_account_get_id (priv->account),
@@ -3283,7 +3282,7 @@
gboolean set_permanent,
gboolean get_vcard)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
GossipContact *contact;
GossipContactManager *contact_manager;
GossipContactType type;
@@ -3291,7 +3290,7 @@
gboolean is_chatroom;
gboolean created;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
contact_manager = gossip_session_get_contact_manager (priv->session);
@@ -3360,11 +3359,11 @@
gossip_jabber_send_presence (GossipJabber *jabber,
GossipPresence *presence)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
gossip_jabber_set_presence (jabber,
presence ? presence : priv->presence);
@@ -3374,14 +3373,14 @@
gossip_jabber_send_subscribed (GossipJabber *jabber,
GossipContact *contact)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
const gchar *id;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
id = gossip_contact_get_id (contact);
@@ -3397,14 +3396,14 @@
gossip_jabber_send_unsubscribed (GossipJabber *jabber,
GossipContact *contact)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessage *m;
const gchar *id;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
id = gossip_contact_get_id (contact);
@@ -3419,12 +3418,12 @@
void
gossip_jabber_subscription_allow_all (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
LmMessageHandler *handler;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
handler = priv->subscription_handler;
if (handler) {
@@ -3450,11 +3449,11 @@
void
gossip_jabber_subscription_disallow_all (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_if_fail (GOSSIP_IS_JABBER (jabber));
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
if (priv->subscription_handler) {
lm_connection_unregister_message_handler (priv->connection,
@@ -3607,11 +3606,11 @@
LmConnection *
_gossip_jabber_get_connection (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), NULL);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return priv->connection;
}
@@ -3619,9 +3618,9 @@
GossipSession *
_gossip_jabber_get_session (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return priv->session;
}
@@ -3629,11 +3628,11 @@
GossipJabberFTs *
_gossip_jabber_get_fts (GossipJabber *jabber)
{
- GossipJabberPriv *priv;
+ GossipJabberPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JABBER (jabber), NULL);
- priv = GET_PRIV (jabber);
+ priv = GOSSIP_JABBER_GET_PRIVATE (jabber);
return priv->fts;
}
Modified: trunk/libgossip/gossip-jabber.h
==============================================================================
--- trunk/libgossip/gossip-jabber.h (original)
+++ trunk/libgossip/gossip-jabber.h Sat Nov 29 14:21:05 2008
@@ -39,7 +39,7 @@
typedef struct _GossipJabber GossipJabber;
typedef struct _GossipJabberClass GossipJabberClass;
-typedef struct _GossipJabberPriv GossipJabberPriv;
+typedef struct _GossipJabberPrivate GossipJabberPrivate;
struct _GossipJabber {
GObject parent;
Modified: trunk/libgossip/gossip-jid.c
==============================================================================
--- trunk/libgossip/gossip-jid.c (original)
+++ trunk/libgossip/gossip-jid.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Mikael Hallendal <micke imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <ctype.h>
#include <string.h>
@@ -29,11 +29,11 @@
#include "gossip-jid.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_JID, GossipJIDPriv))
+#define GOSSIP_JID_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_JID, GossipJIDPrivate))
-typedef struct _GossipJIDPriv GossipJIDPriv;
+typedef struct _GossipJIDPrivate GossipJIDPrivate;
-struct _GossipJIDPriv {
+struct _GossipJIDPrivate {
gchar *full;
gchar *no_resource;
const gchar *resource;
@@ -89,7 +89,7 @@
NULL,
G_PARAM_READABLE));
- g_type_class_add_private (object_class, sizeof (GossipJIDPriv));
+ g_type_class_add_private (object_class, sizeof (GossipJIDPrivate));
}
static void
@@ -100,9 +100,9 @@
static void
gossip_jid_finalize (GObject *object)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_JID_GET_PRIVATE (object);
g_free (priv->full);
g_free (priv->no_resource);
@@ -116,9 +116,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_JID_GET_PRIVATE (object);
switch (param_id) {
case PROP_FULL:
@@ -173,13 +173,13 @@
gossip_jid_new (const gchar *id)
{
GossipJID *jid;
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
g_return_val_if_fail (id != NULL, NULL);
jid = g_object_new (GOSSIP_TYPE_JID, NULL);
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
priv->full = jid_casefold_node (id);
priv->resource = jid_locate_resource (priv->full);
@@ -191,6 +191,10 @@
priv->no_resource = g_strdup (priv->full);
}
+ g_object_notify (G_OBJECT (jid), "full");
+ g_object_notify (G_OBJECT (jid), "resource");
+ g_object_notify (G_OBJECT (jid), "without-resource");
+
return jid;
}
@@ -198,12 +202,12 @@
gossip_jid_set_without_resource (GossipJID *jid,
const gchar *str)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
gchar *resource = NULL;
g_return_if_fail (GOSSIP_IS_JID (jid));
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
if (priv->resource) {
resource = g_strdup (priv->resource);
@@ -218,37 +222,47 @@
priv->full = g_strdup_printf ("%s/%s",
priv->no_resource,
resource);
+
g_free (resource);
priv->resource = jid_locate_resource (priv->full);
+
+ g_object_notify (G_OBJECT (jid), "full");
+ g_object_notify (G_OBJECT (jid), "resource");
} else {
priv->full = g_strdup (priv->no_resource);
+ g_object_notify (G_OBJECT (jid), "full");
}
+
+ g_object_notify (G_OBJECT (jid), "without-resource");
}
void
gossip_jid_set_resource (GossipJID *jid,
const gchar *resource)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
g_return_if_fail (GOSSIP_IS_JID (jid));
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
g_free (priv->full);
priv->full = g_strdup_printf ("%s/%s", priv->no_resource, resource);
priv->resource = jid_locate_resource (priv->full);
+
+ g_object_notify (G_OBJECT (jid), "full");
+ g_object_notify (G_OBJECT (jid), "resource");
}
const gchar *
gossip_jid_get_full (GossipJID *jid)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JID (jid), "");
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
return priv->full;
}
@@ -256,11 +270,11 @@
const gchar *
gossip_jid_get_without_resource (GossipJID *jid)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JID (jid), "");
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
if (priv->no_resource) {
return priv->no_resource;
@@ -272,11 +286,11 @@
const gchar *
gossip_jid_get_resource (GossipJID *jid)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_JID (jid), NULL);
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
if (priv->resource) {
return priv->resource;
@@ -288,7 +302,7 @@
gboolean
gossip_jid_is_service (GossipJID *jid)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
gchar *ch;
g_return_val_if_fail (GOSSIP_IS_JID (jid), FALSE);
@@ -298,7 +312,7 @@
* example msn.jabber.org.uk).
*/
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
ch = strchr (priv->full, '@');
if (!ch) {
@@ -311,12 +325,12 @@
gchar *
gossip_jid_get_part_name (GossipJID *jid)
{
- GossipJIDPriv *priv;
+ GossipJIDPrivate *priv;
gchar *ch;
g_return_val_if_fail (GOSSIP_IS_JID (jid), g_strdup (""));
- priv = GET_PRIV (jid);
+ priv = GOSSIP_JID_GET_PRIVATE (jid);
for (ch = priv->full; *ch; ++ch) {
if (*ch == '@') {
@@ -347,8 +361,8 @@
gossip_jid_equals (GossipJID *jid_a,
GossipJID *jid_b)
{
- GossipJIDPriv *priv_a;
- GossipJIDPriv *priv_b;
+ GossipJIDPrivate *priv_a;
+ GossipJIDPrivate *priv_b;
g_return_val_if_fail (GOSSIP_IS_JID (jid_a), FALSE);
g_return_val_if_fail (GOSSIP_IS_JID (jid_b), FALSE);
@@ -358,8 +372,8 @@
* casefolded.
*/
- priv_a = GET_PRIV (jid_a);
- priv_b = GET_PRIV (jid_b);
+ priv_a = GOSSIP_JID_GET_PRIVATE (jid_a);
+ priv_b = GOSSIP_JID_GET_PRIVATE (jid_b);
if (g_ascii_strcasecmp (priv_a->full, priv_b->full) == 0) {
return TRUE;
Modified: trunk/libgossip/gossip-log.c
==============================================================================
--- trunk/libgossip/gossip-log.c (original)
+++ trunk/libgossip/gossip-log.c Sat Nov 29 14:21:05 2008
@@ -44,7 +44,7 @@
*
*/
-#include "config.h"
+#include <config.h>
#include <stdio.h>
#include <unistd.h>
@@ -108,11 +108,11 @@
#define LOG_TIME_FORMAT_FULL "%Y%m%dT%H:%M:%S"
#define LOG_TIME_FORMAT "%Y%m%d"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_LOG_MANAGER, GossipLogManagerPriv))
+#define GOSSIP_LOG_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_LOG_MANAGER, GossipLogManagerPrivate))
-typedef struct _GossipLogManagerPriv GossipLogManagerPriv;
+typedef struct _GossipLogManagerPrivate GossipLogManagerPrivate;
-struct _GossipLogManagerPriv {
+struct _GossipLogManagerPrivate {
GossipSession *session;
GHashTable *message_handlers;
@@ -229,15 +229,15 @@
object_class->finalize = log_manager_finalize;
- g_type_class_add_private (object_class, sizeof (GossipLogManagerPriv));
+ g_type_class_add_private (object_class, sizeof (GossipLogManagerPrivate));
}
static void
gossip_log_manager_init (GossipLogManager *manager)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
priv->message_handlers = g_hash_table_new_full (g_direct_hash,
g_direct_equal,
@@ -248,10 +248,10 @@
static void
log_manager_finalize (GObject *object)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipAccountManager *account_manager;
- priv = GET_PRIV (object);
+ priv = GOSSIP_LOG_GET_PRIVATE (object);
account_manager = gossip_session_get_account_manager (priv->session);
@@ -275,7 +275,7 @@
GossipLogManager *
gossip_log_manager_new (GossipSession *session)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipLogManager *manager;
GossipAccountManager *account_manager;
#ifdef HAVE_PLATFORM_X11
@@ -287,7 +287,7 @@
manager = g_object_new (GOSSIP_TYPE_LOG_MANAGER, NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
priv->session = g_object_ref (session);
@@ -388,14 +388,14 @@
const gchar *filename,
const gchar *type_str)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GnomeVFSResult result = GNOME_VFS_OK;
GnomeVFSURI *new_uri, *old_uri;
GnomeVFSURI *new_uri_unknown;
GossipAccount *account;
gchar *basename;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
new_uri_unknown = gnome_vfs_uri_new (log_directory);
new_uri_unknown = gnome_vfs_uri_append_path (new_uri_unknown, "Unknown");
@@ -573,14 +573,14 @@
GossipLogMessageFunc func,
gpointer user_data)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
HandlerData *data;
g_return_if_fail (GOSSIP_IS_LOG_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
g_return_if_fail (func != NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
data = g_new0 (HandlerData, 1);
@@ -598,14 +598,14 @@
GossipLogMessageFunc func,
gpointer user_data)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
HandlerData *data;
g_return_if_fail (GOSSIP_IS_LOG_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_CHATROOM (chatroom));
g_return_if_fail (func != NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
data = g_new0 (HandlerData, 1);
@@ -621,11 +621,11 @@
gossip_log_handler_remove (GossipLogManager *manager,
GossipLogMessageFunc func)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
g_return_if_fail (GOSSIP_IS_LOG_MANAGER (manager));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
g_hash_table_remove (priv->message_handlers, func);
}
@@ -647,13 +647,13 @@
GossipChatroom *chatroom,
GossipMessage *message)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipLogMessageFunc func;
GList *handlers = NULL;
GList *l;
HandlerData *data;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
g_hash_table_foreach (priv->message_handlers,
(GHFunc) log_handlers_notify_foreach,
@@ -880,7 +880,7 @@
log_get_account_from_filename (GossipLogManager *manager,
const gchar *filename)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipAccountManager *account_manager;
GossipAccount *account;
gchar *log_directory;
@@ -888,7 +888,7 @@
const gchar *p2;
gchar *name;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
log_check_dir (&log_directory);
@@ -922,13 +922,13 @@
GossipAccount *account,
const gchar *filename)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipChatroomManager *chatroom_manager;
GossipChatroom *chatroom;
gchar *server;
gchar *room;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
room = g_strdup (filename);
@@ -1228,10 +1228,10 @@
log_set_name (GossipLogManager *manager,
GossipContact *contact)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContactManager *contact_manager;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
gossip_debug (DEBUG_DOMAIN,
"Setting name:'%s' for contact:'%s'",
@@ -1247,7 +1247,7 @@
GList *
gossip_log_get_contacts (GossipLogManager *manager, GossipAccount *account)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContactManager *contact_manager;
GossipContact *contact;
GList *contacts = NULL;
@@ -1259,7 +1259,7 @@
g_return_val_if_fail (GOSSIP_IS_LOG_MANAGER (manager), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
directory = log_get_basedir (account);
@@ -1454,7 +1454,7 @@
GossipContact *contact,
const gchar *date)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContact *own_contact;
gchar *filename;
GList *messages = NULL;
@@ -1468,7 +1468,7 @@
g_return_val_if_fail (GOSSIP_IS_LOG_MANAGER (manager), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT (contact), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
filename = log_get_filename_by_date_for_contact (contact, date);
@@ -1702,7 +1702,7 @@
log_get_links (GossipLogManager *manager,
GossipAccount *account)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContactManager *contact_manager;
GList *links = NULL;
gchar *filename;
@@ -1711,7 +1711,7 @@
xmlNodePtr log_node;
xmlNodePtr node;
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
contact_manager = gossip_session_get_contact_manager (priv->session);
@@ -1802,7 +1802,7 @@
GossipMessage *message,
gboolean incoming)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipAccount *account;
GossipContact *contact;
GossipContact *own_contact;
@@ -1824,7 +1824,7 @@
g_return_if_fail (GOSSIP_IS_LOG_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
body_str = gossip_message_get_body (message);
if (!body_str || strcmp (body_str, "") == 0) {
@@ -2087,7 +2087,7 @@
GossipChatroom *chatroom,
const gchar *date)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContact *own_contact;
gchar *filename;
GList *messages = NULL;
@@ -2099,7 +2099,7 @@
g_return_val_if_fail (GOSSIP_IS_LOG_MANAGER (manager), NULL);
g_return_val_if_fail (GOSSIP_IS_CHATROOM (chatroom), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
filename = log_get_filename_by_date_for_chatroom (chatroom, date);
@@ -2136,7 +2136,7 @@
return NULL;
}
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
/* Now get the messages. */
for (node = log_node->children; node; node = node->next) {
@@ -2204,7 +2204,7 @@
GossipMessage *message,
gboolean incoming)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContact *contact;
GossipContact *own_contact;
gchar *filename;
@@ -2221,7 +2221,7 @@
g_return_if_fail (GOSSIP_IS_LOG_MANAGER (manager));
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
body_str = gossip_message_get_body (message);
if (!body_str || strcmp (body_str, "") == 0) {
@@ -2359,7 +2359,7 @@
gossip_log_search_new (GossipLogManager *manager,
const gchar *text)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipContactManager *contact_manager;
GList *files;
GList *l;
@@ -2372,7 +2372,7 @@
g_return_val_if_fail (GOSSIP_IS_LOG_MANAGER (manager), NULL);
g_return_val_if_fail (!G_STR_EMPTY (text), NULL);
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
text_casefold = g_utf8_casefold (text, -1);
@@ -2560,7 +2560,7 @@
gossip_log_get_links (GossipLogManager *manager,
GossipAccount *account)
{
- GossipLogManagerPriv *priv;
+ GossipLogManagerPrivate *priv;
GossipAccountManager *account_manager;
GList *accounts;
GList *links = NULL;
@@ -2570,7 +2570,7 @@
return log_get_links (manager, account);
}
- priv = GET_PRIV (manager);
+ priv = GOSSIP_LOG_GET_PRIVATE (manager);
account_manager = gossip_session_get_account_manager (priv->session);
accounts = gossip_account_manager_get_accounts (account_manager);
Modified: trunk/libgossip/gossip-message.c
==============================================================================
--- trunk/libgossip/gossip-message.c (original)
+++ trunk/libgossip/gossip-message.c Sat Nov 29 14:21:05 2008
@@ -20,15 +20,15 @@
* Authors: Mikael Hallendal <micke imendio com>
*/
-#include "config.h"
+#include <config.h>
#include "gossip-message.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_MESSAGE, GossipMessagePriv))
+#define GOSSIP_MESSAGE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_MESSAGE, GossipMessagePrivate))
-typedef struct _GossipMessagePriv GossipMessagePriv;
+typedef struct _GossipMessagePrivate GossipMessagePrivate;
-struct _GossipMessagePriv {
+struct _GossipMessagePrivate {
GossipContact *recipient;
gchar *resource;
@@ -194,16 +194,16 @@
GOSSIP_TYPE_CHATROOM_INVITE,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipMessagePriv));
+ g_type_class_add_private (object_class, sizeof (GossipMessagePrivate));
}
static void
gossip_message_init (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
priv->recipient = NULL;
priv->sender = NULL;
@@ -223,9 +223,9 @@
static void
gossip_message_finalize (GObject *object)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (object);
if (priv->recipient) {
g_object_unref (priv->recipient);
@@ -254,9 +254,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (object);
switch (param_id) {
case PROP_RECIPIENT:
@@ -298,9 +298,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (object);
switch (param_id) {
case PROP_RECIPIENT:
@@ -356,12 +356,12 @@
GossipMessageType
gossip_message_get_type (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message),
GOSSIP_MESSAGE_TYPE_NORMAL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->type;
}
@@ -369,11 +369,11 @@
GossipContact *
gossip_message_get_recipient (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->recipient;
}
@@ -381,13 +381,13 @@
void
gossip_message_set_recipient (GossipMessage *message, GossipContact *contact)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
GossipContact *old_recipient;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
old_recipient = priv->recipient;
priv->recipient = g_object_ref (contact);
@@ -402,11 +402,11 @@
const gchar *
gossip_message_get_explicit_resource (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), "");
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->resource;
}
@@ -415,19 +415,14 @@
gossip_message_set_explicit_resource (GossipMessage *message,
const gchar *resource)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
g_free (priv->resource);
-
- if (resource) {
priv->resource = g_strdup (resource);
- } else {
- priv->resource = g_strdup ("");
- }
g_object_notify (G_OBJECT (message), "resource");
}
@@ -435,11 +430,11 @@
GossipContact *
gossip_message_get_sender (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->sender;
}
@@ -447,13 +442,13 @@
void
gossip_message_set_sender (GossipMessage *message, GossipContact *contact)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
GossipContact *old_sender;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
g_return_if_fail (GOSSIP_IS_CONTACT (contact));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
old_sender = priv->sender;
priv->sender = g_object_ref (contact);
@@ -468,11 +463,11 @@
const gchar *
gossip_message_get_subject (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->subject;
}
@@ -481,19 +476,14 @@
gossip_message_set_subject (GossipMessage *message,
const gchar *subject)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
g_free (priv->subject);
-
- if (subject) {
priv->subject = g_strdup (subject);
- } else {
- priv->subject = NULL;
- }
g_object_notify (G_OBJECT (message), "subject");
}
@@ -501,11 +491,11 @@
const gchar *
gossip_message_get_body (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->body;
}
@@ -514,19 +504,14 @@
gossip_message_set_body (GossipMessage *message,
const gchar *body)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
g_free (priv->body);
-
- if (body) {
priv->body = g_strdup (body);
- } else {
- priv->body = NULL;
- }
g_object_notify (G_OBJECT (message), "body");
}
@@ -534,11 +519,11 @@
const gchar *
gossip_message_get_thread (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->thread;
}
@@ -547,19 +532,14 @@
gossip_message_set_thread (GossipMessage *message,
const gchar *thread)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
g_free (priv->thread);
-
- if (thread) {
priv->thread = g_strdup (thread);
- } else {
- priv->thread = NULL;
- }
g_object_notify (G_OBJECT (message), "thread");
}
@@ -567,11 +547,11 @@
GossipTime
gossip_message_get_timestamp (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), -1);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->timestamp;
}
@@ -580,12 +560,12 @@
gossip_message_set_timestamp (GossipMessage *message,
GossipTime timestamp)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
g_return_if_fail (timestamp >= -1);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
if (timestamp <= 0) {
priv->timestamp = gossip_time_get_current ();
@@ -620,11 +600,11 @@
GossipChatroomInvite *
gossip_message_get_invite (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->invite;
}
@@ -633,11 +613,11 @@
gossip_message_set_invite (GossipMessage *message,
GossipChatroomInvite *invite)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
if (priv->invite) {
gossip_chatroom_invite_unref (priv->invite);
@@ -655,25 +635,25 @@
void
gossip_message_request_composing (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_if_fail (GOSSIP_IS_MESSAGE (message));
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
priv->request_composing = TRUE;
- g_object_notify (G_OBJECT (message), "request_composing");
+ g_object_notify (G_OBJECT (message), "request-composing");
}
gboolean
gossip_message_is_requesting_composing (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), FALSE);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return priv->request_composing;
}
@@ -684,11 +664,11 @@
gboolean
gossip_message_is_action (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), FALSE);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
if (g_str_has_prefix (priv->body, "/me")) {
return TRUE;
@@ -700,11 +680,11 @@
gchar *
gossip_message_get_action_string (GossipMessage *message)
{
- GossipMessagePriv *priv;
+ GossipMessagePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_MESSAGE (message), NULL);
- priv = GET_PRIV (message);
+ priv = GOSSIP_MESSAGE_GET_PRIVATE (message);
return g_strdup_printf (" * %s %s",
gossip_contact_get_name (priv->sender),
Modified: trunk/libgossip/gossip-paths-gnome.c
==============================================================================
--- trunk/libgossip/gossip-paths-gnome.c (original)
+++ trunk/libgossip/gossip-paths-gnome.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Richard Hult <richard imendio com>
*/
-#include "config.h"
+#include <config.h>
#include "gossip-paths.h"
Modified: trunk/libgossip/gossip-presence.c
==============================================================================
--- trunk/libgossip/gossip-presence.c (original)
+++ trunk/libgossip/gossip-presence.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Mikael Hallendal <micke imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -29,11 +29,11 @@
#include "gossip-presence.h"
#include "gossip-time.h"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_PRESENCE, GossipPresencePriv))
+#define GOSSIP_PRESENCE_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_PRESENCE, GossipPresencePrivate))
-typedef struct _GossipPresencePriv GossipPresencePriv;
+typedef struct _GossipPresencePrivate GossipPresencePrivate;
-struct _GossipPresencePriv {
+struct _GossipPresencePrivate {
GossipPresenceState state;
gchar *status;
@@ -107,15 +107,15 @@
0,
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipPresencePriv));
+ g_type_class_add_private (object_class, sizeof (GossipPresencePrivate));
}
static void
gossip_presence_init (GossipPresence *presence)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
priv->state = GOSSIP_PRESENCE_STATE_AVAILABLE;
@@ -130,9 +130,9 @@
static void
presence_finalize (GObject *object)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (object);
g_free (priv->status);
g_free (priv->resource);
@@ -146,9 +146,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (object);
switch (param_id) {
case PROP_STATE:
@@ -176,9 +176,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (object);
switch (param_id) {
case PROP_STATE:
@@ -220,11 +220,11 @@
const gchar *
gossip_presence_get_resource (GossipPresence *presence)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence), NULL);
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
if (priv->resource) {
return priv->resource;
@@ -236,12 +236,12 @@
const gchar *
gossip_presence_get_status (GossipPresence *presence)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence),
_("Offline"));
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
return priv->status;
}
@@ -249,9 +249,9 @@
gint
gossip_presence_get_priority (GossipPresence *presence)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence), 0);
return priv->priority;
@@ -261,12 +261,12 @@
gossip_presence_set_resource (GossipPresence *presence,
const gchar *resource)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
g_return_if_fail (resource != NULL);
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
g_free (priv->resource);
priv->resource = g_strdup (resource);
@@ -277,12 +277,12 @@
GossipPresenceState
gossip_presence_get_state (GossipPresence *presence)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_val_if_fail (GOSSIP_IS_PRESENCE (presence),
GOSSIP_PRESENCE_STATE_AVAILABLE);
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
return priv->state;
}
@@ -291,11 +291,11 @@
gossip_presence_set_state (GossipPresence *presence,
GossipPresenceState state)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
priv->state = state;
@@ -306,9 +306,9 @@
gossip_presence_set_status (GossipPresence *presence,
const gchar *status)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
g_free (priv->status);
@@ -326,11 +326,11 @@
gossip_presence_set_priority (GossipPresence *presence,
gint priority)
{
- GossipPresencePriv *priv;
+ GossipPresencePrivate *priv;
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
- priv = GET_PRIV (presence);
+ priv = GOSSIP_PRESENCE_GET_PRIVATE (presence);
priv->priority = priority;
@@ -341,14 +341,14 @@
gossip_presence_resource_equal (gconstpointer a,
gconstpointer b)
{
- GossipPresencePriv *priv1;
- GossipPresencePriv *priv2;
+ GossipPresencePrivate *priv1;
+ GossipPresencePrivate *priv2;
g_return_val_if_fail (GOSSIP_IS_PRESENCE (a), FALSE);
g_return_val_if_fail (GOSSIP_IS_PRESENCE (b), FALSE);
- priv1 = GET_PRIV (a);
- priv2 = GET_PRIV (b);
+ priv1 = GOSSIP_PRESENCE_GET_PRIVATE (a);
+ priv2 = GOSSIP_PRESENCE_GET_PRIVATE (b);
if (!priv1->resource) {
if (!priv2->resource) {
@@ -373,8 +373,8 @@
gossip_presence_sort_func (gconstpointer a,
gconstpointer b)
{
- GossipPresencePriv *priv_a;
- GossipPresencePriv *priv_b;
+ GossipPresencePrivate *priv_a;
+ GossipPresencePrivate *priv_b;
gint diff;
g_return_val_if_fail (GOSSIP_IS_PRESENCE (a), 0);
@@ -390,8 +390,8 @@
* 3. Time it was set (most recent first).
*/
- priv_a = GET_PRIV (a);
- priv_b = GET_PRIV (b);
+ priv_a = GOSSIP_PRESENCE_GET_PRIVATE (a);
+ priv_b = GOSSIP_PRESENCE_GET_PRIVATE (b);
/* 1. State */
diff = priv_a->state - priv_b->state;
Modified: trunk/libgossip/gossip-session.c
==============================================================================
--- trunk/libgossip/gossip-session.c (original)
+++ trunk/libgossip/gossip-session.c Sat Nov 29 14:21:05 2008
@@ -18,7 +18,7 @@
* Boston, MA 02111-1307, USA.
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
@@ -33,11 +33,11 @@
#define DEBUG_DOMAIN "Session"
-#define GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_SESSION, GossipSessionPriv))
+#define GOSSIP_SESSION_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_SESSION, GossipSessionPrivate))
-typedef struct _GossipSessionPriv GossipSessionPriv;
+typedef struct _GossipSessionPrivate GossipSessionPrivate;
-struct _GossipSessionPriv {
+struct _GossipSessionPrivate {
GossipAccountManager *account_manager;
GossipContactManager *contact_manager;
GossipChatroomManager *chatroom_manager;
@@ -318,15 +318,15 @@
G_TYPE_STRING,
1, GOSSIP_TYPE_ACCOUNT);
- g_type_class_add_private (object_class, sizeof (GossipSessionPriv));
+ g_type_class_add_private (object_class, sizeof (GossipSessionPrivate));
}
static void
gossip_session_init (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
priv->accounts = g_hash_table_new_full (gossip_account_hash,
gossip_account_equal,
@@ -346,9 +346,9 @@
static void
session_finalize (GObject *object)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
- priv = GET_PRIV (object);
+ priv = GOSSIP_SESSION_GET_PRIVATE (object);
g_hash_table_destroy (priv->accounts);
@@ -422,13 +422,13 @@
GossipAccount *account,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
gossip_debug (DEBUG_DOMAIN,
"Protocol connecting for account:'%s'",
gossip_account_get_name (account));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_signal_emit (session, signals[PROTOCOL_CONNECTING], 0,
account, jabber);
@@ -441,12 +441,12 @@
GossipAccount *account,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *chatrooms, *l;
gossip_debug (DEBUG_DOMAIN, "Protocol Connected");
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_hash_table_insert (priv->timers,
g_object_ref (account),
@@ -511,7 +511,7 @@
gint reason,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
gdouble seconds;
seconds = gossip_session_get_connected_time (session, account);
@@ -519,7 +519,7 @@
"Protocol disconnected (after %.2f seconds)",
seconds);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* Reset the temporary password, it is only valid per connect */
gossip_account_set_password_tmp (account, NULL);
@@ -565,12 +565,12 @@
GossipContact *contact,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
gossip_debug (DEBUG_DOMAIN, "Contact added '%s'",
gossip_contact_get_name (contact));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
priv->contacts = g_list_prepend (priv->contacts,
g_object_ref (contact));
@@ -583,13 +583,13 @@
GossipContact *contact,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *link;
gossip_debug (DEBUG_DOMAIN, "Contact removed '%s'",
gossip_contact_get_name (contact));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_signal_emit (session, signals[CONTACT_REMOVED], 0, contact);
@@ -606,13 +606,13 @@
gboolean composing,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
gossip_debug (DEBUG_DOMAIN, "Contact %s composing:'%s'",
composing ? "is" : "is not",
gossip_contact_get_name (contact));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_signal_emit (session, signals[COMPOSING], 0, contact, composing);
}
@@ -637,12 +637,12 @@
GError *error,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
gossip_debug (DEBUG_DOMAIN, "Error:%d->'%s'",
error->code, error->message);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
if (priv->connecting_counter > 0) {
priv->connecting_counter--;
@@ -666,13 +666,13 @@
const gchar *contacts_file,
const gchar *chatrooms_file)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipSession *session;
GList *accounts, *l;
session = g_object_new (GOSSIP_TYPE_SESSION, NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* Set up account manager */
priv->account_manager = gossip_account_manager_new (accounts_file);
@@ -716,12 +716,12 @@
gossip_session_get_protocol (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return g_hash_table_lookup (priv->accounts, account);
}
@@ -729,11 +729,11 @@
GossipAccountManager *
gossip_session_get_account_manager (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->account_manager;
}
@@ -741,11 +741,11 @@
GossipContactManager *
gossip_session_get_contact_manager (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->contact_manager;
}
@@ -753,11 +753,11 @@
GossipChatroomManager *
gossip_session_get_chatroom_manager (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->chatroom_manager;
}
@@ -765,11 +765,11 @@
GossipLogManager *
gossip_session_get_log_manager (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->log_manager;
}
@@ -779,9 +779,9 @@
GossipJabber *jabber,
GetAccounts *ga)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
- priv = GET_PRIV (ga->session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (ga->session);
ga->accounts = g_list_append (ga->accounts, g_object_ref (account));
}
@@ -789,13 +789,13 @@
GList *
gossip_session_get_accounts (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GetAccounts ga;
GList *list;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
ga.session = session;
ga.accounts = NULL;
@@ -813,14 +813,14 @@
gossip_session_get_connected_time (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GTimer *timer;
gulong ms;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), 0);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), 0);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
timer = g_hash_table_lookup (priv->timers, account);
if (!timer) {
@@ -835,9 +835,9 @@
GossipJabber *jabber,
CountAccounts *ca)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
- priv = GET_PRIV (ca->session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (ca->session);
if (gossip_jabber_is_connected (jabber)) {
ca->connected++;
@@ -856,12 +856,12 @@
guint *connecting,
guint *disconnected)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
CountAccounts ca;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
ca.session = session;
@@ -895,13 +895,13 @@
GossipAccount *
gossip_session_new_account (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
GossipAccount *account;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = gossip_jabber_new (session);
@@ -926,13 +926,13 @@
gossip_session_add_account (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), FALSE);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
if (jabber) {
@@ -962,14 +962,14 @@
gossip_session_remove_account (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
GList *link;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), FALSE);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1008,13 +1008,13 @@
gossip_session_find_account_for_own_contact (GossipSession *session,
GossipContact *own_contact)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
FindAccount fa;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_CONTACT (own_contact), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
fa.contact = own_contact;
fa.account = NULL;
@@ -1045,10 +1045,10 @@
static void
session_connect (GossipSession *session, GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1111,13 +1111,13 @@
GossipAccount *account,
gboolean startup)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
ConnectFind cf;
ConnectData cd;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_signal_emit (session, signals[CONNECTING], 0);
@@ -1159,10 +1159,10 @@
session_disconnect (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
@@ -1178,9 +1178,9 @@
GossipJabber *jabber,
GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
session_disconnect (session, account);
}
@@ -1189,11 +1189,11 @@
gossip_session_disconnect (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
g_signal_emit (session, signals[DISCONNECTING], 0);
@@ -1213,7 +1213,7 @@
gossip_session_send_message (GossipSession *session,
GossipMessage *message)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipContact *contact;
GossipAccount *account;
GossipJabber *jabber;
@@ -1221,7 +1221,7 @@
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (message != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
contact = gossip_message_get_sender (message);
account = gossip_session_find_account_for_own_contact (session, contact);
@@ -1241,12 +1241,12 @@
GossipContact *contact,
gboolean composing)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = session_get_protocol (session, contact);
if (!jabber) {
@@ -1268,11 +1268,11 @@
GossipPresence *
gossip_session_get_presence (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->presence;
}
@@ -1281,13 +1281,13 @@
gossip_session_set_presence (GossipSession *session,
GossipPresence *presence)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *l;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (GOSSIP_IS_PRESENCE (presence));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
if (priv->presence) {
g_object_unref (priv->presence);
@@ -1311,11 +1311,11 @@
gossip_session_is_connected (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
if (account) {
GossipJabber *jabber;
@@ -1334,11 +1334,11 @@
gossip_session_is_connecting (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
if (account) {
GossipJabber *jabber;
@@ -1358,7 +1358,7 @@
gossip_session_get_active_resource (GossipSession *session,
GossipContact *contact)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
@@ -1367,7 +1367,7 @@
* chat against a certain resource.
*/
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = session_get_protocol (session, contact);
if (!jabber) {
@@ -1381,13 +1381,13 @@
gossip_session_get_chatroom_provider (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1400,13 +1400,13 @@
gossip_session_get_ft_provider (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1421,7 +1421,7 @@
const gchar *group,
const gchar *message)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
@@ -1430,7 +1430,7 @@
g_return_if_fail (name != NULL);
g_return_if_fail (message != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1442,7 +1442,7 @@
GossipContact *contact,
const gchar *new_name)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
@@ -1452,7 +1452,7 @@
/* get the activate resource, needed to be able to lock the
chat against a certain resource */
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = session_get_protocol (session, contact);
if (!jabber) {
@@ -1466,7 +1466,7 @@
gossip_session_remove_contact (GossipSession *session,
GossipContact *contact)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
@@ -1476,7 +1476,7 @@
* chat against a certain resource.
*/
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = session_get_protocol (session, contact);
if (!jabber) {
@@ -1490,13 +1490,13 @@
gossip_session_update_contact (GossipSession *session,
GossipContact *contact)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (contact != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = session_get_protocol (session, contact);
if (!jabber) {
@@ -1511,14 +1511,14 @@
const gchar *group,
const gchar *new_name)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *l;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (group != NULL);
g_return_if_fail (new_name != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* FIXME: don't just blindly do this across all protocols
* actually pass the protocol in some how from the contact
@@ -1535,11 +1535,11 @@
const GList *
gossip_session_get_contacts (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
return priv->contacts;
}
@@ -1548,13 +1548,13 @@
gossip_session_get_contacts_by_account (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *l, *list = NULL;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
for (l = priv->contacts; l; l = l->next) {
GossipContact *contact;
@@ -1578,13 +1578,13 @@
gossip_session_get_own_contact (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1594,13 +1594,13 @@
GList *
gossip_session_get_groups (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *l, *j;
GList *all_groups = NULL;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
for (l = priv->protocols; l; l = l->next) {
GossipJabber *jabber;
@@ -1625,14 +1625,14 @@
gossip_session_get_nickname (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
GossipContact *contact;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), "");
g_return_val_if_fail (GOSSIP_IS_ACCOUNT (account), "");
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1648,14 +1648,14 @@
GossipErrorCallback callback,
gpointer user_data)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
g_return_if_fail (callback != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* make sure we have added the account to our list */
gossip_session_add_account (session, account);
@@ -1672,13 +1672,13 @@
gossip_session_register_cancel (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1692,7 +1692,7 @@
GossipErrorCallback callback,
gpointer user_data)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
@@ -1700,7 +1700,7 @@
g_return_if_fail (new_password != NULL);
g_return_if_fail (callback != NULL);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1712,13 +1712,13 @@
gossip_session_change_password_cancel (GossipSession *session,
GossipAccount *account)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
g_return_if_fail (GOSSIP_IS_ACCOUNT (account));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1733,12 +1733,12 @@
gpointer user_data,
GError **error)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_SESSION (session), FALSE);
g_return_val_if_fail (callback != NULL, FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
if (!account && !contact) {
g_warning ("No GossipAccount and no GossipContact to use for vcard request");
@@ -1786,7 +1786,7 @@
gpointer user_data,
GError **error)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *l;
gboolean ok = TRUE;
@@ -1794,7 +1794,7 @@
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), FALSE);
g_return_val_if_fail (callback != NULL, FALSE);
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* if account is supplied set the vcard for that account only! */
if (account) {
@@ -1839,12 +1839,12 @@
gsize *max_size,
gchar **format)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipJabber *jabber;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
jabber = g_hash_table_lookup (priv->accounts, account);
@@ -1870,10 +1870,10 @@
jabber = session_get_protocol (session, contact);
if (!jabber) {
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GossipAccount *account;
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
/* Temporary contact. Use account */
account = gossip_contact_get_account (contact);
@@ -1891,13 +1891,13 @@
void
gossip_session_chatroom_join_favorites (GossipSession *session)
{
- GossipSessionPriv *priv;
+ GossipSessionPrivate *priv;
GList *chatrooms;
GList *l;
g_return_if_fail (GOSSIP_IS_SESSION (session));
- priv = GET_PRIV (session);
+ priv = GOSSIP_SESSION_GET_PRIVATE (session);
chatrooms = gossip_chatroom_manager_get_chatrooms (priv->chatroom_manager, NULL);
Modified: trunk/libgossip/gossip-sha.c
==============================================================================
--- trunk/libgossip/gossip-sha.c (original)
+++ trunk/libgossip/gossip-sha.c Sat Nov 29 14:21:05 2008
@@ -36,9 +36,7 @@
* 34aa973c d4c4daa4 f61eeb2b dbad2731 6534016f
*/
-#ifdef HAVE_CONFIG_H
#include <config.h>
-#endif /* HAVE_CONFIG_H */
#include <string.h>
#include <stdio.h>
Modified: trunk/libgossip/gossip-stock.c
==============================================================================
--- trunk/libgossip/gossip-stock.c (original)
+++ trunk/libgossip/gossip-stock.c Sat Nov 29 14:21:05 2008
@@ -22,7 +22,7 @@
* Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <libgossip/gossip-paths.h>
Modified: trunk/libgossip/gossip-time.c
==============================================================================
--- trunk/libgossip/gossip-time.c (original)
+++ trunk/libgossip/gossip-time.c Sat Nov 29 14:21:05 2008
@@ -20,7 +20,7 @@
* Authors: Richard Hult <richard imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <stdio.h>
#include <stdlib.h>
Modified: trunk/libgossip/gossip-transport-protocol.c
==============================================================================
--- trunk/libgossip/gossip-transport-protocol.c (original)
+++ trunk/libgossip/gossip-transport-protocol.c Sat Nov 29 14:21:05 2008
@@ -18,6 +18,8 @@
* Boston, MA 02111-1307, USA.
*/
+#include <config.h>
+
#include <string.h>
#include <glib.h>
@@ -25,9 +27,8 @@
#include <libxml/xmlreader.h>
#include <libxml/parser.h>
#include <libxml/tree.h>
-#include <loudmouth/loudmouth.h>
-#include <config.h>
+#include <loudmouth/loudmouth.h>
#include "gossip-jabber-private.h"
#include "gossip-transport-accounts.h"
Modified: trunk/libgossip/gossip-utils.c
==============================================================================
--- trunk/libgossip/gossip-utils.c (original)
+++ trunk/libgossip/gossip-utils.c Sat Nov 29 14:21:05 2008
@@ -21,7 +21,7 @@
* Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include <string.h>
#include <time.h>
Modified: trunk/libgossip/gossip-vcard.c
==============================================================================
--- trunk/libgossip/gossip-vcard.c (original)
+++ trunk/libgossip/gossip-vcard.c Sat Nov 29 14:21:05 2008
@@ -21,15 +21,15 @@
* Martyn Russell <martyn imendio com>
*/
-#include "config.h"
+#include <config.h>
#include "gossip-vcard.h"
-#define GOSSIP_VCARD_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_VCARD, GossipVCardPriv))
+#define GOSSIP_VCARD_GET_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_VCARD, GossipVCardPrivate))
-typedef struct _GossipVCardPriv GossipVCardPriv;
+typedef struct _GossipVCardPrivate GossipVCardPrivate;
-struct _GossipVCardPriv {
+struct _GossipVCardPrivate {
gchar *name;
gchar *nickname;
gchar *birthday;
@@ -131,15 +131,15 @@
"The avatar image",
G_PARAM_READWRITE));
- g_type_class_add_private (object_class, sizeof (GossipVCardPriv));
+ g_type_class_add_private (object_class, sizeof (GossipVCardPrivate));
}
static void
gossip_vcard_init (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
priv->name = NULL;
priv->nickname = NULL;
@@ -154,9 +154,9 @@
static void
vcard_finalize (GObject *object)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
- priv = GOSSIP_VCARD_GET_PRIV (object);
+ priv = GOSSIP_VCARD_GET_PRIVATE (object);
g_free (priv->name);
g_free (priv->nickname);
@@ -179,9 +179,9 @@
GValue *value,
GParamSpec *pspec)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
- priv = GOSSIP_VCARD_GET_PRIV (object);
+ priv = GOSSIP_VCARD_GET_PRIVATE (object);
switch (param_id) {
case PROP_NAME:
@@ -220,9 +220,9 @@
const GValue *value,
GParamSpec *pspec)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
- priv = GOSSIP_VCARD_GET_PRIV (object);
+ priv = GOSSIP_VCARD_GET_PRIVATE (object);
switch (param_id) {
case PROP_NAME:
@@ -272,11 +272,11 @@
const gchar *
gossip_vcard_get_name (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->name;
}
@@ -284,11 +284,11 @@
const gchar *
gossip_vcard_get_nickname (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->nickname;
}
@@ -296,11 +296,11 @@
const gchar *
gossip_vcard_get_birthday (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->birthday;
}
@@ -308,11 +308,11 @@
const gchar *
gossip_vcard_get_email (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->email;
}
@@ -320,11 +320,11 @@
const gchar *
gossip_vcard_get_url (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->url;
}
@@ -332,11 +332,11 @@
const gchar *
gossip_vcard_get_country (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->country;
}
@@ -344,11 +344,11 @@
const gchar *
gossip_vcard_get_description (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->description;
}
@@ -356,11 +356,11 @@
GossipAvatar *
gossip_vcard_get_avatar (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
return priv->avatar;
}
@@ -368,7 +368,7 @@
GdkPixbuf *
gossip_vcard_create_avatar_pixbuf (GossipVCard *vcard)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
GdkPixbuf *pixbuf;
GdkPixbufLoader *loader;
GossipAvatar *avatar;
@@ -376,8 +376,7 @@
g_return_val_if_fail (GOSSIP_IS_VCARD (vcard), NULL);
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
-
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
avatar = priv->avatar;
if (!avatar) {
@@ -423,142 +422,123 @@
gossip_vcard_set_name (GossipVCard *vcard,
const gchar *name)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->name);
- if (name) {
priv->name = g_strdup (name);
- } else {
- priv->name = NULL;
- }
+ g_object_notify (G_OBJECT (vcard), "name");
}
void
gossip_vcard_set_nickname (GossipVCard *vcard,
const gchar *nickname)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->nickname);
- if (nickname) {
priv->nickname = g_strdup (nickname);
- } else {
- priv->nickname = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "nickname");
}
void
gossip_vcard_set_birthday (GossipVCard *vcard,
const gchar *birthday)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->birthday);
- if (birthday) {
priv->birthday = g_strdup (birthday);
- } else {
- priv->birthday = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "birthday");
}
void
gossip_vcard_set_email (GossipVCard *vcard,
const gchar *email)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->email);
-
- if (email) {
priv->email = g_strdup (email);
- } else {
- priv->email = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "email");
}
void
gossip_vcard_set_url (GossipVCard *vcard,
const gchar *url)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->url);
-
- if (url) {
priv->url = g_strdup (url);
- } else {
- priv->url = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "url");
}
void
gossip_vcard_set_country (GossipVCard *vcard,
const gchar *country)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->country);
-
- if (country) {
priv->country = g_strdup (country);
- } else {
- priv->country = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "country");
}
void
gossip_vcard_set_description (GossipVCard *vcard,
const gchar *description)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
g_free (priv->description);
-
- if (description) {
priv->description = g_strdup (description);
- } else {
- priv->description = NULL;
- }
+
+ g_object_notify (G_OBJECT (vcard), "description");
}
void
gossip_vcard_set_avatar (GossipVCard *vcard,
GossipAvatar *avatar)
{
- GossipVCardPriv *priv;
+ GossipVCardPrivate *priv;
g_return_if_fail (GOSSIP_IS_VCARD (vcard));
- priv = GOSSIP_VCARD_GET_PRIV (vcard);
+ priv = GOSSIP_VCARD_GET_PRIVATE (vcard);
if (priv->avatar) {
gossip_avatar_unref (priv->avatar);
@@ -568,5 +548,7 @@
if (avatar) {
priv->avatar = gossip_avatar_ref (avatar);
}
+
+ g_object_notify (G_OBJECT (vcard), "avatar");
}
Modified: trunk/libgossip/gossip-version-info.c
==============================================================================
--- trunk/libgossip/gossip-version-info.c (original)
+++ trunk/libgossip/gossip-version-info.c Sat Nov 29 14:21:05 2008
@@ -21,14 +21,14 @@
* Richard Hult <richard imendio com>
*/
-#include "config.h"
-
-#include <glib.h>
+#include <config.h>
#ifndef G_OS_WIN32
#include <sys/utsname.h>
#endif /* G_OS_WIN32 */
+#include <glib.h>
+
#include "gossip-version-info.h"
#define GOSSIP_VERSION_INFO_GET_PRIV(obj) (G_TYPE_INSTANCE_GET_PRIVATE ((obj), GOSSIP_TYPE_VERSION_INFO, GossipVersionInfoPriv))
@@ -195,7 +195,8 @@
}
void
-gossip_version_info_set_name (GossipVersionInfo *info, const gchar *name)
+gossip_version_info_set_name (GossipVersionInfo *info,
+ const gchar *name)
{
GossipVersionInfoPriv *priv;
@@ -206,6 +207,8 @@
g_free (priv->name);
priv->name = g_strdup (name);
+
+ g_object_notify (G_OBJECT (info), "name");
}
const gchar *
@@ -221,7 +224,8 @@
}
void
-gossip_version_info_set_version (GossipVersionInfo *info, const gchar *version)
+gossip_version_info_set_version (GossipVersionInfo *info,
+ const gchar *version)
{
GossipVersionInfoPriv *priv;
@@ -232,6 +236,8 @@
g_free (priv->version);
priv->version = g_strdup (version);
+
+ g_object_notify (G_OBJECT (info), "version");
}
const gchar *
@@ -247,7 +253,8 @@
}
void
-gossip_version_info_set_os (GossipVersionInfo *info, const gchar *os)
+gossip_version_info_set_os (GossipVersionInfo *info,
+ const gchar *os)
{
GossipVersionInfoPriv *priv;
@@ -258,6 +265,8 @@
g_free (priv->os);
priv->os = g_strdup (os);
+
+ g_object_notify (G_OBJECT (info), "os");
}
GossipVersionInfo *
Modified: trunk/src/gossip-account-widget-jabber.c
==============================================================================
--- trunk/src/gossip-account-widget-jabber.c (original)
+++ trunk/src/gossip-account-widget-jabber.c Sat Nov 29 14:21:05 2008
@@ -808,8 +808,10 @@
GTK_DIALOG_MODAL,
GTK_MESSAGE_INFO,
GTK_BUTTONS_CLOSE,
+ "%s",
msg1);
gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (md),
+ "%s",
msg2);
g_signal_connect_swapped (md, "response",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]