1#ifndef _MYNETVIEW_H_
2#define _MYNETVIEW_H_
3
4#include <Window.h>
5#include <View.h>
6#include <ScrollView.h>
7#include <Bitmap.h>
8#include <String.h>
9
10#include <stdio.h>
11
12#include "IconListItem.h"
13
14class BStatusBar;
15
16
17class MyNetView : public BView
18{
19	public:
20		MyNetView(BRect rect);
21		~MyNetView();
22
23		void AddHost(char *hostName, uint32 address);
24		void Refresh();
25
26		IconListView *list;
27
28	private:
29		BBitmap *fileIcon;
30		BMenuBar *menuBar;
31};
32
33
34class FileShareView : public BView
35{
36	public:
37		FileShareView(BRect rect, const char *name, uint32 ipAddr);
38		~FileShareView();
39
40		void AddShare(char *shareName);
41		void AddPrinter(char *printerName);
42
43		IconListView *list;
44		char host[B_FILE_NAME_LENGTH];
45		uint32 address;
46
47	private:
48		BBitmap *fileIcon;
49		BBitmap *printerIcon;
50};
51
52
53class HostInfoView : public BView
54{
55	public:
56		HostInfoView(BRect rect, const char *name, uint32 ipAddr);
57		~HostInfoView();
58
59		void Draw(BRect rect);
60
61		uint32 address;
62		bt_hostinfo hostInfo;
63
64	private:
65		hostent *ent;
66		BBitmap *icon;
67		BStatusBar *status;
68};
69
70
71class MyNetHeaderView : public BView
72{
73	public:
74		MyNetHeaderView(BRect rect);
75		~MyNetHeaderView();
76
77		void Draw(BRect rect);
78
79		BButton *openBtn;
80		BButton *hostBtn;
81
82	private:
83		BBitmap *icon;
84};
85
86
87class MyShareOptionView : public BView
88{
89	public:
90		MyShareOptionView(BRect rect);
91		~MyShareOptionView();
92
93		void Draw(BRect rect);
94
95		BButton *openBtn;
96		BButton *unmountBtn;
97};
98
99
100class ThreadInfo
101{
102	public:
103		ThreadInfo();
104		~ThreadInfo();
105
106		ColumnListView *GetColumnListView()			{ return listView; }
107		uint32 GetHostAddress()						{ return address; }
108
109		void SetColumnListView(ColumnListView *clv)	{ listView = clv; }
110		void SetHostAddress(uint32 ipAddr)			{ address = ipAddr; }
111
112	private:
113		ColumnListView *listView;
114		uint32 address;
115};
116
117const int32 MSG_HOST_SELECT		= 'HSel';
118const int32 MSG_HOST_INVOKE		= 'HInv';
119const int32 MSG_SHARE_SELECT	= 'SSel';
120const int32 MSG_SHARE_INVOKE	= 'SInv';
121const int32 MSG_HOST_INFO		= 'HInf';
122const int32 MSG_INET_HOSTS		= 'HInt';
123const int32 MSG_HOST_OK			= 'HOky';
124const int32 MSG_HOST_CANCEL		= 'HCan';
125const int32 MSG_HOST_REFRESH	= 'HRef';
126const int32 MSG_SHARE_OPEN		= 'SOpn';
127const int32 MSG_SHARE_UNMOUNT	= 'SUmt';
128const int32 MSG_NEW_MOUNT		= 'NMnt';
129
130#endif
131