bits1_5.idl 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. /*
  2. * Background Intelligent Transfer Service (BITS) 1.5 interface
  3. *
  4. * Copyright 2008 Google (Dan Hipschman)
  5. *
  6. * This library is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 2.1 of the License, or (at your option) any later version.
  10. *
  11. * This library is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public
  17. * License along with this library; if not, write to the Free Software
  18. * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
  19. *
  20. */
  21. #ifndef DO_NO_IMPORTS
  22. import "bits.idl";
  23. #endif
  24. [
  25. uuid(54b50739-686f-45eb-9dff-d6a9a0faa9af),
  26. odl
  27. ]
  28. interface IBackgroundCopyJob2 : IBackgroundCopyJob
  29. {
  30. HRESULT SetNotifyCmdLine([unique] LPCWSTR prog, [unique] LPCWSTR params);
  31. HRESULT GetNotifyCmdLine([out] LPWSTR *prog, [out] LPWSTR *params);
  32. typedef struct _BG_JOB_REPLY_PROGRESS
  33. {
  34. UINT64 BytesTotal;
  35. UINT64 BytesTransferred;
  36. } BG_JOB_REPLY_PROGRESS;
  37. HRESULT GetReplyProgress([in, out] BG_JOB_REPLY_PROGRESS *progress);
  38. HRESULT GetReplyData([out, size_is( , (unsigned long) *pLength)] byte **pBuffer,
  39. [in, out, unique] UINT64 *pLength);
  40. HRESULT SetReplyFileName([unique] LPCWSTR filename);
  41. HRESULT GetReplyFileName([out] LPWSTR *pFilename);
  42. typedef enum
  43. {
  44. BG_AUTH_TARGET_SERVER = 1,
  45. BG_AUTH_TARGET_PROXY
  46. } BG_AUTH_TARGET;
  47. typedef enum
  48. {
  49. BG_AUTH_SCHEME_BASIC = 1,
  50. BG_AUTH_SCHEME_DIGEST,
  51. BG_AUTH_SCHEME_NTLM,
  52. BG_AUTH_SCHEME_NEGOTIATE,
  53. BG_AUTH_SCHEME_PASSPORT
  54. } BG_AUTH_SCHEME;
  55. typedef struct
  56. {
  57. LPWSTR UserName;
  58. LPWSTR Password;
  59. } BG_BASIC_CREDENTIALS;
  60. typedef BG_BASIC_CREDENTIALS *PBG_BASIC_CREDENTIALS;
  61. typedef [switch_type(BG_AUTH_SCHEME)] union
  62. {
  63. [case(BG_AUTH_SCHEME_BASIC, BG_AUTH_SCHEME_DIGEST, BG_AUTH_SCHEME_NTLM,
  64. BG_AUTH_SCHEME_NEGOTIATE, BG_AUTH_SCHEME_PASSPORT)]
  65. BG_BASIC_CREDENTIALS Basic;
  66. [default]
  67. ;
  68. } BG_AUTH_CREDENTIALS_UNION;
  69. typedef struct
  70. {
  71. BG_AUTH_TARGET Target;
  72. BG_AUTH_SCHEME Scheme;
  73. [switch_is(Scheme)] BG_AUTH_CREDENTIALS_UNION Credentials;
  74. } BG_AUTH_CREDENTIALS;
  75. typedef BG_AUTH_CREDENTIALS *PBG_AUTH_CREDENTIALS;
  76. HRESULT SetCredentials(BG_AUTH_CREDENTIALS *cred);
  77. HRESULT RemoveCredentials(BG_AUTH_TARGET target, BG_AUTH_SCHEME scheme);
  78. }
  79. [
  80. uuid(ea9319ea-c628-480f-8331-768fac397e4e),
  81. lcid(0x0000),
  82. version(1.0)
  83. ]
  84. library BackgroundCopyManager1_5
  85. {
  86. [
  87. uuid(f087771f-d74f-4c1a-bb8a-e16aca9124ea)
  88. ]
  89. coclass BackgroundCopyManager1_5
  90. {
  91. [default] interface IBackgroundCopyManager;
  92. };
  93. interface IBackgroundCopyCallback;
  94. interface IBackgroundCopyJob2;
  95. }
  96. cpp_quote("#include \"bits2_0.h\"")