26 #error C++ is required
29 #include <yateclass.h>
72 virtual void* getObject(
const String& name)
const;
86 virtual void buildLine(
String& line,
bool header =
true)
const;
107 {
return m_separator; }
114 void setParam(
const char* name,
const char* value = 0);
120 void delParam(
const char* name);
127 const NamedString* getParam(
const char* name)
const;
134 static void addQuotes(
String& str,
bool force =
false);
141 static void delQuotes(
String& str,
bool force =
false);
149 static String quote(
const String& str,
bool force =
false);
157 static String unquote(
const String& str,
bool force =
false);
166 static int findSep(
const char* str,
char sep,
int offs = 0);
174 static void buildHeaders(
String& buf,
const ObjList& headers);
212 virtual void* getObject(
const String& name)
const;
226 virtual void buildLine(
String& line,
bool header =
true)
const;
253 virtual void* getObject(
const String& name)
const;
274 {
return m_headers; }
281 {
if (hdr) m_headers.append(hdr); }
289 {
if (hdr) m_headers.remove(hdr,delobj); }
304 m_type.buildLine(buf);
317 bool setParam(
const char* name,
const char* value = 0,
const char* header = 0);
326 bool delParam(
const char* name,
const char* header = 0);
335 const NamedString* getParam(
const char* name,
const char* header = 0)
const;
369 virtual MimeBody* clone()
const = 0;
389 static String* getUnfoldedLine(
const char*& buf,
int& len);
410 virtual void buildBody()
const = 0;
440 explicit MimeMultipartBody(
const char* subtype =
"mixed",
const char* boundary = 0);
475 {
if (body) m_bodies.append(body); }
483 {
if (body) m_bodies.remove(body,delobj); }
500 virtual void* getObject(
const String& name)
const;
524 virtual void buildBody()
const;
532 void parse(
const char* buf,
int len);
539 int findBoundary(
const char*& buf,
int& len,
540 const char* boundary,
unsigned int bLen,
bool& endBody);
546 bool getBoundary(
String& boundary)
const;
591 virtual void* getObject(
const String& name)
const;
617 inline unsigned int hash()
const
626 NamedString* addLine(
const char* name,
const char* value = 0);
633 const NamedString* getLine(
const char* name)
const;
651 virtual void buildBody()
const;
655 void buildLines(
const char* buf,
int len);
696 virtual void* getObject(
const String& name)
const;
713 virtual void buildBody()
const;
749 virtual void* getObject(
const String& name)
const;
773 virtual void buildBody()
const;
812 virtual void* getObject(
const String& name)
const;
832 { m_lines.append(
new String(line)); }
843 virtual void buildBody()
const;
void addLine(const char *line)
Definition: yatemime.h:831
const ObjList & lines() const
Definition: yatemime.h:824
A class that holds just a block of raw data.
Definition: yateclass.h:3774
const ObjList & headers() const
Definition: yatemime.h:273
const ObjList & bodies() const
Definition: yatemime.h:467
virtual bool isMultipart() const
Definition: yatemime.h:506
void appendHdr(MimeHeaderLine *hdr)
Definition: yatemime.h:280
MIME for multiple text lines.
Definition: yatemime.h:783
void removeHdr(MimeHeaderLine *hdr, bool delobj=true)
Definition: yatemime.h:288
const String & text() const
Definition: yatemime.h:761
MIME multipart container.
Definition: yatemime.h:430
MIME for application/sdp.
Definition: yatemime.h:556
void removeBody(MimeBody *body, bool delobj=true)
Definition: yatemime.h:482
unsigned int hash() const
Definition: yatemime.h:617
const DataBlock & body() const
Definition: yatemime.h:348
ObjList m_headers
Definition: yatemime.h:420
Abstract MIME data holder.
Definition: yatemime.h:239
virtual bool isMultipart() const
Definition: yatemime.h:362
virtual bool isSDP() const
Definition: yatemime.h:355
A named string class.
Definition: yateclass.h:3111
DataBlock m_body
Definition: yatemime.h:415
void buildHeaders(String &buf)
Definition: yatemime.h:303
virtual bool isSDP() const
Definition: yatemime.h:597
const MimeHeaderLine & getType() const
Definition: yatemime.h:259
MIME authentication line.
Definition: yatemime.h:187
void appendBody(MimeBody *body)
Definition: yatemime.h:474
Definition: yateclass.h:217
NamedString & operator=(const char *value)
Definition: yateclass.h:3145
A C-style string handling class.
Definition: yateclass.h:1832
An object list class.
Definition: yateclass.h:1229
const ObjList & lines() const
Definition: yatemime.h:610
MIME for obscure binary data.
Definition: yatemime.h:667
Definition: yateclass.h:830
MIME for one text string.
Definition: yatemime.h:720