Move file_wrapper.h to rtc_base/system/

This moves it from an API directory (system_wrappers/include/) to a
non-API directory, which is exactly what we want for utilities like
this.

BUG=webrtc:8445

Change-Id: I440974da4d347b09ff042478720d7983056b62b9
Reviewed-on: https://webrtc-review.googlesource.com/21226
Commit-Queue: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Niels Moller <nisse@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#22579}
This commit is contained in:
Karl Wiberg
2018-03-23 10:39:34 +01:00
committed by Commit Bot
parent 278d03a42c
commit 6a4d411023
20 changed files with 39 additions and 19 deletions

View File

@ -971,6 +971,7 @@ rtc_static_library("audio_network_adaptor") {
"../../rtc_base:checks",
"../../rtc_base:protobuf_utils",
"../../rtc_base:rtc_base_approved",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers",
"../../system_wrappers:field_trial_api",
]

View File

@ -17,7 +17,7 @@
#include "modules/audio_coding/audio_network_adaptor/include/audio_network_adaptor.h"
#include "rtc_base/constructormagic.h"
#include "rtc_base/ignore_wundef.h"
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#if WEBRTC_ENABLE_PROTOBUF
RTC_PUSH_IGNORING_WUNDEF()
#ifdef WEBRTC_ANDROID_PLATFORM_BUILD

View File

