* Added a private API class BServer, a BApplication subclass especially

for servers, that don't have a GUI or want to control when the app server
  connection is established.
* BServer is necessarily a friend of BApplication, for it uses a private
  constructor. Hence BApplication::Private::InitGUIContext() is no longer
  needed.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13315 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Ingo Weinhold
2005-06-28 14:53:29 +00:00
parent 7e5f681ff4
commit 9351453415
5 changed files with 46 additions and 4 deletions
+3 -1
View File
@@ -24,11 +24,11 @@ class BWindow;
class _BSession_;
class BResources;
class BMessageRunner;
class BServer;
struct _server_heap_;
struct _drag_data_;
namespace BPrivate {
class AppServerLink;
class PortLink;
}
@@ -98,6 +98,8 @@ private:
class Private;
friend class Private;
friend class BServer;
BApplication(const char* signature, bool initGUI,
status_t* error);
BApplication(uint32 signature);
-3
View File
@@ -12,9 +12,6 @@
class BApplication::Private {
public:
static inline status_t InitGUIContext()
{ return be_app->_InitGUIContext(); }
static inline BPrivate::PortLink *ServerLink()
{ return be_app->fServerLink; }
};
+20
View File
@@ -0,0 +1,20 @@
/*
* Copyright 2005, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold <[email protected]>
*/
#ifndef _SERVER_H
#define _SERVER_H
#include <Application.h>
class BServer : public BApplication {
public:
BServer(const char* signature, bool initGUI, status_t* error);
status_t InitGUIContext();
};
#endif // _SERVER_H
+22
View File
@@ -0,0 +1,22 @@
/*
* Copyright 2005, Haiku.
* Distributed under the terms of the MIT License.
*
* Authors:
* Ingo Weinhold <[email protected]>
*/
#include <Server.h>
// constructor
BServer::BServer(const char* signature, bool initGUI, status_t* error)
: BApplication(signature, initGUI, error)
{
}
// InitGUIContext
status_t
BServer::InitGUIContext()
{
return _InitGUIContext();
}
+1
View File
@@ -29,6 +29,7 @@ APP_KIT_SOURCE =
RegistrarThreadManager.cpp
Roster.cpp
RosterPrivate.cpp
Server.cpp
ServerMemIO.cpp
TokenSpace.cpp
TypeConstants.cpp