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 //--------------------------------------------------------------------------------------------------
405 /**
406  * Type for handler called when a server disconnects.
407  */
408 //--------------------------------------------------------------------------------------------------
409 typedef void (*le_cfg_DisconnectHandler_t)(void *);
410 
411 //--------------------------------------------------------------------------------------------------
412 /**
413  *
414  * Connect the current client thread to the service providing this API. Block until the service is
415  * available.
416  *
417  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
418  * called before any other functions in this API. Normally, ConnectService is automatically called
419  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
420  *
421  * This function is created automatically.
422  */
423 //--------------------------------------------------------------------------------------------------
425 (
426  void
427 );
428 
429 //--------------------------------------------------------------------------------------------------
430 /**
431  *
432  * Try to connect the current client thread to the service providing this API. Return with an error
433  * if the service is not available.
434  *
435  * For each thread that wants to use this API, either ConnectService or TryConnectService must be
436  * called before any other functions in this API. Normally, ConnectService is automatically called
437  * for the main thread, but not for any other thread. For details, see @ref apiFilesC_client.
438  *
439  * This function is created automatically.
440  *
441  * @return
442  * - LE_OK if the client connected successfully to the service.
443  * - LE_UNAVAILABLE if the server is not currently offering the service to which the client is
444  * bound.
445  * - LE_NOT_PERMITTED if the client interface is not bound to any service (doesn't have a binding).
446  * - LE_COMM_ERROR if the Service Directory cannot be reached.
447  */
448 //--------------------------------------------------------------------------------------------------
450 (
451  void
452 );
453 
454 //--------------------------------------------------------------------------------------------------
455 /**
456  * Set handler called when server disconnection is detected.
457  *
458  * When a server connection is lost, call this handler then exit with LE_FATAL. If a program wants
459  * to continue without exiting, it should call longjmp() from inside the handler.
460  */
461 //--------------------------------------------------------------------------------------------------
463 (
464  le_cfg_DisconnectHandler_t disconnectHandler,
465  void *contextPtr
466 );
467 
468 //--------------------------------------------------------------------------------------------------
469 /**
470  *
471  * Disconnect the current client thread from the service providing this API.
472  *
473  * Normally, this function doesn't need to be called. After this function is called, there's no
474  * longer a connection to the service, and the functions in this API can't be used. For details, see
475  * @ref apiFilesC_client.
476  *
477  * This function is created automatically.
478  */
479 //--------------------------------------------------------------------------------------------------
481 (
482  void
483 );
484 
485 
486 //--------------------------------------------------------------------------------------------------
487 /**
488  * Reference to a tree iterator object.
489  */
490 //--------------------------------------------------------------------------------------------------
491 
492 
493 //--------------------------------------------------------------------------------------------------
494 /**
495  * Identifies the data type of node.
496  */
497 //--------------------------------------------------------------------------------------------------
498 
499 
500 //--------------------------------------------------------------------------------------------------
501 /**
502  * Handler for node change notifications.
503  */
504 //--------------------------------------------------------------------------------------------------
505 
506 
507 //--------------------------------------------------------------------------------------------------
508 /**
509  * Reference type used by Add/Remove functions for EVENT 'le_cfg_Change'
510  */
511 //--------------------------------------------------------------------------------------------------
512 
513 
514 //--------------------------------------------------------------------------------------------------
515 /**
516  * Create a read transaction and open a new iterator for traversing the config tree.
517  *
518  * This action creates a read lock on the given tree, which will start a read-timeout.
519  * Once the read timeout expires, all active read iterators on that tree will be
520  * expired and their clients will be killed.
521  *
522  * @note A tree transaction is global to that tree; a long-held read transaction will block other
523  * user's write transactions from being committed.
524  *
525  * @return This will return the newly created iterator reference.
526  */
527 //--------------------------------------------------------------------------------------------------
528 le_cfg_IteratorRef_t le_cfg_CreateReadTxn
529 (
530  const char* LE_NONNULL basePath
531  ///< [IN] Path to the location to create the new iterator.
532 );
533 
534 //--------------------------------------------------------------------------------------------------
535 /**
536  * Create a write transaction and open a new iterator for both reading and writing.
537  *
538  * This action creates a write transaction. If the app holds the iterator for
539  * longer than the configured write transaction timeout, the iterator will cancel the
540  * transaction. Other reads will fail to return data, and all writes will be thrown away.
541  *
542  * @note A tree transaction is global to that tree; a long-held write transaction will block
543  * other user's write transactions from being started. Other trees in the system
544  * won't be affected.
545  *
546  * @return This will return a newly created iterator reference.
547  */
548 //--------------------------------------------------------------------------------------------------
549 le_cfg_IteratorRef_t le_cfg_CreateWriteTxn
550 (
551  const char* LE_NONNULL basePath
552  ///< [IN] Path to the location to create the new iterator.
553 );
554 
555 //--------------------------------------------------------------------------------------------------
556 /**
557  * Closes the write iterator and commits the write transaction. This updates the config tree
558  * with all of the writes that occurred within the iterator.
559  *
560  * @note This operation will also delete the iterator object.
561  */
562 //--------------------------------------------------------------------------------------------------
563 void le_cfg_CommitTxn
564 (
565  le_cfg_IteratorRef_t iteratorRef
566  ///< [IN] Iterator object to commit.
567 );
568 
569 //--------------------------------------------------------------------------------------------------
570 /**
571  * Closes and frees the given iterator object. If the iterator is a write iterator, the transaction
572  * will be canceled. If the iterator is a read iterator, the transaction will be closed. No data is
573  * written to the tree
574  *
575  * @note This operation will also delete the iterator object.
576  */
577 //--------------------------------------------------------------------------------------------------
578 void le_cfg_CancelTxn
579 (
580  le_cfg_IteratorRef_t iteratorRef
581  ///< [IN] Iterator object to close.
582 );
583 
584 //--------------------------------------------------------------------------------------------------
585 /**
586  * Changes the location of iterator. The path passed can be an absolute or a
587  * relative path from the iterators current location.
588  *
589  * The target node does not need to exist. Writing a value to a non-existent node will
590  * automatically create that node and any ancestor nodes (parent, parent's parent, etc.) that
591  * also don't exist.
592  */
593 //--------------------------------------------------------------------------------------------------
594 void le_cfg_GoToNode
595 (
596  le_cfg_IteratorRef_t iteratorRef,
597  ///< [IN] Iterator to move.
598  const char* LE_NONNULL newPath
599  ///< [IN] Absolute or relative path from the current location.
600 );
601 
602 //--------------------------------------------------------------------------------------------------
603 /**
604  * Move the iterator to the parent of the current node (moves up the tree).
605  *
606  * @return Return code will be one of the following values:
607  *
608  * - LE_OK - Commit was completed successfully.
609  * - LE_NOT_FOUND - Current node is the root node: has no parent.
610  */
611 //--------------------------------------------------------------------------------------------------
613 (
614  le_cfg_IteratorRef_t iteratorRef
615  ///< [IN] Iterator to move.
616 );
617 
618 //--------------------------------------------------------------------------------------------------
619 /**
620  * Moves the iterator to the the first child of the node from the current location.
621  *
622  * For read iterators without children, this function will fail. If the iterator is a write
623  * iterator, then a new node is automatically created. If this node or newly created
624  * children of this node are not written to, then this node will not persist even if the iterator is
625  * committed.
626  *
627  * @return Return code will be one of the following values:
628  *
629  * - LE_OK - Move was completed successfully.
630  * - LE_NOT_FOUND - The given node has no children.
631  */
632 //--------------------------------------------------------------------------------------------------
634 (
635  le_cfg_IteratorRef_t iteratorRef
636  ///< [IN] Iterator object to move.
637 );
638 
639 //--------------------------------------------------------------------------------------------------
640 /**
641  * Jumps the iterator to the next child node of the current node. Assuming the following tree:
642  *
643  * @code
644  * baseNode
645  * |
646  * +childA
647  * |
648  * +valueA
649  * |
650  * +valueB
651  * @endcode
652  *
653  * If the iterator is moved to the path, "/baseNode/childA/valueA". After the first
654  * GoToNextSibling the iterator will be pointing at valueB. A second call to GoToNextSibling
655  * will cause the function to return LE_NOT_FOUND.
656  *
657  * @return Returns one of the following values:
658  *
659  * - LE_OK - Commit was completed successfully.
660  * - LE_NOT_FOUND - Iterator has reached the end of the current list of siblings.
661  * Also returned if the the current node has no siblings.
662  */
663 //--------------------------------------------------------------------------------------------------
665 (
666  le_cfg_IteratorRef_t iteratorRef
667  ///< [IN] Iterator to iterate.
668 );
669 
670 //--------------------------------------------------------------------------------------------------
671 /**
672  * Get path to the node where the iterator is currently pointed.
673  *
674  * Assuming the following tree:
675  *
676  * @code
677  * baseNode
678  * |
679  * +childA
680  * |
681  * +valueA
682  * |
683  * +valueB
684  * @endcode
685  *
686  * If the iterator was currently pointing at valueA, GetPath would return the following path:
687  *
688  * @code
689  * /baseNode/childA/valueA
690  * @endcode
691  *
692  * Optionally, a path to another node can be supplied to this function. So, if the iterator is
693  * again on valueA and the relative path ".." is supplied then this function will return the
694  * the path relative to the node given:
695  *
696  * @code
697  * /baseNode/childA/
698  * @endcode
699  *
700  * @return - LE_OK - The write was completed successfully.
701  * - LE_OVERFLOW - The supplied string buffer was not large enough to hold the value.
702  */
703 //--------------------------------------------------------------------------------------------------
705 (
706  le_cfg_IteratorRef_t iteratorRef,
707  ///< [IN] Iterator to move.
708  const char* LE_NONNULL path,
709  ///< [IN] Path to the target node. Can be an absolute path, or
710  ///< a path relative from the iterator's current position.
711  char* pathBuffer,
712  ///< [OUT] Absolute path to the iterator's current node.
713  size_t pathBufferSize
714  ///< [IN]
715 );
716 
717 //--------------------------------------------------------------------------------------------------
718 /**
719  * Get the data type of node where the iterator is currently pointing.
720  *
721  * @return le_cfg_nodeType_t value indicating the stored value.
722  */
723 //--------------------------------------------------------------------------------------------------
724 le_cfg_nodeType_t le_cfg_GetNodeType
725 (
726  le_cfg_IteratorRef_t iteratorRef,
727  ///< [IN] Iterator object to use to read from the tree.
728  const char* LE_NONNULL path
729  ///< [IN] Path to the target node. Can be an absolute path, or
730  ///< a path relative from the iterator's current position.
731 );
732 
733 //--------------------------------------------------------------------------------------------------
734 /**
735  * Get the name of the node where the iterator is currently pointing.
736  *
737  * @return - LE_OK Read was completed successfully.
738  * - LE_OVERFLOW Supplied string buffer was not large enough to hold the value.
739  */
740 //--------------------------------------------------------------------------------------------------
742 (
743  le_cfg_IteratorRef_t iteratorRef,
744  ///< [IN] Iterator object to use to read from the tree.
745  const char* LE_NONNULL path,
746  ///< [IN] Path to the target node. Can be an absolute path, or
747  ///< a path relative from the iterator's current position.
748  char* name,
749  ///< [OUT] Read the name of the node object.
750  size_t nameSize
751  ///< [IN]
752 );
753 
754 //--------------------------------------------------------------------------------------------------
755 /**
756  * Add handler function for EVENT 'le_cfg_Change'
757  *
758  * This event provides information on changes to the given node object, or any of it's children,
759  * where a change could be either a read, write, create or delete operation.
760  */
761 //--------------------------------------------------------------------------------------------------
762 le_cfg_ChangeHandlerRef_t le_cfg_AddChangeHandler
763 (
764  const char* LE_NONNULL newPath,
765  ///< [IN] Path to the object to watch.
766  le_cfg_ChangeHandlerFunc_t handlerPtr,
767  ///< [IN] Handler to receive change notification
768  void* contextPtr
769  ///< [IN]
770 );
771 
772 //--------------------------------------------------------------------------------------------------
773 /**
774  * Remove handler function for EVENT 'le_cfg_Change'
775  */
776 //--------------------------------------------------------------------------------------------------
778 (
779  le_cfg_ChangeHandlerRef_t handlerRef
780  ///< [IN]
781 );
782 
783 //--------------------------------------------------------------------------------------------------
784 /**
785  * Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child
786  * nodes are also deleted.
787  *
788  * If the path is empty, the iterator's current node is deleted.
789  *
790  * This function is only valid during a write transaction.
791  */
792 //--------------------------------------------------------------------------------------------------
794 (
795  le_cfg_IteratorRef_t iteratorRef,
796  ///< [IN] Iterator to use as a basis for the transaction.
797  const char* LE_NONNULL path
798  ///< [IN] Path to the target node. Can be an absolute path, or
799  ///< a path relative from the iterator's current position.
800 );
801 
802 //--------------------------------------------------------------------------------------------------
803 /**
804  * Check if the given node is empty. A node is also considered empty if it doesn't yet exist. A
805  * node is also considered empty if it has no value or is a stem with no children.
806  *
807  * If the path is empty, the iterator's current node is queried for emptiness.
808  *
809  * Valid for both read and write transactions.
810  *
811  * @return A true if the node is considered empty, false if not.
812  */
813 //--------------------------------------------------------------------------------------------------
814 bool le_cfg_IsEmpty
815 (
816  le_cfg_IteratorRef_t iteratorRef,
817  ///< [IN] Iterator to use as a basis for the transaction.
818  const char* LE_NONNULL path
819  ///< [IN] Path to the target node. Can be an absolute path, or
820  ///< a path relative from the iterator's current position.
821 );
822 
823 //--------------------------------------------------------------------------------------------------
824 /**
825  * Clears out the node's value. If the node doesn't exist it will be created, and have no value.
826  *
827  * If the path is empty, the iterator's current node will be cleared. If the node is a stem
828  * then all children will be removed from the tree.
829  *
830  * Only valid during a write transaction.
831  */
832 //--------------------------------------------------------------------------------------------------
833 void le_cfg_SetEmpty
834 (
835  le_cfg_IteratorRef_t iteratorRef,
836  ///< [IN] Iterator to use as a basis for the transaction.
837  const char* LE_NONNULL path
838  ///< [IN] Path to the target node. Can be an absolute path, or
839  ///< a path relative from the iterator's current position.
840 );
841 
842 //--------------------------------------------------------------------------------------------------
843 /**
844  * Checks to see if a given node in the config tree exists.
845  *
846  * @return True if the specified node exists in the tree. False if not.
847  */
848 //--------------------------------------------------------------------------------------------------
850 (
851  le_cfg_IteratorRef_t iteratorRef,
852  ///< [IN] Iterator to use as a basis for the transaction.
853  const char* LE_NONNULL path
854  ///< [IN] Path to the target node. Can be an absolute path, or
855  ///< a path relative from the iterator's current position.
856 );
857 
858 //--------------------------------------------------------------------------------------------------
859 /**
860  * Reads a string value from the config tree. If the value isn't a string, or if the node is
861  * empty or doesn't exist, the default value will be returned.
862  *
863  * Valid for both read and write transactions.
864  *
865  * If the path is empty, the iterator's current node will be read.
866  *
867  * @return - LE_OK - Read was completed successfully.
868  * - LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
869  */
870 //--------------------------------------------------------------------------------------------------
872 (
873  le_cfg_IteratorRef_t iteratorRef,
874  ///< [IN] Iterator to use as a basis for the transaction.
875  const char* LE_NONNULL path,
876  ///< [IN] Path to the target node. Can be an absolute path,
877  ///< or a path relative from the iterator's current
878  ///< position.
879  char* value,
880  ///< [OUT] Buffer to write the value into.
881  size_t valueSize,
882  ///< [IN]
883  const char* LE_NONNULL defaultValue
884  ///< [IN] Default value to use if the original can't be
885  ///< read.
886 );
887 
888 //--------------------------------------------------------------------------------------------------
889 /**
890  * Writes a string value to the config tree. Only valid during a write
891  * transaction.
892  *
893  * If the path is empty, the iterator's current node will be set.
894  */
895 //--------------------------------------------------------------------------------------------------
896 void le_cfg_SetString
897 (
898  le_cfg_IteratorRef_t iteratorRef,
899  ///< [IN] Iterator to use as a basis for the transaction.
900  const char* LE_NONNULL path,
901  ///< [IN] Path to the target node. Can be an absolute path, or
902  ///< a path relative from the iterator's current position.
903  const char* LE_NONNULL value
904  ///< [IN] Value to write.
905 );
906 
907 //--------------------------------------------------------------------------------------------------
908 /**
909  * Read a binary data from the config tree. If the the node has a wrong type, is
910  * empty or doesn't exist, the default value will be returned.
911  *
912  * Valid for both read and write transactions.
913  *
914  * If the path is empty, the iterator's current node will be read.
915  *
916  * \b Responds \b With:
917  *
918  * This function will respond with one of the following values:
919  *
920  * - LE_OK - Read was completed successfully.
921  * - LE_FORMAT_ERROR - if data can't be decoded.
922  * - LE_OVERFLOW - Supplied buffer was not large enough to hold the value.
923  */
924 //--------------------------------------------------------------------------------------------------
926 (
927  le_cfg_IteratorRef_t iteratorRef,
928  ///< [IN] Iterator to use as a basis for the transaction.
929  const char* LE_NONNULL path,
930  ///< [IN] Path to the target node. Can be an absolute path,
931  ///< or a path relative from the iterator's current
932  ///< position.
933  uint8_t* valuePtr,
934  ///< [OUT] Buffer to write the value into.
935  size_t* valueSizePtr,
936  ///< [INOUT]
937  const uint8_t* defaultValuePtr,
938  ///< [IN] Default value to use if the original can't be
939  ///< read.
940  size_t defaultValueSize
941  ///< [IN]
942 );
943 
944 //--------------------------------------------------------------------------------------------------
945 /**
946  * Write a binary data to the config tree. Only valid during a write
947  * transaction.
948  *
949  * If the path is empty, the iterator's current node will be set.
950  *
951  * @note Binary data cannot be written to the 'system' tree.
952  */
953 //--------------------------------------------------------------------------------------------------
954 void le_cfg_SetBinary
955 (
956  le_cfg_IteratorRef_t iteratorRef,
957  ///< [IN] Iterator to use as a basis for the transaction.
958  const char* LE_NONNULL path,
959  ///< [IN] Path to the target node. Can be an absolute path, or
960  ///< a path relative from the iterator's current position.
961  const uint8_t* valuePtr,
962  ///< [IN] Value to write.
963  size_t valueSize
964  ///< [IN]
965 );
966 
967 //--------------------------------------------------------------------------------------------------
968 /**
969  * Reads a signed integer value from the config tree.
970  *
971  * If the underlying value is not an integer, the default value will be returned instead. The
972  * default value is also returned if the node does not exist or if it's empty.
973  *
974  * If the value is a floating point value, then it will be rounded and returned as an integer.
975  *
976  * Valid for both read and write transactions.
977  *
978  * If the path is empty, the iterator's current node will be read.
979  */
980 //--------------------------------------------------------------------------------------------------
981 int32_t le_cfg_GetInt
982 (
983  le_cfg_IteratorRef_t iteratorRef,
984  ///< [IN] Iterator to use as a basis for the transaction.
985  const char* LE_NONNULL path,
986  ///< [IN] Path to the target node. Can be an absolute path, or
987  ///< a path relative from the iterator's current position.
988  int32_t defaultValue
989  ///< [IN] Default value to use if the original can't be
990  ///< read.
991 );
992 
993 //--------------------------------------------------------------------------------------------------
994 /**
995  * Writes a signed integer value to the config tree. Only valid during a
996  * write transaction.
997  *
998  * If the path is empty, the iterator's current node will be set.
999  */
1000 //--------------------------------------------------------------------------------------------------
1001 void le_cfg_SetInt
1002 (
1003  le_cfg_IteratorRef_t iteratorRef,
1004  ///< [IN] Iterator to use as a basis for the transaction.
1005  const char* LE_NONNULL path,
1006  ///< [IN] Path to the target node. Can be an absolute path, or
1007  ///< a path relative from the iterator's current position.
1008  int32_t value
1009  ///< [IN] Value to write.
1010 );
1011 
1012 //--------------------------------------------------------------------------------------------------
1013 /**
1014  * Reads a 64-bit floating point value from the config tree.
1015  *
1016  * If the value is an integer then the value will be promoted to a float. Otherwise, if the
1017  * underlying value is not a float or integer, the default value will be returned.
1018  *
1019  * If the path is empty, the iterator's current node will be read.
1020  *
1021  * @note Floating point values will only be stored up to 6 digits of precision.
1022  */
1023 //--------------------------------------------------------------------------------------------------
1024 double le_cfg_GetFloat
1025 (
1026  le_cfg_IteratorRef_t iteratorRef,
1027  ///< [IN] Iterator to use as a basis for the transaction.
1028  const char* LE_NONNULL path,
1029  ///< [IN] Path to the target node. Can be an absolute path, or
1030  ///< a path relative from the iterator's current position.
1031  double defaultValue
1032  ///< [IN] Default value to use if the original can't be
1033  ///< read.
1034 );
1035 
1036 //--------------------------------------------------------------------------------------------------
1037 /**
1038  * Writes a 64-bit floating point value to the config tree. Only valid
1039  * during a write transaction.
1040  *
1041  * If the path is empty, the iterator's current node will be set.
1042  *
1043  * @note Floating point values will only be stored up to 6 digits of precision.
1044  */
1045 //--------------------------------------------------------------------------------------------------
1046 void le_cfg_SetFloat
1047 (
1048  le_cfg_IteratorRef_t iteratorRef,
1049  ///< [IN] Iterator to use as a basis for the transaction.
1050  const char* LE_NONNULL path,
1051  ///< [IN] Path to the target node. Can be an absolute path, or
1052  ///< a path relative from the iterator's current position.
1053  double value
1054  ///< [IN] Value to write.
1055 );
1056 
1057 //--------------------------------------------------------------------------------------------------
1058 /**
1059  * Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default
1060  * value is returned. Default value is also returned if the node is a different type than
1061  * expected.
1062  *
1063  * Valid for both read and write transactions.
1064  *
1065  * If the path is empty, the iterator's current node will be read.
1066  */
1067 //--------------------------------------------------------------------------------------------------
1068 bool le_cfg_GetBool
1069 (
1070  le_cfg_IteratorRef_t iteratorRef,
1071  ///< [IN] Iterator to use as a basis for the transaction.
1072  const char* LE_NONNULL path,
1073  ///< [IN] Path to the target node. Can be an absolute path, or
1074  ///< a path relative from the iterator's current position.
1075  bool defaultValue
1076  ///< [IN] Default value to use if the original can't be
1077  ///< read.
1078 );
1079 
1080 //--------------------------------------------------------------------------------------------------
1081 /**
1082  * Writes a boolean value to the config tree. Only valid during a write
1083  * transaction.
1084  *
1085  * If the path is empty, the iterator's current node will be set.
1086  */
1087 //--------------------------------------------------------------------------------------------------
1088 void le_cfg_SetBool
1089 (
1090  le_cfg_IteratorRef_t iteratorRef,
1091  ///< [IN] Iterator to use as a basis for the transaction.
1092  const char* LE_NONNULL path,
1093  ///< [IN] Path to the target node. Can be an absolute path, or
1094  ///< a path relative from the iterator's current position.
1095  bool value
1096  ///< [IN] Value to write.
1097 );
1098 
1099 //--------------------------------------------------------------------------------------------------
1100 /**
1101  * Deletes the node specified by the path. If the node doesn't exist, nothing happens. All child
1102  * nodes are also deleted.
1103  */
1104 //--------------------------------------------------------------------------------------------------
1106 (
1107  const char* LE_NONNULL path
1108  ///< [IN] Path to the node to delete.
1109 );
1110 
1111 //--------------------------------------------------------------------------------------------------
1112 /**
1113  * Clears the current value of a node. If the node doesn't currently exist then it is created as a
1114  * new empty node.
1115  */
1116 //--------------------------------------------------------------------------------------------------
1118 (
1119  const char* LE_NONNULL path
1120  ///< [IN] Absolute or relative path to read from.
1121 );
1122 
1123 //--------------------------------------------------------------------------------------------------
1124 /**
1125  * Reads a string value from the config tree. If the value isn't a string, or if the node is
1126  * empty or doesn't exist, the default value will be returned.
1127  *
1128  * @return - LE_OK - Commit was completed successfully.
1129  * - LE_OVERFLOW - Supplied string buffer was not large enough to hold the value.
1130  */
1131 //--------------------------------------------------------------------------------------------------
1133 (
1134  const char* LE_NONNULL path,
1135  ///< [IN] Path to read from.
1136  char* value,
1137  ///< [OUT] Value read from the requested node.
1138  size_t valueSize,
1139  ///< [IN]
1140  const char* LE_NONNULL defaultValue
1141  ///< [IN] Default value to use if the original can't be read.
1142 );
1143 
1144 //--------------------------------------------------------------------------------------------------
1145 /**
1146  * Writes a string value to the config tree.
1147  */
1148 //--------------------------------------------------------------------------------------------------
1150 (
1151  const char* LE_NONNULL path,
1152  ///< [IN] Path to the value to write.
1153  const char* LE_NONNULL value
1154  ///< [IN] Value to write.
1155 );
1156 
1157 //--------------------------------------------------------------------------------------------------
1158 /**
1159  * Reads a binary data from the config tree. If the node type is different, or if the node is
1160  * empty or doesn't exist, the default value will be returned.
1161  *
1162  * @return - LE_OK - Commit was completed successfully.
1163  * - LE_FORMAT_ERROR - if data can't be decoded.
1164  * - LE_OVERFLOW - Supplied buffer was not large enough to hold the value.
1165  */
1166 //--------------------------------------------------------------------------------------------------
1168 (
1169  const char* LE_NONNULL path,
1170  ///< [IN] Path to the target node.
1171  uint8_t* valuePtr,
1172  ///< [OUT] Buffer to write the value into.
1173  size_t* valueSizePtr,
1174  ///< [INOUT]
1175  const uint8_t* defaultValuePtr,
1176  ///< [IN] Default value to use if the original can't be
1177  ///< read.
1178  size_t defaultValueSize
1179  ///< [IN]
1180 );
1181 
1182 //--------------------------------------------------------------------------------------------------
1183 /**
1184  * Writes a binary data to the config tree.
1185  */
1186 //--------------------------------------------------------------------------------------------------
1188 (
1189  const char* LE_NONNULL path,
1190  ///< [IN] Path to the target node.
1191  const uint8_t* valuePtr,
1192  ///< [IN] Value to write.
1193  size_t valueSize
1194  ///< [IN]
1195 );
1196 
1197 //--------------------------------------------------------------------------------------------------
1198 /**
1199  * Reads a signed integer value from the config tree. If the value is a floating point
1200  * value, then it will be rounded and returned as an integer. Otherwise If the underlying value is
1201  * not an integer or a float, the default value will be returned instead.
1202  *
1203  * If the value is empty or the node doesn't exist, the default value is returned instead.
1204  */
1205 //--------------------------------------------------------------------------------------------------
1206 int32_t le_cfg_QuickGetInt
1207 (
1208  const char* LE_NONNULL path,
1209  ///< [IN] Path to the value to write.
1210  int32_t defaultValue
1211  ///< [IN] Default value to use if the original can't be read.
1212 );
1213 
1214 //--------------------------------------------------------------------------------------------------
1215 /**
1216  * Writes a signed integer value to the config tree.
1217  */
1218 //--------------------------------------------------------------------------------------------------
1219 void le_cfg_QuickSetInt
1220 (
1221  const char* LE_NONNULL path,
1222  ///< [IN] Path to the value to write.
1223  int32_t value
1224  ///< [IN] Value to write.
1225 );
1226 
1227 //--------------------------------------------------------------------------------------------------
1228 /**
1229  * Reads a 64-bit floating point value from the config tree. If the value is an integer,
1230  * then it is promoted to a float. Otherwise, if the underlying value is not a float, or an
1231  * integer the default value will be returned.
1232  *
1233  * If the value is empty or the node doesn't exist, the default value is returned.
1234  *
1235  * @note Floating point values will only be stored up to 6 digits of precision.
1236  */
1237 //--------------------------------------------------------------------------------------------------
1238 double le_cfg_QuickGetFloat
1239 (
1240  const char* LE_NONNULL path,
1241  ///< [IN] Path to the value to write.
1242  double defaultValue
1243  ///< [IN] Default value to use if the original can't be read.
1244 );
1245 
1246 //--------------------------------------------------------------------------------------------------
1247 /**
1248  * Writes a 64-bit floating point value to the config tree.
1249  *
1250  * @note Floating point values will only be stored up to 6 digits of precision.
1251  */
1252 //--------------------------------------------------------------------------------------------------
1254 (
1255  const char* LE_NONNULL path,
1256  ///< [IN] Path to the value to write.
1257  double value
1258  ///< [IN] Value to write.
1259 );
1260 
1261 //--------------------------------------------------------------------------------------------------
1262 /**
1263  * Reads a value from the tree as a boolean. If the node is empty or doesn't exist, the default
1264  * value is returned. This is also true if the node is a different type than expected.
1265  *
1266  * If the value is empty or the node doesn't exist, the default value is returned instead.
1267  */
1268 //--------------------------------------------------------------------------------------------------
1270 (
1271  const char* LE_NONNULL path,
1272  ///< [IN] Path to the value to write.
1273  bool defaultValue
1274  ///< [IN] Default value to use if the original can't be read.
1275 );
1276 
1277 //--------------------------------------------------------------------------------------------------
1278 /**
1279  * Writes a boolean value to the config tree.
1280  */
1281 //--------------------------------------------------------------------------------------------------
1283 (
1284  const char* LE_NONNULL path,
1285  ///< [IN] Path to the value to write.
1286  bool value
1287  ///< [IN] Value to write.
1288 );
1289 
1290 #endif // LE_CFG_INTERFACE_H_INCLUDE_GUARD
void le_cfg_DisconnectService(void)
double le_cfg_QuickGetFloat(const char *LE_NONNULL path, double defaultValue)
le_result_t
Definition: le_basics.h:35
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_cfg_IteratorRef_t le_cfg_CreateWriteTxn(const char *LE_NONNULL basePath)
void le_cfg_QuickSetBinary(const char *LE_NONNULL path, const uint8_t *valuePtr, size_t valueSize)
le_result_t le_cfg_GoToNextSibling(le_cfg_IteratorRef_t iteratorRef)
le_cfg_nodeType_t le_cfg_GetNodeType(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
le_result_t le_cfg_GetNodeName(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *name, size_t nameSize)
void(* le_cfg_DisconnectHandler_t)(void *)
Definition: le_cfg_interface.h:409
void le_cfg_QuickSetInt(const char *LE_NONNULL path, int32_t value)
void le_cfg_GoToNode(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL newPath)
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_QuickSetBool(const char *LE_NONNULL path, bool value)
void le_cfg_ConnectService(void)
le_result_t le_cfg_QuickGetString(const char *LE_NONNULL path, char *value, size_t valueSize, const char *LE_NONNULL defaultValue)
void le_cfg_QuickSetEmpty(const char *LE_NONNULL path)
bool le_cfg_QuickGetBool(const char *LE_NONNULL path, bool defaultValue)
double le_cfg_GetFloat(le_cfg_IteratorRef_t iteratorRef, 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)
LE_FULL_API void le_cfg_SetServerDisconnectHandler(le_cfg_DisconnectHandler_t disconnectHandler, void *contextPtr)
void le_cfg_SetEmpty(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
void le_cfg_CommitTxn(le_cfg_IteratorRef_t iteratorRef)
bool le_cfg_NodeExists(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
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)
#define LE_FULL_API
Definition: le_apiFeatures.h:40
le_result_t le_cfg_TryConnectService(void)
le_cfg_ChangeHandlerRef_t le_cfg_AddChangeHandler(const char *LE_NONNULL newPath, le_cfg_ChangeHandlerFunc_t handlerPtr, void *contextPtr)
void le_cfg_SetInt(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t value)
void le_cfg_QuickSetFloat(const char *LE_NONNULL path, double value)
void le_cfg_CancelTxn(le_cfg_IteratorRef_t iteratorRef)
void le_cfg_SetFloat(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, double value)
bool le_cfg_IsEmpty(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
void le_cfg_DeleteNode(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path)
le_result_t le_cfg_GoToFirstChild(le_cfg_IteratorRef_t iteratorRef)
le_cfg_IteratorRef_t le_cfg_CreateReadTxn(const char *LE_NONNULL basePath)
void le_cfg_QuickDeleteNode(const char *LE_NONNULL path)
void le_cfg_QuickSetString(const char *LE_NONNULL path, const char *LE_NONNULL value)
void le_cfg_SetString(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, const char *LE_NONNULL value)
le_result_t le_cfg_GetPath(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, char *pathBuffer, size_t pathBufferSize)
void le_cfg_RemoveChangeHandler(le_cfg_ChangeHandlerRef_t handlerRef)
bool le_cfg_GetBool(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool defaultValue)
le_result_t le_cfg_GoToParent(le_cfg_IteratorRef_t iteratorRef)
int32_t le_cfg_GetInt(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, int32_t defaultValue)
void le_cfg_SetBool(le_cfg_IteratorRef_t iteratorRef, const char *LE_NONNULL path, bool value)
int32_t le_cfg_QuickGetInt(const char *LE_NONNULL path, int32_t defaultValue)