00001 00002 #ifndef DECODE_H 00003 #define DECODE_H 00004 00005 #include <iostream> 00006 #include <map> 00007 #include <string> 00008 00009 #include <sys/types.h> 00010 00011 #include <mime/field.h> 00012 #include <mime/object.h> 00013 #include <mime/parser.h> 00014 #include <mime/client.h> 00015 #include <mime/exception.h> 00016 #include <mime/parser_implementations.h> 00017 00046 namespace mime { 00047 00053 class decoder : public client_interface { 00054 private: 00055 parser* p; 00056 object* obj; 00057 public: 00061 decoder() { 00062 p = 0; 00063 obj = new object(); 00064 } 00069 void close() { 00070 p->close(); 00071 delete p; 00072 delete obj; 00073 } 00078 void decode(unsigned char c); 00079 }; 00080 00081 } 00082 00083 #endif 00084