/**********************************************************
 * This file has been automatically created by "typemaker2"
 * from the file "document.xml".
 * Please do not edit this file, all changes will be lost.
 * Better edit the mentioned source file instead.
 **********************************************************/

#ifndef AB_DOCUMENT_DOCUMENT_H
#define AB_DOCUMENT_DOCUMENT_H


#ifdef __cplusplus
extern "C" {
#endif

/** @page P_AB_DOCUMENT Structure AB_DOCUMENT
<p>This page describes the properties of AB_DOCUMENT.</p>



<h1>AB_DOCUMENT</h1>



@anchor AB_DOCUMENT_id
<h2>id</h2>

<p>Set this property with @ref AB_Document_SetId(), get it with @ref AB_Document_GetId().</p>


@anchor AB_DOCUMENT_ownerId
<h2>ownerId</h2>

The meaning of this field depends on the type of document. For electronic statements this is the unique id of the account this statement belongs to.
<p>Set this property with @ref AB_Document_SetOwnerId(), get it with @ref AB_Document_GetOwnerId().</p>


@anchor AB_DOCUMENT_mimeType
<h2>mimeType</h2>

<p>Set this property with @ref AB_Document_SetMimeType(), get it with @ref AB_Document_GetMimeType().</p>


@anchor AB_DOCUMENT_filePath
<h2>filePath</h2>

<p>Set this property with @ref AB_Document_SetFilePath(), get it with @ref AB_Document_GetFilePath().</p>


@anchor AB_DOCUMENT_data
<h2>data</h2>

<p>Set this property with @ref AB_Document_SetData(), get it with @ref AB_Document_GetData().</p>


@anchor AB_DOCUMENT_acknowledgeCode
<h2>acknowledgeCode</h2>

<p>Set this property with @ref AB_Document_SetAcknowledgeCode(), get it with @ref AB_Document_GetAcknowledgeCode().</p>

*/

/* needed system headers */
#include <gwenhywfar/types.h>
#include <gwenhywfar/list1.h>
#include <gwenhywfar/list2.h>
#include <gwenhywfar/db.h>
#include <gwenhywfar/xml.h>

/* pre-headers */
#include <aqbanking/error.h>
#include <gwenhywfar/types.h>
#include <gwenhywfar/bindata.h>
#include <gwenhywfar/base64.h>

typedef struct AB_DOCUMENT AB_DOCUMENT;
GWEN_LIST_FUNCTION_LIB_DEFS(AB_DOCUMENT, AB_Document, AQBANKING_API)
GWEN_LIST2_FUNCTION_LIB_DEFS(AB_DOCUMENT, AB_Document, AQBANKING_API)



/* post-headers */


/** Constructor. */
AQBANKING_API AB_DOCUMENT *AB_Document_new(void);

/** Destructor. */
AQBANKING_API void AB_Document_free(AB_DOCUMENT *p_struct);

AQBANKING_API void AB_Document_Attach(AB_DOCUMENT *p_struct);

AQBANKING_API AB_DOCUMENT *AB_Document_dup(const AB_DOCUMENT *p_src);

AQBANKING_API AB_DOCUMENT *AB_Document_copy(AB_DOCUMENT *p_struct, const AB_DOCUMENT *p_src);

/** Getter.
 * Use this function to get the member "id" (see @ref AB_DOCUMENT_id)
*/
AQBANKING_API const char *AB_Document_GetId(const AB_DOCUMENT *p_struct);

/** Getter.
 * Use this function to get the member "ownerId" (see @ref AB_DOCUMENT_ownerId)
*/
AQBANKING_API uint32_t AB_Document_GetOwnerId(const AB_DOCUMENT *p_struct);

/** Getter.
 * Use this function to get the member "mimeType" (see @ref AB_DOCUMENT_mimeType)
*/
AQBANKING_API const char *AB_Document_GetMimeType(const AB_DOCUMENT *p_struct);

/** Getter.
 * Use this function to get the member "filePath" (see @ref AB_DOCUMENT_filePath)
*/
AQBANKING_API const char *AB_Document_GetFilePath(const AB_DOCUMENT *p_struct);

/** Setter.
 * Use this function to set the member "id" (see @ref AB_DOCUMENT_id)
*/
AQBANKING_API void AB_Document_SetId(AB_DOCUMENT *p_struct, const char *p_src);

/** Setter.
 * Use this function to set the member "ownerId" (see @ref AB_DOCUMENT_ownerId)
*/
AQBANKING_API void AB_Document_SetOwnerId(AB_DOCUMENT *p_struct, uint32_t p_src);

/** Setter.
 * Use this function to set the member "mimeType" (see @ref AB_DOCUMENT_mimeType)
*/
AQBANKING_API void AB_Document_SetMimeType(AB_DOCUMENT *p_struct, const char *p_src);

/** Setter.
 * Use this function to set the member "filePath" (see @ref AB_DOCUMENT_filePath)
*/
AQBANKING_API void AB_Document_SetFilePath(AB_DOCUMENT *p_struct, const char *p_src);

AQBANKING_API AB_DOCUMENT_LIST *AB_Document_List_dup(const AB_DOCUMENT_LIST *p_src);

AQBANKING_API void AB_Document_ReadDb(AB_DOCUMENT *p_struct, GWEN_DB_NODE *p_db);

AQBANKING_API int AB_Document_WriteDb(const AB_DOCUMENT *p_struct, GWEN_DB_NODE *p_db);

AQBANKING_API AB_DOCUMENT *AB_Document_fromDb(GWEN_DB_NODE *p_db);

AQBANKING_API int AB_Document_toDb(const AB_DOCUMENT *p_struct, GWEN_DB_NODE *p_db);

AQBANKING_API void AB_Document_ReadXml(AB_DOCUMENT *p_struct, GWEN_XMLNODE *p_db);

AQBANKING_API void AB_Document_WriteXml(const AB_DOCUMENT *p_struct, GWEN_XMLNODE *p_db);

AQBANKING_API void AB_Document_toXml(const AB_DOCUMENT *p_struct, GWEN_XMLNODE *p_db);

AQBANKING_API AB_DOCUMENT *AB_Document_fromXml(GWEN_XMLNODE *p_db);

AQBANKING_API void AB_Document_toHashString(const AB_DOCUMENT *p_struct, GWEN_BUFFER *p_buffer);

AQBANKING_API int AB_Document_List2_freeAll(AB_DOCUMENT_LIST2 *tl);
AQBANKING_API void AB_Document_SetData(AB_DOCUMENT *st, const uint8_t *p, uint32_t len);
AQBANKING_API const uint8_t* AB_Document_GetDataPtr(const AB_DOCUMENT *st);
AQBANKING_API uint32_t AB_Document_GetDataLen(const AB_DOCUMENT *st);
AQBANKING_API void AB_Document_SetAcknowledgeCode(AB_DOCUMENT *st, const uint8_t *p, uint32_t len);
AQBANKING_API const uint8_t* AB_Document_GetAcknowledgeCodePtr(const AB_DOCUMENT *st);
AQBANKING_API uint32_t AB_Document_GetAcknowledgeCodeLen(const AB_DOCUMENT *st);


#ifdef __cplusplus
}
#endif

#endif

