Switch to Be Inc media server signature, to allow libbe.so sending messages to the server.

Added support for system sound events. They are triggered by libbe.so sending a message to the media addon server.


git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8577 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
beveloper 2004-08-15 12:14:06 +00:00
parent c80e05b8fc
commit 8f30ef9e20
2 changed files with 10 additions and 1 deletions

View File

@ -10,6 +10,7 @@ SubDirHdrs [ FDirName $(OBOS_TOP) src servers media ] ;
Server media_addon_server :
main.cpp
MediaFilePlayer.cpp
SystemTimeSource.cpp
;
LinkSharedOSLibs media_addon_server : be libmedia.so root ;

View File

@ -51,6 +51,7 @@ char __dont_remove_copyright_from_binary[] = "Copyright (c) 2002, 2003 Marcus Ov
#include "MediaMisc.h"
#include "MediaRosterEx.h"
#include "SystemTimeSource.h"
#include "MediaFilePlayer.h"
//#define USER_ADDON_PATH "../add-ons/media"
@ -643,6 +644,13 @@ MediaAddonServer::MessageReceived(BMessage *msg)
{
switch (msg->what)
{
case '_TRU':
{
PlayMediaFile(msg->FindString("be:media_type"), msg->FindString("be:media_name"));
msg->SendReply(B_OK); // XXX don't know which reply is expected
return;
}
case B_NODE_MONITOR:
{
switch (msg->FindInt32("opcode"))
@ -711,7 +719,7 @@ MediaAddonServer::MessageReceived(BMessage *msg)
int main()
{
new MediaAddonServer("application/x-vnd.OpenBeOS-addon-host");
new MediaAddonServer(B_MEDIA_ADDON_SERVER_SIGNATURE);
be_app->Run();
return 0;
}