Bayonne2 / Common C++ 2 Framework: mime.h Source File

Bayonne2 / Common C++ 2 Framework
mime.h
Go to the documentation of this file.
1 // Copyright (C) 2001-2005 Open Source Telecom Corporation.
2 // Copyright (C) 2006-2010 David Sugar, Tycho Softworks.
3 //
4 // This program is free software; you can redistribute it and/or modify
5 // it under the terms of the GNU General Public License as published by
6 // the Free Software Foundation; either version 2 of the License, or
7 // (at your option) any later version.
8 //
9 // This program is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 // GNU General Public License for more details.
13 //
14 // You should have received a copy of the GNU General Public License
15 // along with this program; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17 //
18 // As a special exception, you may use this file as part of a free software
19 // library without restriction. Specifically, if other files instantiate
20 // templates or use macros or inline functions from this file, or you compile
21 // this file and link it with other files to produce an executable, this
22 // file does not by itself cause the resulting executable to be covered by
23 // the GNU General Public License. This exception does not however
24 // invalidate any other reasons why the executable file might be covered by
25 // the GNU General Public License.
26 //
27 // This exception applies only to the code released under the name GNU
28 // Common C++. If you copy code from other releases into a copy of GNU
29 // Common C++, as the General Public License permits, the exception does
30 // not apply to the code that you add in this way. To avoid misleading
31 // anyone as to the status of such modified files, you must delete
32 // this exception notice from them.
33 //
34 // If you write modifications of your own for GNU Common C++, it is your choice
35 // whether to permit this exception to apply to your modifications.
36 // If you do not wish that, delete this exception notice.
37 //
38 
44 #ifndef CCXX_MIME_H_
45 #define CCXX_MIME_H_
46 
47 #ifndef CCXX_CONFIG_H_
48 #include <cc++/config.h>
49 #endif
50 
51 #ifndef CCXX_SOCKET_H_
52 #include <cc++/socket.h>
53 #endif
54 
55 #ifdef CCXX_NAMESPACES
56 namespace ost {
57 #endif
58 
59  class __EXPORT MIMEMultipart;
60  class __EXPORT MIMEItemPart;
61 
69  class __EXPORT MIMEMultipart
70 {
71 protected:
72   friend class __EXPORT MIMEItemPart;
73   char boundry[8];
74   char mtype[80];
75   char *header[16];
76   MIMEItemPart *first, *last;
77 
78  virtual ~MIMEMultipart();
79 
80 public:
86  MIMEMultipart(const char *document);
87 
94  virtual void head(std::ostream *output);
95 
102  virtual void body(std::ostream *output);
103 
110   char **getHeaders(void)
111  {return header;};
112 };
113 
122  class __EXPORT MIMEMultipartForm : public MIMEMultipart
123 {
124 protected:
125  virtual ~MIMEMultipartForm();
126 
127 public:
132  MIMEMultipartForm();
133 };
134 
143  class __EXPORT MIMEItemPart
144 {
145 protected:
146   friend class __EXPORT MIMEMultipart;
147 
148   MIMEMultipart *base;
149   MIMEItemPart *next;
150   const char *ctype;
151 
157  virtual void head(std::ostream *output);
158 
164  virtual void body(std::ostream *output) = 0;
165 
172  MIMEItemPart(MIMEMultipart *top, const char *ct);
173 
174  virtual ~MIMEItemPart();
175 };
176 
184  class __EXPORT MIMEFormData : public MIMEItemPart
185 {
186 protected:
187   const char *content;
188   const char *name;
189 
190  virtual ~MIMEFormData();
191 
192 public:
198  void head(std::ostream *output);
199 
205  void body(std::ostream *output);
206 
214  MIMEFormData(MIMEMultipartForm *top, const char *name, const char *content);
215 };
216 
217 #ifdef CCXX_NAMESPACES
218 }
219 #endif
220 
221 #endif
222 
MIMEItemPart::ctype
const char * ctype
Definition: mime.h:150
MIMEMultipart::getHeaders
char ** getHeaders(void)
Get a string array of the headers to use.
Definition: mime.h:110
MIMEMultipart
class __EXPORT MIMEMultipart
Definition: mime.h:59
MIMEFormData::name
const char * name
Definition: mime.h:188
MIMEItemPart
class __EXPORT MIMEItemPart
Definition: mime.h:60
MIMEItemPart::next
MIMEItemPart * next
Definition: mime.h:149
MIMEFormData
This is a document part type for use in submitting multipart form data to a web server.
Definition: mime.h:184
MIMEMultipart::last
MIMEItemPart * last
Definition: mime.h:76
MIMEMultipartForm
The Multipart form is a MIME multipart document specific for the construction and delivery of form da...
Definition: mime.h:122
MIMEFormData::content
const char * content
Definition: mime.h:187
MIMEMultipart
A container class for multi-part MIME document objects which can be streamed to a std::ostream destin...
Definition: mime.h:69
__EXPORT
#define __EXPORT
Definition: audio2.h:51
MIMEItemPart::base
MIMEMultipart * base
Definition: mime.h:148
socket.h
Network addresses and sockets related classes.
MIMEItemPart
This is used to attach an item part to a MIME multipart document that is being streamed.
Definition: mime.h:143

Generated on Dec 21, 2017 for commoncpp2-1.8.1, ccrtp-1.7.2, libzrtpcpp-2.3.4, ccscript3-1.1.7, ccaudio2-1.0.0 and bayonne2-2.3.2 (after installation in /usr/local/) by   doxygen 1.8.6

AltStyle によって変換されたページ (->オリジナル) /