From 21549db08d22a6e41443799b917525da1dbf9853 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Aug 2012 10:35:58 +0000 Subject: - SRMM, Chat & Clist_Classic made standard git-svn-id: http://svn.miranda-ng.org/main/trunk@1422 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 53 ++++++++++++++++++++++++-------------- src/modules/plugins/plugins.h | 2 -- 2 files changed, 33 insertions(+), 22 deletions(-) (limited to 'src/modules') diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index ad6206eaf4..684db5cb0c 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -40,26 +40,6 @@ LIST #define MAX_MIR_VER ULONG_MAX -MuuidReplacement pluginDefault[] = -{ - { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0 - { MIID_SRURL, _T("stdurl"), NULL }, // 1 - { MIID_SREMAIL, _T("stdemail"), NULL }, // 2 - { MIID_SRAUTH, _T("stdauth"), NULL }, // 3 - { MIID_SRFILE, _T("stdfile"), NULL }, // 4 - { MIID_UIHELP, _T("stdhelp"), NULL }, // 5 - { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6 - { MIID_IDLE, _T("stdidle"), NULL }, // 7 - { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8 - { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9 - { MIID_SRAWAY, _T("stdaway"), NULL }, // 10 - - { MIID_CLIST, NULL, NULL }, // 11 - { MIID_CHAT, NULL, NULL }, // 12 - { MIID_SRMM, NULL, NULL }, // 13 - { MIID_DATABASE, NULL, NULL }, // 14 -}; - static BOOL bModuleInitialized = FALSE; TCHAR mirandabootini[MAX_PATH]; @@ -101,6 +81,27 @@ bool hasMuuid(const BASIC_PLUGIN_INFO& bpi, const MUUID& uuid) return false; } +///////////////////////////////////////////////////////////////////////////////////////// +// default plugins + +static MuuidReplacement pluginDefault[] = +{ + { MIID_UIUSERINFO, _T("stduserinfo"), NULL }, // 0 + { MIID_SRURL, _T("stdurl"), NULL }, // 1 + { MIID_SREMAIL, _T("stdemail"), NULL }, // 2 + { MIID_SRAUTH, _T("stdauth"), NULL }, // 3 + { MIID_SRFILE, _T("stdfile"), NULL }, // 4 + { MIID_UIHELP, _T("stdhelp"), NULL }, // 5 + { MIID_UIHISTORY, _T("stduihist"), NULL }, // 6 + { MIID_IDLE, _T("stdidle"), NULL }, // 7 + { MIID_AUTOAWAY, _T("stdautoaway"), NULL }, // 8 + { MIID_USERONLINE, _T("stduseronline"), NULL }, // 9 + { MIID_SRAWAY, _T("stdaway"), NULL }, // 10 + { MIID_CLIST, _T("stdclist"), NULL }, // 11 + { MIID_CHAT, _T("stdchat"), NULL }, // 12 + { MIID_SRMM, _T("stdmsg"), NULL } // 13 +}; + int getDefaultPluginIdx(const MUUID& muuid) { for (int i=0; i < SIZEOF(pluginDefault); i++) @@ -110,6 +111,18 @@ int getDefaultPluginIdx(const MUUID& muuid) return -1; } +int LoadStdPlugins() +{ + for (int i=0; i < SIZEOF(pluginDefault); i++) { + if ( pluginDefault[i].pImpl ) + continue; + + if ( !LoadCorePlugin(pluginDefault[i])) + return 1; + } + return 0; +} + ///////////////////////////////////////////////////////////////////////////////////////// // global functions diff --git a/src/modules/plugins/plugins.h b/src/modules/plugins/plugins.h index d7b4d9adce..72e3087f4a 100644 --- a/src/modules/plugins/plugins.h +++ b/src/modules/plugins/plugins.h @@ -78,8 +78,6 @@ struct MuuidReplacement pluginEntry* pImpl; // replacement plugin }; -extern MuuidReplacement pluginDefault[]; - bool LoadCorePlugin( MuuidReplacement& ); MUUID* GetPluginInterfaces(const TCHAR* ptszFileName, bool& bIsPlugin); \ No newline at end of file -- cgit v1.2.3