- use = default when relevant This matches the clang-tidy rules: - https://clang.llvm.org/extra/clang-tidy/checks/modernize/use-equals-default.html That we already use on source files Differential Revision: https://phabricator.services.mozilla.com/D296621
38 lines
1001 B
C++
38 lines
1001 B
C++
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
#ifndef mozilla_devtools_FileDescriptorOutputStream_h
|
|
#define mozilla_devtools_FileDescriptorOutputStream_h
|
|
|
|
#include <prio.h>
|
|
|
|
#include "mozilla/AlreadyAddRefed.h"
|
|
#include "mozilla/ipc/FileDescriptor.h"
|
|
#include "nsIOutputStream.h"
|
|
|
|
namespace mozilla {
|
|
namespace devtools {
|
|
|
|
class FileDescriptorOutputStream final : public nsIOutputStream {
|
|
private:
|
|
PRFileDesc* fd;
|
|
|
|
public:
|
|
static already_AddRefed<FileDescriptorOutputStream> Create(
|
|
const ipc::FileDescriptor& fileDescriptor);
|
|
|
|
private:
|
|
explicit FileDescriptorOutputStream(PRFileDesc* prfd) : fd(prfd) {}
|
|
|
|
virtual ~FileDescriptorOutputStream() = default;
|
|
|
|
NS_DECL_THREADSAFE_ISUPPORTS
|
|
NS_DECL_NSIOUTPUTSTREAM
|
|
};
|
|
|
|
} // namespace devtools
|
|
} // namespace mozilla
|
|
|
|
#endif // mozilla_devtools_FileDescriptorOutputStream_h
|