[prev in list] [next in list] [prev in thread] [next in thread]
List: kmail-devel
Subject: Re: Stuff I'm working on
From: "Mauro DePascale" <mauro.depascale () marconi ! com>
Date: 2002-09-10 13:35:54
[Download RAW message or body]
GREAT!!
It seems I'll have to reimplement my domino code (again). . . .:-)
M.
Zack Rusin <zack@kde.org>@mail.kde.org on 10/09/2002 15.30.41
Please respond to kmail@mail.kde.org
Sent by: kmail-admin@mail.kde.org
To: kmail@mail.kde.org
cc:
Subject: Re: Stuff I'm working on
On Tuesday 10 September 2002 06:49, Mauro DePascale wrote:
> I'm also very interested into the KMFolder interface rework: those
> protocol == "imap" checks prevent me to add folders support to the
> Domino code.
Done. Well almost ;) It will be a gradual change. I want to first
provide the same outside interfaces for all folders. Now they all
bahave the same way, meaning that now instead of
if ( folder->protocol() == "imap" ) {
KMImapJob *job = new KMImapJob( msg );
connect( job, SIGNAL(messageRetrieved(KMMessage*)),
this, SLOT(slotMsgTransfered(KMMessage*)) );
connect( job, SIGNAL(finished()),
this, SLOT(slotJobFinished()) );
msg->setTransferInProgress( true );
} else {
//something else here
}
we'll have
KMFolderJob *job = folder->createJob( msg );
connect( job, SIGNAL(messageRetrieved(KMMessage*)),
this, SLOT(slotMsgTransfered(KMMessage*)) );
connect( job, SIGNAL(finished()),
this, SLOT(slotJobFinished()) );
job->start();
Folders act as job factories. Right now I switched only IMAP to the new
interface, today I'm planning on doing the same for maildir and mbox.
Then remove all protocol() == "imap" codepaths. Then start working on
plugin interface and fixing some interfaces. What you most probably
want is ability to write a simple plugin that would allow to get Domino
folder support in. The plugin I currently have in mind would most
probably look as follows:
class KMFolderPlugin : public QObject
{
Q_OBJECT
public:
KMFolderPlugin( KMAccount *parent = 0L, const char *name = 0L );
virtual ~KMFolderPlugin();
virtual void init( QPtrList<KMMessage> msgList )=0;
virtual void unload()=0;
virtual const char* id() const;
public slots:
virtual void retrieveMessage( int idx ) =0;
virtual void retrieveMessage( KMMessage *msg ) =0;
virtual void storeMessage( KMMessage *msg )=0;
virtual void removeMessage( int idx )=0;
virtual void removeMessage( KMMessage *msg )=0;
signals:
void messageRetrieved( KMMessage*, bool );
void messageStored( KMMessage*, bool );
void messageRemoved( KMMessage*, bool );
};
Probably adding some functions dealing with message sets and operating
on QPtrList would be a good idea. Anyway, I want KMFolder to act as a
plugin manager - meaning that users could easily switch the format of
the stored messages at run-time as long as the respective plugin would
be present - from maildir to sql based, from mbox to maildir -
anything.
Zack
--
Jesus saves...Passes to Gretzky...Gretzky shoots...He SCORES!
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
_______________________________________________
KMail Developers mailing list
kmail@mail.kde.org
http://mail.kde.org/mailman/listinfo/kmail
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic