#ifndef TEST_SERVER_LOOP_ADAPTER_H
#define TEST_SERVER_LOOP_ADAPTER_H
#include "MessageLooper.h"
class BMessage;
class Desktop;
class TestServerLoopAdapter : public MessageLooper {
public:
TestServerLoopAdapter(const char* signature,
const char* looperName, port_id port,
bool initGui, status_t* outError);
virtual ~TestServerLoopAdapter();
virtual port_id MessagePort() const { return fMessagePort; }
virtual status_t Run();
virtual void MessageReceived(BMessage* message) = 0;
virtual bool QuitRequested() { return true; }
private:
virtual void _DispatchMessage(int32 code,
BPrivate::LinkReceiver &link);
virtual Desktop* _FindDesktop(uid_t userID,
const char* targetScreen) = 0;
port_id _CreatePort();
private:
port_id fMessagePort;
};
#endif