Index: talk/app/webrtc/dtlscertificate.h |
diff --git a/talk/media/webrtc/webrtcvideodecoderfactory.h b/talk/app/webrtc/dtlscertificate.h |
similarity index 66% |
copy from talk/media/webrtc/webrtcvideodecoderfactory.h |
copy to talk/app/webrtc/dtlscertificate.h |
index 6055a236a49c149303b0b66627198f28ce56630d..580825db219065057e3a84a1c5f87d37c645f917 100644 |
--- a/talk/media/webrtc/webrtcvideodecoderfactory.h |
+++ b/talk/app/webrtc/dtlscertificate.h |
@@ -1,6 +1,6 @@ |
/* |
* libjingle |
- * Copyright 2013 Google Inc. |
+ * Copyright 2015 Google Inc. |
* |
* Redistribution and use in source and binary forms, with or without |
* modification, are permitted provided that the following conditions are met: |
@@ -25,29 +25,34 @@ |
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
*/ |
-#ifndef TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_ |
-#define TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_ |
+#ifndef TALK_APP_WEBRTC_DTLSCERTIFICATE_H_ |
+#define TALK_APP_WEBRTC_DTLSCERTIFICATE_H_ |
+ |
+#include <string> |
#include "webrtc/base/refcount.h" |
-#include "webrtc/common_types.h" |
+#include "webrtc/base/scoped_ptr.h" |
+#include "webrtc/base/scoped_ref_ptr.h" |
+#include "webrtc/base/sslidentity.h" |
namespace webrtc { |
-class VideoDecoder; |
-} |
- |
-namespace cricket { |
-class WebRtcVideoDecoderFactory { |
+class DtlsCertificate : public rtc::RefCountInterface { |
public: |
- // Caller takes the ownership of the returned object and it should be released |
- // by calling DestroyVideoDecoder(). |
- virtual webrtc::VideoDecoder* CreateVideoDecoder( |
- webrtc::VideoCodecType type) = 0; |
- virtual ~WebRtcVideoDecoderFactory() {} |
+ static rtc::scoped_refptr<DtlsCertificate> Create( |
+ rtc::scoped_ptr<rtc::SSLIdentity> identity); |
+ |
+ // The identity is owned by the DtlsCertificate. |
+ rtc::SSLIdentity* identity() const { return identity_.get(); } |
+ |
+ protected: |
+ explicit DtlsCertificate(rtc::SSLIdentity* identity); |
tommi (sloooow) - chröme
2015/08/18 14:49:35
use scoped_ptr here too?
|
+ ~DtlsCertificate() override; |
- virtual void DestroyVideoDecoder(webrtc::VideoDecoder* decoder) = 0; |
+ private: |
+ rtc::scoped_ptr<rtc::SSLIdentity> identity_; |
}; |
-} // namespace cricket |
+} // namespace webrtc |
-#endif // TALK_MEDIA_WEBRTC_WEBRTCVIDEODECODERFACTORY_H_ |
+#endif // TALK_APP_WEBRTC_DTLSCERTIFICATE_H_ |