Add blank control class

master
Ryan Lee 2016-03-17 14:15:48 +09:00
parent 4171352c40
commit aa297e5dce
3 changed files with 72 additions and 0 deletions

View File

@ -95,10 +95,12 @@ configure_file(
set(HEADERS
"${PROJECT_BINARY_DIR}/config.h"
"src/throughnet.h"
"src/control.h"
)
set(SOURCES
"src/throughnet.cc"
"src/control.cc"
)
# ============================================================================
@ -195,4 +197,5 @@ target_link_libraries(test_main
throughnet
${WEBRTC_LIBRARIES}
)
add_test(test_main test_main)

14
src/control.cc Normal file
View File

@ -0,0 +1,14 @@
/*
* Copyright 2016 The ThroughNet Project Authors. All rights reserved.
*
* Ryan Lee (ryan.lee at throughnet.com)
*/
#include "config.h"
#include "control.h"
namespace tn {
} // namespace tn

55
src/control.h Normal file
View File

@ -0,0 +1,55 @@
/*
* Copyright 2016 The ThroughNet Project Authors. All rights reserved.
*
* Ryan Lee (ryan.lee at throughnet.com)
*/
#ifndef __THROUGHNET_THROUGHENT_H__
#define __THROUGHNET_THROUGHENT_H__
#include "webrtc/api/peerconnectioninterface.h"
#include "webrtc/base/sigslot.h"
namespace tn {
class Control
: public webrtc::PeerConnectionObserver,
public webrtc::CreateSessionDescriptionObserver,
public sigslot::has_slots<> {
public:
Control() {}
virtual ~Control() {}
//
// PeerConnectionObserver implementation.
//
void OnSignalingChange(
webrtc::PeerConnectionInterface::SignalingState new_state) override {};
void OnAddStream(webrtc::MediaStreamInterface* stream) override {};
void OnRemoveStream(webrtc::MediaStreamInterface* stream) override {};
void OnDataChannel(webrtc::DataChannelInterface* channel) override {};
void OnRenegotiationNeeded() override {}
void OnIceConnectionChange(
webrtc::PeerConnectionInterface::IceConnectionState new_state) override {};
void OnIceGatheringChange(
webrtc::PeerConnectionInterface::IceGatheringState new_state) override {};
void OnIceCandidate(const webrtc::IceCandidateInterface* candidate) override {};
void OnIceConnectionReceivingChange(bool receiving) override {}
//
// Implements CreateSessionDescriptionObserver.
//
virtual void OnSuccess(webrtc::SessionDescriptionInterface* desc) {};
virtual void OnFailure(const std::string& error) {}
protected:
};
} // namespace tn
#endif // __THROUGHNET_THROUGHENT_H__