diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-10-26 12:33:50 +0400 |
commit | 47e6e7c84f008a53061e661f31ae96629bc694ef (patch) | |
tree | 648a07f3b5b9d67ce19b0fd72e8caa1175c98f1a /src/pmwebapi/pmwebapi.h | |
download | pcp-debian.tar.gz |
Debian 3.9.10debian/3.9.10debian
Diffstat (limited to 'src/pmwebapi/pmwebapi.h')
-rw-r--r-- | src/pmwebapi/pmwebapi.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/src/pmwebapi/pmwebapi.h b/src/pmwebapi/pmwebapi.h new file mode 100644 index 0000000..ff2e71f --- /dev/null +++ b/src/pmwebapi/pmwebapi.h @@ -0,0 +1,52 @@ +/* + * JSON web bridge for PMAPI. + * + * Copyright (c) 2011-2013 Red Hat Inc. + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by the + * Free Software Foundation; either version 2 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY + * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include "pmapi.h" +#include "impl.h" +#include <assert.h> +#include <sys/stat.h> +#include <time.h> +#include <stdarg.h> +#include <microhttpd.h> + +/* ------------------------------------------------------------------------ */ + +extern const char uriprefix[]; +extern char *archivesdir; /* set by -A option */ +extern char *resourcedir; /* set by -R option */ +extern unsigned verbosity; /* set by -v option */ +extern unsigned maxtimeout; /* set by -t option */ +extern unsigned new_contexts_p; /* set by -N option */ +extern unsigned exit_p; /* counted by SIG* handler */ + +/* ------------------------------------------------------------------------ */ + +extern int pmwebapi_bind_permanent (int webapi_ctx, int pcp_context); +extern int pmwebapi_respond (void *cls, struct MHD_Connection *connection, + const char* url, const char* method, + const char* upload_data, size_t *upload_data_size); +extern unsigned pmwebapi_gc (void); +extern void pmwebapi_deallocate_all (void); +extern int pmwebres_respond (void *cls, struct MHD_Connection *connection, + const char* url); + +extern void pmweb_notify (int, struct MHD_Connection*, const char *, ...) __PM_PRINTFLIKE(3,4); + +extern void pmweb_start_daemon (int, char **); |