Skip to content
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
intel:masterfrom
cearachew:get_key_type_squash4
Open

Implemented get_key_type feature in libbuxton, daemon, and buxtonctl#128
cearachew wants to merge 2 commits into
intel:masterfrom
cearachew:get_key_type_squash4

Conversation

@cearachew

Copy link
Copy Markdown

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.

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.
@jobol

jobol commented Sep 19, 2014

Copy link
Copy Markdown
Contributor

From my opinion, it is a useless api verb. What does it brings? A type info.... Not usefull at all.
Can you provide a scenario?
As I wrote, I prefer to be able to get a value of any kind.

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.
@bryteise bryteise closed this Sep 22, 2014
@bryteise bryteise reopened this Sep 22, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants