2 * This file is part of buxton.
4 * Copyright (C) 2013 Intel Corporation
6 * buxton is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU Lesser General Public License as
8 * published by the Free Software Foundation; either version 2.1
9 * of the License, or (at your option) any later version.
13 * \file configurator.h Internal header
14 * This file is used internally by buxton to provide functionality
15 * used to handle the configuration
23 typedef enum ConfigKey {
28 CONFIG_SMACK_LOAD_FILE,
30 CONFIG_SMACK_PERMISSIVE,
35 * Slightly duplicative of BuxtonLayer, but defined here instead of
36 * there. This will probably be deprecated for BuxtonLayer once
37 * things are integrated.
39 typedef struct ConfigLayer {
50 * @brief Add command line data
52 * @note This API is draft
54 void buxton_add_cmd_line(ConfigKey confkey, const char *data);
58 * @brief Get the directory of plugin modules
60 * @return the path to the plugin module. Do not free this pointer.
61 * It belongs to configurator.
63 const char *buxton_module_dir(void)
64 __attribute__((warn_unused_result));
68 * @brief Get the path of the config file
70 * @return the path of the config file. Do not free this pointer.
71 * It belongs to configurator.
73 const char *buxton_conf_file(void)
74 __attribute__((warn_unused_result));
78 * @brief Get the path of the buxton database
81 * @return the path of the database file. Do not free this pointer.
82 * It belongs to configurator.
84 const char *buxton_db_path(void)
85 __attribute__((warn_unused_result));
89 * @brief Get the path of the smack load file.
92 * @return the path of the smack load file. Do not free this pointer.
93 * It belongs to configurator.
95 const char *buxton_smack_load_file(void)
96 __attribute__((warn_unused_result));
100 * @brief Get the path of the smack permissive.
103 * @return the path of the smack permissive file. Do not free this pointer.
104 * It belongs to configurator.
106 const char *buxton_smack_permissive(void)
107 __attribute__((warn_unused_result));
111 * @brief Get the path of the buxton socket.
114 * @return the path of the buxton socket. Do not free this pointer.
115 * It belongs to configurator.
117 const char *buxton_socket(void)
118 __attribute__((warn_unused_result));
122 * @brief Get an array of ConfigLayers from the conf file
124 * @param layers pointer to a pointer where the array of ConfigLayers
125 * will be stored. Callers should free this pointer with free when
126 * they are done with it.
128 * @return an integer that indicates the number of layers.
130 int buxton_key_get_layers(ConfigLayer **layers)
131 __attribute__((warn_unused_result));
133 void include_configurator(void);
136 * Editor modelines - http://www.wireshark.org/tools/modelines.html
141 * indent-tabs-mode: t
144 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
145 * :indentSize=8:tabSize=8:noTabs=false: