Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

contentdisposition.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2008 by Stefano Barbato
00003     email                : stefano@codesink.org
00004 
00005     $Id: contentdisposition.h,v 1.12 2008-10-07 11:06:25 tat Exp $
00006  ***************************************************************************/
00007 #ifndef _MIMETIC_CONTENT_DISPOSITION_H_
00008 #define _MIMETIC_CONTENT_DISPOSITION_H_
00009 #include <string>
00010 #include <iostream>
00011 #include <mimetic/fieldparam.h>
00012 #include <mimetic/rfc822/fieldvalue.h>
00013 
00014 namespace mimetic
00015 {
00016 
00017 
00018 
00019 /// Content-Disposition field value
00020 struct ContentDisposition: public FieldValue
00021 {
00022     typedef FieldParam Param;
00023     typedef FieldParamList ParamList;
00024 public:
00025     static const char label[];
00026     ContentDisposition();
00027     ContentDisposition(const char*);
00028     ContentDisposition(const std::string&);
00029 
00030     void type(const std::string&);
00031     const istring& type() const;
00032 
00033     const ParamList& paramList() const;
00034     ParamList& paramList();
00035 
00036     const std::string& param(const std::string&) const;
00037     void param(const std::string&, const std::string&);
00038     
00039     void set(const std::string&);
00040     std::string str() const;
00041 
00042     std::ostream& write(std::ostream& os, int fold = 0) const;
00043 protected:
00044     FieldValue* clone() const;
00045 private:
00046     istring m_type;
00047     ParamList m_paramList;
00048 };
00049 
00050 }
00051 
00052 #endif
00053