Renaming all to VOIP in VOIP plugin (patch from Phenom)

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8231 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
electron128 2015-05-11 19:40:07 +00:00
parent a3b32b92d5
commit b5bf3ce130
29 changed files with 860 additions and 686 deletions

View file

@ -1,4 +1,25 @@
// interface class for p3Voip service
/****************************************************************
* RetroShare is distributed under the following license:
*
* Copyright (C) 2015
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
****************************************************************/
// interface class for p3VOIP service
//
#pragma once
@ -9,18 +30,18 @@
#include <vector>
#include <retroshare/rstypes.h>
class RsVoip ;
extern RsVoip *rsVoip;
class RsVOIP ;
extern RsVOIP *rsVOIP;
static const uint32_t CONFIG_TYPE_VOIP_PLUGIN = 0xe001 ;
class RsVoipPongResult
class RsVOIPPongResult
{
public:
RsVoipPongResult()
RsVOIPPongResult()
:mTS(0), mRTT(0), mOffset(0) { return; }
RsVoipPongResult(double ts, double rtt, double offset)
RsVOIPPongResult(double ts, double rtt, double offset)
:mTS(ts), mRTT(rtt), mOffset(offset) { return; }
double mTS;
@ -28,16 +49,16 @@ class RsVoipPongResult
double mOffset;
};
struct RsVoipDataChunk
struct RsVOIPDataChunk
{
typedef enum { RS_VOIP_DATA_TYPE_AUDIO, RS_VOIP_DATA_TYPE_VIDEO } RsVoipDataType ;
typedef enum { RS_VOIP_DATA_TYPE_AUDIO, RS_VOIP_DATA_TYPE_VIDEO } RsVOIPDataType ;
void *data ; // create/delete using malloc/free.
uint32_t size ;
RsVoipDataType type ; // video or audio
RsVOIPDataType type ; // video or audio
};
class RsVoip
class RsVOIP
{
public:
virtual int sendVoipHangUpCall(const RsPeerId& peer_id) = 0;
@ -45,12 +66,12 @@ class RsVoip
virtual int sendVoipAcceptCall(const RsPeerId& peer_id) = 0;
// Sending data. The client keeps the memory ownership and must delete it after calling this.
virtual int sendVoipData(const RsPeerId& peer_id,const RsVoipDataChunk& chunk) = 0;
virtual int sendVoipData(const RsPeerId& 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 RsPeerId& peer_id,std::vector<RsVoipDataChunk>& chunks) = 0;
virtual bool getIncomingData(const RsPeerId& peer_id,std::vector<RsVOIPDataChunk>& chunks) = 0;
typedef enum { AudioTransmitContinous = 0, AudioTransmitVAD = 1, AudioTransmitPushToTalk = 2 } enumAudioTransmit ;
@ -71,7 +92,7 @@ class RsVoip
virtual bool getVoipEchoCancel() const = 0 ;
virtual void setVoipEchoCancel(bool) = 0 ;
virtual uint32_t getPongResults(const RsPeerId& id, int n, std::list<RsVoipPongResult> &results) = 0;
virtual uint32_t getPongResults(const RsPeerId& id, int n, std::list<RsVOIPPongResult> &results) = 0;
};