[haiku-development] Re: Checking when media services are up [proposal]

  • From: Axel Dörfler <axeld@xxxxxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 03 Mar 2015 12:58:07 +0100

Hi Dario,

Am 03.03.2015 um 12:12 schrieb Dario Casalinuovo:
To avoid in future similar problems what is your opinion about adding a
function to the media kit like are_media_servers_on()? It should just
check if both servers are running.

Generally, yes, such a method sounds like a good idea.
I would just name it differently - how about BMediaRoster::IsRunning()?

There is no reason to expose/elaborate on the fact that there are actually two servers involved -- that's just an implementation detail that is not relevant information; ie. if put outside of BMediaRoster, I'd call it is_media_server_running() -- that would also better fit to launch_media_server() (but I'd prefer the BMediaRoster() variant).

Bye,
   Axel.


Other related posts: