chromium/chrome/updater/app/server/win/updater_legacy_idl.template

// Copyright 2020 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import "oaidl.idl";
import "ocidl.idl";

// Backward-compatible, Omaha public interfaces copied from omaha3_idl.idl.

// The normal install flow proceeds from STATE_INIT through
// STATE_INSTALL_COMPLETE in order, skipping states that are not relevant.
// All exceptions and terminal states are start with STATE_INSTALL_COMPLETE.
typedef enum CurrentState {
  STATE_INIT = 1,
  STATE_WAITING_TO_CHECK_FOR_UPDATE = 2,
  STATE_CHECKING_FOR_UPDATE = 3,
  STATE_UPDATE_AVAILABLE = 4,
  STATE_WAITING_TO_DOWNLOAD = 5,
  STATE_RETRYING_DOWNLOAD = 6,
  STATE_DOWNLOADING = 7,
  STATE_DOWNLOAD_COMPLETE = 8,
  STATE_EXTRACTING = 9,
  STATE_APPLYING_DIFFERENTIAL_PATCH = 10,
  STATE_READY_TO_INSTALL = 11,
  STATE_WAITING_TO_INSTALL = 12,
  STATE_INSTALLING = 13,
  STATE_INSTALL_COMPLETE = 14,
  STATE_PAUSED = 15,
  STATE_NO_UPDATE = 16,
  STATE_ERROR = 17,
} CurrentState;

enum AppCommandStatus {
  // The command has never been executed.
  COMMAND_STATUS_INIT = 1,
  // The command is running.
  COMMAND_STATUS_RUNNING = 2,
  // An error occurred while launching or monitoring the command.
  COMMAND_STATUS_ERROR = 3,
  // The command has completed execution.
  COMMAND_STATUS_COMPLETE = 4,
};

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-AC817E10-993C-470F-8DCA-25F53D70EA8D",
      "system":"PLACEHOLDER-GUID-9367601E-C100-4702-8755-808D6BB385D8"
    },
    "tokensToSuffix": ["IAppVersionWeb"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-AA10D17D-7A09-48AC-B1E4-F124937E3D26),
  helpstring("IAppVersionWeb Interface"),
  pointer_default(unique)
]
interface IAppVersionWeb : IDispatch {
  [propget] HRESULT version([out, retval] BSTR*);

  // Returns the count of the Packages in the AppVersion.
  [propget] HRESULT packageCount([out, retval] long* count);

  // Returns an IDispatch of the Package in the AppVersion at the specified
  // 0-based index.
  [propget] HRESULT packageWeb([in] long index,
                               [out, retval] IDispatch** package);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-31479718-D170-467B-9274-27FC3E88CB76",
      "system":"PLACEHOLDER-GUID-71CBC6BB-CA4B-4B5A-83C0-FC95F9CA6A30"
    },
    "tokensToSuffix": ["ICurrentState"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-A643508B-B1E3-4457-9769-32C953BD1D57),
  helpstring("ICurrentState Interface"),
  pointer_default(unique)
]
interface ICurrentState : IDispatch {
  // This interface is exposed to web clients!

  // A value from the CurrentState enum. This value determines which of the
  // properties below are valid.
  [propget] HRESULT stateValue([out, retval] LONG*);

  // The remaining properties are only valid in the specified states. For all
  // other states, the values are not specified.

  // This property is valid only when stateValue is STATE_UPDATE_AVAILABLE.
  [propget] HRESULT availableVersion([out, retval] BSTR*);

  // The following three properties are only valid when stateValue is
  // STATE_WAITING_TO_DOWNLOAD, STATE_RETRYING_DOWNLOAD, STATE_DOWNLOADING,
  // STATE_DOWNLOAD_COMPLETE, STATE_EXTRACTING,
  // STATE_APPLYING_DIFFERENTIAL_PATCH, or STATE_READY_TO_INSTALL.

  // Bytes downloaded so far.
  [propget] HRESULT bytesDownloaded([out, retval] ULONG*);

  // Total bytes to download.
  [propget] HRESULT totalBytesToDownload([out, retval] ULONG*);

  // Estimated download time remaining in ms. -1 indicates unknown.
  // Progress may not always be available, so clients should handle the -1 case.
  [propget] HRESULT downloadTimeRemainingMs([out, retval] LONG*);

  [propget] HRESULT nextRetryTime([out, retval] ULONGLONG*);

  // The following two properties are only valid when stateValue is
  // STATE_INSTALLING or STATE_INSTALL_COMPLETE.

  // Current install progress in percentage from 0 to 100. -1 indicates unknown.
  // Progress may not always be available, so clients should handle the -1 case.
  [propget] HRESULT installProgress([out, retval] LONG*);

  // Estimated download time remaining in ms. -1 indicates unknown.
  // Progress may not always be available, so clients should handle the -1 case.
  [propget] HRESULT installTimeRemainingMs([out, retval] LONG*);

  // The following four properties are only valid when stateValue is
  // STATE_ERROR:

  // Returns true if the app has been canceled.
  [propget] HRESULT isCanceled([out, retval] VARIANT_BOOL* is_canceled);

  // Error code.
  [propget] HRESULT errorCode([out, retval] LONG*);

  // Error extra code.
  [propget] HRESULT extraCode1([out, retval] LONG*);

  // The following three properties are only valid when stateValue is
  // STATE_ERROR or STATE_INSTALL_COMPLETE.
  //
  // Completion message, localized in the specified language.
  [propget] HRESULT completionMessage([out, retval] BSTR*);

  // Application installer result code. This is to be used as additional
  // information only. Success/failure should be determined using errorCode.
  // This is an error if errorCode is GOOPDATEINSTALL_E_INSTALLER_FAILED.
  [propget] HRESULT installerResultCode([out, retval] LONG*);

  // Application installer extra code.
  [propget] HRESULT installerResultExtraCode1([out, retval] LONG*);

  // A command that needs to be launched by the client after installation.
  [propget] HRESULT postInstallLaunchCommandLine([out, retval] BSTR*);

  // URL to be launched after restarting the browser.
  [propget] HRESULT postInstallUrl([out, retval] BSTR*);

  // Returns a PostInstallAction value indicating the action to be taken by the
  // client after installation.
  [propget] HRESULT postInstallAction([out, retval] LONG*);
}
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-EE8EE731-C592-4A4F-9774-BB04337B8F46",
      "system":"PLACEHOLDER-GUID-AE5F8C9D-B94D-4367-A422-D1DC4E913A52"
    },
    "tokensToSuffix": ["IGoogleUpdate3Web"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-A35E1C5E-0A18-4FF1-8C4D-DD8ED07B0BD0),
  helpstring("IGoogleUpdate3Web Interface"),
  pointer_default(unique)
]
interface IGoogleUpdate3Web : IDispatch {
  HRESULT createAppBundleWeb([out, retval] IDispatch** app_bundle_web);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-CE7A37FD-A255-460C-BAF1-708765EB76EC",
      "system":"PLACEHOLDER-GUID-BFFD766D-A2DD-436E-89FA-BF05BC5B5958"
    },
    "tokensToSuffix": ["IAppBundleWeb"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-0569DBB9-BAA0-48D5-8543-0F3BE30A1648),
  helpstring("IAppBundleWeb Interface"),
  pointer_default(unique)
]
interface IAppBundleWeb : IDispatch {
  [id(2)] HRESULT createApp([in] BSTR app_guid,
                            [in] BSTR brand_code,
                            [in] BSTR language,
                            [in] BSTR ap);
  [id(3)] HRESULT createInstalledApp([in] BSTR app_id);
  [id(4)] HRESULT createAllInstalledApps();

