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 InitServerDataExchange(); 20 void InitRosterDataExchange(const BMessenger& rosterMessenger); 21 22 // BMessage based data exchange with the current BMediaRoster 23 status_t SendToRoster(BMessage* msg); 24 25 // BMessage based data exchange with the media_server 26 status_t SendToServer(BMessage* msg); 27 status_t QueryServer(BMessage& request, BMessage& reply); 28 29 // Raw data based data exchange with the media_server 30 status_t SendToServer(int32 msgCode, command_data* msg, size_t size); 31 status_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 35 status_t SendToAddOnServer(int32 msgCode, command_data *msg, size_t size); 36 status_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 40 status_t SendToPort(port_id sendPort, int32 msgCode, command_data* msg, 41 size_t size); 42 status_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 51 using namespace BPrivate::media::dataexchange; 52 53 54 #endif // _DATA_EXCHANGE_H 55