2012-02-18 10:56:37 -05:00
|
|
|
// interface class for p3Voip service
|
|
|
|
//
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
2012-02-19 10:07:47 -05:00
|
|
|
class RsVoip ;
|
|
|
|
extern RsVoip *rsVoip;
|
|
|
|
|
2012-02-18 15:30:10 -05:00
|
|
|
static const uint32_t CONFIG_TYPE_VOIP_PLUGIN = 0xe001 ;
|
|
|
|
static const uint32_t RS_SERVICE_TYPE_VOIP_PLUGIN = 0xe001 ;
|
2012-02-18 11:15:37 -05:00
|
|
|
|
2012-02-19 10:07:47 -05:00
|
|
|
class RsVoipPongResult
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
RsVoipPongResult()
|
|
|
|
:mTS(0), mRTT(0), mOffset(0) { return; }
|
|
|
|
|
|
|
|
RsVoipPongResult(double ts, double rtt, double offset)
|
|
|
|
:mTS(ts), mRTT(rtt), mOffset(offset) { return; }
|
|
|
|
|
|
|
|
double mTS;
|
|
|
|
double mRTT;
|
|
|
|
double mOffset;
|
|
|
|
};
|
|
|
|
|
|
|
|
class RsVoip
|
2012-02-18 10:56:37 -05:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual int sendVoipData(const void *data,uint32_t size) = 0;
|
|
|
|
|
|
|
|
typedef enum { AudioTransmitContinous = 0, AudioTransmitVAD = 1, AudioTransmitPushToTalk = 2 } enumAudioTransmit ;
|
|
|
|
|
|
|
|
// Config stuff
|
|
|
|
|
|
|
|
virtual int getVoipATransmit() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipATransmit(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual int getVoipVoiceHold() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipVoiceHold(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual int getVoipfVADmin() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipfVADmin(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual int getVoipfVADmax() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipfVADmax(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual int getVoipiNoiseSuppress() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipiNoiseSuppress(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual int getVoipiMinLoudness() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipiMinLoudness(int) = 0 ;
|
2012-02-18 10:56:37 -05:00
|
|
|
virtual bool getVoipEchoCancel() const = 0 ;
|
2012-02-18 15:30:10 -05:00
|
|
|
virtual void setVoipEchoCancel(bool) = 0 ;
|
2012-02-19 10:07:47 -05:00
|
|
|
|
|
|
|
virtual uint32_t getPongResults(std::string id, int n, std::list<RsVoipPongResult> &results) = 0;
|
2012-02-18 10:56:37 -05:00
|
|
|
};
|
2012-02-19 10:07:47 -05:00
|
|
|
|
|
|
|
|