#define GET_PRIV(obj) EMPATHY_GET_PRIV (obj, EmpathyLocationManager)
typedef struct {
gboolean geoclue_is_setup;
- MissionControl *mc;
/* Contains the location to be sent to accounts. Geoclue is used
* to populate it. This HashTable uses Telepathy's style (string,
* GValue). Keys are defined in empathy-location.h
GValue *value,
GParamSpec *pspec)
{
- EmpathyLocationManagerPriv *priv = GET_PRIV (object);
+ /*EmpathyLocationManagerPriv *priv = GET_PRIV (object); */
switch (param_id)
{
const GValue *value,
GParamSpec *pspec)
{
- EmpathyLocationManagerPriv *priv = GET_PRIV (object);
+ /* EmpathyLocationManagerPriv *priv = GET_PRIV (object); */
switch (param_id)
{
static void
publish_location (EmpathyLocationManager *location_manager,
- McAccount *account,
- gboolean force_publication)
+ McAccount *account,
+ gboolean force_publication)
{
EmpathyLocationManagerPriv *priv = GET_PRIV (location_manager);
guint connection_status = -1;
gboolean can_publish;
- EmpathyConf *conf = empathy_conf_get ();
TpConnection *conn;
+ EmpathyConf *conf = empathy_conf_get ();
EmpathyTpContactFactory *factory;
- conn = mission_control_get_tpconnection (priv->mc, account, NULL);
+ conn = empathy_account_manager_get_connection (priv->account_manager,
+ account);
if (!conn)
return;
return;
}
- connection_status = mission_control_get_connection_status (priv->mc,
- account, NULL);
+ connection_status = tp_connection_get_status (conn, NULL);
if (connection_status != TP_CONNECTION_STATUS_CONNECTED)
return;
- DEBUG ("Publishing %s location to account %s",
+ DEBUG ("Publishing %s location to connection %p",
(g_hash_table_size (priv->location) == 0 ? "empty" : ""),
- mc_account_get_display_name (account));
+ conn);
factory = empathy_tp_contact_factory_dup_singleton (conn);
empathy_tp_contact_factory_set_location (factory, priv->location);
location_manager->priv = priv;
priv->geoclue_is_setup = FALSE;
- priv->mc = empathy_mission_control_dup_singleton ();
priv->location = g_hash_table_new_full (g_direct_hash, g_direct_equal,
g_free, (GDestroyNotify) tp_g_value_slice_free);