r6944 - in dumbhippo/trunk: client/common/hippo openfire/src/plugins/hippo/src/java/com/dumbhippo/jive server/src/com/dumbhippo/server super super/jboss/files/deploy
- From: commits mugshot org
- To: online-desktop-list gnome org
- Subject: r6944 - in dumbhippo/trunk: client/common/hippo openfire/src/plugins/hippo/src/java/com/dumbhippo/jive server/src/com/dumbhippo/server super super/jboss/files/deploy
- Date: Sun, 2 Dec 2007 23:56:41 -0600 (CST)
Author: walters
Date: 2007-12-02 23:56:36 -0600 (Sun, 02 Dec 2007)
New Revision: 6944
Modified:
dumbhippo/trunk/client/common/hippo/hippo-connection.c
dumbhippo/trunk/client/common/hippo/hippo-data-cache.c
dumbhippo/trunk/client/common/hippo/hippo-data-cache.h
dumbhippo/trunk/client/common/hippo/hippo-data-model-backend.c
dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ClientInfoIQHandler.java
dumbhippo/trunk/server/src/com/dumbhippo/server/HippoProperty.java
dumbhippo/trunk/super/base.conf
dumbhippo/trunk/super/jboss/files/deploy/properties-service.xml
Log:
Add protocol version. You should bump this when making incompatible
changes.
Modified: dumbhippo/trunk/client/common/hippo/hippo-connection.c
===================================================================
--- dumbhippo/trunk/client/common/hippo/hippo-connection.c 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/client/common/hippo/hippo-connection.c 2007-12-03 05:56:36 UTC (rev 6944)
@@ -1558,6 +1558,7 @@
HippoConnection *connection = HIPPO_CONNECTION(data);
LmMessageNode *child;
HippoClientInfo info;
+ const char *ddm_protocol_verson = NULL;
const char *minimum;
const char *current;
const char *download;
@@ -1570,18 +1571,21 @@
child = message->node->children;
if (!hippo_xml_split(connection->cache, child, NULL,
+ "ddmProtocolVersion", HIPPO_SPLIT_STRING | HIPPO_SPLIT_OPTIONAL, &ddm_protocol_version,
"minimum", HIPPO_SPLIT_STRING, &minimum,
"current", HIPPO_SPLIT_STRING, ¤t,
"download", HIPPO_SPLIT_STRING, &download,
NULL))
return LM_HANDLER_RESULT_REMOVE_MESSAGE;
- g_debug("Got clientInfo response: minimum=%s, current=%s, download=%s", minimum, current, download);
+ g_debug("Got clientInfo response: protocol=%s, minimum=%s, current=%s, download=%s",
+ ddm_protocol_version ? ddm_protocol_version : "(null)", minimum, current, download);
/* cast off the const */
info.minimum = (char*)minimum;
info.current = (char*)current;
info.download = (char*)download;
+ info.ddm_protocol_version = (char*)ddm_protocol_version;
hippo_data_cache_set_client_info(connection->cache, &info);
/* FIXME right now this is only on Linux because it's too close to release to
Modified: dumbhippo/trunk/client/common/hippo/hippo-data-cache.c
===================================================================
--- dumbhippo/trunk/client/common/hippo/hippo-data-cache.c 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/client/common/hippo/hippo-data-cache.c 2007-12-03 05:56:36 UTC (rev 6944)
@@ -1135,11 +1135,13 @@
zero_str(&cache->client_info.current);
zero_str(&cache->client_info.minimum);
zero_str(&cache->client_info.download);
+ zero_str(&cache->client_info.ddm_protocol_verson);
if (info) {
cache->client_info.current = g_strdup(info->current);
cache->client_info.minimum = g_strdup(info->minimum);
cache->client_info.download = g_strdup(info->download);
+ cache->client_info.ddm_protocol_verson = g_strdup(info->ddm_protocol_verson);
}
}
Modified: dumbhippo/trunk/client/common/hippo/hippo-data-cache.h
===================================================================
--- dumbhippo/trunk/client/common/hippo/hippo-data-cache.h 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/client/common/hippo/hippo-data-cache.h 2007-12-03 05:56:36 UTC (rev 6944)
@@ -19,6 +19,7 @@
char *minimum;
char *current;
char *download;
+ char *ddm_protocol_version;
} HippoClientInfo;
#define HIPPO_TYPE_DATA_CACHE (hippo_data_cache_get_type ())
Modified: dumbhippo/trunk/client/common/hippo/hippo-data-model-backend.c
===================================================================
--- dumbhippo/trunk/client/common/hippo/hippo-data-model-backend.c 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/client/common/hippo/hippo-data-model-backend.c 2007-12-03 05:56:36 UTC (rev 6944)
@@ -135,6 +135,16 @@
DDM_DATA_CARDINALITY_1,
FALSE, NULL,
&value);
+
+ value.type = DDM_DATA_STRING;
+ value.u.string = hippo_data_cache_get_client_info(hippo_model->data_cache)->ddm_protocol_version;
+
+ ddm_data_resource_update_property(global_resource,
+ ddm_qname_get(DDM_GLOBAL_RESOURCE_CLASS, "ddmProtocolVersion"),
+ DDM_DATA_UPDATE_REPLACE,
+ DDM_DATA_CARDINALITY_1,
+ FALSE, NULL,
+ &value);
}
static void
Modified: dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ClientInfoIQHandler.java
===================================================================
--- dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ClientInfoIQHandler.java 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/openfire/src/plugins/hippo/src/java/com/dumbhippo/jive/ClientInfoIQHandler.java 2007-12-03 05:56:36 UTC (rev 6944)
@@ -12,6 +12,7 @@
import com.dumbhippo.jive.annotations.IQMethod;
import com.dumbhippo.server.AccountSystem;
import com.dumbhippo.server.Configuration;
+import com.dumbhippo.server.HippoProperty;
import com.dumbhippo.server.NotFoundException;
import com.dumbhippo.server.downloads.Download;
import com.dumbhippo.server.downloads.DownloadConfiguration;
@@ -88,6 +89,8 @@
Document document = DocumentFactory.getInstance().createDocument();
Element childElement = document.addElement("clientInfo", CLIENT_INFO_NAMESPACE);
+ childElement.addAttribute("ddmProtocolVersion", config.getPropertyFatalIfUnset(HippoProperty.DDM_PROTOCOL_VERSION));
+
childElement.addAttribute("minimum", platform.getMinimum());
childElement.addAttribute("current", platform.getVersion());
Modified: dumbhippo/trunk/server/src/com/dumbhippo/server/HippoProperty.java
===================================================================
--- dumbhippo/trunk/server/src/com/dumbhippo/server/HippoProperty.java 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/server/src/com/dumbhippo/server/HippoProperty.java 2007-12-03 05:56:36 UTC (rev 6944)
@@ -41,7 +41,8 @@
FACEBOOK_API_KEY("dumbhippo.server.facebook.apikey", null),
FACEBOOK_SECRET("dumbhippo.server.facebook.secret", null),
BIND_HOST("dumbhippo.server.bind.host", null),
- GOOGLE_ANALYTICS_KEY("dumbhippo.server.googleanalytics.key", "");
+ GOOGLE_ANALYTICS_KEY("dumbhippo.server.googleanalytics.key", ""),
+ DDM_PROTOCOL_VERSION("dumbhippo.server.ddmProtocolVersion", null);
private String key;
private String def;
Modified: dumbhippo/trunk/super/base.conf
===================================================================
--- dumbhippo/trunk/super/base.conf 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/super/base.conf 2007-12-03 05:56:36 UTC (rev 6944)
@@ -52,6 +52,8 @@
<parameter name="webVersion">3</parameter>
+ <parameter name="ddmProtocolVersion">0</parameter>
+
<!-- Whether to force on the Alpha PNG hack even for IE >= 7 -->
<parameter name="forceIEAlphaImage">false</parameter>
Modified: dumbhippo/trunk/super/jboss/files/deploy/properties-service.xml
===================================================================
--- dumbhippo/trunk/super/jboss/files/deploy/properties-service.xml 2007-12-01 00:26:41 UTC (rev 6943)
+++ dumbhippo/trunk/super/jboss/files/deploy/properties-service.xml 2007-12-03 05:56:36 UTC (rev 6944)
@@ -29,6 +29,7 @@
dumbhippo.server.adminjid.mugshot=@@adminJid:properties@@
dumbhippo.server.adminjid.gnome=@@adminJidGnome:properties@@
dumbhippo.server.web.version=@@webVersion:properties@@
+ dumbhippo.server.ddmProtocolVersion=@@ddmProtocolVersion:properties@@
dumbhippo.server.web.ie.forcealphaimage=@@forceIEAlphaImage:properties@@
dumbhippo.server.appinfo.dir=@@appinfoDir:properties@@
dumbhippo.server.crashdump.dir=@@crashdumpDir:properties@@
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]