From fc70234c12fc3f9825484bdba094f306d0779c88 Mon Sep 17 00:00:00 2001 From: sje Date: Sun, 1 Jul 2007 11:21:23 +0000 Subject: format text, incoming & outgoing updater support encrypt password in db git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@229 4f64403b-2f21-0410-a795-97e2b3489a10 --- MySpace/MySpace.cpp | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'MySpace/MySpace.cpp') diff --git a/MySpace/MySpace.cpp b/MySpace/MySpace.cpp index aa229b5..6121fa3 100644 --- a/MySpace/MySpace.cpp +++ b/MySpace/MySpace.cpp @@ -37,12 +37,16 @@ extern "C" BOOL APIENTRY DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvRe } extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { + if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 7, 0, 30)) + return 0; return &pluginInfo; } // uncomment this for pre 0.7 compatibility extern "C" __declspec (dllexport) PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion) { + if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 7, 0, 30)) + return 0; pluginInfo.cbSize = sizeof(PLUGININFO); return (PLUGININFO*)&pluginInfo; } @@ -54,6 +58,37 @@ extern "C" __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) } int ModulesLoaded(WPARAM wParam, LPARAM lParam) { + if(ServiceExists(MS_UPDATE_REGISTER)) { + // register with updater + Update update = {0}; + char szVersion[16]; + + update.cbSize = sizeof(Update); + + update.szComponentName = pluginInfo.shortName; + update.pbVersion = (BYTE *)CreateVersionString(pluginInfo.version, szVersion); + update.cpbVersion = strlen((char *)update.pbVersion); + + update.szUpdateURL = UPDATER_AUTOREGISTER; + + // these are the three lines that matter - the archive, the page containing the version string, and the text (or data) + // before the version that we use to locate it on the page + // (note that if the update URL and the version URL point to standard file listing entries, the backend xml + // data will be used to check for updates rather than the actual web page - this is not true for beta urls) +#ifdef _UNICODE + update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/MySpace.zip"; + update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_MySpace.html"; +#else + update.szBetaUpdateURL = "http://www.scottellis.com.au/miranda_plugins/MySpace_ansi.zip"; + update.szBetaVersionURL = "http://www.scottellis.com.au/miranda_plugins/ver_MySpace_ansi.html"; +#endif + update.pbBetaVersionPrefix = (BYTE *)"MySpace version "; + + update.cpbBetaVersionPrefix = strlen((char *)update.pbBetaVersionPrefix); + + CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update); + } + InitNetlib(); InitMenu(); -- cgit v1.2.3