? ASOBJSTRING.PATCH
? Array-Debug.diff
? BROKEN
? CachingStream.patch
? CachingStream2.patch
? ChangeLog.gen
? ERR
? FillStyleVariant.diff
? P
? PPP
? PropsExporter.cpp
? TODO.STRK
? TextField-pollVariableName.diff
? TextFieldVars-customToAsObject.diff
? arrayTest.as
? as_environment-staticStack.diff
? libltdl
? movie_root.ConstructLiveChars.PATCH
? out.swf
? out.swf.frame0.pp
? patch
? pipe-switch.patch
? queueLoadMovie.patch
? streamCache.patch
? cygnal/testsuite/Makefile.in
? cygnal/testsuite/cygnal.all/Makefile.in
? gui/P
? gui/klash.moc.in
? libbase/ChangeLog
? libbase/png.cpp
? libbase/png.h
? plugin/PP
? pythonmodule/Makefile.in
? server/edit_text_character.cpp-noTextFieldVars
? server/edit_text_character.h-noTextFieldVars
? server/sprite_instance.cpp-noTextFieldVars
? server/sprite_instance.h-noTextFieldVars
? server/asobj/DIFF
? server/asobj/System.Capabilities.txt
? testsuite/actionscript.all/.rtmp.as.swp
? testsuite/actionscript.all/ASnative.as
? testsuite/media/RMS.flv
? testsuite/misc-ming.all/isMaskTest.as
? testsuite/movies.all/gravity-embedded.flm
Index: gui/Player.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.cpp,v
retrieving revision 1.75
diff -U 2 -r1.75 Player.cpp
--- gui/Player.cpp	28 Dec 2007 19:35:14 -0000	1.75
+++ gui/Player.cpp	14 Jan 2008 17:05:57 -0000
@@ -88,4 +88,5 @@
 	,_fpsDebugTime(0.0)
 #endif
+	,_hostfd(-1)
 {
 	init();
@@ -357,4 +358,8 @@
     movie_root& root = VM::init(*_movie_def, clock).getRoot();
 
+    // Set host requests fd (if any)
+    if ( _hostfd != -1 ) root.setHostFD(_hostfd);
+
+
     _gui->setStage(&root);
 
Index: gui/Player.h
===================================================================
RCS file: /sources/gnash/gnash/gui/Player.h,v
retrieving revision 1.20
diff -U 2 -r1.20 Player.h
--- gui/Player.h	7 Jan 2008 16:23:01 -0000	1.20
+++ gui/Player.h	14 Jan 2008 17:05:57 -0000
@@ -135,4 +135,9 @@
 		params[name] = value;
 	}
+
+	void setHostFD(int fd)
+	{
+		_hostfd = fd;
+	}
 	
 private:
@@ -205,4 +210,7 @@
 #endif
 
+	// Filedescriptor to use for host application requests, -1 if none
+	int _hostfd;
+
 };
 
Index: gui/gnash.cpp
===================================================================
RCS file: /sources/gnash/gnash/gui/gnash.cpp,v
retrieving revision 1.97
diff -U 2 -r1.97 gnash.cpp
--- gui/gnash.cpp	7 Jan 2008 16:23:01 -0000	1.97
+++ gui/gnash.cpp	14 Jan 2008 17:05:57 -0000
@@ -111,4 +111,7 @@
         "  -m <bias>     Specify the texture LOD bias (float, default is -1.0)\n"
         "  -x <ID>       X11 Window ID for display\n"
+        "  -v            Produce verbose output\n"
+        "  -vp           Be (very) verbose about parsing\n"
+        "  -va           Be (very) verbose about action execution\n"
         "  -w            Produce the disk based debug log\n"
 	"  -j <width >   Set window width\n"
@@ -215,5 +218,5 @@
     }
     
