vfs: check userland buffers before reading them.
[haiku.git] / src / servers / app / AppServer.h
blobe25beaad58e203150c73742e5261156ef74e65dc
1 /*
2 * Copyright 2001-2015, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
5 * Authors:
6 * DarkWyrm <bpmagic@columbus.rr.com>
7 * Axel Dörfler, axeld@pinc-software.de
8 */
9 #ifndef APP_SERVER_H
10 #define APP_SERVER_H
13 #include <Application.h>
14 #include <List.h>
15 #include <Locker.h>
16 #include <ObjectList.h>
17 #include <OS.h>
18 #include <String.h>
19 #include <Window.h>
21 #include "MessageLooper.h"
22 #include "ServerConfig.h"
25 #ifndef HAIKU_TARGET_PLATFORM_LIBBE_TEST
26 # include <Server.h>
27 # define SERVER_BASE BServer
28 #else
29 # include "TestServerLoopAdapter.h"
30 # define SERVER_BASE TestServerLoopAdapter
31 #endif
34 class ServerApp;
35 class BitmapManager;
36 class Desktop;
39 class AppServer : public SERVER_BASE {
40 public:
41 AppServer(status_t* status);
42 virtual ~AppServer();
44 virtual void MessageReceived(BMessage* message);
45 virtual bool QuitRequested();
47 private:
48 Desktop* _CreateDesktop(uid_t userID,
49 const char* targetScreen);
50 virtual Desktop* _FindDesktop(uid_t userID,
51 const char* targetScreen);
53 void _LaunchInputServer();
55 private:
56 BObjectList<Desktop> fDesktops;
57 BLocker fDesktopLock;
61 extern BitmapManager *gBitmapManager;
62 extern port_id gAppServerPort;
65 #endif /* APP_SERVER_H */