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.

82 lines
1.7 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) CanAllowControl();
  26. STDMETHODIMP_(BOOL) IsControllable();
  27. STDMETHODIMP GetPersonStatus(IAS_GCC_ID Person, IAS_PERSON_STATUS * pStatus);
  28. // Share/Unshare this window
  29. STDMETHODIMP ShareDesktop(void);
  30. STDMETHODIMP UnshareDesktop(void);
  31. //
  32. // Control
  33. //
  34. // Viewer side
  35. STDMETHODIMP TakeControl(IAS_GCC_ID PersonOf);
  36. STDMETHODIMP CancelTakeControl(IAS_GCC_ID PersonOf);
  37. STDMETHODIMP ReleaseControl(IAS_GCC_ID PersonOf);
  38. STDMETHODIMP PassControl(IAS_GCC_ID PersonOf, IAS_GCC_ID PersonTo);
  39. // Host side
  40. STDMETHODIMP AllowControl(BOOL fAllowed);
  41. STDMETHODIMP GiveControl(IAS_GCC_ID PersonTo);
  42. STDMETHODIMP CancelGiveControl(IAS_GCC_ID PersonTo);
  43. STDMETHODIMP RevokeControl(IAS_GCC_ID PersonTo);
  44. //
  45. // Event notifications
  46. //
  47. BOOL OnEvent(UINT event, UINT_PTR param1, UINT_PTR param2);
  48. public:
  49. IAppSharingNotify * m_pNotify;
  50. protected:
  51. LONG m_cRefs;
  52. };
  53. // callbacks
  54. BOOL CALLBACK eventProc(LPVOID, UINT, UINT, UINT);
  55. DWORD WINAPI WorkThreadEntryPoint(LPVOID hEventWait);
  56. HWND IsForDialog(HWND hwnd);
  57. #endif // ! _ASMASTER_H_
  58.