1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
|
/****************************************************************************
HalDevice.h
Description: Interface for the HalDevice class.
Created: David A. Hoatson, September 2000
Copyright 2000 Lynx Studio Technology, Inc.
This software contains the valuable TRADE SECRETS and CONFIDENTIAL INFORMATION
of Lynx Studio Technology, Inc. The software is protected under copyright
laws as an unpublished work of Lynx Studio Technology, Inc. Notice is
for informational purposes only and does not imply publication. The user
of this software may make copies of the software for use with products
manufactured by Lynx Studio Technology, Inc. or under license from
Lynx Studio Technology, Inc. and for no other use.
THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
PURPOSE.
Environment:
4 spaces per tab
Revision History
When Who Description
--------- --- ------------------------------------------------------------
****************************************************************************/
#ifndef _HALDEVICE_H
#define _HALDEVICE_H
#include "Hal.h"
enum
{
MODE_STOP = 0,
MODE_RUNNING,
NUM_MODES
};
// This is the abstract class CHalDevice
class CHalDevice
{
public:
CHalDevice ()
{
}
~CHalDevice ()
{
}
USHORT Open (PHALADAPTER pHalAdapter, ULONG ulDeviceNumber);
USHORT Close ();
ULONG GetDeviceNumber ()
{
return (m_ulDeviceNumber);
}
BOOLEAN IsRunning ()
{
return (m_usMode == MODE_RUNNING);
}
USHORT Start ();
USHORT Stop ();
USHORT RegisterCallback (PHALCALLBACK pCallback, PVOID pContext1,
PVOID pContext2);
USHORT Service (ULONG ulReason);
USHORT Acquire (void);
USHORT Release (void);
protected:
// allow these member variables to be accessed by child classes
PHALADAPTER m_pHalAdapter;
ULONG m_ulDeviceNumber;
USHORT m_usMode;
BOOLEAN m_bInUse;
PHALCALLBACK m_pCallback;
PVOID m_pContext1;
PVOID m_pContext2;
private:
};
#endif // _HALDEVICE_H
|