home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Encyclopedia 96-1
/
novell-nsepro-1996-1-cd2.iso
/
download
/
netware
/
xcpp1.exe
/
SRC
/
STATS.H
< prev
next >
Wrap
C/C++ Source or Header
|
1995-10-12
|
3KB
|
109 lines
/**************************************************************************
** File: stats.h
**
** Desc: Prototypes and definitions for StatsThread class.
**
** This file contains the class prototype and definitions to use
** the StatsThread class.
**
**
** DISCLAIMER
**
** Novell, Inc. makes no representations or warranties with respect to
** any NetWare software, and specifically disclaims any express or
** implied warranties of merchantability, title, or fitness for a
** particular purpose.
**
** Distribution of any NetWare software is forbidden without the
** express written consent of Novell, Inc. Further, Novell reserves
** the right to discontinue distribution of any NetWare software.
**
** Novell is not responsible for lost profits or revenue, loss of use
** of the software, loss of data, costs of re-creating lost data, the
** cost of any substitute equipment or program, or claims by any party
** other than you. Novell strongly recommends a backup be made before
** any software is installed. Technical support for this software
** may be provided at the discretion of Novell.
**
**
** Programmers:
**
** Ini Who Firm
** ---------------------------------------------------------------------
** DWH Dirk W. Howard Novell Developer Support
**
**
** History:
**
** When Who What
** ---------------------------------------------------------------------
** 9-15-1995 DWH First code.
**
*/
/**************************************************************************
** Prototypes and definitions
*/
#include <nwtypes.h>
#include <nwsemaph.h>
/*------------------------------------------------
** Macro definitions
*/
#define TITLE_SIZE 20
#define BAR_MARGIN 22
#define MAX_BAR_SIZE (78 - BAR_MARGIN)
#define PERCENT_THREAD 1
#define STATIC_VALUE_THREAD 2
#define DYNAMIC_VALUE_THREAD 4
/*------------------------------------------------
** Class definitions
*/
class StatsThread
{
protected:
int myLine;
char myTitle[TITLE_SIZE];
int myThreadID;
char shutdown;
char threadType;
unsigned myInterval;
long myLowWater;
long myHighWater;
long (* myPercentFunc)(void);
long (* myValueFunc)(void);
long (* myLowWaterFunc)(void);
long (* myHighWaterFunc)(void);
static void SubThread( void *arg );
void DrawPercentStatsBar( long currentPercent );
void DrawValueStatsBar( long currentValue, long lowWater,
long highWater );
StatsThread(){};
public:
StatsThread(
int line,
char *title,
unsigned interval,
long (* percentFunc)(void) );
StatsThread(
int line,
char *title,
unsigned interval,
long (* valFunc)(void),
long lowWater,
long highWater );
StatsThread(
int line,
char *title,
unsigned interval,
long (* valFunc)(void),
long (* lowWaterFunc)(void),
long (* highWaterFunc)(void) );
~StatsThread();
};