//# 0 errors, 50 messages
//#
/*
    //#MediaInfoOutput.java:1:1: class: com.dmdirc.addons.mediasource_windows.MediaInfoOutput
    //#MediaInfoOutput.java:1:1: method: com.dmdirc.addons.mediasource_windows.MediaInfoOutput.com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init
 * Copyright (c) 2006-2009 Chris Smith, Shane Mc Cormack, Gregory Holmes
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
 * SOFTWARE.
 */

package com.dmdirc.addons.mediasource_windows;

/**
 * Holds Output from GetMediaInfo.exe
 */
public class MediaInfoOutput {
	/** Exit Code from GetMediaInfo.exe */
	private final int exitCode;
	
	/** Output from GetMediaInfo.exe */
	private final String output;

	/**
	 * Create a MediaInfoOutput
	 *
	 * @param exitCode Exit code from GetMediaInfo.exe
	 * @param output Output from GetMediaInfo.exe
	 */
	public MediaInfoOutput(final int exitCode, final String output) {
    //#MediaInfoOutput.java:41: method: void com.dmdirc.addons.mediasource_windows.MediaInfoOutput.com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)
    //#input(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): exitCode
    //#input(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): output
    //#input(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): this
    //#output(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): this.exitCode
    //#output(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): this.output
    //#post(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): this.exitCode == exitCode
    //#post(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): init'ed(this.exitCode)
    //#post(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): this.output == output
    //#post(void com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)): init'ed(this.output)
		this.exitCode = exitCode;
		this.output = output;
	}
    //#MediaInfoOutput.java:44: end of method: void com.dmdirc.addons.mediasource_windows.MediaInfoOutput.com.dmdirc.addons.mediasource_windows.MediaInfoOutput(int, String)
	
	/**
	 * Get the exit code
	 *
	 * @return exit Code
	 */
	public int getExitCode() { return exitCode; }
    //#MediaInfoOutput.java:51: method: int com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getExitCode()
    //#input(int getExitCode()): this
    //#input(int getExitCode()): this.exitCode
    //#output(int getExitCode()): return_value
    //#post(int getExitCode()): return_value == this.exitCode
    //#post(int getExitCode()): init'ed(return_value)
    //#MediaInfoOutput.java:51: end of method: int com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getExitCode()
	
	/**
	 * Get the output
	 *
	 * @return output
	 */
	public String getOutput() { return output; }
    //#MediaInfoOutput.java:58: method: String com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getOutput()
    //#input(String getOutput()): this
    //#input(String getOutput()): this.output
    //#output(String getOutput()): return_value
    //#post(String getOutput()): return_value == this.output
    //#post(String getOutput()): init'ed(return_value)
    //#MediaInfoOutput.java:58: end of method: String com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getOutput()
	
	/**
	 * Get the output only if the exitCode was 0, else a blank string.
	 *
	 * @return The output only if the exitCode was 0, else a blank string.
	 */
	public String getGoodOutput() { return (getExitCode() == 0) ? output : ""; }
    //#MediaInfoOutput.java:65: method: String com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getGoodOutput()
    //#input(String getGoodOutput()): __Descendant_Table[com/dmdirc/addons/mediasource_windows/MediaInfoOutput]
    //#input(String getGoodOutput()): __Descendant_Table[others]
    //#input(String getGoodOutput()): __Dispatch_Table.getExitCode()I
    //#input(String getGoodOutput()): this
    //#input(String getGoodOutput()): this.__Tag
    //#input(String getGoodOutput()): this.exitCode
    //#input(String getGoodOutput()): this.output
    //#output(String getGoodOutput()): return_value
    //#pre[2] (String getGoodOutput()): this.__Tag == com/dmdirc/addons/mediasource_windows/MediaInfoOutput
    //#post(String getGoodOutput()): return_value == One-of{this.output, &""}
    //#post(String getGoodOutput()): init'ed(return_value)
    //#MediaInfoOutput.java:65: end of method: String com.dmdirc.addons.mediasource_windows.MediaInfoOutput.getGoodOutput()
}    //#output(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Descendant_Table[com/dmdirc/addons/mediasource_windows/MediaInfoOutput]
    //#output(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getExitCode()I
    //#output(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getGoodOutput()Ljava/lang/String;
    //#output(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getOutput()Ljava/lang/String;
    //#post(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Descendant_Table[com/dmdirc/addons/mediasource_windows/MediaInfoOutput] == &__Dispatch_Table
    //#post(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getExitCode()I == &getExitCode
    //#post(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getGoodOutput()Ljava/lang/String; == &getGoodOutput
    //#post(com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init): __Dispatch_Table.getOutput()Ljava/lang/String; == &getOutput
    //#MediaInfoOutput.java:: end of method: com.dmdirc.addons.mediasource_windows.MediaInfoOutput.com.dmdirc.addons.mediasource_windows.MediaInfoOutput__static_init
    //#MediaInfoOutput.java:: end of class: com.dmdirc.addons.mediasource_windows.MediaInfoOutput
