From kde-core-devel Thu Nov 25 14:29:15 2004 From: Waldo Bastian Date: Thu, 25 Nov 2004 14:29:15 +0000 To: kde-core-devel Subject: Re: RFC: Keeping track of online/offline status & central DNS Message-Id: <200411251529.19319.bastian () kde ! org> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=110139289821155 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--nextPart2780550.MfCJv2Z4If" --nextPart2780550.MfCJv2Z4If Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline > > Proposed DCOP interface > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > > > enumOnlineStatus { Unknown =3D 0, OffLine =3D 1, Online =3D 2 } > > Wouldn't we need additional intermediate states here, something like > RequestedOffline and RequestedOnline?=20 Would that add value? Are their cases where you would want to treat these=20 differently from the "Offline" state? Then again, probably the same can be= =20 asked about "Unknown" and "Online". > It might take a while to get online > and when going from Online to Offline it would be desirable to wait with > actually switching off the network until pending network operations are > finished. In order to support gracefully going offline we would need to keep track of= =20 all pending network operations (something slavebase already provides for bt= w) =46or the kded module I think it would be enough if applications could info= rm it=20 about "no network operation active" and "network operation may be active" a= nd=20 in the latter case establish some "please shutdown" call together with a "o= k,=20 done" / "please cancel shutdown" reply. A bit like the queryClose stuff tha= t=20 session management does. If you are going to query the user then there is t= he=20 "Never mind, the network disconnected itself already" case to keep in mind = as=20 well :-) If you want to take "local access" into account as well, it becomes a bit m= ore=20 tricky because then you also have to solve the problem of figuring out whic= h=20 connection is affected and which is not. > > enumOnlineStatus (int?) onlineStatus() > > // Returns internet status, can be used by applications such as KMail / > > // KWeather in deciding whether to do certain background activities > > > > void setOnlineStatus(enumOnlineStatus (int?) ) > > // Sets internet status, to be used by kppp / kisdn or distribution > > specific // tools > > Is this meant to set the status reflecting the actual network state or to > request a status change? It is meant to set the status reflecting the actual network state. > Or asked in a different way: Would kppp call this function or be called by > this function? kppp would call this. > > setNetworkActivationCallback(DCOPRef, function) > > // Specify DCOP function that should be called in order to request > > activation // of network > > // To be used by kppp / kisdn or distribution specific tools > > How would this callback be used? > > Might it be desirable to not require DCOP here, so that distribution > specific tools don't need to be able to use DCOP? In KDE4 they will be able to use DBUS instead. I don't think it makes sense= to=20 develop a new IPC mechanism just to fill the gap till then. Note that they= =20 can use the dcop command line utility as long as we don't put non-standard= =20 data types in the DCOP interface. That's a point to keep in mind of course. Cheers, Waldo =2D-=20 bastian@kde.org | Free Novell Linux Desktop 9 Evaluation Download bastian@suse.com | http://www.novell.com/products/desktop/eval.html --nextPart2780550.MfCJv2Z4If Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQBBpew/N4pvrENfboIRAgMtAJ9F9CR3mg9tGCPYHrw2rUCIPDlVkACfYXHy iZOAZPuyIDSR2FVDsZnNaBc= =EjZR -----END PGP SIGNATURE----- --nextPart2780550.MfCJv2Z4If--