2012-04-10 19:12:38 +02:00
|
|
|
|
|
|
|
//============================================================================
|
|
|
|
// Name : plugin.hpp
|
|
|
|
// Copyright : 2012 FIX94
|
|
|
|
//============================================================================
|
|
|
|
|
|
|
|
#ifndef _PLUGIN_HPP_
|
|
|
|
#define _PLUGIN_HPP_
|
|
|
|
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
#include <string>
|
2012-05-06 14:03:43 +02:00
|
|
|
#include <vector>
|
2012-04-10 19:12:38 +02:00
|
|
|
|
|
|
|
#include "config/config.hpp"
|
2012-04-12 00:01:41 +02:00
|
|
|
#include "loader/disc.h"
|
2012-04-10 19:12:38 +02:00
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
2012-05-01 15:30:16 +02:00
|
|
|
struct PluginOptions
|
|
|
|
{
|
|
|
|
u8 *BannerSound;
|
|
|
|
u32 BannerSoundSize;
|
|
|
|
u32 magicWord;
|
|
|
|
string DolName;
|
|
|
|
string coverFolder;
|
2012-05-11 20:46:43 +02:00
|
|
|
wstringEx DisplayName;
|
2012-05-01 15:30:16 +02:00
|
|
|
u32 caseColor;
|
|
|
|
bool ReturnLoader;
|
|
|
|
};
|
|
|
|
|
2012-04-10 19:12:38 +02:00
|
|
|
class Plugin
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
bool AddPlugin(Config &plugin);
|
|
|
|
u8* GetBannerSound(u32 magic);
|
|
|
|
u32 GetBannerSoundSize();
|
|
|
|
char* GetDolName(u32 magic);
|
2012-05-01 15:30:16 +02:00
|
|
|
char* GetCoverFolderName(u32 magic);
|
2012-05-05 22:07:54 +02:00
|
|
|
wstringEx GetPluginName(u8 pos);
|
|
|
|
u32 getPluginMagic(u8 pos);
|
|
|
|
bool PluginExist(u8 pos);
|
|
|
|
void SetEnablePlugin(Config &cfg, u8 pos, u8 ForceMode = 0);
|
2012-05-06 14:03:43 +02:00
|
|
|
vector<bool> GetEnabledPlugins(Config &cfg);
|
2012-04-14 21:43:37 +02:00
|
|
|
bool UseReturnLoader(u32 magic);
|
2012-05-23 18:27:55 +02:00
|
|
|
bool isMplayerCE(u32 magic);
|
|
|
|
vector<string> CreateMplayerCEArguments(const char *src);
|
2012-04-10 19:12:38 +02:00
|
|
|
void init(string);
|
|
|
|
void Cleanup();
|
|
|
|
void EndAdd();
|
2012-05-06 14:03:43 +02:00
|
|
|
vector<dir_discHdr> ParseScummvmINI(Config &ini, string Device);
|
2012-04-10 19:12:38 +02:00
|
|
|
private:
|
2012-05-04 20:05:41 +02:00
|
|
|
s8 GetPluginPosition(u32 magic);
|
|
|
|
|
2012-05-06 14:03:43 +02:00
|
|
|
vector<PluginOptions> Plugins;
|
2012-05-04 20:05:41 +02:00
|
|
|
s8 Plugin_Pos;
|
2012-04-10 19:12:38 +02:00
|
|
|
string pluginsDir;
|
|
|
|
bool adding;
|
|
|
|
};
|
|
|
|
#endif
|