Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(212)

Side by Side Diff: webrtc/api/jsep.h

Issue 2715103002: Replace NULL with nullptr or null in webrtc/api/. (Closed)
Patch Set: merge with master Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/api/jsepicecandidate.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright 2012 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 virtual const cricket::Candidate& candidate() const = 0; 61 virtual const cricket::Candidate& candidate() const = 0;
62 // The URL of the ICE server which this candidate was gathered from. 62 // The URL of the ICE server which this candidate was gathered from.
63 // TODO(zhihuang): Remove the default implementation once the subclasses 63 // TODO(zhihuang): Remove the default implementation once the subclasses
64 // implement this method. 64 // implement this method.
65 virtual std::string server_url() const { return ""; } 65 virtual std::string server_url() const { return ""; }
66 // Creates a SDP-ized form of this candidate. 66 // Creates a SDP-ized form of this candidate.
67 virtual bool ToString(std::string* out) const = 0; 67 virtual bool ToString(std::string* out) const = 0;
68 }; 68 };
69 69
70 // Creates a IceCandidateInterface based on SDP string. 70 // Creates a IceCandidateInterface based on SDP string.
71 // Returns NULL if the sdp string can't be parsed. 71 // Returns null if the sdp string can't be parsed.
72 // |error| may be NULL. 72 // |error| may be null.
73 IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid, 73 IceCandidateInterface* CreateIceCandidate(const std::string& sdp_mid,
74 int sdp_mline_index, 74 int sdp_mline_index,
75 const std::string& sdp, 75 const std::string& sdp,
76 SdpParseError* error); 76 SdpParseError* error);
77 77
78 // This class represents a collection of candidates for a specific m= section. 78 // This class represents a collection of candidates for a specific m= section.
79 // Used in SessionDescriptionInterface. 79 // Used in SessionDescriptionInterface.
80 class IceCandidateCollection { 80 class IceCandidateCollection {
81 public: 81 public:
82 virtual ~IceCandidateCollection() {} 82 virtual ~IceCandidateCollection() {}
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 // Returns a collection of all candidates that belong to a certain m= 134 // Returns a collection of all candidates that belong to a certain m=
135 // section. 135 // section.
136 virtual const IceCandidateCollection* candidates( 136 virtual const IceCandidateCollection* candidates(
137 size_t mediasection_index) const = 0; 137 size_t mediasection_index) const = 0;
138 138
139 // Serializes the description to SDP. 139 // Serializes the description to SDP.
140 virtual bool ToString(std::string* out) const = 0; 140 virtual bool ToString(std::string* out) const = 0;
141 }; 141 };
142 142
143 // Creates a SessionDescriptionInterface based on the SDP string and the type. 143 // Creates a SessionDescriptionInterface based on the SDP string and the type.
144 // Returns NULL if the sdp string can't be parsed or the type is unsupported. 144 // Returns null if the sdp string can't be parsed or the type is unsupported.
145 // |error| may be NULL. 145 // |error| may be null.
146 SessionDescriptionInterface* CreateSessionDescription(const std::string& type, 146 SessionDescriptionInterface* CreateSessionDescription(const std::string& type,
147 const std::string& sdp, 147 const std::string& sdp,
148 SdpParseError* error); 148 SdpParseError* error);
149 149
150 // CreateOffer and CreateAnswer callback interface. 150 // CreateOffer and CreateAnswer callback interface.
151 class CreateSessionDescriptionObserver : public rtc::RefCountInterface { 151 class CreateSessionDescriptionObserver : public rtc::RefCountInterface {
152 public: 152 public:
153 // This callback transfers the ownership of the |desc|. 153 // This callback transfers the ownership of the |desc|.
154 // TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion 154 // TODO(deadbeef): Make this take an std::unique_ptr<> to avoid confusion
155 // around ownership. 155 // around ownership.
(...skipping 10 matching lines...) Expand all
166 virtual void OnSuccess() = 0; 166 virtual void OnSuccess() = 0;
167 virtual void OnFailure(const std::string& error) = 0; 167 virtual void OnFailure(const std::string& error) = 0;
168 168
169 protected: 169 protected:
170 ~SetSessionDescriptionObserver() {} 170 ~SetSessionDescriptionObserver() {}
171 }; 171 };
172 172
173 } // namespace webrtc 173 } // namespace webrtc
174 174
175 #endif // WEBRTC_API_JSEP_H_ 175 #endif // WEBRTC_API_JSEP_H_
OLDNEW
« no previous file with comments | « no previous file | webrtc/api/jsepicecandidate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698