r7210 - in dumbhippo/trunk/client: common/engine linux linux/src



Author: otaylor
Date: 2008-01-15 14:14:52 -0600 (Tue, 15 Jan 2008)
New Revision: 7210

Removed:
   dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c
   dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h
Modified:
   dumbhippo/trunk/client/common/engine/hippo-connection.c
   dumbhippo/trunk/client/common/engine/hippo-connection.h
   dumbhippo/trunk/client/linux/Makefile-mugshot.am
   dumbhippo/trunk/client/linux/src/hippo-dbus-server.c
   dumbhippo/trunk/client/linux/src/hippo-dbus-server.h
   dumbhippo/trunk/client/linux/src/main.c
Log:
Remove legacy D-BUS API for external IQs, prefs, etc.


Modified: dumbhippo/trunk/client/common/engine/hippo-connection.c
===================================================================
--- dumbhippo/trunk/client/common/engine/hippo-connection.c	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/common/engine/hippo-connection.c	2008-01-15 20:14:52 UTC (rev 7210)
@@ -279,8 +279,6 @@
     unsigned int too_old : 1;
     unsigned int upgrade_available : 1;
     unsigned int last_auth_failed : 1;
-    
-    guint external_iq_serial;
 };
 
 struct _HippoConnectionClass {
@@ -314,8 +312,6 @@
     /* Emitted to signal that we should temporarily rapidly upload application
      * activity instead of just once an hour */
     INITIAL_APPLICATION_BURST,
-    EXTERNAL_IQ_RETURN,
-    PREF_CHANGED,
     LAST_SIGNAL
 };
 
@@ -446,24 +442,6 @@
                       g_cclosure_marshal_VOID__VOID,
                       G_TYPE_NONE, 0);        
                       
-    signals[PREF_CHANGED] =
-        g_signal_new ("pref-changed",
-                      G_TYPE_FROM_CLASS (object_class),
-                      G_SIGNAL_RUN_LAST,
-                      0,
-                      NULL, NULL,
-                      hippo_engine_marshal_VOID__STRING_BOOLEAN,
-                      G_TYPE_NONE, 2, G_TYPE_STRING, G_TYPE_BOOLEAN);   
-                      
-    signals[EXTERNAL_IQ_RETURN] =
-        g_signal_new ("external-iq-return",
-                      G_TYPE_FROM_CLASS (object_class),
-                      G_SIGNAL_RUN_LAST,
-                      0,
-                      NULL, NULL,
-                      g_cclosure_marshal_VOID__UINT_POINTER,
-                      G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_POINTER);    
-    
     object_class->finalize = hippo_connection_finalize;
 }
 
