le_cfg_interface.h

Go to the documentation of this file.
1 
2 
3 /*
4  * ====================== WARNING ======================
5  *
6  * THE CONTENTS OF THIS FILE HAVE BEEN AUTO-GENERATED.
7  * DO NOT MODIFY IN ANY WAY.
8  *
9  * ====================== WARNING ======================
10  */
11 
12 /**
13  * @page c_config Config Tree API
14  *
15  * @ref le_cfg_interface.h "API Reference" <br>
16  *
17  * The Config Tree is a non-volatile noSQL database that stores configuration values for apps.
18  * By default each app is given read access to a single tree that has the same name as the app.
19  * Any other access permissions (read access for any other tree, or write access to any tree at all)
20  * must be explicitly granted in the app's @ref defFilesAdef_requiresConfigTree ".adef file".
21  *
22  * Trees are created automatically the first time that they are accessed by an app or a component.
23  * The apps tree will be named the same as the name of the app. It is possible for apps to be given
24  * access to other apps tree's or for multiple apps to share one tree.
25  *
26  * @note If your app is running as root then the configuration will get added to the
27  * System Tree by default. System utilities also use the Config Tree and store their
28  * configurations in the @c system tree.
29  *
30  * Apps are able to search over the tree for data, although it's generally expected that the location
31  * will be known to the app and that the app will point to the right node to retrieve the value.
32  *
33  * More on the @ref conceptsConfig "Config Strategy" for the Legato AF.
34  *
35  * @section cfg_Overview Overview
36  *
37  * The tree is broken down into stems and leaves.
38  *
39  * A stem is a node that has at least one child node. A leaf has no children and holds a value.
40  *
41  * @code
42  * +tree
43  * |
44  * +--stem
45  * | |
46  * | +--leaf (value)
47  * |
48  * +-stem
49  * |
50  * +--leaf (value)
51  * |
52  * +--leaf (value)
53  * @endcode
54  *
55  * Paths in the tree are traditional Unix style paths and each node is separated by a /:
56  *
57  * @code /stem/stem/leaf @endcode
58  *
59  * If no app is specified as the root of the tree, then the app will search in it's own tree.
60  * To get to another tree reference that tree followed by a colon.
61  *
62  * @verbatim
63  /path/to/my/tree/value # references the default apps tree
64  secondTree:/path/to/secondTree/value # references the second tree
65  @endverbatim
66  *
67  * @note It's recommended to store anything complex using stems and leaves, this enhances
68  * readability and debugging. It also helps to sidestep nasty cross platform alignment issues.
69  *
70  * Apps must explicitly give permissions to other apps before they can access their Config Tree data.
71  * This is done in the @ref defFilesAdef_requiresConfigTree ".adef file".
72  * Each transaction is only able to iterate over one tree at a time, each tree that you want to read
73  * or write to must be created as a separate transaction.
74  *
75  * The Config Tree supports storing the following types of data and each has their own get/set
76  * function as well as a quick set/get function (see @ref cfg_quick):
77  * - string
78  * - binary (array of bytes)
79  * - signed integer
80  * - boolean
81  * - 64bit floating point
82  * - empty values.
83  *
84  * Each transaction has a global timeout setting (default is 30s). The configuration is
85  * located in the System Tree and may be configured with the @ref toolsTarget_config "config"
86  * target tool.
87  *
88  * @verbatim
89  config /configTree/transactionTimeout 10 int #changes the timeout to 10s
90  @endverbatim
91  *
92  * @section cfg_trans Transactions
93  *
94  * @subsection cfg_transConcepts Key Transaction Concepts
95  *
96  * - All transactions are sent to a queue and processed in a sequence.
97  * - Only one write transaction may be active at a time and subsequent writes are queued
98  * until the first is finished processing.
99  * - Transactions may contain multiple read or write requests within a single transaction.
100  * - Multiple read transactions may be processed while a write transaction is active.
101  * - Quick(implicit) read/writes can be created and are also sequentially queued.
102  *
103  * @subsection cfg_createTrans Create Transactions
104  *
105  * To make a change to the tree, you must Create a write transaction, call one or more Set
106  * functions, and Commit the transaction. If a write transaction is canceled instead of committed,
107  * then the changes will be discarded and the tree will remain unchanged.
108  *
109  * To read from a tree without making any changes, you should:
110  * - create a read transaction,
111  * - call the Get functions,
112  * - cancel the transaction when finished.
113  *
114  * You could also:
115  * - create a write transaction,
116  * - perform only Get operations,
117  * - cancel the transaction
118  *
119  * @note It's safer to use a read transaction when there is no intention to change the tree.
120  *
121  * Transactions must not be kept open for extended periods of time. If a transaction is kept open
122  * for longer than the transaction time limit (default is 30 seconds), then the Config Tree will
123  * cancel the transaction and drop the connection to the offending client (most likely causing the
124  * client process to terminate).
125  *
126  * | Function | Action |
127  * | --------------------------| ------------------------------------------------------------------|
128  * | @c le_cfg_CreateReadTxn() | Opens the transaction |
129  * | @c le_cfg_CancelTxn() | Closes a read/write transaction and does not write it to the tree |
130  * | @c le_cfg_CommitTxn() | Closes a write transaction and queues it for commit |
131  *
132  * @subsection cfg_transNavigate Navigating the Tree
133  *
134  * To move around within the Tree you can move directly to a specific node(leaf or stem) and then
135  * do your read or write from that point. Functions have been added to easily navigate through
136  * Tree. All nodes can be referenced either by their absolute or relative paths.
137  *
138  * | Function | Action |
139  * | ----------------------------| -------------------------------------------------------------------------------|
140  * | @c le_cfg_GoToNode() | Moves to the location specified |
141  * | @c le_cfg_GoToParent() | Moves to the parent of the current node (moves up the Tree) |
142  * | @c le_cfg_GoToFirstChild() | Moves to the first node from the current location (moves down the Tree) |
143  * | @c le_cfg_GoToNextSibling() | Moves to the next node on the same level as the current node (moves laterally) |
144  *
145  * @subsection cfg_transGetInfo Retrieving Node Information
146  *
147  * The Config tree also contains functions to help you identify your current location in the tree,
148  * what node you are currently pointing at, and what type of data is contained in the current node.
149  *
150  * | Function | Action |
151  * | ------------------------| ------------------------------------------------------------------------------- |
152  * | @c le_cfg_GetPath() | Gets the location of where you are in the Tree |
153  * | @c le_cfg_GetNodeType() | Gets the data type of the node where you are currently located |
154  * | @c le_cfg_GetNodeName() | Gets the name of the node where you are in the Tree (does not include the path) |
155  *
156  * @subsection cfg_read Read Transactions
157  *
158  * Each data type has it's own get function to read a value from a node within the Tree.
159  *
160  * | Function | Action |
161  * | ------------------------| -----------------------------------------|
162  * | @c le_cfg_GetString() | Reads the string's value |
163  * | @c le_cfg_GetBinary() | Reads the array of bytes |
164  * | @c le_cfg_GetInt() | Reads the integer's value |
165  * | @c le_cfg_GetFloat() | Reads the floating point value |
166  * | @c le_cfg_GetBool() | Reads the boolean value |
167  *
168  * To perform a read from a Tree, we need to open a transaction, move to the node that you want to
169  * read from, read the node and then cancel the transaction.
170  *
171  * Sample read transaction (with error checking):
172  *
173  * @code
174  * le_result_t GetIp4Static //reads the IP address values from the Config Tree
175  * (
176  * const char* interfaceNamePtr,
177  * char* ipAddrPtr,
178  * size_t ipAddrSize,
179  * char* netMaskPtr,
180  * size_t netMaskSize
181  * )
182  * {
183  * // Change current tree position to the base ip4 node.
184  * char nameBuffer[LE_CFG_STR_LEN_BYTES] = { 0 };
185  *
186  * // Returns errors for out of bounds exceptions
187  * int r = snprintf(nameBuffer, sizeof(nameBuffer), "/system/%s/ip4", interfaceNamePtr);
188  * if (r < 0)
189  * {
190  * return LE_FAULT;
191  * }
192  * else if (r >= sizeof(nameBuffer))
193  * {
194  * return LE_OVERFLOW;
195  * }
196  *
197  * // Open up a read transaction on the Config Tree.
198  * le_cfg_IteratorRef_t iteratorRef = le_cfg_CreateReadTxn(nameBuffer);
199  *
200  * if (le_cfg_NodeExists(iteratorRef, "") == false)
201  * {
202  * LE_WARN("Configuration not found.");
203  * le_cfg_CancelTxn(iteratorRef);
204  * return LE_NOT_FOUND;
205  * }
206  *
207  * // Returns the IP Address value stored in the Config Tree.
208  * le_result_t result = le_cfg_GetString(iteratorRef, "addr", ipAddrPtr, ipAddrSize, "");
209  * if (result != LE_OK)
210  * {
211  * le_cfg_CancelTxn(iteratorRef);
212  * return result;
213  * }
214  *
215  * // Returns the NetMask value stored in the Config Tree.
216  * result = le_cfg_GetString(iteratorRef, "mask", netMaskPtr, netMaskSize, "");
217  * if (result != LE_OK)
218  * {
219  * le_cfg_CancelTxn(iteratorRef);
220  * return result;
221  * }
222  *
223  * // Close the transaction and return success.
224  * le_cfg_CancelTxn(iteratorRef);
225  *
226  * return LE_OK;
227  * }
228  * @endcode
229  *
230  * @note Any writes done will be discarded at the end of the read transaction.
231  *
232  * @subsection cfg_write Write Transactions
233  *
234  * Each data type has it's own set function, to write a value to a node within the Tree. Before you
235  * are able to write to a tree, permissions must be set in the apps
236  * @ref defFilesAdef_requiresConfigTree ".adef's requires section" or with the
237  * @ref toolsTarget_config tool.
238  *
239  * | Function | Action |
240  * | ------------------------| -----------------------------------------|
241  * | @c le_cfg_SetString() | Writes the string's value |
242  * | @c le_cfg_SetBinary() | Writes the array of bytes |
243  * | @c le_cfg_SetInt() | Writes the integer's value |
244  * | @c le_cfg_SetFloat() | Writes the floating point value |
245  * | @c le_cfg_SetBool() | Writes the boolean value |
246  *
247  * To perform a write to a Tree, we need to open a transaction, move to the node that you want to
248  * write to, write to the node and then commit the transaction.
249  *
250  * Sample write transaction (with error checking):
251  *
252  * @code
253  * // Store IPv4 address/mask in a string representation
254  * void SetIp4Static
255  * (
256  * const char* interfaceNamePtr,
257  * const char* ipAddrPtr,
258  * const char* netMaskPtr
259  * )
260  * {
261  * // Change current tree position to the base ip4 node.
262  * char nameBuffer[LE_CFG_STR_LEN_BYTES] = { 0 };
263  *
264  * int r = snprintf(nameBuffer, sizeof(nameBuffer), "/system/%s/ip4", interfaceNamePtr);
265  * LE_ASSERT((r >= 0) && (r < sizeof(nameBuffer));
266  *
267  * // Create a write transaction so that we can update the tree.
268  * le_cfg_IteratorRef_t iteratorRef = le_cfg_CreateWriteTxn(nameBuffer);
269  *
270  * le_cfg_SetString(iteratorRef, "addr", ipAddrPtr);
271  * le_cfg_SetString(iteratorRef, "mask", netMaskPtr);
272  *
273  * // Commit the transaction to make sure these new settings get written to the tree.
274  * le_cfg_CommitTxn(iteratorRef);
275  * }
276  *
277  * // Store IPv4 address/mask in a binary representation (array of 4 bytes)
278  * void SetIp4StaticAsBinary
279  * (
280  * const char* interfaceNamePtr,
281  * const uint8_t* ipAddrPtr,
282  * const uint8_t* netMaskPtr
283  * )
284  * {
285  * // Change current tree position to the base ip4 node.
286  * char nameBuffer[LE_CFG_STR_LEN_BYTES] = { 0 };
287  *
288  * int r = snprintf(nameBuffer, sizeof(nameBuffer), "/system/%s/ip4", interfaceNamePtr);
289  * LE_ASSERT((r >= 0) && (r < sizeof(nameBuffer));
290  *
291  * // Create a write transaction so that we can update the tree.
292  * le_cfg_IteratorRef_t iteratorRef = le_cfg_CreateWriteTxn(nameBuffer);
293  *
294  * le_cfg_SetBinary(iteratorRef, "addr", ipAddrPtr, 4);
295  * le_cfg_SetBinary(iteratorRef, "mask", netMaskPtr, 4);
296  *
297  * // Commit the transaction to make sure these new settings get written to the tree.
298  * le_cfg_CommitTxn(iteratorRef);
299  * }
300  * @endcode
301  *
302  * @note Creating write transactions creates a temporary working copy of the tree for use within the
303  * transaction. All read transactions running in the meantime see the committed state, without any
304  * of the changes that have been made within the write transaction.
305  *
306  * @subsection cfg_transDelete Deleting a Node
307  *
308  * You can also delete a node from the tree. A word of caution as deleting a node will
309  * automatically delete all children nodes as well.
310  *
311  * | Function | Action |
312  * | -------------------------| -----------------------------------------|
313  * | @c le_cfg_DeleteNode() | Deletes the node and all children |
314  *
315  * @section cfg_quick Quick Read/Writes
316  *
317  * Another option is to perform quick read/write which implicitly wraps functions with in an
318  * internal transaction. This is ideal if all you need to do is read or write some simple values
319  * to the default app tree.
320  *
321  * The quick reads and writes work almost identically to the transactional version except quick
322  * reads don't explicitly take an iterator object. The quick functions internally use an
323  * implicit transaction. This implicit transaction wraps one get or set, and does not protect
324  * your code from other activity in the system.
325  *
326  * Because quick read/write functions don't get created within a transaction, there is no option to
327  * traverse to a specific node.
328  * All values that are read or written must be referenced from the root of the tree.
329  *
330  * Example of a quick read of the binary data:
331  *
332  * @code
333  * #define IPV4_ADDR_LEN 4
334  * le_result_t QuickReadIpAddressAsBinary
335  * (
336  * const char* interfaceNamePtr,
337  * const uint8_t* ipAddrPtr,
338  * const uint8_t* netMaskPtr
339  * )
340  * {
341  * char pathBuffer[MAX_CFG_STRING] = { 0 };
342  * uint8_t defaultAddr[IPV4_ADDR_LEN] = { 0 };
343  * le_result_t result = LE_OK;
344  * size_t len = IPV4_ADDR_LEN;
345  *
346  * // read the address
347  * snprintf(pathBuffer, sizeof(pathBuffer), "/system/%s/ip4/addr", interfaceNamePtr);
348  * result = le_cfg_QuickGetBinary(pathBuffer, ipAddrPtr, &len, defaultAddr, IPV4_ADDR_LEN);
349  * if (LE_OK != result)
350  * {
351  * return result;
352  * }
353  *
354  * // read the mask
355  * snprintf(pathBuffer, sizeof(pathBuffer), "/system/%s/ip4/mask", interfaceNamePtr);
356  * len = IPV4_ADDR_LEN;
357  * result = le_cfg_QuickGetBinary(pathBuffer, netMaskPtr, &len, defaultAddr, IPV4_ADDR_LEN);
358  * if (LE_OK != result)
359  * {
360  * return result;
361  * }
362  * }
363  * @endcode
364  *
365  *
366  * A quick delete example:
367  *
368  * @code
369  * void ClearIpInfo
370  * (
371  * const char* interfaceNamePtr
372  * )
373  * {
374  * char pathBuffer[MAX_CFG_STRING] = { 0 };
375  *
376  * // Removes the node from the tree.
377  * snprintf(pathBuffer, sizeof(pathBuffer), "/system/%s/ip4/", interfaceNamePtr);
378  * le_cfg_QuickDeleteNode(pathBuffer);
379  * }
380  * @endcode
381  *
382  * @warning Because each quick function is independent, there's no guarantee of consistency between
383  * them. If another process changes one of the values while you read/write the other,
384  * the two values could be read out of sync.
385  *
386  * Copyright (C) Sierra Wireless Inc.
387  */
388 /**
389  * @file le_cfg_interface.h
390  *
391  * Legato @ref c_config include file.
392  *
393  * Copyright (C) Sierra Wireless Inc.
394  */
395 
396 #ifndef LE_CFG_INTERFACE_H_INCLUDE_GUARD
397 #define LE_CFG_INTERFACE_H_INCLUDE_GUARD
398 
399 
400 #include "legato.h"
401 
402 // Internal includes for this interface
403 #include "le_cfg_common.h"
404 /** @addtogroup le_cfg le_cfg API Reference
405  * @{
406  * @file le_cfg_common.h
407  * @file le_cfg_interface.h **/
408 //--------------------------------------------------------------------------------------------------
409 /**
410  * Type for handler called when a server disconnects.
411  */
412 //--------------------------------------------------------------------------------------------------
413 typedef void (*le_cfg_DisconnectHandler_t)(void *);
414 
415 //--------------------------------------------------------------------------------------------------
416 /**
417  *
418  * Connect the current client thread to the service providing this API. Block until the service is
419  * available.
420  *
421  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
422  * called before any other functions in this API. Normally, ConnectService is automatically called
423  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
424  *
425  * This function is created automatically.
426  */
427 //--------------------------------------------------------------------------------------------------
429 (
430  void
431 );
432 
433 //--------------------------------------------------------------------------------------------------
434 /**
435  *
436  * Try to connect the current client thread to the service providing this API. Return with an error
437  * if the service is not available.
438  *
439  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
440  * called before any other functions in this API. Normally, ConnectService is automatically called
441  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
442  *
443  * This function is created automatically.
444  *
445  * @return
446  * - LE_OK if the client connected successfully to the service.
447  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
448  * bound.
449  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
450  * - LE_COMM_ERROR if the Service Directory cannot be reached.
451  */
452 //--------------------------------------------------------------------------------------------------
454 (
455  void
456 );
457 
458 //--------------------------------------------------------------------------------------------------
459 /**
460  * Set handler called when server disconnection is detected.
461  *
462  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
463  * to continue without exiting, it should call longjmp() from inside the handler.
464  */
465 //--------------------------------------------------------------------------------------------------
467 (
468  le_cfg_DisconnectHandler_t disconnectHandler,
469  void *contextPtr
470 );
471 
472 //--------------------------------------------------------------------------------------------------
473 /**
474  *
475  * Disconnect the current client thread from the service providing this API.
476  *
477  * Normally, this function doesn't need to be called. After this function is called, there's no
478  * longer a connection to the service, and the functions in this API can't be used. For details, see
479  * @ref apiFilesC_client.
480  *
481  * This function is created automatically.
482  */
483 //--------------------------------------------------------------------------------------------------
485 (
486  void
487 );
488 
489 
490 //--------------------------------------------------------------------------------------------------
491 /**
492  * Reference to a tree iterator object.
493  */
494 //--------------------------------------------------------------------------------------------------
495 
496 
497 //--------------------------------------------------------------------------------------------------
498 /**
499  * Identifies the data type of node.
500  */
501 //--------------------------------------------------------------------------------------------------
502 
503 
504 //--------------------------------------------------------------------------------------------------
505 /**
506  * Handler for node change notifications.
507  */
508 //--------------------------------------------------------------------------------------------------
509 
510 
511 //--------------------------------------------------------------------------------------------------
512 /**
513  * Reference type used by Add/Remove functions for EVENT 'le_cfg_Change'
514  */
515 //--------------------------------------------------------------------------------------------------
516 
517 
518 //--------------------------------------------------------------------------------------------------
519 /**
520  * Create a read transaction and open a new iterator for traversing the config tree.
521  *
522  * This action creates a read lock on the given tree, which will start a read-timeout.
523  * Once the read timeout expires, all active read iterators on that tree will be
524  * expired and their clients will be killed.
525  *
526  * @note A tree transaction is global to that tree; a long-held read transaction will block other
527  * user's write transactions from being committed.
528  *
529  * @return This will return the newly created iterator reference.
530  */
531 //--------------------------------------------------------------------------------------------------
533 (
534  const char* LE_NONNULL basePath
535  ///< [IN] Path to the location to create the new iterator.
536 );
537 
538 //--------------------------------------------------------------------------------------------------
539 /**
540  * Create a write transaction and open a new iterator for both reading and writing.
541  *
542  * This action creates a write transaction. If the app holds the iterator for
543  * longer than the configured write transaction timeout, the iterator will cancel the
544  * transaction. Other reads will fail to return data, and all writes will be thrown away.
545  *
546  * @note A tree transaction is global to that tree; a long-held write transaction will block
547  * other user's write transactions from being started. Other trees in the system
548  * won't be affected.
549  *
550  * @return This will return a newly created iterator reference.
551  */
552 //--------------------------------------------------------------------------------------------------
554 (
555  const char* LE_NONNULL basePath
556  ///< [IN] Path to the location to create the new iterator.
557 );
558 
559 //--------------------------------------------------------------------------------------------------
560 /**
561  * Closes the write iterator and commits the write transaction. This updates the config tree
562  * with all of the writes that occurred within the iterator.
563  *
564  * @note This operation will also delete the iterator object.
565  */
566 //--------------------------------------------------------------------------------------------------
567 void le_cfg_CommitTxn
568 (
569  le_cfg_IteratorRef_t iteratorRef
570  ///< [IN] Iterator object to commit.
571 );
572 
573 //--------------------------------------------------------------------------------------------------
574 /**
575  * Closes and frees the given iterator object. If the iterator is a write iterator, the transaction
576  * will be canceled. If the iterator is a read iterator, the transaction will be closed. No data is
577  * written to the tree
578  *
579  * @note This operation will also delete the iterator object.
580  */
581 //--------------------------------------------------------------------------------------------------
582 void le_cfg_CancelTxn
583 (
584  le_cfg_IteratorRef_t iteratorRef
585  ///< [IN] Iterator object to close.
586 );
587 
588 //--------------------------------------------------------------------------------------------------
589 /**
590  * Changes the location of iterator. The path passed can be an absolute or a
591  * relative path from the iterators current location.
592  *
593  * The target node does not need to exist. Writing a value to a non-existent node will
594  * automatically create that node and any ancestor nodes (parent, parent's parent, etc.) that
595  * also don't exist.
596  */
597 //--------------------------------------------------------------------------------------------------
598 void le_cfg_GoToNode
599 (
600  le_cfg_IteratorRef_t iteratorRef,
601  ///< [IN] Iterator to move.
602  const char* LE_NONNULL newPath
603  ///< [IN] Absolute or relative path from the current location.
604 );
605 
606 //--------------------------------------------------------------------------------------------------
607 /**
608  * Move the iterator to the parent of the current node (moves up the tree).
609  *
610  * @return Return code will be one of the following values:
611  *
612  * - LE_OK - Commit was completed successfully.
613  * - LE_NOT_FOUND - Current node is the root node: has no parent.
614  */
615 //--------------------------------------------------------------------------------------------------
617 (
618  le_cfg_IteratorRef_t iteratorRef
619  ///< [IN] Iterator to move.
620 );
621 
622 //--------------------------------------------------------------------------------------------------
623 /**
624  * Moves the iterator to the the first child of the node from the current location.
625  *
626  * For read iterators without children, this function will fail. If the iterator is a write
627  * iterator, then a new node is automatically created. If this node or newly created
628  * children of this node are not written to, then this node will not persist even if the iterator is
629  * committed.
630  *
631  * @return Return code will be one of the following values:
632  *
633  * - LE_OK - Move was completed successfully.
634  * - LE_NOT_FOUND - The given node has no children.
635  */
636 //--------------------------------------------------------------------------------------------------
638 (
639  le_cfg_IteratorRef_t iteratorRef
640  ///< [IN] Iterator object to move.
641 );
642 
643 //--------------------------------------------------------------------------------------------------
644 /**
645  * Jumps the iterator to the next child node of the current node. Assuming the following tree:
646  *
647  * @code
648  * baseNode
649  * |
650  * +childA
651  * |
652  * +valueA
653  * |
654  * +valueB
655  * @endcode
656  *
657  * If the iterator is moved to the path, "/baseNode/childA/valueA". After the first
658  * GoToNextSibling the iterator will be pointing at valueB. A second call to GoToNextSibling
659  * will cause the function to return LE_NOT_FOUND.
660  *
661  * @return Returns one of the following values:
662  *
663  * - LE_OK - Commit was completed successfully.
664  * - LE_NOT_FOUND - Iterator has reached the end of the current list of siblings.
665  * Also returned if the the current node has no siblings.
666  */
667 //--------------------------------------------------------------------------------------------------
669 (
670  le_cfg_IteratorRef_t iteratorRef
671  ///< [IN] Iterator to iterate.
672 );
673 
674 //--------------------------------------------------------------------------------------------------
675 /**
676  * Get path to the node where the iterator is currently pointed.
677  *
678  * Assuming the following tree:
679  *
680  * @code
681  * baseNode
682  * |
683  * +childA
684  * |
685  * +valueA
686  * |
687  * +valueB
688  * @endcode
689  *
690  * If the iterator was currently pointing at valueA, GetPath would return the following path:
691  *
692  * @code
693  * /baseNode/childA/valueA
694  * @endcode
695  *
696  * Optionally, a path to another node can be supplied to this function. So, if the iterator is
697  * again on valueA and the relative path ".." is supplied then this function will return the
698  * the path relative to the node given:
699  *
700  * @code
701  * /baseNode/childA/
702  * @endcode
703  *
704  * @return - LE_OK - The write was completed successfully.
705  * - LE_OVERFLOW - The supplied string buffer was not large enough to hold the value.
706  */
707 //--------------------------------------------------------------------------------------------------
709 (
710  le_cfg_IteratorRef_t iteratorRef,
711  ///< [IN] Iterator to move.
712  const char* LE_NONNULL path,
713  ///< [IN] Path to the target node. Can be an absolute path, or
714  ///< a path relative from the iterator's current position.
715  char* pathBuffer,
716  ///< [OUT] Absolute path to the iterator's current node.
717  size_t pathBufferSize
718  ///< [IN]
719 );
720 
721 //--------------------------------------------------------------------------------------------------
722 /**
723  * Get the data type of node where the iterator is currently pointing.
724  *
725  * @return le_cfg_nodeType_t value indicating the stored value.
726  */
727 //--------------------------------------------------------------------------------------------------
729 (
730  le_cfg_IteratorRef_t iteratorRef,
731  ///< [IN] Iterator object to use to read from the tree.
732  const char* LE_NONNULL path
733  ///< [IN] Path to the target node. Can be an absolute path, or
734  ///< a path relative from the iterator's current position.
735 );
736 
737 //--------------------------------------------------------------------------------------------------
738 /**
739  * Get the name of the node where the iterator is currently pointing.
740  *
741  * @return - LE_OK Read was completed successfully.
742  * - LE_OVERFLOW Supplied string buffer was not large enough to hold the value.
743  */
744 //--------------------------------------------------------------------------------------------------
746 (
747  le_cfg_IteratorRef_t iteratorRef,
748  ///< [IN] Iterator object to use to read from the tree.
749  const char* LE_NONNULL path,
750  ///< [IN] Path to the target node. Can be an absolute path, or
751  ///< a path relative from the iterator's current position.
752  char* name,
753  ///< [OUT] Read the name of the node object.
754  size_t nameSize
755  ///< [IN]
756 );
757 
758 //--------------------------------------------------------------------------------------------------
759 /**
760  * Add handler function for EVENT 'le_cfg_Change'
761  *
762  * This event provides information on changes to the given node object, or any of it's children,
763  * where a change could be either a read, write, create or delete operation.
764  */
765 //--------------------------------------------------------------------------------------------------
767 (
768  const char* LE_NONNULL newPath,
769  ///< [IN] Path to the object to watch.
770  le_cfg_ChangeHandlerFunc_t handlerPtr,
771  ///< [IN] Handler to receive change notification
772  void* contextPtr
773  ///< [IN]
774 );
775 
776 //--------------------------------------------------------------------------------------------------
777 /**
778  * Remove handler function for EVENT 'le_cfg_Change'
779  */
780 //--------------------------------------------------------------------------------------------------
782 (
783  le_cfg_ChangeHandlerRef_t handlerRef
784  ///< [IN]
785 );
786 
787 //--------------------------------------------------------------------------------------------------
788 /**
789  * Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child
790  * nodes are also deleted.
791  *
792  * If the path is empty, the iterator's current node is deleted.
793  *
794  * This function is only valid during a write transaction.
795  */
796 //--------------------------------------------------------------------------------------------------
798 (
799  le_cfg_IteratorRef_t iteratorRef,
800  ///< [IN] Iterator to use as a basis for the transaction.
801  const char* LE_NONNULL path
802  ///< [IN] Path to the target node. Can be an absolute path, or
803  ///< a path relative from the iterator's current position.
804 );
805 
806 //--------------------------------------------------------------------------------------------------
807 /**
808  * Check if the given node is empty. A node is also considered empty if it doesn't yet exist. A
809  * node is also considered empty if it has no value or is a stem with no children.
810  *
811  * If the path is empty, the iterator's current node is queried for emptiness.
812  *
813  * Valid for both read and write transactions.
814  *
815  * @return A true if the node is considered empty, false if not.
816  */
817 //--------------------------------------------------------------------------------------------------
818 bool le_cfg_IsEmpty
819 (
820  le_cfg_IteratorRef_t iteratorRef,
821  ///< [IN] Iterator to use as a basis for the transaction.
822  const char* LE_NONNULL path
823  ///< [IN] Path to the target node. Can be an absolute path, or
824  ///< a path relative from the iterator's current position.
825 );
826 
827 //--------------------------------------------------------------------------------------------------
828 /**
829  * Clears out the node's value. If the node doesn't exist it will be created, and have no value.
830  *
831  * If the path is empty, the iterator's current node will be cleared. If the node is a stem
832  * then all children will be removed from the tree.
833  *
834  * Only valid during a write transaction.
835  */
836 //--------------------------------------------------------------------------------------------------
837 void le_cfg_SetEmpty
838 (
839  le_cfg_IteratorRef_t iteratorRef,
840  ///< [IN] Iterator to use as a basis for the transaction.
841  const char* LE_NONNULL path
842  ///< [IN] Path to the target node. Can be an absolute path, or
843  ///< a path relative from the iterator's current position.
844 );
845 
846 //--------------------------------------------------------------------------------------------------
847 /**
848  * Checks to see if a given node in the config tree exists.
849  *
850  * @return True if the specified node exists in the tree. False if not.
851  */
852 //--------------------------------------------------------------------------------------------------
854 (
855  le_cfg_IteratorRef_t iteratorRef,
856  ///< [IN] Iterator to use as a basis for the transaction.
857  const char* LE_NONNULL path
858  ///< [IN] Path to the target node. Can be an absolute path, or
859  ///< a path relative from the iterator's current position.
860 );
861 
862 //--------------------------------------------------------------------------------------------------
863 /**
864  * Reads a string value from the config tree. If the value isn't a string, or if the node is
865  * empty or doesn't exist, the default value will be returned.
866  *
867  * Valid for both read and write transactions.
868  *
869  * If the path is empty, the iterator's current node will be read.
870  *
871  * @return - LE_OK - Read was completed successfully.
872  * - LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
873  */
874 //--------------------------------------------------------------------------------------------------
876 (
877  le_cfg_IteratorRef_t iteratorRef,
878  ///< [IN] Iterator to use as a basis for the transaction.
879  const char* LE_NONNULL path,
880  ///< [IN] Path to the target node. Can be an absolute path,
881  ///< or a path relative from the iterator's current
882  ///< position.
883  char* value,
884  ///< [OUT] Buffer to write the value into.
885  size_t valueSize,
886  ///< [IN]
887  const char* LE_NONNULL defaultValue
888  ///< [IN] Default value to use if the original can't be
889  ///< read.
890 );
891 
892 //--------------------------------------------------------------------------------------------------
893 /**
894  * Writes a string value to the config tree. Only valid during a write
895  * transaction.
896  *
897  * If the path is empty, the iterator's current node will be set.
898  */
899 //--------------------------------------------------------------------------------------------------
900 void le_cfg_SetString
901 (
902  le_cfg_IteratorRef_t iteratorRef,
903  ///< [IN] Iterator to use as a basis for the transaction.
904  const char* LE_NONNULL path,
905  ///< [IN] Path to the target node. Can be an absolute path, or
906  ///< a path relative from the iterator's current position.
907  const char* LE_NONNULL value
908  ///< [IN] Value to write.
909 );
910 
911 //--------------------------------------------------------------------------------------------------
912 /**
913  * Read a binary data from the config tree. If the the node has a wrong type, is
914  * empty or doesn't exist, the default value will be returned.
915  *
916  * Valid for both read and write transactions.
917  *
918  * If the path is empty, the iterator's current node will be read.
919  *
920  * \b Responds \b With:
921  *
922  * This function will respond with one of the following values:
923  *
924  * - LE_OK - Read was completed successfully.
925  * - LE_FORMAT_ERROR - if data can't be decoded.
926  * - LE_OVERFLOW - Supplied buffer was not large enough to hold the value.
927  */
928 //--------------------------------------------------------------------------------------------------
930 (
931  le_cfg_IteratorRef_t iteratorRef,
932  ///< [IN] Iterator to use as a basis for the transaction.
933  const char* LE_NONNULL path,
934  ///< [IN] Path to the target node. Can be an absolute path,
935  ///< or a path relative from the iterator's current
936  ///< position.
937  uint8_t* valuePtr,
938  ///< [OUT] Buffer to write the value into.
939  size_t* valueSizePtr,
940  ///< [INOUT]
941  const uint8_t* defaultValuePtr,
942  ///< [IN] Default value to use if the original can't be
943  ///< read.
944  size_t defaultValueSize
945  ///< [IN]
946 );
947 
948 //--------------------------------------------------------------------------------------------------
949 /**
950  * Write a binary data to the config tree. Only valid during a write
951  * transaction.
952  *
953  * If the path is empty, the iterator's current node will be set.
954  *
955  * @note Binary data cannot be written to the 'system' tree.
956  */
957 //--------------------------------------------------------------------------------------------------
958 void le_cfg_SetBinary
959 (
960  le_cfg_IteratorRef_t iteratorRef,
961  ///< [IN] Iterator to use as a basis for the transaction.
962  const char* LE_NONNULL path,
963  ///< [IN] Path to the target node. Can be an absolute path, or
964  ///< a path relative from the iterator's current position.
965  const uint8_t* valuePtr,
966  ///< [IN] Value to write.
967  size_t valueSize
968  ///< [IN]
969 );
970 
971 //--------------------------------------------------------------------------------------------------
972 /**
973  * Reads a signed integer value from the config tree.
974  *
975  * If the underlying value is not an integer, the default value will be returned instead. The
976  * default value is also returned if the node does not exist or if it's empty.
977  *
978  * If the value is a floating point value, then it will be rounded and returned as an integer.
979  *
980  * Valid for both read and write transactions.
981  *
982  * If the path is empty, the iterator's current node will be read.
983  */
984 //--------------------------------------------------------------------------------------------------
985 int32_t le_cfg_GetInt
986 (
987  le_cfg_IteratorRef_t iteratorRef,
988  ///< [IN] Iterator to use as a basis for the transaction.
989  const char* LE_NONNULL path,
990  ///< [IN] Path to the target node. Can be an absolute path, or
991  ///< a path relative from the iterator's current position.
992  int32_t defaultValue
993  ///< [IN] Default value to use if the original can't be
994  ///< read.
995 );
996 
997 //--------------------------------------------------------------------------------------------------
998 /**
999  * Writes a signed integer value to the config tree. Only valid during a
1000  * write transaction.
1001  *
1002  * If the path is empty, the iterator's current node will be set.
1003  */
1004 //--------------------------------------------------------------------------------------------------
1005 void le_cfg_SetInt
1006 (
1007  le_cfg_IteratorRef_t iteratorRef,
1008  ///< [IN] Iterator to use as a basis for the transaction.
1009  const char* LE_NONNULL path,
1010  ///< [IN] Path to the target node. Can be an absolute path, or
1011  ///< a path relative from the iterator's current position.
1012  int32_t value
1013  ///< [IN] Value to write.
1014 );
1015 
1016 //--------------------------------------------------------------------------------------------------
1017 /**
1018  * Reads a 64-bit floating point value from the config tree.
1019  *
1020  * If the value is an integer then the value will be promoted to a float. Otherwise, if the
1021  * underlying value is not a float or integer, the default value will be returned.
1022  *
1023  * If the path is empty, the iterator's current node will be read.
1024  *
1025  * @note Floating point values will only be stored up to 6 digits of precision.
1026  */
1027 //--------------------------------------------------------------------------------------------------
1028 double le_cfg_GetFloat
1029 (
1030  le_cfg_IteratorRef_t iteratorRef,
1031  ///< [IN] Iterator to use as a basis for the transaction.
1032  const char* LE_NONNULL path,
1033  ///< [IN] Path to the target node. Can be an absolute path, or
1034  ///< a path relative from the iterator's current position.
1035  double defaultValue
1036  ///< [IN] Default value to use if the original can't be
1037  ///< read.
1038 );
1039 
1040 //--------------------------------------------------------------------------------------------------
1041 /**
1042  * Writes a 64-bit floating point value to the config tree. Only valid
1043  * during a write transaction.
1044  *
1045  * If the path is empty, the iterator's current node will be set.
1046  *
1047  * @note Floating point values will only be stored up to 6 digits of precision.
1048  */
1049 //--------------------------------------------------------------------------------------------------
1050 void le_cfg_SetFloat
1051 (
1052  le_cfg_IteratorRef_t iteratorRef,
1053  ///< [IN] Iterator to use as a basis for the transaction.
1054  const char* LE_NONNULL path,
1055  ///< [IN] Path to the target node. Can be an absolute path, or
1056  ///< a path relative from the iterator's current position.
1057  double value
1058  ///< [IN] Value to write.
1059 );
1060 
1061 //--------------------------------------------------------------------------------------------------
1062 /**
1063  * Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default
1064  * value is returned. Default value is also returned if the node is a different type than
1065  * expected.
1066  *
1067  * Valid for both read and write transactions.
1068  *
1069  * If the path is empty, the iterator's current node will be read.
1070  */
1071 //--------------------------------------------------------------------------------------------------
1072 bool le_cfg_GetBool
1073 (
1074  le_cfg_IteratorRef_t iteratorRef,
1075  ///< [IN] Iterator to use as a basis for the transaction.
1076  const char* LE_NONNULL path,
1077  ///< [IN] Path to the target node. Can be an absolute path, or
1078  ///< a path relative from the iterator's current position.
1079  bool defaultValue
1080  ///< [IN] Default value to use if the original can't be
1081  ///< read.
1082 );
1083 
1084 //--------------------------------------------------------------------------------------------------
1085 /**
1086  * Writes a boolean value to the config tree. Only valid during a write
1087  * transaction.
1088  *
1089  * If the path is empty, the iterator's current node will be set.
1090  */
1091 //--------------------------------------------------------------------------------------------------
1092 void le_cfg_SetBool
1093 (
1094  le_cfg_IteratorRef_t iteratorRef,
1095  ///< [IN] Iterator to use as a basis for the transaction.
1096  const char* LE_NONNULL path,
1097  ///< [IN] Path to the target node. Can be an absolute path, or
1098  ///< a path relative from the iterator's current position.
1099  bool value
1100  ///< [IN] Value to write.
1101 );
1102 
1103 //--------------------------------------------------------------------------------------------------
1104 /**
1105  * Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child
1106  * nodes are also deleted.
1107  */
1108 //--------------------------------------------------------------------------------------------------
1110 (
1111  const char* LE_NONNULL path
1112  ///< [IN] Path to the node to delete.
1113 );
1114 
1115 //--------------------------------------------------------------------------------------------------
1116 /**
1117  * Clears the current value of a node. If the node doesn't currently exist then it is created as a
1118  * new empty node.
1119  */
1120 //--------------------------------------------------------------------------------------------------
1122 (
1123  const char* LE_NONNULL path
1124  ///< [IN] Absolute or relative path to read from.
1125 );
1126 
1127 //--------------------------------------------------------------------------------------------------
1128 /**
1129  * Reads a string value from the config tree. If the value isn't a string, or if the node is
1130  * empty or doesn't exist, the default value will be returned.
1131  *
1132  * @return - LE_OK - Commit was completed successfully.
1133  * - LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
1134  */
1135 //--------------------------------------------------------------------------------------------------
1137 (
1138  const char* LE_NONNULL path,
1139  ///< [IN] Path to read from.
1140  char* value,
1141  ///< [OUT] Value read from the requested node.
1142  size_t valueSize,
1143  ///< [IN]
1144  const char* LE_NONNULL defaultValue
1145  ///< [IN] Default value to use if the original can't be read.
1146 );
1147 
1148 //--------------------------------------------------------------------------------------------------
1149 /**
1150  * Writes a string value to the config tree.
1151  */
1152 //--------------------------------------------------------------------------------------------------
1154 (
1155  const char* LE_NONNULL path,
1156  ///< [IN] Path to the value to write.
1157  const char* LE_NONNULL value
1158  ///< [IN] Value to write.
1159 );
1160 
1161 //--------------------------------------------------------------------------------------------------
1162 /**
1163  * Reads a binary data from the config tree. If the node type is different, or if the node is
1164  * empty or doesn't exist, the default value will be returned.
1165  *
1166  * @return - LE_OK - Commit was completed successfully.
1167  * - LE_FORMAT_ERROR - if data can't be decoded.
1168  * - LE_OVERFLOW - Supplied buffer was not large enough to hold the value.
1169  */
1170 //--------------------------------------------------------------------------------------------------
1172 (
1173  const char* LE_NONNULL path,
1174  ///< [IN] Path to the target node.
1175  uint8_t* valuePtr,
1176  ///< [OUT] Buffer to write the value into.
1177  size_t* valueSizePtr,
1178  ///< [INOUT]
1179  const uint8_t* defaultValuePtr,
1180  ///< [IN] Default value to use if the original can't be
1181  ///< read.
1182  size_t defaultValueSize
1183  ///< [IN]
1184 );
1185 
1186 //--------------------------------------------------------------------------------------------------
1187 /**
1188  * Writes a binary data to the config tree.
1189  */
1190 //--------------------------------------------------------------------------------------------------
1192 (
1193  const char* LE_NONNULL path,
1194  ///< [IN] Path to the target node.
1195  const uint8_t* valuePtr,
1196  ///< [IN] Value to write.
1197  size_t valueSize
1198  ///< [IN]
1199 );
1200 
1201 //--------------------------------------------------------------------------------------------------
1202 /**
1203  * Reads a signed integer value from the config tree. If the value is a floating point
1204  * value, then it will be rounded and returned as an integer. Otherwise If the underlying value is
1205  * not an integer or a float, the default value will be returned instead.
1206  *
1207  * If the value is empty or the node doesn't exist, the default value is returned instead.
1208  */
1209 //--------------------------------------------------------------------------------------------------
1210 int32_t le_cfg_QuickGetInt
1211 (
1212  const char* LE_NONNULL path,
1213  ///< [IN] Path to the value to write.
1214  int32_t defaultValue
1215  ///< [IN] Default value to use if the original can't be read.
1216 );
1217 
1218 //--------------------------------------------------------------------------------------------------
1219 /**
1220  * Writes a signed integer value to the config tree.
1221  */
1222 //--------------------------------------------------------------------------------------------------
1223 void le_cfg_QuickSetInt
1224 (
1225  const char* LE_NONNULL path,
1226  ///< [IN] Path to the value to write.
1227  int32_t value
1228  ///< [IN] Value to write.
1229 );
1230 
1231 //--------------------------------------------------------------------------------------------------
1232 /**
1233  * Reads a 64-bit floating point value from the config tree. If the value is an integer,
1234  * then it is promoted to a float. Otherwise, if the underlying value is not a float, or an
1235  * integer the default value will be returned.
1236  *
1237  * If the value is empty or the node doesn't exist, the default value is returned.
1238  *
1239  * @note Floating point values will only be stored up to 6 digits of precision.
1240  */
1241 //--------------------------------------------------------------------------------------------------
1242 double le_cfg_QuickGetFloat
1243 (
1244  const char* LE_NONNULL path,
1245  ///< [IN] Path to the value to write.
1246  double defaultValue
1247  ///< [IN] Default value to use if the original can't be read.
1248 );
1249 
1250 //--------------------------------------------------------------------------------------------------
1251 /**
1252  * Writes a 64-bit floating point value to the config tree.
1253  *
1254  * @note Floating point values will only be stored up to 6 digits of precision.
1255  */
1256 //--------------------------------------------------------------------------------------------------
1258 (
1259  const char* LE_NONNULL path,
1260  ///< [IN] Path to the value to write.
1261  double value
1262  ///< [IN] Value to write.
1263 );
1264 
1265 //--------------------------------------------------------------------------------------------------
1266 /**
1267  * Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default
1268  * value is returned. This is also true if the node is a different type than expected.
1269  *
1270  * If the value is empty or the node doesn't exist, the default value is returned instead.
1271  */
1272 //--------------------------------------------------------------------------------------------------
1274 (
1275  const char* LE_NONNULL path,
1276  ///< [IN] Path to the value to write.
1277  bool defaultValue
1278  ///< [IN] Default value to use if the original can't be read.
1279 );
1280 
1281 //--------------------------------------------------------------------------------------------------
1282 /**
1283  * Writes a boolean value to the config tree.
1284  */
1285 //--------------------------------------------------------------------------------------------------
1287 (
1288  const char* LE_NONNULL path,
1289  ///< [IN] Path to the value to write.
1290  bool value
1291  ///< [IN] Value to write.
1292 );
1293 
1294 /** @} **/
1295 
1296 #endif // LE_CFG_INTERFACE_H_INCLUDE_GUARD
int32_t le_cfg_QuickGetInt(const char *LE_NONNULL path, int32_t defaultValue)
le_result_t le_cfg_GetNodeName(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *name, size_t nameSize)
void le_cfg_QuickSetFloat(const char *LE_NONNULL path, double value)
void le_cfg_QuickSetEmpty(const char *LE_NONNULL path)
le_result_t le_cfg_GetString(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *value, size_t valueSize, const char *LE_NONNULL defaultValue)
le_result_t le_cfg_GoToParent(le_cfg_IteratorRef_t iteratorRef)
le_cfg_nodeType_t
Definition: le_cfg_common.h:76
void le_cfg_QuickSetString(const char *LE_NONNULL path, const char *LE_NONNULL value)
void le_cfg_GoToNode(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL newPath)
le_result_t
Definition: le_basics.h:46
struct le_cfg_ChangeHandler * le_cfg_ChangeHandlerRef_t
Definition: le_cfg_common.h:101
void le_cfg_QuickDeleteNode(const char *LE_NONNULL path)
bool le_cfg_QuickGetBool(const char *LE_NONNULL path, bool defaultValue)
void(* le_cfg_ChangeHandlerFunc_t)(void *contextPtr)
Definition: le_cfg_common.h:110
void le_cfg_SetString(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, const char *LE_NONNULL value)
void le_cfg_DisconnectService(void)
void le_cfg_SetFloat(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, double value)
le_cfg_IteratorRef_t le_cfg_CreateReadTxn(const char *LE_NONNULL basePath)
void le_cfg_SetBool(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool value)
int32_t le_cfg_GetInt(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t defaultValue)
double le_cfg_QuickGetFloat(const char *LE_NONNULL path, double defaultValue)
void le_cfg_SetBinary(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, const uint8_t *valuePtr, size_t valueSize)
void le_cfg_RemoveChangeHandler(le_cfg_ChangeHandlerRef_t handlerRef)
le_result_t le_cfg_QuickGetString(const char *LE_NONNULL path, char *value, size_t valueSize, const char *LE_NONNULL defaultValue)
bool le_cfg_NodeExists(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
le_cfg_ChangeHandlerRef_t le_cfg_AddChangeHandler(const char *LE_NONNULL newPath, le_cfg_ChangeHandlerFunc_t handlerPtr, void *contextPtr)
le_result_t le_cfg_GetBinary(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, uint8_t *valuePtr, size_t *valueSizePtr, const uint8_t *defaultValuePtr, size_t defaultValueSize)
void le_cfg_SetInt(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t value)
bool le_cfg_GetBool(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool defaultValue)
le_result_t le_cfg_GoToNextSibling(le_cfg_IteratorRef_t iteratorRef)
LE_FULL_API void le_cfg_SetServerDisconnectHandler(le_cfg_DisconnectHandler_t disconnectHandler, void *contextPtr)
le_cfg_IteratorRef_t le_cfg_CreateWriteTxn(const char *LE_NONNULL basePath)
#define LE_FULL_API
Definition: le_apiFeatures.h:40
struct le_cfg_Iterator * le_cfg_IteratorRef_t
Definition: le_cfg_common.h:68
void(* le_cfg_DisconnectHandler_t)(void *)
Definition: le_cfg_interface.h:413
le_result_t le_cfg_GoToFirstChild(le_cfg_IteratorRef_t iteratorRef)
void le_cfg_QuickSetBinary(const char *LE_NONNULL path, const uint8_t *valuePtr, size_t valueSize)
void le_cfg_CommitTxn(le_cfg_IteratorRef_t iteratorRef)
le_result_t le_cfg_TryConnectService(void)
bool le_cfg_IsEmpty(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
void le_cfg_QuickSetBool(const char *LE_NONNULL path, bool value)
void le_cfg_ConnectService(void)
void le_cfg_QuickSetInt(const char *LE_NONNULL path, int32_t value)
void le_cfg_DeleteNode(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
double le_cfg_GetFloat(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, double defaultValue)
le_result_t le_cfg_GetPath(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *pathBuffer, size_t pathBufferSize)
void le_cfg_CancelTxn(le_cfg_IteratorRef_t iteratorRef)
le_result_t le_cfg_QuickGetBinary(const char *LE_NONNULL path, uint8_t *valuePtr, size_t *valueSizePtr, const uint8_t *defaultValuePtr, size_t defaultValueSize)
void le_cfg_SetEmpty(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
le_cfg_nodeType_t le_cfg_GetNodeType(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)