Defines for record.
More...
#include <kdb.h>
#include <kdbdiff.h>
#include <kdbplugin.h>
#include <kdbtypes.h>
|
bool | elektraRecordEnableRecording (KDB *handle, const Key *parentKey, Key *errorKey) |
| Enable session recording. More...
|
|
bool | elektraRecordDisableRecording (KDB *handle, Key *errorKey) |
| Disable session recording. More...
|
|
bool | elektraRecordResetSession (KDB *handle, Key *errorKey) |
| Clears all recorded data. More...
|
|
bool | elektraRecordRecord (KDB *handle, KDB *sessionStorageHandle, KeySet *newKeys, Key *parentKey, Key *errorKey) |
| Diff and record changes to the KDB instance in handle . More...
|
|
bool | elektraRecordUndo (KDB *handle, KDB *sessionStorageHandle, Key *parentKey, Key *errorKey) |
| Undo changes that were recorded in the current recording session. More...
|
|
bool | elektraRecordRemoveKeys (KDB *handle, KeySet *toRemove, bool recursive, Key *errorKey) |
| Removes the provided keys from the recording session. More...
|
|
bool | elektraRecordIsActive (KDB *handle) |
| Check whether session recording is active in the given KDB instance. More...
|
|
Defines for record.
- Copyright
- BSD License (see doc/COPYING or https://www.libelektra.org)
◆ elektraRecordDisableRecording()
bool elektraRecordDisableRecording |
( |
KDB * |
handle, |
|
|
Key * |
errorKey |
|
) |
| |
Disable session recording.
This affects both the given handle
as well as every KDB instance that will be created after this method has been called.
- Parameters
-
handle | the KDB instance to use |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - recording has been disabled successfully @retfal false - there was an error disabling recording - see errorKey for further details |
◆ elektraRecordEnableRecording()
bool elektraRecordEnableRecording |
( |
KDB * |
handle, |
|
|
const Key * |
parentKey, |
|
|
Key * |
errorKey |
|
) |
| |
Enable session recording.
This affects both the given handle
as well as every KDB instance that will be created after this method has been called.
- Parameters
-
handle | the KDB instance to use |
parentKey | recording will be enabled for every key that is same or below this key |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - recording has been enabled successfully @retfal false - there was an error enabling recording - see errorKey for further details |
◆ elektraRecordIsActive()
bool elektraRecordIsActive |
( |
KDB * |
handle | ) |
|
Check whether session recording is active in the given KDB instance.
- Parameters
-
handle | the KDB instance to check |
- Return values
-
◆ elektraRecordRecord()
bool elektraRecordRecord |
( |
KDB * |
handle, |
|
|
KDB * |
sessionStorageHandle, |
|
|
KeySet * |
newKeys, |
|
|
Key * |
parentKey, |
|
|
Key * |
errorKey |
|
) |
| |
Diff and record changes to the KDB instance in handle
.
This function is mainly intended for use in the recorder plugin.
- Parameters
-
handle | the KDB instance that changes occured on |
sessionStorageHandle | the KDB instances that shall be used to persist the session diff. You can use the same as for handle . |
newKeys | the keyset with changed keys |
parentKey | only changes same or below this key will be determined |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - changes were recorded successfully @retfal false - there was an error during recording - see errorKey for further details |
◆ elektraRecordRemoveKeys()
bool elektraRecordRemoveKeys |
( |
KDB * |
handle, |
|
|
KeySet * |
toRemove, |
|
|
bool |
recursive, |
|
|
Key * |
errorKey |
|
) |
| |
Removes the provided keys from the recording session.
- Parameters
-
handle | the KDB instance to use for accessing recording data. |
toRemove | the keys in this keyset will be removed. |
recursive | if true , also the keys below every specified key will be removed. |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - removal was successful @retfal false - there was an error during the removal operation - see errorKey for further details |
◆ elektraRecordResetSession()
bool elektraRecordResetSession |
( |
KDB * |
handle, |
|
|
Key * |
errorKey |
|
) |
| |
Clears all recorded data.
- Parameters
-
handle | the KDB instance to use |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - recording session has been cleared successfully @retfal false - there was an error clearing the recording session - see errorKey for further details |
◆ elektraRecordUndo()
bool elektraRecordUndo |
( |
KDB * |
handle, |
|
|
KDB * |
sessionStorageHandle, |
|
|
Key * |
parentKey, |
|
|
Key * |
errorKey |
|
) |
| |
Undo changes that were recorded in the current recording session.
After executing this function, the state of KDB should be the same as it was before starting the recording session.
- Parameters
-
handle | the KDB instance to use for accessing configuration data |
sessionStorageHandle | the KDB instance to use for accessing recording data. This can be the same as for handle |
parentKey | only changes same or below this key are undone. |
errorKey | used for reporting errors and warnings. As usual, they will be found as meta keys attached to this key. |
- Return values
-
true | - changes were undone successfully @retfal false - there was an error during the undo operation - see errorKey for further details |