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#include <netinet6/in6.h>
16
17class AutoconfigClient;
18
19class AutoconfigLooper : public BLooper {
20public:
21								AutoconfigLooper(BMessenger target,
22									const char* device);
23	virtual						~AutoconfigLooper();
24
25	virtual	void				MessageReceived(BMessage* message);
26
27			BMessenger			Target() const { return fTarget; }
28
29private:
30			void				_RemoveClient();
31			void				_ConfigureIPv4();
32			void				_ReadyToRun();
33			void				_NetworkMonitorNotification(BMessage* message);
34
35			BMessenger			fTarget;
36			BString				fDevice;
37			AutoconfigClient*	fCurrentClient;
38			int32				fLastMediaStatus;
39			bool				fJoiningNetwork;
40};
41
42#endif	// AUTOCONFIG_LOOPER_H
43