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.

89 lines
2.1 KiB

  1. #ifndef _ASMASTER_H_
  2. #define _ASMASTER_H_
  3. class ASMaster : public IAppSharing
  4. {
  5. friend BOOL CALLBACK eventProc(LPVOID, UINT, UINT_PTR, UINT_PTR);
  6. public:
  7. ASMaster(UINT flags, IAppSharingNotify * pNotify);
  8. ~ASMaster();
  9. //
  10. // IUnknown methods:
  11. //
  12. STDMETHOD(QueryInterface)(REFIID, void **);
  13. STDMETHODIMP_(ULONG) AddRef();
  14. STDMETHODIMP_(ULONG) Release();
  15. //
  16. // IAppSharing methods:
  17. //
  18. //
  19. // Status
  20. //
  21. STDMETHODIMP_(BOOL) IsSharingAvailable();
  22. STDMETHODIMP_(BOOL) CanShareNow();
  23. STDMETHODIMP_(BOOL) IsInShare();
  24. STDMETHODIMP_(BOOL) IsSharing();
  25. STDMETHODIMP_(BOOL) IsWindowShareable(HWND hwnd);
  26. STDMETHODIMP_(BOOL) IsWindowShared(HWND hwnd);
  27. STDMETHODIMP_(BOOL) CanAllowControl();
  28. STDMETHODIMP_(BOOL) IsControllable();
  29. STDMETHODIMP GetPersonStatus(IAS_GCC_ID Person, IAS_PERSON_STATUS * pStatus);
  30. // Share/Unshare this window
  31. STDMETHODIMP LaunchHostUI(void);
  32. STDMETHODIMP GetShareableApps(IAS_HWND_ARRAY **ppHwnds);
  33. STDMETHODIMP FreeShareableApps(IAS_HWND_ARRAY *pHwnds);
  34. STDMETHODIMP Share(HWND hwnd, IAS_SHARE_TYPE how);
  35. STDMETHODIMP Unshare(HWND hwnd);
  36. //
  37. // Control
  38. //
  39. // Viewer side
  40. STDMETHODIMP TakeControl(IAS_GCC_ID PersonOf);
  41. STDMETHODIMP CancelTakeControl(IAS_GCC_ID PersonOf);
  42. STDMETHODIMP ReleaseControl(IAS_GCC_ID PersonOf);
  43. STDMETHODIMP PassControl(IAS_GCC_ID PersonOf, IAS_GCC_ID PersonTo);
  44. // Host side
  45. STDMETHODIMP AllowControl(BOOL fAllowed);
  46. STDMETHODIMP GiveControl(IAS_GCC_ID PersonTo);
  47. STDMETHODIMP CancelGiveControl(IAS_GCC_ID PersonTo);
  48. STDMETHODIMP RevokeControl(IAS_GCC_ID PersonTo);
  49. STDMETHODIMP PauseControl(IAS_GCC_ID PersonInControl);
  50. STDMETHODIMP UnpauseControl(IAS_GCC_ID PersonInControl);
  51. //
  52. // Event notifications
  53. //
  54. BOOL OnEvent(UINT event, UINT_PTR param1, UINT_PTR param2);
  55. public:
  56. IAppSharingNotify * m_pNotify;
  57. protected:
  58. LONG m_cRefs;
  59. };
  60. // callbacks
  61. BOOL CALLBACK eventProc(LPVOID, UINT, UINT, UINT);
  62. DWORD WINAPI WorkThreadEntryPoint(LPVOID hEventWait);
  63. HWND IsForDialog(HWND hwnd);
  64. #endif // ! _ASMASTER_H_
  65.