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

cqueue.h

Go to the documentation of this file.
00001 // http.cpp:  HyperText Transport Protocol handler for Cygnal, for Gnash.
00002 // 
00003 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010 Free Software
00004 //   Foundation, Inc
00005 // 
00006 // This program is free software; you can redistribute it and/or modify
00007 // it under the terms of the GNU General Public License as published by
00008 // the Free Software Foundation; either version 3 of the License, or
00009 // (at your option) any later version.
00010 // 
00011 // This program is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // GNU General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU General Public License
00017 // along with this program; if not, write to the Free Software
00018 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00019 //
00020 
00021 #ifndef __CQUEUE_H__
00022 #define __CQUEUE_H__ 1
00023 
00024 
00025 #include <boost/cstdint.hpp>
00026 #include <boost/thread/mutex.hpp>
00027 #include <boost/date_time/gregorian/gregorian.hpp>
00028 #include <boost/date_time/posix_time/posix_time.hpp>
00029 #include <iostream>
00030 #include <vector>
00031 #include "log.h"
00032 
00033 namespace gnash
00034 {
00035 
00036 class CQueue 
00037 {
00038 public:
00039     CQueue();
00040     ~CQueue();
00041 
00042     // Push bytes on the FIFO
00043     bool push(boost::uint8_t *data, int nbytes);
00044     bool push(std::vector<boost::uint8_t> *data);
00045     // Pop the first date element off the FIFO
00046     std::vector<uint8_t> *pop();
00047     // Peek at the first data element without removing it
00048     std::vector<uint8_t> *peek();
00049 //     void memcpy(boost::uint8_t *data, size_t size,
00050 //                  std::vector<boost::uint8_t> *ptr);
00051 //     void memcpy(std::vector<boost::uint8_t> *ptr,
00052 //                  boost::uint8_t *data, size_t size);
00053     size_t size() { return _queue.size(); };
00054     // Dump internal data.
00055     void dump();
00056 private:
00057     std::vector<std::vector<boost::uint8_t> *> _queue;
00058 };
00059 
00060 
00061 } // end of gnash namespace
00062 
00063 #endif // end of __CQUEUE_H__
00064 
00065 // local Variables:
00066 // mode: C++
00067 // indent-tabs-mode: t
00068 // End:

Generated on Thu Sep 2 2010 for Gnash by  doxygen 1.7.1