Martin Schröder
e8d5171b68
add simple validator (not done yet!)
2015-12-25 12:01:29 +01:00
Martin Schröder
1f43c831fd
add ability to dump into json and to forcibly set type
2015-12-17 16:56:20 +01:00
Martin Schröder
ef73c55efc
refactored some more
2015-12-16 15:24:40 +01:00
Martin Schröder
6e08cf4507
more refactoring
2015-12-15 11:55:50 +01:00
Martin Schröder
aa40b78b3f
more refactoring
2015-12-14 16:29:39 +01:00
Martin Schröder
2fdc96c0b3
fix parsing
2015-12-11 15:16:36 +01:00
Martin Schröder
03368cb350
refactor blobmsg creation (parsing may still be broken!)
2015-12-11 15:01:34 +01:00
Martin Schröder
4611dca32b
add blob dump function and fix few bugs
2015-12-09 17:06:37 +01:00
Martin Schröder
ed846ed09e
update documentation
2015-12-07 16:02:12 +01:00
Martin Schröder
df2b24bc77
makefile: add install target
2015-12-07 16:02:01 +01:00
Martin Schröder
61a7b89d81
simplify blob code
2015-12-07 16:01:33 +01:00
Martin Schröder
aaad042ee8
add float32 and float64 packing support to blob and blobmsg
2015-12-06 23:36:33 +01:00
Martin Schröder
2b64090f00
obviously it reinit should reinitialize the head to point to the beginning of the buffer and then reset the head to an empty blob_attr
2015-12-06 20:59:06 +01:00
Martin Schröder
b557a0a155
fix simple example
2015-12-06 20:54:58 +01:00
Martin Schröder
75186ab333
add a garbage date test
2015-12-06 20:54:48 +01:00
Martin Schröder
4516817935
refactor spaghetti blob code
2015-12-06 20:54:33 +01:00
Martin Schröder
c0a6dd4d50
generate libblobpack as output
2015-12-06 16:28:38 +01:00
Martin Schröder
c59f0ad2d9
add README.md
2015-12-06 16:26:40 +01:00
Martin Schröder
163c685eeb
add blobpack.h file
2015-12-06 16:24:33 +01:00
Martin Schröder
be237cceca
add simple example
2015-12-06 16:24:21 +01:00
Martin Schröder
efe98864a1
refactor the library interface
2015-12-06 16:24:09 +01:00
Martin Schröder
24b88b8a72
add Makefile
2015-12-06 13:50:46 +01:00
Martin Schröder
e032aeef96
use json-c
2015-12-06 13:49:55 +01:00
Felix Fietkau
7b30ab5767
add a base64 implementation (based on FreeBSD code)
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2015-05-08 14:34:29 +02:00
Yousong Zhou
e90c595d20
utils: use clock_get_time() for clock_gettime() on Apple.
...
It turns out that mach_absolute_time() is not monotonic at all. While
at it, convert the CLOCK_REALTIME implementation to using
clock_get_time() as well.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2015-01-21 20:11:30 +01:00
Yousong Zhou
7130941120
blobmsg: remove unneeded assignment in blobmsg_alloc_string_buffer().
...
data_dest should already be assigned by blobmsg_new() if the return
value is not NULL.
Signed-off-by: Yousong Zhou <yszhou4tech@gmail.com>
2014-12-11 17:58:29 +01:00
Felix Fietkau
9d8ff4acb6
blobmsg_json: avoid redefinition of json_object
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-10-24 13:40:14 +02:00
Felix Fietkau
dc6759ede5
blobmsg_json: include json.h inside blobmsg_json.c instead of the public header file
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-09-23 12:03:32 +02:00
Felix Fietkau
76fe389326
avoid using the deprecated is_error() function from json-c
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-09-23 12:02:31 +02:00
Felix Fietkau
f90b452ff5
blobmsg: accept NULL attr in blobmsg_get_string()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-08-03 15:00:54 +02:00
ewolfok
02a7fe19b1
blob: improve out-of-memory handling
...
Signed-off-by: Chen Bin <ewolfok@126.com>
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-26 03:50:50 +02:00
Felix Fietkau
0c20abad92
blobmsg: add a helper function to reset the name of a blobmsg attribute
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-21 01:24:01 +02:00
Felix Fietkau
66b221aa27
blobmsg: add blobmsg_check_array, which returns the size of the array
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-07-15 10:52:12 +02:00
Felix Fietkau
ec68befdf8
blobmsg_json: use cross-platform macro for fprintf on 64-bit values
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-05-31 14:48:03 +02:00
Jacob Siverskog
9f55833619
blob/blobmsg: Perform explicit casts from void* to avoid compilation errors when using libubox from C++.
...
Signed-off by: Jacob Siverskog <jacob@teenageengineering.com>
2014-05-09 14:33:39 +02:00
Felix Fietkau
1b79a08d28
utils: add a bitfield size macro
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-30 13:27:03 +02:00
Felix Fietkau
dd1d8afe02
blobmsg: make length variables unsigned
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-27 16:32:09 +02:00
Felix Fietkau
dc82993cf2
blob: make length variables unsigned
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-27 16:29:31 +02:00
Felix Fietkau
5fe5d6bd88
blobmsg_json: let blobmsg_format_json_with_cb with list == true also format arrays
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-26 10:59:00 +02:00
Felix Fietkau
6a3e2e6b22
blob: fix handling of custom validator callback
...
https://dev.openwrt.org/ticket/15638
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-21 12:02:32 +02:00
Felix Fietkau
7c38e8451e
blobmsg_json: fix a memleak on error
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-12 20:23:23 +02:00
Felix Fietkau
81223a3b25
blobmsg: remove unnecessary initialization
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-04-12 20:20:36 +02:00
Felix Fietkau
11cf87e069
list_compat.h: remove
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 23:06:42 +01:00
Felix Fietkau
1a7d58415e
list_compat.h: remove list_remove()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 23:00:53 +01:00
Felix Fietkau
19e3698de7
list_compat.h: remove list_add_before()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 23:00:24 +01:00
Felix Fietkau
4f53eb0289
list_compat.h: remove list_add_after()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 22:59:26 +01:00
Felix Fietkau
818b249a95
list_compat.h: remove list_add_head()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 22:58:21 +01:00
Felix Fietkau
c709785832
list_compat.h: remove list_init_head()
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 22:56:45 +01:00
Felix Fietkau
d4e33e7c40
list_compat.h: remove list_entity compat define
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-20 22:55:45 +01:00
Felix Fietkau
eccb7b541d
utils: add __constructor and __hidden defines
...
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
2014-03-18 14:04:06 +01:00