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 <String.h> 19#include <Window.h> 20 21#include "MessageLooper.h" 22#include "ServerConfig.h" 23 24 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 32 33 34class ServerApp; 35class BitmapManager; 36class Desktop; 37 38 39class AppServer : public SERVER_BASE { 40public: 41 AppServer(status_t* status); 42 virtual ~AppServer(); 43 44 virtual void MessageReceived(BMessage* message); 45 virtual bool QuitRequested(); 46 47private: 48 Desktop* _CreateDesktop(uid_t userID, 49 const char* targetScreen); 50 virtual Desktop* _FindDesktop(uid_t userID, 51 const char* targetScreen); 52 53 void _LaunchInputServer(); 54 55private: 56 BObjectList<Desktop> fDesktops; 57 BLocker fDesktopLock; 58}; 59 60 61extern BitmapManager *gBitmapManager; 62extern port_id gAppServerPort; 63 64 65#endif /* APP_SERVER_H */ 66