| OLD | NEW |
| 1 /* | 1 /* |
| 2 * libjingle | 2 * libjingle |
| 3 * Copyright 2015 Google Inc. | 3 * Copyright 2015 Google Inc. |
| 4 * | 4 * |
| 5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
| 6 * modification, are permitted provided that the following conditions are met: | 6 * modification, are permitted provided that the following conditions are met: |
| 7 * | 7 * |
| 8 * 1. Redistributions of source code must retain the above copyright notice, | 8 * 1. Redistributions of source code must retain the above copyright notice, |
| 9 * this list of conditions and the following disclaimer. | 9 * this list of conditions and the following disclaimer. |
| 10 * 2. Redistributions in binary form must reproduce the above copyright notice, | 10 * 2. Redistributions in binary form must reproduce the above copyright notice, |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR | 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR |
| 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF | 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF |
| 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 #ifndef TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ | 28 #ifndef TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ |
| 29 #define TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ | 29 #define TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ |
| 30 | 30 |
| 31 #include <queue> | 31 #include <queue> |
| 32 #include <string> | 32 #include <string> |
| 33 #include <utility> |
| 33 | 34 |
| 34 #include "webrtc/base/messagehandler.h" | 35 #include "webrtc/base/messagehandler.h" |
| 35 #include "webrtc/base/messagequeue.h" | 36 #include "webrtc/base/messagequeue.h" |
| 36 #include "webrtc/base/refcount.h" | 37 #include "webrtc/base/refcount.h" |
| 37 #include "webrtc/base/scoped_ptr.h" | 38 #include "webrtc/base/scoped_ptr.h" |
| 38 #include "webrtc/base/scoped_ref_ptr.h" | 39 #include "webrtc/base/scoped_ref_ptr.h" |
| 39 #include "webrtc/base/sslidentity.h" | 40 #include "webrtc/base/sslidentity.h" |
| 40 #include "webrtc/base/thread.h" | 41 #include "webrtc/base/thread.h" |
| 41 | 42 |
| 42 namespace webrtc { | 43 namespace webrtc { |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 rtc::scoped_ptr<rtc::SSLIdentity> identity); | 123 rtc::scoped_ptr<rtc::SSLIdentity> identity); |
| 123 | 124 |
| 124 class WorkerTask; | 125 class WorkerTask; |
| 125 typedef rtc::ScopedMessageData<DtlsIdentityStoreImpl::WorkerTask> | 126 typedef rtc::ScopedMessageData<DtlsIdentityStoreImpl::WorkerTask> |
| 126 WorkerTaskMessageData; | 127 WorkerTaskMessageData; |
| 127 | 128 |
| 128 // A key type-identity pair. | 129 // A key type-identity pair. |
| 129 struct IdentityResult { | 130 struct IdentityResult { |
| 130 IdentityResult(rtc::KeyType key_type, | 131 IdentityResult(rtc::KeyType key_type, |
| 131 rtc::scoped_ptr<rtc::SSLIdentity> identity) | 132 rtc::scoped_ptr<rtc::SSLIdentity> identity) |
| 132 : key_type_(key_type), identity_(identity.Pass()) {} | 133 : key_type_(key_type), identity_(std::move(identity)) {} |
| 133 | 134 |
| 134 rtc::KeyType key_type_; | 135 rtc::KeyType key_type_; |
| 135 rtc::scoped_ptr<rtc::SSLIdentity> identity_; | 136 rtc::scoped_ptr<rtc::SSLIdentity> identity_; |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 typedef rtc::ScopedMessageData<IdentityResult> IdentityResultMessageData; | 139 typedef rtc::ScopedMessageData<IdentityResult> IdentityResultMessageData; |
| 139 | 140 |
| 140 sigslot::signal0<> SignalDestroyed; | 141 sigslot::signal0<> SignalDestroyed; |
| 141 | 142 |
| 142 rtc::Thread* const signaling_thread_; | 143 rtc::Thread* const signaling_thread_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 155 rtc::scoped_ptr<rtc::SSLIdentity> free_identity_; | 156 rtc::scoped_ptr<rtc::SSLIdentity> free_identity_; |
| 156 }; | 157 }; |
| 157 | 158 |
| 158 // One RequestInfo per KeyType. Only touch on the |signaling_thread_|. | 159 // One RequestInfo per KeyType. Only touch on the |signaling_thread_|. |
| 159 RequestInfo request_info_[rtc::KT_LAST]; | 160 RequestInfo request_info_[rtc::KT_LAST]; |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 } // namespace webrtc | 163 } // namespace webrtc |
| 163 | 164 |
| 164 #endif // TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ | 165 #endif // TALK_APP_WEBRTC_DTLSIDENTITYSTORE_H_ |
| OLD | NEW |