Duda: add JSON support

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: fix bad object name in Makefile.in

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: new global variables support

In order to create a global variable in your service:

1) Define a global variable as any C global var:

    /* define variable */
    duda_global_t my_variable;

2) Declare the variable as global for Duda, you need to do this
   inside the duda_init() call and after duda_service_init():

    /* initialize variable */
    duda_global_init(my_variable, NULL);

3) Optionally, you can initialize the variable with a defined value,
   this is done using a callback function, so you could do:

    /* define variable callback */
    void *cb_global_myvar()
    {
       void *mem = malloc(16);
       return mem;
    }

    /* initialize the variable with the callback */
    duda_global_init(my_variable, cb_global_myvar);

4) Inside the services callback for each method you can retrieve or
   set a new value for each one using the global object:

    global->set(my_variable, some_value);
    global->get(my_variable);

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: update Makefile.in

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Configure: tweak compiler message

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Configure: do not install not compiled plugins

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: validate wrong services path

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: check interfaces and methods string length

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Header: fix memory leak when extra_rows are set by the API

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: link to libmath '-lm', required by cJSON

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: new packages support!

This patch adds a new packages mechanism, so web services can
request to Duda to load specific packages/objects.

The first package available with Duda is JSON, so to add JSON
support to a web service, it will take two steps:

  #include "packages/json/json.h"

  int duda_init(struct duda_api_objects *api)
  {
      ...
      duda_service_init();
      duda_load_package(json, "json");
      ...
  }

The duda_load_package() call takes two arguments, the first one
is the package object which expose the API calls, the second is
the name of the package.

The packages lookup takes place in duda.conf file under the configuration
key 'PackagesRoot'.

Now the fun begins :)

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: new base64 package

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
core:time string sizes constant replaced by macro definition

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: deprecate crypto routines

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
monkey: core: lockup pidfile

The pidfile that is created when monkey is started should, as its exclusive nature requires,
be locked against other processes's that might attempt to write over it. Create a POSIX write-lock
for this, as shown by lslocks(8):

$> lslocks -p 15676
COMMAND           PID SIZE ACCESS M START END PATH
monkey: server  15676   5B WRITE  0     0   0 /home/dave/projects/monkey-dev/logs/monkey.pid.2001
overwrite pidfile upon SIGKILL

With the pidfile as a write-lock, SIGKILL does not remove the file
and causes the next execution of monkey to abort as it cannot open
the existing file. Solve this by unlinking it before opening it if
the file is already there (from the previous run).
Duda: new SQLITE package

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Duda: SQLITE / delete hidden file

Signed-off-by: Eduardo Silva <edsiper@gmail.com>
Merge branch 'master' of ssh://git.monkey-project.com/srv/git/monkey
Duda: SQLITE: deprecate content of sql_init() routine

Signed-off-by: Eduardo Silva <edsiper@gmail.com>