| OLD | NEW |
| (Empty) |
| 1 // Copyright 2009-2010 Google Inc. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 // ======================================================================== | |
| 15 | |
| 16 // Utilities for IGoogleUpdate3 and related interfaces. | |
| 17 | |
| 18 #ifndef OMAHA_COMMON_UPDATE3_UTILS_H_ | |
| 19 #define OMAHA_COMMON_UPDATE3_UTILS_H_ | |
| 20 | |
| 21 #include <windows.h> | |
| 22 #include <atlsafe.h> | |
| 23 #include "goopdate/omaha3_idl.h" | |
| 24 #include "omaha/base/debug.h" | |
| 25 | |
| 26 namespace omaha { | |
| 27 | |
| 28 namespace update3_utils { | |
| 29 | |
| 30 // Helper methods. | |
| 31 HRESULT SetProxyBlanketAllowImpersonate(IUnknown* server); | |
| 32 | |
| 33 // Create methods. | |
| 34 HRESULT CreateGoogleUpdate3Class(bool is_machine, IGoogleUpdate3** server); | |
| 35 HRESULT CreateGoogleUpdate3MachineClass(IGoogleUpdate3** machine_server); | |
| 36 HRESULT CreateGoogleUpdate3UserClass(IGoogleUpdate3** user_server); | |
| 37 HRESULT CreateAppBundle(IGoogleUpdate3* server, IAppBundle** app_bundle); | |
| 38 HRESULT CreateApp(BSTR app_id, IAppBundle* app_bundle, IApp** app); | |
| 39 HRESULT CreateInstalledApp(BSTR app_id, IAppBundle* app_bundle, IApp** app); | |
| 40 HRESULT CreateAllInstalledApps(IAppBundle* app_bundle); | |
| 41 | |
| 42 // Get methods. | |
| 43 HRESULT GetApp(IAppBundle* app_bundle, long index, IApp** app); // NOLINT | |
| 44 HRESULT GetCurrentAppVersion(IApp* app, IAppVersion** app_version); | |
| 45 HRESULT GetNextAppVersion(IApp* app, IAppVersion** app_version); | |
| 46 | |
| 47 // TODO(omaha): consider removing current_state parameter since it is | |
| 48 // returned in the icurrent_state object as well. | |
| 49 HRESULT GetAppCurrentState(IApp* app, | |
| 50 CurrentState* current_state, | |
| 51 ICurrentState** icurrent_state); | |
| 52 | |
| 53 } // namespace update3_utils | |
| 54 | |
| 55 } // namespace omaha | |
| 56 | |
| 57 #endif // OMAHA_COMMON_UPDATE3_UTILS_H_ | |
| OLD | NEW |