  [propget] HRESULT displayLanguage([out, retval] BSTR*);
  [propput] HRESULT displayLanguage([in] BSTR);

  [propput] HRESULT parentHWND([in] ULONG_PTR hwnd);

  [propget] HRESULT length([out, retval] int* index);
  [id(DISPID_VALUE), propget] HRESULT appWeb(
      [in] int index, [out, retval] IDispatch** app_web);

  HRESULT initialize();

  HRESULT checkForUpdate();
  HRESULT download();
  HRESULT install();

  HRESULT pause();
  HRESULT resume();
  HRESULT cancel();

  HRESULT downloadPackage([in] BSTR app_id, [in] BSTR package_name);

  [propget] HRESULT currentState([out, retval] VARIANT* current_state);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-47B9D508-CB72-4F8B-AF00-7D0143603B25",
      "system":"PLACEHOLDER-GUID-540B227A-F442-45D5-BA52-298A05BAF1A8"
    },
    "tokensToSuffix": ["IAppWeb"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-63D941DE-F67B-4E15-8A90-27881DA9EF4A),
  helpstring("IAppWeb Interface"),
  pointer_default(unique)
]
interface IAppWeb : IDispatch {
  [propget] HRESULT appId([out, retval] BSTR*);

  // Returns an IAppVersionWeb IDispatch object.
  [propget] HRESULT currentVersionWeb([out, retval] IDispatch** current);
  [propget] HRESULT nextVersionWeb([out, retval] IDispatch** next);

  // Returns an IAppCommandWeb IDispatch object, or NULL.
  [propget] HRESULT command([in] BSTR command_id,
                            [out, retval] IDispatch** command);

  HRESULT cancel();

  [propget] HRESULT currentState([out, retval] IDispatch** current_state);

  HRESULT launch();
  HRESULT uninstall();

  [propget] HRESULT serverInstallDataIndex([out, retval] BSTR*);
  [propput] HRESULT serverInstallDataIndex([in] BSTR);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-5515E66F-FA6F-4D74-B5EA-4FCFDA16FE12",
      "system":"PLACEHOLDER-GUID-C6E2C5D5-86FA-4A64-9D08-8C9B644F0E49"
    },
    "tokensToSuffix": ["IAppCommandWeb"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-10A2D03F-8BC7-49DB-A21E-A7D4429D2759),
  helpstring("IAppCommandWeb Interface"),
  pointer_default(unique)
]
interface IAppCommandWeb : IDispatch {
  // Use values from the AppCommandStatus enum.
  [propget] HRESULT status([out, retval] UINT*);
  [propget] HRESULT exitCode([out, retval] DWORD*);
  [propget] HRESULT output([out, retval] BSTR*);
  HRESULT execute([in, optional] VARIANT substitution1,
                  [in, optional] VARIANT substitution2,
                  [in, optional] VARIANT substitution3,
                  [in, optional] VARIANT substitution4,
                  [in, optional] VARIANT substitution5,
                  [in, optional] VARIANT substitution6,
                  [in, optional] VARIANT substitution7,
                  [in, optional] VARIANT substitution8,
                  [in, optional] VARIANT substitution9);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-EF739C0C-40B0-478D-B76B-3659B8F2B0EB",
      "system":"PLACEHOLDER-GUID-F3964464-A939-44D3-9244-36BD2E3630B8"
    },
    "tokensToSuffix": ["IPolicyStatus"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-6A54FE75-EDC8-404E-A41B-4278C0557151),
  helpstring("IPolicyStatus Interface"),
  pointer_default(unique)
]
interface IPolicyStatus : IDispatch {
  // Global Update Policies

  // Returns the time interval between update checks in minutes.
  // 0 indicates updates are disabled.
  [propget] HRESULT lastCheckPeriodMinutes([out, retval] DWORD* minutes);

