00001 #pragma once
00002
00003 #include "StreamSegment.h"
00004 #include "PacketStream.h"
00005 #include "Address.h"
00006
00007 class CStreamDecoder
00008 {
00009 public:
00010 enum EResult
00011 {
00012 SUCCESS = 0,
00013 FAIL_PACKET_TYPE = 1,
00014 FAIL_STREAM = 2
00015 };
00016
00017 protected:
00018
00019 __uint32 stream;
00020
00021 public:
00022 CStreamDecoder();
00023 CStreamDecoder(__uint32 stream);
00024 virtual ~CStreamDecoder() { }
00025
00026 void Reset(__uint32 stream);
00027 virtual EResult Decode(CAddress address, CPacketStream* packet) = 0;
00028 };