blob: f0089a1d46e231c904aad9a3368b786f87fa31b7 [file] [log] [blame]
// Copyright 2016 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.
import 'package:fidl/fidl.dart';
import '';
import 'package:fidl_fuchsia_examples_hello/fidl.dart';
class _HelloImpl extends Hello {
final HelloBinding _binding = HelloBinding();
void bind(InterfaceRequest<Hello> request) {
_binding.bind(this, request);
void say(String request, void callback(String response)) {
callback((request == 'hello') ? 'hola from Dart!' : 'adios from Dart!');
void main(List<String> args) {
StartupContext context = StartupContext.fromStartupInfo();
.addServiceForName(_HelloImpl().bind, Hello.$serviceName);