RTCOfferAnswerOptions.h [plain text]
#ifndef RTCOfferAnswerOptions_h
#define RTCOfferAnswerOptions_h
#if ENABLE(MEDIA_STREAM)
#include "Dictionary.h"
#include "ExceptionCode.h"
#include "RTCOfferAnswerOptionsPrivate.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefCounted.h>
namespace WebCore {
class Dictionary;
class RTCOfferAnswerOptions : public RefCounted<RTCOfferAnswerOptions> {
public:
static PassRefPtr<RTCOfferAnswerOptions> create(const Dictionary&, ExceptionCode&);
const String& requestIdentity() const { return m_private->requestIdentity(); }
RTCOfferAnswerOptionsPrivate* privateOfferAnswerOptions() const { return m_private.get(); }
virtual ~RTCOfferAnswerOptions() { }
protected:
virtual bool initialize(const Dictionary&);
RTCOfferAnswerOptions() { }
RefPtr<RTCOfferAnswerOptionsPrivate> m_private;
};
class RTCOfferOptions : public RTCOfferAnswerOptions {
public:
static PassRefPtr<RTCOfferOptions> create(const Dictionary&, ExceptionCode&);
int64_t offerToReceiveVideo() const { return privateOfferOptions()->offerToReceiveVideo(); }
int64_t offerToReceiveAudio() const { return privateOfferOptions()->offerToReceiveAudio(); }
bool voiceActivityDetection() const { return privateOfferOptions()->voiceActivityDetection(); }
bool iceRestart() const { return privateOfferOptions()->iceRestart(); }
RTCOfferOptionsPrivate* privateOfferOptions() const { return static_cast<RTCOfferOptionsPrivate*>(m_private.get()); }
virtual ~RTCOfferOptions() { }
private:
virtual bool initialize(const Dictionary&) override;
RTCOfferOptions() { }
};
}
#endif // ENABLE(MEDIA_STREAM)
#endif // RTCOfferAnswerOptions_h