Copyright (C) 2000-2012 |
GNU Info (gpgme.info)Manipulating Data BuffersManipulating Data Buffers ========================= - Function: GpgmeError gpgme_data_read (GpgmeData DH, char *BUFFER, size_t LENGTH, size_t *NREAD) The function `gpgme_data_read' reads up to LENGTH bytes from the data object with the handle DH into the space starting at BUFFER. The actual amount read is returned in NREAD. If BUFFER is `NULL', the function returns the amount of bytes available in NREAD without changing the read pointer. This is not supported by all types of data objects. If this function is not supported, `GPGME_Invalid_Type' is returned. If the end of the data object is reached, the function returns `GPGME_EOF' and sets NREAD to zero. In all other cases, the function returns `GPGME_No_Error' if the operation was successfully performed and `GPGME_Invalid_Value' if DH is not a valid pointer. - Function: GpgmeError gpgme_data_rewind (GpgmeData DH) The function `gpgme_data_rewind' resets the read pointer of the data object with the handle DH, so that a subsequent `gpgme_data_read' operation starts at the beginning of the data. The function returns `GPGME_No_Error' if the operation was successfully performed, `GPGME_Not_Implemented' if the operation is not supported (for example, by a read callback function supplied by the user) and `GPGME_Invalid_Value' if DH is not a valid pointer. - Function: GpgmeError gpgme_data_write (GpgmeData DH, const char *BUFFER, size_t LENGTH) The function `gpgme_data_write' writes LENGTH bytes starting from BUFFER into the data object with the handle DH at the current write position. The function returns `GPGME_No_Error' if the operation was successfully performed, `GPGME_Invalid_Value' if DH or BUFFER is not a valid pointer, `GPGME_Invalid_Type' or `GPGME_Invalid_Mode' if the data object type does not support writing, and `GPGME_Out_Of_Core' if not enough memory is available. - Data type: enum GpgmeDataType The `GpgmeDataType' type specifies the type of a `GpgmeData' object. The following data types are available: `GPGME_DATA_TYPE_NONE' This specifies that the type is not yet determined. `GPGME_DATA_TYPE_MEM' This specifies that the data is stored in memory. `GPGME_DATA_TYPE_FD' This type is not implemented. `GPGME_DATA_TYPE_FILE' This type is not implemented. `GPGME_DATA_TYPE_CB' This type specifies that the data is provided by a callback function implemented by the user. - Function: GpgmeDataType gpgme_data_get_type (GpgmeData DH) The function `gpgme_data_get_type' returns the type of the data object with the handle DH. If DH is not a valid pointer, `GPGME_DATA_TYPE_NONE' is returned. automatically generated by info2www version 1.2.2.9 |