author | zautrix <zautrix> | 2004-07-03 20:46:33 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-07-03 20:46:33 (UTC) |
commit | 54e76d203297aa5da51342492d482187f4d6cd20 (patch) (unidiff) | |
tree | 32bc6bc0a1dd7b4bf6e385e3e66099a115d8b339 | |
parent | cc67ce39cdd7730caee878da3b191d76cad9479f (diff) | |
download | kdepimpi-54e76d203297aa5da51342492d482187f4d6cd20.zip kdepimpi-54e76d203297aa5da51342492d482187f4d6cd20.tar.gz kdepimpi-54e76d203297aa5da51342492d482187f4d6cd20.tar.bz2 |
Bugfix for attachment
-rw-r--r-- | kmicromail/libmailwrapper/mailwrapper.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kmicromail/libmailwrapper/mailwrapper.h b/kmicromail/libmailwrapper/mailwrapper.h index adfac6a..cefe64e 100644 --- a/kmicromail/libmailwrapper/mailwrapper.h +++ b/kmicromail/libmailwrapper/mailwrapper.h | |||
@@ -1,128 +1,128 @@ | |||
1 | #ifndef MAILWRAPPER_H | 1 | #ifndef MAILWRAPPER_H |
2 | #define MAILWRAPPER_H | 2 | #define MAILWRAPPER_H |
3 | 3 | ||
4 | #include <qpe/applnk.h> | 4 | #include <qpe/applnk.h> |
5 | 5 | ||
6 | #include <qbitarray.h> | 6 | #include <qbitarray.h> |
7 | #include <qdatetime.h> | 7 | #include <qdatetime.h> |
8 | #include <qfileinfo.h> | 8 | #include <qfileinfo.h> |
9 | #include <kiconloader.h> | 9 | #include <kiconloader.h> |
10 | 10 | ||
11 | #include "settings.h" | 11 | #include "settings.h" |
12 | 12 | ||
13 | #include <opie2/osmartpointer.h> | 13 | #include <opie2/osmartpointer.h> |
14 | /* | 14 | /* |
15 | class Attachment | 15 | class Attachment |
16 | { | 16 | { |
17 | public: | 17 | public: |
18 | Attachment( DocLnk lnk ); | 18 | Attachment( DocLnk lnk ); |
19 | virtual ~Attachment(){} | 19 | virtual ~Attachment(){} |
20 | const QString getFileName()const{ return doc.file(); } | 20 | const QString getFileName()const{ return doc.file(); } |
21 | const QString getName()const{ return doc.name(); } | 21 | const QString getName()const{ return doc.name(); } |
22 | const QString getMimeType()const{ return doc.type(); } | 22 | const QString getMimeType()const{ return doc.type(); } |
23 | const QPixmap getPixmap()const{ return doc.pixmap(); } | 23 | const QPixmap getPixmap()const{ return doc.pixmap(); } |
24 | const int getSize()const { return size; } | 24 | const int getSize()const { return size; } |
25 | DocLnk getDocLnk() { return doc; } | 25 | DocLnk getDocLnk() { return doc; } |
26 | 26 | ||
27 | protected: | 27 | protected: |
28 | DocLnk doc; | 28 | DocLnk doc; |
29 | int size; | 29 | int size; |
30 | 30 | ||
31 | }; | 31 | }; |
32 | */ | 32 | */ |
33 | 33 | ||
34 | class Attachment | 34 | class Attachment |
35 | { | 35 | { |
36 | public: | 36 | public: |
37 | Attachment( QString lnk ); | 37 | Attachment( QString lnk ); |
38 | virtual ~Attachment(){} | 38 | virtual ~Attachment(){} |
39 | const QString getFileName()const{ return QFileInfo( doc ).fileName (); } | 39 | const QString getFileName()const{ return doc; } |
40 | const QString getName()const{ return QFileInfo( doc ).baseName (); } | 40 | const QString getName()const{ return QFileInfo( doc ).baseName (); } |
41 | const QString getMimeType()const{ return QFileInfo( doc ).extension(false); } | 41 | const QString getMimeType()const{ return QFileInfo( doc ).extension(false); } |
42 | const QPixmap getPixmap()const{ return mPix; } | 42 | const QPixmap getPixmap()const{ return mPix; } |
43 | const int getSize()const { return size; } | 43 | const int getSize()const { return size; } |
44 | QString getDocLnk() { return doc; } | 44 | QString getDocLnk() { return doc; } |
45 | 45 | ||
46 | protected: | 46 | protected: |
47 | QPixmap mPix; | 47 | QPixmap mPix; |
48 | QString doc; | 48 | QString doc; |
49 | int size; | 49 | int size; |
50 | 50 | ||
51 | }; | 51 | }; |
52 | 52 | ||
53 | class Mail:public Opie::Core::ORefCount | 53 | class Mail:public Opie::Core::ORefCount |
54 | { | 54 | { |
55 | public: | 55 | public: |
56 | Mail(); | 56 | Mail(); |
57 | /* Possible that this destructor must not be declared virtual | 57 | /* Possible that this destructor must not be declared virtual |
58 | * 'cause it seems that it will never have some child classes. | 58 | * 'cause it seems that it will never have some child classes. |
59 | * in this case this object will not get a virtual table -> memory and | 59 | * in this case this object will not get a virtual table -> memory and |
60 | * speed will be a little bit better? | 60 | * speed will be a little bit better? |
61 | */ | 61 | */ |
62 | virtual ~Mail(){} | 62 | virtual ~Mail(){} |
63 | void addAttachment( Attachment *att ) { attList.append( att ); } | 63 | void addAttachment( Attachment *att ) { attList.append( att ); } |
64 | const QList<Attachment>& getAttachments()const { return attList; } | 64 | const QList<Attachment>& getAttachments()const { return attList; } |
65 | void removeAttachment( Attachment *att ) { attList.remove( att ); } | 65 | void removeAttachment( Attachment *att ) { attList.remove( att ); } |
66 | const QString&getName()const { return name; } | 66 | const QString&getName()const { return name; } |
67 | void setName( QString s ) { name = s; } | 67 | void setName( QString s ) { name = s; } |
68 | const QString&getMail()const{ return mail; } | 68 | const QString&getMail()const{ return mail; } |
69 | void setMail( const QString&s ) { mail = s; } | 69 | void setMail( const QString&s ) { mail = s; } |
70 | const QString&getTo()const{ return to; } | 70 | const QString&getTo()const{ return to; } |
71 | void setTo( const QString&s ) { to = s; } | 71 | void setTo( const QString&s ) { to = s; } |
72 | const QString&getCC()const{ return cc; } | 72 | const QString&getCC()const{ return cc; } |
73 | void setCC( const QString&s ) { cc = s; } | 73 | void setCC( const QString&s ) { cc = s; } |
74 | const QString&getBCC()const { return bcc; } | 74 | const QString&getBCC()const { return bcc; } |
75 | void setBCC( const QString&s ) { bcc = s; } | 75 | void setBCC( const QString&s ) { bcc = s; } |
76 | const QString&getMessage()const { return message; } | 76 | const QString&getMessage()const { return message; } |
77 | void setMessage( const QString&s ) { message = s; } | 77 | void setMessage( const QString&s ) { message = s; } |
78 | const QString&getSubject()const { return subject; } | 78 | const QString&getSubject()const { return subject; } |
79 | void setSubject( const QString&s ) { subject = s; } | 79 | void setSubject( const QString&s ) { subject = s; } |
80 | const QString&getReply()const{ return reply; } | 80 | const QString&getReply()const{ return reply; } |
81 | void setReply( const QString&a ) { reply = a; } | 81 | void setReply( const QString&a ) { reply = a; } |
82 | void setInreply(const QStringList&list){m_in_reply_to = list;} | 82 | void setInreply(const QStringList&list){m_in_reply_to = list;} |
83 | const QStringList&Inreply()const{return m_in_reply_to;} | 83 | const QStringList&Inreply()const{return m_in_reply_to;} |
84 | 84 | ||
85 | private: | 85 | private: |
86 | QList<Attachment> attList; | 86 | QList<Attachment> attList; |
87 | QString name, mail, to, cc, bcc, reply, subject, message; | 87 | QString name, mail, to, cc, bcc, reply, subject, message; |
88 | QStringList m_in_reply_to; | 88 | QStringList m_in_reply_to; |
89 | }; | 89 | }; |
90 | 90 | ||
91 | class Folder:public Opie::Core::ORefCount | 91 | class Folder:public Opie::Core::ORefCount |
92 | { | 92 | { |
93 | public: | 93 | public: |
94 | Folder( const QString&init_name,const QString&sep ); | 94 | Folder( const QString&init_name,const QString&sep ); |
95 | virtual ~Folder(); | 95 | virtual ~Folder(); |
96 | const QString&getDisplayName()const { return nameDisplay; } | 96 | const QString&getDisplayName()const { return nameDisplay; } |
97 | const QString&getName()const { return name; } | 97 | const QString&getName()const { return name; } |
98 | const QString&getPrefix()const{return prefix; } | 98 | const QString&getPrefix()const{return prefix; } |
99 | virtual bool may_select()const{return true;} | 99 | virtual bool may_select()const{return true;} |
100 | virtual bool no_inferior()const{return true;} | 100 | virtual bool no_inferior()const{return true;} |
101 | const QString&Separator()const; | 101 | const QString&Separator()const; |
102 | 102 | ||
103 | protected: | 103 | protected: |
104 | QString nameDisplay, name, separator,prefix; | 104 | QString nameDisplay, name, separator,prefix; |
105 | }; | 105 | }; |
106 | 106 | ||
107 | typedef Opie::Core::OSmartPointer<Folder> FolderP; | 107 | typedef Opie::Core::OSmartPointer<Folder> FolderP; |
108 | 108 | ||
109 | class MHFolder : public Folder | 109 | class MHFolder : public Folder |
110 | { | 110 | { |
111 | public: | 111 | public: |
112 | MHFolder(const QString&disp_name,const QString&mbox); | 112 | MHFolder(const QString&disp_name,const QString&mbox); |
113 | virtual ~MHFolder(); | 113 | virtual ~MHFolder(); |
114 | }; | 114 | }; |
115 | 115 | ||
116 | class IMAPFolder : public Folder | 116 | class IMAPFolder : public Folder |
117 | { | 117 | { |
118 | public: | 118 | public: |
119 | IMAPFolder(const QString&name, const QString&sep, bool select=true,bool noinf=false,const QString&prefix="" ); | 119 | IMAPFolder(const QString&name, const QString&sep, bool select=true,bool noinf=false,const QString&prefix="" ); |
120 | virtual ~IMAPFolder(); | 120 | virtual ~IMAPFolder(); |
121 | virtual bool may_select()const{return m_MaySelect;} | 121 | virtual bool may_select()const{return m_MaySelect;} |
122 | virtual bool no_inferior()const{return m_NoInferior;} | 122 | virtual bool no_inferior()const{return m_NoInferior;} |
123 | private: | 123 | private: |
124 | static QString decodeFolderName( const QString &name ); | 124 | static QString decodeFolderName( const QString &name ); |
125 | bool m_MaySelect,m_NoInferior; | 125 | bool m_MaySelect,m_NoInferior; |
126 | }; | 126 | }; |
127 | 127 | ||
128 | #endif | 128 | #endif |