[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r10044: add supported for the unsuppo
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r10044: add supported for the unsupported data type |
Date: |
Wed, 25 Mar 2009 17:02:43 -0600 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 10044
committer: address@hidden
branch nick: rtmp
timestamp: Wed 2009-03-25 17:02:43 -0600
message:
add supported for the unsupported data type
modified:
libcore/as_value.cpp
libcore/as_value.h
=== modified file 'libcore/as_value.cpp'
--- a/libcore/as_value.cpp 2009-03-25 22:32:38 +0000
+++ b/libcore/as_value.cpp 2009-03-25 23:02:43 +0000
@@ -1147,6 +1147,13 @@
}
void
+as_value::set_unsupported()
+{
+ m_type = UNSUPPORTED;
+ _value = boost::blank();
+}
+
+void
as_value::set_as_object(as_object* obj)
{
if ( ! obj )
@@ -1912,7 +1919,15 @@
#ifdef GNASH_DEBUG_AMF_DESERIALIZE
log_debug("as_value(Element&) : AMF type STRING");
#endif
- std::string str = el.to_string();
+ std::string str;
+ // If there is data, convert it to a string for the as_value
+ if (el.getDataSize() != 0) {
+ str = el.to_string();
+ // Element's store the property name as the name, not as data.
+ } else if (el.getNameSize() != 0) {
+ str = el.getName();
+ }
+
set_string(str);
break;
}
@@ -1997,10 +2012,15 @@
//if (swfVersion > 5) m_type = STRING;
break;
}
-
+
case amf::Element::UNSUPPORTED_AMF0:
- log_unimpl("Unsupported data type is not supported yet");
- break;
+ {
+#ifdef GNASH_DEBUG_AMF_DESERIALIZE
+ log_debug("as_value(Element&) : AMF type UNSUPPORTED");
+#endif
+ set_unsupported();
+ break;
+ }
case amf::Element::RECORD_SET_AMF0:
log_unimpl("Record Set data type is not supported yet");
break;
=== modified file 'libcore/as_value.h'
--- a/libcore/as_value.h 2009-03-20 00:00:54 +0000
+++ b/libcore/as_value.h 2009-03-25 23:02:43 +0000
@@ -119,6 +119,10 @@
NULLTYPE,
NULLTYPE_EXCEPT,
+ /// NULL value
+ UNSUPPORTED,
+ UNSUPPORTED_EXCEPT,
+
/// Boolean value
BOOLEAN,
BOOLEAN_EXCEPT,
@@ -566,6 +570,9 @@
/// Set this value to the NULL value
void set_null();
+ /// Set this value to the Unsupported value
+ void set_unsupported();
+
/// Equality operator, follows strict equality semantic
//
/// See strictly_equals
@@ -591,11 +598,14 @@
bool is_bool() const { return (m_type == BOOLEAN); }
- bool is_exception() const
+ bool is_unsupported() const { return (m_type == UNSUPPORTED); }
+
+ bool is_exception() const
{ return (m_type == UNDEFINED_EXCEPT || m_type == NULLTYPE_EXCEPT
|| m_type == BOOLEAN_EXCEPT || m_type == NUMBER_EXCEPT
|| m_type == OBJECT_EXCEPT || m_type == AS_FUNCTION_EXCEPT
- || m_type == MOVIECLIP_EXCEPT || m_type == STRING_EXCEPT);
+ || m_type == MOVIECLIP_EXCEPT || m_type == STRING_EXCEPT
+ || m_type == UNSUPPORTED_EXCEPT);
}
// Flag or unflag an as_value as an exception -- this gets flagged
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r10044: add supported for the unsupported data type,
rob <=