PeerConnection00Handler.h [plain text]
#ifndef PeerConnection00Handler_h
#define PeerConnection00Handler_h
#if ENABLE(MEDIA_STREAM)
#include "MediaStreamDescriptor.h"
#include <wtf/OwnPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/PassRefPtr.h>
namespace WebCore {
class IceCandidateDescriptor;
class IceOptions;
class MediaHints;
class PeerConnection00HandlerClient;
class SessionDescriptionDescriptor;
#if PLATFORM(CHROMIUM)
class PeerConnection00HandlerInternal;
#endif
class PeerConnection00Handler {
WTF_MAKE_NONCOPYABLE(PeerConnection00Handler);
WTF_MAKE_FAST_ALLOCATED;
public:
static PassOwnPtr<PeerConnection00Handler> create(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
~PeerConnection00Handler();
PassRefPtr<SessionDescriptionDescriptor> createOffer(PassRefPtr<MediaHints>);
PassRefPtr<SessionDescriptionDescriptor> createAnswer(const String& offer, PassRefPtr<MediaHints>);
bool setLocalDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
bool setRemoteDescription(int action, PassRefPtr<SessionDescriptionDescriptor>);
PassRefPtr<SessionDescriptionDescriptor> localDescription();
PassRefPtr<SessionDescriptionDescriptor> remoteDescription();
bool startIce(PassRefPtr<IceOptions>);
bool processIceMessage(PassRefPtr<IceCandidateDescriptor>);
void addStream(PassRefPtr<MediaStreamDescriptor>);
void removeStream(PassRefPtr<MediaStreamDescriptor>);
void stop();
private:
PeerConnection00Handler(PeerConnection00HandlerClient*, const String& serverConfiguration, const String& username);
#if PLATFORM(CHROMIUM)
OwnPtr<PeerConnection00HandlerInternal> m_private;
#else
PeerConnection00HandlerClient* m_client;
#endif
};
}
#endif // ENABLE(MEDIA_STREAM)
#endif // PeerConnection00Handler_h