added special VOIP buttons to chat dialog through plugin

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4989 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-02-25 12:18:40 +00:00
parent 96fd780502
commit 12b3ed02f1
8 changed files with 343 additions and 48 deletions

View file

@ -25,14 +25,27 @@ class RsVoipPongResult
double mOffset;
};
struct RsVoipDataChunk
{
void *data ; // create/delete using malloc/free.
uint32_t size ;
};
class RsVoip
{
public:
virtual int sendVoipData(const std::string& peer_id,const void *data,uint32_t size) = 0;
virtual int sendVoipHangUpCall(const std::string& peer_id) = 0;
virtual int sendVoipRinging(const std::string& peer_id) = 0;
virtual int sendVoipAcceptCall(const std::string& peer_id) = 0;
// Sending data. The client keeps the memory ownership and must delete it after calling this.
virtual int sendVoipData(const std::string& peer_id,const RsVoipDataChunk& chunk) = 0;
// The server fill in the data and gives up memory ownership. The client must delete the memory
// in each chunk once it has been used.
//
virtual bool getIncomingData(const std::string& peer_id,std::vector<RsVoipDataChunk>& chunks) = 0;
typedef enum { AudioTransmitContinous = 0, AudioTransmitVAD = 1, AudioTransmitPushToTalk = 2 } enumAudioTransmit ;
// Config stuff