  // For domain-joined machines, returns the suppressed times if any, and also
  // checks the current time against the times that updates are suppressed.
  // Updates are suppressed if the current time falls between the start time and
  // the duration.
  // The duration does not account for daylight savings time. For instance, if
  // the start time is 22:00 hours, and with a duration of 8 hours, the updates
  // will be suppressed for 8 hours regardless of whether daylight savings time
  // changes happen in between.
  [propget] HRESULT updatesSuppressedTimes(
      [out] DWORD* start_hour,
      [out] DWORD* start_min,
      [out] DWORD* duration_min,
      [out] VARIANT_BOOL* are_updates_suppressed);

  // Returns the value of the "DownloadPreference" group policy or an
  // empty string if the group policy does not exist, the policy is unknown, or
  // an error happened.
  [propget] HRESULT downloadPreferenceGroupPolicy([out, retval] BSTR* pref);

  // Gets the total disk size limit for cached packages. When this limit is hit,
  // packages may be deleted from oldest until total size is below the limit.
  [propget] HRESULT packageCacheSizeLimitMBytes([out, retval] DWORD* limit);

  // Gets the package cache life limit. If a cached package is older than this
  // limit, it may be deleted.
  [propget] HRESULT packageCacheExpirationTimeDays([out, retval] DWORD* days);

  // Application Update Policies

  // Returns 1 if installation of the specified app is allowed.
  // Otherwise, returns 0.
  [propget] HRESULT effectivePolicyForAppInstalls([in] BSTR app_id,
                                                  [out, retval] DWORD* policy);

  // Returns 1 if updates of the specified app is allowed.
  // Otherwise, returns one of 0 (Disabled), 2 (ManualUpdatesOnly), or
  // 3 (AutomaticUpdatesOnly).
  [propget] HRESULT effectivePolicyForAppUpdates([in] BSTR app_id,
                                                 [out, retval] DWORD* policy);

  // Returns the target version prefix for the app, if the machine is joined to
  // a domain and has the corresponding policy set.
  // Examples:
  // * "" (or not configured): update to latest version available.
  // * "55.": update to any minor version of 55 (e.g. 55.24.34 or 55.60.2).
  // * "55.2.": update to any minor version of 55.2 (e.g. 55.2.34 or 55.2.2).
  // * "55.24.34": update to this specific version only.
  [propget] HRESULT targetVersionPrefix([in] BSTR app_id,
                                        [out, retval] BSTR* prefix);

  // Returns whether the RollbackToTargetVersion policy has been set for the
  // app. Setting RollbackToTargetVersion will result in a version downgrade if
  // the app version on the client is higher than the version on the server.
  // This could happen under circumstances such as:
  // - TargetVersionPrefix is used to pick an older version on the channel.
  // - TargetChannel is used to move the client to a channel with a lower
  //   version (e.g., Dev/Beta to Beta/Stable).
  // - A user somehow installed a newer version on the client.
  // When not set, a client will not receive updates until the app version on
  // the server passes the version on the client.
  [propget] HRESULT isRollbackToTargetVersionAllowed(
      [in] BSTR app_id,
      [out, retval] VARIANT_BOOL* rollback_allowed);
};
END_INTERFACE

// IPolicyStatusValue represents the managed state of a single Google Update
// policy. It contains the current source and value, as well as if any conflicts
// exist with that policy.
BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-7E0A6B39-7CEB-4944-ABFA-F419D201D6A0",
      "system":"PLACEHOLDER-GUID-CC2CCD05-119C-44E1-852D-6DCC2DFB72EC"
    },
    "tokensToSuffix": ["IPolicyStatusValue"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-2A7D2AE7-8EEE-45B4-B17F-31DAAC82CCBB),
  helpstring("IPolicyStatusValue Interface"),
  pointer_default(unique)
]
interface IPolicyStatusValue : IDispatch {
  [propget] HRESULT source([out, retval] BSTR*);
  [propget] HRESULT value([out, retval] BSTR*);
  [propget] HRESULT hasConflict([out, retval] VARIANT_BOOL* has_conflict);
  [propget] HRESULT conflictSource([out, retval] BSTR*);
  [propget] HRESULT conflictValue([out, retval] BSTR*);
}
END_INTERFACE

