handle zero size Base64 conversions
[strongswan.git] / src / libcharon / plugins / tnccs_11 / messages / tnccs_preferred_language_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_preferred_language_msg tnccs_preferred_language_msg
18 * @{ @ingroup tnccs_11
19 */
20
21 #ifndef TNCCS_PREFERRED_LANGUAGE_MSG_H_
22 #define TNCCS_PREFERRED_LANGUAGE_MSG_H_
23
24 typedef struct tnccs_preferred_language_msg_t tnccs_preferred_language_msg_t;
25
26 #include "tnccs_msg.h"
27
28 #include <tnc/tncif.h>
29
30 /**
31 * Class representing the TNCCS-PreferredLanguage message type
32 */
33 struct tnccs_preferred_language_msg_t {
34
35 /**
36 * TNCCS Message interface
37 */
38 tnccs_msg_t tnccs_msg_interface;
39
40 /**
41 * Get preferred language string
42 *
43 * @return preferred language string
44 */
45 char* (*get_preferred_language)(tnccs_preferred_language_msg_t *this);
46 };
47
48 /**
49 * Create a TNCCS-PreferredLanguage message from XML-encoded message node
50 *
51 * @param msg_node XML-encoded message node
52 * @param errors linked list of TNCCS error messages
53 */
54 tnccs_msg_t *tnccs_preferred_language_msg_create_from_node(xmlNodePtr node,
55 linked_list_t *errors);
56
57 /**
58 * Create a TNCCS-PreferredLanguage message from parameters
59 *
60 * @param language preferred language string
61 */
62 tnccs_msg_t *tnccs_preferred_language_msg_create(char *language);
63
64 #endif /** TNCCS_PREFERRED_LANGUAGE_MSG_H_ @}*/