Next: , Up: Generalities   [Contents][Index]


5.1 Data Types used by the library

ASSUAN uses a so-called context to store a connection’s state. The following data type is used for that:

Data type: assuan_context_t

The assuan_context_t type is a pointer to an object maintained internally by the library. Contexts are allocated with assuan_new or assuan_new_ext and released with assuan_release. Other functions take this data type to access the state created by these functions.

Data type: assuan_fd_t

The assuan_fd_t is a file descriptor (in Unix) or a system handle (in Windows). The special value ASSUAN_INVALID_FD is used to specify invalid Assuan file descriptors.

Function: assuan_fd_t assuan_fdopen (int fd)

Create an assuan file descriptor from a POSIX (libc) file descriptor fd. On Unix, this is equivalent to dup, while on Windows this will retrieve the underlying system handle with _get_osfhandle and duplicate that.