implemented check_and_build_recommendation()
[strongswan.git] / src / libcharon / plugins / tnccs_11 / messages / tnccs_reason_strings_msg.h
1 /*
2 * Copyright (C) 2010 Andreas Steffen
3 * HSR Hochschule fuer Technik Rapperswil
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License as published by the
7 * Free Software Foundation; either version 2 of the License, or (at your
8 * option) any later version. See <http://www.fsf.org/copyleft/gpl.txt>.
9 *
10 * This program is distributed in the hope that it will be useful, but
11 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
13 * for more details.
14 */
15
16 /**
17 * @defgroup tnccs_reason_strings_msg tnccs_reason_strings_msg
18 * @{ @ingroup tnccs_11
19 */
20
21 #ifndef TNCCS_REASON_STRINGS_MSG_H_
22 #define TNCCS_REASON_STRINGS_MSG_H_
23
24 typedef struct tnccs_reason_strings_msg_t tnccs_reason_strings_msg_t;
25
26 #include "tnccs_msg.h"
27
28 /**
29 * Class representing the TNCCS-ReasonStrings message type
30 */
31 struct tnccs_reason_strings_msg_t {
32
33 /**
34 * TNCCS Message interface
35 */
36 tnccs_msg_t tnccs_msg_interface;
37
38 /**
39 * Get reason string and language
40 *
41 * @param language reason language
42 * @return reason string
43 */
44 chunk_t (*get_reason)(tnccs_reason_strings_msg_t *this, chunk_t *language);
45 };
46
47 /**
48 * Create a TNCCS-ReasonStrings message from XML-encoded message node
49 *
50 * @param msg_node XML-encoded message node
51 * @param errors linked list of TNCCS error messages
52 */
53 tnccs_msg_t *tnccs_reason_strings_msg_create_from_node(xmlNodePtr node,
54 linked_list_t *errors);
55
56 /**
57 * Create a TNCCS-ReasonStrings message from parameters
58 *
59 * @param reason reason string
60 * @param language reason language
61 */
62 tnccs_msg_t *tnccs_reason_strings_msg_create(chunk_t reason, chunk_t language);
63
64 #endif /** TNCCS_REASON_STRINGS_MSG_H_ @}*/