Main Page   Class Hierarchy   Alphabetical List   Compound List   Examples  

contentdisposition.h

00001 /***************************************************************************
00002     copyright            : (C) 2002-2005 by Stefano Barbato
00003     email                : [email protected]
00004 
00005     $Id: contentdisposition_8h-source.html,v 1.4 2006-03-12 12:28:31 tat Exp $
00006  ***************************************************************************/
00007 
00008 /***************************************************************************
00009  *                                                                         *
00010  *   This program is free software; you can redistribute it and/or modify  *
00011  *   it under the terms of the GNU General Public License as published by  *
00012  *   the Free Software Foundation; either version 2 of the License, or     *
00013  *   (at your option) any later version.                                   *
00014  *                                                                         *
00015  ***************************************************************************/
00016 #ifndef _MIMETIC_CONTENT_DISPOSITION_H_
00017 #define _MIMETIC_CONTENT_DISPOSITION_H_
00018 #include <string>
00019 #include <iostream>
00020 #include <mimetic/fieldparam.h>
00021 #include <mimetic/rfc822/fieldvalue.h>
00022 
00023 namespace mimetic
00024 {
00025 
00026 
00027 
00028 /// Content-Disposition field value
00029 struct ContentDisposition: public FieldValue
00030 {
00031     typedef FieldParam Param;
00032     typedef FieldParamList ParamList;
00033 public:
00034     static const char label[];
00035     ContentDisposition();
00036     ContentDisposition(const char*);
00037     ContentDisposition(const std::string&);
00038 
00039     void type(const std::string&);
00040     const istring& type() const;
00041 
00042     const ParamList& paramList() const;
00043     ParamList& paramList();
00044 
00045     const std::string& param(const std::string&) const;
00046     void param(const std::string&, const std::string&);
00047     
00048     void set(const std::string&);
00049     std::string str() const;
00050 
00051     std::ostream& write(std::ostream& os, int fold = 0) const;
00052 protected:
00053     FieldValue* clone() const;
00054 private:
00055     istring m_type;
00056     ParamList m_paramList;
00057 };
00058 
00059 }
00060 
00061 #endif
00062