*/
#include "config.h"
+#include "empathy-contact.h"
-#include <string.h>
-
-#include <glib/gi18n-lib.h>
-
-#include <folks/folks.h>
-#include <folks/folks-telepathy.h>
+#include <tp-account-widgets/tpaw-utils.h>
#ifdef HAVE_GEOCODE
#include <geocode-glib/geocode-glib.h>
#endif
-#include "empathy-contact.h"
-#include "empathy-camera-monitor.h"
-#include "empathy-individual-manager.h"
+#include "empathy-location.h"
#include "empathy-utils.h"
#include "empathy-enum-types.h"
-#include "empathy-location.h"
#define DEBUG_FLAG EMPATHY_DEBUG_CONTACT
#include "empathy-debug.h"
"Contact presence",
"Presence of contact",
TP_CONNECTION_PRESENCE_TYPE_UNSET,
- NUM_TP_CONNECTION_PRESENCE_TYPES,
+ TP_NUM_CONNECTION_PRESENCE_TYPES,
TP_CONNECTION_PRESENCE_TYPE_UNSET,
G_PARAM_READWRITE | G_PARAM_STATIC_STRINGS));
priv->id = g_strdup (id);
g_object_notify (G_OBJECT (contact), "id");
- if (EMP_STR_EMPTY (priv->alias))
+ if (TPAW_STR_EMPTY (priv->alias))
g_object_notify (G_OBJECT (contact), "alias");
}
}
}
- if (!EMP_STR_EMPTY (tpl_entity_get_avatar_token (tpl_entity)))
+ if (!TPAW_STR_EMPTY (tpl_entity_get_avatar_token (tpl_entity)))
contact_load_avatar_cache (retval,
tpl_entity_get_avatar_token (tpl_entity));
priv = GET_PRIV (contact);
- if (!EMP_STR_EMPTY (priv->alias))
+ if (!TPAW_STR_EMPTY (priv->alias))
alias = priv->alias;
else if (priv->tp_contact != NULL)
alias = tp_contact_get_alias (priv->tp_contact);
- if (!EMP_STR_EMPTY (alias))
+ if (!TPAW_STR_EMPTY (alias))
return alias;
else
return empathy_contact_get_id (contact);
if (priv->groups == NULL)
{
priv->groups = gee_hash_set_new (G_TYPE_STRING, (GBoxedCopyFunc) g_strdup,
- g_free, g_str_hash, g_str_equal);
+ g_free, NULL, NULL, NULL, NULL, NULL, NULL);
}
gee_collection_add (GEE_COLLECTION (priv->groups), group);
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), "");
message = empathy_contact_get_presence_message (contact);
- if (!EMP_STR_EMPTY (message))
+ if (!TPAW_STR_EMPTY (message))
return message;
return empathy_presence_get_default_message (
gchar *avatar_file;
gchar *token_escaped;
- if (EMP_STR_EMPTY (empathy_contact_get_id (contact)))
+ if (TPAW_STR_EMPTY (empathy_contact_get_id (contact)))
return NULL;
token_escaped = tp_escape_as_identifier (token);
GError *error = NULL;
g_return_val_if_fail (EMPATHY_IS_CONTACT (contact), FALSE);
- g_return_val_if_fail (!EMP_STR_EMPTY (token), FALSE);
+ g_return_val_if_fail (!TPAW_STR_EMPTY (token), FALSE);
/* Load the avatar from file if it exists */
filename = contact_get_avatar_filename (contact, token);
GeocodeLocation *loc;
GHashTable *new_location;
GHashTable *resolved = NULL;
- gdouble latitude, longitude;
if (priv->location == NULL)
goto out;
loc = res->data;
new_location = tp_asv_new (
- EMPATHY_LOCATION_LAT, G_TYPE_DOUBLE, loc->latitude,
- EMPATHY_LOCATION_LON, G_TYPE_DOUBLE, loc->longitude,
+ EMPATHY_LOCATION_LAT, G_TYPE_DOUBLE, geocode_location_get_latitude (loc),
+ EMPATHY_LOCATION_LON, G_TYPE_DOUBLE, geocode_location_get_longitude (loc),
NULL);
- DEBUG ("\t - Latitude: %f", loc->latitude);
- DEBUG ("\t - Longitude: %f", loc->longitude);
+ DEBUG ("\t - Latitude: %f", geocode_location_get_latitude (loc));
+ DEBUG ("\t - Longitude: %f", geocode_location_get_longitude (loc));
- g_list_free_full (res, (GDestroyNotify) geocode_location_free);
+ g_list_free_full (res, g_object_unref);
/* Copy remaning fields. LAT and LON were not defined so we won't overwrite
* the values we just set. */