Replace scoped_ptr with unique_ptr in webrtc/libjingle/
But keep #including scoped_ptr.h in .h files, so as not to break WebRTC users who expect those .h files to give them rtc::scoped_ptr. BUG=webrtc:5520 Review-Url: https://codereview.webrtc.org/1935893002 Cr-Commit-Position: refs/heads/master@{#12577}
This commit is contained in:
parent
a97611a43f
commit
322c4a0b3a
@ -11,6 +11,7 @@
|
||||
#ifndef _xmlbuilder_h_
|
||||
#define _xmlbuilder_h_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "webrtc/libjingle/xmllite/xmlparser.h"
|
||||
@ -48,8 +49,8 @@ public:
|
||||
|
||||
private:
|
||||
XmlElement * pelCurrent_;
|
||||
rtc::scoped_ptr<XmlElement> pelRoot_;
|
||||
rtc::scoped_ptr<std::vector<XmlElement*> > pvParents_;
|
||||
std::unique_ptr<XmlElement> pelRoot_;
|
||||
std::unique_ptr<std::vector<XmlElement*> > pvParents_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMLLITE_XMLNSSTACK_H_
|
||||
#define WEBRTC_LIBJINGLE_XMLLITE_XMLNSSTACK_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "webrtc/libjingle/xmllite/qname.h"
|
||||
@ -37,8 +38,8 @@ public:
|
||||
|
||||
private:
|
||||
|
||||
rtc::scoped_ptr<std::vector<std::string> > pxmlnsStack_;
|
||||
rtc::scoped_ptr<std::vector<size_t> > pxmlnsDepthStack_;
|
||||
std::unique_ptr<std::vector<std::string> > pxmlnsStack_;
|
||||
std::unique_ptr<std::vector<size_t> > pxmlnsDepthStack_;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include <algorithm>
|
||||
#include <iostream>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
@ -105,7 +106,7 @@ public:
|
||||
const XmppPresence* presence() const;
|
||||
|
||||
private:
|
||||
rtc::scoped_ptr<XmppPresence> presence_;
|
||||
std::unique_ptr<XmppPresence> presence_;
|
||||
};
|
||||
|
||||
class XmppChatroomMemberEnumeratorImpl :
|
||||
@ -430,7 +431,7 @@ void
|
||||
XmppChatroomModuleImpl::FireEnteredStatus(const XmlElement* presence,
|
||||
XmppChatroomEnteredStatus status) {
|
||||
if (chatroom_handler_) {
|
||||
rtc::scoped_ptr<XmppPresence> xmpp_presence(XmppPresence::Create());
|
||||
std::unique_ptr<XmppPresence> xmpp_presence(XmppPresence::Create());
|
||||
xmpp_presence->set_raw_xml(presence);
|
||||
chatroom_handler_->ChatroomEnteredStatus(this, xmpp_presence.get(), status);
|
||||
}
|
||||
@ -472,7 +473,7 @@ XmppReturnStatus
|
||||
XmppChatroomModuleImpl::ServerChangedOtherPresence(const XmlElement&
|
||||
presence_element) {
|
||||
XmppReturnStatus xmpp_status = XMPP_RETURN_OK;
|
||||
rtc::scoped_ptr<XmppPresence> presence(XmppPresence::Create());
|
||||
std::unique_ptr<XmppPresence> presence(XmppPresence::Create());
|
||||
IFR(presence->set_raw_xml(&presence_element));
|
||||
|
||||
JidMemberMap::iterator pos = chatroom_jid_members_.find(presence->jid());
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/libjingle/xmpp/discoitemsquerytask.h"
|
||||
#include "webrtc/libjingle/xmpp/xmpptask.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace buzz {
|
||||
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#define WEBRTC_LIBJINGLE_XMPP_HANGOUTPUBSUBCLIENT_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -163,14 +164,14 @@ class HangoutPubSubClient : public sigslot::has_slots<> {
|
||||
const XmlElement* stanza);
|
||||
Jid mucjid_;
|
||||
std::string nick_;
|
||||
rtc::scoped_ptr<PubSubClient> media_client_;
|
||||
rtc::scoped_ptr<PubSubClient> presenter_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > presenter_state_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > audio_mute_state_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > video_mute_state_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > video_pause_state_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > recording_state_client_;
|
||||
rtc::scoped_ptr<PubSubStateClient<bool> > media_block_state_client_;
|
||||
std::unique_ptr<PubSubClient> media_client_;
|
||||
std::unique_ptr<PubSubClient> presenter_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > presenter_state_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > audio_mute_state_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > video_mute_state_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > video_pause_state_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > recording_state_client_;
|
||||
std::unique_ptr<PubSubStateClient<bool> > media_block_state_client_;
|
||||
};
|
||||
|
||||
} // namespace buzz
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmllite/qname.h"
|
||||
@ -228,11 +229,11 @@ class HangoutPubSubClientTest : public testing::Test {
|
||||
listener.get(), &TestHangoutPubSubListener::OnMediaBlockError);
|
||||
}
|
||||
|
||||
rtc::scoped_ptr<rtc::FakeTaskRunner> runner;
|
||||
std::unique_ptr<rtc::FakeTaskRunner> runner;
|
||||
// xmpp_client deleted by deleting runner.
|
||||
buzz::FakeXmppClient* xmpp_client;
|
||||
rtc::scoped_ptr<buzz::HangoutPubSubClient> client;
|
||||
rtc::scoped_ptr<TestHangoutPubSubListener> listener;
|
||||
std::unique_ptr<buzz::HangoutPubSubClient> client;
|
||||
std::unique_ptr<TestHangoutPubSubListener> listener;
|
||||
buzz::Jid pubsubjid;
|
||||
std::string nick;
|
||||
};
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMPP_IQTASK_H_
|
||||
#define WEBRTC_LIBJINGLE_XMPP_IQTASK_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/xmppengine.h"
|
||||
@ -40,7 +41,7 @@ class IqTask : public XmppTask {
|
||||
virtual int OnTimeout();
|
||||
|
||||
Jid to_;
|
||||
rtc::scoped_ptr<XmlElement> stanza_;
|
||||
std::unique_ptr<XmlElement> stanza_;
|
||||
};
|
||||
|
||||
} // namespace buzz
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
|
||||
#include "webrtc/libjingle/xmpp/jingleinfotask.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/libjingle/xmpp/xmppclient.h"
|
||||
#include "webrtc/libjingle/xmpp/xmpptask.h"
|
||||
@ -24,7 +26,7 @@ class JingleInfoTask::JingleInfoGetTask : public XmppTask {
|
||||
done_(false) {}
|
||||
|
||||
virtual int ProcessStart() {
|
||||
rtc::scoped_ptr<XmlElement> get(
|
||||
std::unique_ptr<XmlElement> get(
|
||||
MakeIq(STR_GET, Jid(), task_id()));
|
||||
get->AddElement(new XmlElement(QN_JINGLE_INFO_QUERY, true));
|
||||
if (SendStanza(get.get()) != XMPP_RETURN_OK) {
|
||||
|
||||
@ -14,7 +14,6 @@
|
||||
#include "webrtc/libjingle/xmpp/mucroomconfigtask.h"
|
||||
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace buzz {
|
||||
|
||||
|
||||
@ -12,7 +12,6 @@
|
||||
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
|
||||
namespace buzz {
|
||||
|
||||
@ -10,9 +10,10 @@
|
||||
|
||||
#include "webrtc/libjingle/xmpp/pingtask.h"
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
namespace buzz {
|
||||
|
||||
@ -66,7 +67,7 @@ int PingTask::ProcessStart() {
|
||||
|
||||
// Send a ping if it's time.
|
||||
if (now >= next_ping_time_) {
|
||||
rtc::scoped_ptr<buzz::XmlElement> stanza(
|
||||
std::unique_ptr<buzz::XmlElement> stanza(
|
||||
MakeIq(buzz::STR_GET, Jid(STR_EMPTY), task_id()));
|
||||
stanza->AddElement(new buzz::XmlElement(QN_PING));
|
||||
SendStanza(stanza.get());
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#include "webrtc/libjingle/xmpp/pubsub_task.h"
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
@ -82,7 +83,7 @@ int PubsubTask::ProcessResponse() {
|
||||
bool PubsubTask::SubscribeToNode(const std::string& pubsub_node,
|
||||
NodeHandler handler) {
|
||||
subscribed_nodes_[pubsub_node] = handler;
|
||||
rtc::scoped_ptr<buzz::XmlElement> get_iq_request(
|
||||
std::unique_ptr<buzz::XmlElement> get_iq_request(
|
||||
MakeIq(buzz::STR_GET, pubsub_node_jid_, task_id()));
|
||||
if (!get_iq_request) {
|
||||
return false;
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmllite/qname.h"
|
||||
@ -103,11 +104,11 @@ class PubSubClientTest : public testing::Test {
|
||||
listener.get(), &TestPubSubItemsListener::OnRetractError);
|
||||
}
|
||||
|
||||
rtc::scoped_ptr<rtc::FakeTaskRunner> runner;
|
||||
std::unique_ptr<rtc::FakeTaskRunner> runner;
|
||||
// xmpp_client deleted by deleting runner.
|
||||
buzz::FakeXmppClient* xmpp_client;
|
||||
rtc::scoped_ptr<buzz::PubSubClient> client;
|
||||
rtc::scoped_ptr<TestPubSubItemsListener> listener;
|
||||
std::unique_ptr<buzz::PubSubClient> client;
|
||||
std::unique_ptr<TestPubSubItemsListener> listener;
|
||||
buzz::Jid pubsubjid;
|
||||
std::string node;
|
||||
std::string itemid;
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
#define WEBRTC_LIBJINGLE_XMPP_PUBSUBSTATECLIENT_H_
|
||||
|
||||
#include <map>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -257,8 +258,8 @@ class PubSubStateClient : public sigslot::has_slots<> {
|
||||
PubSubClient* client_;
|
||||
const QName state_name_;
|
||||
C default_state_;
|
||||
rtc::scoped_ptr<PubSubStateKeySerializer> key_serializer_;
|
||||
rtc::scoped_ptr<PubSubStateSerializer<C> > state_serializer_;
|
||||
std::unique_ptr<PubSubStateKeySerializer> key_serializer_;
|
||||
std::unique_ptr<PubSubStateSerializer<C> > state_serializer_;
|
||||
// key => state
|
||||
std::map<std::string, C> state_by_key_;
|
||||
// itemid => StateItemInfo
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
* be found in the AUTHORS file in the root of the source tree.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmllite/qname.h"
|
||||
@ -80,10 +81,10 @@ class PubSubTasksTest : public testing::Test {
|
||||
listener.reset(new TestPubSubTasksListener());
|
||||
}
|
||||
|
||||
rtc::scoped_ptr<rtc::FakeTaskRunner> runner;
|
||||
std::unique_ptr<rtc::FakeTaskRunner> runner;
|
||||
// Client deleted by deleting runner.
|
||||
buzz::FakeXmppClient* client;
|
||||
rtc::scoped_ptr<TestPubSubTasksListener> listener;
|
||||
std::unique_ptr<TestPubSubTasksListener> listener;
|
||||
buzz::Jid pubsubjid;
|
||||
std::string node;
|
||||
std::string itemid;
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
@ -18,7 +19,6 @@
|
||||
#include "webrtc/libjingle/xmpp/util_unittest.h"
|
||||
#include "webrtc/libjingle/xmpp/xmppengine.h"
|
||||
#include "webrtc/base/gunit.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
|
||||
#define TEST_OK(x) EXPECT_EQ((x),XMPP_RETURN_OK)
|
||||
#define TEST_BADARGUMENT(x) EXPECT_EQ((x),XMPP_RETURN_BADARGUMENT)
|
||||
@ -250,7 +250,7 @@ TEST_F(RosterModuleTest, TestPresence) {
|
||||
status->AddAttr(QN_STATUS, STR_PSTN_CONFERENCE_STATUS_CONNECTING);
|
||||
XmlElement presence_xml(QN_PRESENCE);
|
||||
presence_xml.AddElement(status);
|
||||
rtc::scoped_ptr<XmppPresence> presence(XmppPresence::Create());
|
||||
std::unique_ptr<XmppPresence> presence(XmppPresence::Create());
|
||||
presence->set_raw_xml(&presence_xml);
|
||||
EXPECT_EQ(presence->connection_status(), XMPP_CONNECTION_STATUS_CONNECTING);
|
||||
}
|
||||
@ -258,11 +258,11 @@ TEST_F(RosterModuleTest, TestPresence) {
|
||||
TEST_F(RosterModuleTest, TestOutgoingPresence) {
|
||||
std::stringstream dump;
|
||||
|
||||
rtc::scoped_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
std::unique_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
XmppTestHandler handler(engine.get());
|
||||
XmppTestRosterHandler roster_handler;
|
||||
|
||||
rtc::scoped_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
std::unique_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
roster->set_roster_handler(&roster_handler);
|
||||
|
||||
// Configure the roster module
|
||||
@ -364,7 +364,7 @@ TEST_F(RosterModuleTest, TestOutgoingPresence) {
|
||||
EXPECT_EQ(handler.SessionActivity(), "");
|
||||
|
||||
// Construct a directed presence
|
||||
rtc::scoped_ptr<XmppPresence> directed_presence(XmppPresence::Create());
|
||||
std::unique_ptr<XmppPresence> directed_presence(XmppPresence::Create());
|
||||
TEST_OK(directed_presence->set_available(XMPP_PRESENCE_AVAILABLE));
|
||||
TEST_OK(directed_presence->set_priority(120));
|
||||
TEST_OK(directed_presence->set_status("*very* available"));
|
||||
@ -381,11 +381,11 @@ TEST_F(RosterModuleTest, TestOutgoingPresence) {
|
||||
}
|
||||
|
||||
TEST_F(RosterModuleTest, TestIncomingPresence) {
|
||||
rtc::scoped_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
std::unique_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
XmppTestHandler handler(engine.get());
|
||||
XmppTestRosterHandler roster_handler;
|
||||
|
||||
rtc::scoped_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
std::unique_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
roster->set_roster_handler(&roster_handler);
|
||||
|
||||
// Configure the roster module
|
||||
@ -513,11 +513,11 @@ TEST_F(RosterModuleTest, TestIncomingPresence) {
|
||||
}
|
||||
|
||||
TEST_F(RosterModuleTest, TestPresenceSubscription) {
|
||||
rtc::scoped_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
std::unique_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
XmppTestHandler handler(engine.get());
|
||||
XmppTestRosterHandler roster_handler;
|
||||
|
||||
rtc::scoped_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
std::unique_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
roster->set_roster_handler(&roster_handler);
|
||||
|
||||
// Configure the roster module
|
||||
@ -576,11 +576,11 @@ TEST_F(RosterModuleTest, TestPresenceSubscription) {
|
||||
}
|
||||
|
||||
TEST_F(RosterModuleTest, TestRosterReceive) {
|
||||
rtc::scoped_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
std::unique_ptr<XmppEngine> engine(XmppEngine::Create());
|
||||
XmppTestHandler handler(engine.get());
|
||||
XmppTestRosterHandler roster_handler;
|
||||
|
||||
rtc::scoped_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
std::unique_ptr<XmppRosterModule> roster(XmppRosterModule::Create());
|
||||
roster->set_roster_handler(&roster_handler);
|
||||
|
||||
// Configure the roster module
|
||||
@ -696,7 +696,7 @@ TEST_F(RosterModuleTest, TestRosterReceive) {
|
||||
EXPECT_EQ(handler.SessionActivity(), "");
|
||||
|
||||
// Request that someone be added
|
||||
rtc::scoped_ptr<XmppRosterContact> contact(XmppRosterContact::Create());
|
||||
std::unique_ptr<XmppRosterContact> contact(XmppRosterContact::Create());
|
||||
TEST_OK(contact->set_jid(Jid("brandt@example.net")));
|
||||
TEST_OK(contact->set_name("Brandt"));
|
||||
TEST_OK(contact->AddGroup("Business Partners"));
|
||||
|
||||
@ -11,6 +11,8 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
|
||||
#define WEBRTC_LIBJINGLE_XMPP_XMPPTHREAD_H_
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/moduleimpl.h"
|
||||
#include "webrtc/libjingle/xmpp/rostermodule.h"
|
||||
|
||||
@ -86,7 +88,7 @@ private:
|
||||
|
||||
// Store everything in the XML element. If this becomes a perf issue we can
|
||||
// cache the data.
|
||||
rtc::scoped_ptr<XmlElement> raw_xml_;
|
||||
std::unique_ptr<XmlElement> raw_xml_;
|
||||
};
|
||||
|
||||
//! A contact as given by the server
|
||||
@ -151,7 +153,7 @@ private:
|
||||
int group_count_;
|
||||
int group_index_returned_;
|
||||
XmlElement * group_returned_;
|
||||
rtc::scoped_ptr<XmlElement> raw_xml_;
|
||||
std::unique_ptr<XmlElement> raw_xml_;
|
||||
};
|
||||
|
||||
//! An XmppModule for handle roster and presence functionality
|
||||
@ -273,11 +275,11 @@ private:
|
||||
|
||||
typedef std::vector<XmppPresenceImpl*> PresenceVector;
|
||||
typedef std::map<Jid, PresenceVector*> JidPresenceVectorMap;
|
||||
rtc::scoped_ptr<JidPresenceVectorMap> incoming_presence_map_;
|
||||
rtc::scoped_ptr<PresenceVector> incoming_presence_vector_;
|
||||
std::unique_ptr<JidPresenceVectorMap> incoming_presence_map_;
|
||||
std::unique_ptr<PresenceVector> incoming_presence_vector_;
|
||||
|
||||
typedef std::vector<XmppRosterContactImpl*> ContactVector;
|
||||
rtc::scoped_ptr<ContactVector> contacts_;
|
||||
std::unique_ptr<ContactVector> contacts_;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@ -15,7 +15,6 @@
|
||||
#include "webrtc/libjingle/xmpp/prexmppauth.h"
|
||||
#include "webrtc/libjingle/xmpp/saslplainmechanism.h"
|
||||
#include "webrtc/base/logging.h"
|
||||
#include "webrtc/base/scoped_ptr.h"
|
||||
#include "webrtc/base/sigslot.h"
|
||||
#include "webrtc/base/stringutils.h"
|
||||
#include "xmpptask.h"
|
||||
@ -48,9 +47,9 @@ public:
|
||||
XmppClient* const client_;
|
||||
|
||||
// the two main objects
|
||||
rtc::scoped_ptr<AsyncSocket> socket_;
|
||||
rtc::scoped_ptr<XmppEngine> engine_;
|
||||
rtc::scoped_ptr<PreXmppAuth> pre_auth_;
|
||||
std::unique_ptr<AsyncSocket> socket_;
|
||||
std::unique_ptr<XmppEngine> engine_;
|
||||
std::unique_ptr<PreXmppAuth> pre_auth_;
|
||||
rtc::CryptString pass_;
|
||||
std::string auth_mechanism_;
|
||||
std::string auth_token_;
|
||||
|
||||
@ -11,7 +11,9 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMPP_XMPPCLIENT_H_
|
||||
#define WEBRTC_LIBJINGLE_XMPP_XMPPCLIENT_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/asyncsocket.h"
|
||||
#include "webrtc/libjingle/xmpp/xmppclientsettings.h"
|
||||
#include "webrtc/libjingle/xmpp/xmppengine.h"
|
||||
@ -136,7 +138,7 @@ public:
|
||||
|
||||
class Private;
|
||||
friend class Private;
|
||||
rtc::scoped_ptr<Private> d_;
|
||||
std::unique_ptr<Private> d_;
|
||||
|
||||
bool delivering_signal_;
|
||||
bool valid_;
|
||||
|
||||
@ -9,8 +9,10 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmllite/xmlelement.h"
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/libjingle/xmpp/plainsaslhandler.h"
|
||||
@ -77,8 +79,8 @@ class XmppEngineTest : public testing::Test {
|
||||
void RunLogin();
|
||||
|
||||
private:
|
||||
rtc::scoped_ptr<XmppEngine> engine_;
|
||||
rtc::scoped_ptr<XmppTestHandler> handler_;
|
||||
std::unique_ptr<XmppEngine> engine_;
|
||||
std::unique_ptr<XmppTestHandler> handler_;
|
||||
};
|
||||
|
||||
void XmppEngineTest::RunLogin() {
|
||||
|
||||
@ -11,8 +11,10 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMPP_XMPPENGINEIMPL_H_
|
||||
#define WEBRTC_LIBJINGLE_XMPP_XMPPENGINEIMPL_H_
|
||||
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/xmppengine.h"
|
||||
#include "webrtc/libjingle/xmpp/xmppstanzaparser.h"
|
||||
|
||||
@ -233,7 +235,7 @@ class XmppEngineImpl : public XmppEngine {
|
||||
TlsOptions tls_option_;
|
||||
std::string tls_server_hostname_;
|
||||
std::string tls_server_domain_;
|
||||
rtc::scoped_ptr<XmppLoginTask> login_task_;
|
||||
std::unique_ptr<XmppLoginTask> login_task_;
|
||||
std::string lang_;
|
||||
|
||||
int next_id_;
|
||||
@ -242,7 +244,7 @@ class XmppEngineImpl : public XmppEngine {
|
||||
bool encrypted_;
|
||||
Error error_code_;
|
||||
int subcode_;
|
||||
rtc::scoped_ptr<XmlElement> stream_error_;
|
||||
std::unique_ptr<XmlElement> stream_error_;
|
||||
bool raised_reset_;
|
||||
XmppOutputHandler* output_handler_;
|
||||
XmppSessionHandler* session_handler_;
|
||||
@ -250,14 +252,14 @@ class XmppEngineImpl : public XmppEngine {
|
||||
XmlnsStack xmlns_stack_;
|
||||
|
||||
typedef std::vector<XmppStanzaHandler*> StanzaHandlerVector;
|
||||
rtc::scoped_ptr<StanzaHandlerVector> stanza_handlers_[HL_COUNT];
|
||||
std::unique_ptr<StanzaHandlerVector> stanza_handlers_[HL_COUNT];
|
||||
|
||||
typedef std::vector<XmppIqEntry*> IqEntryVector;
|
||||
rtc::scoped_ptr<IqEntryVector> iq_entries_;
|
||||
std::unique_ptr<IqEntryVector> iq_entries_;
|
||||
|
||||
rtc::scoped_ptr<SaslHandler> sasl_handler_;
|
||||
std::unique_ptr<SaslHandler> sasl_handler_;
|
||||
|
||||
rtc::scoped_ptr<std::stringstream> output_;
|
||||
std::unique_ptr<std::stringstream> output_;
|
||||
};
|
||||
|
||||
} // namespace buzz
|
||||
|
||||
@ -11,6 +11,7 @@
|
||||
#ifndef WEBRTC_LIBJINGLE_XMPP_LOGINTASK_H_
|
||||
#define WEBRTC_LIBJINGLE_XMPP_LOGINTASK_H_
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
@ -70,12 +71,12 @@ private:
|
||||
const XmlElement * pelStanza_;
|
||||
bool isStart_;
|
||||
std::string iqId_;
|
||||
rtc::scoped_ptr<XmlElement> pelFeatures_;
|
||||
std::unique_ptr<XmlElement> pelFeatures_;
|
||||
Jid fullJid_;
|
||||
std::string streamId_;
|
||||
rtc::scoped_ptr<std::vector<XmlElement *> > pvecQueuedStanzas_;
|
||||
std::unique_ptr<std::vector<XmlElement *> > pvecQueuedStanzas_;
|
||||
|
||||
rtc::scoped_ptr<SaslMechanism> sasl_mech_;
|
||||
std::unique_ptr<SaslMechanism> sasl_mech_;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
static const rtc::ConstantLabel LOGINTASK_STATES[];
|
||||
|
||||
@ -9,8 +9,10 @@
|
||||
*/
|
||||
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmllite/xmlelement.h"
|
||||
#include "webrtc/libjingle/xmpp/constants.h"
|
||||
#include "webrtc/libjingle/xmpp/plainsaslhandler.h"
|
||||
@ -67,8 +69,8 @@ class XmppLoginTaskTest : public testing::Test {
|
||||
void SetTlsOptions(buzz::TlsOptions option);
|
||||
|
||||
private:
|
||||
rtc::scoped_ptr<XmppEngine> engine_;
|
||||
rtc::scoped_ptr<XmppTestHandler> handler_;
|
||||
std::unique_ptr<XmppEngine> engine_;
|
||||
std::unique_ptr<XmppTestHandler> handler_;
|
||||
};
|
||||
|
||||
void XmppLoginTaskTest::SetTlsOptions(buzz::TlsOptions option) {
|
||||
|
||||
@ -12,7 +12,9 @@
|
||||
#define WEBRTC_LIBJINGLE_XMPP_XMPPTASK_H_
|
||||
|
||||
#include <deque>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
#include "webrtc/libjingle/xmpp/xmppengine.h"
|
||||
#include "webrtc/base/constructormagic.h"
|
||||
#include "webrtc/base/sigslot.h"
|
||||
@ -160,7 +162,7 @@ private:
|
||||
|
||||
bool stopped_;
|
||||
std::deque<XmlElement*> stanza_queue_;
|
||||
rtc::scoped_ptr<XmlElement> next_stanza_;
|
||||
std::unique_ptr<XmlElement> next_stanza_;
|
||||
std::string id_;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user