X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Ftrimmer%2Fiterator.c;h=614748a2f76349f869afbe1602134f8e2ff93ce2;hb=d3eb6e8fd59ebff26cb99a70d375e542d49575a3;hp=d7633a9c395148a63838411b0a7faaf0f82e8eec;hpb=857f4dce173686a97f1510e8fce142137e15432d;p=babeltrace.git diff --git a/plugins/trimmer/iterator.c b/plugins/trimmer/iterator.c index d7633a9c..614748a2 100644 --- a/plugins/trimmer/iterator.c +++ b/plugins/trimmer/iterator.c @@ -43,7 +43,7 @@ #include #include -static +BT_HIDDEN void trimmer_iterator_destroy(struct bt_notification_iterator *it) { struct trimmer_iterator *it_data; @@ -59,15 +59,17 @@ void trimmer_iterator_destroy(struct bt_notification_iterator *it) } BT_HIDDEN -enum bt_component_status trimmer_iterator_init(struct bt_component *component, +enum bt_notification_iterator_status trimmer_iterator_init( + struct bt_component *component, struct bt_notification_iterator *iterator) { - enum bt_component_status ret = BT_COMPONENT_STATUS_OK; + enum bt_notification_iterator_status ret = + BT_NOTIFICATION_ITERATOR_STATUS_OK; enum bt_notification_iterator_status it_ret; struct trimmer_iterator *it_data = g_new0(struct trimmer_iterator, 1); if (!it_data) { - ret = BT_COMPONENT_STATUS_NOMEM; + ret = BT_NOTIFICATION_ITERATOR_STATUS_NOMEM; goto end; } @@ -76,34 +78,6 @@ enum bt_component_status trimmer_iterator_init(struct bt_component *component, if (it_ret) { goto end; } - - it_ret = bt_notification_iterator_set_destroy_cb(iterator, - trimmer_iterator_destroy); - if (it_ret) { - ret = BT_COMPONENT_STATUS_ERROR; - goto end; - } - - it_ret = bt_notification_iterator_set_next_cb(iterator, - trimmer_iterator_next); - if (it_ret) { - ret = BT_COMPONENT_STATUS_ERROR; - goto end; - } - - it_ret = bt_notification_iterator_set_get_cb(iterator, - trimmer_iterator_get); - if (it_ret) { - ret = BT_COMPONENT_STATUS_ERROR; - goto end; - } - - it_ret = bt_notification_iterator_set_seek_time_cb(iterator, - trimmer_iterator_seek_time); - if (it_ret) { - ret = BT_COMPONENT_STATUS_ERROR; - goto end; - } end: return ret; }