diff options
author | Martin Baulig <baulig@suse.de> | 2000-11-20 22:37:15 +0000 |
---|---|---|
committer | Martin Baulig <martin@src.gnome.org> | 2000-11-20 22:37:15 +0000 |
commit | 752d5b47d2134cd6e76465943aadcdcb0ea5e777 (patch) | |
tree | 062defcfdaa4a83273e1c0112025f725a74f4332 /backends | |
parent | c15ff3f342e7f5eb74a5f5867ebe87c89d9a5cb0 (diff) | |
download | libgtop-752d5b47d2134cd6e76465943aadcdcb0ea5e777.tar.gz |
Started with the big rewrite for GNOME 2.0:
2000-11-20 Martin Baulig <baulig@suse.de>
Started with the big rewrite for GNOME 2.0:
- split the `glibtop' structure into `glibtop_server' and
`glibtop_client' and make `glibtop_client' a GObject.
- cleanly separate the library and the backends.
This stuff currently does not compile.
* glibtop.h (glibtop_server_private, glibtop_server_info):
Removed typedefs.
(struct _glibtop, struct _glibtop_server_info): Removed.
(glibtop_global_server, glibtop_server_features): Removed.
(glibtop_server_ref, glibtop_server_unref): Removed.
* glibtop.h (glibtop_init_s): First argument is now a
`glibtop_server *'.
* include/glibtop/*.h: Removed all #defines with the
glibtop_global_server.
(glibtop_get_*_l): First argument is now a `glibtop_client *'.
(glibtop_get_*_s, glibtop_init_*_s): First argument is now a
`glibtop_server *'.
* lib/glibtop-client.c: New file.
* sysdeps/common/xmalloc.c: Moved to lib/.
* sysdeps/common/error.c: Moved to lib/.
* lib/xmalloc.c: Moved here from sysdeps/common/.
* lib/error.c: Moved here from sysdeps/common/.
* include/glibtop/backend.h
(glibtop_backend_open_func_t, glibtop_backend_close_func_t):
First argument is now a `glibtop_server *'.
(glibtop_backend_info): Added `glibtop_server *server'.
(glibtop_open_backend_l): Returns `glibtop_backend *', first
argument is `glibtop_client *' and added `GError **'.
* include/glibtop/close.h (glibtop_close_s, glibtop_close_p):
First argument is now a `glibtop_server *'.
* include/glibtop/error.h (*):
First argument is now a `glibtop_server *'.
* include/glibtop/errors.h: Switched this to use GError.
Diffstat (limited to 'backends')
-rw-r--r-- | backends/common/backend-common.c | 8 | ||||
-rw-r--r-- | backends/common/marshal.pl | 8 | ||||
-rw-r--r-- | backends/server/marshal.pl | 8 | ||||
-rw-r--r-- | backends/sysdeps/backend-sysdeps.c | 8 | ||||
-rw-r--r-- | backends/sysdeps/marshal.pl | 8 |
5 files changed, 20 insertions, 20 deletions
diff --git a/backends/common/backend-common.c b/backends/common/backend-common.c index b4f4ef97..1c616d86 100644 --- a/backends/common/backend-common.c +++ b/backends/common/backend-common.c @@ -32,10 +32,10 @@ #include <glibtop-backend-private.h> static int -_open_common (glibtop *, glibtop_backend *, u_int64_t, const char **); +_open_common (glibtop_server *, glibtop_backend *, u_int64_t, const char **); static int -_close_common (glibtop *, glibtop_backend *); +_close_common (glibtop_server *, glibtop_backend *); extern glibtop_call_vector glibtop_backend_common_call_vector; @@ -52,7 +52,7 @@ glibtop_backend_info LibGTopBackendInfo_Common = { #endif static int -_open_common (glibtop *server, glibtop_backend *backend, +_open_common (glibtop_server *server, glibtop_backend *backend, u_int64_t features, const char **backend_args) { backend->_priv = glibtop_calloc_r @@ -62,7 +62,7 @@ _open_common (glibtop *server, glibtop_backend *backend, } static int -_close_common (glibtop *server, glibtop_backend *backend) +_close_common (glibtop_server *server, glibtop_backend *backend) { return -1; } diff --git a/backends/common/marshal.pl b/backends/common/marshal.pl index 50a570d7..5ae17238 100644 --- a/backends/common/marshal.pl +++ b/backends/common/marshal.pl @@ -141,16 +141,16 @@ sub output { $func_decl = 'static '.$retval."\n"; if ($line_fields[3] eq '') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend%s)\n", $feature, $param_decl); } elsif ($line_fields[3] eq 'array') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array%s)\n", $feature, $param_decl); } elsif ($line_fields[3] =~ /^array/) { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } else { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } diff --git a/backends/server/marshal.pl b/backends/server/marshal.pl index 426bb8a8..8eff2e2b 100644 --- a/backends/server/marshal.pl +++ b/backends/server/marshal.pl @@ -261,16 +261,16 @@ sub output { $func_decl = 'static '.$retval."\n"; if ($line_fields[3] eq '') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend%s)\n", $feature, $param_decl); } elsif ($line_fields[3] eq 'array') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array%s)\n", $feature, $param_decl); } elsif ($line_fields[3] =~ /^array/) { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } else { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } diff --git a/backends/sysdeps/backend-sysdeps.c b/backends/sysdeps/backend-sysdeps.c index 69217cbb..271dbf8c 100644 --- a/backends/sysdeps/backend-sysdeps.c +++ b/backends/sysdeps/backend-sysdeps.c @@ -32,10 +32,10 @@ #include <glibtop-backend-private.h> static int -_open_sysdeps (glibtop *, glibtop_backend *, u_int64_t, const char **); +_open_sysdeps (glibtop_server *, glibtop_backend *, u_int64_t, const char **); static int -_close_sysdeps (glibtop *, glibtop_backend *); +_close_sysdeps (glibtop_server *, glibtop_backend *); extern glibtop_call_vector glibtop_backend_sysdeps_call_vector; @@ -52,7 +52,7 @@ glibtop_backend_info LibGTopBackendInfo_Sysdeps = { #endif static int -_open_sysdeps (glibtop *server, glibtop_backend *backend, +_open_sysdeps (glibtop_server *server, glibtop_backend *backend, u_int64_t features, const char **backend_args) { glibtop_init_func_t *init_fkt; @@ -77,7 +77,7 @@ _open_sysdeps (glibtop *server, glibtop_backend *backend, } static int -_close_sysdeps (glibtop *server, glibtop_backend *backend) +_close_sysdeps (glibtop_server *server, glibtop_backend *backend) { return -1; } diff --git a/backends/sysdeps/marshal.pl b/backends/sysdeps/marshal.pl index 6fd497ac..fec00daa 100644 --- a/backends/sysdeps/marshal.pl +++ b/backends/sysdeps/marshal.pl @@ -141,16 +141,16 @@ sub output { $func_decl = 'static '.$retval."\n"; if ($line_fields[3] eq '') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend%s)\n", $feature, $param_decl); } elsif ($line_fields[3] eq 'array') { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array%s)\n", $feature, $param_decl); } elsif ($line_fields[3] =~ /^array/) { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, glibtop_array *array, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } else { - $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop *server, glibtop_backend *backend, %s *buf%s)\n", + $func_decl .= sprintf ("_glibtop_get_%s_c (glibtop_server *server, glibtop_backend *backend, %s *buf%s)\n", $feature, 'glibtop_'.$feature, $param_decl); } |