media_server: Initial move to BServer
This commit is contained in:
parent
6501f7fb63
commit
1199f321ea
@ -2,7 +2,7 @@ SubDir HAIKU_TOP src servers media ;
|
|||||||
|
|
||||||
SetSubDirSupportedPlatformsBeOSCompatible ;
|
SetSubDirSupportedPlatformsBeOSCompatible ;
|
||||||
|
|
||||||
UsePrivateHeaders media shared storage ;
|
UsePrivateHeaders media shared storage app ;
|
||||||
UsePrivateSystemHeaders ;
|
UsePrivateSystemHeaders ;
|
||||||
|
|
||||||
AddResources media_server : media_server.rdef ;
|
AddResources media_server : media_server.rdef ;
|
||||||
|
@ -37,7 +37,7 @@ char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002, 2003 "
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include <Alert.h>
|
#include <Alert.h>
|
||||||
#include <Application.h>
|
#include <Server.h>
|
||||||
#include <Autolock.h>
|
#include <Autolock.h>
|
||||||
#include <Directory.h>
|
#include <Directory.h>
|
||||||
#include <Roster.h>
|
#include <Roster.h>
|
||||||
@ -69,10 +69,10 @@ NotificationManager* gNotificationManager;
|
|||||||
#define REPLY_TIMEOUT ((bigtime_t)500000)
|
#define REPLY_TIMEOUT ((bigtime_t)500000)
|
||||||
|
|
||||||
|
|
||||||
class ServerApp : BApplication {
|
class ServerApp : public BServer {
|
||||||
public:
|
public:
|
||||||
ServerApp();
|
ServerApp(status_t& error);
|
||||||
~ServerApp();
|
virtual ~ServerApp();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void ArgvReceived(int32 argc, char** argv);
|
virtual void ArgvReceived(int32 argc, char** argv);
|
||||||
@ -89,7 +89,7 @@ private:
|
|||||||
private:
|
private:
|
||||||
port_id _ControlPort() const { return fControlPort; }
|
port_id _ControlPort() const { return fControlPort; }
|
||||||
|
|
||||||
static int32 _ControlThread(void* arg);
|
static int32 _ControlThread(void* arg);
|
||||||
|
|
||||||
BLocker fLocker;
|
BLocker fLocker;
|
||||||
port_id fControlPort;
|
port_id fControlPort;
|
||||||
@ -97,9 +97,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ServerApp::ServerApp()
|
ServerApp::ServerApp(status_t& error)
|
||||||
:
|
:
|
||||||
BApplication(B_MEDIA_SERVER_SIGNATURE),
|
BServer(B_MEDIA_SERVER_SIGNATURE, true, &error),
|
||||||
fLocker("media server locker")
|
fLocker("media server locker")
|
||||||
{
|
{
|
||||||
gNotificationManager = new NotificationManager;
|
gNotificationManager = new NotificationManager;
|
||||||
@ -971,8 +971,11 @@ ServerApp::MessageReceived(BMessage* msg)
|
|||||||
int
|
int
|
||||||
main()
|
main()
|
||||||
{
|
{
|
||||||
new ServerApp;
|
status_t status;
|
||||||
be_app->Run();
|
ServerApp app(status);
|
||||||
delete be_app;
|
|
||||||
return 0;
|
if (status == B_OK)
|
||||||
|
app.Run();
|
||||||
|
|
||||||
|
return status == B_OK ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user