bitz-server  1.0.0
interface.h
1 /*
2  * bitz-server, An ICAP server implementation in C++
3  * Copyright (C) 2012 Uditha Atukorala
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18  */
19 
20 #ifndef BITZ_MODPY_INTERFACE_H
21 #define BITZ_MODPY_INTERFACE_H
22 
23 #include <Python.h>
24 #include <stddef.h>
25 
26 
27 PyObject * bitz_get_request( PyObject * self, PyObject * pyrequest );
28 PyObject * bitz_get_response( PyObject * self, PyObject * args );
29 PyObject * bitz_get_response_from_status( PyObject * self, PyObject * args);
30 
31 static PyMethodDef bitz_methods[] = {
32  { "get_request", bitz_get_request, METH_O, "Convert a capsule request into a python dictionary" },
33  { "get_response", bitz_get_response, METH_VARARGS, "Get a response capsule (takes in status and payload dictionary as args)" },
34  { "get_response_from_status", bitz_get_response_from_status, METH_VARARGS, "Get a response capsule from a response status" },
35  { NULL, NULL, 0, NULL }
36 };
37 
38 #endif /* !BITZ_MODPY_INTERFACE_H */
39