Go to the source code of this file.
Typedefs | |
|
typedef struct le_cfgAdmin_Iterator * | le_cfgAdmin_IteratorRef_t |
Functions | |
| void | le_cfgAdmin_ConnectService (void) |
| void | le_cfgAdmin_DisconnectService (void) |
| le_result_t | le_cfgAdmin_ImportTree (le_cfg_IteratorRef_t iteratorRef, const char *filePath, const char *nodePath) |
| le_result_t | le_cfgAdmin_ExportTree (le_cfg_IteratorRef_t iteratorRef, const char *filePath, const char *nodePath) |
| void | le_cfgAdmin_DeleteTree (const char *treeName) |
| le_cfgAdmin_IteratorRef_t | le_cfgAdmin_CreateTreeIterator (void) |
| void | le_cfgAdmin_ReleaseTreeIterator (le_cfgAdmin_IteratorRef_t iteratorRef) |
| le_result_t | le_cfgAdmin_GetTreeName (le_cfgAdmin_IteratorRef_t iteratorRef, char *name, size_t nameNumElements) |
| le_result_t | le_cfgAdmin_NextTree (le_cfgAdmin_IteratorRef_t iteratorRef) |
Legato c_cfgAdmin include file.
Copyright (C) Sierra Wireless, Inc. 2014. Use of this work is subject to license.
| void le_cfgAdmin_ConnectService | ( | void | ) |
Connect the client to the service
| le_cfgAdmin_IteratorRef_t le_cfgAdmin_CreateTreeIterator | ( | void | ) |
Create a new iterator object for iterating over the list of trees currently managed by the config tree daemon.
| void le_cfgAdmin_DeleteTree | ( | const char * | treeName | ) |
Delete a tree from the system, both from the filesystem and from memory.
| [in] | treeName | Name of the tree to delete. |
| void le_cfgAdmin_DisconnectService | ( | void | ) |
Disconnect the client from the service
| le_result_t le_cfgAdmin_ExportTree | ( | le_cfg_IteratorRef_t | iteratorRef, |
| const char * | filePath, | ||
| const char * | nodePath | ||
| ) |
Take a node given from nodePath and stream it and it's children to the file given by filePath.
This funciton uses the iterator's read transaction, and takes a snapshot of the current state of the tree. The data write happens immediately.
- LE_OK - The commit was completed successfuly.
- LE_BAD_PARAMETER - The specified path does not exist in the config tree.
- LE_NOT_PERMITTED - Attempted to export from a section of the tree the connection
doesn't have access to.
- LE_FAULT - An I/O error occured while writing the data. | [in] | iteratorRef | Write iterator that is being used for the export. |
| [in] | filePath | Import the tree data from the this file. |
| [in] | nodePath | Where in the tree should this export happen? Leave as an empty string to use the iterator's current node. |
| le_result_t le_cfgAdmin_GetTreeName | ( | le_cfgAdmin_IteratorRef_t | iteratorRef, |
| char * | name, | ||
| size_t | nameNumElements | ||
| ) |
Read the name of the tree currently pointed at by the iterator.
| [in] | iteratorRef | Iterator object to read. |
| [out] | name | Name of the currently referenced tree is passed in this out parameter. |
| [in] | nameNumElements |
| le_result_t le_cfgAdmin_ImportTree | ( | le_cfg_IteratorRef_t | iteratorRef, |
| const char * | filePath, | ||
| const char * | nodePath | ||
| ) |
Read a subset of the configuration tree from the given filePath. The tree then overwrites the node at the given nodePath.
This function will import a sub-tree as part of the iterator's current transaction. This allows you to create an iterator on a given node. Import a sub-tree, and then examine the contents of the import before deciding to commit the new data.
- LE_OK - The commit was completed successfuly.
- LE_NOT_PERMITTED - Attempted to import to a section of the tree the connection doesn't
have access to.
- LE_FAULT - An I/O error occured while reading the data.
- LE_FORMAT_ERROR - The configuration data being imported appears corrupted. | [in] | iteratorRef | Write iterator that is being used for the import. |
| [in] | filePath | Import the tree data from the this file. |
| [in] | nodePath | Where in the tree should this import happen? Leave as an empty string to use the iterator's current node. |
| le_result_t le_cfgAdmin_NextTree | ( | le_cfgAdmin_IteratorRef_t | iteratorRef | ) |
Move onto the next tree in the list. If there are no more trees this function returns false, otherwise true is returned.
| [in] | iteratorRef | Iterator to iterate. |
| void le_cfgAdmin_ReleaseTreeIterator | ( | le_cfgAdmin_IteratorRef_t | iteratorRef | ) |
Release the iterator and free it's memory back to the system.
| [in] | iteratorRef | Iterator object to release. |