// IPolicyStatus2 exposes the following:
// * properties for Google Update that includes Global Update state, such as the
//   Version of the Updater, the Time that Updates were checked for last.
// * A way to refresh the latest policies from the DM Server.
// * the managed state of Omaha policies. Each policy returns an
//   IPolicyStatusValue that can be queried for the current source and value, as
//   well as if any conflicts exist with that policy.
//   IPolicyStatusValue is implemented by an object that marshals itself by
//   value. To get the "current" value, the policy needs to be queried fresh.
BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-AD91C851-86AC-499F-9BA9-9A561744AA4D",
      "system":"PLACEHOLDER-GUID-F4A0362A-3702-48B8-9896-7D8013D03AB2"
    },
    "tokensToSuffix": ["IPolicyStatus2", "IPolicyStatusValue"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-06A6AA1E-2680-4076-A7CD-6053722CF454),
  helpstring("IPolicyStatus2 Interface"),
  pointer_default(unique)
]
interface IPolicyStatus2 : IDispatch {
  // Global Update Status.

  // Returns the running version of the Updater. For instance, 1.3.35.454.
  [propget] HRESULT updaterVersion([out, retval] BSTR* version);

  // Returns the last time that the Updater successfully checked for updates.
  [propget] HRESULT lastCheckedTime([out, retval] DATE* last_checked);

  // DM policy cache refresh.

  // Gets the latest policies from the DM Server.
  HRESULT refreshPolicies();

  // Global Update Policies

  // Returns the time interval between update checks in minutes.
  // 0 indicates updates are disabled.
  [propget] HRESULT lastCheckPeriodMinutes(
      [out, retval] IPolicyStatusValue** value);

  // For domain-joined machines, returns the suppressed times if any, and also
  // checks the current time against the times that updates are suppressed.
  // Updates are suppressed if the current time falls between the start time and
  // the duration.
  // The duration does not account for daylight savings time. For instance, if
  // the start time is 22:00 hours, and with a duration of 8 hours, the updates
  // will be suppressed for 8 hours regardless of whether daylight savings time
  // changes happen in between.
  [propget] HRESULT updatesSuppressedTimes(
      [out] IPolicyStatusValue** value,
      VARIANT_BOOL* are_updates_suppressed);

  // Returns the value of the "DownloadPreference" group policy or an
  // empty string if the group policy does not exist, the policy is unknown, or
  // an error happened.
  [propget] HRESULT downloadPreferenceGroupPolicy(
      [out, retval] IPolicyStatusValue** value);

  // Gets the total disk size limit for cached packages. When this limit is hit,
  // packages may be deleted from oldest until total size is below the limit.
  [propget] HRESULT packageCacheSizeLimitMBytes(
      [out, retval] IPolicyStatusValue** value);

  // Gets the package cache life limit. If a cached package is older than this
  // limit, it may be deleted.
  [propget] HRESULT packageCacheExpirationTimeDays(
      [out, retval] IPolicyStatusValue** value);

  // Gets the proxy policy values.
  [propget] HRESULT proxyMode([out, retval] IPolicyStatusValue** value);
  [propget] HRESULT proxyPacUrl([out, retval] IPolicyStatusValue** value);
  [propget] HRESULT proxyServer([out, retval] IPolicyStatusValue** value);

  // Application Update Policies

  // Returns 1 if installation of the specified app is allowed.
  // Otherwise, returns 0.
  [propget] HRESULT effectivePolicyForAppInstalls(
      [in] BSTR app_id,
      [out, retval] IPolicyStatusValue** value);

