[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: threading in kde
From: Marc Mutz <Marc.Mutz () uni-bielefeld ! de>
Date: 2001-08-30 21:49:02
[Download RAW message or body]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thursday 30 August 2001 15:45, Andrew Sutton wrote:
<snip>
> actually, take the version of kmail i'm using (currently without
> async send capabilities). a single object could encapsulate the
> entire send msg functionality... say define it as so (this requires
> some knowledge of ACE to understand some of the classes).
>
> class KSendMessageTask : public KTask
> {
> KReturn<int> establishConnection();
> KReturn<int> closeConnection();
> KReturn<int> sendMessage( KMessage *msg );
> };
>
> so, when kmail uses it:
>
> // somewhere during startup
> KSendMessageTask *task = new KSendMessageTask;
> task->open(); // activate in separate thread
>
> ... // when somebody sends a msg
> KReturn<int> ret;
> ret = task->sendMessage( myMessage );
>
> ... // later on, check the result
> if( ret.getReturn() == SOME_ERROR ) {
> cout << "couldn't send\n";
> }
>
> or even better, wrap that functionality into a library, or make a
> component out of it, allowing the same send mail functionality from
> any kde application. of course, there's alot of work to be done
> leading up to that point, but that's okay.
<snip>
Am I getting this right? He just described KIOJob's, didn't he ;-)
"Duplicate wishlist entry. Using the smtp kioslave will be in the next
version (actully, it may already be in CVS, since I remember vaguely
that a "warning: kmail/smpt.cpp in (no longer) any pertinent" (or
whatever) flickered by on the last cvs up kdenetwork"
;-)
Marc
- --
In one sentence, the maintenance of technologically obsolete copyright
regimes requires a police state.
-- Felix Stalder: "The Internet backlash", Telepolis 01/08/28 (#9409)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (GNU/Linux)
Comment: For info see http://www.gnupg.org
iD8DBQE7jrTP3oWD+L2/6DgRArliAJ9u22utV7RDIdCFZcVHW+tGDbV7bgCeK8oc
/98IcOuWCaYjuAYBpo0j4ik=
=UPLr
-----END PGP SIGNATURE-----
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic