X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bindings%2Fpython%2Fbt2%2Fnative_btcomponentclass.i;h=53652b9acb7510b46e888635589f9eec56899f21;hb=40910fbb32dca4f294744894d04cda81d8eea104;hp=a7df3a7a3e1ba5394339ad477962b87bdb0fe0e7;hpb=a889b89f1be9211d3de2d1e50a26c366e772f3b3;p=babeltrace.git diff --git a/bindings/python/bt2/native_btcomponentclass.i b/bindings/python/bt2/native_btcomponentclass.i index a7df3a7a..53652b9a 100644 --- a/bindings/python/bt2/native_btcomponentclass.i +++ b/bindings/python/bt2/native_btcomponentclass.i @@ -49,6 +49,8 @@ const char *bt_component_class_get_name( struct bt_component_class *component_class); const char *bt_component_class_get_description( struct bt_component_class *component_class); +const char *bt_component_class_get_help( + struct bt_component_class *component_class); enum bt_component_class_type bt_component_class_get_type( struct bt_component_class *component_class); @@ -884,7 +886,7 @@ end: /* Component class creation functions (called from Python module) */ static int bt_py3_cc_set_optional_attrs_methods(struct bt_component_class *cc, - const char *description) + const char *description, const char *help) { int ret = 0; @@ -895,6 +897,13 @@ static int bt_py3_cc_set_optional_attrs_methods(struct bt_component_class *cc, } } + if (help) { + ret = bt_component_class_set_help(cc, help); + if (ret) { + goto end; + } + } + ret = bt_component_class_set_init_method(cc, bt_py3_cc_init); if (ret) { goto end; @@ -943,7 +952,7 @@ end: static struct bt_component_class *bt_py3_component_class_source_create( PyObject *py_cls, const char *name, const char *description, - bool has_seek_time) + const char *help, bool has_seek_time) { struct bt_component_class *cc; int ret; @@ -956,7 +965,7 @@ static struct bt_component_class *bt_py3_component_class_source_create( goto end; } - ret = bt_py3_cc_set_optional_attrs_methods(cc, description); + ret = bt_py3_cc_set_optional_attrs_methods(cc, description, help); if (ret) { BT_PUT(cc); goto end; @@ -980,7 +989,7 @@ end: static struct bt_component_class *bt_py3_component_class_filter_create( PyObject *py_cls, const char *name, const char *description, - bool has_seek_time) + const char *help, bool has_seek_time) { struct bt_component_class *cc; int ret; @@ -993,7 +1002,7 @@ static struct bt_component_class *bt_py3_component_class_filter_create( goto end; } - ret = bt_py3_cc_set_optional_attrs_methods(cc, description); + ret = bt_py3_cc_set_optional_attrs_methods(cc, description, help); if (ret) { BT_PUT(cc); goto end; @@ -1023,7 +1032,8 @@ end: } static struct bt_component_class *bt_py3_component_class_sink_create( - PyObject *py_cls, const char *name, const char *description) + PyObject *py_cls, const char *name, const char *description, + const char *help) { struct bt_component_class *cc; int ret; @@ -1034,7 +1044,7 @@ static struct bt_component_class *bt_py3_component_class_sink_create( goto end; } - ret = bt_py3_cc_set_optional_attrs_methods(cc, description); + ret = bt_py3_cc_set_optional_attrs_methods(cc, description, help); if (ret) { BT_PUT(cc); goto end; @@ -1107,12 +1117,13 @@ static void bt_py3_component_on_del(PyObject *py_comp) struct bt_component_class *bt_py3_component_class_source_create( PyObject *py_cls, const char *name, const char *description, - bool has_seek_time); + const char *help, bool has_seek_time); struct bt_component_class *bt_py3_component_class_filter_create( PyObject *py_cls, const char *name, const char *description, - bool has_seek_time); + const char *help, bool has_seek_time); struct bt_component_class *bt_py3_component_class_sink_create( - PyObject *py_cls, const char *name, const char *description); + PyObject *py_cls, const char *name, const char *description, + const char *help); void bt_py3_component_create( struct bt_component_class *comp_class, PyObject *py_self, const char *name);