xref: /haiku/headers/private/media/DataExchange.h (revision b55a57da7173b9af0432bd3e148d03f06161d036)
1 /*
2  * Copyright 2002, Marcus Overhagen. All rights reserved.
3  * Copyright 2009, Axel Dörfler, axeld@pinc-software.de.
4  *
5  * Distributed under the terms of the MIT License.
6  */
7 #ifndef _DATA_EXCHANGE_H
8 #define _DATA_EXCHANGE_H
9 
10 
11 #include <ServerInterface.h>
12 
13 
14 namespace BPrivate {
15 namespace media {
16 namespace dataexchange {
17 
18 
19 void InitDataExchange();
20 
21 // BMessage based data exchange with the media_server
22 status_t SendToServer(BMessage* msg);
23 status_t QueryServer(BMessage& request, BMessage& reply);
24 
25 // Raw data based data exchange with the media_server
26 status_t SendToServer(int32 msgCode, command_data* msg, size_t size);
27 status_t QueryServer(int32 msgCode, request_data* request, size_t requestSize,
28 	reply_data* reply, size_t replySize);
29 
30 // Raw data based data exchange with the media_addon_server
31 status_t SendToAddOnServer(int32 msgCode, command_data *msg, size_t size);
32 status_t QueryAddOnServer(int32 msgCode, request_data* request,
33 	size_t requestSize, reply_data* reply, size_t replySize);
34 
35 // Raw data based data exchange with any (media node control-) port
36 status_t SendToPort(port_id sendPort, int32 msgCode, command_data* msg,
37 	size_t size);
38 status_t QueryPort(port_id requestPort, int32 msgCode, request_data* request,
39 	size_t requestSize, reply_data* reply, size_t replySize);
40 
41 
42 }	// namespace dataexchange
43 }	// namespace media
44 }	// namespace BPrivate
45 
46 
47 using namespace BPrivate::media::dataexchange;
48 
49 
50 #endif // _DATA_EXCHANGE_H
51