/* This file is auto-generated from "message.xml" by the typemaker
   tool of Gwenhywfar. 
   Do not edit this file -- all changes will be lost! */
#ifndef MESSAGE_H
#define MESSAGE_H

/** @page P_AB_MESSAGE_PUBLIC AB_Message (public)
This page describes the properties of AB_MESSAGE
@anchor AB_MESSAGE_Subject
<h3>Subject</h3>
<p>
Subject of the message.
</p>
<p>
Set this property with @ref AB_Message_SetSubject, 
get it with @ref AB_Message_GetSubject
</p>

@anchor AB_MESSAGE_Text
<h3>Text</h3>
<p>
The message itself.
</p>
<p>
Set this property with @ref AB_Message_SetText, 
get it with @ref AB_Message_GetText
</p>

@anchor AB_MESSAGE_DateReceived
<h3>DateReceived</h3>
<p>
Receiption date and time.
</p>
<p>
Set this property with @ref AB_Message_SetDateReceived, 
get it with @ref AB_Message_GetDateReceived
</p>

*/
#ifdef __cplusplus
extern "C" {
#endif

typedef struct AB_MESSAGE AB_MESSAGE;

#ifdef __cplusplus
} /* __cplusplus */
#endif

#include <gwenhywfar/db.h>
#include <gwenhywfar/misc.h>
#include <gwenhywfar/list2.h>
/* headers */
#include <gwenhywfar/types.h>
#include <gwenhywfar/gwentime.h>
#include <aqbanking/error.h>

#ifdef __cplusplus
extern "C" {
#endif


GWEN_LIST_FUNCTION_LIB_DEFS(AB_MESSAGE, AB_Message, AQBANKING_API)
AQBANKING_API AB_MESSAGE_LIST *AB_Message_List_dup(const AB_MESSAGE_LIST *stl);

GWEN_LIST2_FUNCTION_LIB_DEFS(AB_MESSAGE, AB_Message, AQBANKING_API)

/** Destroys all objects stored in the given LIST2 and the list itself
*/
AQBANKING_API void AB_Message_List2_freeAll(AB_MESSAGE_LIST2 *stl);

/** Creates a new object.
*/
AQBANKING_API AB_MESSAGE *AB_Message_new();
/** Creates an object from the data in the given GWEN_DB_NODE
*/
AQBANKING_API AB_MESSAGE *AB_Message_fromDb(GWEN_DB_NODE *db);
/** Creates and returns a deep copy of thegiven object.
*/
AQBANKING_API AB_MESSAGE *AB_Message_dup(const AB_MESSAGE*st);
/** Destroys the given object.
*/
AQBANKING_API void AB_Message_free(AB_MESSAGE *st);
/** Increments the usage counter of the given object, so an additional free() is needed to destroy the object.
*/
AQBANKING_API void AB_Message_Attach(AB_MESSAGE *st);
/** Reads data from a GWEN_DB.
*/
AQBANKING_API int AB_Message_ReadDb(AB_MESSAGE *st, GWEN_DB_NODE *db);
/** Stores an object in the given GWEN_DB_NODE
*/
AQBANKING_API int AB_Message_toDb(const AB_MESSAGE*st, GWEN_DB_NODE *db);
/** Returns 0 if this object has not been modified, !=0 otherwise
*/
AQBANKING_API int AB_Message_IsModified(const AB_MESSAGE *st);
/** Sets the modified state of the given object
*/
AQBANKING_API void AB_Message_SetModified(AB_MESSAGE *st, int i);

/**
* Returns the property @ref AB_MESSAGE_Subject
*/
AQBANKING_API const char *AB_Message_GetSubject(const AB_MESSAGE *el);
/**
* Set the property @ref AB_MESSAGE_Subject
*/
AQBANKING_API void AB_Message_SetSubject(AB_MESSAGE *el, const char *d);

/**
* Returns the property @ref AB_MESSAGE_Text
*/
AQBANKING_API const char *AB_Message_GetText(const AB_MESSAGE *el);
/**
* Set the property @ref AB_MESSAGE_Text
*/
AQBANKING_API void AB_Message_SetText(AB_MESSAGE *el, const char *d);

/**
* Returns the property @ref AB_MESSAGE_DateReceived
*/
AQBANKING_API const GWEN_TIME *AB_Message_GetDateReceived(const AB_MESSAGE *el);
/**
* Set the property @ref AB_MESSAGE_DateReceived
*/
AQBANKING_API void AB_Message_SetDateReceived(AB_MESSAGE *el, const GWEN_TIME *d);


#ifdef __cplusplus
} /* __cplusplus */
#endif


#endif /* MESSAGE_H */
