| // Copyright 2017 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include <lib/async-loop/cpp/loop.h> |
| #include <lib/async-loop/default.h> |
| #include <lib/fidl/cpp/binding_set.h> |
| #include <lib/sys/cpp/component_context.h> |
| |
| #include "garnet/bin/timezone/timezone.h" |
| #include "src/lib/fxl/logging.h" |
| |
| namespace time_zone { |
| |
| constexpr char kIcuDataPath[] = "/pkg/data/icudtl.dat"; |
| constexpr char kTzIdPath[] = "/data/tz_id"; |
| |
| class MainService { |
| public: |
| MainService() |
| : timezone_(sys::ComponentContext::CreateAndServeOutgoingDirectory(), kIcuDataPath, |
| kTzIdPath) {} |
| |
| private: |
| TimezoneImpl timezone_; |
| }; |
| |
| } // namespace time_zone |
| |
| int main(int argc, char** argv) { |
| async::Loop loop(&kAsyncLoopConfigAttachToCurrentThread); |
| time_zone::MainService svc; |
| loop.Run(); |
| return 0; |
| } |