Fix typo in unit_name_string units_decibels name.
[metze/wireshark/wip.git] / epan / unit_strings.h
1 /* unit_strings.h
2  * Units to append to field values
3  *
4  * Wireshark - Network traffic analyzer
5  * By Gerald Combs <gerald@wireshark.org>
6  * Copyright 1998 Gerald Combs
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21  */
22
23 #ifndef __UNIT_STRINGS_H__
24 #define __UNIT_STRINGS_H__
25
26 #include "ws_symbol_export.h"
27
28 #ifdef __cplusplus
29 extern "C" {
30 #endif /* __cplusplus */
31
32 /** @file
33  * Units to append to field values
34  */
35
36 /* For BASE_UNIT_STRING, the display format for adding units */
37 typedef struct unit_name_string {
38     char *singular;     /* name to use for 1 unit */
39     char *plural;          /* name to use for < 1 or > 1 units */
40 } unit_name_string;
41
42 WS_DLL_PUBLIC char* unit_name_string_get_value(guint32 value, unit_name_string* units);
43 WS_DLL_PUBLIC char* unit_name_string_get_value64(guint64 value, unit_name_string* units);
44
45 /*
46  * A default set of unit strings that dissectors can use for
47  * header fields.
48  */
49 WS_DLL_PUBLIC const unit_name_string units_foot_feet;
50 WS_DLL_PUBLIC const unit_name_string units_bit_bits;
51 WS_DLL_PUBLIC const unit_name_string units_byte_bytes;
52 WS_DLL_PUBLIC const unit_name_string units_octet_octets;
53 WS_DLL_PUBLIC const unit_name_string units_word_words;
54 WS_DLL_PUBLIC const unit_name_string units_tick_ticks;
55 WS_DLL_PUBLIC const unit_name_string units_meter_meters;
56 WS_DLL_PUBLIC const unit_name_string units_second_seconds; // full unit name "second[s?]"
57 WS_DLL_PUBLIC const unit_name_string units_seconds;        //only seconds abbreviation "s"
58 WS_DLL_PUBLIC const unit_name_string units_millisecond_milliseconds; // full unit name "millisecond[s?]"
59 WS_DLL_PUBLIC const unit_name_string units_milliseconds;        //only seconds abbreviation "ms"
60 WS_DLL_PUBLIC const unit_name_string units_microsecond_microseconds; // full unit name "microsecond[s?]"
61 WS_DLL_PUBLIC const unit_name_string units_microseconds;        //only seconds abbreviation "us"
62 WS_DLL_PUBLIC const unit_name_string units_nanosecond_nanoseconds; // full unit name "nanosecond[s?]"
63 WS_DLL_PUBLIC const unit_name_string units_nanometers;
64 WS_DLL_PUBLIC const unit_name_string units_degree_degrees;
65 WS_DLL_PUBLIC const unit_name_string units_decibels;
66 WS_DLL_PUBLIC const unit_name_string units_dbm;
67 WS_DLL_PUBLIC const unit_name_string units_percent;
68 WS_DLL_PUBLIC const unit_name_string units_khz;
69 WS_DLL_PUBLIC const unit_name_string units_ghz;
70 WS_DLL_PUBLIC const unit_name_string units_mhz;
71 WS_DLL_PUBLIC const unit_name_string units_hz;
72 WS_DLL_PUBLIC const unit_name_string units_hz_s;
73 WS_DLL_PUBLIC const unit_name_string units_kbit;
74 WS_DLL_PUBLIC const unit_name_string units_kbps;
75 WS_DLL_PUBLIC const unit_name_string units_kibps;
76 WS_DLL_PUBLIC const unit_name_string units_kmh;
77 WS_DLL_PUBLIC const unit_name_string units_uW;
78 WS_DLL_PUBLIC const unit_name_string units_m_per_s;
79 WS_DLL_PUBLIC const unit_name_string units_m_per_s_per_s;
80 WS_DLL_PUBLIC const unit_name_string units_bit_sec;
81 WS_DLL_PUBLIC const unit_name_string units_segment_remaining;
82
83 #ifdef __cplusplus
84 }
85 #endif /* __cplusplus */
86
87 #endif /* __UNIT_STRINGS_H__ */
88
89 /*
90  * Editor modelines
91  *
92  * Local Variables:
93  * c-basic-offset: 4
94  * tab-width: 8
95  * indent-tabs-mode: nil
96  * End:
97  *
98  * ex: set shiftwidth=4 tabstop=8 expandtab:
99  * :indentSize=4:tabSize=8:noTabs=true:
100  */