Source code of Windows XP (NT5)
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.

132 lines
4.9 KiB

  1. /*++
  2. Copyright (c) 1997 Microsoft Corporation
  3. Module Name:
  4. ilogcat.h
  5. Abstract:
  6. Internal implementation for a logging category item.
  7. Environment:
  8. WIN32 User Mode
  9. Author:
  10. Darwin Ouyang (t-darouy) 30-Sept-1997
  11. --*/
  12. #ifndef __IDEVICE_H_
  13. #define __IDEVICE_H_
  14. #include "winfax.h"
  15. #define CSID_LIMIT 20
  16. #define TSID_LIMIT 20
  17. #define MIN_RING_COUNT 1
  18. #define MAX_RING_COUNT 99
  19. class CFaxDeviceSettingsPropSheet; // forward decl
  20. class CFaxRoutePriPropSheet; // forward decl
  21. class CInternalDevice : public CInternalNode
  22. {
  23. public:
  24. CInternalDevice( CInternalNode * pParent,
  25. CFaxComponentData * pCompData,
  26. HANDLE faxHandle,
  27. DWORD devID );
  28. ~CInternalDevice();
  29. // IComponent over-rides
  30. HRESULT STDMETHODCALLTYPE ResultGetDisplayInfo(
  31. /* [in] */ CFaxComponent * pComp,
  32. /* [out][in] */ RESULTDATAITEM __RPC_FAR *pResultDataItem);
  33. // IExtendContextMenu overrides for IComponent
  34. virtual HRESULT STDMETHODCALLTYPE ComponentContextMenuAddMenuItems(
  35. /* [in] */ CFaxComponent * pCompData,
  36. /* [in] */ CFaxDataObject * piDataObject,
  37. /* [in] */ LPCONTEXTMENUCALLBACK piCallback,
  38. /* [out][in] */ long __RPC_FAR *pInsertionAllowed);
  39. virtual HRESULT STDMETHODCALLTYPE ComponentContextMenuCommand(
  40. /* [in] */ CFaxComponent * pCompData,
  41. /* [in] */ long lCommandID,
  42. /* [in] */ CFaxDataObject * piDataObject);
  43. // IExtendPropertySheet overrides for IComponent
  44. virtual HRESULT STDMETHODCALLTYPE ComponentPropertySheetCreatePropertyPages(
  45. /* [in] */ CFaxComponent * pComp,
  46. /* [in] */ LPPROPERTYSHEETCALLBACK lpProvider,
  47. /* [in] */ LONG_PTR handle,
  48. /* [in] */ CFaxDataObject * lpIDataObject);
  49. virtual HRESULT STDMETHODCALLTYPE ComponentPropertySheetQueryPagesFor(
  50. /* [in] */ CFaxComponent * pComp,
  51. /* [in] */ CFaxDataObject * lpDataObject);
  52. // IDataObject overrides
  53. virtual HRESULT DataObjectRegisterFormats();
  54. virtual HRESULT DataObjectGetDataHere( FORMATETC __RPC_FAR *pFormatEtc, IStream * pstm );
  55. // event handlers
  56. virtual HRESULT ResultOnSelect(CFaxComponent* pComp,
  57. CFaxDataObject * lpDataObject,
  58. LPARAM arg, LPARAM param);
  59. virtual HRESULT ResultOnPropertyChange(CFaxComponent* pComp,
  60. CFaxDataObject * lpDataObject,
  61. LPARAM arg, LPARAM param);
  62. virtual HRESULT ControlBarOnBtnClick(CFaxComponent* pComp,
  63. CFaxDataObject * lpDataObject,
  64. LPARAM param );
  65. virtual HRESULT ControlBarOnSelect(CFaxComponent* pComp,
  66. LPARAM arg,
  67. CFaxDataObject * lpDataObject );
  68. // member functions
  69. virtual const GUID * GetNodeGUID();
  70. virtual const LPTSTR GetNodeDisplayName();
  71. virtual const LONG_PTR GetCookie();
  72. virtual CInternalNode * GetThis() { return this; }
  73. virtual const int GetNodeDisplayImage() { return IDI_FAXING; }
  74. void SetItemID( HRESULTITEM hItem ) { hItemID = hItem; }
  75. LPTSTR GetStatusString( DWORD state );
  76. // these functions get and commit the state this device to the fax server
  77. HRESULT RetrieveNewInfo();
  78. HRESULT CommitNewInfo();
  79. public:
  80. DWORD dwDeviceId;
  81. HANDLE hFaxServer;
  82. PFAX_PORT_INFO pDeviceInfo;
  83. HRESULTITEM hItemID;
  84. // clipboard formats
  85. static UINT s_cfFaxDevice;
  86. static UINT s_cfFaxServerDown;
  87. CFaxDeviceSettingsPropSheet *pMyPropSheet;
  88. MMC_CONSOLE_VERB defaultVerb;
  89. LPTOOLBAR myToolBar;
  90. static CRITICAL_SECTION csDeviceLock;
  91. };
  92. typedef CInternalDevice* pCInternalDevice;
  93. #endif