Sophie

Sophie

distrib > Mandriva > cooker > i586 > by-pkgid > f53c6fc016b4649afd106d82f7232fba > files > 39

cmmusic-debug-1.5-3mdv2011.0.i586.rpm

/*! @file
********************************************************************************
<PRE>
Module       : CMMusic
file	     : 
function	 : 
author       : fedorawang
ver	         : v1.5
--------------------------------------------------------------------------------
Copyright    : GPL(General Public License)
--------------------------------------------------------------------------------
</PRE>
*******************************************************************************/
#ifndef PLUGINMGR_H_
#define PLUGINMGR_H_

#include "Helper.h"


#define PLUGIN_FLAG	"CMMusic Plugins"
#define PLUGIN_HOTKEY	"HotKey"
#define PLUGIN_EVENT		"Event"

#define ONLRCNONE		"OnLrcNone"

class CPluginMgr
{
public:
	typedef struct _PLUGINITEM
	{
		std::string strName;
		std::string strDesc;
		std::string strEvent;
		std::string strParam;
		int nHotKey;
	} PLUGINITEM, *LPPLUGINITEM;
public:
	CPluginMgr();
	virtual ~CPluginMgr();
public:
	int Run(int nIndex, const char* lpszParam=0);
	void Load();
	bool Parse(const char* lpszFile);
	int GetSize();
	int OnHotKey(int ch);
	int OnEvent(const char* lpszEvent, const char* lpszParam);
	const char* GetName(int nIndex);
	const char* GetDesc(int nIndex);
private:
	std::vector<PLUGINITEM> m_vctPlugin;
	std::string m_strPluginDir;
};

#endif /*PLUGINMGR_H_*/