usb_ecm: Use the current configuration instead of a fixed one.
[haiku.git] / src / servers / app / TestServerLoopAdapter.h
blobf3d2879f6eb5a3994ed8b26b82bf4c54777dbdce
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 * Julian Harnath, <julian.harnath@rwth-aachen.de>
9 */
10 #ifndef TEST_SERVER_LOOP_ADAPTER_H
11 #define TEST_SERVER_LOOP_ADAPTER_H
13 #include "MessageLooper.h"
16 class BMessage;
17 class Desktop;
20 class TestServerLoopAdapter : public MessageLooper {
21 public:
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; }
29 virtual bool Run();
31 // BApplication interface
32 virtual void MessageReceived(BMessage* message) = 0;
33 virtual bool QuitRequested() { return true; }
35 private:
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();
46 private:
47 port_id fMessagePort;
51 #endif // TEST_SERVER_LOOP_ADAPTER_H