wslua: fix nstime memory leak after passing unknown encoding to TvbRange_nstime()
[metze/wireshark/wip.git] / epan / column.h
1 /* column.h
2  * Definitions for column handling routines
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 __COLUMN_H__
24 #define __COLUMN_H__
25
26 #include "ws_symbol_export.h"
27 #include <epan/column-info.h>
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif /* __cplusplus */
32
33 typedef struct _fmt_data {
34   gchar *title;            /* title of the column */
35   int fmt;                 /* format of column */
36   gchar *custom_fields;    /* fields names for COL_CUSTOM */
37   gint custom_occurrence;  /* optional ordinal of occurrence of that field */
38   gboolean visible;        /* if FALSE, hide this column */
39   gboolean resolved;       /* if TRUE, show a more human-readable name */
40 } fmt_data;
41
42 WS_DLL_PUBLIC
43 const gchar         *col_format_to_string(const gint);
44 WS_DLL_PUBLIC
45 const gchar         *col_format_desc(const gint);
46 WS_DLL_PUBLIC
47 gint                 get_column_format(const gint);
48 WS_DLL_PUBLIC
49 void                 set_column_format(const gint, const gint);
50 WS_DLL_PUBLIC
51 void                 get_column_format_matches(gboolean *, const gint);
52 WS_DLL_PUBLIC
53 gint                 get_column_format_from_str(const gchar *);
54 WS_DLL_PUBLIC
55 gchar               *get_column_title(const gint);
56 WS_DLL_PUBLIC
57 void                 set_column_title(const gint, const gchar *);
58 WS_DLL_PUBLIC
59 gboolean             get_column_visible(const gint);
60 WS_DLL_PUBLIC
61 void                 set_column_visible(const gint, gboolean);
62 WS_DLL_PUBLIC
63 gboolean             get_column_resolved(const gint);
64 WS_DLL_PUBLIC
65 void                 set_column_resolved(const gint, gboolean);
66 WS_DLL_PUBLIC
67 const gchar         *get_column_custom_fields(const gint);
68 WS_DLL_PUBLIC
69 void                 set_column_custom_fields(const gint, const char *);
70 WS_DLL_PUBLIC
71 gint                 get_column_custom_occurrence(const gint);
72 WS_DLL_PUBLIC
73 void                 set_column_custom_occurrence(const gint, const gint);
74 WS_DLL_PUBLIC
75 const gchar         *get_column_width_string(const gint, const gint);
76 WS_DLL_PUBLIC
77 gint                 get_column_char_width(const gint format);
78 WS_DLL_PUBLIC
79 gchar               *get_column_tooltip(const gint col);
80
81 WS_DLL_PUBLIC
82 void
83 col_finalize(column_info *cinfo);
84
85 WS_DLL_PUBLIC
86 void
87 build_column_format_array(column_info *cinfo, const gint num_cols, const gboolean reset_fences);
88
89 WS_DLL_PUBLIC
90 void                 column_dump_column_formats(void);
91
92 #ifdef __cplusplus
93 }
94 #endif /* __cplusplus */
95
96 #endif /* column.h */