提交 b0baf088 authored 作者: Iñaki Baz Castillo's avatar Iñaki Baz Castillo

Simplify worker API.

上级 bd5a1eac
...@@ -20,7 +20,7 @@ namespace RTC ...@@ -20,7 +20,7 @@ namespace RTC
}; };
public: public:
Peer(Listener* listener, std::string& peerId, Json::Value& data); Peer(Listener* listener, std::string& peerId);
virtual ~Peer(); virtual ~Peer();
void Close(); void Close();
......
...@@ -20,7 +20,7 @@ namespace RTC ...@@ -20,7 +20,7 @@ namespace RTC
}; };
public: public:
Room(Listener* listener, unsigned int roomId, Json::Value& data); Room(Listener* listener, unsigned int roomId);
virtual ~Room(); virtual ~Room();
void Close(); void Close();
......
...@@ -192,7 +192,7 @@ void Loop::onChannelRequest(Channel::UnixStreamSocket* channel, Channel::Request ...@@ -192,7 +192,7 @@ void Loop::onChannelRequest(Channel::UnixStreamSocket* channel, Channel::Request
try try
{ {
room = new RTC::Room(this, roomId, request->data); room = new RTC::Room(this, roomId);
} }
catch (const MediaSoupError &error) catch (const MediaSoupError &error)
{ {
......
...@@ -9,13 +9,11 @@ namespace RTC ...@@ -9,13 +9,11 @@ namespace RTC
{ {
/* Instance methods. */ /* Instance methods. */
Peer::Peer(Listener* listener, std::string& peerId, Json::Value& data) : Peer::Peer(Listener* listener, std::string& peerId) :
peerId(peerId), peerId(peerId),
listener(listener) listener(listener)
{ {
MS_TRACE(); MS_TRACE();
// TODO: do something wit data and throw if incorrect.
} }
Peer::~Peer() Peer::~Peer()
......
...@@ -8,13 +8,11 @@ namespace RTC ...@@ -8,13 +8,11 @@ namespace RTC
{ {
/* Instance methods. */ /* Instance methods. */
Room::Room(Listener* listener, unsigned int roomId, Json::Value& data) : Room::Room(Listener* listener, unsigned int roomId) :
roomId(roomId), roomId(roomId),
listener(listener) listener(listener)
{ {
MS_TRACE(); MS_TRACE();
// TODO: do something with data and throw if incorrect.
} }
Room::~Room() Room::~Room()
...@@ -95,7 +93,7 @@ namespace RTC ...@@ -95,7 +93,7 @@ namespace RTC
try try
{ {
peer = new RTC::Peer(this, peerId, request->data); peer = new RTC::Peer(this, peerId);
} }
catch (const MediaSoupError &error) catch (const MediaSoupError &error)
{ {
......
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论