OLD | NEW |
---|---|
(Empty) | |
1 /* | |
2 * Copyright (C) 2015 Google Inc. All rights reserved. | |
jochen (gone - plz use gerrit)
2015/10/20 12:27:35
please use a short form header
hbos_chromium
2015/10/20 15:42:24
Done.
| |
3 * | |
4 * Redistribution and use in source and binary forms, with or without | |
5 * modification, are permitted provided that the following conditions are | |
6 * met: | |
7 * | |
8 * * Redistributions of source code must retain the above copyright | |
9 * notice, this list of conditions and the following disclaimer. | |
10 * * Redistributions in binary form must reproduce the above | |
11 * copyright notice, this list of conditions and the following disclaimer | |
12 * in the documentation and/or other materials provided with the | |
13 * distribution. | |
14 * * Neither the name of Google Inc. nor the names of its | |
15 * contributors may be used to endorse or promote products derived from | |
16 * this software without specific prior written permission. | |
17 * | |
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
19 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
20 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | |
21 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | |
22 * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | |
23 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | |
24 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | |
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | |
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | |
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | |
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | |
29 */ | |
30 | |
31 #ifndef WebRTCCertificate_h | |
32 #define WebRTCCertificate_h | |
33 | |
34 #include "public/platform/WebRTCKeyParams.h" | |
35 | |
36 namespace rtc { | |
jochen (gone - plz use gerrit)
2015/10/20 12:27:35
blink shouldn't know about rtc
hbos_chromium
2015/10/20 15:42:24
Done.
| |
37 class RTCCertificate; | |
38 template<class T> | |
39 class scoped_refptr; | |
40 } | |
41 | |
42 namespace blink { | |
43 | |
44 // WebRTCCertificate is an interface defining what Blink needs to know about cer tificates, | |
45 // hiding Chromium and WebRTC layer implementation details. It is possible to cr eate | |
46 // shallow copies of the WebRTCCertificate. When all copies are destroyed, the | |
47 // implementation specific data must be freed. WebRTCCertificate objects thus ac t as | |
48 // references to the reference counted internal data. | |
49 class WebRTCCertificate { | |
50 public: | |
51 WebRTCCertificate() = default; | |
52 virtual ~WebRTCCertificate() = default; | |
53 | |
54 // Copies the WebRTCCertificate object without copying the underlying implem entation | |
55 // specific (WebRTC layer) certificate. When all copies are destroyed the un derlying | |
56 // data is freed. | |
57 virtual WebRTCCertificate* shallowCopy() const = 0; | |
58 | |
59 virtual const WebRTCKeyParams& keyParams() const = 0; | |
60 | |
61 // The date and time after which the certificate should be considered invali d. | |
62 // Expressed in time since 1970-01-01T00:00:00Z in milliseconds. | |
63 virtual double expires() const = 0; | |
64 | |
65 // Returns a reference to the WebRTC layer version of the certificate. Using a | |
66 // const reference to a scoped_refptr member variable because the Blink laye r | |
67 // does not have knowledge of the WebRTC class implementations. | |
68 virtual const rtc::scoped_refptr<rtc::RTCCertificate>& rtcCertificate() cons t = 0; | |
69 | |
70 private: | |
71 WebRTCCertificate(const WebRTCCertificate&) = delete; | |
72 WebRTCCertificate& operator=(const WebRTCCertificate&) = delete; | |
73 }; | |
74 | |
75 } // namespace blink | |
76 | |
77 #endif // WebRTCCertificate_h | |
OLD | NEW |