-    while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:")) != -1)
+    while ((c = getopt (argc, argv, "hvaps:cd:x:r:t:b:1wj:k:u:P:U:gVf:F:")) != -1)
     {
 	switch (c) {
@@ -266,4 +269,7 @@
 	      log_msg (_("Setting base URL to %s"), optarg);
 	      break;
+	  case 'F':
+              player.setHostFD ( strtol(optarg, NULL, 0) );
+	      break;
           case 'j':
               width_given = true;
Index: server/movie_root.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.cpp,v
retrieving revision 1.149
diff -U 2 -r1.149 movie_root.cpp
--- server/movie_root.cpp	10 Jan 2008 17:34:45 -0000	1.149
+++ server/movie_root.cpp	14 Jan 2008 17:05:58 -0000
@@ -92,5 +92,6 @@
 	_invalidated(true),
 	_disableScripts(false),
-	_processingActionLevel(movie_root::apSIZE)
+	_processingActionLevel(movie_root::apSIZE),
+    _hostfd(-1)
 {
 }
Index: server/movie_root.h
===================================================================
RCS file: /sources/gnash/gnash/server/movie_root.h,v
retrieving revision 1.103
diff -U 2 -r1.103 movie_root.h
--- server/movie_root.h	10 Jan 2008 17:34:45 -0000	1.103
+++ server/movie_root.h	14 Jan 2008 17:05:58 -0000
@@ -630,4 +630,22 @@
     void loadMovie(const URL& url, const std::string& target, LoadMethod method=NONE);
 
+
+    /// Set a filedescriptor to use for host application requests
+    /// (for browser communication mostly)
+    void setHostFD(int fd)
+    {
+        assert(fd > 0);
+        _hostfd = fd;
+    }
+
+    /// Get the filedescriptor to use for host application requests
+    /// (for browser communication mostly)
+    ///
+    /// @return -1 if no filedescriptor is provided by host app.
+    int getHostFD()
+    {
+        return _hostfd;
+    }
+
 private:
 
@@ -906,4 +924,9 @@
     const character* findDropTarget(float x, float y, character* dragging) const;
 
+    /// filedescriptor to write to for host application requests
+    //
+    /// -1 if none
+    ///
+    int _hostfd;
 };
 
Index: server/vm/ASHandlers.cpp
===================================================================
RCS file: /sources/gnash/gnash/server/vm/ASHandlers.cpp,v
retrieving revision 1.179
diff -U 2 -r1.179 ASHandlers.cpp
--- server/vm/ASHandlers.cpp	11 Jan 2008 16:06:54 -0000	1.179
+++ server/vm/ASHandlers.cpp	14 Jan 2008 17:05:59 -0000
@@ -57,4 +57,5 @@
 #include <utility> // for std::pair
 #include <locale.h>
+#include <cerrno>
 #include <boost/scoped_array.hpp>
 #include <boost/random.hpp>
@@ -2265,10 +2266,29 @@
 	}
 
-	gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
-	string command  = rcfile.getURLOpenerFormat();
-	boost::replace_all(command, "%u", url.str());
+    int hostfd = VM::get().getRoot().getHostFD();
+    if ( hostfd == -1 )
+    {
+            gnash::RcInitFile& rcfile = gnash::RcInitFile::getDefaultInstance();
+            string command  = rcfile.getURLOpenerFormat();
+            boost::replace_all(command, "%u", url.str());
 
-	log_msg (_("Launching URL... %s"), command.c_str());
-	system(command.c_str());
+            log_msg (_("Launching URL... %s"), command.c_str());
+            system(command.c_str());
+    }
+    else
+    {
+        log_debug("user-provided host requests fd is %d", hostfd);
+        std::stringstream request;
+        request << "GET " << url << " " << target_string << endl;
+        string requestString = request.str();
+        const char* cmd = requestString.c_str();
+        size_t len = requestString.length();
+        // TODO: should mutex-protect this ?
+        int ret = write(hostfd, cmd, len);
+        if ( ret == -1 )
+        {
+            log_error("Could not write to user-provided host requests fd %d: %s", hostfd, strerror(errno));
+        }
+    }
 
 }
