• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • Examples
  • File List
  • File Members

gateway.h

Go to the documentation of this file.
00001 // Red5 server side support for the echo_test via HTTP
00002 // 
00003 //   Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef _GATEWAY_H_
00020 #define _GATEWAY_H_
00021 
00022 #include <string>
00023 #include <vector>
00024 #include <boost/shared_ptr.hpp>
00025 #include <boost/shared_array.hpp>
00026 #include <boost/scoped_array.hpp>
00027 #include <sstream>
00028 
00029 #include "amf.h"
00030 #include "buffer.h"
00031 #include "element.h"
00032 #include "rtmp.h"
00033 
00034 #include "http.h"
00035 
00036 namespace cygnal
00037 {
00038   
00039 class GatewayTest : public gnash::HTTP
00040 {
00041 public:
00042     GatewayTest ();
00043     ~GatewayTest ();
00044 
00045     // Parse an Echo Request message coming from the Red5 echo_test.
00046     std::vector<boost::shared_ptr<amf::Element > > parseEchoRequest(amf::Buffer &buf)
00047         { return parseEchoRequest(buf.reference(), buf.size()); };
00048     std::vector<boost::shared_ptr<amf::Element > > parseEchoRequest(boost::uint8_t *buf, size_t size);
00049 
00050     // format a response to the 'echo' test used for testing Gnash.
00051     amf::Buffer &formatEchoResponse(const std::string &num, amf::Element &el);
00052     amf::Buffer &formatEchoResponse(const std::string &num, amf::Buffer &data);
00053     amf::Buffer &formatEchoResponse(const std::string &num, boost::uint8_t *data, size_t size);
00054 private:
00055 };
00056 
00057 } // end of cygnal namespace
00058 #endif  // end of __GATEWAY_H__
00059 
00060 // local Variables:
00061 // mode: C++
00062 // indent-tabs-mode: t
00063 // End:

Generated on Thu Sep 2 2010 for Gnash by  doxygen 1.7.1