/* * Copyright 2008 Matthias Sessler * * This file is part of LibMpc.net. * * LibMpc.net is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 2.1 of the License, or * (at your option) any later version. * * LibMpc.net is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with LibMpc.net. If not, see . */ using System; using System.Collections.Generic; using System.Text; namespace Libmpc { /// /// The MpdOutput class contains all attributes of an output device of the MPD. /// public class MpdOutput { private readonly int id; private readonly string name; private readonly bool enabled; /// /// The id of the output. /// public int Id { get { return this.id; } } /// /// The name of the output. /// public string Name { get { return this.name; } } /// /// If the output is enabled. /// public bool IsEnabled { get { return this.enabled; } } /// /// Creates a new MpdOutput object. /// /// The id of the output. /// The name of the output. /// If the output is enabled. public MpdOutput(int id, string name, bool enabled) { if (name == null) throw new ArgumentNullException("name"); this.id = id; this.name = name; this.enabled = enabled; } /// /// Returns a string representation of the object mainly for debuging purpose. /// /// A string representation of the object. public override string ToString() { return this.id + "::" + this.name + "::" + this.enabled; } } }