PB-TNC messages implemented
[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 Length
40 *
41 * @return Length of reason string
42 */
43 chunk_t (*get_reason_string_length)(pb_reason_string_message_t *this);
44
45 /**
46 * Get Reason String
47 *
48 * @return Reason string
49 */
50 chunk_t (*get_reason_string)(pb_reason_string_message_t *this);
51
52 /**
53 * Get Reason String Language Code Length
54 *
55 * @return Length of language code
56 */
57 chunk_t (*get_language_code_length)(pb_reason_string_message_t *this);
58
59 /**
60 * Get Reason String Language Code
61 *
62 * @return Language code
63 */
64 chunk_t (*get_language_code)(pb_reason_string_message_t *this);
65 };
66
67 /**
68 * Create a PB-Reason-String message from parameters
69 *
70 * @param reason_string Reason string
71 * @param language_code Language code
72 */
73 pb_tnc_message_t* pb_reason_string_message_create(chunk_t reason_string,
74 chunk_t language_code);
75
76 /**
77 * Create an unprocessed PB-Reason-String message from raw data
78 *
79 * @param data PB-Reason-String message data
80 */
81 pb_tnc_message_t* pb_reason_string_message_create_from_data(chunk_t data);
82
83 #endif /** PB_PA_MESSAGE_H_ @}*/