This repository was archived by the owner on Aug 5, 2022. It is now read-only.
Implemented get_key_type feature in libbuxton, daemon, and buxtonctl - #128
Open
cearachew wants to merge 2 commits into
Open
Implemented get_key_type feature in libbuxton, daemon, and buxtonctl#128cearachew wants to merge 2 commits into
cearachew wants to merge 2 commits into
Conversation
Get_key_type returns the type of a key's value as a uint32_t, which can be cast to a BuxtonDataType. This commit adds buxton_get_key_type to libbuxton, adds support functions for it in protocol, daemon, direct, and gdbm, adds this feature to buxtonctl, and adds a new BuxtonDataType UNKNOWN. A demo program, bxt_hello_get_key_type, a man page, buxton_get_key_type, and changes to other affected man pages are included. Passing unit tests are in check_daemon and check_buxton. Calls to buxton_get_key_type must have their key type set to UNKNOWN.
Contributor
|
From my opinion, it is a useless api verb. What does it brings? A type info.... Not usefull at all. |
A buxton client connection is left open in the simple library as long as there is at least one notification registered with the daemon. Calls to simple register take a key name and a callback function. These, along with the previously set group and layer, are used to get a key type and register a notification in the daemon. A provided callback deals with the BuxtonResponse and calls the user's callback with the new data as a void * and the key name as a char *. sbuxton_get_fd and sbuxton_handle_response are provided to use in polling or a mainloop. Includes documentation for all new public functions and passing checks for new internal functions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Get_key_type returns the type of a key's value as a uint32_t, which can
be cast to a BuxtonDataType. This commit adds buxton_get_key_type to
libbuxton, adds support functions for it in protocol, daemon, direct,
and gdbm, adds this feature to buxtonctl, and adds a new BuxtonDataType
UNKNOWN.
A demo program, bxt_hello_get_key_type, a man page, buxton_get_key_type,
and changes to other affected man pages are included.
Passing unit tests are in check_daemon and check_buxton.
Calls to buxton_get_key_type must have their key type set to UNKNOWN.