Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Unified Diff: webrtc/libjingle/session/sessionmanagertask.h

Issue 1175243003: Remove webrtc/libjingle/{examples,session}. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/libjingle/session/sessionmanager.cc ('k') | webrtc/libjingle/session/sessionmessages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/libjingle/session/sessionmanagertask.h
diff --git a/webrtc/libjingle/session/sessionmanagertask.h b/webrtc/libjingle/session/sessionmanagertask.h
deleted file mode 100644
index 3d865c0ea1196dd7b2c50b0f6d08f9958077c32c..0000000000000000000000000000000000000000
--- a/webrtc/libjingle/session/sessionmanagertask.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Copyright 2004 The WebRTC Project Authors. All rights reserved.
- *
- * Use of this source code is governed by a BSD-style license
- * that can be found in the LICENSE file in the root of the source
- * tree. An additional intellectual property rights grant can be found
- * in the file PATENTS. All contributing project authors may
- * be found in the AUTHORS file in the root of the source tree.
- */
-
-#ifndef WEBRTC_LIBJINGLE_SESSION_SESSIONMANAGERTASK_H_
-#define WEBRTC_LIBJINGLE_SESSION_SESSIONMANAGERTASK_H_
-
-#include "webrtc/libjingle/session/sessionmanager.h"
-#include "webrtc/libjingle/session/sessionsendtask.h"
-#include "webrtc/libjingle/xmpp/xmppengine.h"
-#include "webrtc/libjingle/xmpp/xmpptask.h"
-
-namespace cricket {
-
-// This class handles sending and receiving XMPP messages on behalf of the
-// SessionManager. The sending part is handed over to SessionSendTask.
-
-class SessionManagerTask : public buzz::XmppTask {
- public:
- SessionManagerTask(buzz::XmppTaskParentInterface* parent,
- SessionManager* session_manager)
- : buzz::XmppTask(parent, buzz::XmppEngine::HL_SINGLE),
- session_manager_(session_manager) {
- }
-
- ~SessionManagerTask() {
- }
-
- // Turns on simple support for sending messages, using SessionSendTask.
- void EnableOutgoingMessages() {
- session_manager_->SignalOutgoingMessage.connect(
- this, &SessionManagerTask::OnOutgoingMessage);
- session_manager_->SignalRequestSignaling.connect(
- session_manager_, &SessionManager::OnSignalingReady);
- }
-
- virtual int ProcessStart() {
- const buzz::XmlElement *stanza = NextStanza();
- if (stanza == NULL)
- return STATE_BLOCKED;
- session_manager_->OnIncomingMessage(stanza);
- return STATE_START;
- }
-
- protected:
- virtual bool HandleStanza(const buzz::XmlElement *stanza) {
- if (!session_manager_->IsSessionMessage(stanza))
- return false;
- // Responses are handled by the SessionSendTask that sent the request.
- //if (stanza->Attr(buzz::QN_TYPE) != buzz::STR_SET)
- // return false;
- QueueStanza(stanza);
- return true;
- }
-
- private:
- void OnOutgoingMessage(SessionManager* manager,
- const buzz::XmlElement* stanza) {
- cricket::SessionSendTask* sender =
- new cricket::SessionSendTask(parent_, session_manager_);
- sender->Send(stanza);
- sender->Start();
- }
-
- SessionManager* session_manager_;
-};
-
-} // namespace cricket
-
-#endif // WEBRTC_P2P_CLIENT_SESSIONMANAGERTASK_H_
« no previous file with comments | « webrtc/libjingle/session/sessionmanager.cc ('k') | webrtc/libjingle/session/sessionmessages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698