home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / AutoPC / apcsdk10.exe / data1.cab / Emulation_Include_Files / viomdbase.h < prev    next >
Encoding:
C/C++ Source or Header  |  1999-05-13  |  3.9 KB  |  99 lines

  1. /*******************************************************************************
  2.  *
  3.  *  File:
  4.  *    VIOMDBASE.H
  5.  *
  6.  *  Description:
  7.  *    Base interface and type declarations for the VIO mini-drivers
  8.  *
  9.  *  Original Author:
  10.  *    Paul Horenberger
  11.  *
  12.  *  Modification History:
  13.  *  $Log:   H:/AUTOPC/HOSTSW/PVCSARCH/INCLUDE/viomdbase.h_v  $
  14.  * 
  15.  *    Rev 1.2   May 28 1998 14:50:12   PHorenberger
  16.  * Removed the IVIO_BufferMgr interface, and added the 
  17.  * IVIO_MiniDriverManager and the IVIO_MiniDriverData interfaces
  18.  * 
  19.  *    Rev 1.1   Oct 08 1997 19:20:28   PHorenberger
  20.  * Added in the IVIO_MiniDrvBufferMgr interface
  21.  * 
  22.  * 
  23.  *    Rev 1.0   Sep 11 1997 15:54:16   PAULH
  24.  * Initial revision.
  25.  *
  26.  *  Copyright (C) 1997 Vetronix Corp.
  27.  ******************************************************************************/
  28. #if (!defined __VIOMDBASE_H)
  29. #define __VIOMDBASE_H 1
  30.  
  31. //------------------------------------------------------------------------------
  32. //
  33. // Declarations
  34. //
  35. //------------------------------------------------------------------------------
  36. DECLARE_INTERFACE(IVIO_MiniDriverMgr);
  37. DECLARE_INTERFACE(IVIO_MiniDriver);
  38. DECLARE_INTERFACE(IVIO_MiniDriverData);
  39. //------------------------------------------------------------------------------
  40. //
  41. // Interfaces
  42. //
  43. //------------------------------------------------------------------------------
  44.  
  45. // Minidriver manager interface
  46. // This interface is used to allow the mindrivers to be initialized when the API 
  47. // is started up.  
  48. DECLARE_INTERFACE_(IVIO_MiniDriverMgr, IUnknown)
  49. {
  50.   // Start up the minidriver manager.
  51.   STDMETHOD(StartManager)(PVOID pReserved) PURE;
  52. };
  53.  
  54. // Base Mini-driver class. This is used to translate between the values that 
  55. // are expected by a given IVIO_Device subclass and the raw information returned
  56. // by the Vehicle Interface Hardware's device driver.  This is implemented by
  57. // the vendor of the vehicle interface hardware for each device subclass that is 
  58. // implemented in the API.
  59. DECLARE_INTERFACE_(IVIO_MiniDriver, IUnknown)
  60. {
  61.   // Get data - corresponds to as IVIO_Device->GetData()
  62.   STDMETHOD(GetData) (THIS_ IVIO_MiniDriverData *pInputData, 
  63.                       IVIO_MiniDriverData **ppData, 
  64.                       DWORD dwTimeout) PURE ;
  65.   // Set data - same as IVIO_Device->SetData()
  66.   STDMETHOD(SetData) (THIS_ IVIO_MiniDriverData *pInputData, 
  67.                       DWORD dwTimeout) PURE;
  68.   // Turn on/off notification by the minidriver
  69.   STDMETHOD(SetNotify) (THIS_ HANDLE hNotifyEvent, 
  70.                         IVIO_MiniDriverData *pInputData,
  71.                         IVIO_MiniDriverData **ppReturnedData, DWORD dwFreq) PURE;
  72.   // Generic IO control - for accessing mini-driver implementation specific functionality, can be NOP
  73.   STDMETHOD(IOControl) (THIS_ DWORD dwCommandId, 
  74.                           const PVOID pCommandData, DWORD cb, 
  75.                           PVOID pReply, DWORD dwOutputSize, 
  76.                           DWORD *pReplySize) PURE;
  77. };
  78.  
  79. //
  80. // Minidriver data interface.  This is what is used to communicate data between
  81. // the minidrivers and the API objects.  A COM interface is used so that a user
  82. // of the interface does not have to explicitly free the resources used by the
  83. // object.  The resources will go be freed when the last reference is released,
  84. // either by the creator of the object (generally the minidriver), or by the 
  85. // consumer (generally the API object).
  86. // WARNING: This interface is intended for use to move data from one layer to 
  87. // another, copied, and then released.  No assumptions should be made about the 
  88. // address of the data buffer remaining valid after the reference is released.
  89. //
  90. DECLARE_INTERFACE_(IVIO_MiniDriverData, IUnknown)
  91. {
  92.   // Get the address of the data buffer itself
  93.   STDMETHOD(get_DataBuffer) (THIS_ PVOID *ppv) PURE;
  94.   // Get the size of the buffer 
  95.   STDMETHOD(get_DataBufferSize) (THIS_ DWORD *pcbDataBuffer) PURE;
  96. };
  97.  
  98. #endif // inclue sentry
  99.