diff options
Diffstat (limited to 'remoting/jingle_glue/jingle_client.h')
-rw-r--r-- | remoting/jingle_glue/jingle_client.h | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/remoting/jingle_glue/jingle_client.h b/remoting/jingle_glue/jingle_client.h index 56d97e1..2a68042 100644 --- a/remoting/jingle_glue/jingle_client.h +++ b/remoting/jingle_glue/jingle_client.h @@ -16,6 +16,10 @@ namespace talk_base { class NetworkManager; } // namespace talk_base +namespace buzz { +class PreXmppAuth; +} // namespace buzz + namespace cricket { class BasicPortAllocator; class SessionManager; @@ -63,9 +67,8 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>, // only once. message_loop() is guaranteed to exist after this method returns, // but the connection may not be open yet. |callback| specifies callback // object for the client and must not be NULL. - // TODO(sergeyu): Replace password with a token. - void Init(const std::string& username, const std::string& password, - Callback* callback); + void Init(const std::string& username, const std::string& auth_token, + const std::string& auth_token_service, Callback* callback); // Creates new JingleChannel connected to the host with the specified jid. // The result is returned immediately but the channel fails if the host @@ -101,7 +104,9 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>, void OnIncomingTunnel(cricket::TunnelSessionClient* client, buzz::Jid jid, std::string description, cricket::Session* session); - void DoInitialize(); + void DoInitialize(const std::string& username, + const std::string& auth_token, + const std::string& auth_token_service); // Used by Connect(). void DoConnect(ConnectRequest* request, @@ -115,13 +120,15 @@ class JingleClient : public base::RefCountedThreadSafe<JingleClient>, // the jingle thread. void UpdateState(State new_state); + buzz::PreXmppAuth* CreatePreXmppAuth( + const buzz::XmppClientSettings& settings); + + buzz::XmppClient* client_; scoped_ptr<JingleThread> thread_; State state_; Callback* callback_; - std::string username_; - std::string password_; Lock full_jid_lock_; std::string full_jid_; |