Initial build system & dummy functions

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
License update

Ship with the GPL and the LGPL, the latter's text depends on the former.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Symbol versioning support

On platforms that support it, turn on symbol versioning. For now, the
library uses a dummy version for the existing symbols.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Basic Event support added

This adds all the protocol buffers types, and implements most of the
wrappers for the Event type. Tags and Attributes are not supported yet.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
tests: Make sure we return a proper error on unknown fields

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Add a riemann_event_set_one() wrapper

This new wrapper can be used to set a single field, with less
boilerplate than with riemann_event_set().

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Add NULL guards where appropriate

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
client: Do not include <riemann/event.h>

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Correct two typos

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
message: Wrappers around the Msg type

These are enough to create a message and attach events.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Functions that return int, should return -errno

Instead of fiddling with errno itself, functions that return int, now
return a negative errno value on failure.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
Makefile: make the lib depend on the symbol version script

If using symbol versioning, make the library depend on the version
script, so if new symbols are added, the library gets relinked.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
event: Implement riemann_event_create()

This new function creates and fills out an Event structure. It is mostly
for convenience, for easily embedding events in messages.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
message: Implement riemann_message_set_events()

This function takes a variable number of arguments, and sets all of the
events in the message.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
message: Implement riemann_message_create_with_events()

A new convenience function to create a message with events set at the
same time.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>
message: Plug some memory leaks

Free up the associated events and whatnot whenever neccessary. This
makes us valgrind-clean.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>