  // Returns 1 if updates of the specified app is allowed.
  // Otherwise, returns one of 0 (Disabled), 2 (ManualUpdatesOnly), or
  // 3 (AutomaticUpdatesOnly).
  [propget] HRESULT effectivePolicyForAppUpdates(
      [in] BSTR app_id,
      [out, retval] IPolicyStatusValue** value);

  // Returns the target version prefix for the app, if the machine is joined to
  // a domain and has the corresponding policy set.
  // Examples:
  // * "" (or not configured): update to latest version available.
  // * "55.": update to any minor version of 55 (e.g. 55.24.34 or 55.60.2).
  // * "55.2.": update to any minor version of 55.2 (e.g. 55.2.34 or 55.2.2).
  // * "55.24.34": update to this specific version only.
  [propget] HRESULT targetVersionPrefix(
      [in] BSTR app_id,
      [out, retval] IPolicyStatusValue** value);

  // Returns whether the RollbackToTargetVersion policy has been set for the
  // app. If RollbackToTargetVersion is set, the TargetVersionPrefix policy
  // governs the version to rollback clients with higher versions to.
  [propget] HRESULT isRollbackToTargetVersionAllowed(
      [in] BSTR app_id, [out, retval] IPolicyStatusValue** value);

  // Returns the target channel for the app, if the machine is joined to a
  // domain and has the corresponding policy set.
  [propget] HRESULT targetChannel([in] BSTR app_id,
                                  [out, retval] IPolicyStatusValue** value);
};
END_INTERFACE

// IPolicyStatus3 exposes everything IPolicyStatus2 does, and in addition,
// exposes the forceInstallApps policy.
BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-BC39E1E1-E8FA-4E72-903F-3BF346E7E165",
      "system":"PLACEHOLDER-GUID-7B26CC23-B2B8-441B-AA9C-8B551ABB611B"
    },
    "tokensToSuffix": ["IPolicyStatus3", "IPolicyStatus2",
                       "IPolicyStatusValue"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-029BD175-5035-4E2A-8724-C9D47F4FAEA3),
  helpstring("IPolicyStatus3 Interface"),
  pointer_default(unique)
]
interface IPolicyStatus3 : IPolicyStatus2 {
  // Global Update Policies

  [propget] HRESULT forceInstallApps([in] VARIANT_BOOL is_machine,
                                     [out, retval] IPolicyStatusValue** value);
};
END_INTERFACE

// IPolicyStatus4 exposes everything IPolicyStatus3 does, and in addition,
// exposes the cloudPolicyOverridesPlatformPolicy policy.
BEGIN_INTERFACE(
  {
    "uuid": {
      "user":"PLACEHOLDER-GUID-0F6696F3-7F48-446B-97FA-6B34EC2ADB32",
      "system":"PLACEHOLDER-GUID-423FDEC3-0DBC-441E-B51D-FD8B82B9DCF2"
    },
    "tokensToSuffix": ["IPolicyStatus4", "IPolicyStatus3",
                       "IPolicyStatusValue"],
    "addToLibrary": ["", "user", "system"]
  }
)
[
  object,
  dual,
  uuid(PLACEHOLDER-GUID-C07BC046-32E0-4184-BC9F-13C4533C24AC),
  helpstring("IPolicyStatus4 Interface"),
  pointer_default(unique)
]
interface IPolicyStatus4 : IPolicyStatus3 {
  [propget] HRESULT cloudPolicyOverridesPlatformPolicy(
      [out, retval] IPolicyStatusValue** value);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "system":"PLACEHOLDER-GUID-FFBAEC45-C5EC-4287-85CD-A831796BE952"
    },
    "tokensToSuffix": ["IProcessLauncher"],
    "addToLibrary": ["", "system"],
    "includeFor": ["system"]
  }
)
[
  object,
  oleautomation,
  uuid(PLACEHOLDER-GUID-4779D540-F6A3-455F-A929-7ADFE85B6F09),
  helpstring("Google Update IProcessLauncher Interface"),
  pointer_default(unique)
]
interface IProcessLauncher : IUnknown {
  HRESULT LaunchCmdLine([in, string] const WCHAR* cmd_line);
  HRESULT LaunchBrowser([in] DWORD browser_type,
                        [in, string] const WCHAR* url);
  HRESULT LaunchCmdElevated([in, string] const WCHAR* app_guid,
                            [in, string] const WCHAR* cmd_id,
                            [in] DWORD caller_proc_id,
                            [out] ULONG_PTR* proc_handle);
};
END_INTERFACE

