kmail

kmmsginfo.h
1 /*
2  * kmail: KDE mail client
3  * Copyright (c) 1996-1998 Stefan Taferner <taferner@kde.org>
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
18  *
19  */
20 #ifndef kmmsginfo_h
21 #define kmmsginfo_h
22 
23 #include <config.h>
24 #include <sys/types.h>
25 #include "kmmsgbase.h"
26 
27 class KMMessage;
28 
29 class KMMsgInfo: public KMMsgBase
30 {
31 public:
32  KMMsgInfo(KMFolder* parent, off_t off=0, short len=0);
33  virtual ~KMMsgInfo();
34 
36  void compat_fromOldIndexString(const TQCString& str, bool toUtf8);
37 
38 
40  virtual void init(const TQCString& subject, const TQCString& from,
41  const TQCString& to, time_t date,
42  KMMsgStatus status, const TQCString& xmark,
43  const TQCString& replyToId,
44  const TQCString& replyToAuxId,
45  const TQCString& msgId,
46  KMMsgEncryptionState encryptionState,
47  KMMsgSignatureState signatureState,
48  KMMsgMDNSentState mdnSentState,
49  const TQCString& prefCharset,
50  off_t folderOffset=0, size_t msgSize=0,
51  size_t msgSizeServer = 0, ulong UID = 0);
52 
54  virtual void init(const TQCString& subject, const TQCString& from,
55  const TQCString& to, time_t date,
56  KMMsgStatus status, const TQCString& xmark,
57  const TQCString& replyToId,
58  const TQCString& replyToAuxId,
59  const TQCString& msgId,
60  const TQCString& fileName,
61  KMMsgEncryptionState encryptionState,
62  KMMsgSignatureState signatureState,
63  KMMsgMDNSentState mdnSentState,
64  const TQCString& prefCharset,
65  size_t msgSize=0,
66  size_t msgSizeServer = 0, ulong UID = 0);
67 
69  virtual TQString subject(void) const;
70  virtual TQString fromStrip(void) const;
71  virtual TQString from() const;
72  virtual TQString toStrip(void) const;
73  virtual TQString to() const;
74  virtual TQString xmark(void) const;
75  virtual TQString replyToIdMD5(void) const;
76  virtual TQString replyToAuxIdMD5() const;
77  virtual TQString strippedSubjectMD5() const;
78  virtual bool subjectIsPrefixed() const;
79  virtual TQString msgIdMD5(void) const;
80  virtual TQString fileName(void) const;
81  virtual KMMsgStatus status(void) const;
82  virtual KMMsgEncryptionState encryptionState() const;
83  virtual KMMsgSignatureState signatureState() const;
84  virtual KMMsgMDNSentState mdnSentState() const;
85  virtual off_t folderOffset(void) const;
86  virtual size_t msgSize(void) const;
87  virtual size_t msgSizeServer(void) const;
88  virtual time_t date(void) const;
89  virtual ulong UID(void) const;
90  void setMsgSize(size_t sz);
91  void setMsgSizeServer(size_t sz);
92  void setFolderOffset(off_t offs);
93  void setFileName(const TQString& file);
94  virtual void setStatus(const KMMsgStatus status, int idx = -1);
95  virtual void setDate(time_t aUnixTime);
96  virtual void setSubject(const TQString&);
97  virtual void setXMark(const TQString&);
98  virtual void setReplyToIdMD5(const TQString&);
99  virtual void setReplyToAuxIdMD5( const TQString& );
100  virtual void initStrippedSubjectMD5();
101  virtual void setMsgIdMD5(const TQString&);
102  virtual void setEncryptionState( const KMMsgEncryptionState, int idx = -1 );
103  virtual void setSignatureState( const KMMsgSignatureState, int idx = -1 );
104  virtual void setMDNSentState( const KMMsgMDNSentState, int idx = -1 );
105  virtual void setUID(ulong);
106  virtual void setFrom( const TQString &from );
107  virtual void setTo( const TQString &to );
108 
110  virtual void setStatus(const char* s1, const char* s2=0) { KMMsgBase::setStatus(s1, s2); }
111  virtual void setDate(const char* s1) { KMMsgBase::setDate(s1); }
112 
113  virtual bool dirty(void) const;
114 
116  KMMsgInfo& operator=(const KMMessage&);
117 
118 private:
119  // Currently unused
120  KMMsgInfo& operator=(const KMMsgInfo&);
121  KMMsgInfo(const KMMsgInfo&);
122 
123  // WARNING: Do not add new member variables to the class. Add them to kd
124  class KMMsgInfoPrivate;
125  KMMsgInfoPrivate *kd;
126 };
127 
128 typedef KMMsgInfo* KMMsgInfoPtr;
129 
130 #endif /*kmmsginfo_h*/
Mail folder.
Definition: kmfolder.h:69
This is a Mime Message.
Definition: kmmessage.h:68