gnash-commit
[Top][All Lists]
Advanced

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

[Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-


From: Benjamin Wolsey
Subject: [Gnash-commit] [SCM] Gnash branch, master, updated. release_0_8_9_final-304-g5f9b8e5
Date: Thu, 21 Apr 2011 11:52:46 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, master has been updated
       via  5f9b8e50df621afc46001425a2b89bee415b3615 (commit)
       via  205b13bdbc9fe50ce13b0d9c947efda5e2010380 (commit)
      from  815855bc09fc2ddadf70b60a79b0a877da043560 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=5f9b8e50df621afc46001425a2b89bee415b3615


commit 5f9b8e50df621afc46001425a2b89bee415b3615
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Apr 14 09:26:06 2011 +0200

    Use AsBroadcaster.

diff --git a/libcore/asobj/flash/net/FileReference_as.cpp 
b/libcore/asobj/flash/net/FileReference_as.cpp
index fbe7860..b1ddcee 100644
--- a/libcore/asobj/flash/net/FileReference_as.cpp
+++ b/libcore/asobj/flash/net/FileReference_as.cpp
@@ -20,15 +20,17 @@
 
 
 #include "FileReference_as.h"
-#include "as_object.h" // for inheritance
+
+#include <sstream>
+
+#include "as_object.h" 
 #include "log.h"
 #include "fn_call.h"
 #include "Global_as.h"
+#include "NativeFunction.h"
 #include "as_function.h" 
-#include "GnashException.h" // for ActionException
 #include "VM.h"
-
-#include <sstream>
+#include "AsBroadcaster.h"
 
 namespace gnash {
 
@@ -53,8 +55,20 @@ namespace {
 void
 filereference_class_init(as_object& where, const ObjectURI& uri)
 {
-    registerBuiltinClass(where, filereference_ctor,
-            attachFileReferenceInterface, 0, uri);
+       // This is going to be the where Number "class"/"function"
+    Global_as& gl = getGlobal(where);
+
+    as_object* proto = createObject(gl);;
+
+    as_object* cl = gl.createClass(&filereference_ctor, proto);
+    attachFileReferenceInterface(*proto);
+  
+       AsBroadcaster::initialize(*proto);
+
+    as_object* null = 0;
+    callMethod(&gl, NSV::PROP_AS_SET_PROP_FLAGS, proto, null, 3);
+
+       where.init_member(uri, cl, as_object::DefaultFlags); 
 }
 
 namespace {
@@ -64,11 +78,9 @@ attachFileReferenceInterface(as_object& o)
 {
     Global_as& gl = getGlobal(o);
     
-    o.init_member("addListener", gl.createFunction(filereference_addListener));
     o.init_member("browse", gl.createFunction(filereference_browse));
     o.init_member("cancel", gl.createFunction(filereference_cancel));
     o.init_member("download", gl.createFunction(filereference_download));
-    o.init_member("removeListener", 
gl.createFunction(filereference_removeListener));
     o.init_member("upload", gl.createFunction(filereference_upload));
     o.init_property("creationDate", filereference_creationDate, 
filereference_creationDate);
     o.init_property("creator", filereference_creator, filereference_creator);
@@ -79,12 +91,6 @@ attachFileReferenceInterface(as_object& o)
 }
 
 as_value
-filereference_addListener(const fn_call& /*fn*/)
-{
-    return as_value();
-}
-
-as_value
 filereference_browse(const fn_call& /*fn*/)
 {
     return as_value();
@@ -103,12 +109,6 @@ filereference_download(const fn_call& /*fn*/)
 }
 
 as_value
-filereference_removeListener(const fn_call& /*fn*/)
-{
-    return as_value();
-}
-
-as_value
 filereference_upload(const fn_call& /*fn*/)
 {
     return as_value();
@@ -150,7 +150,6 @@ filereference_type(const fn_call& /*fn*/)
     return as_value();
 }
 
-
 as_value
 filereference_ctor(const fn_call& fn)
 {

http://git.savannah.gnu.org/cgit//commit/?id=205b13bdbc9fe50ce13b0d9c947efda5e2010380


commit 205b13bdbc9fe50ce13b0d9c947efda5e2010380
Author: Benjamin Wolsey <address@hidden>
Date:   Thu Apr 14 09:09:58 2011 +0200

    Clean up FileReference code.

diff --git a/libcore/asobj/flash/net/FileReference_as.cpp 
b/libcore/asobj/flash/net/FileReference_as.cpp
index 9fbc26a..fbe7860 100644
--- a/libcore/asobj/flash/net/FileReference_as.cpp
+++ b/libcore/asobj/flash/net/FileReference_as.cpp
@@ -32,29 +32,38 @@
 
 namespace gnash {
 
-static as_value filereference_addListener(const fn_call& fn);
-static as_value filereference_browse(const fn_call& fn);
-static as_value filereference_cancel(const fn_call& fn);
-static as_value filereference_download(const fn_call& fn);
-static as_value filereference_removeListener(const fn_call& fn);
-static as_value filereference_upload(const fn_call& fn);
-static as_value filereference_creationDate(const fn_call& fn);
-static as_value filereference_creator(const fn_call& fn);
-static as_value filereference_modificationDate(const fn_call& fn);
-static as_value filereference_name(const fn_call& fn);
-static as_value filereference_size(const fn_call& fn);
-static as_value filereference_type(const fn_call& fn);
-as_value filereference_ctor(const fn_call& fn);
-
-void attachFileReferenceStaticInterface(as_object& /*o*/)
-{
+namespace {
+    as_value filereference_addListener(const fn_call& fn);
+    as_value filereference_browse(const fn_call& fn);
+    as_value filereference_cancel(const fn_call& fn);
+    as_value filereference_download(const fn_call& fn);
+    as_value filereference_removeListener(const fn_call& fn);
+    as_value filereference_upload(const fn_call& fn);
+    as_value filereference_creationDate(const fn_call& fn);
+    as_value filereference_creator(const fn_call& fn);
+    as_value filereference_modificationDate(const fn_call& fn);
+    as_value filereference_name(const fn_call& fn);
+    as_value filereference_size(const fn_call& fn);
+    as_value filereference_type(const fn_call& fn);
+    as_value filereference_ctor(const fn_call& fn);
+    void attachFileReferenceInterface(as_object& o);
+}
 
+// extern 
+void
+filereference_class_init(as_object& where, const ObjectURI& uri)
+{
+    registerBuiltinClass(where, filereference_ctor,
+            attachFileReferenceInterface, 0, uri);
 }
 
-static void
+namespace {
+
+void
 attachFileReferenceInterface(as_object& o)
 {
     Global_as& gl = getGlobal(o);
+    
     o.init_member("addListener", gl.createFunction(filereference_addListener));
     o.init_member("browse", gl.createFunction(filereference_browse));
     o.init_member("cancel", gl.createFunction(filereference_cancel));
@@ -69,80 +78,79 @@ attachFileReferenceInterface(as_object& o)
     o.init_property("type", filereference_type, filereference_type);
 }
 
-static as_value
+as_value
 filereference_addListener(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_browse(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_cancel(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_download(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_removeListener(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_upload(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_creationDate(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_creator(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_modificationDate(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_name(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_size(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
-static as_value
+as_value
 filereference_type(const fn_call& /*fn*/)
 {
     return as_value();
 }
 
 
-
 as_value
 filereference_ctor(const fn_call& fn)
 {
@@ -154,17 +162,8 @@ filereference_ctor(const fn_call& fn)
                 _("arguments discarded"))
         );
     }
-
     return as_value();
 }
 
-// extern 
-void
-filereference_class_init(as_object& where, const ObjectURI& uri)
-{
-    registerBuiltinClass(where, filereference_ctor,
-            attachFileReferenceInterface, 
-            attachFileReferenceStaticInterface, uri);
-}
-
-} // end of gnash namespace
+} // unnamed namespace
+} // gnash namespace

-----------------------------------------------------------------------

Summary of changes:
 libcore/asobj/flash/net/FileReference_as.cpp |  112 +++++++++++++-------------
 1 files changed, 55 insertions(+), 57 deletions(-)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]