* Cleanup.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34541 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2009-12-07 21:32:59 +00:00
parent 9834d875d0
commit 559a6a891c
+56 -42
View File
@@ -9,52 +9,66 @@
#include <MediaNode.h> #include <MediaNode.h>
#define NOTIFICATION_PARAM_WHAT "be:media:internal:what"
#define NOTIFICATION_PARAM_TEAM "be:media:internal:team"
#define NOTIFICATION_PARAM_MESSENGER "be:media:internal:messenger"
namespace BPrivate { namespace BPrivate {
namespace media { namespace media {
namespace notifications { namespace notifications {
/*
* This are the possible notifications that can be watched. /*! This are the possible notifications that can be watched.
* The notifications marked with "N" are only send when the The notifications marked with "N" are only send when the
* media_node specific BMediaRoster::StartWatching() is used media_node specific BMediaRoster::StartWatching() is used
* and the notification belongs to the watched node. and the notification belongs to the watched node.
*
* In addition, anyone watching a specific node will also receive In addition, anyone watching a specific node will also receive
* error notifications generated by BMediaNode::ReportError() error notifications generated by BMediaNode::ReportError()
*
* B_MEDIA_WILDCARD used to match any notification in Start/StopWatching B_MEDIA_WILDCARD used to match any notification in
* B_MEDIA_NODE_CREATED "media_node_id" (multiple items) Start/StopWatching
* B_MEDIA_NODE_DELETED "media_node_id" (multiple items) B_MEDIA_NODE_CREATED "media_node_id" (multiple items)
* B_MEDIA_CONNECTION_MADE "output", "input", "format" B_MEDIA_NODE_DELETED "media_node_id" (multiple items)
* B_MEDIA_CONNECTION_BROKEN "source", "destination" B_MEDIA_CONNECTION_MADE "output", "input", "format"
* B_MEDIA_BUFFER_CREATED "clone_info" -- handled by BMediaRoster B_MEDIA_CONNECTION_BROKEN "source", "destination"
* B_MEDIA_BUFFER_DELETED "media_buffer_id" -- handled by BMediaRoster B_MEDIA_BUFFER_CREATED "clone_info" -- handled by BMediaRoster
* B_MEDIA_TRANSPORT_STATE "state", "location", "realtime" B_MEDIA_BUFFER_DELETED "media_buffer_id" -- handled by
* B_MEDIA_PARAMETER_CHANGED N "node", "parameter" BMediaRoster
* B_MEDIA_FORMAT_CHANGED N "source", "destination", "format" B_MEDIA_TRANSPORT_STATE "state", "location", "realtime"
* B_MEDIA_WEB_CHANGED N "node" B_MEDIA_PARAMETER_CHANGED N "node", "parameter"
* B_MEDIA_DEFAULT_CHANGED "default", "node" -- handled by BMediaRoster B_MEDIA_FORMAT_CHANGED N "source", "destination", "format"
* B_MEDIA_NEW_PARAMETER_VALUE N "node", "parameter", "when", "value" B_MEDIA_WEB_CHANGED N "node"
* B_MEDIA_NODE_STOPPED N "node", "when" B_MEDIA_DEFAULT_CHANGED "default", "node" -- handled by
* B_MEDIA_FLAVORS_CHANGED "be:addon_id", "be:new_count", "be:gone_count" BMediaRoster
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",
"be:gone_count"
*/ */
// used for BMediaRoster::StartWatching() parameter validation // used for BMediaRoster::StartWatching() parameter validation
bool IsValidNotificationRequest(bool node_specific, int32 notification); bool IsValidNotificationRequest(bool node_specific, int32 notification);
// called by BMediaRoster::StartWatching() // called by BMediaRoster::StartWatching()
status_t Register(const BMessenger &notifyHandler, const media_node &node, int32 notification); status_t Register(const BMessenger& notifyHandler, const media_node& node,
int32 notification);
// called by BMediaRoster::StopWatching() // called by BMediaRoster::StopWatching()
status_t Unregister(const BMessenger &notifyHandler, const media_node &node, int32 notification); status_t Unregister(const BMessenger& notifyHandler, const media_node& node,
int32 notification);
// called by BMediaNode::ReportError() // called by BMediaNode::ReportError()
status_t ReportError(const media_node &node, BMediaNode::node_error what, const BMessage * info); status_t ReportError(const media_node& node, BMediaNode::node_error what,
const BMessage* info);
void NodesCreated(const media_node_id* ids, int32 count); void NodesCreated(const media_node_id* ids, int32 count);
void NodesDeleted(const media_node_id* ids, int32 count); void NodesDeleted(const media_node_id* ids, int32 count);
void ConnectionMade(const media_input &input, const media_output &output, const media_format &format); void ConnectionMade(const media_input& input, const media_output& output,
void ConnectionBroken(const media_source &source, const media_destination &destination); const media_format& format);
void ConnectionBroken(const media_source& source,
const media_destination& destination);
void BuffersCreated(area_info* areas, int32 count); void BuffersCreated(area_info* areas, int32 count);
void BuffersDeleted(const media_buffer_id* ids, int32 count); void BuffersDeleted(const media_buffer_id* ids, int32 count);
@@ -62,29 +76,29 @@ namespace notifications {
void NodeStopped(const media_node& node, bigtime_t when); void NodeStopped(const media_node& node, bigtime_t when);
// called by BControllable::BroadcastChangedParameter() // called by BControllable::BroadcastChangedParameter()
status_t ParameterChanged(const media_node &node, int32 parameterid); status_t ParameterChanged(const media_node& node, int32 parameterID);
// called by BControllable::SetParameterWeb() // called by BControllable::SetParameterWeb()
void WebChanged(const media_node& node); void WebChanged(const media_node& node);
// called by BControllable::BroadcastNewParameterValue() // called by BControllable::BroadcastNewParameterValue()
status_t NewParameterValue(const media_node &node, int32 parameterid, bigtime_t when, const void *param, size_t paramsize); status_t NewParameterValue(const media_node& node, int32 parameterID,
bigtime_t when, const void* parameter, size_t parameterSize);
// called by the media_addon_server AFTER a flavor change has been // called by the media_addon_server AFTER a flavor change has been
// handled. NOT CALLED by BMediaAddOn::NotifyFlavorChange() // handled. NOT CALLED by BMediaAddOn::NotifyFlavorChange()
void FlavorsChanged(media_addon_id addonid, int32 newcount, int32 gonecount); void FlavorsChanged(media_addon_id addOnID, int32 newCount,
int32 goneCount);
void FormatChanged(const media_source &source, const media_destination &destination, const media_format &format); void FormatChanged(const media_source& source,
const media_destination& destination,
const media_format& format);
// XXX missing: B_MEDIA_TRANSPORT_STATE /* "state", "location", "realtime" */ // TODO: missing: B_MEDIA_TRANSPORT_STATE "state", "location", "realtime"
// XXX missing: B_MEDIA_DEFAULT_CHANGED /* "default", "node" */ // TODO: missing: B_MEDIA_DEFAULT_CHANGED "default", "node"
}; // namespace notifications } // namespace notifications
}; // namespace media } // namespace media
}; // namespace BPrivate } // namespace BPrivate
#define NOTIFICATION_PARAM_WHAT "be:media:internal:what"
#define NOTIFICATION_PARAM_TEAM "be:media:internal:team"
#define NOTIFICATION_PARAM_MESSENGER "be:media:internal:messenger"
#endif // _NOTIFICATIONS_H #endif // _NOTIFICATIONS_H