app_server: fix test-app_server for launch_daemon changes
* Make test-app_server work again in a launch_daemon environment * test_registrar gets a separate signature and port name again so the host system can distinguish it from the system registrar * AppServer is normally a BServer now, however, there can't be two BApplications in one team. A class TestServerLoopAdapter is added, which becomes the base class of AppServer instead of BServer when compiling for libbe_test. It's an adapter class which looks towards AppServer as it if was a BServer, but internally it is derived from MessageLooper (like the old AppServer before the transition to BServer). This way, AppServer can stay a BServer in normal builds and it also avoids having to use too many #ifdefs to distinguish the two versions.
This commit is contained in:
@@ -23,7 +23,14 @@ namespace BPrivate {
|
||||
extern const char* kRAppLooperPortName;
|
||||
|
||||
|
||||
#define B_REGISTRAR_SIGNATURE "application/x-vnd.haiku-registrar"
|
||||
#ifndef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
||||
# define B_REGISTRAR_SIGNATURE "application/x-vnd.haiku-registrar"
|
||||
# define B_REGISTRAR_PORT_NAME "system:roster"
|
||||
#else
|
||||
# define B_REGISTRAR_SIGNATURE "application/x-vnd.test-registrar"
|
||||
# define B_REGISTRAR_PORT_NAME "haiku-test:roster"
|
||||
#endif
|
||||
|
||||
#define B_REGISTRAR_AUTHENTICATION_PORT_NAME "auth"
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,10 @@
|
||||
#include <SupportDefs.h>
|
||||
|
||||
|
||||
#ifdef HAIKU_TARGET_PLATFORM_LIBBE_TEST
|
||||
# define SERVER_PORT_NAME "haiku-test:app_server"
|
||||
#endif
|
||||
|
||||
#if TEST_MODE
|
||||
# define SERVER_INPUT_PORT "haiku-test:input port"
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user