// Copyright 2019 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";
// Public interfaces for the Chromium Updater.
// For documentation, see the similar types defined in updater::UpdateService.
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-C3485D9F-C684-4C43-B85B-E339EA395C29",
"system":"PLACEHOLDER-GUID-EA6FDC05-CDC5-4EA4-AB41-CCBD1040A2B5"
},
"tokensToSuffix": ["IUpdateState"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-46ACF70B-AC13-406D-B53B-B2C4BF091FF6),
helpstring("IUpdateState Interface"),
pointer_default(unique)
]
interface IUpdateState : IUnknown {
[propget] HRESULT state([out, retval] LONG*);
[propget] HRESULT appId([out, retval] BSTR*);
[propget] HRESULT nextVersion([out, retval] BSTR*);
[propget] HRESULT downloadedBytes([out, retval] LONGLONG*);
[propget] HRESULT totalBytes([out, retval] LONGLONG*);
[propget] HRESULT installProgress([out, retval] LONG*);
[propget] HRESULT errorCategory([out, retval] LONG*);
[propget] HRESULT errorCode([out, retval] LONG*);
[propget] HRESULT extraCode1([out, retval] LONG*);
[propget] HRESULT installerText([out, retval] BSTR*);
[propget] HRESULT installerCommandLine([out, retval] BSTR*);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-9AD1A645-5A4B-4D36-BC21-F0059482E6EA",
"system":"PLACEHOLDER-GUID-E2BD9A6B-0A19-4C89-AE8B-B7E9E51D9A07"
},
"tokensToSuffix": ["ICompleteStatus"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-2FCD14AF-B645-4351-8359-E80A0E202A0B),
helpstring("ICompleteStatus Interface"),
pointer_default(unique)
]
interface ICompleteStatus : IUnknown {
[propget] HRESULT statusCode([out, retval] LONG*);
[propget] HRESULT statusMessage([out, retval] BSTR*);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-B54493A0-65B7-408C-B650-06265D2182AC",
"system":"PLACEHOLDER-GUID-057B500A-4BA2-496A-B1CD-C5DED3CCC61B"
},
"tokensToSuffix": ["IUpdaterObserver", "IUpdateState", "ICompleteStatus"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-7B416CFD-4216-4FD6-BD83-7C586054676E),
helpstring("IUpdaterObserver Interface"),
pointer_default(unique)
]
interface IUpdaterObserver : IUnknown {
HRESULT OnStateChange([in] IUpdateState* update_state);
HRESULT OnComplete([in] ICompleteStatus* status);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-34ADC89D-552B-4102-8AE5-D613A691335B",
"system":"PLACEHOLDER-GUID-F0D6763A-0182-4136-B1FA-508E334CFFC1"
},
"tokensToSuffix": ["IUpdaterCallback"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-8BAB6F84-AD67-4819-B846-CC890880FD3B),
helpstring("IUpdaterCallback Interface"),
pointer_default(unique)
]
interface IUpdaterCallback : IUnknown {
HRESULT Run([in] LONG result);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-028FEB84-44BC-4A73-A0CD-603678155CC3",
"system":"PLACEHOLDER-GUID-92631531-8044-46F4-B645-CDFBCCC7FA3B"
},
"tokensToSuffix": ["IUpdaterAppState"],
"addToLibrary": ["", "user", "system"]
}
)
[
object,
dual,
uuid(PLACEHOLDER-GUID-A22AFC54-2DEF-4578-9187-DB3B24381090),
helpstring("IUpdaterAppState Interface"),
pointer_default(unique)
]
interface IUpdaterAppState : IDispatch {
[propget] HRESULT appId([out, retval] BSTR*);
[propget] HRESULT version([out, retval] BSTR*);
[propget] HRESULT ap([out, retval] BSTR*);
[propget] HRESULT brandCode([out, retval] BSTR*);
[propget] HRESULT brandPath([out, retval] BSTR*);
[propget] HRESULT ecp([out, retval] BSTR*);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-BCFCF95C-DE48-4F42-B0E9-D50DB407DB53",
"system":"PLACEHOLDER-GUID-2CB8867E-495E-459F-B1B6-2DD7FFDBD462"
},
"tokensToSuffix": ["IUpdaterAppStatesCallback"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-EFE903C0-E820-4136-9FAE-FDCD7F256302),
helpstring("IUpdaterAppStatesCallback Interface"),
pointer_default(unique)
]
interface IUpdaterAppStatesCallback : IUnknown {
HRESULT Run([in] VARIANT app_states);
};
END_INTERFACE
BEGIN_INTERFACE(
{
"uuid": {
"user":"PLACEHOLDER-GUID-02AFCB67-0899-4676-91A9-67D92B3B7918",
"system":"PLACEHOLDER-GUID-FCE335F3-A55C-496E-814F-85971C9FA6F1"
},
"tokensToSuffix": ["IUpdater", "IUpdaterCallback",
"IUpdaterAppStatesCallback", "IUpdaterObserver"],
"addToLibrary": ["user", "system"]
}
)
[
object,
oleautomation,
uuid(PLACEHOLDER-GUID-63B8FFB1-5314-48C9-9C57-93EC8BC6184B),
helpstring("IUpdater Interface"),
pointer_default(unique)
]
interface IUpdater : IUnknown {
HRESULT GetVersion([out, retval] BSTR* version);
HRESULT FetchPolicies([in] IUpdaterCallback* callback);
HRESULT RegisterApp([in, string] const WCHAR* app_id,
[in, string] const WCHAR* brand_code,
[in, string] const WCHAR* brand_path,
[in, string] const WCHAR* tag,
[in, string] const WCHAR* version,
[in, string] const WCHAR* existence_checker_path,
[in] IUpdaterCallback* callback);
HRESULT RunPeriodicTasks([in] IUpdaterCallback* callback);
HRESULT CheckForUpdate([in, string] const WCHAR* app_id,
[in] LONG priority,
[in] BOOL same_version_update_allowed,
[in] IUpdaterObserver* observer);
HRESULT Update([in, string] const WCHAR* app_id,
[in, string] const WCHAR* install_data_index,
[in] LONG priority,
[in] BOOL same_version_update_allowed,
[in] IUpdaterObserver* observer);
HRESULT UpdateAll([in] IUpdaterObserver* observer);
HRESULT Install([in, string] const WCHAR* app_id,
[in, string] const WCHAR* brand_code,
[in, string] const WCHAR* brand_path,
[in, string] const WCHAR* tag,
[in, string] const WCHAR* version,
[in, string] const WCHAR* existence_checker_path,
[in, string] const WCHAR* client_install_data,
[in, string] const WCHAR* install_data_index,
[in] LONG priority,
[in] IUpdaterObserver* observer);
HRESULT CancelInstalls([in, string] const WCHAR* app_id);
HRESULT RunInstaller(
[in, string] const WCHAR* app_id,
[in, string] const WCHAR* installer_path,
[in, string] const WCHAR* install_args,
[in, string] const WCHAR* install_data,
[in, string] const WCHAR* install_settings,
[in] IUpdaterObserver* observer);
HRESULT GetAppStates([in] IUpdaterAppStatesCallback* callback);
};
END_INTERFACE
[
uuid(PLACEHOLDER-GUID-69464FF0-D9EC-4037-A35F-8AE4358106CC),
version(1.0),
helpstring("Chromium Updater type library")
]
library UpdaterLib {
importlib("stdole2.tlb");
[
uuid(PLACEHOLDER-GUID-158428a4-6014-4978-83ba-9fad0dabe791),
helpstring("Updater Class for per-user applications")
]
coclass UpdaterUserClass
{
[default] interface IUnknown;
}
[
uuid(PLACEHOLDER-GUID-415FD747-D79E-42D7-93AC-1BA6E5FD4E93),
helpstring("Updater Class for per-system applications")
]
coclass UpdaterSystemClass
{
[default] interface IUnknown;
}
INTERFACES_IN_LIBRARY;
};