@ -187,6 +187,7 @@ rtc_source_set("audio_device_impl") {
"../../rtc_base:deprecation",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:rtc_task_queue",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers",
"../../system_wrappers:metrics_api",
"../utility",

View File

@ -18,8 +18,8 @@
#include "modules/audio_device/audio_device_generic.h"
#include "rtc_base/criticalsection.h"
#include "rtc_base/system/file_wrapper.h"
#include "rtc_base/timeutils.h"
#include "system_wrappers/include/file_wrapper.h"
namespace rtc {
class PlatformThread;

View File

@ -137,6 +137,7 @@ rtc_static_library("audio_processing") {
"../../rtc_base:protobuf_utils",
"../../rtc_base:safe_minmax",
"../../rtc_base:sanitizer",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers:cpu_features_api",
"../../system_wrappers:field_trial_api",
"../../system_wrappers:metrics_api",
@ -539,6 +540,7 @@ if (rtc_include_tests) {
"../../rtc_base:rtc_base",
"../../rtc_base:rtc_base_approved",
"../../rtc_base:safe_minmax",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers",
"../../system_wrappers:cpu_features_api",
"../../test:fileutils",
@ -766,6 +768,7 @@ if (rtc_include_tests) {
"../..:webrtc_common",
"../../common_audio:common_audio",
"../../rtc_base:rtc_base_approved",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers",
"../../system_wrappers:metrics_default",
"../../test:fileutils",
@ -785,6 +788,7 @@ if (rtc_include_tests) {
":audio_processing",
"../..:typedefs",
"../..:webrtc_common",
"../../rtc_base/system:file_wrapper",
"../../system_wrappers",
"../../system_wrappers:metrics_default",
]

View File

@ -68,6 +68,7 @@ if (rtc_enable_protobuf) {
"../../../rtc_base:protobuf_utils",
"../../../rtc_base:rtc_base_approved",
"../../../rtc_base:rtc_task_queue",
"../../../rtc_base/system:file_wrapper",
"../../../system_wrappers",
]

View File

@ -22,9 +22,9 @@
#include "rtc_base/ignore_wundef.h"
#include "rtc_base/platform_file.h"
#include "rtc_base/race_checker.h"
#include "rtc_base/system/file_wrapper.h"
#include "rtc_base/task_queue.h"
#include "rtc_base/thread_annotations.h"
#include "system_wrappers/include/file_wrapper.h"
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()

View File

@ -19,8 +19,8 @@
#include "rtc_base/event.h"
#include "rtc_base/ignore_wundef.h"
#include "rtc_base/platform_file.h"
#include "rtc_base/system/file_wrapper.h"
#include "rtc_base/task_queue.h"
#include "system_wrappers/include/file_wrapper.h"
// Files generated at build-time by the protobuf compiler.
RTC_PUSH_IGNORING_WUNDEF()

View File

@ -45,7 +45,7 @@
#include "modules/audio_processing/voice_detection_impl.h"
#include "modules/include/module_common_types.h"
#include "rtc_base/atomicops.h"
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "system_wrappers/include/metrics.h"
// Check to verify that the define for the intelligibility enhancer is properly

View File

@ -26,8 +26,8 @@
#include "rtc_base/ignore_wundef.h"
#include "rtc_base/protobuf_utils.h"
#include "rtc_base/swap_queue.h"
#include "rtc_base/system/file_wrapper.h"
#include "rtc_base/thread_annotations.h"
#include "system_wrappers/include/file_wrapper.h"
namespace webrtc {

View File

@ -14,9 +14,9 @@
#include <memory>
#include <vector>
#include "modules/audio_processing/transient/transient_detector.h"
#include "modules/audio_processing/transient/file_utils.h"
#include "system_wrappers/include/file_wrapper.h"
#include "modules/audio_processing/transient/transient_detector.h"
#include "rtc_base/system/file_wrapper.h"
using webrtc::FileWrapper;
using webrtc::TransientDetector;

View File

@ -12,7 +12,7 @@
#include <memory>
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {

View File

@ -13,7 +13,7 @@
#include <string.h>
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "typedefs.h" // NOLINT(build/include)
namespace webrtc {

View File

@ -15,7 +15,7 @@
#include <memory>
#include <vector>
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "test/gtest.h"
#include "test/testsupport/fileutils.h"
#include "typedefs.h" // NOLINT(build/include)

View File

@ -16,7 +16,7 @@
#include "modules/audio_processing/transient/common.h"
#include "modules/audio_processing/transient/file_utils.h"
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "test/gtest.h"
#include "test/testsupport/fileutils.h"
#include "typedefs.h" // NOLINT(build/include)

View File

@ -16,7 +16,7 @@
#include "modules/audio_processing/transient/daubechies_8_wavelet_coeffs.h"
#include "modules/audio_processing/transient/file_utils.h"
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#include "test/gtest.h"
#include "test/testsupport/fileutils.h"

View File

@ -23,3 +23,16 @@ rtc_source_set("fallthrough") {
"fallthrough.h",
]
}
rtc_source_set("file_wrapper") {
sources = [
"file_wrapper.cc",
"file_wrapper.h",
]
deps = [
"..:checks",
"..:criticalsection",
"../..:typedefs",
"../..:webrtc_common",
]
}

View File

@ -8,7 +8,7 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#include "system_wrappers/include/file_wrapper.h"
#include "rtc_base/system/file_wrapper.h"
#ifdef _WIN32
#include <Windows.h>
@ -17,6 +17,8 @@
#include <string.h>
#endif
#include <utility>
#include "rtc_base/checks.h"
namespace webrtc {

View File

@ -8,8 +8,8 @@
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef SYSTEM_WRAPPERS_INCLUDE_FILE_WRAPPER_H_
#define SYSTEM_WRAPPERS_INCLUDE_FILE_WRAPPER_H_
#ifndef RTC_BASE_SYSTEM_FILE_WRAPPER_H_
#define RTC_BASE_SYSTEM_FILE_WRAPPER_H_
#include <stddef.h>
#include <stdio.h>
@ -85,4 +85,4 @@ class FileWrapper : public InStream, public OutStream {
} // namespace webrtc
#endif // SYSTEM_WRAPPERS_INCLUDE_FILE_WRAPPER_H_
#endif // RTC_BASE_SYSTEM_FILE_WRAPPER_H_

View File

@ -18,7 +18,6 @@ rtc_static_library("system_wrappers") {
"include/clock.h",
"include/cpu_info.h",
"include/event_wrapper.h",
"include/file_wrapper.h",
"include/ntp_time.h",
"include/rtp_to_ntp_estimator.h",
"include/rw_lock_wrapper.h",
@ -31,7 +30,6 @@ rtc_static_library("system_wrappers") {
"source/event_timer_posix.h",
"source/event_timer_win.cc",
"source/event_timer_win.h",
"source/file_impl.cc",
"source/rtp_to_ntp_estimator.cc",
"source/rw_lock.cc",
"source/rw_lock_posix.cc",