Eneboo - Documentación para desarrolladores
src/flmail/localmailfolder.h
Ir a la documentación de este archivo.
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                   localmailfolder.h  -  the local mail folder class
00036                              -------------------
00037     begin                : Mon Mar  5 16:16:00 EET 2001
00038     copyright            : (C) 2001 by theKompany (www.thekompany.com>
00039     author               : Eugen Constantinescu
00040     email                : eug@thekompany.com
00041  ***************************************************************************/
00042 
00043 #ifndef __LocalMailFolder__
00044 #define __LocalMailFolder__
00045 
00046 #include <qstring.h>
00047 #include <qcstring.h>
00048 #include <qdir.h>
00049 #include <qstringlist.h>
00050 #include <qdict.h>
00051 #include <qlist.h>
00052 #include <qmap.h>
00053 #include <qdatetime.h>
00054 
00055 #include <messageclass.h>
00056 #include <mailfolder.h>
00057 
00058 class LocalMailFolder : public MailFolder
00059 {
00060 public:
00061 
00062     LocalMailFolder(const QString &_storageDevice);
00063     virtual ~LocalMailFolder();
00064 
00065     // message file
00066     QString getMessagesFileName() const;
00067 
00068     // message generators
00069     QString createMessage(const QCString &text, const QCString &uid, const QDateTime &rcvtime,
00070                           const QString &account=QString::null,
00071                           const MessageClass *parsedMessage = 0,
00072                           bool bSync=false, const unsigned flags=0);
00073 
00074     // copy/move/delete/expunge
00075     virtual QString copyMessage(IndexClass *);
00076     virtual QString moveMessage(IndexClass *);
00077     virtual bool deleteMessage(IndexClass *);
00078     virtual bool expunge(bool force=false);
00079 
00080     // processing many messages
00081     virtual bool moveMessage(const QStringList & urls);
00082     virtual bool copyMessage(const QStringList & urls);
00083     virtual bool deleteMessage(const QStringList & urls);
00084 
00086     void sync();
00087 
00088 private:
00089 
00090     // methods
00091     void setupFiles();
00092     void loadIndex();
00093     bool shouldExpunge();
00094 
00095     // files
00096     QString messagesFileName;
00097 };
00098 
00099 #endif
00100 
00101 
 Todo Clases Namespaces Archivos Funciones Variables 'typedefs' Enumeraciones Valores de enumeraciones Propiedades Amigas 'defines'