Mercurial > hg > th-libs
comparison th_ioctx.h @ 436:9148bc3fa838
Begin adding Doxygen documentation for some things. Very rudimentary, and
most things are not documented yet.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 10 May 2017 21:00:37 +0300 |
parents | 1b3472ba7b23 |
children | efd33accdc81 |
comparison
equal
deleted
inserted
replaced
435:468d521240c6 | 436:9148bc3fa838 |
---|---|
21 // | 21 // |
22 struct th_ioctx; | 22 struct th_ioctx; |
23 struct th_ioctx_ops; | 23 struct th_ioctx_ops; |
24 | 24 |
25 | 25 |
26 /** I/O context structure | |
27 */ | |
26 typedef struct th_ioctx | 28 typedef struct th_ioctx |
27 { | 29 { |
28 char *filename; | 30 char *filename; ///< Context filename, if any. May be NULL. |
29 char *mode; | 31 char *mode; ///< Context's stdio open "mode", may also be NULL. |
30 void *data; | 32 void *data; ///< Internal data |
31 time_t atime; | 33 time_t atime; ///< Last access time |
32 int64_t size; | 34 int64_t size; ///< Size in bytes |
33 int status; | 35 int status; ///< Status |
34 size_t line; | 36 size_t line; ///< Line number |
35 | 37 |
36 void (*error)(struct th_ioctx *, const int err, const char *msg); | 38 void (*error)(struct th_ioctx *, const int err, const char *msg); |
37 void (*msg)(struct th_ioctx *, const int level, const char *msg); | 39 void (*msg)(struct th_ioctx *, const int level, const char *msg); |
38 | 40 |
39 const struct th_ioctx_ops *fops; | 41 const struct th_ioctx_ops *fops; ///< Pointer to I/O ops struct to be used with this context |
40 } th_ioctx; | 42 } th_ioctx; |
41 | 43 |
42 | 44 |
43 typedef struct th_ioctx_ops | 45 typedef struct th_ioctx_ops |
44 { | 46 { |
45 char *name; | 47 char *name; ///< Name of this I/O ops definition |
46 | 48 |
47 int (*fopen)(th_ioctx *ctx); | 49 int (*fopen)(th_ioctx *ctx); |
48 void (*fclose)(th_ioctx *ctx); | 50 void (*fclose)(th_ioctx *ctx); |
49 | 51 |
50 int (*freset)(th_ioctx *ctx); | 52 int (*freset)(th_ioctx *ctx); |