| OLD | NEW |
| (Empty) |
| 1 // Copyright 2008-2009 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 | |
| 17 #ifndef OMAHA_GOOPDATE_GOOPDATE_H__ | |
| 18 #define OMAHA_GOOPDATE_GOOPDATE_H__ | |
| 19 | |
| 20 #include <windows.h> | |
| 21 #include <atlstr.h> | |
| 22 #include "base/basictypes.h" | |
| 23 #include "base/scoped_ptr.h" | |
| 24 #include "omaha/base/thread_pool.h" | |
| 25 | |
| 26 namespace omaha { | |
| 27 | |
| 28 namespace detail { | |
| 29 | |
| 30 class GoopdateImpl; | |
| 31 | |
| 32 } // namespace detail | |
| 33 | |
| 34 struct CommandLineArgs; | |
| 35 class ConfigManager; | |
| 36 class ResourceManager; | |
| 37 | |
| 38 class Goopdate { | |
| 39 public: | |
| 40 explicit Goopdate(bool is_local_system); | |
| 41 ~Goopdate(); | |
| 42 | |
| 43 // Gets the singleton instance of the class. | |
| 44 static Goopdate& Instance(); | |
| 45 | |
| 46 // Runs the entry point for the application. | |
| 47 HRESULT Main(HINSTANCE instance, const TCHAR* cmd_line, int cmd_show); | |
| 48 | |
| 49 HRESULT QueueUserWorkItem(UserWorkItem* work_item, uint32 flags); | |
| 50 | |
| 51 void Stop(); | |
| 52 | |
| 53 bool is_local_system() const; | |
| 54 CommandLineArgs args() const; | |
| 55 | |
| 56 private: | |
| 57 static Goopdate* instance_; | |
| 58 | |
| 59 // Uses pimpl idiom to minimize dependencies on implementation details. | |
| 60 scoped_ptr<detail::GoopdateImpl> impl_; | |
| 61 | |
| 62 DISALLOW_EVIL_CONSTRUCTORS(Goopdate); | |
| 63 }; | |
| 64 | |
| 65 } // namespace omaha | |
| 66 | |
| 67 #endif // OMAHA_GOOPDATE_GOOPDATE_H__ | |
| 68 | |
| OLD | NEW |