@@ -1691,7 +1669,6 @@
     for (child = prefs_node->children; child != NULL; child = child->next) {
         const char *key = lm_message_node_get_attribute(child, "key");
         const char *value = lm_message_node_get_value(child);
-        gboolean emit;
         gboolean value_parsed;
         
         if (key == NULL) {
@@ -1702,7 +1679,6 @@
 
         value_parsed = value != NULL && parse_bool(value);
         
-        emit = TRUE;
         if (strcmp(key, "musicSharingEnabled") == 0) {
             music_sharing_enabled = value_parsed;
             saw_music_sharing_enabled = TRUE;
@@ -1735,11 +1711,7 @@
             
         } else {
             g_debug("Unknown pref '%s'", key);
-            emit = FALSE;
         }
-        if (emit)
-        	g_signal_emit(G_OBJECT(connection), signals[PREF_CHANGED], 0,
-        	              key, value_parsed);
     }
     
     /* Important to set primed then enabled, so when the signal is emitted from the 
@@ -2944,77 +2916,8 @@
     
     return g_string_free (ret, FALSE);
 }
-#endif
 
-static LmHandlerResult
-on_external_iq_reply(LmMessageHandler *handler,
-                     LmConnection     *lconnection,
-                     LmMessage        *message,
-                     gpointer          data)
-{
-    MessageContext *context = (MessageContext*) data;
-    HippoConnection *connection = context->connection;
-    LmMessageNode *node = message->node->children;
-    guint external_id = GPOINTER_TO_UINT(context->data);
-    char *content = NULL;
-    
-    g_debug("got external IQ reply (id=%u)", external_id);
-
-    if (node) {
-        lm_message_node_set_raw_mode(node, FALSE);        
-#ifdef HIPPO_LOUDMOUTH_IS_10    
-        content = copied_lm_message_node_to_string(node);
-#else
-        content = lm_message_node_to_string(node);
 #endif
-    } else {
-        content = g_strdup("");
-    }
-    
-    g_signal_emit(G_OBJECT(connection), signals[EXTERNAL_IQ_RETURN], 0, external_id, content);
-                  
-    g_free(content);
-    
-    return LM_HANDLER_RESULT_REMOVE_MESSAGE;
-}   
-
-guint 
-hippo_connection_send_external_iq(HippoConnection *connection,
-                                  gboolean         is_set,
-                                  const char      *element,
-                                  int              attrs_count,
-                                  char           **attrs,
-                                  const char      *content)
-{
-    LmMessage *message;
-    LmMessageNode *node;
-    LmMessageNode *child;
-    int i;
-    
-    g_return_val_if_fail(attrs_count % 2 == 0, 0);
-    
-    message = lm_message_new_with_sub_type(HIPPO_ADMIN_JID, LM_MESSAGE_TYPE_IQ,
-                                           is_set ? LM_MESSAGE_SUB_TYPE_SET : LM_MESSAGE_SUB_TYPE_GET);
-    node = lm_message_get_node(message);
-    
-    child = lm_message_node_add_child (node, element, NULL);
-    for (i = 0; i < attrs_count; i += 2) {
-		lm_message_node_set_attribute(child, attrs[i], attrs[i+1]);	
-    }
-    lm_message_node_set_raw_mode(child, TRUE);    
-    lm_message_node_set_value(child, content);
-    
-    connection->external_iq_serial++;
-    
-    hippo_connection_send_message_with_reply_full(connection, message, on_external_iq_reply, SEND_MODE_AFTER_AUTH,
-                                                  GUINT_TO_POINTER(connection->external_iq_serial), NULL);
-
-    lm_message_unref(message);
-
-    g_debug("Sent external IQ: %s (%d content characters)", element, (int)strlen(content));
-    return connection->external_iq_serial;
-}
-
 
 /**********************************************************************
  * Handling of DataModel IQ's and messages.

Modified: dumbhippo/trunk/client/common/engine/hippo-connection.h
===================================================================
--- dumbhippo/trunk/client/common/engine/hippo-connection.h	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/common/engine/hippo-connection.h	2008-01-15 20:14:52 UTC (rev 7210)
@@ -141,13 +141,6 @@
                                                 const char      *key,
                                                 const char      *value);
                                                 
-guint hippo_connection_send_external_iq        (HippoConnection *connection,
-                                                gboolean         is_set,
-                                                const char      *element,
-                                                int              attrs_count,
-                                                char           **attrs,
-                                                const char      *content);                                               
-
 G_END_DECLS
 
 #endif /* __HIPPO_CONNECTION_H__ */

Modified: dumbhippo/trunk/client/linux/Makefile-mugshot.am
===================================================================
--- dumbhippo/trunk/client/linux/Makefile-mugshot.am	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/Makefile-mugshot.am	2008-01-15 20:14:52 UTC (rev 7210)
@@ -38,8 +38,6 @@
 	src/hippo-dbus-model.h			\
 	src/hippo-dbus-model-client.c		\
 	src/hippo-dbus-model-client.h		\
-	src/hippo-dbus-mugshot.c		\
-	src/hippo-dbus-mugshot.h		\
 	src/hippo-dbus-pidgin.c			\
 	src/hippo-dbus-pidgin.h			\
 	src/hippo-dbus-server.c			\

Deleted: dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.c	2008-01-15 20:14:52 UTC (rev 7210)
@@ -1,329 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#include <config.h>
-#include <glib/gi18n-lib.h>
-#include <stdlib.h>
-#include <string.h>
-#define DBUS_API_SUBJECT_TO_CHANGE 1
-#include <dbus/dbus-glib.h>
-#include <dbus/dbus-glib-lowlevel.h>
-#include "hippo-dbus-server.h"
-#include "hippo-dbus-web.h"
-#include "hippo-dbus-mugshot.h"
-#include "main.h"
-
-
-
-
-
-
-
-/*
- ****************
- *  This whole "Mugshot" D-Bus API is deprecated. Use the data model, which should be accessed
- *  via the org.freedesktop.od.Engine bus name, or for Stacker-specific rather than desktop
- *  generic API, use the com.dumbhippo.Client name.
- * 
- *  Eventually this codebase should be split into an "online desktop engine" (org.freedesktop.od)
- *  and the Mugshot stacker client (com.dumbhippo.)
- *
- *  "Mugshot" should not be in any namespaces or in the code at all really, other than as
- *  a configurable parameter used when the server is mugshot.org.
- ****************
- */
-
-
-
-
-
-
-
-
-
-
-static void
-append_strings_as_dict(DBusMessageIter *iter,
-                       ...)
-{
-    const char *name;
-    va_list args;
-    DBusMessageIter subiter;
-
-    va_start(args, iter);
-
-    dbus_message_iter_open_container(iter,
-                                     DBUS_TYPE_ARRAY,
-                                     DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
-                                     DBUS_TYPE_STRING_AS_STRING
-                                     DBUS_TYPE_STRING_AS_STRING
-                                     DBUS_DICT_ENTRY_END_CHAR_AS_STRING,
-                                     &subiter);
-
-
-
-    while ((name = va_arg(args, const char*)) != NULL) {
-        DBusMessageIter subsubiter;
-        const char *value = va_arg(args, const char*);
-        if (value) { /* skip pairs with a null value */
-            dbus_message_iter_open_container(&subiter, DBUS_TYPE_DICT_ENTRY, NULL, &subsubiter);
-            dbus_message_iter_append_basic(&subsubiter, DBUS_TYPE_STRING, &name);
-            dbus_message_iter_append_basic(&subsubiter, DBUS_TYPE_STRING, &value);
-            dbus_message_iter_close_container(&subiter, &subsubiter);
-        }
-    }
-    dbus_message_iter_close_container(iter, &subiter);
-}
-
-static char *
-get_entity_path(HippoEntity *entity)
-{
-    return g_strdup_printf(HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX "%s", hippo_entity_get_guid(entity));
-}
-
-static void
-append_entity_ref(HippoDBus *dbus,
-                  DBusMessage *message,
-                  HippoEntity *entity)
-{
-    char *opath;
-    opath = get_entity_path(entity);
-    dbus_message_append_args(message, DBUS_TYPE_OBJECT_PATH, &opath, DBUS_TYPE_INVALID);
-    g_free(opath);
-}
-
-void
-hippo_dbus_try_acquire_mugshot(DBusConnection *connection,
-                               gboolean        replace)
-{
-    dbus_uint32_t flags;
-
-    /* We do want to be queued if we don't get this right away */
-    flags = DBUS_NAME_FLAG_ALLOW_REPLACEMENT;
-    if (replace)
-        flags |= DBUS_NAME_FLAG_REPLACE_EXISTING;
-
-    /* we just ignore errors on this */
-    dbus_bus_request_name(connection, HIPPO_DBUS_MUGSHOT_BUS_NAME,
-                          flags,
-                          NULL);
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_get_baseprops(HippoDBus       *dbus,
-                                        DBusMessage     *message)
-{
-    DBusMessageIter iter;
-    DBusMessage *reply;
-    HippoDataCache *cache;
-    HippoConnection *connection;
-    char *baseurl;
-
-    cache = hippo_app_get_data_cache(hippo_get_app());
-    connection = hippo_data_cache_get_connection(cache);
-
-    baseurl = hippo_connection_make_absolute_url(connection, "/");
-
-    reply = dbus_message_new_method_return(message);
-    dbus_message_iter_init_append(reply, &iter);
-
-    append_strings_as_dict(&iter,
-                           "baseurl", baseurl,
-                           NULL);
-    g_free(baseurl);
-
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_get_self(HippoDBus   *dbus,
-                                   DBusMessage  *message)
-{
-    HippoPerson *self;
-    DBusMessage *reply;
-    HippoDataCache *cache;
-
-    cache = hippo_app_get_data_cache(hippo_get_app());
-
-    self = hippo_data_cache_get_self(cache);
-    if (self == NULL) {
-    	return dbus_message_new_error(message, "org.mugshot.Mugshot.Disconnected", "Not connected");
-    }
-
-    reply = dbus_message_new_method_return(message);
-    append_entity_ref(dbus, reply, HIPPO_ENTITY(self));
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_get_connection_status(HippoDBus   *dbus,
-                                                DBusMessage  *message)
-{
-    DBusMessage *reply;
-    gboolean have_auth;
-    gboolean connected;
-    gboolean contacts_loaded;
-    HippoDataCache *cache;
-    HippoConnection *connection;
-
-    cache = hippo_app_get_data_cache(hippo_get_app());
-    connection = hippo_data_cache_get_connection(cache);
-
-    have_auth = hippo_connection_get_has_auth(connection);
-    connected = hippo_connection_get_connected(connection);
-    contacts_loaded = FALSE;
-
-    reply = dbus_message_new_method_return(message);
-    dbus_message_append_args(reply, DBUS_TYPE_BOOLEAN, &have_auth,
-                             DBUS_TYPE_BOOLEAN, &connected,
-                             DBUS_TYPE_BOOLEAN, &contacts_loaded,
-                             DBUS_TYPE_INVALID);
-
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_send_external_iq(HippoDBus   *dbus,
-                                           DBusMessage *message)
-{
-    DBusMessage *reply;
-    gboolean is_set;
-    const char *element;
-    char **attrs;
-    int attrs_count;
-    const char *content;
-    DBusError error;
-    HippoConnection *connection;
-    guint request_id;
-
-    dbus_error_init(&error);
-
-    if (!dbus_message_get_args(message,
-                               &error,
-                               DBUS_TYPE_BOOLEAN, &is_set,
-                               DBUS_TYPE_STRING, &element,
-                               DBUS_TYPE_ARRAY, DBUS_TYPE_STRING, &attrs, &attrs_count,
-                               DBUS_TYPE_STRING, &content,
-                               DBUS_TYPE_INVALID)) {
-        reply = dbus_message_new_error(message, error.name, error.message);
-        dbus_error_free(&error);
-        return reply;
-    }
-
-    if (attrs_count % 2 != 0) {
-    	return dbus_message_new_error(message, "org.mugshot.Mugshot.InvalidAttributes", "Invalid attribute count");
-    }
-
-    connection = hippo_data_cache_get_connection(hippo_app_get_data_cache(hippo_get_app()));
-
-    request_id = hippo_connection_send_external_iq(connection, is_set, element, attrs_count, attrs, content);
-
-    dbus_free_string_array(attrs);
-
-    reply = dbus_message_new_method_return(message);
-    dbus_message_append_args(reply, DBUS_TYPE_UINT32, &request_id, NULL);
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_handle_mugshot_introspect(HippoDBus   *dbus,
-                                     DBusMessage *message)
-{
-    GString *xml;
-    DBusMessage *reply;
-
-    xml = g_string_new(NULL);
-
-    g_string_append(xml, DBUS_INTROSPECT_1_0_XML_DOCTYPE_DECL_NODE);
-
-    g_string_append(xml, "<node>\n");
-
-    g_string_append_printf(xml, "  <interface name=\"%s\">\n", DBUS_INTERFACE_INTROSPECTABLE);
-
-    g_string_append(xml, "    <method name=\"Introspect\">\n");
-
-    g_string_append_printf(xml, "      <arg name=\"data\" direction=\"out\" type=\"%s\"/>\n", DBUS_TYPE_STRING_AS_STRING);
-
-    g_string_append(xml, "    </method>\n");
-
-    g_string_append(xml, "  </interface>\n");
-
-    g_string_append_printf(xml, "  <interface name=\"%s\">\n",
-                           HIPPO_DBUS_MUGSHOT_INTERFACE);
-    g_string_append(xml,
-                    "    <method name=\"GetBaseProperties\">\n"
-                    "      <arg direction=\"out\" type=\"a{ss}\"/>\n"
-                    "    </method>"
-                    );
-    g_string_append(xml,
-                    "    <method name=\"SendExternalIQ\">\n"
-                    "      <arg direction=\"in\" type=\"b\"/>\n"
-                    "      <arg direction=\"in\" type=\"s\"/>\n"
-                    "      <arg direction=\"in\" type=\"as\"/>\n"
-                    "      <arg direction=\"in\" type=\"s\"/>\n"
-                    "      <arg direction=\"out\" type=\"u\"/>\n"
-                    "    </method>"
-                    );
-    g_string_append(xml,
-                    "    <method name=\"NotifyAllWhereim\"/>\n");
-    g_string_append(xml,
-                    "    <method name=\"GetNetwork\">\n"
-                    "      <arg direction=\"out\" type=\"ao\"/>\n"
-                    "    </method>"
-                    );
-
-    g_string_append(xml,
-                    "    <signal name=\"EntityChanged\">\n"
-                    "      <arg direction=\"in\" type=\"a{ss}\"/>\n"
-                    "    </signal>\n");
-
-    g_string_append(xml, "  </interface>\n");
-
-    g_string_append(xml, "</node>\n");
-
-
-    reply = dbus_message_new_method_return(message);
-
-    dbus_message_append_args(reply, DBUS_TYPE_STRING, &xml->str, DBUS_TYPE_INVALID);
-
-    g_string_free(xml, TRUE);
-
-    return reply;
-}
-
-DBusMessage*
-hippo_dbus_mugshot_signal_connection_changed(HippoDBus            *dbus)
-{
-    DBusMessage *signal;
-    signal = dbus_message_new_signal(HIPPO_DBUS_MUGSHOT_PATH,
-                                     HIPPO_DBUS_MUGSHOT_INTERFACE,
-                                     "ConnectionStatusChanged");
-    return signal;
-}
-
-DBusMessage*
-hippo_dbus_mugshot_signal_pref_changed(HippoDBus            *dbus,
-                                       const char           *key,
-                                       gboolean              value)
-{
-    DBusMessage *signal;
-    signal = dbus_message_new_signal(HIPPO_DBUS_MUGSHOT_PATH,
-                                     HIPPO_DBUS_MUGSHOT_INTERFACE,
-                                     "PrefChanged");
-    dbus_message_append_args(signal,
-                             DBUS_TYPE_STRING, &key,
-                             DBUS_TYPE_BOOLEAN, &value,
-                             DBUS_TYPE_INVALID);
-    return signal;
-}
-
-DBusMessage*
-hippo_dbus_mugshot_signal_external_iq_return(HippoDBus            *dbus,
-                                             guint                 id,
-                                             const char           *content)
-{
-    DBusMessage *signal;
-    signal = dbus_message_new_signal(HIPPO_DBUS_MUGSHOT_PATH,
-                                     HIPPO_DBUS_MUGSHOT_INTERFACE,
-                                     "ExternalIQReturn");
-    dbus_message_append_args(signal, DBUS_TYPE_UINT32, &id, DBUS_TYPE_STRING, &content, DBUS_TYPE_INVALID);
-    return signal;
-}

Deleted: dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-mugshot.h	2008-01-15 20:14:52 UTC (rev 7210)
@@ -1,85 +0,0 @@
-/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
-#ifndef __HIPPO_DBUS_MUGSHOT_H__
-#define __HIPPO_DBUS_MUGSHOT_H__
-
-/* implement Mugshot-related dbus methods */
-
-
-
-
-
-
-
-
-/*
- ****************
- *  This whole "Mugshot" D-Bus API is deprecated. Use the data model, which should be accessed
- *  via the org.freedesktop.od.Engine bus name, or for Stacker-specific rather than desktop
- *  generic API, use the com.dumbhippo.Client name.
- * 
- *  Eventually this codebase should be split into an "online desktop engine" (org.freedesktop.od)
- *  and the Mugshot stacker client (com.dumbhippo.)
- *
- *  "Mugshot" should not be in any namespaces or in the code at all really, other than as
- *  a configurable parameter used when the server is mugshot.org.
- ****************
- */
-
-
-
-
-
-
-
-
-
-
-
-#include "hippo-dbus-server.h"
-
-G_BEGIN_DECLS
-
-/* This section is for methods related specifically to the Mugshot
- * website core, as opposed to a service that might be provided
- * by others.
- */
-
-/* generic preferences interface */
-#define HIPPO_DBUS_MUGSHOT_INTERFACE "org.mugshot.Mugshot"
-/* this is a bus name owned by the current "store prefs online" program */
-#define HIPPO_DBUS_MUGSHOT_BUS_NAME "org.mugshot.Mugshot"
-#define HIPPO_DBUS_MUGSHOT_PATH "/org/mugshot/Mugshot"
-
-#define HIPPO_DBUS_MUGSHOT_ENTITY_INTERFACE "org.mugshot.Mugshot.Entity"
-#define HIPPO_DBUS_MUGSHOT_DATACACHE_PATH_PREFIX "/org/mugshot/Mugshot/datacache/"
-
-DBusMessage* hippo_dbus_handle_mugshot_get_connection_status(HippoDBus   *dbus,
-                                                             DBusMessage  *message);
-
-DBusMessage* hippo_dbus_handle_mugshot_get_baseprops(HippoDBus       *dbus,
-                                                     DBusMessage     *message);
-
-DBusMessage* hippo_dbus_handle_mugshot_send_external_iq  (HippoDBus       *dbus,
-                                                          DBusMessage     *message);
-
-DBusMessage* hippo_dbus_handle_mugshot_get_self 	(HippoDBus   *dbus,
-             				                         DBusMessage  *message);   
-                                                     
-DBusMessage* hippo_dbus_handle_mugshot_introspect   (HippoDBus       *dbus,
-                                                     DBusMessage     *message);
-
-void hippo_dbus_try_acquire_mugshot                 (DBusConnection *connection,
-                                                     gboolean        replace);
-
-DBusMessage* hippo_dbus_mugshot_signal_connection_changed       (HippoDBus            *dbus);
-
-DBusMessage* hippo_dbus_mugshot_signal_pref_changed         (HippoDBus            *dbus,
-                                                             const char           *key,
-                                                             gboolean              value);
-                                                             
-DBusMessage* hippo_dbus_mugshot_signal_external_iq_return (HippoDBus            *dbus,
-                                                           guint                 id,
-                                                           const char           *content);
-G_END_DECLS
-
-#endif /* __HIPPO_DBUS_MUGSHOT_H__ */

Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-server.c
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-server.c	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-server.c	2008-01-15 20:14:52 UTC (rev 7210)
@@ -10,7 +10,6 @@
 #include "hippo-dbus-client.h"
 #include "hippo-dbus-cookies.h"
 #include "hippo-dbus-model.h"
-#include "hippo-dbus-mugshot.h"
 #include "hippo-dbus-pidgin.h"
 #include "hippo-dbus-local.h"
 #include "hippo-dbus-settings.h"
@@ -395,9 +394,6 @@
 
     dbus_error_init(&derror);
     
-    /* Grab ownership of the Mugshot bus name */
-    hippo_dbus_try_acquire_mugshot(connection, FALSE);
-
     /* Acquire online prefs manager; we continue even if this
      * fails. If another Mugshot had it, we should have replaced that
      * Mugshot above synchronously. So we don't pass replace=TRUE to
@@ -1933,32 +1929,6 @@
                 dbus_connection_send(dbus->connection, reply, NULL);
                 dbus_message_unref(reply);
             }
-        } else if (path && member &&
-                   strcmp(path, HIPPO_DBUS_MUGSHOT_PATH) == 0) {
-            DBusMessage *reply;
-            
-            reply = NULL;
-            result = DBUS_HANDLER_RESULT_HANDLED;
-
-            if (strcmp(member, "GetConnectionStatus") == 0) {
-                reply = hippo_dbus_handle_mugshot_get_connection_status(dbus, message);
-            } else if (strcmp(member, "NotifyAllWhereim") == 0) {
-                reply = hippo_dbus_handle_mugshot_send_external_iq(dbus, message);                       
-            } else if (strcmp(member, "GetBaseProperties") == 0) {
-                reply = hippo_dbus_handle_mugshot_get_baseprops(dbus, message);                   
-            } else if (strcmp(member, "GetSelf") == 0) {
-            	reply = hippo_dbus_handle_mugshot_get_self(dbus, message);                
-            } else if (strcmp(member, "Introspect") == 0) {
-                reply = hippo_dbus_handle_mugshot_introspect(dbus, message);                
-            } else {
-                /* Set this back so the default handler can return an error */
-                result = DBUS_HANDLER_RESULT_NOT_YET_HANDLED;
-            }
-
-            if (reply != NULL) {
-                dbus_connection_send(dbus->connection, reply, NULL);
-                dbus_message_unref(reply);
-            }        
         }        
     } else if (type == DBUS_MESSAGE_TYPE_SIGNAL) {
         const char *sender = dbus_message_get_sender(message);
@@ -2032,37 +2002,15 @@
 }
 
 void
-hippo_dbus_notify_auth_changed(HippoDBus   *dbus)
-{
-	DBusMessage *message;
-	message = hippo_dbus_mugshot_signal_connection_changed(dbus);
-    dbus_connection_send(dbus->connection, message, NULL);
-    dbus_message_unref(message);	
-}                               
-
-void
-hippo_dbus_notify_contacts_loaded(HippoDBus   *dbus)
-{
-	DBusMessage *message;
-	message = hippo_dbus_mugshot_signal_connection_changed(dbus);
-    dbus_connection_send(dbus->connection, message, NULL);
-    dbus_message_unref(message);	
-}   
-
-void
 hippo_dbus_notify_xmpp_connected(HippoDBus   *dbus,
                                  gboolean     connected)
 {
-	DBusMessage *message;
+    DBusMessage *message;
     if (dbus->xmpp_connected == (connected != FALSE))
         return;
     
     dbus->xmpp_connected = connected != FALSE;
 
-    message = hippo_dbus_mugshot_signal_connection_changed(dbus);
-    dbus_connection_send(dbus->connection, message, NULL);
-    dbus_message_unref(message);
-        
     if (dbus->xmpp_connected) {
         /* notify all the listeners */
         message = dbus_message_new_signal(HIPPO_DBUS_STACKER_LISTENER_PATH,
@@ -2106,25 +2054,3 @@
 	}
     }
 }
-
-void
-hippo_dbus_notify_pref_changed(HippoDBus   *dbus,
-                               const char  *key,
-                               gboolean     value)
-{
-    DBusMessage *signal;
-    signal = hippo_dbus_mugshot_signal_pref_changed(dbus, key, value);
-    dbus_connection_send(dbus->connection, signal, NULL);
-    dbus_message_unref(signal);	
-}
-       
-void       
-hippo_dbus_notify_external_iq_return (HippoDBus            *dbus,
-                                      guint                 id,
-                                      const char           *content)
-{
-    DBusMessage *signal;
-    signal = hippo_dbus_mugshot_signal_external_iq_return(dbus, id, content);
-    dbus_connection_send(dbus->connection, signal, NULL);
-    dbus_message_unref(signal);    
-}

Modified: dumbhippo/trunk/client/linux/src/hippo-dbus-server.h
===================================================================
--- dumbhippo/trunk/client/linux/src/hippo-dbus-server.h	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/src/hippo-dbus-server.h	2008-01-15 20:14:52 UTC (rev 7210)
@@ -36,24 +36,9 @@
                                        const char *name);
 
 
-void       hippo_dbus_notify_auth_changed      (HippoDBus   *dbus);
-
-void       hippo_dbus_notify_contacts_loaded   (HippoDBus   *dbus);
-
-void       hippo_dbus_notify_pref_changed      (HippoDBus   *dbus,
-                                                const char  *key,
-                                                gboolean     value);
-
 void       hippo_dbus_notify_xmpp_connected    (HippoDBus   *dbus,
                                                 gboolean     connected);
                                                 
-void       hippo_dbus_notify_entity_changed    (HippoDBus               *dbus,
-                                                HippoEntity             *entity);
-
-void       hippo_dbus_notify_external_iq_return(HippoDBus            *dbus,
-                                                guint                 id,
-                                                const char           *content);
-
 typedef void (*HippoChatWindowForeach)(guint64 window_id, HippoChatState state, void *data);
 
 void hippo_dbus_foreach_chat_window(HippoDBus             *dbus,

Modified: dumbhippo/trunk/client/linux/src/main.c
===================================================================
--- dumbhippo/trunk/client/linux/src/main.c	2008-01-15 19:55:02 UTC (rev 7209)
+++ dumbhippo/trunk/client/linux/src/main.c	2008-01-15 20:14:52 UTC (rev 7210)
@@ -582,37 +582,6 @@
     /* Ignore this - we display as a disconnected icon */
 }
 
-static void
-on_has_auth_changed(HippoConnection *connection,
-                    void            *data)
-{
-    HippoApp *app = data;
-
-    hippo_dbus_notify_auth_changed(app->dbus);
-}
-
-static void
-on_pref_changed(HippoConnection *connection,
-                const char      *key,
-                gboolean         value,
-                void            *data)
-{
-    HippoApp *app = data;
-
-    hippo_dbus_notify_pref_changed(app->dbus, key, value);
-}
-
-static void
-on_external_iq_return(HippoConnection      *connection,
-                      guint                 id,
-                      const char           *content,
-                      void                 *data)
-{
-    HippoApp *app = data;
-    
-    hippo_dbus_notify_external_iq_return(app->dbus, id, content);
-}
-
 static HippoApp*
 hippo_app_new(HippoInstanceType  instance_type,
               HippoPlatform     *platform,
@@ -648,19 +617,11 @@
                      G_CALLBACK(on_client_info_available), app);
     g_signal_connect(G_OBJECT(app->connection), "auth-failed",
                      G_CALLBACK(on_auth_failed), app);                     
-    g_signal_connect(G_OBJECT(app->connection), "has-auth-changed",
-                     G_CALLBACK(on_has_auth_changed), app);                     
     g_signal_connect(G_OBJECT(app->connection), "connected-changed",
                      G_CALLBACK(on_connected_changed), app);
     g_signal_connect(G_OBJECT(app->connection), "initial-application-burst",
                      G_CALLBACK(on_initial_application_burst), app);
-    g_signal_connect(G_OBJECT(app->connection), "pref-changed", 
-                     G_CALLBACK(on_pref_changed), app);   
                      
-    /* Hook up D-BUS reflectors */
-    g_signal_connect(G_OBJECT(app->connection), "external-iq-return",
-                     G_CALLBACK(on_external_iq_return), app);
-    
     /* initially be sure we are the latest installed, though it's 
      * tough to imagine this happening outside of testing 
      * in a local source tree (which is why it's here...)
@@ -699,13 +660,9 @@
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_auth_failed), app);
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
-                                         G_CALLBACK(on_has_auth_changed), app);
-    g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_connected_changed), app);
     g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
                                          G_CALLBACK(on_initial_application_burst), app);
-    g_signal_handlers_disconnect_by_func(G_OBJECT(app->connection),
-                                         G_CALLBACK(on_external_iq_return), app);
 
     if (app->upgrade_dialog)
         gtk_object_destroy(GTK_OBJECT(app->upgrade_dialog));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]