1/*
2 * Copyright 2004-2011 Haiku Inc. All rights reserved.
3 * Distributed under the terms of the MIT License.
4 *
5 */
6#ifndef NETWORKSETUPADDON_H
7#define NETWORKSETUPADDON_H
8
9
10#include <interface/View.h>
11#include <kernel/image.h>		// for image_id
12#include <storage/Resources.h>
13
14
15class NetworkSetupProfile;
16
17class NetworkSetupAddOn {
18	public:
19		NetworkSetupAddOn(image_id addon_image);
20		virtual ~NetworkSetupAddOn();
21
22		virtual BView *			CreateView(BRect* bounds);
23		virtual status_t		Save();
24		virtual status_t		Revert();
25
26		virtual const char *	Name();
27		virtual status_t		ProfileChanged(NetworkSetupProfile*
28									new_profile);
29
30		NetworkSetupProfile * 	Profile();
31		bool 					IsDirty();
32		void 					SetDirty(bool dirty = true);
33		image_id				ImageId();
34		BResources*				Resources();
35
36	private:
37		bool 					fIsDirty;
38		NetworkSetupProfile*	fProfile;
39		image_id				fAddonImage;
40		BResources*				fAddonResources;
41};
42
43extern "C" {
44
45#define NETWORK_SETUP_ADDON_INSTANCIATE_FUNC_NAME "get_nth_addon"
46typedef NetworkSetupAddOn* (*network_setup_addon_instantiate)(image_id image,
47	int index);
48
49extern NetworkSetupAddOn* get_nth_addon(image_id image, int index);
50
51}
52
53
54#endif // ifdef NETWORKSETUPADDON_H
55
56