00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #ifndef AH_MESSAGE_H
00014 #define AH_MESSAGE_H
00015
00016 #ifdef __cplusplus
00017 extern "C" {
00018 #endif
00019 typedef struct AH_MSG AH_MSG;
00020 #ifdef __cplusplus
00021 }
00022 #endif
00023
00024 #include <gwenhywfar/misc.h>
00025 #include <aqhbci/dialog.h>
00026 #include <gwenhywfar/xml.h>
00027 #include <stdio.h>
00028
00029
00030 #ifdef __cplusplus
00031 extern "C" {
00032 #endif
00033
00034 GWEN_LIST_FUNCTION_DEFS(AH_MSG, AH_Msg);
00035
00036
00041 AH_MSG *AH_Msg_new(AH_DIALOG *dlg);
00042 void AH_Msg_free(AH_MSG *hmsg);
00043
00051 GWEN_KEYSPEC *AH_Msg_GetSigners(const AH_MSG *hmsg);
00052 int AH_Msg_AddSigner(AH_MSG *hmsg,
00053 const GWEN_KEYSPEC *ks);
00054 unsigned int AH_Msg_GetSignerCount(AH_MSG *hmsg);
00055 int AH_Msg_IsSignedBy(const AH_MSG *hmsg, const char *s);
00056 const GWEN_KEYSPEC *AH_Msg_GetCrypter(const AH_MSG *hmsg);
00057 void AH_Msg_SetCrypter(AH_MSG *hmsg,
00058 const GWEN_KEYSPEC *ks);
00066 GWEN_BUFFER *AH_Msg_GetBuffer(AH_MSG *hmsg);
00067 GWEN_BUFFER *AH_Msg_TakeBuffer(AH_MSG *hmsg);
00068 void AH_Msg_SetBuffer(AH_MSG *hmsg,
00069 GWEN_BUFFER *bf);
00070
00071 unsigned int AH_Msg_GetMsgNum(const AH_MSG *hmsg);
00072
00073 unsigned int AH_Msg_GetMsgRef(const AH_MSG *hmsg);
00074 void AH_Msg_SetMsgRef(AH_MSG *hmsg,
00075 unsigned int i);
00076 unsigned int AH_Msg_GetNodes(AH_MSG *hmsg);
00077
00078 AH_DIALOG *AH_Msg_GetDialog(const AH_MSG *hmsg);
00079
00080 int AH_Msg_EnableInsert(AH_MSG *hmsg);
00081 int AH_Msg_HasWarnings(const AH_MSG *hmsg);
00082 void AH_Msg_SetHasWarnings(AH_MSG *hmsg, int i);
00083 int AH_Msg_HasErrors(const AH_MSG *hmsg);
00084 void AH_Msg_SetHasErrors(AH_MSG *hmsg, int i);
00085
00086 int AH_Msg_GetResultCode(const AH_MSG *hmsg);
00087 void AH_Msg_SetResultCode(AH_MSG *hmsg, int i);
00088
00089 const char *AH_Msg_GetResultText(const AH_MSG *hmsg);
00090 void AH_Msg_SetResultText(AH_MSG *hmsg, const char *s);
00091
00092 const char *AH_Msg_GetResultParam(const AH_MSG *hmsg);
00093 void AH_Msg_SetResultParam(AH_MSG *hmsg, const char *s);
00094
00095 unsigned int AH_Msg_GetHbciVersion(const AH_MSG *hmsg);
00096 void AH_Msg_SetHbciVersion(AH_MSG *hmsg, unsigned int i);
00097
00098 const char *AH_Msg_GetTan(const AH_MSG *hmsg);
00099
00100 int AH_Msg_GetNeedTan(const AH_MSG *hmsg);
00101 void AH_Msg_SetNeedTan(AH_MSG *hmsg, int i);
00102
00103 int AH_Msg_NoSysId(const AH_MSG *hmsg);
00104 void AH_Msg_SetNoSysId(AH_MSG *hmsg, int i);
00105
00113 unsigned int AH_Msg_GetCurrentSegmentNumber(AH_MSG *hmsg);
00114
00115 unsigned int AH_Msg_AddNode(AH_MSG *hmsg,
00116 GWEN_XMLNODE *node,
00117 GWEN_DB_NODE *data);
00118
00119 unsigned int AH_Msg_InsertNode(AH_MSG *hmsg,
00120 GWEN_XMLNODE *node,
00121 GWEN_DB_NODE *data);
00122
00123 int AH_Msg_EncodeMsg(AH_MSG *hmsg);
00124
00128 int AH_Msg_DecodeMsg(AH_MSG *hmsg,
00129 GWEN_DB_NODE *gr,
00130 unsigned int flags);
00131
00145 void AH_Msg_SetDecodedMsg(AH_MSG *msg, GWEN_DB_NODE *db);
00146
00153 GWEN_DB_NODE *AH_Msg_GetDecodedMsg(const AH_MSG *msg);
00154
00155
00162 GWEN_DB_NODE *AH_Msg_TakeDecodedMsg(AH_MSG *msg);
00163
00164
00172 void AH_Msg__Dump(const AH_MSG *hmsg,
00173 FILE *f,
00174 unsigned int indent);
00175
00176 #define AH_Msg_Dump(hmsg, f, indent) \
00177 {fprintf(stderr, "Dumping message from "__FILE__" %d\n", __LINE__);\
00178 AH_Msg__Dump(hmsg, f, indent);}
00179
00183 #ifdef __cplusplus
00184 }
00185 #endif
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200
00201
00202 #endif
00203
00204
00205