Files
sicspsi/sicslogquery.h
Koennecke Mark 78f6b92960 Added a -h option to sicslog querying
Fixed the mongodb path in sicslogmain to point to the production server
2016-04-14 14:57:55 +02:00

36 lines
736 B
C

/**
* This does the query execution for the new mongodb based sicslog.
*
* COPYRIGHT GPL
*
* Mark Koennecke, February 2016
*/
#ifndef __SICSLOGMONGO
#define __SICSLOGMONGO
#include <mongoc.h>
/*
callback called with result data
*/
typedef void (*ResultCallback_t)(const bson_t *doc, void *userData);
/*
setup of the data base connection and the default instrument
*/
int sicslogSetup(char *url, char *inst);
/*
do the query. Retruns 0 on success, 1 on failure
*/
int sicslogQuery(int argc, char *argv[], ResultCallback_t func, void *userData);
/*
If sicslogQuery or sicslogSetup returns an error, retrieve a description
of it. Only valid right after the error inducing call.
*/
char *sicslogGetError();
#endif