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 direct.h Internal header
14 * This file is used internally by buxton to provide functionality
15 * used by the daemon and buxtonctl for talking to the backend
28 * Open a direct connection to Buxton
30 * @param control Valid BuxtonControl instance
31 * @return a boolean value, indicating success of the operation
33 bool buxton_direct_open(BuxtonControl *control)
34 __attribute__((warn_unused_result));
37 * Create a DB for a given layer in Buxton
39 * @param control Valid BuxtonControl instance
40 * @param layer_name BuxtonString of the layer name to create
41 * @return a boolean value, indicating success of the operation
43 bool buxton_direct_init_db(BuxtonControl *control, BuxtonString *layer_name)
44 __attribute__((warn_unused_result));
47 * Close direct Buxton management connection
48 * @param control Valid BuxtonControl instance
50 void buxton_direct_close(BuxtonControl *control);
53 * Set a value within Buxton
54 * @param control An initialized control structure
55 * @param key The key struct
56 * @param label A BuxtonString containing the label to set
57 * @return A boolean value, indicating success of the operation
59 bool buxton_direct_set_label(BuxtonControl *control,
62 __attribute__((warn_unused_result));
65 * Create a group within Buxton
66 * @param control An initialized control structure
67 * @param key The key struct with group and layer members initialized
68 * @param label The Smack label of the client
69 * @return A boolean value, indicating success of the operation
71 bool buxton_direct_create_group(BuxtonControl *control,
74 __attribute__((warn_unused_result));
77 * Remove a group within Buxton
78 * @param control An initialized control structure
79 * @param key The key struct with group and layer members initialized
80 * @param client_label The Smack label of the client
81 * @return A boolean value, indicating success of the operation
83 bool buxton_direct_remove_group(BuxtonControl *control,
85 BuxtonString *client_label)
86 __attribute__((warn_unused_result));
89 * Set a value within Buxton
90 * @param control An initialized control structure
91 * @param key The key struct
92 * @param data A struct containing the data to set
93 * @param label The Smack label for the client
94 * @return A boolean value, indicating success of the operation
96 bool buxton_direct_set_value(BuxtonControl *control,
100 __attribute__((warn_unused_result));
103 * Retrieve a value from Buxton
104 * @param control An initialized control structure
105 * @param key The key to retrieve
106 * @param data An empty BuxtonData, where data is stored
107 * @param data_label The Smack label of the data
108 * @param client_label The Smack label of the client
109 * @return A int32_t value, indicating success of the operation
111 int32_t buxton_direct_get_value(BuxtonControl *control,
114 BuxtonString *data_label,
115 BuxtonString *client_label)
116 __attribute__((warn_unused_result));
119 * Retrieve a value from Buxton by layer
120 * @param control An initialized control structure
121 * @param key The key to retrieve
122 * @param data An empty BuxtonData, where data is stored
123 * @param data_label The Smack label of the data
124 * @param client_label The Smack label of the client
125 * @return An int value, indicating success of the operation
127 int buxton_direct_get_value_for_layer(BuxtonControl *control,
130 BuxtonString *data_label,
131 BuxtonString *client_label)
132 __attribute__((warn_unused_result));
135 * Retrieve a list of keys from Buxton
136 * @param control An initialized control structure
137 * @param layer_name The layer to pquery
138 * @param data An empty BuxtonArray, where results are stored
139 * @return A boolean value, indicating success of the operation
141 bool buxton_direct_list_keys(BuxtonControl *control,
144 __attribute__((warn_unused_result));
147 * Unset a value by key in the given BuxtonLayer
148 * @param control An initialized control structure
149 * @param key The key to remove
150 * @param label The Smack label of the client
151 * @return a boolean value, indicating success of the operation
153 bool buxton_direct_unset_value(BuxtonControl *control,
156 __attribute__((warn_unused_result));
159 * Editor modelines - http://www.wireshark.org/tools/modelines.html
164 * indent-tabs-mode: t
167 * vi: set shiftwidth=8 tabstop=8 noexpandtab:
168 * :indentSize=8:tabSize=8:noTabs=false: