BMediaRoster: Add B_MEDIA_SERVER_STARTED and B_MEDIA_SERVER_QUIT
* This is done by watching to registrar notifications and providing a minimal service to contact the media roster in private API. The roster use this service to automatically reconnect to the media_server.
This commit is contained in:
@@ -47,8 +47,10 @@ enum {
|
||||
B_MEDIA_NEW_PARAMETER_VALUE, /* N "node", "parameter", "when", */
|
||||
/* "value" */
|
||||
B_MEDIA_NODE_STOPPED, /* N "node", "when" */
|
||||
B_MEDIA_FLAVORS_CHANGED /* "be:addon_id", "be:new_count", */
|
||||
B_MEDIA_FLAVORS_CHANGED, /* "be:addon_id", "be:new_count", */
|
||||
/* "be:gone_count" */
|
||||
B_MEDIA_SERVER_STARTED,
|
||||
B_MEDIA_SERVER_QUIT
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -16,7 +16,11 @@ namespace media {
|
||||
namespace dataexchange {
|
||||
|
||||
|
||||
void InitDataExchange();
|
||||
void InitServerDataExchange();
|
||||
void InitRosterDataExchange(const BMessenger& rosterMessenger);
|
||||
|
||||
// BMessage based data exchange with the current BMediaRoster
|
||||
status_t SendToRoster(BMessage* msg);
|
||||
|
||||
// BMessage based data exchange with the media_server
|
||||
status_t SendToServer(BMessage* msg);
|
||||
|
||||
@@ -88,6 +88,8 @@ public:
|
||||
|
||||
BTimeSource* MakeTimeSourceObject(media_node_id timesource_id);
|
||||
|
||||
status_t BuildConnections();
|
||||
|
||||
private:
|
||||
friend class BMediaRoster;
|
||||
};
|
||||
|
||||
@@ -32,6 +32,12 @@ enum {
|
||||
MEDIA_ADD_ON_SERVER_PLAY_MEDIA = '_TRU'
|
||||
};
|
||||
|
||||
enum {
|
||||
// local media services status notification service
|
||||
MEDIA_ROSTER_REQUEST_NOTIFICATIONS = 2000,
|
||||
MEDIA_ROSTER_CANCEL_NOTIFICATIONS
|
||||
};
|
||||
|
||||
// Raw port based communication
|
||||
enum {
|
||||
GENERAL_PURPOSE_WAKEUP = 0, // when no action but wait termination needed
|
||||
|
||||
Reference in New Issue
Block a user