xref: /haiku/src/servers/net/AutoconfigLooper.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * Copyright 2006-2008, Haiku, Inc. All Rights Reserved.
3  * Distributed under the terms of the MIT License.
4  *
5  * Authors:
6  *		Axel Dörfler, axeld@pinc-software.de
7  */
8 #ifndef AUTOCONFIG_LOOPER_H
9 #define AUTOCONFIG_LOOPER_H
10 
11 
12 #include <Looper.h>
13 #include <Messenger.h>
14 #include <String.h>
15 
16 class AutoconfigClient;
17 
18 class AutoconfigLooper : public BLooper {
19 public:
20 								AutoconfigLooper(BMessenger target,
21 									const char* device);
22 	virtual						~AutoconfigLooper();
23 
24 	virtual	void				MessageReceived(BMessage* message);
25 
26 			BMessenger			Target() const { return fTarget; }
27 
28 private:
29 			void				_RemoveClient();
30 			void				_Configure();
31 			void				_ReadyToRun();
32 
33 			BMessenger			fTarget;
34 			BString				fDevice;
35 			AutoconfigClient*	fCurrentClient;
36 };
37 
38 #endif	// AUTOCONFIG_LOOPER_H
39