fuchsia_workflow.dart 1011 Bytes
Newer Older
Ian Hickson's avatar
Ian Hickson committed
1
// Copyright 2014 The Flutter Authors. All rights reserved.
2 3 4 5 6
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

import '../base/context.dart';
import '../doctor.dart';
7
import '../globals.dart' as globals;
8 9

/// The [FuchsiaWorkflow] instance.
10
FuchsiaWorkflow get fuchsiaWorkflow => context.get<FuchsiaWorkflow>();
11 12 13 14 15 16 17 18

/// The Fuchsia-specific implementation of a [Workflow].
///
/// This workflow assumes development within the fuchsia source tree,
/// including a working fx command-line tool in the user's PATH.
class FuchsiaWorkflow implements Workflow {

  @override
19
  bool get appliesToHostPlatform => globals.platform.isLinux || globals.platform.isMacOS;
20 21 22

  @override
  bool get canListDevices {
23
    return globals.fuchsiaArtifacts.devFinder != null;
24 25 26 27
  }

  @override
  bool get canLaunchDevices {
28
    return globals.fuchsiaArtifacts.devFinder != null && globals.fuchsiaArtifacts.sshConfig != null;
29 30 31 32 33
  }

  @override
  bool get canListEmulators => false;
}