BEGIN_INTERFACE(
  {
    "uuid": {
      "system":"PLACEHOLDER-GUID-5F41DC50-029C-4F5A-9860-EF352A0B66D2"
    },
    "tokensToSuffix": ["IProcessLauncher2", "IProcessLauncher"],
    "addToLibrary": ["", "system"],
    "includeFor": ["system"]
  }
)
[
  object,
  oleautomation,
  uuid(PLACEHOLDER-GUID-74F243B8-75D1-4E2D-BC89-5689798EEF3E),
  helpstring("Google Update IProcessLauncher2 Interface"),
  pointer_default(unique)
]
interface IProcessLauncher2 : IProcessLauncher {
  // Launches the command line, returning the COM server's process ID and
  // handles to the launched process and its stdout. The caller is responsible
  // for closing the returned handles (by passing DUPLICATE_CLOSE_SOURCE to
  // DuplicateHandle, for instance).
  HRESULT LaunchCmdLineEx([in, string] const WCHAR* cmd_line,
                          [out] DWORD* server_proc_id,
                          [out] ULONG_PTR* proc_handle,
                          [out] ULONG_PTR* stdout_handle);
};
END_INTERFACE

[
  uuid(PLACEHOLDER-GUID-7A1FDE1F-AAA9-441B-B9AA-95B31D78592B),
  version(1.0),
  helpstring("Chromium Updater legacy type library.")
]
library UpdaterLegacyLib {
  importlib("stdole2.tlb");

  [
    uuid(PLACEHOLDER-GUID-A0FEB7CB-E0D8-4035-A4C9-5620A8C725AD),
    helpstring("GoogleUpdate3WebUserClass Class")
  ]
  coclass GoogleUpdate3WebUserClass
  {
    [default] interface IUnknown;
  }

  [
    uuid(PLACEHOLDER-GUID-FAC5C548-84EC-474C-A4B3-CD414E09B14C),
    helpstring("GoogleUpdate3WebSystemClass")
  ]
  coclass GoogleUpdate3WebSystemClass {
    [default] interface IUnknown;
  }

  [
    uuid(PLACEHOLDER-GUID-687DCE9A-57BE-4026-BEC4-C0A9ACBBCAF2),
    helpstring("GoogleUpdate3WebServiceClass (do not use, for backward compat)")
  ]
  coclass GoogleUpdate3WebServiceClass {
    [default] interface IUnknown;
  }

  [
    uuid(PLACEHOLDER-GUID-E432DCFE-6A32-4C07-B038-9D74AC80D6AB),
    helpstring("Policy Status for per-user applications.")
  ]
  coclass PolicyStatusUserClass {
    [default] interface IUnknown;
  }

  [
    uuid(PLACEHOLDER-GUID-F675D224-BD54-40E9-AECB-AA3B64EB9863),
    helpstring("Policy Status for system applications.")
  ]
  coclass PolicyStatusSystemClass {
    [default] interface IUnknown;
  }

  [
    uuid(PLACEHOLDER-GUID-CEC2877D-4856-460E-BE73-11DD7CC7C821),
    helpstring("ProcessLauncherClass Class")
  ]
  coclass ProcessLauncherClass {
    [default] interface IUnknown;
  }

  INTERFACES_IN_LIBRARY;
};