Eneboo - Documentación para desarrolladores
|
00001 /* 00002 Copyright (C) 2001-2002 by theKompany.com <www.thekompany.com> 00003 This program is free software; you can redistribute it and/or modify 00004 it under the terms of the GNU General Public License as published by 00005 the Free Software Foundation; either version 2 of the License, or 00006 (at your option) any later version. 00007 00008 This program is distributed in the hope that it will be useful, 00009 but WITHOUT ANY WARRANTY; without even the implied warranty of 00010 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00011 GNU General Public License for more details. 00012 00013 You should have received a copy of the GNU General Public License 00014 along with this program; if not, write to the Free Software 00015 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00016 00017 By PLUGINS we mean the commercial plug-ins developed by theKompany.com 00018 for Aethera. 00019 00020 In addition, as a special exception, theKompany.com gives permission 00021 to link the code of this program with PLUGINS (or with 00022 modified versions of PLUGINS that use the same license as PLUGINS), 00023 and distribute linked combinations including the two. You must obey 00024 the GNU General Public License in all respects for all of the code used 00025 other than PLUGINS. If you modify this file, you may extend this 00026 exception to your version of the file, but you are not obligated to do so. 00027 If you do not wish to do so, delete this exception statement from your 00028 version. 00029 00030 This license grants you the ability to use PLUGINS with Aethera only 00031 and may not be used outside of Aethera. 00032 See also http://www.thekompany.com/products/license.txt for details. 00033 */ 00034 /* 00035 * This file is part of Magellan <http://www.kAlliance.org/Magellan> 00036 * 00037 * Copyright (c) 1998-2000 Teodor Mihai <teddy@ireland.com> 00038 * Copyright (c) 1998-2000 Laur Ivan <laur.ivan@ul.ie> 00039 * Copyright (c) 1999-2000 Virgil Palanciuc <vv@ulise.cs.pub.ro> 00040 * 00041 * Requires the Qt widget libraries, available at no cost at 00042 * http://www.troll.no/ 00043 * 00044 * Also requires the KDE libraries, available at no cost at 00045 * http://www.kde.org/ 00046 * 00047 * Permission is hereby granted, free of charge, to any person obtaining a copy 00048 * of this software and associated documentation files (the "Software"), to deal 00049 * in the Software without restriction, including without limitation the rights 00050 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 00051 * copies of the Software, and to permit persons to whom the Software is 00052 * furnished to do so, subject to the following conditions: 00053 * 00054 * The above copyright notice and this permission notice shall be included in 00055 * all copies or substantial portions of the Software. 00056 * 00057 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 00058 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00059 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 00060 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 00061 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 00062 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS 00063 * IN THE SOFTWARE. 00064 */ 00065 00066 #ifndef __IndexClass__ 00067 #define __IndexClass__ 00068 00069 #include <qptrlist.h> 00070 00071 class MimePart; 00072 class QDataStream; 00073 class QString; 00074 class MailFolder; 00075 00076 class IndexClass 00077 { 00078 friend QDataStream& operator>>(QDataStream &, IndexClass &); 00079 friend QDataStream& operator<<(QDataStream &, IndexClass &); 00080 00081 public: 00082 00083 IndexClass(MailFolder *parent, QString id=QString::null); 00084 IndexClass(const IndexClass &); 00085 ~IndexClass(); 00086 00087 QString url() const; 00088 00089 QString getID() const; 00090 void setID(const QString &); 00091 00092 QString getParentID() const; 00093 void setParentID(const QString &); 00094 00095 QString getMessageID() const; 00096 void setMessageID(const QString &); 00097 00098 bool getUnreadMark(); 00099 void setUnreadMark(bool); 00100 00101 MailFolder *getParentFolder() const; 00102 void setParentFolder(MailFolder *); 00103 00105 QString getDataFilename() const; 00107 QString getDescriptorFileName() const; 00108 00109 long getDescriptorOffset(void) const; 00110 void setDescriptorOffset(long); 00111 00112 long getDescriptorLength(void) const; 00113 void setDescriptorLength(long); 00114 00115 long getUniblockOffset() const; 00116 void setUniblockOffset(long, bool bParts=false); 00117 00118 long getUniblockLength() const; 00119 void setUniblockLength(long); 00120 00121 bool isMultipartOnly(); 00122 void setMultipartOnly(bool); 00123 00124 int getSize(); 00125 00126 int addPart(MimePart *, bool uniblockRelative=false); 00127 bool removePart(int); 00128 int getPartCount() const; 00129 MimePart *getPartAt(int); 00130 bool isFullMessage() const; 00131 00132 bool isLocked(); 00133 void lock() 00134 ; 00135 void unlock(); 00136 00137 private: 00138 00139 // disable the default constructor 00140 IndexClass(); 00141 00142 MailFolder *_parent; 00143 QString _id; 00144 QString _parentID; 00145 QString _messageID; 00146 long _descriptorOffset; 00147 long _descriptorLength; 00148 long _uniblockOffset; 00149 long _uniblockLength; 00150 QPtrList<MimePart> _partList; 00151 int _multipartOnly; 00152 int _unreadMark; 00153 00154 bool _lock; 00155 }; 00156 00157 #endif 00158 00159