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
+5 -6
View File
@@ -29,7 +29,7 @@
#include <glibtop.h>
#include <glibtop/global.h>
#include <glibtop/glibtop-client.h>
#include <glibtop/glibtop-server.h>
BEGIN_LIBGTOP_DECLS
@@ -38,9 +38,9 @@ typedef struct _glibtop_backend_entry glibtop_backend_entry;
typedef struct _glibtop_backend_module glibtop_backend_module;
typedef struct _glibtop_backend_private glibtop_backend_private;
typedef struct _glibtop_backend glibtop_backend;
typedef struct _glibtop_call_vector glibtop_call_vector;
#include <glibtop/call-vector.h>
typedef struct _glibtop_backend glibtop_backend;
typedef int (*glibtop_backend_open_func_t) (glibtop_server *, glibtop_backend *,
u_int64_t, const char **);
@@ -111,9 +111,8 @@ void
glibtop_init_backends (void);
glibtop_backend *
glibtop_open_backend_l (glibtop_client *client, const char *backend_name,
u_int64_t features, const char **backend_args,
GError **opt_error);
glibtop_open_backend (const char *backend_name, u_int64_t features,
const char **backend_args, GError **error);
END_LIBGTOP_DECLS
+2 -2
View File
@@ -31,9 +31,9 @@
#include <glibtop.h>
#include <glibtop/union.h>
BEGIN_LIBGTOP_DECLS
#include <glibtop/backend.h>
typedef struct _glibtop_call_vector glibtop_call_vector;
BEGIN_LIBGTOP_DECLS
struct _glibtop_call_vector
{
+14
View File
@@ -29,6 +29,8 @@
#include <glibtop.h>
#include <gobject/gobject.h>
#include <glibtop/backend.h>
BEGIN_LIBGTOP_DECLS
#define GLIBTOP_TYPE_CLIENT (glibtop_client_get_type ())
@@ -77,6 +79,18 @@ glibtop_client_propagate_error (glibtop_client *client, GError *error);
void
glibtop_client_propagate_warning (glibtop_client *client, GError *error);
glibtop_backend *
glibtop_client_open_backend (glibtop_client *client, const char *backend_name,
u_int64_t features, const char **backend_args);
void
glibtop_client_add_backend (glibtop_client *client,
glibtop_backend *backend);
void
glibtop_client_remove_backend (glibtop_client *client,
glibtop_backend *backend);
END_LIBGTOP_DECLS
#endif
-2
View File
@@ -94,8 +94,6 @@ struct _glibtop_sysdeps
ppp; /* glibtop_ppp */
};
void glibtop_get_sysdeps_r (glibtop *server, glibtop_sysdeps *buf);
#ifdef GLIBTOP_NAMES
/* You need to link with -lgtop_names to get this stuff here. */