OLD | NEW |
(Empty) | |
| 1 // Copyright 2004 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef WEBRTC_LIBJINGLE_XMPP_SASLHANDLER_H_ |
| 6 #define WEBRTC_LIBJINGLE_XMPP_SASLHANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 #include <vector> |
| 10 |
| 11 namespace buzz { |
| 12 |
| 13 class XmlElement; |
| 14 class SaslMechanism; |
| 15 |
| 16 // Creates mechanisms to deal with a given mechanism |
| 17 class SaslHandler { |
| 18 |
| 19 public: |
| 20 |
| 21 // Intended to be subclassed |
| 22 virtual ~SaslHandler() {} |
| 23 |
| 24 // Should pick the best method according to this handler |
| 25 // returns the empty string if none are suitable |
| 26 virtual std::string ChooseBestSaslMechanism(const std::vector<std::string> & m
echanisms, bool encrypted) = 0; |
| 27 |
| 28 // Creates a SaslMechanism for the given mechanism name (you own it |
| 29 // once you get it). |
| 30 // If not handled, return NULL. |
| 31 virtual SaslMechanism * CreateSaslMechanism(const std::string & mechanism) = 0
; |
| 32 }; |
| 33 |
| 34 } |
| 35 |
| 36 #endif // WEBRTC_LIBJINGLE_XMPP_SASLHANDLER_H_ |
OLD | NEW |