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
13 #include <wireshark.h>
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
,
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
);
40 * Get our application flavor.
43 WS_DLL_PUBLIC
enum application_flavor_e
get_application_flavor(void);
46 * Get the proper (capitalized) application name, suitable for user
49 * @return The application name. Must not be freed.
51 WS_DLL_PUBLIC
const char *application_flavor_name_proper(void);
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);
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
);
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);
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);
82 #endif /* __cplusplus */