NVIDIA DriveOS Linux SDK API Reference

7.2.5.0 Early Access Release
IOStream.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2016-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
29 #ifndef DW_CORE_IOSTREAM_H_
30 #define DW_CORE_IOSTREAM_H_
31 
32 #include <dw/core/base/Exports.h>
33 #include <dw/core/base/Types.h>
34 #include <dw/core/base/Status.h>
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
44 typedef enum dwIOStreamFlags {
45  DW_IOSTREAM_READ = 1 << 0,
46  DW_IOSTREAM_WRITE = 1 << 1,
47  DW_IOSTREAM_APPEND = 1 << 2,
50 
54 typedef struct dwIOStreamObject* dwIOStreamHandle_t;
55 
75 dwStatus dwIOStream_openFile(dwIOStreamHandle_t* stream, const char8_t* path, uint64_t flags, dwContextHandle_t context);
76 
96 
97 // Reading, seeking and other interfaces intentionally omitted, as the goal of this API is not
98 // to provide a replacement for stdio to users, but to serve as a way to communicate how data is
99 // to be read to other DW APIs.
100 
115 
116 #ifdef __cplusplus
117 }
118 #endif
119 
121 #endif
dwIOStream_close
DW_API_PUBLIC dwStatus dwIOStream_close(dwIOStreamHandle_t stream)
Close a file stream that was opened with dwIOStream_openFile.
Types.h
DW_IOSTREAM_READ
@ DW_IOSTREAM_READ
Stream flag for read access.
Definition: IOStream.h:45
Exports.h
dwIOStream_openFile
DW_API_PUBLIC dwStatus dwIOStream_openFile(dwIOStreamHandle_t *stream, const char8_t *path, uint64_t flags, dwContextHandle_t context)
Open a file stream with the given path and read / write parameters.
DW_IOSTREAM_FORCE_BUFFERED
@ DW_IOSTREAM_FORCE_BUFFERED
Stream flag to forcing buffered underlying filestream.
Definition: IOStream.h:48
dwIOStream_wrapFileDescriptor
DW_API_PUBLIC dwStatus dwIOStream_wrapFileDescriptor(dwIOStreamHandle_t *stream, int posixFd)
Adopt a currently open POSIX file descriptor.
char8_t
char char8_t
Definition: core/base/BasicTypes.h:55
dwIOStreamHandle_t
struct dwIOStreamObject * dwIOStreamHandle_t
Stream handle.
Definition: IOStream.h:54
DW_IOSTREAM_APPEND
@ DW_IOSTREAM_APPEND
Stream flag for append access.
Definition: IOStream.h:47
dwStatus
dwStatus
Status definition.
Definition: ErrorDefs.h:32
dwContextHandle_t
struct dwContextObject * dwContextHandle_t
Context handle.
Definition: Context.h:81
dwIOStreamFlags
dwIOStreamFlags
Enumerated type for IO Stream flags.
Definition: IOStream.h:44
Status.h
DW_API_PUBLIC
#define DW_API_PUBLIC
Definition: core/base/Exports.h:57
DW_IOSTREAM_WRITE
@ DW_IOSTREAM_WRITE
Stream flag for write access.
Definition: IOStream.h:46
dwIOStreamHandle_t
struct dwIOStreamObject * dwIOStreamHandle_t
Handle to IO stream object.
Definition: Demuxer.h:84
Context.h