1 /* 2 * Copyright 2001-2015, Haiku, Inc. 3 * Distributed under the terms of the MIT license. 4 * 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 11 12 13 #include <Application.h> 14 #include <List.h> 15 #include <Locker.h> 16 #include <ObjectList.h> 17 #include <OS.h> 18 #include <Server.h> 19 #include <String.h> 20 #include <Window.h> 21 22 #include "MessageLooper.h" 23 #include "ServerConfig.h" 24 25 26 class ServerApp; 27 class BitmapManager; 28 class Desktop; 29 30 31 class AppServer : public BServer { 32 public: 33 AppServer(status_t* status); 34 virtual ~AppServer(); 35 36 virtual void MessageReceived(BMessage* message); 37 virtual bool QuitRequested(); 38 39 private: 40 Desktop* _CreateDesktop(uid_t userID, 41 const char* targetScreen); 42 Desktop* _FindDesktop(uid_t userID, 43 const char* targetScreen); 44 45 void _LaunchInputServer(); 46 47 private: 48 BObjectList<Desktop> fDesktops; 49 BLocker fDesktopLock; 50 }; 51 52 53 extern BitmapManager *gBitmapManager; 54 extern port_id gAppServerPort; 55 56 57 #endif /* APP_SERVER_H */ 58