tshark: endpoints statistics are not supported for now, do not list them in -z
[metze/wireshark/wip.git] / codecs / codecs.h
1 /* codecs.h
2  * codecs interface   2007 Tomas Kukosa
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 _CODECS_H_
24 #define _CODECS_H_
25
26 #include "config.h"
27
28 #include <epan/epan.h>
29 #include "ws_symbol_export.h"
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif /* __cplusplus */
34
35 #ifdef HAVE_PLUGINS
36 extern void codec_register_plugin_types(void);
37 extern void register_all_codecs(void);
38 #endif
39
40 struct codec_handle;
41 typedef struct codec_handle *codec_handle_t;
42
43 typedef void *(*codec_init_fn)(void);
44 typedef void (*codec_release_fn)(void *context);
45 typedef int (*codec_get_channels_fn)(void *context);
46 typedef int (*codec_get_frequency_fn)(void *context);
47 typedef int (*codec_decode_fn)(void *context, const void *input, int inputSizeBytes,
48         void *output, int *outputSizeBytes);
49
50 extern gboolean register_codec(const char *name, codec_init_fn init_fn,
51         codec_release_fn release_fn, codec_get_channels_fn channels_fn,
52         codec_get_frequency_fn frequency_fn, codec_decode_fn decode_fn);
53 extern codec_handle_t find_codec(const char *name);
54 extern void *codec_init(codec_handle_t codec);
55 extern void codec_release(codec_handle_t codec, void *context);
56 extern int codec_get_channels(codec_handle_t codec, void *context);
57 extern int codec_get_frequency(codec_handle_t codec, void *context);
58 extern int codec_decode(codec_handle_t codec, void *context, const void *input,
59         int inputSizeBytes, void *output, int *outputSizeBytes);
60
61 #ifdef __cplusplus
62 }
63 #endif /* __cplusplus */
64
65 #endif /* _CODECS_H_ */
66
67 /*
68  * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
69  *
70  * Local variables:
71  * c-basic-offset: 4
72  * tab-width: 8
73  * indent-tabs-mode: nil
74  * End:
75  *
76  * vi: set shiftwidth=4 tabstop=8 expandtab:
77  * :indentSize=4:tabSize=8:noTabs=true:
78  */