Moved the typedef to backend.h.

2000-11-26  Martin Baulig  <martin@home-of-linux.org>

	* include/glibtop/call-vector.h (glibtop_call_vector): Moved
	the typedef to backend.h.

	* include/glibtop/backend.h (glibtop_open_backend_l): Renamed
	to glibtop_open_backend(), removed the `glibtop_client *'
	argument and made the `GError *' argument non-optional.

	* include/glibtop/glibtop-client.h
	(glibtop_client_add_backend, glibtop_client_remove_backend): New
	functions to add/remove a glibtop_backend to a glibtop_client.
	(glibtop_client_open_backend): New convenient function; calls
	glibtop_open_backend() and glibtop_client_add_backend().
This commit is contained in:
Martin Baulig
2000-11-26 18:07:11 +00:00
committed by Martin Baulig
parent 6e4f80b8e2
commit dfd678599f
18 changed files with 129 additions and 93 deletions

View File

@@ -252,3 +252,43 @@ glibtop_client_propagate_warning (glibtop_client *client, GError *error)
g_value_unset (params + 1);
g_value_unset (params + 0);
}
glibtop_backend *
glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
u_int64_t features, const char **backend_args)
{
glibtop_backend *backend;
GError *error = NULL;
g_return_val_if_fail (GLIBTOP_IS_CLIENT (client), NULL);
backend = glibtop_open_backend (backend_name, features, backend_args,
&error);
if (!backend) {
glibtop_client_propagate_error (client, error);
g_error_free (error);
return NULL;
}
glibtop_client_add_backend (client, backend);
return backend;
}
void
glibtop_client_add_backend (glibtop_client *client,
glibtop_backend *backend)
{
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
g_return_if_fail (backend != NULL);
}
void
glibtop_client_remove_backend (glibtop_client *client,
glibtop_backend *backend)
{
g_return_if_fail (GLIBTOP_IS_CLIENT (client));
g_return_if_fail (backend != NULL);
}