• BlackBerry Dynamics
  • Runtime library for iOS applications
  • 10.2.0.83
GDStream.h
Go to the documentation of this file.
1 /*
2  * (c) 2019 BlackBerry Limited. All rights reserved.
3  */
4 
5 #pragma once
6 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 #ifndef GD_C_API
16 # if !defined(_WIN32)
17 # define GD_C_API __attribute__((visibility("default")))
18 # else
19 # define GD_C_API
20 # endif
21 #endif
22 
23 #ifndef GD_C_API_EXT
24 # define GD_C_API_EXT
25 #endif
26 
30 struct GD_C_API GDStream;
31 
35 struct GD_C_API GDStreamStorageMethod;
36 
42 GD_C_API const struct GDStreamStorageMethod* GDStream_mem_storage_method(void);
43 
51 GD_C_API struct GDStream* GDStream_new_mem_buf(const void *buf, int len);
52 
59 GD_C_API struct GDStream* GDStream_new(const struct GDStreamStorageMethod* method);
60 
69 GD_C_API int GDStream_read(struct GDStream* stream, void* data, int len);
70 
79 GD_C_API int GDStream_write(struct GDStream* stream, const void* data, int len);
80 
87 GD_C_API int GDStream_reset(struct GDStream* stream);
88 
95 GD_C_API int GDStream_eof(struct GDStream* stream);
96 
102 GD_C_API void GDStream_free(struct GDStream* stream);
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
GDStream_new
struct GDStream * GDStream_new(const struct GDStreamStorageMethod *method)
Create a stream.
GDStream_reset
int GDStream_reset(struct GDStream *stream)
Reset a stream.
GDStream_read
int GDStream_read(struct GDStream *stream, void *data, int len)
Read from a stream.
GDStream_free
void GDStream_free(struct GDStream *stream)
Free a stream structure.
GDStream_new_mem_buf
struct GDStream * GDStream_new_mem_buf(const void *buf, int len)
Create a stream from a region of memory.
GDStream_mem_storage_method
const struct GDStreamStorageMethod * GDStream_mem_storage_method(void)
Retrieve a memory stream storage method.
GDStream_eof
int GDStream_eof(struct GDStream *stream)
Tells if stream has reached the end.
GDStream_write
int GDStream_write(struct GDStream *stream, const void *data, int len)
Write to a stream.