2 * Copyright 2001-2015, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
6 * DarkWyrm <bpmagic@columbus.rr.com>
7 * Axel Dörfler, axeld@pinc-software.de
8 * Julian Harnath, <julian.harnath@rwth-aachen.de>
10 #ifndef TEST_SERVER_LOOP_ADAPTER_H
11 #define TEST_SERVER_LOOP_ADAPTER_H
13 #include "MessageLooper.h"
20 class TestServerLoopAdapter
: public MessageLooper
{
22 TestServerLoopAdapter(const char* signature
,
23 const char* looperName
, port_id port
,
24 bool initGui
, status_t
* outError
);
25 virtual ~TestServerLoopAdapter();
27 // MessageLooper interface
28 virtual port_id
MessagePort() const { return fMessagePort
; }
31 // BApplication interface
32 virtual void MessageReceived(BMessage
* message
) = 0;
33 virtual bool QuitRequested() { return true; }
36 // MessageLooper interface
37 virtual void _DispatchMessage(int32 code
,
38 BPrivate::LinkReceiver
&link
);
40 virtual Desktop
* _FindDesktop(uid_t userID
,
41 const char* targetScreen
) = 0;
42 port_id
_CreatePort();
51 #endif // TEST_SERVER_LOOP_ADAPTER_H