diff --git a/ChangeLog b/ChangeLog index 483c6eba..dabae08b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2000-11-26 Martin Baulig + * include/glibtop/glibtop-backend.h + (glibtop_backend_get_call_vector): New function. + + * lib/glibtop-client-private.h: New file. + * lib/glibtop-client.h (struct _glibtop_client_private): Moved + to glibtop-client-private.h. + * include/glibtop/glibtop-client.h (glibtop_client_open_backend): Changed return value to void. diff --git a/include/glibtop/glibtop-backend.h b/include/glibtop/glibtop-backend.h index 13632d68..4af895a9 100644 --- a/include/glibtop/glibtop-backend.h +++ b/include/glibtop/glibtop-backend.h @@ -46,6 +46,8 @@ typedef struct _glibtop_backend glibtop_backend; typedef struct _glibtop_backend_class glibtop_backend_class; typedef struct _glibtop_backend_private glibtop_backend_private; +#include + struct _glibtop_backend { GObject object; @@ -66,6 +68,9 @@ glibtop_backend * glibtop_backend_open (const char *backend_name, u_int64_t features, const char **backend_args, GError **error); +glibtop_call_vector * +glibtop_backend_get_call_vector (glibtop_backend *backend); + END_LIBGTOP_DECLS #endif diff --git a/lib/Makefile.am b/lib/Makefile.am index 32c99c2c..5bcc0b40 100644 --- a/lib/Makefile.am +++ b/lib/Makefile.am @@ -10,7 +10,8 @@ noinst_LTLIBRARIES = libgtop_server.la libgtop_la_SOURCES = errors.c glibtop-backend-info.c \ glibtop-client.c glibtop-server.c \ - glibtop-backend.c sysdeps-init.c + glibtop-backend.c sysdeps-init.c \ + glibtop-client-private.h libgtop_server_la_SOURCES = error.c xmalloc.c diff --git a/lib/glibtop-backend.c b/lib/glibtop-backend.c index d4564bd4..cbea5a4f 100644 --- a/lib/glibtop-backend.c +++ b/lib/glibtop-backend.c @@ -230,3 +230,13 @@ glibtop_backend_open (const char *backend_name, u_int64_t features, return backend; } + +glibtop_call_vector * +glibtop_backend_get_call_vector (glibtop_backend *backend) +{ + g_return_val_if_fail (GLIBTOP_IS_BACKEND (backend), NULL); + + g_assert (backend->_priv->info != NULL); + + return backend->_priv->info->call_vector; +} diff --git a/lib/glibtop-client-private.h b/lib/glibtop-client-private.h new file mode 100644 index 00000000..244cabdf --- /dev/null +++ b/lib/glibtop-client-private.h @@ -0,0 +1,34 @@ +/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */ + +/* $Id$ */ + +/* Copyright (C) 1998-99 Martin Baulig + This file is part of LibGTop 2.0. + + Contributed by Martin Baulig , April 1998. + + LibGTop is free software; you can redistribute it and/or modify it + under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, + or (at your option) any later version. + + LibGTop is distributed in the hope that it will be useful, but WITHOUT + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License + for more details. + + You should have received a copy of the GNU General Public License + along with LibGTop; see the file COPYING. If not, write to the + Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. +*/ + +#ifndef __GLIBTOP_CLIENT_PRIVATE_H__ +#define __GLIBTOP_CLIENT_PRIVATE_H__ + +struct _glibtop_client_private +{ + GSList *backend_list; +}; + +#endif diff --git a/lib/glibtop-client.c b/lib/glibtop-client.c index 5aadb44d..47406374 100644 --- a/lib/glibtop-client.c +++ b/lib/glibtop-client.c @@ -34,13 +34,7 @@ static void glibtop_client_finalize (GObject *object); static gpointer parent_class = NULL; - -/* Internal data */ - -struct _glibtop_client_private -{ - GSList *backend_list; -}; +#include enum { GLIBTOP_CLIENT_SIGNAL_ERROR,