windows_quiethours.idl 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. // © Rafael Rivera
  2. // License: MIT
  3. import "oaidl.idl";
  4. [uuid(e0b5ef8b-a9b4-497a-8f71-08dd5c8ab2bf)]
  5. library QuietHours
  6. {
  7. [uuid(f53321fa-34f8-4b7f-b9a3-361877cb94cf)]
  8. coclass QuietHoursSettings
  9. {
  10. [default] interface IQuietHoursSettings;
  11. }
  12. [uuid(af86e2e0-b12d-4c6a-9c5a-d7aa65101e90)]
  13. interface IQuietMoment : IUnknown
  14. {
  15. // Incomplete
  16. }
  17. [uuid(e813fe81-62b6-417d-b951-9d2e08486ac1)]
  18. interface IQuietHoursProfile : IUnknown
  19. {
  20. [propget] HRESULT DisplayName([out, string, retval] LPWSTR* displayName);
  21. [propget] HRESULT ProfileId([out, string, retval] LPWSTR* profileId);
  22. HRESULT GetSetting(int setting, [out, retval] int* value);
  23. HRESULT PutSetting(int setting, int value);
  24. [propget] HRESULT IsCustomizable([out, retval] BOOL* result);
  25. HRESULT GetAllowedContacts([out] UINT32* count, [out, retval] LPWSTR* allowedContacts);
  26. HRESULT AddAllowedContact([in, string] LPWSTR allowedContact);
  27. HRESULT RemoveAllowedContact([in, string] LPWSTR allowedContact);
  28. HRESULT GetAllowedApps([out] UINT32* count, [out, retval] LPWSTR** allowedApps);
  29. HRESULT AddAllowedApp([in, string] LPWSTR allowedApp);
  30. HRESULT RemoveAllowedApp([in, string] LPWSTR allowedApp);
  31. [propget] HRESULT Description([out, string, retval] LPWSTR* description);
  32. [propget] HRESULT CustomizeLinkText([out, string, retval] LPWSTR* linkText);
  33. [propget] HRESULT RestrictiveLevel([out, string, retval] LPWSTR* restrictiveLevel);
  34. }
  35. [uuid(cd86a976-8ea9-404b-a197-42e73dbaa901)]
  36. interface IQuietHoursPinnedContactManager : IUnknown
  37. {
  38. HRESULT GetPinnedContactList([out] UINT32* count, [out, string, retval] LPWSTR* pinnedContacts);
  39. }
  40. [uuid(b0217783-87b7-422c-b902-5c148c14f150)]
  41. interface IQuietMomentsManager : IUnknown
  42. {
  43. HRESULT GetAllQuietMomentModes([out] UINT32* count, [out, retval] UINT32** quietMomentModes);
  44. HRESULT GetQuietMoment([in] UINT32 quietMomentId, [out, retval] IQuietMoment** quietMoment);
  45. HRESULT TurnOffCurrentlyActiveQuietMoment();
  46. HRESULT GetActiveQuietMoment([out, retval] UINT32* quietMomentId);
  47. }
  48. typedef struct _QH_PROFILE_DATA
  49. {
  50. char do_not_use__incomplete; // Incomplete
  51. } QH_PROFILE_DATA;
  52. [uuid(6bff4732-81ec-4ffb-ae67-b6c1bc29631f)]
  53. interface IQuietHoursSettings : IUnknown
  54. {
  55. [propget] HRESULT UserSelectedProfile([out, string, retval] LPWSTR* profileId);
  56. [propput] HRESULT UserSelectedProfile([in] LPWSTR profileId);
  57. HRESULT GetProfile([in, string] LPWSTR profileId, [out, retval] IQuietHoursProfile**);
  58. HRESULT GetAllProfileData(UINT32* count, QH_PROFILE_DATA*);
  59. HRESULT GetDisplayNameForProfile([in, string] LPWSTR profileId, [out, string, retval] LPWSTR* displayName);
  60. [propget] HRESULT QuietMomentsManager([out, retval] IQuietMomentsManager**);
  61. [propget] HRESULT OffProfileId([out, string, retval] LPWSTR* profileId);
  62. [propget] HRESULT ActiveQuietMomentProfile([out, string, retval] LPWSTR* profileId);
  63. [propput] HRESULT ActiveQuietMomentProfile([in] LPWSTR profileId);
  64. [propget] HRESULT ActiveProfile([out, string, retval] LPWSTR* profileId);
  65. [propget] HRESULT QuietHoursPinnedContactManager([out, retval] IQuietHoursPinnedContactManager**);
  66. [propput] HRESULT QuietMomentsShowSummaryEnabled([out, retval] BOOL* isEnabled);
  67. HRESULT GetAlwaysAllowedApps([out] UINT32* count, [out, string, retval] LPWSTR** allowedApps);
  68. HRESULT StartProcessing();
  69. HRESULT StopProcessing();
  70. }
  71. }