OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 21 matching lines...) Expand all Loading... | |
32 #define WebRTCConfiguration_h | 32 #define WebRTCConfiguration_h |
33 | 33 |
34 #include "WebCommon.h" | 34 #include "WebCommon.h" |
35 #include "WebNonCopyable.h" | 35 #include "WebNonCopyable.h" |
36 #include "WebPrivatePtr.h" | 36 #include "WebPrivatePtr.h" |
37 #include "WebVector.h" | 37 #include "WebVector.h" |
38 | 38 |
39 namespace blink { | 39 namespace blink { |
40 | 40 |
41 class RTCIceServer; | 41 class RTCIceServer; |
42 class RTCIceServerArray; | |
42 class RTCConfiguration; | 43 class RTCConfiguration; |
43 class WebString; | 44 class WebString; |
44 class WebURL; | 45 class WebURL; |
45 | 46 |
46 class WebRTCICEServer { | 47 class WebRTCICEServer { |
47 public: | 48 public: |
48 WebRTCICEServer() { } | 49 WebRTCICEServer() { } |
49 WebRTCICEServer(const WebRTCICEServer& other) { assign(other); } | 50 WebRTCICEServer(const WebRTCICEServer& other) { assign(other); } |
50 ~WebRTCICEServer() { reset(); } | 51 ~WebRTCICEServer() { reset(); } |
51 | 52 |
(...skipping 13 matching lines...) Expand all Loading... | |
65 BLINK_PLATFORM_EXPORT WebString credential() const; | 66 BLINK_PLATFORM_EXPORT WebString credential() const; |
66 | 67 |
67 #if INSIDE_BLINK | 68 #if INSIDE_BLINK |
68 BLINK_PLATFORM_EXPORT WebRTCICEServer(RTCIceServer*); | 69 BLINK_PLATFORM_EXPORT WebRTCICEServer(RTCIceServer*); |
69 #endif | 70 #endif |
70 | 71 |
71 private: | 72 private: |
72 WebPrivatePtr<RTCIceServer> m_private; | 73 WebPrivatePtr<RTCIceServer> m_private; |
73 }; | 74 }; |
74 | 75 |
76 class WebRTCICEServerArray { | |
77 public: | |
78 WebRTCICEServerArray() {} | |
79 WebRTCICEServerArray(const WebRTCICEServerArray& other) { assign(other); } | |
80 WebRTCICEServerArray& operator=(const WebRTCICEServerArray& other) | |
81 { | |
82 assign(other); | |
83 return *this; | |
84 } | |
85 | |
86 BLINK_PLATFORM_EXPORT void assign(const WebRTCICEServerArray&); | |
87 | |
88 BLINK_PLATFORM_EXPORT void reset(); | |
89 bool isNull() const { return m_private.isNull(); } | |
90 | |
91 BLINK_PLATFORM_EXPORT size_t numberOfServers() const; | |
92 BLINK_PLATFORM_EXPORT WebRTCICEServer server(size_t index) const; | |
93 | |
94 #if INSIDE_BLINK | |
95 BLINK_PLATFORM_EXPORT WebRTCICEServerArray(RTCIceServerArray*); | |
96 #endif | |
97 | |
98 private: | |
99 WebPrivatePtr<RTCIceServerArray> m_private; | |
100 }; | |
101 | |
75 enum WebRTCIceTransports { | 102 enum WebRTCIceTransports { |
76 WebRTCIceTransportsNone, | 103 WebRTCIceTransportsNone, |
77 WebRTCIceTransportsRelay, | 104 WebRTCIceTransportsRelay, |
78 WebRTCIceTransportsAll | 105 WebRTCIceTransportsAll |
79 }; | 106 }; |
80 | 107 |
81 enum WebRTCBundlePolicy { | 108 enum WebRTCBundlePolicy { |
82 WebRTCBundlePolicyBalanced, | 109 WebRTCBundlePolicyBalanced, |
83 WebRTCBundlePolicyMaxCompat, | 110 WebRTCBundlePolicyMaxCompat, |
84 WebRTCBundlePolicyMaxBundle | 111 WebRTCBundlePolicyMaxBundle |
(...skipping 14 matching lines...) Expand all Loading... | |
99 { | 126 { |
100 assign(other); | 127 assign(other); |
101 return *this; | 128 return *this; |
102 } | 129 } |
103 | 130 |
104 BLINK_PLATFORM_EXPORT void assign(const WebRTCConfiguration&); | 131 BLINK_PLATFORM_EXPORT void assign(const WebRTCConfiguration&); |
105 | 132 |
106 BLINK_PLATFORM_EXPORT void reset(); | 133 BLINK_PLATFORM_EXPORT void reset(); |
107 bool isNull() const { return m_private.isNull(); } | 134 bool isNull() const { return m_private.isNull(); } |
108 | 135 |
136 // TODO(guoweis): Remove the next 2 functions. | |
pthatcher2
2015/09/16 04:09:58
When?
| |
109 BLINK_PLATFORM_EXPORT size_t numberOfServers() const; | 137 BLINK_PLATFORM_EXPORT size_t numberOfServers() const; |
110 BLINK_PLATFORM_EXPORT WebRTCICEServer server(size_t index) const; | 138 BLINK_PLATFORM_EXPORT WebRTCICEServer server(size_t index) const; |
111 | 139 |
112 BLINK_PLATFORM_EXPORT WebRTCIceTransports iceTransports() const; | 140 BLINK_PLATFORM_EXPORT WebRTCIceTransports iceTransports() const; |
113 | 141 |
114 BLINK_PLATFORM_EXPORT WebRTCBundlePolicy bundlePolicy() const; | 142 BLINK_PLATFORM_EXPORT WebRTCBundlePolicy bundlePolicy() const; |
115 | 143 |
116 BLINK_PLATFORM_EXPORT WebRTCRtcpMuxPolicy rtcpMuxPolicy() const; | 144 BLINK_PLATFORM_EXPORT WebRTCRtcpMuxPolicy rtcpMuxPolicy() const; |
145 BLINK_PLATFORM_EXPORT WebRTCICEServerArray iceServers() const; | |
117 | 146 |
118 #if INSIDE_BLINK | 147 #if INSIDE_BLINK |
119 BLINK_PLATFORM_EXPORT WebRTCConfiguration(RTCConfiguration*); | 148 BLINK_PLATFORM_EXPORT WebRTCConfiguration(RTCConfiguration*); |
120 #endif | 149 #endif |
121 | 150 |
122 private: | 151 private: |
123 WebPrivatePtr<RTCConfiguration> m_private; | 152 WebPrivatePtr<RTCConfiguration> m_private; |
124 }; | 153 }; |
125 | 154 |
126 } // namespace blink | 155 } // namespace blink |
127 | 156 |
128 #endif // WebRTCConfiguration_h | 157 #endif // WebRTCConfiguration_h |
OLD | NEW |