1 // Copyright 2009 The Archiveopteryx Developers <info@aox.org>
2 
3 #ifndef MULTIPART_H
4 #define MULTIPART_H
5 
6 #include "list.h"
7 
8 class Header;
9 class Message;
10 class Bodypart;
11 class ContentType;
12 
13 
14 class Multipart
15     : public Garbage
16 {
17 public:
18     Multipart();
19     virtual ~Multipart();
20 
21     Header * header() const;
22     void setHeader( Header * );
23 
24     Multipart * parent() const;
25     void setParent( Multipart * );
26 
27     virtual bool isMessage() const;
28     virtual bool isBodypart() const;
29 
30     List< Bodypart > * children() const;
31 
32     void appendMultipart( EString &, bool ) const;
33     void appendAnyPart( EString &, const Bodypart *, ContentType *, bool ) const;
34     void appendTextPart( EString &, const Bodypart *, ContentType * ) const;
35 
36     virtual void simplifyMimeStructure();
37     bool needsUnicode() const;
38 
39 private:
40     Header * h;
41     Multipart * p;
42     List< Bodypart > * parts;
43 };
44 
45 
46 #endif
47