Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef _FITCDEMO_H_
00020 #define _FITCDEMO_H_
00021
00022 #include <vector>
00023 #include <boost/shared_ptr.hpp>
00024 #include <boost/shared_array.hpp>
00025 #include <boost/scoped_array.hpp>
00026 #include <sstream>
00027
00028
00029 #include "amf.h"
00030 #include "buffer.h"
00031 #include "element.h"
00032 #include "http.h"
00033 #include "cygnal.h"
00034
00035
00036 #include "rtmp_server.h"
00037
00038 namespace cygnal
00039 {
00040
00041 class FitcDemoTest : public cygnal::RTMPServer
00042 {
00043 public:
00044 FitcDemoTest ();
00045 ~FitcDemoTest ();
00046
00047
00048 std::vector<boost::shared_ptr<amf::Element > > parseFitcDemoRequest(amf::Buffer &buf)
00049 { return parseFitcDemoRequest(buf.reference(), buf.size()); };
00050 std::vector<boost::shared_ptr<amf::Element > > parseFitcDemoRequest(boost::uint8_t *buf, size_t size);
00051
00052
00053 boost::shared_ptr<amf::Buffer> formatFitcDemoResponse(double num, amf::Element &el);
00054 boost::shared_ptr<amf::Buffer> formatFitcDemoResponse(double num, amf::Buffer &data);
00055 boost::shared_ptr<amf::Buffer> formatFitcDemoResponse(double num, boost::uint8_t *data, size_t size);
00056
00057 boost::shared_ptr<amf::Buffer> getResponse() { return _response; };
00058 void setResponse(boost::shared_ptr<amf::Buffer> &x) { _response = x; };
00059
00060 private:
00061 boost::shared_ptr<amf::Buffer> _response;
00062 };
00063
00064 extern "C" {
00065 boost::shared_ptr<Handler::cygnal_init_t> fitcDemo_class_init();
00066
00067 size_t fitcDemo_read_func(boost::uint8_t *data, size_t size);
00068 size_t fitcDemo_write_func(boost::uint8_t *data, size_t size);
00069 }
00070
00071 }
00072 #endif // end of __FITCDEMO_H__
00073
00074
00075
00076
00077