DataExchange.h revision 32afe10a
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
14namespace BPrivate {
15namespace media {
16namespace dataexchange {
17
18
19void InitServerDataExchange();
20void InitRosterDataExchange(const BMessenger& rosterMessenger);
21
22// BMessage based data exchange with the current BMediaRoster
23status_t SendToRoster(BMessage* msg);
24
25// BMessage based data exchange with the media_server
26status_t SendToServer(BMessage* msg);
27status_t QueryServer(BMessage& request, BMessage& reply);
28
29// Raw data based data exchange with the media_server
30status_t SendToServer(int32 msgCode, command_data* msg, size_t size);
31status_t QueryServer(int32 msgCode, request_data* request, size_t requestSize,
32	reply_data* reply, size_t replySize);
33
34// Raw data based data exchange with the media_addon_server
35status_t SendToAddOnServer(int32 msgCode, command_data *msg, size_t size);
36status_t QueryAddOnServer(int32 msgCode, request_data* request,
37	size_t requestSize, reply_data* reply, size_t replySize);
38
39// Raw data based data exchange with any (media node control-) port
40status_t SendToPort(port_id sendPort, int32 msgCode, command_data* msg,
41	size_t size);
42status_t QueryPort(port_id requestPort, int32 msgCode, request_data* request,
43	size_t requestSize, reply_data* reply, size_t replySize);
44
45
46}	// namespace dataexchange
47}	// namespace media
48}	// namespace BPrivate
49
50
51using namespace BPrivate::media::dataexchange;
52
53
54#endif // _DATA_EXCHANGE_H
55