SubsMgr.Idl
上传用户:dzyhzl
上传日期:2019-04-29
资源大小:56270k
文件大小:15k
源码类别:

模拟服务器

开发平台:

C/C++

  1. //+-------------------------------------------------------------------------
  2. //
  3. //  Microsoft Windows
  4. //  Copyright 1995-1998 Microsoft Corporation. All Rights Reserved.
  5. //
  6. //--------------------------------------------------------------------------
  7. cpp_quote("//=--------------------------------------------------------------------------=")
  8. cpp_quote("// subsmgr.h")
  9. cpp_quote("//=--------------------------------------------------------------------------=")
  10. cpp_quote("// (C) Copyright 1995-1998 Microsoft Corporation.  All Rights Reserved.")
  11. cpp_quote("//")
  12. cpp_quote("// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF")
  13. cpp_quote("// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO")
  14. cpp_quote("// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A")
  15. cpp_quote("// PARTICULAR PURPOSE.")
  16. cpp_quote("//=--------------------------------------------------------------------------=")
  17. cpp_quote("")
  18. cpp_quote("#pragma comment(lib,"uuid.lib")")
  19. cpp_quote("")
  20. cpp_quote("//---------------------------------------------------------------------------=")
  21. cpp_quote("// Channel Manager Interfaces.")
  22. cpp_quote("")
  23. #ifndef DO_NO_IMPORTS
  24. import "unknwn.idl";
  25. import "ocidl.idl";
  26. import "oleidl.idl";
  27. import "oaidl.idl";
  28. #endif
  29. typedef GUID SUBSCRIPTIONCOOKIE;
  30. [
  31.     uuid(F72C8D96-6DBD-11d1-A1E8-00C04FC2FBE1), // IID_IEnumItemProperties
  32.     helpstring("Enum Item Properties interface")
  33. ]
  34. interface IEnumItemProperties : IUnknown
  35. {
  36.     typedef [unique] IEnumItemProperties *LPENUMITEMPROPERTIES;
  37.     typedef struct _tagITEMPROP
  38.     {
  39.         VARIANT         variantValue;   // the variant value
  40.         LPWSTR          pwszName;       // name
  41.     } ITEMPROP, *LPITEMPROP;
  42.     HRESULT Next(
  43.         [in] ULONG celt,
  44.         [out, size_is(celt), length_is(*pceltFetched)]
  45.         ITEMPROP *rgelt,
  46.         [out] ULONG *pceltFetched);
  47.     HRESULT Skip([in] ULONG celt);
  48.     HRESULT Reset();
  49.     HRESULT Clone([out] IEnumItemProperties **ppenum);
  50.     HRESULT GetCount([out] ULONG *pnCount);
  51. }
  52. cpp_quote("//  Subscription item flag values")
  53. cpp_quote("//  Temporary subscription item")
  54. cpp_quote("#define SI_TEMPORARY         0x80000000")
  55. [
  56.     uuid(A97559F8-6C4A-11d1-A1E8-00C04FC2FBE1), // IID_ISubscriptionItem
  57.     helpstring("Subscription Item interface")
  58. ]
  59. interface ISubscriptionItem : IUnknown
  60. {
  61.     typedef [unique] ISubscriptionItem *LPSUBSCRIPTIONITEM;
  62. cpp_quote("//  SUBSCRIPTIONITEMINFO flags                               ")
  63. cpp_quote("//  To specify that an item should only run on user idle     ")
  64. cpp_quote("//  use TASK_FLAG_START_ONLY_IF_IDLE                         ")
  65.     typedef struct tagSUBSCRIPTIONITEMINFO {
  66.         ULONG               cbSize;
  67.         DWORD               dwFlags;
  68.         DWORD               dwPriority;
  69.         SUBSCRIPTIONCOOKIE  ScheduleGroup;
  70.         CLSID               clsidAgent;
  71.     } SUBSCRIPTIONITEMINFO;
  72.     HRESULT GetCookie([out] SUBSCRIPTIONCOOKIE *pCookie);
  73.     HRESULT GetSubscriptionItemInfo([out] SUBSCRIPTIONITEMINFO *pSubscriptionItemInfo);
  74.     HRESULT SetSubscriptionItemInfo([in] const SUBSCRIPTIONITEMINFO *pSubscriptionItemInfo);
  75.     HRESULT ReadProperties(ULONG nCount,
  76.                            [in, size_is(nCount)] const LPCWSTR rgwszName[],
  77.                            [out, size_is(nCount)] VARIANT rgValue[]);
  78.     HRESULT WriteProperties(ULONG nCount,
  79.                            [in, size_is(nCount)] const LPCWSTR rgwszName[],
  80.                            [in, size_is(nCount)] const VARIANT rgValue[]);
  81.     HRESULT EnumProperties([out] IEnumItemProperties **ppEnumItemProperties);
  82.     HRESULT NotifyChanged();
  83. }
  84. [
  85.     uuid(F72C8D97-6DBD-11d1-A1E8-00C04FC2FBE1), // IID_IEnumSubscription
  86.     helpstring("Enum Subscription interface"),
  87.     odl
  88. ]
  89. interface IEnumSubscription : IUnknown
  90. {
  91.     typedef [unique] IEnumSubscription *LPENUMSUBSCRIPTION;
  92.     HRESULT Next(
  93.         [in] ULONG celt,
  94.         [out, size_is(celt), length_is(*pceltFetched)]
  95.         SUBSCRIPTIONCOOKIE *rgelt,
  96.         [out] ULONG *pceltFetched);
  97.     HRESULT Skip([in] ULONG celt);
  98.     HRESULT Reset();
  99.     HRESULT Clone([out] IEnumSubscription **ppenum);
  100.     HRESULT GetCount([out] ULONG *pnCount);
  101. }
  102. //---------------------------------------------------------------
  103. //          Subscription Manager
  104. //---------------------------------------------------------------
  105. [
  106.     uuid(C54FD88A-FFA1-11d0-BC5E-00C04FD929DB),     // LIBID_SubscriptionMgr
  107.     helpstring("Microsoft Subscription Manager 1.0"),
  108.     lcid(0x0000),
  109.     version(1.0)
  110. ]
  111. library SubscriptionMgr
  112. {
  113. //---------------------------------------------------------------
  114. //                  Subscription Manager
  115. //---------------------------------------------------------------
  116.     [
  117.         uuid(085FB2C0-0DF8-11d1-8F4B-00A0C905413F), // IID_ISubscriptionMgr
  118.         helpstring("Subscription Manager interface"),
  119.         odl
  120.     ]
  121.     interface ISubscriptionMgr : IUnknown
  122.     {
  123.         typedef enum SUBSCRIPTIONTYPE {
  124.             SUBSTYPE_URL = 0,
  125.             SUBSTYPE_CHANNEL = 1,
  126.             SUBSTYPE_DESKTOPURL = 2,
  127.             SUBSTYPE_EXTERNAL = 3,
  128.             SUBSTYPE_DESKTOPCHANNEL = 4
  129.         } SUBSCRIPTIONTYPE;
  130.         typedef enum SUBSCRIPTIONINFOFLAGS {
  131.             SUBSINFO_SCHEDULE       = 0x0001,
  132.             SUBSINFO_RECURSE        = 0x0002,
  133.             SUBSINFO_WEBCRAWL       = 0x0004,
  134.             SUBSINFO_MAILNOT        = 0x0008,
  135.             SUBSINFO_MAXSIZEKB      = 0x0010,
  136.             SUBSINFO_USER           = 0x0020,
  137.             SUBSINFO_PASSWORD       = 0x0040,
  138.             SUBSINFO_TASKFLAGS      = 0x0100,
  139.             SUBSINFO_GLEAM          = 0x0200,
  140.             SUBSINFO_CHANGESONLY    = 0x0400,
  141.             SUBSINFO_CHANNELFLAGS   = 0x0800,
  142.             SUBSINFO_FRIENDLYNAME   = 0x2000,
  143.             SUBSINFO_NEEDPASSWORD   = 0x4000,
  144.             SUBSINFO_TYPE           = 0x8000
  145.         } SUBSCRIPTIONINFOFLAGS;
  146. cpp_quote("#define SUBSINFO_ALLFLAGS      0x0000EF7F")
  147.         typedef enum CREATESUBSCRIPTIONFLAGS {
  148.             CREATESUBS_ADDTOFAVORITES       = 0x0001,
  149.             CREATESUBS_FROMFAVORITES        = 0x0002,
  150.             CREATESUBS_NOUI                 = 0x0004,
  151.             CREATESUBS_NOSAVE               = 0x0008,
  152.             CREATESUBS_SOFTWAREUPDATE       = 0x0010,
  153.         } CREATESUBSCRIPTIONFLAGS;
  154.         typedef enum  SUBSCRIPTIONSCHEDULE {
  155.             SUBSSCHED_AUTO       = 0,
  156.             SUBSSCHED_DAILY      = 1,
  157.             SUBSSCHED_WEEKLY     = 2,
  158.             SUBSSCHED_CUSTOM     = 3,
  159.             SUBSSCHED_MANUAL     = 4
  160.         } SUBSCRIPTIONSCHEDULE;
  161.         typedef struct _tagSubscriptionInfo {
  162.             DWORD                cbSize;
  163.             DWORD                fUpdateFlags;
  164.             SUBSCRIPTIONSCHEDULE schedule;
  165.             CLSID                customGroupCookie;
  166.             LPVOID               pTrigger;
  167.             DWORD                dwRecurseLevels;
  168.             DWORD                fWebcrawlerFlags;
  169.             BOOL                 bMailNotification;
  170.             BOOL                 bGleam;
  171.             BOOL                 bChangesOnly;
  172.             BOOL                 bNeedPassword;
  173.             DWORD                fChannelFlags;
  174.             BSTR                 bstrUserName;
  175.             BSTR                 bstrPassword;
  176.             BSTR                 bstrFriendlyName;
  177.             DWORD                dwMaxSizeKB;
  178.             SUBSCRIPTIONTYPE     subType;
  179.             DWORD                fTaskFlags;
  180.             DWORD                dwReserved;
  181.         } SUBSCRIPTIONINFO, *LPSUBSCRIPTIONINFO, *PSUBSCRIPTIONINFO;
  182.         HRESULT DeleteSubscription([in] LPCWSTR pwszURL, [in] HWND hwnd);
  183.         HRESULT UpdateSubscription([in] LPCWSTR pwszURL);
  184.         HRESULT UpdateAll();
  185.         HRESULT IsSubscribed([in] LPCWSTR pwszURL, [out] BOOL *pfSubscribed);
  186.         HRESULT GetSubscriptionInfo(
  187.                     [in] LPCWSTR pwszURL,
  188.                     [out] SUBSCRIPTIONINFO *pInfo);
  189.         HRESULT GetDefaultInfo([in] SUBSCRIPTIONTYPE subType,
  190.                     [out] SUBSCRIPTIONINFO *pInfo);
  191.         HRESULT ShowSubscriptionProperties([in] LPCWSTR pwszURL, [in] HWND hwnd);
  192.         HRESULT CreateSubscription([in] HWND hwnd, [in] LPCWSTR pwszURL,
  193.                     [in] LPCWSTR pwszFriendlyName, [in] DWORD dwFlags,
  194.                     [in] SUBSCRIPTIONTYPE subsType, [in,out] SUBSCRIPTIONINFO *pInfo);
  195.     }
  196.     [
  197.         uuid(614BC270-AEDF-11d1-A1F9-00C04FC2FBE1), // IID_ISubscriptionMgr2
  198.         helpstring("Subscription Store interface"),
  199.         odl
  200.     ]
  201.     interface ISubscriptionMgr2 : ISubscriptionMgr
  202.     {
  203. cpp_quote("//  Run State flags                                          ")
  204. cpp_quote("//  Item is ready and queued to run                          ")
  205. cpp_quote("#define RS_READY            0x00000001                       ")
  206. cpp_quote("//  Running item is paused                                   ")
  207. cpp_quote("#define RS_SUSPENDED        0x00000002                       ")
  208. cpp_quote("//  Item is updating                                         ")
  209. cpp_quote("#define RS_UPDATING         0x00000004                       ")
  210. cpp_quote("//  This item will be suspended while the user is not idle   ")
  211. cpp_quote("#define RS_SUSPENDONIDLE    0x00010000                       ")
  212. cpp_quote("//  This item is allowed to cause user interaction           ")
  213. cpp_quote("#define RS_MAYBOTHERUSER    0x00020000                       ")
  214. cpp_quote("//  Update is done                                           ")
  215. cpp_quote("#define RS_COMPLETED        0x80000000                       ")
  216. cpp_quote("//  Update flags                                             ")
  217. cpp_quote("//  Update window should start minimized                     ")
  218. cpp_quote("#define SUBSMGRUPDATE_MINIMIZE   0x00000001                  ")
  219. cpp_quote("")
  220. cpp_quote("#define SUBSMGRUPDATE_MASK       0x00000001                  ")
  221. cpp_quote("//  Enumeration flags                                        ")
  222. cpp_quote("//  Include temporary items                                  ")
  223. cpp_quote("#define SUBSMGRENUM_TEMP         0x00000001                  ")
  224. cpp_quote("")
  225. cpp_quote("#define SUBSMGRENUM_MASK         0x00000001                  ")
  226.         HRESULT GetItemFromURL([in]  LPCWSTR pwszURL,
  227.                                [out] ISubscriptionItem **ppSubscriptionItem);
  228.         HRESULT GetItemFromCookie([in]  const SUBSCRIPTIONCOOKIE *pSubscriptionCookie,
  229.                                   [out] ISubscriptionItem **ppSubscriptionItem);
  230.         HRESULT GetSubscriptionRunState([in] DWORD dwNumCookies,
  231.                                         [in, size_is(dwNumCookies)] const SUBSCRIPTIONCOOKIE *pCookies,
  232.                                         [out, size_is(dwNumCookies)] DWORD *pdwRunState);
  233.         HRESULT EnumSubscriptions([in] DWORD dwFlags,
  234.                                   [out] IEnumSubscription **ppEnumSubscriptions);
  235.         HRESULT UpdateItems([in] DWORD dwFlags,
  236.                             [in] DWORD dwNumCookies,
  237.                             [in, size_is(dwNumCookies)] const SUBSCRIPTIONCOOKIE *pCookies);
  238.         HRESULT AbortItems([in] DWORD dwNumCookies,
  239.                            [in, size_is(dwNumCookies)] const SUBSCRIPTIONCOOKIE *pCookies);
  240.         HRESULT AbortAll();
  241.     }
  242.     // Subscription Manager object
  243.     [
  244.         uuid(abbe31d0-6dae-11d0-beca-00c04fd940be), // CLSID_SubscriptionMgr
  245.         helpstring("SubscriptionMgr object")
  246.     ]
  247.     coclass SubscriptionMgr
  248.     {
  249.         [default] interface ISubscriptionMgr;
  250.     }
  251. }
  252. cpp_quote("")
  253. cpp_quote("")
  254. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  255. cpp_quote("// Information Delivery Agent definitions")
  256. cpp_quote("EXTERN_C const CLSID CLSID_WebCrawlerAgent;      ")
  257. cpp_quote("EXTERN_C const CLSID CLSID_ChannelAgent;         ")
  258. cpp_quote("EXTERN_C const CLSID CLSID_DialAgent;            ")
  259. cpp_quote("EXTERN_C const CLSID CLSID_CDLAgent;             ")
  260. cpp_quote("")
  261. cpp_quote("// AgentFlags property for all delivery agents")
  262. // lower 16 bits open for use
  263. typedef enum DELIVERY_AGENT_FLAGS {
  264.     DELIVERY_AGENT_FLAG_NO_BROADCAST       = 0x0004,
  265.     DELIVERY_AGENT_FLAG_NO_RESTRICTIONS    = 0x0008,
  266.     DELIVERY_AGENT_FLAG_SILENT_DIAL        = 0x0010
  267. } DELIVERY_AGENT_FLAGS;
  268. cpp_quote("")
  269. cpp_quote("// RecurseFlags property for web crawler")
  270. typedef enum WEBCRAWL_RECURSEFLAGS {
  271.     WEBCRAWL_DONT_MAKE_STICKY   = 0x0001,
  272.     WEBCRAWL_GET_IMAGES         = 0x0002,
  273.     WEBCRAWL_GET_VIDEOS         = 0x0004,
  274.     WEBCRAWL_GET_BGSOUNDS       = 0x0008,
  275.     WEBCRAWL_GET_CONTROLS       = 0x0010,
  276.     WEBCRAWL_LINKS_ELSEWHERE    = 0x0020,
  277.     WEBCRAWL_IGNORE_ROBOTSTXT   = 0x0080,
  278.     WEBCRAWL_ONLY_LINKS_TO_HTML = 0x0100,       // Only follows links to html
  279. } WEBCRAWL_RECURSEFLAGS;
  280. cpp_quote("")
  281. cpp_quote("// ChannelFlags property for channel agent")
  282. typedef enum CHANNEL_AGENT_FLAGS {
  283.     CHANNEL_AGENT_DYNAMIC_SCHEDULE  = 0x0001,
  284.     CHANNEL_AGENT_PRECACHE_SOME     = 0x0002,   // Download Only Precache=Yes
  285.     CHANNEL_AGENT_PRECACHE_ALL      = 0x0004,   // Download All except Precache=No
  286.     CHANNEL_AGENT_PRECACHE_SCRNSAVER= 0x0008,
  287. } CHANNEL_AGENT_FLAGS;
  288. cpp_quote("")
  289. cpp_quote("// Status codes for completed delivery agents")
  290. cpp_quote("")
  291. cpp_quote("// Maximum specified subscription size limit reached")
  292. cpp_quote("#define INET_E_AGENT_MAX_SIZE_EXCEEDED       _HRESULT_TYPEDEF_(0x800C0F80L)      ")
  293. cpp_quote("")
  294. cpp_quote("// A few URLs failed but the base url and most sub-urls succeeded")
  295. cpp_quote("#define INET_S_AGENT_PART_FAIL               _HRESULT_TYPEDEF_(0x000C0F81L)      ")
  296. cpp_quote("")
  297. cpp_quote("// Maximum cache limit reached")
  298. cpp_quote("#define INET_E_AGENT_CACHE_SIZE_EXCEEDED     _HRESULT_TYPEDEF_(0x800C0F82L)      ")
  299. cpp_quote("")
  300. cpp_quote("// Connection to Internet failed")
  301. cpp_quote("#define INET_E_AGENT_CONNECTION_FAILED       _HRESULT_TYPEDEF_(0x800C0F83L)      ")
  302. cpp_quote("")
  303. cpp_quote("// Scheduled updates are disabled")
  304. cpp_quote("#define INET_E_SCHEDULED_UPDATES_DISABLED    _HRESULT_TYPEDEF_(0x800C0F84L)      ")
  305. cpp_quote("")
  306. cpp_quote("// Scheduled updates are restricted")
  307. cpp_quote("#define INET_E_SCHEDULED_UPDATES_RESTRICTED  _HRESULT_TYPEDEF_(0x800C0F85L)      ")
  308. cpp_quote("")
  309. cpp_quote("// Scheduled update occurred before update interval elapse")
  310. cpp_quote("#define INET_E_SCHEDULED_UPDATE_INTERVAL     _HRESULT_TYPEDEF_(0x800C0F86L)      ")
  311. cpp_quote("")
  312. cpp_quote("// Scheduled update occurred during a restricted time")
  313. cpp_quote("#define INET_E_SCHEDULED_EXCLUDE_RANGE       _HRESULT_TYPEDEF_(0x800C0F87L)      ")
  314. cpp_quote("")
  315. cpp_quote("// Status codes used during updates")
  316. cpp_quote("")
  317. cpp_quote("// We are about to exceed our size limit during operation")
  318. cpp_quote("#define INET_E_AGENT_EXCEEDING_CACHE_SIZE    _HRESULT_TYPEDEF_(0x800C0F90L)      ")
  319. cpp_quote("")
  320. cpp_quote("// We extended the cache size")
  321. cpp_quote("#define INET_S_AGENT_INCREASED_CACHE_SIZE    _HRESULT_TYPEDEF_(0x000C0F90L)      ")
  322. cpp_quote("")
  323. cpp_quote("// End Information Delivery Agent definitions")
  324. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  325. cpp_quote("")
  326. cpp_quote("")