[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: slaveinterface-modification (was: KDE 1.92 release, FEATURE
From: Bjoern Kahl <Bjoern.Kahl () kiel ! netsurf ! de>
Date: 2000-07-21 11:08:17
[Download RAW message or body]
On 21-Jul-00 David Faure wrote:
> Ah yes, damn, we forgot this.
>
> BTW your patch can't compile ("Qstring" instead of "QString" at one
> place)
Sorry, litle typo. Of course I will first compile it, run it,
then commit.
(Was clearly too late yesterday X-( )
I will put the final version in kdenonbeta/NetManager2/kio-patch
in a few minutes, and commit it this evening (22:00 MEST) if no
one objects.
If I should commit earlier, its ok for me too.
Bjoern
> Stephan ? This looks ok to me. A bit late, but it's now or never...
> On Fri, Jul 21, 2000 at 02:16:58AM +0200, Bjoern Kahl wrote:
> > On 20-Jul-00 Matthias Hoelzer-Kluepfel wrote:
> > > I just wanted to keep everyone posted: The CVS has been tagged
> > > for the 1.92 release.
> > I like to ask for permission to commit the attached patch
> > to slavebase.* and slaveinterface.*. It is a part of the
> > things discussed last week about the netmgr-interface.
> > (Thread "Addition to kio-SlaveBase")
> > In Detail:
> > - missing private d-pointer in slaveinterface
> > - secound parameter (slaveid) to requestNetwork()
> > and dropNetwork() in the communictaion between
> > slavebase and slaveinterface.
> > (This don't touch the API on slave-side.
> > On app-side (slaveinterface), reqest and dropNetwork
> > are internal function.)
> > I like to change this, because the netmgr may not
> > work without the slaveid.
---------------8<---------------8<-----------------8<---------
> Content-Description: kio-patch.txt
> > Index: slavebase.h
> > ===================================================================
> > RCS file: /home/kde/kdelibs/kio/slavebase.h,v
> > retrieving revision 1.30
> > diff -u -r1.30 slavebase.h
> > --- slavebase.h 2000/07/18 21:16:46 1.30
> > +++ slavebase.h 2000/07/21 00:13:22
> > @@ -481,6 +481,11 @@
> > SlaveBasePrivate *d;
> > };
> >
> > +// by kahl for netmgr
> > +class SlaveBasePrivate {
> > +public:
> > + QString slaveid;
> > +};
> >
> > };
> >
> > Index: slavebase.cpp
> > ===================================================================
> > RCS file: /home/kde/kdelibs/kio/slavebase.cpp,v
> > retrieving revision 1.46
> > diff -u -r1.46 slavebase.cpp
> > --- slavebase.cpp 2000/07/18 21:16:46 1.46
> > +++ slavebase.cpp 2000/07/21 00:13:22
> > @@ -72,10 +72,18 @@
> > listEntry_usec = tp.tv_usec;
> > mConnectedToApp = true;
> > connectSlave(mAppSocket);
> > +
> > + // by kahl for netmgr (need a way to identify slaves)
> > + d = new SlaveBasePrivate;
> > + d->slaveid = protocol;
> > + d->slaveid += QString::number(getpid());
> > }
> >
> > SlaveBase::~SlaveBase()
> > {
> > + // by kahl for netmgr
> > + if (d)
> > + delete d;
> > }
> >
> > void SlaveBase::dispatchLoop()
> > @@ -299,7 +307,7 @@
> >
> > bool SlaveBase::requestNetwork(const QString& host)
> > {
> > - KIO_DATA << host;
> > + KIO_DATA << host << d->slaveid;
> > m_pConnection->send( MSG_NET_REQUEST, data );
> >
> > int cmd;
> > @@ -323,7 +331,7 @@
> >
> > void SlaveBase::dropNetwork(const QString& host)
> > {
> > - KIO_DATA << host;
> > + KIO_DATA << host << d->slaveid;
> > m_pConnection->send( MSG_NET_DROP, data );
> > }
> >
> > Index: slaveinterface.h
> > ===================================================================
> > RCS file: /home/kde/kdelibs/kio/slaveinterface.h,v
> > retrieving revision 1.32
> > diff -u -r1.32 slaveinterface.h
> > --- slaveinterface.h 2000/07/18 21:16:46 1.32
> > +++ slaveinterface.h 2000/07/21 00:13:23
> > @@ -33,6 +33,8 @@
> > namespace KIO {
> >
> > class Connection;
> > +// better there is one ...
> > +class SlaveInterfacePrivate;
> >
> > /**
> > * Commands that can be invoked by a job.
> > @@ -181,8 +183,9 @@
> > */
> > void openPassDlg( const QString& /*head*/, const QString&
> > /*user*/, const Q
> > String& /*pass*/, const QString& /*key*/ = QString::null );
> >
> > - void requestNetwork( const QString & );
> > - void dropNetwork( const QString & );
> > + // I need to identify the slaves
> > + void requestNetwork( const QString &, const QString slaveid &
> > );
> > + void dropNetwork( const QString &, const QString slaveid & );
> >
> > /**
> > * @internal
> > @@ -191,6 +194,9 @@
> >
> > protected:
> > Connection * m_pConnection;
> > +
> > +private:
> > + SlaveInterfacePrivate *d;
> > };
> >
> > };
> > Index: slaveinterface.cpp
> > ===================================================================
> > RCS file: /home/kde/kdelibs/kio/slaveinterface.cpp,v
> > retrieving revision 1.34
> > diff -u -r1.34 slaveinterface.cpp
> > --- slaveinterface.cpp 2000/07/18 21:16:46 1.34
> > +++ slaveinterface.cpp 2000/07/21 00:13:23
> > @@ -177,14 +177,16 @@
> > }
> > case MSG_NET_REQUEST: {
> > QString host;
> > - stream >> host;
> > - requestNetwork(host);
> > + QString slaveid;
> > + stream >> host >> slaveid;
> > + requestNetwork(host, slaveid);
> > break;
> > }
> > case MSG_NET_DROP: {
> > QString host;
> > - stream >> host;
> > - dropNetwork(host);
> > + QString slaveid
> > + stream >> host >> slaveid;
> > + dropNetwork(host, slaveid);
> > break;
> > }
> > case MSG_NEED_SUBURL_DATA: {
> > @@ -196,17 +198,18 @@
> > }
> > }
> >
> > -void SlaveInterface::requestNetwork(const QString &host)
> > +void SlaveInterface::requestNetwork(const QString &host, const
> > QString &slaveid
> > )
> > {
> > - kdDebug(7007) << "requestNetwork " << host << endl;
> > + kdDebug(7007) << "requestNetwork " << host << slaveid << endl;
> > QByteArray packedArgs;
> > QDataStream stream( packedArgs, IO_WriteOnly );
> > stream << true;
> > m_pConnection->sendnow( INF_NETWORK_STATUS, packedArgs );
> > }
> >
> > -void SlaveInterface::dropNetwork(const QString &)
> > +void SlaveInterface::dropNetwork(const QString &, const QString
> > &slaveid)
> > {
> > + kdDebug(7007) << "dropNetwork " << host << slaveid << endl;
> > }
> >
> > void SlaveInterface::openPassDlg( const QString& head, const
> > QString& user, con
> > st QString& pass, const QString& key )
>
>
--
+-----------------------------------------------------------------------+
| Björn Kahl ++ Max-Planck-Str.26 ++ 24211 Preetz ++ (ISDN) 04342 76882 |
+-----------------------------------------------------------------------+
Weitergabe und/oder gewerbliche Nutzung meiner Adresse/TeleNr untersagt.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic