//# 0 errors, 46 messages
//#
/*
    //#AudioPlugin.java:1:1: class: com.dmdirc.addons.audio.AudioPlugin
    //#AudioPlugin.java:1:1: method: com.dmdirc.addons.audio.AudioPlugin.com.dmdirc.addons.audio.AudioPlugin__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.audio;

import com.dmdirc.plugins.Plugin;
import com.dmdirc.commandparser.CommandManager;

/**
 * Adds Audio playing facility to client.
 *
 * @author Shane 'Dataforce' McCormack
 */
public final class AudioPlugin extends Plugin {
	/** The AudioCommand we created */
	private AudioCommand audioCommand = null;
	
	/** The BeepCommand we created */
	private BeepCommand beepCommand = null;

	/**
	 * Creates a new instance of the Audio Plugin.
	 */
	public AudioPlugin() { super(); }
    //#AudioPlugin.java:43: method: void com.dmdirc.addons.audio.AudioPlugin.com.dmdirc.addons.audio.AudioPlugin()
    //#AudioPlugin.java:43: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.plugins.Plugin()
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.audio.AudioPlugin
    //#    method: void com.dmdirc.addons.audio.AudioPlugin()
    //#    unanalyzed callee: void com.dmdirc.plugins.Plugin()
    //#input(void com.dmdirc.addons.audio.AudioPlugin()): this
    //#output(void com.dmdirc.addons.audio.AudioPlugin()): this.audioCommand
    //#output(void com.dmdirc.addons.audio.AudioPlugin()): this.beepCommand
    //#post(void com.dmdirc.addons.audio.AudioPlugin()): this.audioCommand == null
    //#post(void com.dmdirc.addons.audio.AudioPlugin()): this.beepCommand == null
    //#AudioPlugin.java:43: end of method: void com.dmdirc.addons.audio.AudioPlugin.com.dmdirc.addons.audio.AudioPlugin()
	
	/**
	 * Called when the plugin is loaded.
	 */
    @Override
	public void onLoad() {
		audioCommand = new AudioCommand();
    //#AudioPlugin.java:50: method: void com.dmdirc.addons.audio.AudioPlugin.onLoad()
    //#input(void onLoad()): this
    //#output(void onLoad()): new AudioCommand(onLoad#1) num objects
    //#output(void onLoad()): this.audioCommand.__Tag
    //#output(void onLoad()): new BeepCommand(onLoad#2) num objects
    //#output(void onLoad()): this.beepCommand.__Tag
    //#output(void onLoad()): this.audioCommand
    //#output(void onLoad()): this.beepCommand
    //#new obj(void onLoad()): new AudioCommand(onLoad#1)
    //#new obj(void onLoad()): new BeepCommand(onLoad#2)
    //#post(void onLoad()): this.audioCommand == &new AudioCommand(onLoad#1)
    //#post(void onLoad()): this.beepCommand == &new BeepCommand(onLoad#2)
    //#post(void onLoad()): new AudioCommand(onLoad#1) num objects == 1
    //#post(void onLoad()): new BeepCommand(onLoad#2) num objects == 1
    //#post(void onLoad()): this.audioCommand.__Tag == com/dmdirc/addons/audio/AudioCommand
    //#post(void onLoad()): this.beepCommand.__Tag == com/dmdirc/addons/audio/BeepCommand
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.commandparser.commands.GlobalCommand
    //#unanalyzed(void onLoad()): Effects-of-calling:com.dmdirc.commandparser.CommandManager:registerCommand
		beepCommand = new BeepCommand();
	}
    //#AudioPlugin.java:52: end of method: void com.dmdirc.addons.audio.AudioPlugin.onLoad()
	
	/**
	 * Called when this plugin is Unloaded
	 */
    @Override
	public void onUnload() {
		CommandManager.unregisterCommand(beepCommand);
    //#AudioPlugin.java:59: method: void com.dmdirc.addons.audio.AudioPlugin.onUnload()
    //#AudioPlugin.java:59: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.audio.AudioPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#input(void onUnload()): this
    //#input(void onUnload()): this.audioCommand
    //#input(void onUnload()): this.beepCommand
    //#pre[2] (void onUnload()): init'ed(this.audioCommand)
    //#pre[3] (void onUnload()): init'ed(this.beepCommand)
		CommandManager.unregisterCommand(audioCommand);
    //#AudioPlugin.java:60: Warning: method not available - call not analyzed
    //#    call on void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
    //#    severity: INFORMATIONAL
    //#    class: com.dmdirc.addons.audio.AudioPlugin
    //#    method: void onUnload()
    //#    unanalyzed callee: void com.dmdirc.commandparser.CommandManager:unregisterCommand(CommandInfo)
	}
    //#AudioPlugin.java:61: end of method: void com.dmdirc.addons.audio.AudioPlugin.onUnload()
	
}

    //#output(com.dmdirc.addons.audio.AudioPlugin__static_init): __Descendant_Table[com/dmdirc/addons/audio/AudioPlugin]
    //#output(com.dmdirc.addons.audio.AudioPlugin__static_init): __Dispatch_Table.onLoad()V
    //#output(com.dmdirc.addons.audio.AudioPlugin__static_init): __Dispatch_Table.onUnload()V
    //#post(com.dmdirc.addons.audio.AudioPlugin__static_init): __Descendant_Table[com/dmdirc/addons/audio/AudioPlugin] == &__Dispatch_Table
    //#post(com.dmdirc.addons.audio.AudioPlugin__static_init): __Dispatch_Table.onLoad()V == &onLoad
    //#post(com.dmdirc.addons.audio.AudioPlugin__static_init): __Dispatch_Table.onUnload()V == &onUnload
    //#AudioPlugin.java:: end of method: com.dmdirc.addons.audio.AudioPlugin.com.dmdirc.addons.audio.AudioPlugin__static_init
    //#AudioPlugin.java:: end of class: com.dmdirc.addons.audio.AudioPlugin
