[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gnash-commit] /srv/bzr/gnash/rtmp r9926: find the properties of objects
From: |
rob |
Subject: |
[Gnash-commit] /srv/bzr/gnash/rtmp r9926: find the properties of objects in the message. |
Date: |
Sun, 28 Dec 2008 16:53:10 -0700 |
User-agent: |
Bazaar (1.5) |
------------------------------------------------------------
revno: 9926
committer: address@hidden
branch nick: rtmp
timestamp: Sun 2008-12-28 16:53:10 -0700
message:
find the properties of objects in the message.
modified:
libnet/rtmp_msg.cpp
libnet/rtmp_msg.h
=== modified file 'libnet/rtmp_msg.cpp'
--- a/libnet/rtmp_msg.cpp 2008-12-28 01:47:36 +0000
+++ b/libnet/rtmp_msg.cpp 2008-12-28 23:53:10 +0000
@@ -262,6 +262,31 @@
return el;
};
+/// \brief Find the named property for this Object.
+///
+/// @param name An ASCII string that is the name of the property to
+/// search for.
+///
+/// @return A smart pointer to the Element for this property.
+boost::shared_ptr<amf::Element>
+RTMPMsg::findProperty(const std::string &name)
+{
+ if (_amfobjs.size() > 0) {
+ vector<boost::shared_ptr<Element> >::iterator ait;
+// cerr << "# of Properties in object: " << _properties.size() << endl;
+ for (ait = _amfobjs.begin(); ait != _amfobjs.end(); ait++) {
+ boost::shared_ptr<amf::Element> el = (*(ait));
+ boost::shared_ptr<amf::Element> prop = el->findProperty(name);
+ if (prop) {
+ return prop;
+ }
+ }
+ }
+ boost::shared_ptr<Element> el;
+ return el;
+}
+
+
void
RTMPMsg::dump()
{
=== modified file 'libnet/rtmp_msg.h'
--- a/libnet/rtmp_msg.h 2008-12-20 17:11:55 +0000
+++ b/libnet/rtmp_msg.h 2008-12-28 23:53:10 +0000
@@ -108,7 +108,15 @@
boost::shared_ptr<amf::Element> operator[](size_t x);
- // Dump internal status to the terminal
+ /// \brief Find the named property for this Object.
+ ///
+ /// @param name An ASCII string that is the name of the property to
+ /// search for.
+ ///
+ /// @return A smart pointer to the Element for this property.
+ boost::shared_ptr<amf::Element> findProperty(const std::string &name);
+
+// Dump internal status to the terminal
void dump();
protected:
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gnash-commit] /srv/bzr/gnash/rtmp r9926: find the properties of objects in the message.,
rob <=