2 * Copyright 2006-2015, Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
6 * Axel Dörfler, axeld@pinc-software.de
17 #include <sys/select.h>
21 struct service_connection
;
22 typedef std::map
<std::string
, service
*> ServiceNameMap
;
23 typedef std::map
<int, service_connection
*> ServiceSocketMap
;
26 class Services
: public BHandler
{
28 Services(const BMessage
& services
);
31 status_t
InitCheck() const;
33 virtual void MessageReceived(BMessage
* message
);
36 void _NotifyListener(bool quit
= false);
37 void _UpdateMinMaxSocket(int socket
);
38 status_t
_StartService(struct service
& service
);
39 status_t
_StopService(struct service
* service
);
40 status_t
_ToService(const BMessage
& message
,
41 struct service
*& service
);
42 void _Update(const BMessage
& services
);
43 status_t
_LaunchService(struct service
& service
,
46 static status_t
_Listener(void* self
);
51 ServiceNameMap fNameMap
;
52 ServiceSocketMap fSocketMap
;
62 const static uint32 kMsgUpdateServices
= 'srvU';