Diffstat (limited to 'noncore/net/mail/mailwrapper.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/mail/mailwrapper.h | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/noncore/net/mail/mailwrapper.h b/noncore/net/mail/mailwrapper.h index 332034f..34fd5c5 100644 --- a/noncore/net/mail/mailwrapper.h +++ b/noncore/net/mail/mailwrapper.h | |||
@@ -22,78 +22,24 @@ public: | |||
22 | const QString getName()const{ return doc.name(); } | 22 | const QString getName()const{ return doc.name(); } |
23 | const QString getMimeType()const{ return doc.type(); } | 23 | const QString getMimeType()const{ return doc.type(); } |
24 | const QPixmap getPixmap()const{ return doc.pixmap(); } | 24 | const QPixmap getPixmap()const{ return doc.pixmap(); } |
25 | const int getSize()const { return size; } | 25 | const int getSize()const { return size; } |
26 | DocLnk getDocLnk() { return doc; } | 26 | DocLnk getDocLnk() { return doc; } |
27 | 27 | ||
28 | protected: | 28 | protected: |
29 | DocLnk doc; | 29 | DocLnk doc; |
30 | int size; | 30 | int size; |
31 | 31 | ||
32 | }; | 32 | }; |
33 | 33 | ||
34 | #define FLAG_ANSWERED 0 | ||
35 | #define FLAG_FLAGGED 1 | ||
36 | #define FLAG_DELETED 2 | ||
37 | #define FLAG_SEEN 3 | ||
38 | #define FLAG_DRAFT 4 | ||
39 | #define FLAG_RECENT 5 | ||
40 | |||
41 | /* a class to describe mails in a mailbox */ | ||
42 | /* Attention! | ||
43 | From programmers point of view it would make sense to | ||
44 | store the mail body into this class, too. | ||
45 | But: not from the point of view of the device. | ||
46 | Mailbodies can be real large. So we request them when | ||
47 | needed from the mail-wrapper class direct from the server itself | ||
48 | (imap) or from a file-based cache (pop3?) | ||
49 | So there is no interface "const QString&body()" but you should | ||
50 | make a request to the mailwrapper with this class as parameter to | ||
51 | get the body. Same words for the attachments. | ||
52 | */ | ||
53 | class RecMail | ||
54 | { | ||
55 | public: | ||
56 | RecMail(); | ||
57 | virtual ~RecMail(){} | ||
58 | |||
59 | const int getNumber()const{return msg_number;} | ||
60 | void setNumber(int number){msg_number=number;} | ||
61 | const QString&getDate()const{ return date; } | ||
62 | void setDate( const QString&a ) { date = a; } | ||
63 | const QString&getFrom()const{ return from; } | ||
64 | void setFrom( const QString&a ) { from = a; } | ||
65 | const QString&getSubject()const { return subject; } | ||
66 | void setSubject( const QString&s ) { subject = s; } | ||
67 | const QString&getMbox()const{return mbox;} | ||
68 | void setMbox(const QString&box){mbox = box;} | ||
69 | const QBitArray&getFlags()const{return msg_flags;} | ||
70 | void setFlags(const QBitArray&flags){msg_flags = flags;} | ||
71 | |||
72 | #if 0 | ||
73 | void setDate(const QString&dstring); | ||
74 | void setDate(const QDateTime&date){mDate = date;} | ||
75 | QString getDate()const{return mDate.toString();} | ||
76 | #endif | ||
77 | protected: | ||
78 | QString subject,date,from,mbox; | ||
79 | int msg_number; | ||
80 | QBitArray msg_flags; | ||
81 | #if 0 | ||
82 | QDateTime mDate; | ||
83 | #endif | ||
84 | }; | ||
85 | |||
86 | typedef QList<RecMail> Maillist; | ||
87 | |||
88 | class Mail | 34 | class Mail |
89 | { | 35 | { |
90 | public: | 36 | public: |
91 | Mail(); | 37 | Mail(); |
92 | /* Possible that this destructor must not be declared virtual | 38 | /* Possible that this destructor must not be declared virtual |
93 | * 'cause it seems that it will never have some child classes. | 39 | * 'cause it seems that it will never have some child classes. |
94 | * in this case this object will not get a virtual table -> memory and | 40 | * in this case this object will not get a virtual table -> memory and |
95 | * speed will be a little bit better? | 41 | * speed will be a little bit better? |
96 | */ | 42 | */ |
97 | virtual ~Mail(){} | 43 | virtual ~Mail(){} |
98 | void addAttachment( Attachment *att ) { attList.append( att ); } | 44 | void addAttachment( Attachment *att ) { attList.append( att ); } |
99 | const QList<Attachment>& getAttachments()const { return attList; } | 45 | const QList<Attachment>& getAttachments()const { return attList; } |