[haiku-commits] Re: r37936 - haiku/trunk/headers/os/net

  • From: "Axel Dörfler" <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 06 Aug 2010 15:09:27 +0200

Philippe Houdoin <philippe.houdoin@xxxxxxxxx> wrote:
> For BNetworkRoster, do you plan to add hooks InterfaceAdded(),
> InterfaceRemoved(), InterfaceChanged() so one could simply derived
> from this class, call StartWatching() and implement what it needs to
> by overcharging the needed hooks? That what BUSBRoster do for USB
> devices for instance...
> That would avoid that each one have to implement his own BLooper
> handling network interface changes.

I don't think the *Roster() classes are the thing you would want to 
mess with here.
A separate listener class sounds more appropriate.
But since Be's API always uses event based loopers for everything, I 
fail to see the point in providing such a class (I mean it's sort of 
convenient to have the message parsed and the hooks called, but I don't 
see the need for it for the case you mention).

And since the whole thing is pretty much a work in progress yet, I 
would definitely like to keep the flexibility of the pure message based 
approach for the forseeable future.

Bye,
   Axel.


Other related posts: