1 /* Copyright (C) 1998-99 Martin Baulig
2    This file is part of LibGTop 1.0.
3 
4    Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
5 
6    LibGTop is free software; you can redistribute it and/or modify it
7    under the terms of the GNU General Public License as published by
8    the Free Software Foundation; either version 2 of the License,
9    or (at your option) any later version.
10 
11    LibGTop is distributed in the hope that it will be useful, but WITHOUT
12    ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13    FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14    for more details.
15 
16    You should have received a copy of the GNU General Public License
17    along with LibGTop; see the file COPYING. If not, write to the
18    Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19    Boston, MA 02110-1301, USA.
20 */
21 
22 #ifndef __GLIBTOP_SYSINFO_H__
23 #define __GLIBTOP_SYSINFO_H__
24 
25 #include <glibtop.h>
26 #include <glibtop/cpu.h>
27 #include <glibtop/global.h>
28 
29 #include <glib.h>
30 
31 G_BEGIN_DECLS
32 
33 #define GLIBTOP_SYSINFO_NCPU		0
34 #define GLIBTOP_SYSINFO_CPUINFO		1
35 
36 #define GLIBTOP_MAX_SYSINFO		2
37 
38 typedef struct _glibtop_sysinfo	glibtop_sysinfo;
39 
40 typedef struct _glibtop_entry	glibtop_entry;
41 
42 struct _glibtop_entry
43 {
44 	GPtrArray	*labels;
45 	GHashTable	*values; /* key -> description */
46 	GHashTable	*descriptions; /* unused */
47 };
48 
49 struct _glibtop_sysinfo
50 {
51 	guint64	flags;
52 	guint64 ncpu;
53 	glibtop_entry cpuinfo [GLIBTOP_NCPU];
54 };
55 
56 #define glibtop_get_sysinfo_r	glibtop_get_sysinfo_s
57 
58 const glibtop_sysinfo *glibtop_get_sysinfo_s (glibtop *server);
59 const glibtop_sysinfo *glibtop_get_sysinfo (void);
60 
61 G_END_DECLS
62 
63 #endif
64