Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 |length| bytes from file to |buf|. Returns the number of bytes read |
|
åsapersson
2016/06/14 15:22:11
|len|
tommi
2016/06/14 20:45:34
Done.
| |
| 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 |length| 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 Loading... | |
| 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_ |
| OLD | NEW |