blob: cbe33e59c39bc4ac3dc4f0f7999155ceecaa80ba [file] [log] [blame]
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
[DartPackage="mojo_services"]
module mojo.media;
// Models a problem preventing intended operation.
//
// A |Problem| is generally surfaced as part of a component's status, probably
// as an optional field. Absence of a |Problem| means that nothing is preventing
// intended operation. When a |Problem| is exposed, the client can take action
// automatically or present relevant UI. If a |Problem| can be resolved by some
// action, the client may take that action automatically or enlist the user
// somehow in the resolution. In either case, the |Problem| goes away when the
// issue that caused it to be exposed is resolved. By design, there is no
// general means of dismissing a |Problem|.
struct Problem {
const string kProblemInternal = "ProblemInternal";
const string kProblemAssetNotFound = "ProblemAssetNotFound";
const string kProblemMediaTypeNotSupported = "ProblemMediaTypeNotSupported";
// The type of problem. This is a string for extensibility.
// TODO(dalesat): Should this be a MojoResult instead?
string type;
// Type-dependent details.
string? details;
};