On Thursday, 25. November 2004 15:29, Waldo Bastian wrote: > > > Proposed DCOP interface > > > ======================= > > > > > > enumOnlineStatus { Unknown = 0, OffLine = 1, Online = 2 } > > > > Wouldn't we need additional intermediate states here, something like > > RequestedOffline and RequestedOnline? > > Would that add value? Are their cases where you would want to treat these > differently from the "Offline" state? Then again, probably the same can be > asked about "Unknown" and "Online". An application initiating network operations would have to interpret RequestedOffline as Offline, so that no new operations are started. An application showing the network state to the user would have to treat it a Online, so that the user doesn't remove the network cable before the operation is finished and the actual Offline state is reached. > > > 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. I would separate the interface in two parts, one that is used by applications doing network operations, so they need to know about the status of the network, and another part which is used by applications controlling the network. The second part should probably be less visible because it is only used by a few applications. This separation would reduce the risk that an application calls functions like setOnlineStatus() without actually being able to control the status of the network. -- Cornelius Schumacher