projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove default port API
[babeltrace.git]
/
lib
/
graph
/
sink.c
diff --git
a/lib/graph/sink.c
b/lib/graph/sink.c
index 49bd840249a8f8434d1295af9424345589e65719..e99d111f4309fa87711fe4331a47bad66b5fd0f4 100644
(file)
--- a/
lib/graph/sink.c
+++ b/
lib/graph/sink.c
@@
-100,23
+100,22
@@
end:
return ret;
}
return ret;
}
-enum bt_component_status bt_component_sink_get_input_port_count(
- struct bt_component *component, uint64_t *count)
+int64_t bt_component_sink_get_input_port_count(struct bt_component *component)
{
{
-
enum bt_component_status status = BT_COMPONENT_STATUS_OK
;
+
int64_t ret
;
- if (!component ||
!count ||
+ if (!component ||
component->class->type != BT_COMPONENT_CLASS_TYPE_SINK) {
component->class->type != BT_COMPONENT_CLASS_TYPE_SINK) {
-
status = BT_COMPONENT_STATUS_INVALID
;
+
ret = (int64_t) -1
;
goto end;
}
goto end;
}
-
*coun
t = bt_component_get_input_port_count(component);
+
re
t = bt_component_get_input_port_count(component);
end:
end:
- return
status
;
+ return
ret
;
}
}
-struct bt_port *bt_component_sink_get_input_port(
+struct bt_port *bt_component_sink_get_input_port
_by_name
(
struct bt_component *component, const char *name)
{
struct bt_port *port = NULL;
struct bt_component *component, const char *name)
{
struct bt_port *port = NULL;
@@
-126,13
+125,13
@@
struct bt_port *bt_component_sink_get_input_port(
goto end;
}
goto end;
}
- port = bt_component_get_input_port(component, name);
+ port = bt_component_get_input_port
_by_name
(component, name);
end:
return port;
}
end:
return port;
}
-struct bt_port *bt_component_sink_get_input_port_
at
_index(
- struct bt_component *component,
in
t index)
+struct bt_port *bt_component_sink_get_input_port_
by
_index(
+ struct bt_component *component,
uint64_
t index)
{
struct bt_port *port = NULL;
{
struct bt_port *port = NULL;
@@
-141,38
+140,33
@@
struct bt_port *bt_component_sink_get_input_port_at_index(
goto end;
}
goto end;
}
- port = bt_component_get_input_port_
at
_index(component, index);
+ port = bt_component_get_input_port_
by
_index(component, index);
end:
return port;
}
end:
return port;
}
-struct bt_port *bt_component_sink_get_default_input_port(
- struct bt_component *component)
-{
- return bt_component_sink_get_input_port(component,
- DEFAULT_INPUT_PORT_NAME);
-}
-
struct bt_private_port *
struct bt_private_port *
-bt_private_component_sink_get_input_private_port_
at
_index(
- struct bt_private_component *private_component,
in
t index)
+bt_private_component_sink_get_input_private_port_
by
_index(
+ struct bt_private_component *private_component,
uint64_
t index)
{
return bt_private_port_from_port(
{
return bt_private_port_from_port(
- bt_component_sink_get_input_port_
at
_index(
+ bt_component_sink_get_input_port_
by
_index(
bt_component_from_private(private_component), index));
}
bt_component_from_private(private_component), index));
}
-struct bt_private_port *bt_private_component_sink_get_default_input_private_port(
- struct bt_private_component *private_component)
+struct bt_private_port *
+bt_private_component_sink_get_input_private_port_by_name(
+ struct bt_private_component *private_component,
+ const char *name)
{
return bt_private_port_from_port(
{
return bt_private_port_from_port(
- bt_component_sink_get_
default_input_port
(
- bt_component_from_private(private_component)));
+ bt_component_sink_get_
input_port_by_name
(
+ bt_component_from_private(private_component)
, name
));
}
struct bt_private_port *bt_private_component_sink_add_input_private_port(
struct bt_private_component *private_component,
}
struct bt_private_port *bt_private_component_sink_add_input_private_port(
struct bt_private_component *private_component,
- const char *name)
+ const char *name
, void *user_data
)
{
struct bt_port *port = NULL;
struct bt_component *component =
{
struct bt_port *port = NULL;
struct bt_component *component =
@@
-183,7
+177,7
@@
struct bt_private_port *bt_private_component_sink_add_input_private_port(
goto end;
}
goto end;
}
- port = bt_component_add_input_port(component, name);
+ port = bt_component_add_input_port(component, name
, user_data
);
end:
return bt_private_port_from_port(port);
}
end:
return bt_private_port_from_port(port);
}
This page took
0.026151 seconds
and
4
git commands to generate.