home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / network.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  2KB  |  88 lines

  1. /***********************************************************************
  2. **      N E T W O R K . H                                                *
  3. **                                                                     *
  4. ************************************************************************
  5. ** Copyright (C) 1996 by Microsoft Corporation                         *
  6. **                 All Rights Reserved                                 *
  7. ************************************************************************/
  8. /*
  9.         NETWORK.H
  10.  
  11.         Network record object class definitions for Microsoft Guide
  12. */
  13.  
  14.  
  15. #ifndef _NETWORK_H_
  16. #define _NETWORK_H_
  17.  
  18.  
  19. /*
  20.  
  21. Network objects are constructed from database records of the Network table.
  22.  
  23. The CNetworkRecordset class is used to select and create Network objects
  24. from the Network table via functions in the CDatabaseRecordset parent class.
  25.  
  26. */
  27.  
  28.  
  29. #include "dbsets.h"
  30.  
  31.  
  32. class COMMMSTVEXPORT CNetworkRecordset : public CDatabaseRecordset
  33. {
  34. // This class provides Channel recordset manipulation via parent functions
  35.  
  36. virtual CString GetTableName( VOID);
  37.  
  38. virtual BOOL    SetRecordsetObject( VOID* cRecordsetObject);
  39.  
  40. public:
  41. virtual VOID*   GetRecordsetObject( VOID);
  42. virtual BOOLEAN Seek(LPCTSTR lpszComparison, CObject &coo);
  43. virtual BOOLEAN Seek(LPCTSTR lpszComparison, LONG lNetworkID);
  44. };
  45.  
  46.  
  47. class COMMMSTVEXPORT CNetwork : public CObject
  48. {
  49.     friend class CNetworkRecordset; // generates the CNetwork record object
  50.  
  51. protected:
  52.  
  53.     long m_lNetworkID;
  54.     CString m_cszName;
  55.     CString m_cszLogoMoniker;
  56.         
  57. public:
  58.  
  59.     CNetwork(long lNetworkID = AFX_RFX_LONG_PSEUDO_NULL,
  60.                 CString cszName = "",
  61.                 CString cszLogoMoniker = "") :
  62.                 m_lNetworkID(lNetworkID),
  63.                 m_cszName(cszName),
  64.                 m_cszLogoMoniker(cszLogoMoniker) { }
  65.     ~CNetwork() { }
  66.  
  67.     void SetName( LPCTSTR szName ) { m_cszName = szName; }
  68.     void SetLogoMoniker( LPCTSTR szLogoMoniker ) { m_cszLogoMoniker = szLogoMoniker; }
  69.     
  70.     long NetworkID() { return m_lNetworkID; }
  71.     CString Name() { return m_cszName; }
  72.     CString LogoMoniker() { return m_cszLogoMoniker; }
  73. };
  74.  
  75.  
  76. // Table: Network
  77.  
  78. #define  TBL_Network  _T("Network")
  79.  
  80. #define FLD_Network_NetworkID        _T("N Network ID")
  81. #define FLD_Network_Name            _T("N Name")
  82. #define FLD_Network_LogoMoniker        _T("N LogoMoniker")
  83.  
  84.  
  85. #endif
  86.  
  87.  
  88.