Revert "TODO epan/dissectors/asn1/kerberos/packet-kerberos-template.c new GSS flags"
[wireshark-sm.git] / wsutil / application_flavor.h
blobf6ea4e19a5acaf2353833b9c08d15e5c5402170a
1 /** @file
2 * Application flavor definitions
4 * Wireshark - Network traffic analyzer
5 * By Gerald Combs <gerald@wireshark.org>
6 * Copyright 1998 Gerald Combs
8 * SPDX-License-Identifier: GPL-2.0-or-later
9 */
11 #pragma once
13 #include <wireshark.h>
15 #ifdef __cplusplus
16 extern "C" {
17 #endif /* __cplusplus */
20 * Application flavor. Used to construct configuration
21 * paths and environment variables.
23 enum application_flavor_e {
24 APPLICATION_FLAVOR_WIRESHARK,
25 APPLICATION_FLAVOR_STRATOSHARK,
28 /**
29 * Initialize our application flavor.
31 * Set our application flavor, which determines the top-level
32 * configuration directory name and environment variable prefixes.
33 * Default is APPLICATION_FLAVOR_WIRESHARK.
35 * @param flavor Application flavor.
37 WS_DLL_PUBLIC void set_application_flavor(enum application_flavor_e flavor);
39 /**
40 * Get our application flavor.
41 * @return The flavor.
43 WS_DLL_PUBLIC enum application_flavor_e get_application_flavor(void);
45 /**
46 * Get the proper (capitalized) application name, suitable for user
47 * presentation.
49 * @return The application name. Must not be freed.
51 WS_DLL_PUBLIC const char *application_flavor_name_proper(void);
53 /**
54 * Get the lower-case application name.
56 * @return The application name. Must not be freed.
58 WS_DLL_PUBLIC const char *application_flavor_name_lower(void);
60 /**
61 * Get an application flavor from its name.
63 * @param name The application name. Case insensitive.
64 * @return The application flavor, or APPLICATION_FLAVOR_WIRESHARK if there is no match.
66 WS_DLL_PUBLIC enum application_flavor_e application_name_to_flavor(const char * name);
68 /**
69 * Convenience routine for checking the application flavor.
70 * @return true if the application flavor is APPLICATION_FLAVOR_WIRESHARK.
72 WS_DLL_PUBLIC bool application_flavor_is_wireshark(void);
74 /**
75 * Convenience routine for checking the application flavor.
76 * @return true if the application flavor is APPLICATION_FLAVOR_STRATOSHARK.
78 WS_DLL_PUBLIC bool application_flavor_is_stratoshark(void);
80 #ifdef __cplusplus
82 #endif /* __cplusplus */