2245e33bc0a5d3c0a9f017c1582961fe65143f0a
[strongswan.git] / src / libcharon / plugins / tnccs_20 / messages / pb_reason_string_message.h
1 /*
2 * Copyright (C) 2010 Sansar Choinyambuu
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 pb_reason_string_message pb_reason_string_message
18 * @{ @ingroup tnccs_20
19 */
20
21 #ifndef PB_REASON_STRING_MESSAGE_H_
22 #define PB_REASON_STRING_MESSAGE_H_
23
24 #include "pb_tnc_message.h"
25
26 typedef struct pb_reason_string_message_t pb_reason_string_message_t;
27
28 /**
29 * Classs representing the PB-Reason-String message type.
30 */
31 struct pb_reason_string_message_t {
32
33 /**
34 * PB-TNC Message interface
35 */
36 pb_tnc_message_t pb_interface;
37
38 /**
39 * Get Reason String
40 *
41 * @return Reason string
42 */
43 chunk_t (*get_reason_string)(pb_reason_string_message_t *this);
44
45 /**
46 * Get Reason String Language Code
47 *
48 * @return Language code
49 */
50 chunk_t (*get_language_code)(pb_reason_string_message_t *this);
51 };
52
53 /**
54 * Create a PB-Reason-String message from parameters
55 *
56 * @param reason_string Reason string
57 * @param language_code Language code
58 */
59 pb_tnc_message_t* pb_reason_string_message_create(chunk_t reason_string,
60 chunk_t language_code);
61
62 /**
63 * Create an unprocessed PB-Reason-String message from raw data
64 *
65 * @param data PB-Reason-String message data
66 */
67 pb_tnc_message_t* pb_reason_string_message_create_from_data(chunk_t data);
68
69 #endif /** PB_PA_MESSAGE_H_ @}*/