diff -x '*.po' -d -urpN abrt.8/src/report-python/common.h abrt.9/src/report-python/common.h
--- abrt.8/src/report-python/common.h	2011-05-23 17:31:03.000000000 +0200
+++ abrt.9/src/report-python/common.h	2011-05-24 13:38:37.055634324 +0200
@@ -31,11 +31,6 @@ extern PyTypeObject p_problem_data_type;
 extern PyTypeObject p_dump_dir_type;
 extern PyTypeObject p_run_event_state_type;
 
-/* module-level functions */
-PyObject *p_dd_opendir(PyObject *module, PyObject *args);
-PyObject *p_dd_create(PyObject *module, PyObject *args);
-PyObject *p_delete_dump_dir(PyObject *pself, PyObject *args);
-
 /* python objects' struct defs */
 typedef struct {
     PyObject_HEAD
@@ -46,3 +41,13 @@ typedef struct {
     PyObject_HEAD
     problem_data_t *cd;
 } p_problem_data;
+
+/* module-level functions */
+/* for include/report/dump_dir.h */
+PyObject *p_dd_opendir(PyObject *module, PyObject *args);
+PyObject *p_dd_create(PyObject *module, PyObject *args);
+PyObject *p_delete_dump_dir(PyObject *pself, PyObject *args);
+/* for include/report/report.h */
+PyObject *p_report_problem_in_dir(PyObject *pself, PyObject *args);
+PyObject *p_report_problem_in_memory(PyObject *pself, PyObject *args);
+PyObject *p_report_problem(PyObject *pself, PyObject *args);
diff -x '*.po' -d -urpN abrt.8/src/report-python/__init__.py abrt.9/src/report-python/__init__.py
--- abrt.8/src/report-python/__init__.py	2011-05-23 17:31:03.000000000 +0200
+++ abrt.9/src/report-python/__init__.py	2011-05-24 12:55:48.571004745 +0200
@@ -127,4 +127,4 @@ def report(cd, io_unused):
 """
 
 def report(pd, io_unused):
-    result = report_problem_data(pd)
+    result = report_problem(pd)
diff -x '*.po' -d -urpN abrt.8/src/report-python/Makefile.am abrt.9/src/report-python/Makefile.am
--- abrt.8/src/report-python/Makefile.am	2011-05-04 16:36:32.000000000 +0200
+++ abrt.9/src/report-python/Makefile.am	2011-05-24 13:01:11.883152644 +0200
@@ -11,6 +11,7 @@ _pyreport_la_SOURCES = \
     problem_data.c \
     dump_dir.c \
     run_event.c \
+    report.c \
     common.h
 _pyreport_la_CPPFLAGS = \
     -I$(srcdir)/../include/report -I$(srcdir)/../include \
diff -x '*.po' -d -urpN abrt.8/src/report-python/README abrt.9/src/report-python/README
--- abrt.8/src/report-python/README	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/src/report-python/README	2011-05-24 13:34:52.394626181 +0200
@@ -0,0 +1,44 @@
+Currently (2011-05), include/report/*.h are:
+
+dump_dir.h
+event_config.h
+problem_data.h
+report.h
+run_event.h
+
+and we wrap all of them except event_config.h.
+
+Python wrappers for C types and functions declared in include/report/FOO.h
+should be implemented in corresponding FOO.c file in this directory.
+
+Their (C-level) declarations should go to common.h.
+
+Note that methods don't have to be declared in common.h:
+they can be static functions inside FOO.c, and exposed to the rest
+of the world via PyTypeObject instance. In FOO.c:
+
+static PyObject *p_method_name(PyObject *pself, PyObject *args)
+...
+static PyMethodDef p_FOO_methods[] = {
+{ "method_name", p_method_name, METH_VARARGS, NULL }
+...
+};
+PyTypeObject p_FOO_type = {
+    .tp_methods = p_FOO_methods,
+...
+};
+
+and only p_FOO_type needs to be declared in common.h.
+
+Similarly, (de)allocators, attr getters/setters also can be static functions
+and be hooked into p_FOO_type.
+
+However, non-method functions can't be static.
+
+
+File reportmodule.c contains the initialization function which should
+initialize types (p_FOO_type objects) and hook up finctions from every
+FOO.c so that they are usable from python code.
+
+Python wrappers for C constants (enums, defines) are created directly
+by reportmodule.c.
diff -x '*.po' -d -urpN abrt.8/src/report-python/report.c abrt.9/src/report-python/report.c
--- abrt.8/src/report-python/report.c	1970-01-01 01:00:00.000000000 +0100
+++ abrt.9/src/report-python/report.c	2011-05-24 13:40:56.945636080 +0200
@@ -0,0 +1,59 @@
+/*
+    Copyright (C) 2010  Abrt team.
+    Copyright (C) 2010  RedHat 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.,
+    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+*/
+#include <Python.h>
+
+#include "common.h"
+
+/* C: int report_problem_in_dir(const char *dirname, int flags); */
+PyObject *p_report_problem_in_dir(PyObject *pself, PyObject *args)
+{
+    const char *dirname;
+    int flags;
+    if (!PyArg_ParseTuple(args, "si", &dirname, &flags))
+    {
+        return NULL;
+    }
+    int r = report_problem_in_dir(dirname, flags);
+    return Py_BuildValue("i", r);
+}
+
+/* C: int report_problem_in_memory(problem_data_t *pd, int flags); */
+PyObject *p_report_problem_in_memory(PyObject *pself, PyObject *args)
+{
+    p_problem_data *pd;
+    int flags;
+    if (!PyArg_ParseTuple(args, "O!i", &p_problem_data_type, &pd, &flags))
+    {
+        return NULL;
+    }
+    int r = report_problem_in_memory(pd->cd, flags);
+    return Py_BuildValue("i", r);
+}
+
+/* C: int report_problem(problem_data_t *pd); */
+PyObject *p_report_problem(PyObject *pself, PyObject *args)
+{
+    p_problem_data *pd;
+    if (!PyArg_ParseTuple(args, "O!", &p_problem_data_type, &pd))
+    {
+        return NULL;
+    }
+    int r = report_problem(pd->cd);
+    return Py_BuildValue("i", r);
+}
diff -x '*.po' -d -urpN abrt.8/src/report-python/reportmodule.c abrt.9/src/report-python/reportmodule.c
--- abrt.8/src/report-python/reportmodule.c	2011-05-23 17:31:03.000000000 +0200
+++ abrt.9/src/report-python/reportmodule.c	2011-05-24 13:11:30.784378108 +0200
@@ -22,21 +22,16 @@
 
 PyObject *ReportError;
 
-
-static PyObject *p_report(PyObject *pself, PyObject *problem_data)
-{
-    p_problem_data *p_pd = (p_problem_data*)problem_data;
-    report(p_pd->cd);
-    //FIXME return status as integer object
-    Py_RETURN_NONE;
-}
-
 static PyMethodDef module_methods[] = {
     /* method_name, func, flags, doc_string */
-    { "dd_opendir"     , p_dd_opendir     , METH_VARARGS },
-    { "dd_create"      , p_dd_create      , METH_VARARGS },
-    { "delete_dump_dir", p_delete_dump_dir, METH_VARARGS },
-    { "report_problem_data"         , p_report,   METH_O},
+    /* for include/report/dump_dir.h */
+    { "dd_opendir"                , p_dd_opendir              , METH_VARARGS },
+    { "dd_create"                 , p_dd_create               , METH_VARARGS },
+    { "delete_dump_dir"           , p_delete_dump_dir         , METH_VARARGS },
+    /* for include/report/report.h */
+    { "report_problem_in_dir"     , p_report_problem_in_dir   , METH_VARARGS },
+    { "report_problem_in_memory"  , p_report_problem_in_memory, METH_VARARGS },
+    { "report_problem"            , p_report_problem          , METH_VARARGS },
     { NULL }
 };
 
@@ -75,20 +70,26 @@ init_pyreport(void)
     Py_INCREF(ReportError);
     PyModule_AddObject(m, "error", ReportError);
 
-    /* init type objects */
+    /* init type objects and constants */
+    /* for include/report/problem_data.h */
     Py_INCREF(&p_problem_data_type);
     PyModule_AddObject(m, "problem_data", (PyObject *)&p_problem_data_type);
     PyModule_AddObject(m, "CD_FLAG_BIN"          , Py_BuildValue("i", CD_FLAG_BIN          ));
     PyModule_AddObject(m, "CD_FLAG_TXT"          , Py_BuildValue("i", CD_FLAG_TXT          ));
     PyModule_AddObject(m, "CD_FLAG_ISEDITABLE"   , Py_BuildValue("i", CD_FLAG_ISEDITABLE   ));
     PyModule_AddObject(m, "CD_FLAG_ISNOTEDITABLE", Py_BuildValue("i", CD_FLAG_ISNOTEDITABLE));
-
+    /* for include/report/dump_dir.h */
     Py_INCREF(&p_dump_dir_type);
     PyModule_AddObject(m, "dump_dir", (PyObject *)&p_dump_dir_type);
     PyModule_AddObject(m, "DD_FAIL_QUIETLY_ENOENT"             , Py_BuildValue("i", DD_FAIL_QUIETLY_ENOENT             ));
     PyModule_AddObject(m, "DD_FAIL_QUIETLY_EACCES"             , Py_BuildValue("i", DD_FAIL_QUIETLY_EACCES             ));
     PyModule_AddObject(m, "DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE", Py_BuildValue("i", DD_LOAD_TEXT_RETURN_NULL_ON_FAILURE));
-
+    /* for include/report/run_event.h */
     Py_INCREF(&p_run_event_state_type);
     PyModule_AddObject(m, "run_event_state", (PyObject *)&p_run_event_state_type);
+    /* for include/report/report.h */
+    PyModule_AddObject(m, "LIBREPORT_NOWAIT"     , Py_BuildValue("i", LIBREPORT_NOWAIT     ));
+    PyModule_AddObject(m, "LIBREPORT_WAIT"       , Py_BuildValue("i", LIBREPORT_WAIT       ));
+    PyModule_AddObject(m, "LIBREPORT_ANALYZE"    , Py_BuildValue("i", LIBREPORT_ANALYZE    ));
+    PyModule_AddObject(m, "LIBREPORT_RELOAD_DATA", Py_BuildValue("i", LIBREPORT_RELOAD_DATA));
 }
