Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

126 lines
3.6 KiB

  1. /*****************************************************************/
  2. /** Microsoft LAN Manager **/
  3. /** Copyright(c) Microsoft Corp., 1991 **/
  4. /*****************************************************************/
  5. /*
  6. * currconn.hxx
  7. *
  8. * History:
  9. * RustanL 23-Feb-1991 Created from WilliamW's Connection
  10. * dialog code.
  11. * Johnl 22-Mar-1991 Added SetDeviceState
  12. * rustanl 23-Mar-1991 Rolled in code review changes from
  13. * CR on 19-Mar-1991 attended by ChuckC,
  14. * KevinL, JohnL, KeithMo, Hui-LiCh, RustanL.
  15. * gregj 01-May-1991 Added GUILTT support
  16. *
  17. */
  18. #ifndef _CURRCONN_HXX_
  19. #define _CURRCONN_HXX_
  20. #include <reslb.hxx> // get declaration of RESOURCE_LB_BASE
  21. /*************************************************************************
  22. NAME: CURRCONN_LBI
  23. SYNOPSIS: Current connection list box item (winnet driver)
  24. INTERFACE:
  25. Fill me in!
  26. PARENT: LBI
  27. USES:
  28. CAVEATS:
  29. NOTES:
  30. HISTORY:
  31. Johnl 25-Mar-1991 Added SetDeviceState
  32. gregj 01-May-1991 Added GUILTT support
  33. beng 20-May-1991 QueryLeadingChar now returns WCHAR
  34. beng 22-Apr-1992 Changes to LBI::Paint
  35. **************************************************************************/
  36. class CURRCONN_LBI : public LBI
  37. {
  38. private:
  39. DECL_CLASS_NLS_STR( _nlsDevice, DEVLEN );
  40. NLS_STR _nlsRemote;
  41. LMO_DEVICE _lmodev;
  42. LMO_DEV_STATE _lmodevstate;
  43. public:
  44. CURRCONN_LBI( const TCHAR * pchDevice,
  45. const TCHAR * pchRemote,
  46. LMO_DEVICE lmodev,
  47. LMO_DEV_STATE lmodevstate );
  48. virtual ~CURRCONN_LBI();
  49. const TCHAR * QueryDeviceName() const;
  50. LMO_DEV_STATE QueryDeviceState() const;
  51. VOID SetDeviceState( LMO_DEV_STATE lmodevst ) ;
  52. virtual VOID Paint( LISTBOX * plb, HDC hdc, const RECT * prect,
  53. GUILTT_INFO * pGUILTT ) const;
  54. virtual INT Compare( const LBI * plbi ) const;
  55. virtual WCHAR QueryLeadingChar() const;
  56. };
  57. /*************************************************************************
  58. NAME: CURRCONN_LISTBOX
  59. SYNOPSIS: Current connection list box (winnet driver)
  60. INTERFACE:
  61. CURRCONN_LISTBOX() - constructor. In addition to the usual
  62. owner-window and cid, needs a LMO_DEVICE
  63. denoting the kind of device examined.
  64. Refresh() - (unknown)
  65. Disconnect() - (unknown)
  66. QueryItem() - returns an item in the listbox, id'd by index
  67. PARENT: RESOURCE_LB_BASE
  68. USES: CURRCONN_LBI
  69. CAVEATS:
  70. NOTES:
  71. HISTORY:
  72. beng 21-Aug-1991 Removed LC_CURRENT_ITEM magic value
  73. **************************************************************************/
  74. class CURRCONN_LISTBOX : public RESOURCE_LB_BASE
  75. {
  76. private:
  77. INT AddItem( const TCHAR * pchDevice,
  78. const TCHAR * pchRemote,
  79. LMO_DEV_STATE lmodevstate );
  80. public:
  81. CURRCONN_LISTBOX( OWNER_WINDOW * powin, CID cid, LMO_DEVICE lmodev );
  82. DECLARE_LB_QUERY_ITEM( CURRCONN_LBI );
  83. APIERR Refresh();
  84. APIERR Disconnect( APIERR * pusProfileErr, INT i );
  85. APIERR Disconnect( APIERR * pusProfileErr )
  86. { return Disconnect(pusProfileErr, QueryCurrentItem()); }
  87. };
  88. #endif // _CURRCONN_HXX_