| Index: remoting/protocol/jingle_session.h
|
| diff --git a/remoting/protocol/jingle_session.h b/remoting/protocol/jingle_session.h
|
| index 09cb2722b0478f3d06a5dc49873652195e568b2a..8ce663ea2a6951b361fb92ff9787dcceda652a80 100644
|
| --- a/remoting/protocol/jingle_session.h
|
| +++ b/remoting/protocol/jingle_session.h
|
| @@ -13,6 +13,7 @@
|
| #include "base/timer.h"
|
| #include "crypto/rsa_private_key.h"
|
| #include "net/base/completion_callback.h"
|
| +#include "remoting/jingle_glue/iq_sender.h"
|
| #include "remoting/protocol/authenticator.h"
|
| #include "remoting/protocol/jingle_messages.h"
|
| #include "remoting/protocol/session.h"
|
| @@ -25,9 +26,6 @@ class StreamSocket;
|
| } // namespace net
|
|
|
| namespace remoting {
|
| -
|
| -class IqRequest;
|
| -
|
| namespace protocol {
|
|
|
| class JingleSessionManager;
|
| @@ -86,8 +84,8 @@ class JingleSession : public Session,
|
| scoped_ptr<Authenticator> authenticator);
|
| void AcceptIncomingConnection(const JingleMessage& initiate_message);
|
|
|
| - // Handler for session-initiate response.
|
| - void OnSessionInitiateResponse(const buzz::XmlElement* response);
|
| + // Helper to send outgoing messages.
|
| + void SendMessage(const JingleMessage& message);
|
|
|
| // Called by JingleSessionManager on incoming |message|. Must call
|
| // |reply_callback| to send reply message before sending any other
|
| @@ -108,10 +106,14 @@ class JingleSession : public Session,
|
| bool InitializeConfigFromDescription(const ContentDescription* description);
|
|
|
| void ProcessAuthenticationStep();
|
| - void OnSessionInfoResponse(const buzz::XmlElement* response);
|
|
|
| void SendTransportInfo();
|
| - void OnTransportInfoResponse(const buzz::XmlElement* response);
|
| +
|
| + void OnIqMessageResponse(JingleMessage::ActionType request_type,
|
| + IqRequest* request,
|
| + const buzz::XmlElement* response);
|
| +
|
| + void CleanupPendingRequests(IqRequest* request);
|
|
|
| // Terminates the session and sends session-terminate if it is
|
| // necessary. |error| specifies the error code in case when the
|
| @@ -136,9 +138,10 @@ class JingleSession : public Session,
|
|
|
| scoped_ptr<Authenticator> authenticator_;
|
|
|
| - scoped_ptr<IqRequest> initiate_request_;
|
| - scoped_ptr<IqRequest> session_info_request_;
|
| - scoped_ptr<IqRequest> transport_info_request_;
|
| + // Container for pending Iq requests. Requests are removed in
|
| + // CleanupPendingRequests() which is called when a response is
|
| + // received or one of the requests times out.
|
| + std::list<IqRequest*> pending_requests_;
|
|
|
| ChannelsMap channels_;
|
|
|
|
|