Leaked source code of windows server 2003
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.

622 lines
20 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1995.
  5. //
  6. // File: ActX.idl
  7. //
  8. // Contents:
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 11-17-1996 JohannP (Johann Posch) Created
  15. //
  16. //----------------------------------------------------------------------------
  17. import "objidl.idl";
  18. import "oleidl.idl";
  19. import "ocidl.idl";
  20. //import "propbag2.idl";
  21. interface IPackage;
  22. interface IAcceptor;
  23. interface ICourier;
  24. interface IPackageFilter;
  25. typedef GUID DESTID;
  26. typedef REFGUID REFDESTID;
  27. typedef [unique] IAcceptor *LPACCEPTOR;
  28. //+---------------------------------------------------------------------------
  29. //
  30. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  31. //
  32. // Contents: The package description and IPackage interface definition
  33. //
  34. // Description:
  35. //
  36. // Each package (IPackage) has an idendifier (ITEMID) which is a guid and
  37. // itentifies the package type
  38. //
  39. // An package is an object which can be send to a distination object via
  40. // a particular interface. The delivery mechanism can be a
  41. // scheduler or an advisor.
  42. //
  43. // The sources of an package can be any any object or module.
  44. //
  45. // An package can scheduled and delivered to the destination(s) according
  46. // the trigger time.
  47. //
  48. // An package might be as simple as an alert or notification. It can
  49. // be a full object form the cache or the docfile. It can be an
  50. // announcment and data might not be available yet.
  51. //
  52. // Many packages will in fact arrive with all data.
  53. //
  54. // The same object will expose I(Async)Moniker and the client
  55. // can call BindToXXX to bind to the object of the data.
  56. //
  57. //----------------------------------------------------------------------------
  58. typedef GUID PACKAGEID, *PPACKAGEID;
  59. typedef REFGUID REFPACKAGEID;
  60. cpp_quote("")
  61. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  62. cpp_quote("// Standard Package IDs ")
  63. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_NULL ;")
  64. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_ANOUNCMENT ;")
  65. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASK ;")
  66. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_ALERT ;")
  67. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_NOTIFICATION_INET_IDLE ;")
  68. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_NOTIFICATION_INET_OFFLINE ;")
  69. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_NOTIFICATION_INET_ONLINE ;")
  70. cpp_quote("")
  71. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASKS_SUSPEND ;")
  72. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASKS_RESUME ;")
  73. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASKS_ABORT ;")
  74. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASKS_COMPLETED ;")
  75. cpp_quote("EXTERN_C const PACKAGEID PACKAGEID_TASKS_PROGRESS ;")
  76. cpp_quote("")
  77. cpp_quote("#ifndef _LPPACKAGEOBJ")
  78. cpp_quote("#define _LPPACKAGEOBJ")
  79. [
  80. local,
  81. object,
  82. uuid(79eacbe1-baf9-11ce-8c82-00aa004ba90b),
  83. pointer_default(unique)
  84. ]
  85. interface IPackageObj : IPropertyBag
  86. {
  87. typedef [unique] IPackageObj *LPPACKAGEOBJ;
  88. //
  89. // information about the package itself
  90. // passed on by the creator of the package to the scheduler
  91. // and to the advisor
  92. typedef enum _tagPACKAGE_FLAGS
  93. {
  94. // the package is very simple and has no object, eg. alert
  95. PF_NO_OBJECT = 0x00000001
  96. // the package is not a simple object - is a derived object form Package
  97. ,PF_NO_SIMPLE_OBJECT = 0x00000002
  98. // package can not be persisted
  99. ,PF_NOT_PERSISTABLE = 0x00000004
  100. // the sender of the package wants to notified when done
  101. // the the package task
  102. ,PF_NEED_COMPLETIONREPORT = 0x00000004
  103. // the send wants progress report
  104. ,PF_NEED_PROGRESSREPORT = 0x00000008
  105. // the sender provides cookie
  106. ,PF_USE_COOKIE = 0x00000010
  107. // member of group - the packages
  108. // are delivered sequentiall - meaning
  109. // a completion report is send by each one
  110. ,PF_GROUP_SEQUENTIAL = 0x00000100
  111. // member of group - the packages
  112. // are delivered at the same time
  113. ,PF_GROUP_PARALLEL = 0x00000200
  114. } PACKAGE_FLAGS;
  115. //
  116. // Package data specific information
  117. // an package may have the following data components
  118. //
  119. typedef enum _tagPACKAGEDATA_FLAGS
  120. {
  121. // the package has data via the storage medium
  122. PD_DATA = 0x00000001
  123. // package has a URL
  124. ,PD_URL = 0x00000002
  125. // package has a name
  126. ,PD_NAME = 0x00000004
  127. // mime of package data is known
  128. ,PD_MIME = 0x00000008
  129. // class if package data is know
  130. ,PD_CLASSID = 0x00000010
  131. // package has a group id - obtained with GetTickCount
  132. ,PD_GRUPPID = 0x00000020
  133. // package is coming from the cache
  134. ,PD_FROMCACHE = 0x00010000
  135. // other flags
  136. ,PD_VOLATILE = 0x00020000
  137. } PACKAGEDATA_FLAGS;
  138. typedef struct _tagPackageData
  139. {
  140. ULONG cbSize;
  141. PACKAGE_FLAGS packageF;
  142. PACKAGEDATA_FLAGS packagedataF;
  143. // package specific information
  144. // what does the basic package need?
  145. LPOLESTR wzName;
  146. LPOLESTR wzUrl;
  147. LPOLESTR wzMime;
  148. CLSID clsid;
  149. // the prefered tymed the client wants the data
  150. TYMED tymedPrefered;
  151. STGMEDIUM stgmed;
  152. } PACKAGEDATA, *LPPACKAGEDATA;
  153. //
  154. // the package cookie is the time the package was scheduled
  155. // or created. the scheduler might map the cookie
  156. // the package cookie can be NULL.
  157. //
  158. typedef SYSTEMTIME PACKAGECOOKIE, *PPACKAGECOOKIE;
  159. //
  160. // the adivse mode indicates how the adivse should be done
  161. //
  162. typedef enum _tagDELIVERMODE
  163. {
  164. // packages are advised async be default
  165. //AM_ASYNCHRONOUS = 0x00000000
  166. // the package should be delivered sync
  167. DM_SYNCHRONOUS = 0x00000001
  168. // the package should be delivered input-sync
  169. ,DM_INPUTSYNCHRONOUS = 0x00000001
  170. // deliver package only if class is registered
  171. ,DM_ONLY_IF_RUNNING = 0x00000002
  172. // advise and close/release the class
  173. ,DM_RUN_AND_CLOSE = 0x00000004
  174. // send it delayed and compress
  175. // meaning all the package is delayed for
  176. // a certainrDestReports time - the last package of this kind
  177. // gets send
  178. ,DM_DELAY_AND_COMPRESS = 0x00000008
  179. // always deliver the package
  180. // even on was transmited just imedialty before
  181. ,DM_DELIVER_ALWAYS = 0x00000010
  182. } DELIVERMODE;
  183. typedef struct _tagPackage_X
  184. {
  185. ULONG cbSize;
  186. REFPACKAGEID rpackageid;
  187. LPPACKAGEOBJ pPackageObj;
  188. PACKAGE_FLAGS packageFlags;
  189. PACKAGEDATA_FLAGS packagedataFlags;
  190. PACKAGECOOKIE packageCookie;
  191. DELIVERMODE deliverMode;
  192. //REFDESTID rPackageDest;
  193. REFDESTID rReportDest;
  194. //LPACCEPTOR pAcceptorDest;
  195. DWORD dwReserved;
  196. } PACKAGE_X;
  197. typedef struct _tagDeliveryPackage
  198. {
  199. ULONG cbSize;
  200. // info about the package
  201. PPACKAGEID pPackageid;
  202. LPPACKAGEOBJ pPackageObj;
  203. PACKAGE_FLAGS PackageFlags;
  204. PACKAGECOOKIE PackageCookie;
  205. DWORD dwReserved;
  206. // info about transmiter
  207. // the acceptor can be NULL meaning
  208. // the tranmiter does not want progress
  209. LPACCEPTOR pAcceptorDest;
  210. } PACKAGE, *PPACKAGE;
  211. }
  212. cpp_quote("#endif")
  213. //+---------------------------------------------------------------------------
  214. //
  215. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  216. //
  217. // Contents: IAcceptor interface definition
  218. //
  219. // Description:
  220. //
  221. // The Acceptor is the interface where an package gets delivered too.
  222. //
  223. //----------------------------------------------------------------------------
  224. cpp_quote("#ifndef _LPACCEPTOR_DEFINED")
  225. cpp_quote("#define _LPACCEPTOR_DEFINED")
  226. [
  227. local,
  228. object,
  229. uuid(79eacbe2-baf9-11ce-8c82-00aa004ba90b),
  230. pointer_default(unique)
  231. ]
  232. interface IAcceptor : IUnknown
  233. {
  234. // typedef [unique] IAcceptor *LPACCEPTOR;
  235. HRESULT OnPackage(
  236. [in] PPACKAGE pPackage,
  237. [in] DWORD dwReserved
  238. );
  239. }
  240. cpp_quote("#endif")
  241. //
  242. // An acceptor can return the following scode, which means the sink support
  243. // the IAcceptor interface and it will send notifications on the task
  244. // progress
  245. //
  246. cpp_quote("#define AX_S_CAN_ADVISEON _HRESULT_TYPEDEF_(0x000401E9L) ")
  247. //+---------------------------------------------------------------------------
  248. //
  249. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  250. //
  251. // Contents: IPackageObj destination definition
  252. //
  253. // Description:
  254. //
  255. // Each Package needs to be delivered to one or more destinations.
  256. // A destination is indendified (DESTID) by a class id.
  257. //
  258. // The interface of the destination is an IAcceptor interface which
  259. // is described below.
  260. //
  261. //----------------------------------------------------------------------------
  262. //typedef GUID DESTID;
  263. //typedef REFGUID REFDESTID;
  264. cpp_quote("")
  265. cpp_quote("////////////////////////////////////////////////////////////////////////////")
  266. cpp_quote("// Default Destinations ")
  267. cpp_quote("EXTERN_C const DESTID DESTID_GLOBAL_COURIER ;")
  268. cpp_quote("EXTERN_C const DESTID DESTID_PROCESS_COURIER ;")
  269. cpp_quote("EXTERN_C const DESTID DESTID_THREAD_COURIER ;")
  270. cpp_quote("")
  271. //+---------------------------------------------------------------------------
  272. //
  273. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  274. //
  275. // Contents: IEnumPackage interface definition
  276. //
  277. // Description:
  278. //
  279. // Enumerator overn Packages.
  280. //
  281. //----------------------------------------------------------------------------
  282. cpp_quote("#ifndef _LPENUMPACKAGE_DEFINED")
  283. cpp_quote("#define _LPENUMPACKAGE_DEFINED")
  284. [
  285. local,
  286. object,
  287. uuid(79eacbe4-baf9-11ce-8c82-00aa004ba90b),
  288. pointer_default(unique)
  289. ]
  290. interface IEnumPackage : IUnknown
  291. {
  292. typedef [unique] IEnumPackage *LPENUMPACKAGE;
  293. [local]
  294. HRESULT Next(
  295. [in] ULONG celt,
  296. [out, size_is(celt), length_is(*pceltFetched)]
  297. PACKAGE *rgelt,
  298. [out] ULONG *pceltFetched);
  299. [call_as(Next)]
  300. HRESULT RemoteNext(
  301. [in] ULONG celt,
  302. [out, size_is(celt), length_is(*pceltFetched)]
  303. PACKAGE *rgelt,
  304. [out] ULONG *pceltFetched);
  305. HRESULT Skip(
  306. [in] ULONG celt);
  307. HRESULT Reset();
  308. HRESULT Clone(
  309. [out] IEnumPackage **ppenum);
  310. }
  311. cpp_quote("#endif")
  312. //+---------------------------------------------------------------------------
  313. //
  314. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  315. //
  316. // Contents: ICourier interface definition
  317. //
  318. // Description:
  319. //
  320. // This is the object provide by webcheck will can start listening on
  321. // different protocols (APP) by using the custom verb "listen".
  322. //
  323. // The clien can also add an package to the agents scheduler or spooler which
  324. // will the package deliver to a distination at a given "WHEN"
  325. //
  326. //----------------------------------------------------------------------------
  327. cpp_quote("#ifndef _LPCOURIER_DEFINED")
  328. cpp_quote("#define _LPCOURIER_DEFINED")
  329. [
  330. local,
  331. object,
  332. uuid(79eacbe6-baf9-11ce-8c82-00aa004ba90b),
  333. pointer_default(unique)
  334. ]
  335. interface ICourier : IUnknown
  336. {
  337. typedef [unique] ICourier *LPCOURIER;
  338. typedef enum _tagACCEPTOR_MODE
  339. {
  340. //AM_All = 0x00000001
  341. // exclusive means deliver only
  342. // package of the registered type
  343. AM_Exclusive = 0x00000001
  344. // launch me if an package of
  345. // registered types arrives
  346. ,AM_Intantiate = 0x00000002
  347. } ACCEPTORMODE;
  348. #define TASK_SUNDAY (0x1)
  349. #define TASK_MONDAY (0x2)
  350. #define TASK_TUESDAY (0x4)
  351. #define TASK_WEDNESDAY (0x8)
  352. #define TASK_THURSDAY (0x10)
  353. #define TASK_FRIDAY (0x20)
  354. #define TASK_SATURDAY (0x40)
  355. #define TASK_FIRST_WEEK (1)
  356. #define TASK_SECOND_WEEK (2)
  357. #define TASK_THIRD_WEEK (3)
  358. #define TASK_FOURTH_WEEK (4)
  359. #define TASK_LAST_WEEK (5)
  360. #define TASK_JANUARY (0x1)
  361. #define TASK_FEBRUARY (0x2)
  362. #define TASK_MARCH (0x4)
  363. #define TASK_APRIL (0x8)
  364. #define TASK_MAY (0x10)
  365. #define TASK_JUNE (0x20)
  366. #define TASK_JULY (0x40)
  367. #define TASK_AUGUST (0x80)
  368. #define TASK_SEPTEMBER (0x100)
  369. #define TASK_OCTOBER (0x200)
  370. #define TASK_NOVEMBER (0x400)
  371. #define TASK_DECEMBER (0x800)
  372. #define TASK_FLAG_INTERACTIVE (0x1)
  373. #define TASK_FLAG_DELETE_WHEN_DONE (0x2)
  374. #define TASK_FLAG_DISABLED (0x4)
  375. #define TASK_FLAG_HALT_ON_ERROR (0x8)
  376. #define TASK_FLAG_START_ONLY_IF_IDLE (0x10)
  377. #define TASK_FLAG_KILL_ON_IDLE_END (0x20)
  378. #define TASK_FLAG_DONT_START_IF_ON_BATTERIES (0x40)
  379. #define TASK_FLAG_KILL_IF_GOING_ON_BATTERIES (0x80)
  380. #define TASK_FLAG_RUN_ONLY_IF_DOCKED (0x100)
  381. #define TASK_FLAG_HIDDEN (0x200)
  382. #define TASK_TRIGGER_FLAG_HAS_END_DATE (0x1)
  383. #define TASK_TRIGGER_FLAG_KILL_AT_DURATION_END (0x2)
  384. #define TASK_TRIGGER_FLAG_DISABLED (0x4)
  385. #define TASK_TRIGGER_FLAG_LAST_DAY_OF_MONTH (0x8)
  386. #define TASK_MAX_RUN_TIMES ( 1440 )
  387. typedef
  388. enum _TASK_TRIGGER_TYPE
  389. { TASK_TIME_TRIGGER_ONCE = 0,
  390. TASK_TIME_TRIGGER_DAILY = 1,
  391. TASK_TIME_TRIGGER_WEEKLY = 2,
  392. TASK_TIME_TRIGGER_MONTHLYDATE = 3,
  393. TASK_TIME_TRIGGER_MONTHLYDOW = 4,
  394. TASK_EVENT_TRIGGER_ON_IDLE = 5,
  395. TASK_EVENT_TRIGGER_AT_SYSTEMSTART = 6,
  396. TASK_EVENT_TRIGGER_AT_LOGON = 7
  397. } TASK_TRIGGER_TYPE;
  398. typedef enum _TASK_TRIGGER_TYPE *PTASK_TRIGGER_TYPE;
  399. typedef struct _DAILY
  400. {
  401. WORD DaysInterval;
  402. } DAILY;
  403. typedef struct _WEEKLY
  404. {
  405. WORD WeeksInterval;
  406. WORD rgfDaysOfTheWeek;
  407. } WEEKLY;
  408. typedef struct _MONTHLYDATE
  409. {
  410. DWORD rgfDays;
  411. WORD rgfMonths;
  412. } MONTHLYDATE;
  413. typedef struct _MONTHLYDOW
  414. {
  415. WORD wWhichWeek;
  416. WORD rgfDaysOfTheWeek;
  417. WORD rgfMonths;
  418. } MONTHLYDOW;
  419. typedef union _TRIGGER_TYPE_UNION
  420. {
  421. DAILY Daily;
  422. WEEKLY Weekly;
  423. MONTHLYDATE MonthlyDate;
  424. MONTHLYDOW MonthlyDOW;
  425. } TRIGGER_TYPE_UNION;
  426. typedef struct _TASK_TRIGGER
  427. {
  428. WORD cbTriggerSize;
  429. WORD Reserved;
  430. WORD wBeginYear;
  431. WORD wBeginMonth;
  432. WORD wBeginDay;
  433. WORD wEndYear;
  434. WORD wEndMonth;
  435. WORD wEndDay;
  436. WORD wStartHour;
  437. WORD wStartMinute;
  438. DWORD MinutesDuration;
  439. DWORD MinutesInterval;
  440. DWORD rgFlags;
  441. TASK_TRIGGER_TYPE TriggerType;
  442. TRIGGER_TYPE_UNION Type;
  443. } TASK_TRIGGER;
  444. typedef struct _TASK_TRIGGER *PTASK_TRIGGER;
  445. HRESULT Register(
  446. [in] LPACCEPTOR pAcceptor, // can be null - see mode
  447. [in] REFDESTID rPackageDest,
  448. [in] ACCEPTORMODE asMode,
  449. [in] ULONG cPackages,
  450. [in] PPACKAGEID pPackageIDs,
  451. [in] DWORD dwReserved
  452. );
  453. HRESULT Unregister(
  454. [in] REFDESTID rPackageDest,
  455. [in] ULONG cPackages,
  456. [in] PPACKAGEID pPackageIDs
  457. );
  458. // deliver a package to a specific class object such as mail
  459. // the class object will be instantiated
  460. HRESULT DeliverPackage(
  461. // info about who the sender
  462. [in] REFCLSID rclsidSender, // class of sender
  463. [in] LPACCEPTOR pAcceptor, // can be null - see mode
  464. // the package
  465. [in] PPACKAGE pPackage,
  466. // deliver and schedule data
  467. [in] DELIVERMODE deliverMode,
  468. [in] PTASK_TRIGGER pschdata,
  469. // destination
  470. [in] REFDESTID rPackageDest,
  471. // return info - cookie of package
  472. [in, out] PPACKAGECOOKIE ppackageCookie,
  473. [in] DWORD dwReserved
  474. );
  475. HRESULT CreatePackage(
  476. [in] PPACKAGEID pPackageid,
  477. [in] PACKAGE_FLAGS PackageFlags,
  478. [in] PACKAGECOOKIE packageCookie,
  479. // return info - the new package
  480. [in] ULONG cPackages,
  481. [out] PPACKAGE pPackage,
  482. [in] DWORD dwReserved
  483. );
  484. HRESULT RevokePackage(
  485. [in] PPACKAGECOOKIE ppackageCookie,
  486. [in] DWORD dwMode
  487. );
  488. HRESULT GetEnumPackage(
  489. [out] LPENUMPACKAGE pEnumPackage
  490. );
  491. }
  492. cpp_quote("#endif")
  493. //+---------------------------------------------------------------------------
  494. //
  495. // Copyright (C) Microsoft Corporation, 1995 - 1996.
  496. //
  497. // Contents: IPackageObjFilter interface definition
  498. //
  499. // Description: Not done yet!
  500. //
  501. // Used to filter anouncment of mc protocols.
  502. //
  503. //----------------------------------------------------------------------------
  504. cpp_quote("#ifndef _LPPACKAGEOBJFILTER_DEFINED")
  505. cpp_quote("#define _LPPACKAGEOBJFILTER_DEFINED")
  506. [
  507. local,
  508. object,
  509. uuid(79eacbe7-baf9-11ce-8c82-00aa004ba90b),
  510. pointer_default(unique)
  511. ]
  512. interface IPackageObjFilter : IUnknown
  513. {
  514. typedef [unique] IPackageObjFilter *LPPACKAGEOBJFILTER;
  515. typedef struct _tagAnouncmentData
  516. {
  517. ULONG cbSize;
  518. // more info about category etc.
  519. DWORD dwCategory;
  520. LPWSTR pwzFriendlyName;
  521. LPCWSTR pwzUrl;
  522. } ANOUNCMENTDATA, *LPANOUNCMENTDATA;
  523. HRESULT Anouncment(
  524. [in] ANOUNCMENTDATA *pAnouncementData,
  525. [in] DWORD dwReserved
  526. );
  527. }
  528. cpp_quote("#endif")