Blame glibtop.h

Packit Service 407539
/* Copyright (C) 1998-99 Martin Baulig
Packit Service 407539
   This file is part of LibGTop 1.0.
Packit Service 407539
Packit Service 407539
   Contributed by Martin Baulig <martin@home-of-linux.org>, April 1998.
Packit Service 407539
Packit Service 407539
   LibGTop is free software; you can redistribute it and/or modify it
Packit Service 407539
   under the terms of the GNU General Public License as published by
Packit Service 407539
   the Free Software Foundation; either version 2 of the License,
Packit Service 407539
   or (at your option) any later version.
Packit Service 407539
Packit Service 407539
   LibGTop is distributed in the hope that it will be useful, but WITHOUT
Packit Service 407539
   ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
Packit Service 407539
   FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
Packit Service 407539
   for more details.
Packit Service 407539
Packit Service 407539
   You should have received a copy of the GNU General Public License
Packit Service 407539
   along with LibGTop; see the file COPYING. If not, write to the
Packit Service 407539
   Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
Packit Service 407539
   Boston, MA 02110-1301, USA.
Packit Service 407539
*/
Packit Service 407539
Packit Service 407539
#ifndef __GLIBTOP_H__
Packit Service 407539
#define __GLIBTOP_H__
Packit Service 407539
Packit Service 407539
/* for pid_t, uid_t, gid_t */
Packit Service 407539
#include <sys/types.h>
Packit Service 407539
Packit Service 407539
Packit Service 407539
#include <glib.h>
Packit Service 407539
#include <glib-object.h>
Packit Service 407539
Packit Service 407539
G_BEGIN_DECLS
Packit Service 407539
Packit Service 407539
typedef struct _glibtop		glibtop;
Packit Service 407539
typedef struct _glibtop_machine	glibtop_machine;
Packit Service 407539
Packit Service 407539
/**
Packit Service 407539
 *  LIBGTOP_CHECK_VERSION
Packit Service 407539
 *  @major: Major version number
Packit Service 407539
 *  @minor: Minor version number
Packit Service 407539
 *  @micro: Micro version number
Packit Service 407539
 *
Packit Service 407539
 *  Checks if the version given is compatable with this version of the
Packit Service 407539
 *  library.  For example, LIBGTOP_CHECK_VERSION(1.2.3) would return TRUE
Packit Service 407539
 *  if the version is 1.2.5, and FALSE if 1.1.0.  This can be used in
Packit Service 407539
 *  build tests.
Packit Service 407539
 *
Packit Service 407539
 **/
Packit Service 407539
Packit Service 407539
#include <libgtopconfig.h>
Packit Service 407539
Packit Service 407539
#define LIBGTOP_CHECK_VERSION(major, minor, micro)    \
Packit Service 407539
(LIBGTOP_MAJOR_VERSION > (major) || \
Packit Service 407539
(LIBGTOP_MAJOR_VERSION == (major) && LIBGTOP_MINOR_VERSION > (minor)) || \
Packit Service 407539
(LIBGTOP_MAJOR_VERSION == (major) && LIBGTOP_MINOR_VERSION == (minor) && \
Packit Service 407539
LIBGTOP_MICRO_VERSION >= (micro)))
Packit Service 407539
Packit Service 407539
Packit Service 407539
#include <glibtop/global.h>
Packit Service 407539
Packit Service 407539
#include <glibtop_server.h>
Packit Service 407539
Packit Service 407539
#ifndef GLIBTOP_MOUNTENTRY_LEN
Packit Service 407539
#define GLIBTOP_MOUNTENTRY_LEN	79
Packit Service 407539
#endif
Packit Service 407539
Packit Service 407539
Packit Service 407539
#include <glibtop/sysdeps.h>
Packit Service 407539
Packit Service 407539
#include <glibtop/close.h>
Packit Service 407539
Packit Service 407539
Packit Service 407539
struct _glibtop
Packit Service 407539
{
Packit Service 407539
	unsigned flags;
Packit Service 407539
	unsigned method;		/* Server Method */
Packit Service 407539
	unsigned error_method;		/* Error Method */
Packit Service 407539
	int input [2];			/* Pipe client <- server */
Packit Service 407539
	int output [2];			/* Pipe client -> server */
Packit Service 407539
	int socket;			/* Accepted connection of a socket */
Packit Service 407539
	int ncpu;			/* Number of CPUs, zero if single-processor */
Packit Service 407539
	int real_ncpu;			/* Real number of CPUs. Only ncpu are monitored */
Packit Service 407539
	unsigned long os_version_code;	/* Version code of the operating system */
Packit Service 407539
	const char *name;		/* Program name for error messages */
Packit Service 407539
	const char *server_command;	/* Command used to invoke server */
Packit Service 407539
	const char *server_host;	/* Host the server should run on */
Packit Service 407539
	const char *server_user;	/* Name of the user on the target host */
Packit Service 407539
	const char *server_rsh;		/* Command used to connect to the target host */
Packit Service 407539
	unsigned long features;		/* Server is required for this features */
Packit Service 407539
	unsigned long server_port;	/* Port on which daemon is listening */
Packit Service 407539
	glibtop_sysdeps sysdeps;	/* Detailed feature list */
Packit Service 407539
	glibtop_sysdeps required;	/* Required feature list */
Packit Service 407539
	pid_t pid;			/* PID of the server */
Packit Service 407539
Packit Service 407539
	uid_t uid;
Packit Service 407539
	uid_t euid;
Packit Service 407539
	gid_t gid;
Packit Service 407539
	gid_t egid;
Packit Service 407539
Packit Service 407539
	glibtop_machine *machine;	/* Machine dependent data */
Packit Service 407539
};
Packit Service 407539
Packit Service 407539
extern glibtop *glibtop_global_server;
Packit Service 407539
Packit Service 407539
extern const unsigned long glibtop_server_features;
Packit Service 407539
Packit Service 407539
/**
Packit Service 407539
 * glibtop_init:
Packit Service 407539
 *
Packit Service 407539
 * Returns: (transfer none):
Packit Service 407539
 */
Packit Service 407539
glibtop *
Packit Service 407539
glibtop_init (void);
Packit Service 407539
Packit Service 407539
Packit Service 407539
/**
Packit Service 407539
 * glibtop_init_r:
Packit Service 407539
 * @server_ptr: (out):
Packit Service 407539
 * @features:
Packit Service 407539
 * @flags:
Packit Service 407539
 *
Packit Service 407539
 * Returns: (transfer none):
Packit Service 407539
 */
Packit Service 407539
glibtop *
Packit Service 407539
glibtop_init_r (glibtop **server_ptr,
Packit Service 407539
		unsigned long features,
Packit Service 407539
		unsigned flags);
Packit Service 407539
Packit Service 407539
Packit Service 407539
/**
Packit Service 407539
 * glibtop_init_s:
Packit Service 407539
 * @server_ptr: (out):
Packit Service 407539
 * @features:
Packit Service 407539
 * @flags:
Packit Service 407539
 *
Packit Service 407539
 * Returns: (transfer none):
Packit Service 407539
 */
Packit Service 407539
glibtop *
Packit Service 407539
glibtop_init_s (glibtop **server_ptr,
Packit Service 407539
		unsigned long features,
Packit Service 407539
		unsigned flags);
Packit Service 407539
Packit Service 407539
GType     glibtop_get_type (void) G_GNUC_CONST;
Packit Service 407539
Packit Service 407539
G_END_DECLS
Packit Service 407539
Packit Service 407539
#endif