protocol.h

Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006 Free Software Foundation, Inc.
00003 // 
00004 // This program is free software; you can redistribute it and/or modify
00005 // it under the terms of the GNU General Public License as published by
00006 // the Free Software Foundation; either version 2 of the License, or
00007 // (at your option) any later version.
00008 // 
00009 // This program is distributed in the hope that it will be useful,
00010 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00011 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012 // GNU General Public License for more details.
00013 // You should have received a copy of the GNU General Public License
00014 // along with this program; if not, write to the Free Software
00015 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00016 
00017 // 
00018 //
00019 
00020 #ifndef _PROTOCOL_H_
00021 #define _PROTOCOL_H_
00022 
00023 #ifdef HAVE_CONFIG_H
00024 #include "config.h"
00025 #endif
00026 
00027 #include <string>
00028 #include "network.h"
00029 
00030 class Protocol : public gnash::Network {
00031 public:
00032     Protocol() { };
00033     virtual ~Protocol() { };
00034     
00035     virtual bool handShakeWait() = 0;
00036     virtual bool handShakeRequest() = 0;
00037     virtual bool handShakeResponse() = 0;
00038     virtual bool clientFinish() = 0;
00039     virtual bool serverFinish() = 0;
00040     virtual bool packetRequest() = 0;
00041     virtual bool packetSend() = 0;
00042     virtual bool packetRead() = 0;
00043     void resetBytesOut() { _outbytes = 0; };
00044     int getBytesOut() { return _outbytes; };
00045     void resetBytesIn() { _inbytes = 0; };
00046     int getBytesIn() { return _inbytes; };
00047 private:
00048     std::string _name;
00049 protected:
00050     int         _inbytes;
00051     int         _outbytes;
00052 };  
00053 
00054 // end of _PROTOCOL_H_
00055 #endif
00056 
00057 // local Variables:
00058 // mode: C++
00059 // indent-tabs-mode: t
00060 // End:

Generated on Thu Nov 23 22:31:31 2006 for Gnash by  doxygen 1.4.6