|
From: <br...@us...> - 2008-10-25 07:06:43
|
Revision: 3749
http://openvrml.svn.sourceforge.net/openvrml/?rev=3749&view=rev
Author: braden
Date: 2008-10-25 07:06:37 +0000 (Sat, 25 Oct 2008)
Log Message:
-----------
Ensure the XEmbed control host identifier is consistently treated as a 64-bit type.
Modified Paths:
--------------
trunk/ChangeLog
trunk/mozilla-plugin/src/Makefile.am
trunk/mozilla-plugin/src/openvrml.cpp
trunk/src/Makefile.am
trunk/src/openvrml-player/curlbrowserhost.cpp
Property Changed:
----------------
trunk/
trunk/src/libopenvrml/openvrml/bad_url.cpp
trunk/src/libopenvrml/openvrml/scene.cpp
trunk/src/libopenvrml/openvrml/scene.h
trunk/src/libopenvrml/openvrml/script.cpp
Property changes on: trunk
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
+ /branches/0.17:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748
/branches/local:3677-3689
/branches/node-modules:3622-3623,3632-3635,3637-3638,3640-3641,3643-3644,3646-3647,3649-3650,3654-3655,3657-3658,3661-3662,3664-3665,3667-3668,3670-3671,3673-3674,3684-3685,3687-3688
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2008-10-25 06:59:43 UTC (rev 3748)
+++ trunk/ChangeLog 2008-10-25 07:06:37 UTC (rev 3749)
@@ -1,5 +1,37 @@
2008-10-25 Braden McDaniel <br...@en...>
+ Ensure the XEmbed control host identifier is consistently treated
+ as a 64-bit type.
+
+ * mozilla-plugin/src/Makefile.am: Generate client code for
+ org.openvrml.Browser and org.openvrml.BrowserFactory.
+ * mozilla-plugin/src/openvrml.cpp
+ (get_browser(DBusGConnection *, const char *, const char *,
+ guint64, GError **)): Use the generated function
+ org_openvrml_BrowserFactory_create_control.
+ (plugin_instance::new_stream(NPMIMEType, NPStream *)): Use the
+ generated function org_openvrml_Browser_new_stream.
+ (plugin_instance::destroy_stream(NPStream *)): Cast the stream
+ identifier to guint64.
+ (plugin_instance::write(NPStream *, int32, void *)): Cast the
+ stream identifier to guint64.
+ * src/Makefile.am: Generate client code for org.openvrml.Browser
+ and org.openvrml.BrowserFactory.
+ * src/openvrml-player/curlbrowserhost.cpp
+ (openvrml_player_curl_browser_host_realize(GtkWidget *)): Use the
+ generated function org_openvrml_Browser_get_id.
+ (openvrml_player_curl_browser_host_curl_source_callback(gpointer)):
+ Cast the stream identifier to guint64.
+ (openvrml_player_curl_browser_host_curl_write(void *, size_t,
+ size_t, void *)): Use the generated function
+ org_openvrml_Browser_new_stream; cast the stream identifier to
+ guint64.
+ (get_browser(DBusGConnection *, const char *, const char *,
+ guint64, GError **)): Use the generated function
+ org_openvrml_BrowserFactory_create_control.
+
+2008-10-25 Braden McDaniel <br...@en...>
+
Fixed signature of openvrml_xembed_browser_factory_create_control
to use guint64 for the host_id.
Modified: trunk/mozilla-plugin/src/Makefile.am
===================================================================
--- trunk/mozilla-plugin/src/Makefile.am 2008-10-25 06:59:43 UTC (rev 3748)
+++ trunk/mozilla-plugin/src/Makefile.am 2008-10-25 07:06:37 UTC (rev 3749)
@@ -7,7 +7,10 @@
if ENABLE_MOZILLA_PLUGIN
mozplugins_LTLIBRARIES = openvrml.la
-BUILT_SOURCES = browser-host-server-glue.h
+BUILT_SOURCES = \
+ browser-host-server-glue.h \
+ browser-factory-client-glue.h \
+ browser-client-glue.h
endif
openvrml_la_SOURCES = openvrml.cpp
@@ -23,6 +26,18 @@
--output=$@ \
$?
+browser-factory-client-glue.h: $(top_srcdir)/../src/openvrml-xembed/browser-factory.xml
+ $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) \
+ --mode=glib-client \
+ --output=$@ \
+ $?
+
+browser-client-glue.h: $(top_srcdir)/../src/openvrml-xembed/browser.xml
+ $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) \
+ --mode=glib-client \
+ --output=$@ \
+ $?
+
EXTRA_DIST = $(openvrml_la_SOURCES)
CLEANFILES = $(BUILT_SOURCES)
Modified: trunk/mozilla-plugin/src/openvrml.cpp
===================================================================
--- trunk/mozilla-plugin/src/openvrml.cpp 2008-10-25 06:59:43 UTC (rev 3748)
+++ trunk/mozilla-plugin/src/openvrml.cpp 2008-10-25 07:06:37 UTC (rev 3749)
@@ -70,6 +70,8 @@
G_END_DECLS
# include "browser-host-server-glue.h"
+# include "browser-factory-client-glue.h"
+# include "browser-client-glue.h"
using namespace boost::multi_index::detail; // for scope_guard
@@ -135,7 +137,7 @@
void openvrml_np_browser_host_init(OpenvrmlNpBrowserHost * const host)
{
- static size_t count = 0;
+ static unsigned long count = 0;
host->path = g_strdup_printf("/org/openvrml/BrowserHost/%u/%lu",
getpid(), count++);
dbus_g_connection_register_g_object(
@@ -1170,16 +1172,13 @@
boost::ignore_unused_variable_warning(browser_factory_guard);
char * browser_path = 0;
- if (!dbus_g_proxy_call(browser_factory,
- "CreateControl",
- error,
- G_TYPE_STRING, host_name,
- DBUS_TYPE_G_OBJECT_PATH, host_path,
- G_TYPE_UINT64, host_id,
- G_TYPE_BOOLEAN, true,
- G_TYPE_INVALID,
- DBUS_TYPE_G_OBJECT_PATH, &browser_path,
- G_TYPE_INVALID)) {
+ if (!org_openvrml_BrowserFactory_create_control(browser_factory,
+ host_name,
+ host_path,
+ host_id,
+ true,
+ &browser_path,
+ error)) {
return 0;
}
@@ -1235,14 +1234,11 @@
GError * error = 0;
scope_guard error_guard = make_guard(g_error_free, boost::ref(error));
- gboolean result = dbus_g_proxy_call(this->browser,
- "NewStream",
- &error,
- G_TYPE_UINT64, stream,
- G_TYPE_STRING, type,
- G_TYPE_STRING, stream->url,
- G_TYPE_INVALID,
- G_TYPE_INVALID);
+ gboolean result = org_openvrml_Browser_new_stream(this->browser,
+ guint64(stream),
+ type,
+ stream->url,
+ &error);
if (!result) {
g_critical("Call to org.openvrml.Browser.NewStream failed: %s",
error->message);
@@ -1258,7 +1254,7 @@
dbus_g_proxy_call_no_reply(this->browser,
"DestroyStream",
- G_TYPE_UINT64, stream,
+ G_TYPE_UINT64, guint64(stream),
G_TYPE_INVALID);
return NPERR_NO_ERROR;
}
@@ -1275,7 +1271,7 @@
dbus_g_proxy_call_no_reply(this->browser,
"Write",
- G_TYPE_UINT64, stream,
+ G_TYPE_UINT64, guint64(stream),
DBUS_TYPE_G_UCHAR_ARRAY, &array,
G_TYPE_INVALID);
return len;
Modified: trunk/src/Makefile.am
===================================================================
--- trunk/src/Makefile.am 2008-10-25 06:59:43 UTC (rev 3748)
+++ trunk/src/Makefile.am 2008-10-25 07:06:37 UTC (rev 3749)
@@ -713,7 +713,9 @@
if ENABLE_PLAYER
bin_PROGRAMS = openvrml-player/openvrml-player
BUILT_SOURCES += \
- openvrml-player/browser-host-server-glue.h
+ openvrml-player/browser-host-server-glue.h \
+ openvrml-player/browser-factory-client-glue.h \
+ openvrml-player/browser-client-glue.h
endif
openvrml_player_openvrml_player_CPPFLAGS = \
@@ -751,6 +753,18 @@
--output=$@ \
$?
+openvrml-player/browser-factory-client-glue.h: $(srcdir)/openvrml-xembed/browser-factory.xml
+ $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) \
+ --mode=glib-client \
+ --output=$@ \
+ $?
+
+openvrml-player/browser-client-glue.h: $(srcdir)/openvrml-xembed/browser.xml
+ $(LIBTOOL) --mode=execute $(DBUS_BINDING_TOOL) \
+ --mode=glib-client \
+ --output=$@ \
+ $?
+
EXTRA_DIST = \
libopenvrml/openvrml-config.h.in \
libopenvrml-gl/openvrml-gl-config.h.in \
Property changes on: trunk/src/libopenvrml/openvrml/bad_url.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746
+ /branches/0.17/src/libopenvrml/openvrml/bad_url.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748
Property changes on: trunk/src/libopenvrml/openvrml/scene.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746
+ /branches/0.17/src/libopenvrml/openvrml/scene.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748
Property changes on: trunk/src/libopenvrml/openvrml/scene.h
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746
+ /branches/0.17/src/libopenvrml/openvrml/scene.h:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748
Property changes on: trunk/src/libopenvrml/openvrml/script.cpp
___________________________________________________________________
Modified: svn:mergeinfo
- /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746
+ /branches/0.17/src/libopenvrml/openvrml/script.cpp:3713,3717,3719,3721,3725,3730,3732,3743,3746,3748
Modified: trunk/src/openvrml-player/curlbrowserhost.cpp
===================================================================
--- trunk/src/openvrml-player/curlbrowserhost.cpp 2008-10-25 06:59:43 UTC (rev 3748)
+++ trunk/src/openvrml-player/curlbrowserhost.cpp 2008-10-25 07:06:37 UTC (rev 3749)
@@ -21,6 +21,8 @@
# include <curl/curl.h>
# include <libgnomevfs/gnome-vfs.h>
# include <browser-host-server-glue.h>
+# include <browser-factory-client-glue.h>
+# include <browser-client-glue.h>
# include <dbus/dbus-glib-bindings.h>
# include <dbus/dbus-protocol.h>
# include <boost/concept_check.hpp>
@@ -90,7 +92,7 @@
browser_host->priv =
OPENVRML_PLAYER_CURL_BROWSER_HOST_GET_PRIVATE(browser_host);
- static size_t count = 0;
+ static unsigned long count = 0;
browser_host->priv->path =
g_strdup_printf("/org/openvrml/BrowserHost/%u/%lu",
getpid(), count++);
@@ -255,12 +257,8 @@
}
guint64 plug_id = 0;
- if (!dbus_g_proxy_call(browser_host->priv->browser,
- "GetId",
- &error,
- G_TYPE_INVALID,
- G_TYPE_UINT64, &plug_id,
- G_TYPE_INVALID)) {
+ if (!org_openvrml_Browser_get_id(browser_host->priv->browser, &plug_id,
+ &error)) {
g_critical("Call to org.openvrml.Browser.GetId failed: %s",
error->message);
return;
@@ -726,7 +724,7 @@
dbus_g_proxy_call_no_reply(
browser_host->priv->browser,
"DestroyStream",
- G_TYPE_UINT64, msg->easy_handle,
+ G_TYPE_UINT64, guint64(msg->easy_handle),
G_TYPE_INVALID);
}
@@ -795,15 +793,12 @@
GError * error = 0;
scope_guard error_guard = make_guard(g_error_free, boost::ref(error));
gboolean new_stream_result =
- dbus_g_proxy_call(
+ org_openvrml_Browser_new_stream(
stream_data.browser(),
- "NewStream",
- &error,
- G_TYPE_UINT64, stream_data.handle(),
- G_TYPE_STRING, (type ? type : "application/octet-stream"),
- G_TYPE_STRING, stream_data.url(),
- G_TYPE_INVALID,
- G_TYPE_INVALID);
+ guint64(stream_data.handle()),
+ (type ? type : "application/octet-stream"),
+ stream_data.url(),
+ &error);
if (!new_stream_result) {
g_critical("Call to org.openvrml.Browser.NewStream failed: %s",
error->message);
@@ -832,7 +827,7 @@
dbus_g_proxy_call_no_reply(stream_data.browser(),
"Write",
- G_TYPE_UINT64, stream_data.handle(),
+ G_TYPE_UINT64, guint64(stream_data.handle()),
DBUS_TYPE_G_UCHAR_ARRAY, &array,
G_TYPE_INVALID);
g_assert(size == 1);
@@ -863,16 +858,14 @@
boost::ignore_unused_variable_warning(browser_factory_guard);
char * browser_path = 0;
- if (!dbus_g_proxy_call(browser_factory,
- "CreateControl",
- error,
- G_TYPE_STRING, host_name,
- DBUS_TYPE_G_OBJECT_PATH, host_path,
- G_TYPE_UINT64, host_id,
- G_TYPE_BOOLEAN, false,
- G_TYPE_INVALID,
- DBUS_TYPE_G_OBJECT_PATH, &browser_path,
- G_TYPE_INVALID)) {
+ if (!org_openvrml_BrowserFactory_create_control(
+ browser_factory,
+ host_name,
+ host_path,
+ host_id,
+ false,
+ &browser_path,
+ error)) {
return 0;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|