xref: /haiku/src/servers/net/NetServer.cpp (revision 67bce78b48ed6d01b5a8eef89f5694c372b7e0a1)
1 //-----------------------------------------------------------------------
2 //  This software is part of the OpenBeOS distribution and is covered
3 //  by the OpenBeOS license.
4 //
5 //  Copyright (c) 2004 Waldemar Kornewald, Waldemar.Kornewald@web.de
6 //-----------------------------------------------------------------------
7 
8 #include "NetServer.h"
9 #include <Application.h>
10 #include <Alert.h>
11 
12 
13 static const char *kSignature = NET_SERVER_SIGNATURE;
14 
15 
16 class NetServerApplication : public BApplication {
17 	public:
18 		NetServerApplication();
19 
20 		virtual void AboutRequested();
21 		virtual void ReadyToRun();
22 			// loads add-ons
23 		virtual bool QuitRequested();
24 			// unloads add-ons
25 };
26 
27 
28 int main()
29 {
30 	new NetServerApplication();
31 
32 	be_app->Run();
33 
34 	delete be_app;
35 
36 	return 0;
37 }
38 
39 
40 NetServerApplication::NetServerApplication()
41 	: BApplication(kSignature)
42 {
43 }
44 
45 
46 void
47 NetServerApplication::AboutRequested()
48 {
49 	// the alert should not block because we might get _very_ important messages
50 	(new BAlert("About...",
51 		"OpenBeOS net_server\n\n"
52 		"The net_server manages all userland tasks that "
53 		"cannot be handled by the netstack.",
54 		"Uhm...Cool?", NULL, NULL, B_WIDTH_AS_USUAL,
55 		B_INFO_ALERT))->Go(NULL);
56 }
57 
58 
59 void
60 NetServerApplication::ReadyToRun()
61 {
62 	// load integrated add-ons
63 
64 
65 	// TODO: load add-on binaries
66 }
67 
68 
69 bool
70 NetServerApplication::QuitRequested()
71 {
72 	// unload integrated add-ons
73 
74 
75 	// TODO: unload add-on binaries
76 
77 	return true;
78 }
79