SaveState is now called from the media_server
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@5554 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e976b957c3
commit
96ee2f2de0
@ -27,7 +27,6 @@ MMediaFilesManager::~MMediaFilesManager()
|
||||
{
|
||||
CALLED();
|
||||
delete fRunner;
|
||||
SaveState();
|
||||
delete fRegistryMap;
|
||||
delete fLocker;
|
||||
}
|
||||
@ -144,6 +143,7 @@ MMediaFilesManager::LoadState()
|
||||
status_t
|
||||
MMediaFilesManager::SaveState()
|
||||
{
|
||||
CALLED();
|
||||
status_t err = B_OK;
|
||||
BPath path;
|
||||
if((err = find_directory(B_USER_SETTINGS_DIRECTORY, &path))!=B_OK)
|
||||
@ -181,7 +181,9 @@ MMediaFilesManager::SaveState()
|
||||
file.Write(&zero, sizeof(uint32));
|
||||
}
|
||||
file.Write(&zero, sizeof(uint32));
|
||||
|
||||
|
||||
printf("save state ok\n");
|
||||
|
||||
return B_OK;
|
||||
}
|
||||
|
||||
|
@ -107,7 +107,7 @@ private:
|
||||
|
||||
BLocker *fLocker;
|
||||
|
||||
void MessageReceived(BMessage *msg);
|
||||
virtual void MessageReceived(BMessage *msg);
|
||||
typedef BApplication inherited;
|
||||
};
|
||||
|
||||
@ -171,6 +171,7 @@ bool
|
||||
ServerApp::QuitRequested()
|
||||
{
|
||||
TRACE("ServerApp::QuitRequested()\n");
|
||||
gMMediaFilesManager->SaveState();
|
||||
gNodeManager->SaveState();
|
||||
gAppManager->TerminateAddonServer();
|
||||
return true;
|
||||
@ -691,7 +692,8 @@ ServerApp::controlthread(void *arg)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void ServerApp::MessageReceived(BMessage *msg)
|
||||
void
|
||||
ServerApp::MessageReceived(BMessage *msg)
|
||||
{
|
||||
TRACE("ServerApp::MessageReceived %lx enter\n", msg->what);
|
||||
switch (msg->what) {
|
||||
@ -699,9 +701,9 @@ void ServerApp::MessageReceived(BMessage *msg)
|
||||
case MEDIA_SERVER_CANCEL_NOTIFICATIONS: gNotificationManager->EnqueueMessage(msg); break;
|
||||
case MEDIA_SERVER_SEND_NOTIFICATIONS: gNotificationManager->EnqueueMessage(msg); break;
|
||||
case MMEDIAFILESMANAGER_SAVE_TIMER: gMMediaFilesManager->TimerMessage(); break;
|
||||
default:
|
||||
printf("\nnew media server: unknown message received\n");
|
||||
msg->PrintToStream();
|
||||
default: inherited::MessageReceived(msg); break;
|
||||
//printf("\nnew media server: unknown message received\n");
|
||||
//msg->PrintToStream();
|
||||
}
|
||||
TRACE("ServerApp::MessageReceived %lx leave\n", msg->what);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user