/*
Copyright (C) 2006 Evan Teran
                   eteran@alum.rit.edu

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program 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 General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
*/

#ifndef DEBUGGERPLUGININTERFACE_20061101_H_
#define DEBUGGERPLUGININTERFACE_20061101_H_

#include <QtPlugin>
#include <QList>
#include "PluginAPI.h"

class QMenu;
class QAction;

class DebuggerPluginInterface {
public:
	virtual ~DebuggerPluginInterface() {
	}

public:
	void init(const PluginAPI &api) {
		m_API = api;
		privateInit();
	}

public:
	virtual QMenu *menu(QWidget *parent = 0) = 0;
	
public:
	// optional, overload these to have there contents added to a view's context menu
	virtual QList<QAction *> cpuViewContextMenu()		{ return QList<QAction *>(); }
	virtual QList<QAction *> registerViewContextMenu()	{ return QList<QAction *>(); }
	virtual QList<QAction *> stackViewContextMenu()		{ return QList<QAction *>(); }
	virtual QList<QAction *> dataViewContextMenu()		{ return QList<QAction *>(); }

private:
	// optional init, overload this to have EDB run it after loading the plugin
	virtual void privateInit() {
	}

protected:
	PluginAPI m_API;
};

Q_DECLARE_INTERFACE(DebuggerPluginInterface, "EDB.DebuggerPluginInterface/1.0")

#endif
