Diffstat (limited to 'noncore/net/mail/mailwrapper.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mailwrapper.h | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/noncore/net/mail/mailwrapper.h b/noncore/net/mail/mailwrapper.h index 955a8e2..332034f 100644 --- a/noncore/net/mail/mailwrapper.h +++ b/noncore/net/mail/mailwrapper.h | |||
@@ -30,48 +30,61 @@ protected: | |||
30 | int size; | 30 | int size; |
31 | 31 | ||
32 | }; | 32 | }; |
33 | 33 | ||
34 | #define FLAG_ANSWERED 0 | 34 | #define FLAG_ANSWERED 0 |
35 | #define FLAG_FLAGGED 1 | 35 | #define FLAG_FLAGGED 1 |
36 | #define FLAG_DELETED 2 | 36 | #define FLAG_DELETED 2 |
37 | #define FLAG_SEEN 3 | 37 | #define FLAG_SEEN 3 |
38 | #define FLAG_DRAFT 4 | 38 | #define FLAG_DRAFT 4 |
39 | #define FLAG_RECENT 5 | 39 | #define FLAG_RECENT 5 |
40 | 40 | ||
41 | /* a class to describe mails in a mailbox */ | 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 | */ | ||
42 | class RecMail | 53 | class RecMail |
43 | { | 54 | { |
44 | public: | 55 | public: |
45 | RecMail(); | 56 | RecMail(); |
46 | virtual ~RecMail(){} | 57 | virtual ~RecMail(){} |
47 | 58 | ||
48 | const int getNumber()const{return msg_number;} | 59 | const int getNumber()const{return msg_number;} |
49 | void setNumber(int number){msg_number=number;} | 60 | void setNumber(int number){msg_number=number;} |
50 | const QString&getDate()const{ return date; } | 61 | const QString&getDate()const{ return date; } |
51 | void setDate( const QString&a ) { date = a; } | 62 | void setDate( const QString&a ) { date = a; } |
52 | const QString&getFrom()const{ return from; } | 63 | const QString&getFrom()const{ return from; } |
53 | void setFrom( const QString&a ) { from = a; } | 64 | void setFrom( const QString&a ) { from = a; } |
54 | const QString&getSubject()const { return subject; } | 65 | const QString&getSubject()const { return subject; } |
55 | void setSubject( const QString&s ) { subject = s; } | 66 | void setSubject( const QString&s ) { subject = s; } |
56 | void setFlags(const QBitArray&flags){msg_flags = flags;} | 67 | const QString&getMbox()const{return mbox;} |
68 | void setMbox(const QString&box){mbox = box;} | ||
57 | const QBitArray&getFlags()const{return msg_flags;} | 69 | const QBitArray&getFlags()const{return msg_flags;} |
70 | void setFlags(const QBitArray&flags){msg_flags = flags;} | ||
58 | 71 | ||
59 | #if 0 | 72 | #if 0 |
60 | void setDate(const QString&dstring); | 73 | void setDate(const QString&dstring); |
61 | void setDate(const QDateTime&date){mDate = date;} | 74 | void setDate(const QDateTime&date){mDate = date;} |
62 | QString getDate()const{return mDate.toString();} | 75 | QString getDate()const{return mDate.toString();} |
63 | #endif | 76 | #endif |
64 | protected: | 77 | protected: |
65 | QString subject,date,from; | 78 | QString subject,date,from,mbox; |
66 | int msg_number; | 79 | int msg_number; |
67 | QBitArray msg_flags; | 80 | QBitArray msg_flags; |
68 | #if 0 | 81 | #if 0 |
69 | QDateTime mDate; | 82 | QDateTime mDate; |
70 | #endif | 83 | #endif |
71 | }; | 84 | }; |
72 | 85 | ||
73 | typedef QList<RecMail> Maillist; | 86 | typedef QList<RecMail> Maillist; |
74 | 87 | ||
75 | class Mail | 88 | class Mail |
76 | { | 89 | { |
77 | public: | 90 | public: |