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

Side by Side Diff: webrtc/common_types.h

Issue 2054373002: FileWrapper[Impl] modifications and actually remove the "Impl" class. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix use of ASSERT instead of ASSERT_TRUE in test Created 4 years, 6 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 | « webrtc/call/rtc_event_log_helper_thread.cc ('k') | webrtc/common_types.cc » ('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 (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 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 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 #define STR_NCASE_CMP(s1, s2, n) ::_strnicmp(s1, s2, n) 47 #define STR_NCASE_CMP(s1, s2, n) ::_strnicmp(s1, s2, n)
48 #else 48 #else
49 #define STR_CASE_CMP(s1, s2) ::strcasecmp(s1, s2) 49 #define STR_CASE_CMP(s1, s2) ::strcasecmp(s1, s2)
50 #define STR_NCASE_CMP(s1, s2, n) ::strncasecmp(s1, s2, n) 50 #define STR_NCASE_CMP(s1, s2, n) ::strncasecmp(s1, s2, n)
51 #endif 51 #endif
52 52
53 namespace webrtc { 53 namespace webrtc {
54 54
55 class Config; 55 class Config;
56 56
57 class InStream 57 class RewindableStream {
58 { 58 public:
59 public: 59 virtual ~RewindableStream() {}
60 // Reads |length| bytes from file to |buf|. Returns the number of bytes read 60 virtual int Rewind() = 0;
61 // or -1 on error.
62 virtual int Read(void *buf, size_t len) = 0;
63 virtual int Rewind();
64 virtual ~InStream() {}
65 protected:
66 InStream() {}
67 }; 61 };
68 62
69 class OutStream 63 class InStream : public RewindableStream {
70 { 64 public:
71 public: 65 // Reads |len| bytes from file to |buf|. Returns the number of bytes read
72 // Writes |length| bytes from |buf| to file. The actual writing may happen 66 // or -1 on error.
73 // some time later. Call Flush() to force a write. 67 virtual int Read(void* buf, size_t len) = 0;
74 virtual bool Write(const void *buf, size_t len) = 0; 68 };
75 virtual int Rewind(); 69
76 virtual ~OutStream() {} 70 class OutStream : public RewindableStream {
77 protected: 71 public:
78 OutStream() {} 72 // Writes |len| bytes from |buf| to file. The actual writing may happen
73 // some time later. Call Flush() to force a write.
74 virtual bool Write(const void* buf, size_t len) = 0;
79 }; 75 };
80 76
81 enum TraceModule 77 enum TraceModule
82 { 78 {
83 kTraceUndefined = 0, 79 kTraceUndefined = 0,
84 // not a module, triggered from the engine code 80 // not a module, triggered from the engine code
85 kTraceVoice = 0x0001, 81 kTraceVoice = 0x0001,
86 // not a module, triggered from the engine code 82 // not a module, triggered from the engine code
87 kTraceVideo = 0x0002, 83 kTraceVideo = 0x0002,
88 // not a module, triggered from the utility code 84 // not a module, triggered from the utility code
(...skipping 824 matching lines...) Expand 10 before | Expand all | Expand 10 after
913 enum class RtcpMode { kOff, kCompound, kReducedSize }; 909 enum class RtcpMode { kOff, kCompound, kReducedSize };
914 910
915 enum NetworkState { 911 enum NetworkState {
916 kNetworkUp, 912 kNetworkUp,
917 kNetworkDown, 913 kNetworkDown,
918 }; 914 };
919 915
920 } // namespace webrtc 916 } // namespace webrtc
921 917
922 #endif // WEBRTC_COMMON_TYPES_H_ 918 #endif // WEBRTC_COMMON_TYPES_H_
OLDNEW
« no previous file with comments | « webrtc/call/rtc_event_log_helper_thread.cc ('k') | webrtc/common_types.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698