diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 10:50:20 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2012-05-18 10:50:20 +0000 |
commit | a85e238092f480e9de278ae507af710633fa2824 (patch) | |
tree | 6736cf3074c5e4e7da309e932074de041bc1ba96 /protocols | |
parent | c58de69f2936e24d2fa13eb415de963a4d7ca71f (diff) |
moving API to ExternalAPI folder
git-svn-id: http://svn.miranda-ng.org/main/trunk@34 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
49 files changed, 77 insertions, 6361 deletions
diff --git a/protocols/AimOscar/aim_10.vcxproj b/protocols/AimOscar/aim_10.vcxproj index d817553d1a..821d0d0cca 100644 --- a/protocols/AimOscar/aim_10.vcxproj +++ b/protocols/AimOscar/aim_10.vcxproj @@ -106,7 +106,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -143,7 +143,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;AIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -184,7 +184,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -230,7 +230,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;AIM_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/protocols/AimOscar/m_assocmgr.h b/protocols/AimOscar/m_assocmgr.h deleted file mode 100644 index 4e15168643..0000000000 --- a/protocols/AimOscar/m_assocmgr.h +++ /dev/null @@ -1,301 +0,0 @@ -/*
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-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 (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_ASSOCMGR_H__
-#define M_ASSOCMGR_H__
-
-#if defined (_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
-#endif
-
-#if !defined(_TCHAR_DEFINED)
- #include <tchar.h>
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(push) /* save warning settings */
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#endif
-
-/*
- File Association Manager v0.1.1.0
-*/
-
-/* interface id */
-#if !defined(MIID_ASSOCMGR)
- #define MIID_ASSOCMGR {0xa05b56c0,0xcf7b,0x4389,{0xa1,0xe9,0xf1,0x3d,0xb9,0x36,0xe,0xf1}}
-#endif
-#if !defined(MIID_AUTORUN)
- #define MIID_AUTORUN {0xeb0465e2,0xceee,0x11db,{0x83,0xef,0xc1,0xbf,0x55,0xd8,0x95,0x93}}
-#endif
-
-/* Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(FILETYPEDESC*)ftd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWFILETYPE "AssocMgr/AddNewFileType"
-
-typedef struct {
- int cbSize; // set to sizeof(FILETYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- const char *pszService; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to NULL to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- DWORD flags; // see FTDF_* flags below
-
- const char *pszFileExt; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- const char *pszMimeType; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
- union {
- const char *pszVerbDesc; // description for the open verb e.g. "&Install".
- const TCHAR *ptszVerbDesc; // set this to NULL to use the default description.
- const WCHAR *pwszVerbDesc; // include an ampersand (&) character for a mnemonic key.
- }; // please Translate().
-} FILETYPEDESC;
-
-#define FTDF_UNICODE 0x0001 // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
-#define FTDF_DEFAULTDISABLED 0x0002 // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-#define FTDF_BROWSERAUTOOPEN 0x0004 // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
-#define FTDF_ISTEXT 0x0008 // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-#define FTDF_ISSHORTCUT 0x0010 // file type behaves as shortcut, this means a
- // small overlay arrow is applied and the extension is never shown
-
-#if defined(_UNICODE)
- #define FTDF_TCHAR FTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define FTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-__inline static int AssocMgr_AddNewFileType(const char *ext,const char *mime,const char *desc,const char *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pszDescription=desc;
- ftd.pszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags&~FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-__inline static int AssocMgr_AddNewFileTypeW(const char *ext,const char *mime,const WCHAR *desc,const WCHAR *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pwszDescription=desc;
- ftd.pwszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags|FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileTypeW
-#else
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileType
-#endif
-#endif
-
-/* Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam=0
- lParam=(WPARAM)(char*)pszFileExt
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEFILETYPE "AssocMgr/RemoveFileType"
-
-/* Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(URLTYPEDESC*)utd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWURLTYPE "AssocMgr/AddNewUrlType"
-
-typedef struct {
- int cbSize; // set to sizeof(URLTYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- const char *pszService; // service to call when a url is opened (can't be NULL)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // return zero on suceess, nonzero on error.
-
- DWORD flags; // see UTDF_* flags below
-
- const char *pszProtoPrefix; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
-} URLTYPEDESC;
-
-#define UTDF_UNICODE 0x0001 // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
-#define UTDF_DEFAULTDISABLED 0x0002 // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-#if defined(_UNICODE)
- #define UTDF_TCHAR UTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define UTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-static int __inline AssocMgr_AddNewUrlType(const char *prefix,const char *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags&~UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-static int __inline AssocMgr_AddNewUrlTypeW(const char *prefix,const WCHAR *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pwszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags|UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlTypeW
-#else
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlType
-#endif
-#endif
-
-/* Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam=0
- lParam=(WPARAM)(char*)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEURLTYPE "AssocMgr/RemoveUrlType"
-
-/* utility which should be moved as service into m_netlib.h (MS_NETLIB_URLENCODE already exists) */
-#if defined(MoveMemory) && defined(lstrlen)
-static __inline char *Netlib_UrlDecode(char *str)
-{
- char *psz=str;
- for(;*psz;++psz)
- switch(*psz) {
- case '+':
- *psz=' ';
- break;
- case '%':
- if(!psz[1] || !psz[2]) break;
- MoveMemory(psz,&psz[1],2);
- psz[2]=0;
- *psz=(char)strtol(psz,NULL,16);
- MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1);
- break;
- }
- return str;
-}
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(pop) /* restore warning settings */
-#endif
-
-#ifndef ASSOCMGR_NOSETTINGS
-#define SETTING_ONLYWHILERUNNING_DEFAULT 0
-#endif
-
-#endif // M_ASSOCMGR_H
\ No newline at end of file diff --git a/protocols/AimOscar/m_extraicons.h b/protocols/AimOscar/m_extraicons.h deleted file mode 100644 index 589d040cef..0000000000 --- a/protocols/AimOscar/m_extraicons.h +++ /dev/null @@ -1,158 +0,0 @@ -/*
- Copyright (C) 2009 Ricardo Pescuma Domenecci
-
- This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this file; see the file license.txt. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
-
-#ifndef __M_EXTRAICONS_H__
-#define __M_EXTRAICONS_H__
-
-#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
-
-
-#define EXTRAICON_TYPE_CALLBACK 0 // Similar to old clist callbacks, it fires 2 notifications
-#define EXTRAICON_TYPE_ICOLIB 1 // This extra icon will use only icons registered with icolib. No callbacks
- // needed. Just call MS_EXTRAICON_SET_ICON passing the name of the extraicon to set one.
-
-
-typedef struct {
- int cbSize;
- int type; // One of EXTRAICON_TYPE_*
- const char *name; // Internal name. More than one plugin can register extra icons with the same name
- // if both have the same type. In this case, both will be handled as one.
- // This is usefull for ex for extra status, where icq and jabber can share the same slot.
- // If the types are different the second one will be denied.
- const char *description; // [Translated by plugin] Description to be used in GUI
- const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.
-
- // If type == EXTRAICON_TYPE_CALLBACK this two must be set
-
- // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
- // wParam=lParam=0
- MIRANDAHOOK RebuildIcons;
-
- // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HANDLE hContact
- // lParam = int slot
- MIRANDAHOOK ApplyIcon;
-
- // Other optional callbacks
-
- // [Optional] Callback called when extra icon was clicked
- // wParam = HANDLE hContact
- // lParam = int slot
- // param = onClickParam
- MIRANDAHOOKPARAM OnClick;
-
- LPARAM onClickParam;
-
-} EXTRAICON_INFO;
-
-
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
-#define MS_EXTRAICON_REGISTER "ExtraIcon/Register"
-
-
-typedef struct {
- int cbSize;
- HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
- HANDLE hContact; // Contact to set the extra icon
- union { // The icon to be set. This depends on the type of the extra icon:
- HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- const char *icoName; // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- };
-} EXTRAICON;
-
-// Set an extra icon icon
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
-#define MS_EXTRAICON_SET_ICON "ExtraIcon/SetIcon"
-
-
-
-#ifndef _NO_WRAPPERS
-#ifdef __cplusplus
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon,
- MIRANDAHOOK RebuildIcons,
- MIRANDAHOOK ApplyIcon,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_CALLBACK;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.RebuildIcons = RebuildIcons;
- ei.ApplyIcon = ApplyIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon = NULL,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_ICOLIB;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.hImage = hImage;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, const char *icoName)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = icoName;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-#endif
-#endif
-
-
-#endif // __M_EXTRAICONS_H__
diff --git a/protocols/AimOscar/m_folders.h b/protocols/AimOscar/m_folders.h deleted file mode 100644 index 54d19589c2..0000000000 --- a/protocols/AimOscar/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
diff --git a/protocols/Gadu-Gadu/Gadu-Gadu_10.vcxproj b/protocols/Gadu-Gadu/Gadu-Gadu_10.vcxproj index 7c776f16d5..2c3b94264b 100644 --- a/protocols/Gadu-Gadu/Gadu-Gadu_10.vcxproj +++ b/protocols/Gadu-Gadu/Gadu-Gadu_10.vcxproj @@ -99,7 +99,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
@@ -155,7 +155,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<MinimalRebuild>true</MinimalRebuild>
@@ -216,7 +216,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
@@ -282,7 +282,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;libgadu;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;GG_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>
diff --git a/protocols/Gadu-Gadu/m_assocmgr.h b/protocols/Gadu-Gadu/m_assocmgr.h deleted file mode 100644 index 4e15168643..0000000000 --- a/protocols/Gadu-Gadu/m_assocmgr.h +++ /dev/null @@ -1,301 +0,0 @@ -/*
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-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 (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_ASSOCMGR_H__
-#define M_ASSOCMGR_H__
-
-#if defined (_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
-#endif
-
-#if !defined(_TCHAR_DEFINED)
- #include <tchar.h>
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(push) /* save warning settings */
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#endif
-
-/*
- File Association Manager v0.1.1.0
-*/
-
-/* interface id */
-#if !defined(MIID_ASSOCMGR)
- #define MIID_ASSOCMGR {0xa05b56c0,0xcf7b,0x4389,{0xa1,0xe9,0xf1,0x3d,0xb9,0x36,0xe,0xf1}}
-#endif
-#if !defined(MIID_AUTORUN)
- #define MIID_AUTORUN {0xeb0465e2,0xceee,0x11db,{0x83,0xef,0xc1,0xbf,0x55,0xd8,0x95,0x93}}
-#endif
-
-/* Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(FILETYPEDESC*)ftd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWFILETYPE "AssocMgr/AddNewFileType"
-
-typedef struct {
- int cbSize; // set to sizeof(FILETYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- const char *pszService; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to NULL to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- DWORD flags; // see FTDF_* flags below
-
- const char *pszFileExt; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- const char *pszMimeType; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
- union {
- const char *pszVerbDesc; // description for the open verb e.g. "&Install".
- const TCHAR *ptszVerbDesc; // set this to NULL to use the default description.
- const WCHAR *pwszVerbDesc; // include an ampersand (&) character for a mnemonic key.
- }; // please Translate().
-} FILETYPEDESC;
-
-#define FTDF_UNICODE 0x0001 // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
-#define FTDF_DEFAULTDISABLED 0x0002 // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-#define FTDF_BROWSERAUTOOPEN 0x0004 // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
-#define FTDF_ISTEXT 0x0008 // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-#define FTDF_ISSHORTCUT 0x0010 // file type behaves as shortcut, this means a
- // small overlay arrow is applied and the extension is never shown
-
-#if defined(_UNICODE)
- #define FTDF_TCHAR FTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define FTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-__inline static int AssocMgr_AddNewFileType(const char *ext,const char *mime,const char *desc,const char *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pszDescription=desc;
- ftd.pszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags&~FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-__inline static int AssocMgr_AddNewFileTypeW(const char *ext,const char *mime,const WCHAR *desc,const WCHAR *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pwszDescription=desc;
- ftd.pwszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags|FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileTypeW
-#else
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileType
-#endif
-#endif
-
-/* Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam=0
- lParam=(WPARAM)(char*)pszFileExt
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEFILETYPE "AssocMgr/RemoveFileType"
-
-/* Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(URLTYPEDESC*)utd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWURLTYPE "AssocMgr/AddNewUrlType"
-
-typedef struct {
- int cbSize; // set to sizeof(URLTYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- const char *pszService; // service to call when a url is opened (can't be NULL)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // return zero on suceess, nonzero on error.
-
- DWORD flags; // see UTDF_* flags below
-
- const char *pszProtoPrefix; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
-} URLTYPEDESC;
-
-#define UTDF_UNICODE 0x0001 // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
-#define UTDF_DEFAULTDISABLED 0x0002 // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-#if defined(_UNICODE)
- #define UTDF_TCHAR UTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define UTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-static int __inline AssocMgr_AddNewUrlType(const char *prefix,const char *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags&~UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-static int __inline AssocMgr_AddNewUrlTypeW(const char *prefix,const WCHAR *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pwszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags|UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlTypeW
-#else
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlType
-#endif
-#endif
-
-/* Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam=0
- lParam=(WPARAM)(char*)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEURLTYPE "AssocMgr/RemoveUrlType"
-
-/* utility which should be moved as service into m_netlib.h (MS_NETLIB_URLENCODE already exists) */
-#if defined(MoveMemory) && defined(lstrlen)
-static __inline char *Netlib_UrlDecode(char *str)
-{
- char *psz=str;
- for(;*psz;++psz)
- switch(*psz) {
- case '+':
- *psz=' ';
- break;
- case '%':
- if(!psz[1] || !psz[2]) break;
- MoveMemory(psz,&psz[1],2);
- psz[2]=0;
- *psz=(char)strtol(psz,NULL,16);
- MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1);
- break;
- }
- return str;
-}
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(pop) /* restore warning settings */
-#endif
-
-#ifndef ASSOCMGR_NOSETTINGS
-#define SETTING_ONLYWHILERUNNING_DEFAULT 0
-#endif
-
-#endif // M_ASSOCMGR_H
\ No newline at end of file diff --git a/protocols/Gadu-Gadu/m_folders.h b/protocols/Gadu-Gadu/m_folders.h deleted file mode 100644 index 5971cff81a..0000000000 --- a/protocols/Gadu-Gadu/m_folders.h +++ /dev/null @@ -1,284 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-#define MIRANDA_USERDATA "%miranda_userdata%"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-#define MIRANDA_USERDATAW L"%miranda_userdata%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/protocols/Gadu-Gadu/m_metacontacts.h b/protocols/Gadu-Gadu/m_metacontacts.h deleted file mode 100644 index 9f348bd2c6..0000000000 --- a/protocols/Gadu-Gadu/m_metacontacts.h +++ /dev/null @@ -1,166 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-#ifndef MIID_METACONTACTS
-#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
-#endif
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/protocols/IRCG/IRC_10.vcxproj b/protocols/IRCG/IRC_10.vcxproj index 78b2e0463c..187d859305 100644 --- a/protocols/IRCG/IRC_10.vcxproj +++ b/protocols/IRCG/IRC_10.vcxproj @@ -97,7 +97,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
@@ -144,7 +144,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;IRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<ExceptionHandling>
@@ -195,7 +195,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -249,7 +249,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;IRC_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/protocols/IRCG/m_uninstaller.h b/protocols/IRCG/m_uninstaller.h deleted file mode 100644 index e26f55c6be..0000000000 --- a/protocols/IRCG/m_uninstaller.h +++ /dev/null @@ -1,700 +0,0 @@ -/*
-
- PluginUninstaller 1.1.2.1 for Miranda IM 0.3.3a and +
- ------------------------------------------------------------------------
- Developers - C/C++ Header File
-
- Plugin Info: ----------------------------
- | Version: 1.1.2.1
- | Filename: uninstaller.dll
- | Author: H. Herkenrath (hrathh@users.sourceforge.net)
- | Description: Extends the plugin options and offers the possibility
- | to directly remove plugins and delete all associated
- | settings and files.
-
- Contents: -------------------------------
- | > General Info:
- | - Uninstall Example/Template
- | - Changing displayed icon
- | - Changing displayed docs
- | - Message boxes on uninstall
- | - Service Accesibility
- | - Including this file
- |
- | > Structs:
- | - Uninstall Params (PLUGINUNINSTALLPARAMS)
- |
- | > Helpers:
- | - Macro: Run service while uninstalling (PUICallService)
- | - Function: Remove some files in directory (PUIRemoveFilesInDirectory)
- |
- | > Events:
- | - Allow to uninstall a plugin (ME_PLUGINUNINSTALLER_OKTOUNINSTALL)
- | - Plugin gets uninstalled (ME_PLUGINUNINSTALLER_UNINSTALL)
- |
- | > Services:
- | - Remove database module (MS_PLUGINUNINSTALLER_REMOVEDBMODULE)
- | - Remove a setting globally (MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY)
- | - Remove skinned sound (MS_PLUGINUNINSTALLER_REMOVESKINSOUND)
- | - Uninstall a plugin (MS_PLUGINUNISTALLER_UNISTALLPLUGIN)
- | - Getting handles (MS_PLUGINUNINSTALLER_GETHANDLE)
- |
-
-
- This file is only thought for plugin developers.
- If you only want to use "PluginUninstaller" and don't want to develop a plugin
- or something with it you don't need this file.
-
- If there are any problems or bugs with or in this file or something else
- please mail me. My e-mail address is: hrathh@users.sourceforge.net
- For more documentation you can use this address, too. :-)
-
- If you have any whishes on some plugin uninstalling for your
- plugin you can mail me, too. :-)
-
-*/
-#ifndef M_UNINSTALLER_H
-#define M_UNINSTALLER_H
-
-#ifndef CallService
- #pragma message("Mistake Alert!: "m_uninstaller.h" needs to be included after "newpluginapi.h"!\n The following errors are resulting of this mistake.\n")
-#endif
-
-
-// | General Info
-// -----------------------------
-
-// Uninstall Example/Template
-// ---------------------------
-// Making your plugin uninstallable is very easy.
-// Just add the following "Uninstall" function near the "Unload" function
-// in your plugin.
-// A template plugin is available in the source code package.
-
-// Old:
-// int __declspec(dllexport) Uninstall(BOOL bIsMirandaRunning, BOOL bDoDeleteSettings, char* pszPluginPath);
-
-// New:
-//int __declspec(dllexport) UninstallEx(PLUGINUNINSTALLPARAMS* ppup)
-//{
- // Available Variables:
- // -----------------------------
- // ppup->bIsMirandaRunning:
- // Contains if Miranda is running
- // (Currently this is always TRUE).
-
- // ppup->bDoDeleteSettings:
- // Contains if the users selected
- // that he wants all settings be deleted.
-
- // ppup->pszPluginsPath:
- // Contains the plugins directory name.
-
-
- // Notes:
- // -----------------------------
-
- // Run before "Unload" function:
- // -> IMPORTANT: Be careful not to write to the database or to files in "Unload" again!!!
- // -> Perhaps create a global BOOL variable which is set to TRUE when your plugin gets uninstalled
- // or check of a database setting "IsInstalled" in Unload() or sth. like that
-
- // All Miranda is still loaded
-
- // Here you can do:
- // - Delete settings group in database
- // - Delete registry items
- // - Delete ini-files and other settings files
- // - Delete other files
-
- // Your plugin dll gets automatically deleted
-
- // Services to remove are offered:
- // MS_PLUGINUNINSTALLER_REMOVEDBMODULE
- // MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
- // MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-
- // Getting other useful paths:
- // -----------------------------
-
- // System directory:
-
- //char szSysPath[MAX_PATH];
- //GetSystemDirectory(szSysPath, MAX_PATH);
-
-
- // Windows directory:
-
- //char szWinPath[MAX_PATH];
- //GetWindowsDirectory(szWinPath, MAX_PATH);
-
-
- // Other directories:
-
- // char szPath[MAX_PATH];
- // SHGetSpecialFolderPath(NULL, szPath, CSIDL_* , FALSE);
-
- // Some available dirs:
- // CSIDL_APPDATA CSIDL_SENDTO CSIDL_FAVORITES
- // CSIDL_STARTUP CSIDL_PROFILE CSIDL_DESKTOPDIRECTORY
-
-
- // Delete Files
- //const char* apszFiles[] = {"MyPlugin_Readme.txt", "MyPlugin_License.txt", "MyPlugin_Developer.txt", "MyPlugin_Translation.txt"};
- //PUIRemoveFilesInPath(ppup->pszPluginsPath, apszFiles);
-
- // Delete Settings
- //if(ppup->bDoDeleteSettings == TRUE)
- //{
- //if (ppup->bIsMirandaRunning == TRUE) // Check if it is possible to access services
- //{
- // Remove plugin's module
- //PUIRemoveDbModule("MyPlugin");
-
- // Remove plugin's sounds
- //PUIRemoveSkinSound("MySoundSetting1");
- //PUIRemoveSkinSound("MySoundSetting2");
- //}
- //}
-
- // Remember:
- // Do not forget to remove your (eventually) created registry items here, too.
-
-
- // The plugin's dll file gets deleted after returning.
-
- // Remember:
- // If your DLL file is additionally in use by another application (eg. Windows)
- // you need to free the DLL *here* completely. Otherwise it can't be deleted.
-
-// return 0;
-//}
-
-
-
-// Changing displayed icon
-// ---------------------------
-// The icon that gets displayed on the options page is always the "first"
-// icon in your DLL file.
-// An icon in your DLL file is the first icon when it has the lowest recource ID.
-// If you would like to have an other icon shown in the options please change your
-// icon resource IDs so that the icon you would like to have has the lowest one.
-// For example if you use MS Visual C++, open "resource.h" and change the resource define
-// of your prefered icon to the lowest icon number.
-
-
-// Changing displayed docs
-// ---------------------------
-// The items "License" and "More Information" on the plugin details page
-// are created when the a license and/or a readme file for the plugin exists.
-// The files get detected automatically and need a special name
-// so that they get detected.
-// The text files need to be either placed in the "Plugins" directory or
-// in the "Docs" directory. Whereof the last one is the better one :-)
-//
-// For the license file the following file name formatings are possible:
-// PluginName-License.txt (I personally think that this is the best naming solution... :-) )
-// PluginName_License.txt,
-//
-// For the readme file the following ones are possible:
-// PluginName-Readme.txt (Again...I like this one :-D ),
-// PluginName_Readme.txt,
-
-// Message boxes on uninstall
-// ---------------------------
-// If you would like to ask the user for something to remove/uninstall
-// please hook the event ME_PLUGINUNINSTALLER_UNINSTALL and show your
-// message box there. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-
-// Service Accessibility
-// ---------------------------
-// Remember that you only can use these functions after the event ME_SYSTEM_MODULESLOADED
-// or later because "PluginUninstaller" needs to be loaded first.
-// Normally you only use them in your "UninstallEx" function.
-//
-// IMPORTANT!:
-// Please make sure that you always use the macro PUICallService
-// in the "UninstallEx" function instead of the CallService function.
-
-
-// Including this file
-// ---------------------------
-// To use some of the uninstalling functionality you have to include this file
-// into your project.
-//
-// IMPORTANT!:
-// Please make sure that you include the file "newpluginapi.h" before this one.
-// If this isn't the case there may some compile errors come up.
-
- // -> Example:
- // If your plugin is in the directory "Plugins/MyPlugin/" and
- // this include file is in the directory "Plugins/PluginUninstaller"
- // you can use the following:
-
- //#include "../PluginUninstaller/m_uninstaller.h"
-
- // If your plugin is in an directory that is different to that one just
- // change the include path to the one you want.
-
-
-
-
-
-// | Structs
-// -----------------------------
-
-// ---------------------------------------------
-// -- Struct: Uninstall Params -----------------
-// ---------------------------------------------
-
-// Struct: PLUGINUNINSTALLPARAMS
-// (Gets passed to "UninstallEx" function)
-
-typedef int (*HELPERPROC)(const char*, WPARAM, LPARAM); // Used internally (for pHelperProcAddress)
-
-typedef struct {
- BOOL bIsMirandaRunning; // Is TRUE when Miranda is loaded and services are available (Please use PUICallService instead of CallService)
- BOOL bDoDeleteSettings; // Is TRUE when user wants to delete settings (If this is FALSE, please only delete your files)
- char* pszPluginsPath; // Contains the plugin directory path
- char* pszDocsPath; // Contains the document directory for plugins documentation (Added in version 1.1.1.0)
- char* pszIconsPath; // Contains the icon directory for icon dlls (Added in version 1.1.2.0)
- HELPERPROC pHelperProcAddress; // Used internally (Contains proc address for PUICallService)
-} PLUGINUNINSTALLPARAMS;
-
-
-
-
-
-// | Helper
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Macro: Run service while uninstalling ----
-// ---------------------------------------------
-
-// Macro: PUICallService
-
-#define PUICallService(service, wParam, lParam) (ppup->pHelperProcAddress) (service, wParam, lParam);
-
-// Description:
-// -------------
-// This service provides the possibility to call a Miranda
-// service in the "UninstallEx" function.
-// Important!: Use this macro always instead of "CallService",
-// because else a crash occurs when the plugin was decativated
-// and gets uninstalled
-
-// Parameters:
-// -------------
-// Same parameters as CallService of Miranda Core.
-
-// Return Values:
-// --------------
-// Return values are the same as the CallService function of Miranda Core.
-// Additionaly returns CALLSERVICE_NOTFOUND if Miranda is not loaded
-// which means the services are not accessable.
-
-
- // Example:
- // ----------------------------------
-
- //if ( (bIsMirandaRunning == TRUE) && (bDoDeleteSettings == TRUE) )
- //{
- // Remove plugin's module
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)"MyPlugin", 0);
- //}
-
-
-
-
-// ---------------------------------------------
-// -- Function: Remove some files in directory -
-// ---------------------------------------------
-
-// Function: PUIRemoveFilesInDirectory
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[]);
-
-// Description:
-// -------------
-// This helper provides the possibility to easily
-// remove specified files in a specified directory.
-
-// Note: The last version of this helper (PUIRemoveFilesInPath)
-// did not work correctly.
-// Please do now always append a NULL slot to the end of your array.
-
-// Parameters:
-// -------------
-// char* pszPath = Path to the files in array
-// const LPCSTR apszFiles[] = NULL-terminated array of files to be deleted.
-
-// Return Values:
-// --------------
-// Returns TRUE if the files could be deleted.
-// FALSE if the files could not be deleted or did not exist.
-
-
-static BOOL __inline PUIRemoveFilesInDirectory(char* pszPath, const char* apszFiles[])
-{
- char szFile[MAX_PATH];
- BOOL bReturn = FALSE;
- int iFile = 0;
-
- while (apszFiles[iFile] != NULL)
- {
- strncpy(szFile, pszPath, sizeof(szFile));
- strncat(szFile, apszFiles[iFile], sizeof(szFile)-strlen(szFile));
-
- if ((BOOL)DeleteFile(szFile) == TRUE) bReturn = TRUE;
- iFile++;
- }
-
- return bReturn;
-}
-
- // Example:
- // ----------------------------------
-
- //const char* apszFiles[] = {"File1.txt", "File2.txt", "File3.txt", NULL};
- //PUIRemoveFilesInDirectory(ppup->pszPluginsPath, apszFiles);
-
-
-
-
-// | Events
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Event: Allow to uninstall a plugin -------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_OKTOUNINSTALL
-
-#define ME_PLUGINUNINSTALLER_OKTOUNINSTALL "PluginUninstaller/OkToUninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the "Remove Plugin" button to be disabled.
-
-
-
-// ---------------------------------------------
-// -- Event: Plugin gets uninstalled -----------
-// ---------------------------------------------
-
-// Event: ME_PLUGINUNINSTALLER_UNINSTALL
-
-#define ME_PLUGINUNINSTALLER_UNINSTALL "PluginUninstaller/Uninstall"
-
-// Submitted Values:
-// -----------------
-// wParam = pszPluginName (String containing the translated plugin name)
-// lParam = pszPluginFile (String containing the plugin dll file name in lower case)
-
-// Return Values:
-// -----------------
-// Returning 1 on this event causes the uninstall process to be canceled.
-
-// Notice:
-// Hook this event if you would like to ask the user for something to remove/uninstall
-// and show your message box on this event. Save the action the user chose in a
-// global BOOL variable and do the chosen action in "UninstallEx".
-// You can get the plugins options window handle with MS_PLUGINUNINSTALLER_GETHANDLE.
-
-// Other plugins can use this event to be noticed that another plugin isn't installed anylonger.
-
-
-
-
-// | Services
-// -----------------------------
-
-
-// ---------------------------------------------
-// -- Service: Remove database module ----------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBMODULE
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBMODULE "PluginUninstaller/RemoveDbModule"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all database modules
-// associated to your plugin.
-// The specified database module will be removed in all contacts
-// including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule // Pointer to a string containd module name. Can't be NULL
-// lParam = (const char*)apszIgnoreSettings // NULL terminated array of strings. Can be 0 if no settings should be ignored.
- // See example 3 for more details
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the module was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbModule(pszModule) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)pszModule, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbModule("MyPlugin");
-
-
- // Example 2:
- // ----------------------------------
-
- //char szModule[] = "MyModule";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, 0);
-
-
- // Example 3:
- // ----------------------------------
-
- // This deletes all settings in the specified module exept
- // the specified settings: "Setting1",..."Setting4"
-
- // char szModule[] = "MyModule";
- // const char* apszIgnoreSettings[] = {"Setting1", "Setting2", "Setting3", "Setting4", NULL};
- // PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szModule, (LPARAM)&apszIgnoreSettings);
-
-
-
-// ---------------------------------------------
-// -- Service: Remove a setting globally -------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY
-
-#define MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY "PluginUninstaller/RemoveDbSettingGlobally"
-
-// Description:
-// -------------
-// This service provides the possibility to delete a specific
-// setting in database in all contacts including the NULL contact.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszModule
-// lParam = (char*)pszSetting
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the setting was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveDbSettingGlobally(pszModule, pszSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)pszModule, (LPARAM)pszSetting);
-
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveDbSettingGlobally("MyPlugin", "MySetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szModule[] = "MyPlugin";
- //szSetting[] = "MySetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBSETTINGGLOBALLY, (WPARAM)szModule, (LPARAM)szSetting);
-
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Remove skinned sound ------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_REMOVESKINSOUND
-
-#define MS_PLUGINUNINSTALLER_REMOVESKINSOUND "PluginUninstaller/RemoveSkinSound"
-
-// Description:
-// -------------
-// This service provides the possibility to delete all your sound settings
-// associated to your plugin.
-// The specified sound will be be removed.
-// Remember to call it always with PUICallService in "UninstallEx" function.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszSoundSetting
-// lParam = 0
-
-// Return Values:
-// --------------
-// Returns 0 on success.
-// Nonzero if the sound was not present in database.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-// Can only be used in "UninstallEx" function
-#define PUIRemoveSkinSound(pszSoundSetting) PUICallService(MS_PLUGINUNINSTALLER_REMOVESKINSOUND, (WPARAM)pszSoundSetting, 0);
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIRemoveSkinSound("MySoundSetting");
-
-
- // Example 2:
- // ----------------------------------
-
- //szSoundModule[] = "MySoundSetting";
- //PUICallService(MS_PLUGINUNINSTALLER_REMOVEDBMODULE, (WPARAM)szSoundSetting, 0);
-
-
-
-
-
-// ---------------------------------------------
-// -- Service: Uninstall a plugin --------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN
-
-#define MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN "PluginUninstaller/UninstallPlugin"
-
-// Description:
-// -------------
-// This service marks a plugin to be uninstalled at next restart of Miranda IM.
-// It uses the default value for "Delete all settings".
-// You can use this service for example when you want that your sub-plugin gets
-// also removed when your main-plugin is uninstalled.
-// Note: This service is not needed for the normal uninstalling functionality.
-
-// Parameters:
-// -------------
-// wParam = (char*)pszPluginName // do not translate this!
-// lParam = (char*)pszPluginFile // without path, only file name!
-
-// Return Values:
-// --------------
-// Returns always 0.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-int __inline PUIUninstallPlugin(char* pszPluginName, char* pszPluginFile)
-{
- return CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)pszPluginName, (LPARAM)pszPluginFile);
-}
-
-#endif
-
-
- // Example 1:
- // ----------------------------------
-
- //PUIUninstallPlugin("PluginName", "plugin.dll");
-
-
- // Example 2:
- // ----------------------------------
-
- // hInst => Handle of a specific (your?) plugin
- // char szPluginName[] = "YourPluginName";
-
- //char* pFileName;
- //char szPath[MAX_PATH];
-
- //GetModuleFileName(hInst, szPath, sizeof(szPath));
- //pFileName = strrchr(szPath, '\\');
- //pFileName = pFileName+1; // Pointer arithmetic
-
- //CallService(MS_PLUGINUNINSTALLER_UNINSTALLPLUGIN, (WPARAM)szPluginName, (LPARAM)pFileName);
-
-
-
-
-// ---------------------------------------------
-// -- Service: Getting handles -----------------
-// ---------------------------------------------
-
-// Service: MS_PLUGINUNINSTALLER_GETHANDLE
-
-#define MS_PLUGINUNINSTALLER_GETHANDLE "PluginUninstaller/GetHandle"
-
-// Description:
-// -------------
-// This service gets a specified window/instance handle.
-
-// Note: This service must not be used in "UninstallEx" function.
-// It is mainly thought for being used in ME_PLUGINUNINSTALLER_UNINSTALL event
-// to give out a MessageBox or something like that.
-
-// Parameters:
-// -------------
-// wParam = UINT uHandleType;
-// lParam = 0
-
-// Possible values for wParam:
-#define PUIHT_HINST_PLUGIN_INSTANCE 0 // HINSTANCE of the PluginUninstaller plugin
-#define PUIHT_HWND_PLUGIN_OPTIONS 1 // HWND of the plugin options dialog (if it is loaded; else NULL)
-
-// Return Values:
-// --------------
-// Returns the specified handle value.
-// If no handle type is specified it returns NULL.
-// The handle doesn't need to be destroyed.
-
-
-#ifndef UNINSTALLER_NOHELPERS
-
-HANDLE __inline PUIGetHandle(UINT uHandleType)
-{
- return (HANDLE)CallService(MS_PLUGINUNINSTALLER_GETHANDLE, uHandleType, 0);
-}
-
-#endif
-
-
- // Example
- // ----------------------------------
-
- //HWND hwndDlg;
- //hwndDlg = (HWND)PUIGetHandle(PUIHT_HWND_PLUGIN_OPTIONS);
-
-
-
-
-
-#endif // M_UNINSTALLER_H
diff --git a/protocols/IcqOscarJ/icqoscar8_10.vcxproj b/protocols/IcqOscarJ/icqoscar8_10.vcxproj index 837f341878..ad693d2dde 100644 --- a/protocols/IcqOscarJ/icqoscar8_10.vcxproj +++ b/protocols/IcqOscarJ/icqoscar8_10.vcxproj @@ -105,7 +105,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;icqoscar8_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -150,7 +150,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;icqoscar8_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -200,7 +200,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;icqoscar8_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -251,7 +251,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;icqoscar8_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/protocols/IcqOscarJ/m_extraicons.h b/protocols/IcqOscarJ/m_extraicons.h deleted file mode 100644 index 589d040cef..0000000000 --- a/protocols/IcqOscarJ/m_extraicons.h +++ /dev/null @@ -1,158 +0,0 @@ -/*
- Copyright (C) 2009 Ricardo Pescuma Domenecci
-
- This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this file; see the file license.txt. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
-
-#ifndef __M_EXTRAICONS_H__
-#define __M_EXTRAICONS_H__
-
-#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
-
-
-#define EXTRAICON_TYPE_CALLBACK 0 // Similar to old clist callbacks, it fires 2 notifications
-#define EXTRAICON_TYPE_ICOLIB 1 // This extra icon will use only icons registered with icolib. No callbacks
- // needed. Just call MS_EXTRAICON_SET_ICON passing the name of the extraicon to set one.
-
-
-typedef struct {
- int cbSize;
- int type; // One of EXTRAICON_TYPE_*
- const char *name; // Internal name. More than one plugin can register extra icons with the same name
- // if both have the same type. In this case, both will be handled as one.
- // This is usefull for ex for extra status, where icq and jabber can share the same slot.
- // If the types are different the second one will be denied.
- const char *description; // [Translated by plugin] Description to be used in GUI
- const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.
-
- // If type == EXTRAICON_TYPE_CALLBACK this two must be set
-
- // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
- // wParam=lParam=0
- MIRANDAHOOK RebuildIcons;
-
- // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HANDLE hContact
- // lParam = int slot
- MIRANDAHOOK ApplyIcon;
-
- // Other optional callbacks
-
- // [Optional] Callback called when extra icon was clicked
- // wParam = HANDLE hContact
- // lParam = int slot
- // param = onClickParam
- MIRANDAHOOKPARAM OnClick;
-
- LPARAM onClickParam;
-
-} EXTRAICON_INFO;
-
-
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
-#define MS_EXTRAICON_REGISTER "ExtraIcon/Register"
-
-
-typedef struct {
- int cbSize;
- HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
- HANDLE hContact; // Contact to set the extra icon
- union { // The icon to be set. This depends on the type of the extra icon:
- HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- const char *icoName; // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- };
-} EXTRAICON;
-
-// Set an extra icon icon
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
-#define MS_EXTRAICON_SET_ICON "ExtraIcon/SetIcon"
-
-
-
-#ifndef _NO_WRAPPERS
-#ifdef __cplusplus
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon,
- MIRANDAHOOK RebuildIcons,
- MIRANDAHOOK ApplyIcon,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_CALLBACK;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.RebuildIcons = RebuildIcons;
- ei.ApplyIcon = ApplyIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon = NULL,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_ICOLIB;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.hImage = hImage;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, const char *icoName)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = icoName;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-#endif
-#endif
-
-
-#endif // __M_EXTRAICONS_H__
diff --git a/protocols/IcqOscarJ/m_folders.h b/protocols/IcqOscarJ/m_folders.h deleted file mode 100644 index c681074ed4..0000000000 --- a/protocols/IcqOscarJ/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
diff --git a/protocols/IcqOscarJ/m_updater.h b/protocols/IcqOscarJ/m_updater.h deleted file mode 100644 index c83b8a4600..0000000000 --- a/protocols/IcqOscarJ/m_updater.h +++ /dev/null @@ -1,117 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// if you set Update::szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (not that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pionted to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pionted to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with the updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin 'short name' in pluginInfo must match the name of the plugin on the file listing, exactly (not including case)
-// AND the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // 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)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp index 4c81717d8a..1ab12a6449 100644 --- a/protocols/JabberG/jabber.cpp +++ b/protocols/JabberG/jabber.cpp @@ -35,11 +35,11 @@ Last change by : $Author: borkra $ #include <m_fontservice.h>
#include <m_icolib.h>
-#include "sdk/m_assocmgr.h"
-#include "sdk/m_folders.h"
-#include "sdk/m_wizard.h"
-#include "sdk/m_toolbar.h"
-#include "sdk/m_extraicons.h"
+#include "m_assocmgr.h"
+#include "m_folders.h"
+#include "m_wizard.h"
+#include "m_toolbar.h"
+#include "m_extraicons.h"
HINSTANCE hInst;
PLUGINLINK *pluginLink;
diff --git a/protocols/JabberG/jabber_10.vcxproj b/protocols/JabberG/jabber_10.vcxproj index a142eaddb6..49589694a4 100644 --- a/protocols/JabberG/jabber_10.vcxproj +++ b/protocols/JabberG/jabber_10.vcxproj @@ -105,7 +105,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -155,7 +155,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -201,7 +201,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -240,7 +240,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;JABBER_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
diff --git a/protocols/JabberG/jabber_events.cpp b/protocols/JabberG/jabber_events.cpp index 806bb07f54..7e26de73d9 100644 --- a/protocols/JabberG/jabber_events.cpp +++ b/protocols/JabberG/jabber_events.cpp @@ -38,7 +38,7 @@ Last change by : $Author: borkra $ #include "m_file.h"
#include "m_addcontact.h"
#include "jabber_disco.h"
-#include "sdk/m_proto_listeningto.h"
+#include "m_proto_listeningto.h"
/////////////////////////////////////////////////////////////////////////////////////////
// OnContactDeleted - processes a contact deletion
diff --git a/protocols/JabberG/jabber_menu.cpp b/protocols/JabberG/jabber_menu.cpp index 24dda93adb..6d7616db10 100644 --- a/protocols/JabberG/jabber_menu.cpp +++ b/protocols/JabberG/jabber_menu.cpp @@ -36,7 +36,7 @@ Last change by : $Author: borkra $ #include <m_hotkeys.h>
#include <m_icolib.h>
-#include "sdk/m_toolbar.h"
+#include "m_toolbar.h"
#define MENUITEM_LASTSEEN 1
#define MENUITEM_SERVER 2
diff --git a/protocols/JabberG/jabber_misc.cpp b/protocols/JabberG/jabber_misc.cpp index dadbe21673..972542ea71 100644 --- a/protocols/JabberG/jabber_misc.cpp +++ b/protocols/JabberG/jabber_misc.cpp @@ -30,7 +30,7 @@ Last change by : $Author: borkra $ #include "jabber_caps.h"
#include <m_popup.h>
-#include "sdk/m_folders.h"
+#include "m_folders.h"
///////////////////////////////////////////////////////////////////////////////
// JabberAddContactToRoster() - adds a contact to the roster
diff --git a/protocols/JabberG/jabber_opt.cpp b/protocols/JabberG/jabber_opt.cpp index 63f96a1814..884fe0f077 100644 --- a/protocols/JabberG/jabber_opt.cpp +++ b/protocols/JabberG/jabber_opt.cpp @@ -30,8 +30,8 @@ Last change by : $Author: borkra $ #include "jabber_caps.h"
#include "jabber_opttree.h"
-#include "sdk/m_wizard.h"
-#include "sdk/m_modernopt.h"
+#include "m_wizard.h"
+#include "m_modernopt.h"
static BOOL (WINAPI *pfnEnableThemeDialogTexture)(HANDLE, DWORD) = 0;
diff --git a/protocols/JabberG/jabber_proto.cpp b/protocols/JabberG/jabber_proto.cpp index ca849c5df3..21f067e12e 100644 --- a/protocols/JabberG/jabber_proto.cpp +++ b/protocols/JabberG/jabber_proto.cpp @@ -42,8 +42,8 @@ Last change by : $Author: m_mluhov $ #include "jabber_caps.h"
#include "jabber_disco.h"
-#include "sdk/m_proto_listeningto.h"
-#include "sdk/m_modernopt.h"
+#include "m_proto_listeningto.h"
+#include "m_modernopt.h"
#pragma warning(disable:4355)
diff --git a/protocols/JabberG/jabber_svc.cpp b/protocols/JabberG/jabber_svc.cpp index 016b2d463c..86fa4eeacc 100644 --- a/protocols/JabberG/jabber_svc.cpp +++ b/protocols/JabberG/jabber_svc.cpp @@ -38,7 +38,7 @@ Last change by : $Author: george.hazan $ #include "m_file.h"
#include "m_addcontact.h"
#include "jabber_disco.h"
-#include "sdk/m_proto_listeningto.h"
+#include "m_proto_listeningto.h"
/////////////////////////////////////////////////////////////////////////////////////////
// GetMyAwayMsg - obtain the current away message
diff --git a/protocols/JabberG/jabber_xstatus.cpp b/protocols/JabberG/jabber_xstatus.cpp index 70101cccc2..f49a7f7c3d 100644 --- a/protocols/JabberG/jabber_xstatus.cpp +++ b/protocols/JabberG/jabber_xstatus.cpp @@ -34,9 +34,9 @@ Last change by : $Author: Michael.Kunz@s2005.TU-Chemnitz.de $ #include <m_cluiframes.h>
-#include "sdk/m_proto_listeningto.h"
+#include "m_proto_listeningto.h"
#include "sdk/m_skin_eng.h"
-#include "sdk/m_extraicons.h"
+#include "m_extraicons.h"
///////////////////////////////////////////////////////////////////////////////
// Simple dialog with timer and ok/cancel buttons
diff --git a/protocols/JabberG/sdk/m_assocmgr.h b/protocols/JabberG/sdk/m_assocmgr.h deleted file mode 100644 index 4e15168643..0000000000 --- a/protocols/JabberG/sdk/m_assocmgr.h +++ /dev/null @@ -1,301 +0,0 @@ -/*
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-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 (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_ASSOCMGR_H__
-#define M_ASSOCMGR_H__
-
-#if defined (_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
-#endif
-
-#if !defined(_TCHAR_DEFINED)
- #include <tchar.h>
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(push) /* save warning settings */
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#endif
-
-/*
- File Association Manager v0.1.1.0
-*/
-
-/* interface id */
-#if !defined(MIID_ASSOCMGR)
- #define MIID_ASSOCMGR {0xa05b56c0,0xcf7b,0x4389,{0xa1,0xe9,0xf1,0x3d,0xb9,0x36,0xe,0xf1}}
-#endif
-#if !defined(MIID_AUTORUN)
- #define MIID_AUTORUN {0xeb0465e2,0xceee,0x11db,{0x83,0xef,0xc1,0xbf,0x55,0xd8,0x95,0x93}}
-#endif
-
-/* Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(FILETYPEDESC*)ftd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWFILETYPE "AssocMgr/AddNewFileType"
-
-typedef struct {
- int cbSize; // set to sizeof(FILETYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- const char *pszService; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to NULL to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- DWORD flags; // see FTDF_* flags below
-
- const char *pszFileExt; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- const char *pszMimeType; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
- union {
- const char *pszVerbDesc; // description for the open verb e.g. "&Install".
- const TCHAR *ptszVerbDesc; // set this to NULL to use the default description.
- const WCHAR *pwszVerbDesc; // include an ampersand (&) character for a mnemonic key.
- }; // please Translate().
-} FILETYPEDESC;
-
-#define FTDF_UNICODE 0x0001 // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
-#define FTDF_DEFAULTDISABLED 0x0002 // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-#define FTDF_BROWSERAUTOOPEN 0x0004 // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
-#define FTDF_ISTEXT 0x0008 // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-#define FTDF_ISSHORTCUT 0x0010 // file type behaves as shortcut, this means a
- // small overlay arrow is applied and the extension is never shown
-
-#if defined(_UNICODE)
- #define FTDF_TCHAR FTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define FTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-__inline static int AssocMgr_AddNewFileType(const char *ext,const char *mime,const char *desc,const char *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pszDescription=desc;
- ftd.pszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags&~FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-__inline static int AssocMgr_AddNewFileTypeW(const char *ext,const char *mime,const WCHAR *desc,const WCHAR *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pwszDescription=desc;
- ftd.pwszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags|FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileTypeW
-#else
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileType
-#endif
-#endif
-
-/* Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam=0
- lParam=(WPARAM)(char*)pszFileExt
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEFILETYPE "AssocMgr/RemoveFileType"
-
-/* Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(URLTYPEDESC*)utd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWURLTYPE "AssocMgr/AddNewUrlType"
-
-typedef struct {
- int cbSize; // set to sizeof(URLTYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- const char *pszService; // service to call when a url is opened (can't be NULL)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // return zero on suceess, nonzero on error.
-
- DWORD flags; // see UTDF_* flags below
-
- const char *pszProtoPrefix; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
-} URLTYPEDESC;
-
-#define UTDF_UNICODE 0x0001 // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
-#define UTDF_DEFAULTDISABLED 0x0002 // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-#if defined(_UNICODE)
- #define UTDF_TCHAR UTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define UTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-static int __inline AssocMgr_AddNewUrlType(const char *prefix,const char *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags&~UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-static int __inline AssocMgr_AddNewUrlTypeW(const char *prefix,const WCHAR *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pwszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags|UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlTypeW
-#else
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlType
-#endif
-#endif
-
-/* Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam=0
- lParam=(WPARAM)(char*)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEURLTYPE "AssocMgr/RemoveUrlType"
-
-/* utility which should be moved as service into m_netlib.h (MS_NETLIB_URLENCODE already exists) */
-#if defined(MoveMemory) && defined(lstrlen)
-static __inline char *Netlib_UrlDecode(char *str)
-{
- char *psz=str;
- for(;*psz;++psz)
- switch(*psz) {
- case '+':
- *psz=' ';
- break;
- case '%':
- if(!psz[1] || !psz[2]) break;
- MoveMemory(psz,&psz[1],2);
- psz[2]=0;
- *psz=(char)strtol(psz,NULL,16);
- MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1);
- break;
- }
- return str;
-}
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(pop) /* restore warning settings */
-#endif
-
-#ifndef ASSOCMGR_NOSETTINGS
-#define SETTING_ONLYWHILERUNNING_DEFAULT 0
-#endif
-
-#endif // M_ASSOCMGR_H
\ No newline at end of file diff --git a/protocols/JabberG/sdk/m_extraicons.h b/protocols/JabberG/sdk/m_extraicons.h deleted file mode 100644 index 589d040cef..0000000000 --- a/protocols/JabberG/sdk/m_extraicons.h +++ /dev/null @@ -1,158 +0,0 @@ -/*
- Copyright (C) 2009 Ricardo Pescuma Domenecci
-
- This is free software; you can redistribute it and/or
- modify it under the terms of the GNU Library General Public
- License as published by the Free Software Foundation; either
- version 2 of the License, or (at your option) any later version.
-
- This 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
- Library General Public License for more details.
-
- You should have received a copy of the GNU Library General Public
- License along with this file; see the file license.txt. If
- not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- Boston, MA 02111-1307, USA.
- */
-
-#ifndef __M_EXTRAICONS_H__
-#define __M_EXTRAICONS_H__
-
-#define MIID_EXTRAICONSSERVICE { 0x62d80749, 0xf169, 0x4592, { 0xb4, 0x4d, 0x3d, 0xd6, 0xde, 0x9d, 0x50, 0xc5 } }
-
-
-#define EXTRAICON_TYPE_CALLBACK 0 // Similar to old clist callbacks, it fires 2 notifications
-#define EXTRAICON_TYPE_ICOLIB 1 // This extra icon will use only icons registered with icolib. No callbacks
- // needed. Just call MS_EXTRAICON_SET_ICON passing the name of the extraicon to set one.
-
-
-typedef struct {
- int cbSize;
- int type; // One of EXTRAICON_TYPE_*
- const char *name; // Internal name. More than one plugin can register extra icons with the same name
- // if both have the same type. In this case, both will be handled as one.
- // This is usefull for ex for extra status, where icq and jabber can share the same slot.
- // If the types are different the second one will be denied.
- const char *description; // [Translated by plugin] Description to be used in GUI
- const char *descIcon; // [Optional] Name of an icon registered with icolib to be used in GUI.
-
- // If type == EXTRAICON_TYPE_CALLBACK this two must be set
-
- // Callback to add icons to clist, calling MS_CLIST_EXTRA_ADD_ICON
- // wParam=lParam=0
- MIRANDAHOOK RebuildIcons;
-
- // Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HANDLE hContact
- // lParam = int slot
- MIRANDAHOOK ApplyIcon;
-
- // Other optional callbacks
-
- // [Optional] Callback called when extra icon was clicked
- // wParam = HANDLE hContact
- // lParam = int slot
- // param = onClickParam
- MIRANDAHOOKPARAM OnClick;
-
- LPARAM onClickParam;
-
-} EXTRAICON_INFO;
-
-
-// Register an extra icon
-// wParam = (EXTRAICON_INFO *) Extra icon info
-// lParam = 0
-// Return: (HANDLE) id of extra icon on success, 0 on error
-#define MS_EXTRAICON_REGISTER "ExtraIcon/Register"
-
-
-typedef struct {
- int cbSize;
- HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
- HANDLE hContact; // Contact to set the extra icon
- union { // The icon to be set. This depends on the type of the extra icon:
- HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
- const char *icoName; // Name of the icon registered with icolib (if EXTRAICON_TYPE_ICOLIB)
- };
-} EXTRAICON;
-
-// Set an extra icon icon
-// wParam = (EXTRAICON *) Extra icon
-// Return: 0 on success
-#define MS_EXTRAICON_SET_ICON "ExtraIcon/SetIcon"
-
-
-
-#ifndef _NO_WRAPPERS
-#ifdef __cplusplus
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon,
- MIRANDAHOOK RebuildIcons,
- MIRANDAHOOK ApplyIcon,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_CALLBACK;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.RebuildIcons = RebuildIcons;
- ei.ApplyIcon = ApplyIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static HANDLE ExtraIcon_Register(const char *name, const char *description, const char *descIcon = NULL,
- MIRANDAHOOKPARAM OnClick = NULL, LPARAM onClickParam = NULL)
-{
- if (!ServiceExists(MS_EXTRAICON_REGISTER))
- return NULL;
-
- EXTRAICON_INFO ei = {0};
- ei.cbSize = sizeof(ei);
- ei.type = EXTRAICON_TYPE_ICOLIB;
- ei.name = name;
- ei.description = description;
- ei.descIcon = descIcon;
- ei.OnClick = OnClick;
- ei.onClickParam = onClickParam;
-
- return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, HANDLE hImage)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.hImage = hImage;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HANDLE hContact, const char *icoName)
-{
- EXTRAICON ei = {0};
- ei.cbSize = sizeof(ei);
- ei.hExtraIcon = hExtraIcon;
- ei.hContact = hContact;
- ei.icoName = icoName;
-
- return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
-}
-
-#endif
-#endif
-
-
-#endif // __M_EXTRAICONS_H__
diff --git a/protocols/JabberG/sdk/m_folders.h b/protocols/JabberG/sdk/m_folders.h deleted file mode 100644 index d1f58f95d4..0000000000 --- a/protocols/JabberG/sdk/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
diff --git a/protocols/JabberG/sdk/m_modernopt.h b/protocols/JabberG/sdk/m_modernopt.h deleted file mode 100644 index 6013ba68d5..0000000000 --- a/protocols/JabberG/sdk/m_modernopt.h +++ /dev/null @@ -1,112 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2007 Artem Shpynov
-Copyright 2000-2008 Miranda ICQ/IM project,
-
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_MODERNOPT_H__
-#define M_MODERNOPT_H__ 1
-
-/*
- 260x210 - subsection
- 368x210 - section
-*/
-
-#define MS_MODERNOPT_SHOW "ModernOpt/Show"
-
-#define ME_MODERNOPT_INITIALIZE "ModernOpt/Initialize"
-
-#define MODEROPT_FLG_UNICODE 0x01
-#ifdef UNICODE
- #define MODEROPT_FLG_TCHAR MODEROPT_FLG_UNICODE
-#else
- #define MODEROPT_FLG_TCHAR 0
-#endif
-
-typedef enum {
- MODERNOPT_TYPE_SECTIONPAGE,
- MODERNOPT_TYPE_SUBSECTIONPAGE,
- MODERNOPT_TYPE_IGNOREOBJECT,
- MODERNOPT_TYPE_COUNT
-};
-
-typedef enum {
- MODERNOPT_PAGE_HOME,
- MODERNOPT_PAGE_ACCOUNTS,
- MODERNOPT_PAGE_SKINS,
- MODERNOPT_PAGE_CLIST,
- MODERNOPT_PAGE_MSGS,
- MODERNOPT_PAGE_IGNORE,
- MODERNOPT_PAGE_STATUS,
- MODERNOPT_PAGE_ADVANCED,
- MODERNOPT_PAGE_MODULES,
- MODERNOPT_PAGE_COUNT
-};
-
-#define MODERNOPT_CTRL_LAST 0
-
-typedef struct {
- int cbSize;
- DWORD dwFlags;
- int iType;
- int iSection;
-
- HICON hIcon;
- union {
- TCHAR *lptzSubsection;
- char *lpzSubsection;
- WCHAR *lpwzSubsection;
- };
-
- HINSTANCE hInstance;
- char *lpzTemplate;
- DLGPROC pfnDlgProc;
- int *iBoldControls;
-
- char *lpszClassicGroup;
- char *lpszClassicPage;
- char *lpszClassicTab;
- char *lpszHelpUrl;
-
- union {
- struct {
- HICON hIcon;
- union {
- TCHAR *lptzName;
- char *lpzName;
- WCHAR *lpwzName;
- };
-
- char *lpzModule;
- char *lpzSetting;
- DWORD dwBit;
- } objIgnore;
- };
-} MODERNOPTOBJECT;
-
-#define MS_MODERNOPT_ADDOBJECT "ModernOpt/AddObject"
-
-#define MS_MODERNOPT_SELECTPAGE "ModernOpt/SelectPage"
-
-#define ME_MODERNINGORE_RELOAD "ModernOpt/Ignore/Reload"
-
-#endif // M_MODERNOPT_H__
diff --git a/protocols/JabberG/sdk/m_proto_listeningto.h b/protocols/JabberG/sdk/m_proto_listeningto.h deleted file mode 100644 index 53e1184961..0000000000 --- a/protocols/JabberG/sdk/m_proto_listeningto.h +++ /dev/null @@ -1,144 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-//this module was created in v0.6.0.0
-
-#ifndef M_PROTO_LISTENINGTO_H__
-#define M_PROTO_LISTENINGTO_H__ 1
-
-
-// Protocol Services /////////////////////////////////////////////////////////////////
-
-// This is the services a protocol have to support to support listening info
-
-typedef struct {
- int cbSize;
-
- union {
- char* pszType; // Media type: Music, Video, etc...
- TCHAR* ptszType;
- };
- union {
- char* pszArtist; // Artist name
- TCHAR* ptszArtist;
- };
- union {
- char* pszAlbum; // Algum name
- TCHAR* ptszAlbum;
- };
- union {
- char* pszTitle; // Song name
- TCHAR* ptszTitle;
- };
- union {
- char* pszTrack; // Track number
- TCHAR* ptszTrack;
- };
- union {
- char* pszYear; // Song year
- TCHAR* ptszYear;
- };
- union {
- char* pszGenre; // Song genre
- TCHAR* ptszGenre;
- };
- union {
- char* pszLength; // Song length
- TCHAR* ptszLength;
- };
- union {
- char* pszPlayer; // Player name
- TCHAR* ptszPlayer;
- };
-
- DWORD dwFlags;
-
-} LISTENINGTOINFO;
-
-#define LTI_UNICODE 1
-
-#ifdef UNICODE
- #define LTI_TCHAR LTI_UNICODE
-#else
- #define LTI_TCHAR 0
-#endif
-
-// Set the listening info for the protocol.
-// Pass NULL to remove it.
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-#define PS_SET_LISTENINGTO "/SetListeningTo"
-
-// Get the listening info for the protocol
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-// The strings inside the struct need to be free using miranda free.
-#define PS_GET_LISTENINGTO "/GetListeningTo"
-
-// Also the protocol have to save a string with the text the other user is (probabily)
-// seeing under the main db key: <protocol>/ListeningTo
-
-// For a contact, the protocol should store the listening info as an string inside
-// the contact db key: <protocol>/ListeningTo
-
-
-// ListeningTo configuration plugin //////////////////////////////////////////////////
-
-// One plugin can be used to set some options relative to the listening to information.
-// But protocols should not assume this plugin exists. If it does not exist, protocols
-// have to decide what default to use.
-// This plugin have to support the following services:
-
-// Get the text format the user wants him / his contacts to see. Some strings represents
-// the text information:
-// %artist%, %album%, %title%, %track%, %year%, %genre%, %length%, %player%, %type%
-// This service is optional
-// wParam = TCHAR* - default text for this protocol
-// lParam = 0
-// Returns a TCHAR* containg the user setting. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETTEXTFORMAT "ListeningTo/GetTextFormat"
-
-// Get the text the user wants him / his contacts to see, parsed with the info sent to
-// this service. Uses the same variables as the above service to the default text.
-// wParam = TCHAR* - default text for this protocol
-// lParam = LISTENINGTOINFO *
-// Returns a TCHAR* containg the parsed text. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETPARSEDTEXT "ListeningTo/GetParsedText"
-
-// Get if the contact options about how to show the music info should be overriten or
-// not.
-// wParam = NULL
-// lParam = hContact
-// Returns a BOOL
-#define MS_LISTENINGTO_OVERRIDECONTACTOPTION "ListeningTo/OverrideContactOption"
-
-// Get the text to show if some info of the contact is empty.
-// wParam = NULL
-// lParam = NULL
-// Returns a TCHAR *. Don't free
-#define MS_LISTENINGTO_GETUNKNOWNTEXT "ListeningTo/GetUnknownText"
-
-
-#endif // M_PROTO_LISTENINGTO_H__
-
-
diff --git a/protocols/JabberG/sdk/m_toolbar.h b/protocols/JabberG/sdk/m_toolbar.h deleted file mode 100644 index 1eff4c19bf..0000000000 --- a/protocols/JabberG/sdk/m_toolbar.h +++ /dev/null @@ -1,75 +0,0 @@ -#ifndef M_TOOLBAR_H
-#define M_TOOLBAR_H
-
-#define TOOLBARBUTTON_ICONIDPREFIX "MTB_"
-#define TOOLBARBUTTON_ICONIDPRIMARYSUFFIX "_Primary"
-#define TOOLBARBUTTON_ICONIDSECONDARYSUFFIX "_Secondary"
-#define TOOLBARBUTTON_ICONNAMEPRESSEDSUFFIX "Pressed"
-
-//button flags
-#define TBBF_DISABLED (1<<0)
-#define TBBF_VISIBLE (1<<1)
-#define TBBF_PUSHED (1<<2)
-#define TBBF_SHOWTOOLTIP (1<<3)
-#define TBBF_ISSEPARATOR (1<<5)
-#define TBBF_ISLBUTTON (1<<6)
-#define TBBF_FLEXSIZESEPARATOR (TBBF_ISSEPARATOR|TBBF_PUSHED)
-typedef struct _tagTBButton
-{
- int cbSize; // size of structure
- char * pszButtonID; // char id of button used to store button info in DB and know about icon
- char * pszButtonName; // name of button (not translated)
- char * pszServiceName; // service name to be executed
- LPARAM lParam; // param of service to be called
- char * pszTooltipUp, *pszTooltipDn;
- DWORD defPos; // default order pos of button (less values are nearer to edge).. please use values greater that 100. the default buttons has pos: 10,20..90
- DWORD tbbFlags; // combine of TBBF_ flags above
- void (*ParamDestructor)(void *); //will be called on parameters deletion
- HANDLE hPrimaryIconHandle;
- HANDLE hSecondaryIconHandle;
-}TBButton;
-
-//////////////////////////////////////////////////////////////////////////
-// Events
-// Only after this event module subscribers should register their buttons
-// wparam=lparam=0
-// don't forget to return 0 to continue processing
-#define ME_TB_MODULELOADED "ToolBar/ModuleLoaded"
-
-//////////////////////////////////////////////////////////////////////////
-// Services
-//
-//////////////////////////////////////////////////////////////////////////
-// Adding a button
-// WPARAM = 0
-// LPARAM = (TBButton *) &description
-// LRESULT = (HANDLE) hButton
-// in order to correctly process default icons via iconlib it should be
-// registered icolib icon with id named:
-// 'TBButton_'+pszButtonID+ 'Up' or +'Down' for Push (2-state) buttons
-#define MS_TB_ADDBUTTON "ToolBar/AddButton"
-
-//////////////////////////////////////////////////////////////////////////
-// Remove button
-// WPARAM = (HANLDE) hButton;
-// LPARAM = 0;
-#define MS_TB_REMOVEBUTTON "ToolBar/RemoveButton"
-
-//////////////////////////////////////////////////////////////////////////
-// SetState
-// WPARAM = (char *) szButtonID;
-// LPARAM = one of below TBST_ states
-// LRESULT= old state
-#define TBST_PUSHED 1
-#define TBST_RELEASED 0
-#define MS_TB_SETBUTTONSTATE "ToolBar/SetButtonState"
-
-//////////////////////////////////////////////////////////////////////////
-// GetState
-// WPARAM = (HANLDE) hButton;
-// LPARAM = 0
-// LRESULT= current state
-#define MS_TB_GETBUTTONSTATE "ToolBar/GetButtonState"
-
-
-#endif
diff --git a/protocols/JabberG/sdk/m_wizard.h b/protocols/JabberG/sdk/m_wizard.h deleted file mode 100644 index 4b37c3a4ab..0000000000 --- a/protocols/JabberG/sdk/m_wizard.h +++ /dev/null @@ -1,90 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2008 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_WIZARD_H__
-#define M_WIZARD_H__ 1
-
-#include "m_options.h"
-
-#define MWF_UNICODE 0x01
-#define MWF_ICOLIB 0x02
-#ifdef _UNICODE
- #define MWF_TCHAR MWF_UNICODE
-#else
- #define MWF_TCHAR 0
-#endif
-
-typedef struct
-{
- DWORD dwFlags;
- HANDLE hContact;
- char *pszWizardName;
- union
- {
- HICON hIcon;
- HANDLE hIcolibItem;
- };
- union
- {
- char *pszTitle;
- WCHAR *pwszTitle;
- TCHAR *ptszTitle;
- };
-} WIZARDINFO;
-
-//show the User Details dialog box
-//wParam=0
-//lParam=(WPARAM)(WIZARDINFO *)wizardInfo
-#define MS_WIZARD_SHOW "Wizard/Show"
-
-// Predefined wizards
-#define MW_MIRANDA_STARTUP "Miranda/Startup"
-#define MW_MIRANDA_CONFIG "Miranda/Config"
-
-/* Wizard/Initialise
-The user opened a details dialog. Modules should do whatever initialisation
-they need and call wizard/addpage one or more times if they want pages
-displayed in the options dialog
-wParam=addInfo
-lParam=(WIZARDINFO *)wizardInfo
-addInfo should be passed straight to the wParam of wizard/addpage
-*/
-#define ME_WIZARD_INITIALISE "Wizard/Initialise"
-
-/* Wizard/AddPage
-Must only be called during an userinfo/initialise hook
-Adds a page to the details dialog
-wParam=addInfo
-lParam=(LPARAM)(OPTIONSDIALOGPAGE*)odp
-addInfo must have come straight from the wParam of userinfo/initialise
-Pages in the details dialog operate just like pages in property sheets. See the
-Microsoft documentation for info on how they operate.
-When the pages receive WM_INITDIALOG, lParam=(LPARAM)(WIZARDINFO *)wizardInfo
-Strings in the structure can be released as soon as the service returns, but
-icons must be kept around. This is not a problem if you're loading them from a
-resource
-*/
-#define MS_WIZARD_ADDPAGE "Wizard/AddPage"
-
-#endif // M_WIZARD_H__
-
diff --git a/protocols/MSN/SDK/m_assocmgr.h b/protocols/MSN/SDK/m_assocmgr.h deleted file mode 100644 index 4e15168643..0000000000 --- a/protocols/MSN/SDK/m_assocmgr.h +++ /dev/null @@ -1,301 +0,0 @@ -/*
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-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 (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_ASSOCMGR_H__
-#define M_ASSOCMGR_H__
-
-#if defined (_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
-#endif
-
-#if !defined(_TCHAR_DEFINED)
- #include <tchar.h>
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(push) /* save warning settings */
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#endif
-
-/*
- File Association Manager v0.1.1.0
-*/
-
-/* interface id */
-#if !defined(MIID_ASSOCMGR)
- #define MIID_ASSOCMGR {0xa05b56c0,0xcf7b,0x4389,{0xa1,0xe9,0xf1,0x3d,0xb9,0x36,0xe,0xf1}}
-#endif
-#if !defined(MIID_AUTORUN)
- #define MIID_AUTORUN {0xeb0465e2,0xceee,0x11db,{0x83,0xef,0xc1,0xbf,0x55,0xd8,0x95,0x93}}
-#endif
-
-/* Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(FILETYPEDESC*)ftd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWFILETYPE "AssocMgr/AddNewFileType"
-
-typedef struct {
- int cbSize; // set to sizeof(FILETYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- const char *pszService; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to NULL to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- DWORD flags; // see FTDF_* flags below
-
- const char *pszFileExt; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- const char *pszMimeType; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
- union {
- const char *pszVerbDesc; // description for the open verb e.g. "&Install".
- const TCHAR *ptszVerbDesc; // set this to NULL to use the default description.
- const WCHAR *pwszVerbDesc; // include an ampersand (&) character for a mnemonic key.
- }; // please Translate().
-} FILETYPEDESC;
-
-#define FTDF_UNICODE 0x0001 // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
-#define FTDF_DEFAULTDISABLED 0x0002 // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-#define FTDF_BROWSERAUTOOPEN 0x0004 // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
-#define FTDF_ISTEXT 0x0008 // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-#define FTDF_ISSHORTCUT 0x0010 // file type behaves as shortcut, this means a
- // small overlay arrow is applied and the extension is never shown
-
-#if defined(_UNICODE)
- #define FTDF_TCHAR FTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define FTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-__inline static int AssocMgr_AddNewFileType(const char *ext,const char *mime,const char *desc,const char *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pszDescription=desc;
- ftd.pszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags&~FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-__inline static int AssocMgr_AddNewFileTypeW(const char *ext,const char *mime,const WCHAR *desc,const WCHAR *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pwszDescription=desc;
- ftd.pwszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags|FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileTypeW
-#else
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileType
-#endif
-#endif
-
-/* Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam=0
- lParam=(WPARAM)(char*)pszFileExt
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEFILETYPE "AssocMgr/RemoveFileType"
-
-/* Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(URLTYPEDESC*)utd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWURLTYPE "AssocMgr/AddNewUrlType"
-
-typedef struct {
- int cbSize; // set to sizeof(URLTYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- const char *pszService; // service to call when a url is opened (can't be NULL)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // return zero on suceess, nonzero on error.
-
- DWORD flags; // see UTDF_* flags below
-
- const char *pszProtoPrefix; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
-} URLTYPEDESC;
-
-#define UTDF_UNICODE 0x0001 // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
-#define UTDF_DEFAULTDISABLED 0x0002 // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-#if defined(_UNICODE)
- #define UTDF_TCHAR UTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define UTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-static int __inline AssocMgr_AddNewUrlType(const char *prefix,const char *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags&~UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-static int __inline AssocMgr_AddNewUrlTypeW(const char *prefix,const WCHAR *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pwszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags|UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlTypeW
-#else
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlType
-#endif
-#endif
-
-/* Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam=0
- lParam=(WPARAM)(char*)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEURLTYPE "AssocMgr/RemoveUrlType"
-
-/* utility which should be moved as service into m_netlib.h (MS_NETLIB_URLENCODE already exists) */
-#if defined(MoveMemory) && defined(lstrlen)
-static __inline char *Netlib_UrlDecode(char *str)
-{
- char *psz=str;
- for(;*psz;++psz)
- switch(*psz) {
- case '+':
- *psz=' ';
- break;
- case '%':
- if(!psz[1] || !psz[2]) break;
- MoveMemory(psz,&psz[1],2);
- psz[2]=0;
- *psz=(char)strtol(psz,NULL,16);
- MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1);
- break;
- }
- return str;
-}
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(pop) /* restore warning settings */
-#endif
-
-#ifndef ASSOCMGR_NOSETTINGS
-#define SETTING_ONLYWHILERUNNING_DEFAULT 0
-#endif
-
-#endif // M_ASSOCMGR_H
\ No newline at end of file diff --git a/protocols/MSN/SDK/m_folders.h b/protocols/MSN/SDK/m_folders.h deleted file mode 100644 index ed373ae555..0000000000 --- a/protocols/MSN/SDK/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
diff --git a/protocols/MSN/SDK/m_metacontacts.h b/protocols/MSN/SDK/m_metacontacts.h deleted file mode 100644 index 9f348bd2c6..0000000000 --- a/protocols/MSN/SDK/m_metacontacts.h +++ /dev/null @@ -1,166 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright © 2004 Universite Louis PASTEUR, STRASBOURG.
-Copyright © 2004 Scott Ellis (www.scottellis.com.au mail@scottellis.com.au)
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_METACONTACTS_H__
-#define M_METACONTACTS_H__ 1
-
-#ifndef MIID_METACONTACTS
-#define MIID_METACONTACTS {0xc0325019, 0xc1a7, 0x40f5, { 0x83, 0x65, 0x4f, 0x46, 0xbe, 0x21, 0x86, 0x3e}}
-#endif
-
-//get the handle for a contact's parent metacontact
-//wParam=(HANDLE)hSubContact
-//lParam=0
-//returns a handle to the parent metacontact, or null if this contact is not a subcontact
-#define MS_MC_GETMETACONTACT "MetaContacts/GetMeta"
-
-//gets the handle for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the default contact, or null on failure
-#define MS_MC_GETDEFAULTCONTACT "MetaContacts/GetDefault"
-
-//gets the contact number for the default contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD contact number, or -1 on failure
-#define MS_MC_GETDEFAULTCONTACTNUM "MetaContacts/GetDefaultNum"
-
-//gets the handle for the 'most online' contact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a handle to the 'most online' contact
-#define MS_MC_GETMOSTONLINECONTACT "MetaContacts/GetMostOnline"
-
-//gets the number of subcontacts for a metacontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns a DWORD representing the number of subcontacts for the given metacontact
-#define MS_MC_GETNUMCONTACTS "MetaContacts/GetNumContacts"
-
-//gets the handle of a subcontact, using the subcontact's number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns a handle to the specified subcontact
-#define MS_MC_GETSUBCONTACT "MetaContacts/GetSubContact"
-
-//sets the default contact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACTNUM "MetaContacts/SetDefault"
-
-//sets the default contact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success
-#define MS_MC_SETDEFAULTCONTACT "MetaContacts/SetDefaultByHandle"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's contact number
-//wParam=(HANDLE)hMetaContact
-//lParam=(DWORD)contact number
-//returns 0 on success
-#define MS_MC_FORCESENDCONTACTNUM "MetaContacts/ForceSendContact"
-
-//forces the metacontact to send using a specific subcontact, using the subcontact's handle
-//wParam=(HANDLE)hMetaContact
-//lParam=(HANDLE)hSubcontact
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_FORCESENDCONTACT "MetaContacts/ForceSendContactByHandle"
-
-//'unforces' the metacontact to send using a specific subcontact
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 0 on success (will fail if 'force default' is in effect)
-#define MS_MC_UNFORCESENDCONTACT "MetaContacts/UnforceSendContact"
-
-//'forces' or 'unforces' (i.e. toggles) the metacontact to send using it's default contact
-// overrides (and clears) 'force send' above, and will even force use of offline contacts
-// will send ME_MC_FORCESEND or ME_MC_UNFORCESEND event
-//wParam=(HANDLE)hMetaContact
-//lParam=0
-//returns 1(true) or 0(false) representing new state of 'force default'
-#define MS_MC_FORCEDEFAULT "MetaContacts/ForceSendDefault"
-
-// method to get state of 'force' for a metacontact
-// wParam=(HANDLE)hMetaContact
-// lParam= (DWORD)&contact_number or NULL
-//
-// if lparam supplied, the contact_number of the contatct 'in force' will be copied to the address it points to,
-// or if none is in force, the value (DWORD)-1 will be copied
-// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
-#define MS_MC_GETFORCESTATE "MetaContacts/GetForceState"
-
-// fired when a metacontact's default contact changes (fired upon creation of metacontact also, when default is initially set)
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hDefaultContact
-#define ME_MC_DEFAULTTCHANGED "MetaContacts/DefaultChanged"
-
-// fired when a metacontact's subcontacts change (fired upon creation of metacontact, when contacts are added or removed, and when
-// contacts are reordered) - a signal to re-read metacontact data
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_SUBCONTACTSCHANGED "MetaContacts/SubcontactsChanged"
-
-// fired when a metacontact is forced to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=(HANDLE)hForceContact
-#define ME_MC_FORCESEND "MetaContacts/ForceSend"
-
-// fired when a metacontact is 'unforced' to send using a specific subcontact
-// wParam=(HANDLE)hMetaContact
-// lParam=0
-#define ME_MC_UNFORCESEND "MetaContacts/UnforceSend"
-
-// method to get protocol name - used to be sure you're dealing with a "real" metacontacts plugin :)
-// wParam=lParam=0
-#define MS_MC_GETPROTOCOLNAME "MetaContacts/GetProtoName"
-
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=0
-// convert a given contact into a metacontact
-#define MS_MC_CONVERTTOMETA "MetaContacts/ConvertToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=(HANDLE)hContact
-// lParam=(HANDLE)hMeta
-// add an existing contact to a metacontact
-#define MS_MC_ADDTOMETA "MetaContacts/AddToMetacontact"
-
-// added 0.9.5.0 (22/3/05)
-// wParam=0
-// lParam=(HANDLE)hContact
-// remove a contact from a metacontact
-#define MS_MC_REMOVEFROMMETA "MetaContacts/RemoveFromMetacontact"
-
-
-// added 0.9.13.2 (6/10/05)
-// wParam=(BOOL)disable
-// lParam=0
-// enable/disable the 'hidden group hack' - for clists that support subcontact hiding using 'IsSubcontact' setting
-// should be called once in the clist 'onmodulesloaded' event handler (which, since it's loaded after the db, will be called
-// before the metacontact onmodulesloaded handler where the subcontact hiding is usually done)
-#define MS_MC_DISABLEHIDDENGROUP "MetaContacts/DisableHiddenGroup"
-
-#endif
diff --git a/protocols/MSN/SDK/m_proto_listeningto.h b/protocols/MSN/SDK/m_proto_listeningto.h deleted file mode 100644 index 53e1184961..0000000000 --- a/protocols/MSN/SDK/m_proto_listeningto.h +++ /dev/null @@ -1,144 +0,0 @@ -/*
-
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright 2000-2006 Miranda ICQ/IM project,
-all portions of this codebase are copyrighted to the people
-listed in contributors.txt.
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-//this module was created in v0.6.0.0
-
-#ifndef M_PROTO_LISTENINGTO_H__
-#define M_PROTO_LISTENINGTO_H__ 1
-
-
-// Protocol Services /////////////////////////////////////////////////////////////////
-
-// This is the services a protocol have to support to support listening info
-
-typedef struct {
- int cbSize;
-
- union {
- char* pszType; // Media type: Music, Video, etc...
- TCHAR* ptszType;
- };
- union {
- char* pszArtist; // Artist name
- TCHAR* ptszArtist;
- };
- union {
- char* pszAlbum; // Algum name
- TCHAR* ptszAlbum;
- };
- union {
- char* pszTitle; // Song name
- TCHAR* ptszTitle;
- };
- union {
- char* pszTrack; // Track number
- TCHAR* ptszTrack;
- };
- union {
- char* pszYear; // Song year
- TCHAR* ptszYear;
- };
- union {
- char* pszGenre; // Song genre
- TCHAR* ptszGenre;
- };
- union {
- char* pszLength; // Song length
- TCHAR* ptszLength;
- };
- union {
- char* pszPlayer; // Player name
- TCHAR* ptszPlayer;
- };
-
- DWORD dwFlags;
-
-} LISTENINGTOINFO;
-
-#define LTI_UNICODE 1
-
-#ifdef UNICODE
- #define LTI_TCHAR LTI_UNICODE
-#else
- #define LTI_TCHAR 0
-#endif
-
-// Set the listening info for the protocol.
-// Pass NULL to remove it.
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-#define PS_SET_LISTENINGTO "/SetListeningTo"
-
-// Get the listening info for the protocol
-// wParam = NULL
-// lParam = LISTENINGTOINFO *
-// The strings inside the struct need to be free using miranda free.
-#define PS_GET_LISTENINGTO "/GetListeningTo"
-
-// Also the protocol have to save a string with the text the other user is (probabily)
-// seeing under the main db key: <protocol>/ListeningTo
-
-// For a contact, the protocol should store the listening info as an string inside
-// the contact db key: <protocol>/ListeningTo
-
-
-// ListeningTo configuration plugin //////////////////////////////////////////////////
-
-// One plugin can be used to set some options relative to the listening to information.
-// But protocols should not assume this plugin exists. If it does not exist, protocols
-// have to decide what default to use.
-// This plugin have to support the following services:
-
-// Get the text format the user wants him / his contacts to see. Some strings represents
-// the text information:
-// %artist%, %album%, %title%, %track%, %year%, %genre%, %length%, %player%, %type%
-// This service is optional
-// wParam = TCHAR* - default text for this protocol
-// lParam = 0
-// Returns a TCHAR* containg the user setting. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETTEXTFORMAT "ListeningTo/GetTextFormat"
-
-// Get the text the user wants him / his contacts to see, parsed with the info sent to
-// this service. Uses the same variables as the above service to the default text.
-// wParam = TCHAR* - default text for this protocol
-// lParam = LISTENINGTOINFO *
-// Returns a TCHAR* containg the parsed text. This need to be free using miranda free.
-#define MS_LISTENINGTO_GETPARSEDTEXT "ListeningTo/GetParsedText"
-
-// Get if the contact options about how to show the music info should be overriten or
-// not.
-// wParam = NULL
-// lParam = hContact
-// Returns a BOOL
-#define MS_LISTENINGTO_OVERRIDECONTACTOPTION "ListeningTo/OverrideContactOption"
-
-// Get the text to show if some info of the contact is empty.
-// wParam = NULL
-// lParam = NULL
-// Returns a TCHAR *. Don't free
-#define MS_LISTENINGTO_GETUNKNOWNTEXT "ListeningTo/GetUnknownText"
-
-
-#endif // M_PROTO_LISTENINGTO_H__
-
-
diff --git a/protocols/MSN/SDK/m_smileyadd.h b/protocols/MSN/SDK/m_smileyadd.h deleted file mode 100644 index bae3890c7b..0000000000 --- a/protocols/MSN/SDK/m_smileyadd.h +++ /dev/null @@ -1,252 +0,0 @@ -/*
-Miranda SmileyAdd Plugin
-Copyright (C) 2005 - 2009 Boris Krasnovskiy
-Copyright (C) 2003 - 2004 Rein-Peter de Boer
-
-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 version 2
-of the License.
-
-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, see <http://www.gnu.org/licenses/>.
-*/
-#include <richedit.h>
-
-#define SAFLRE_INSERTEMF 2 // insert smiley as EMF into RichEdit, otherwise bitmap inserted
- // this flag allows "true" transparency
-#define SAFLRE_OUTGOING 4 // Parsing outgoing message
-#define SAFLRE_NOCUSTOM 8 // Do not use custom smileys
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- HWND hwndRichEditControl; //handle to the rich edit control
- CHARRANGE* rangeToReplace; //same meaning as for normal Richedit use (NULL = replaceall)
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. SmileyAdd will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL, "Standard" will be used
- unsigned flags; //Flags (SAFLRE_*) that define the behaivior
- BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HANDLE hContact; //Contact handle
-} SMADD_RICHEDIT3;
-
-//Replace smileys in a rich edit control...
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_RICHEDIT3*) &smre; //pointer to SMADD_RICHEDIT3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_REPLACESMILEYS "SmileyAdd/ReplaceSmileys"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; //protocol to use... if you have defined a protocol, you can
- //use your own protocol name. Smiley add will automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- int xPosition; //Postition to place the selectwindow
- int yPosition; // "
- int Direction; //Direction (i.e. size upwards/downwards/etc) of the window 0, 1, 2, 3
-
- HWND hwndTarget; //Window, where to send the message when smiley is selected.
- UINT targetMessage; //Target message, to be sent.
- LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
- //see the example file.
- HWND hwndParent; //Parent window for smiley dialog
- HANDLE hContact; //Contact handle
-} SMADD_SHOWSEL3;
-
-//Show smiley selection window
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_SHOWSEL3*) &smre; //pointer to SMADD_SHOWSEL3
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_SHOWSELECTION "SmileyAdd/ShowSmileySelection"
-
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* Protocolname; // " "
- HICON ButtonIcon; //RETURN VALUE: this is filled with the icon handle
- //of the smiley that can be used on the button
- //if used with GETINFO2 handle must be destroyed by user!
- //NULL if the buttonicon is not defined...
- int NumberOfVisibleSmileys; //Number of visible smileys defined.
- int NumberOfSmileys; //Number of total smileys defined
- HANDLE hContact; //Contact handle
-} SMADD_INFO2;
-
-//get button smiley icon
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_INFO2*) &smgi; //pointer to SMADD_INFO2
-//return: TRUE if API succeeded (all parameters were valid) , FALSE if not.
-#define MS_SMILEYADD_GETINFO2 "SmileyAdd/GetInfo2"
-
-// Event notifies that SmileyAdd options have changed
-// Message dialogs usually need to redraw it's content on reception of this event
-//wParam = Contact handle which options have changed, NULL if global options changed
-//lParam = (LPARAM) 0; not used
-#define ME_SMILEYADD_OPTIONSCHANGED "SmileyAdd/OptionsChanged"
-
-#define SAFL_PATH 1 // provide smiley file path, icon otherwise
-#define SAFL_UNICODE 2 // string fields in OPTIONSDIALOGPAGE are WCHAR*
-#define SAFL_OUTGOING 4 // Parsing outgoing message
-#define SAFL_NOCUSTOM 8 // Do not use custom smileys
-
-#if defined _UNICODE || defined UNICODE
- #define SAFL_TCHAR SAFL_UNICODE
-#else
- #define SAFL_TCHAR 0
-#endif
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- const char* Protocolname; //protocol to use... if you have defined a protocol, u can
- //use your own protocol name. Smiley add wil automatically
- //select the smileypack that is defined for your protocol.
- //Or, use "Standard" for standard smiley set. Or "ICQ", "MSN"
- //if you prefer those icons.
- //If not found or NULL: "Standard" will be used
- union {
- TCHAR* str; //String to parse
- char* astr;
- wchar_t* wstr;
- };
- unsigned flag; //One of the SAFL_ flags specifies parsing requirements
- //This parameter should be filled by the user
-
- unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
- unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
- //this parameter filled by SmileyAdd
- HANDLE hContact; //Contact handle
-} SMADD_BATCHPARSE2;
-
-typedef struct
-{
- unsigned startChar; //Starting smiley character
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- unsigned size; //Number of characters in smiley (0 if not found)
- //Because of iterative nature of the API caller should set this
- //parameter to correct value
- union {
- const TCHAR* filepath;
- const char* afilepath;
- const wchar_t* wfilepath;
- HICON hIcon; //User responsible for destroying icon handle
- };
-} SMADD_BATCHPARSERES;
-
-//find all smileys in text, API parses the provided text and returns all smileys found
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSE2*) &smgp; //pointer to SMADD_BATCHPARSE2
-//function returns pointer to array SMADD_BATCHPARSERES records for each smiley found
-//if no smileys found NULL is returned
-//if non NULL value returned pointer must be freed with MS_SMILEYADD_BATCHFREE API
-#define MS_SMILEYADD_BATCHPARSE "SmileyAdd/BatchParse"
-
-//Free memory allocated by MS_SMILEYADD_BATCHPARSE
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_BATCHPARSERES*) &smgp; //pointer to SMADD_BATCHPARSERES
-#define MS_SMILEYADD_BATCHFREE "SmileyAdd/BatchFree"
-
-typedef struct
-{
- unsigned cbSize; //size of the structure
- char* name; //smiley category name for reference
- char* dispname; //smiley category name for display
-} SMADD_REGCAT;
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_REGCAT*) &smgp; pointer to SMADD_REGCAT
-#define MS_SMILEYADD_REGISTERCATEGORY "SmileyAdd/RegisterCategory"
-
-//Register smiley category
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) Pointer to protocol name or NULL for all;
-#define MS_SMILEYADD_RELOAD "SmileyAdd/Reload"
-
-#ifndef MIID_SMILEY
-// {E03C71B2-6DEE-467e-A4F0-DD516745876A}
-#define MIID_SMILEY { 0xe03c71b2, 0x6dee, 0x467e, { 0xa4, 0xf0, 0xdd, 0x51, 0x67, 0x45, 0x87, 0x6a } }
-#endif
-
-/**
- NM_FIREVIEWCHANGE is WM_NOTIFY Message for notify parent of host window about smiley are going to be repaint
-
- The proposed action is next: Owner of RichEdit windows received NM_FIREVIEWCHANGE through WM_NOTIFY
- twice first time before painting|invalidating (FVCN_PREFIRE) and second time - after (FVCN_POSTFIRE).
- The Owner window may change any values of received FVCNDATA_NMHDR structure in order to raise needed action.
- For example it may substitute FVCA_INVALIDATE to FVCA_CUSTOMDRAW event to force painting on self offscreen context.
-
- It can be:
- FVCA_CUSTOMDRAW - in this case you need to provide valid HDC to draw on and valid RECT of smiley
- FVCA_INVALIDATE - to invalidate specified rect of window
- FVCA_NONE - skip any action. But be aware - animation will be stopped till next repainting of smiley.
- FVCA_SENDVIEWCHANGE - to notify richedit ole about object changed. Be aware Richedit will fully reconstruct itself
-
- Another point is moment of received smiley rect - it is only valid if FVCA_DRAW is initially set,
- and it is PROBABLY valid if FVCA_INVALIDATE is set. And it most probably invalid in case of FVCA_SENDVIEWCHANGE.
- The smiley position is relative last full paint HDC. Usually it is relative to top-left corner of host
- richedit (NOT it client area) in windows coordinates.
-
-*/
-
-// Type of Event one of
-#define FVCN_PREFIRE 1
-#define FVCN_POSTFIRE 2
-
-// Action of event are going to be done
-#define FVCA_NONE 0
-#define FVCA_DRAW 1 // do not modify hdc in case of _DRAW, Use _CUSTOMDRAW
-#define FVCA_CUSTOMDRAW 2
-//#define FVCA_INVALIDATE 3 (not supported)
-//#define FVCA_SENDVIEWCHANGE 4 (not supported)
-#define FVCA_SKIPDRAW 5
-
-// Extended NMHDR structure for WM_NOTIFY
-typedef struct
-{
- //NMHDR structure
- HWND hwndFrom; // Window of smiley host
- UINT idFrom; // ignored
- UINT code; // NM_FIREVIEWCHANGE
-
- size_t cbSize;
- BYTE bEvent; // FVCN_ value - pre- or post- painting
- BYTE bAction; // FVCA_ keys
- HDC hDC; // Canvas to draw on
- RECT rcRect; // Valid/should be in case of FVCA_DRAW
- COLORREF clrBackground; // color to fill background if fTransparent is not set
- BOOL fTransparent; // if need to fill back color (not supported)
- LPARAM lParam; // used by host window PreFire and PostFire event
-} FVCNDATA_NMHDR;
-
-// Code of WM_NOTIFY message (code)
-#define NM_FIREVIEWCHANGE NM_FIRST+1;
-
-typedef struct
-{
- unsigned cbSize; // size of the structure
- HANDLE hContact;
- int type; // 0 - directory, 1 - file;
- TCHAR* path; // smiley category name for reference
-} SMADD_CONT;
-
-//Loads all smileys for the contact
-//wParam = (WPARAM) 0; not used
-//lParam = (LPARAM) (SMADD_CONT*) &dir; // pointer to directory to load smiley from
-#define MS_SMILEYADD_LOADCONTACTSMILEYS "SmileyAdd/LoadContactSmileys"
diff --git a/protocols/MSN/msn_10.vcxproj b/protocols/MSN/msn_10.vcxproj index d82b9e6abb..f4f281c01b 100644 --- a/protocols/MSN/msn_10.vcxproj +++ b/protocols/MSN/msn_10.vcxproj @@ -94,7 +94,7 @@ </CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MSN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -127,7 +127,7 @@ </CustomBuildStep>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;MSN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@@ -169,7 +169,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MSN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -218,7 +218,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;MSN_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/protocols/MSN/msn_global.h b/protocols/MSN/msn_global.h index 5988fa41cd..317b834afa 100644 --- a/protocols/MSN/msn_global.h +++ b/protocols/MSN/msn_global.h @@ -65,9 +65,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_avatars.h>
#include <m_timezones.h>
-#include "sdk/m_proto_listeningto.h"
-#include "sdk/m_folders.h"
-#include "sdk/m_metacontacts.h"
+#include "m_proto_listeningto.h"
+#include "m_folders.h"
+#include "m_metacontacts.h"
#include "ezxml.h"
diff --git a/protocols/MSN/msn_links.cpp b/protocols/MSN/msn_links.cpp index c91828d8f7..7da85b3202 100644 --- a/protocols/MSN/msn_links.cpp +++ b/protocols/MSN/msn_links.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include <m_addcontact.h>
-#include "sdk/m_assocmgr.h"
+#include "m_assocmgr.h"
static HANDLE hServiceParseLink;
diff --git a/protocols/MSN/msn_lists.cpp b/protocols/MSN/msn_lists.cpp index 59b90a3688..2a63bb530c 100644 --- a/protocols/MSN/msn_lists.cpp +++ b/protocols/MSN/msn_lists.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_global.h"
#include "msn_proto.h"
-#include "sdk/m_smileyadd.h"
+#include "m_smileyadd.h"
void CMsnProto::Lists_Init(void)
{
diff --git a/protocols/MSN/msn_p2p.cpp b/protocols/MSN/msn_p2p.cpp index 3a1f5bb078..1e3215b2e5 100644 --- a/protocols/MSN/msn_p2p.cpp +++ b/protocols/MSN/msn_p2p.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_global.h"
#include "msn_proto.h"
-#include "sdk/m_smileyadd.h"
+#include "m_smileyadd.h"
static const char sttP2Pheader[] =
"Content-Type: application/x-msnmsgrp2p\r\n"
diff --git a/protocols/Yahoo/Yahoo_10.vcxproj b/protocols/Yahoo/Yahoo_10.vcxproj index 9ec85aa5b3..ee3045a188 100644 --- a/protocols/Yahoo/Yahoo_10.vcxproj +++ b/protocols/Yahoo/Yahoo_10.vcxproj @@ -101,7 +101,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;YAHOO_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -144,7 +144,7 @@ </Midl>
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;YAHOO_EXPORTS;HAVE_CONFIG_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>false</StringPooling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -192,7 +192,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;YAHOO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
@@ -243,7 +243,7 @@ <IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
<WholeProgramOptimization>true</WholeProgramOptimization>
- <AdditionalIncludeDirectories>../../include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;HAVE_CONFIG_H;YAHOO_EXPORTS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<ExceptionHandling>false</ExceptionHandling>
diff --git a/protocols/Yahoo/m_assocmgr.h b/protocols/Yahoo/m_assocmgr.h deleted file mode 100644 index 4e15168643..0000000000 --- a/protocols/Yahoo/m_assocmgr.h +++ /dev/null @@ -1,301 +0,0 @@ -/*
-
-'File Association Manager'-Plugin for
-Miranda IM: the free IM client for Microsoft* Windows*
-
-Copyright (C) 2005-2007 H. Herkenrath
-
-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 (AssocMgr-License.txt); if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_ASSOCMGR_H__
-#define M_ASSOCMGR_H__
-
-#if defined (_MSC_VER) && (_MSC_VER >= 1020)
- #pragma once
-#endif
-
-#if !defined(_TCHAR_DEFINED)
- #include <tchar.h>
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(push) /* save warning settings */
-#pragma warning(disable:4201) /* nonstandard extension used : nameless struct/union */
-#endif
-
-/*
- File Association Manager v0.1.1.0
-*/
-
-/* interface id */
-#if !defined(MIID_ASSOCMGR)
- #define MIID_ASSOCMGR {0xa05b56c0,0xcf7b,0x4389,{0xa1,0xe9,0xf1,0x3d,0xb9,0x36,0xe,0xf1}}
-#endif
-#if !defined(MIID_AUTORUN)
- #define MIID_AUTORUN {0xeb0465e2,0xceee,0x11db,{0x83,0xef,0xc1,0xbf,0x55,0xd8,0x95,0x93}}
-#endif
-
-/* Add a new file type v0.1.0.0+
-Add a new file type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(FILETYPEDESC*)ftd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWFILETYPE "AssocMgr/AddNewFileType"
-
-typedef struct {
- int cbSize; // set to sizeof(FILETYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the file type.
- // this icon should contain icons of all sizes and color depths
- // needed by Windows.
- // set this to 0 to use the generic 'miranda file' icon
- // provided by assocmgr.
-
- const char *pszService; // service to call when a file is opened
- // this service will be called with lParam set to
- // the file name being opened including path.
- // it can be assumed that the provided file name
- // is always the long path name.
- // return zero on suceess, nonzero on error.
- // Note: set this to NULL to pass the file name as
- // commandline argument to miranda32.exe (db file).
-
- DWORD flags; // see FTDF_* flags below
-
- const char *pszFileExt; // file extension, e.g. ".ext"
- // first character must be a dot, assumed to be all lower case.
- // may only consist of ascii characters.
-
- const char *pszMimeType; // MIME type of the file, e.g. "application/x-icq"
- // may only consist of ascii characters.
- union {
- const char *pszVerbDesc; // description for the open verb e.g. "&Install".
- const TCHAR *ptszVerbDesc; // set this to NULL to use the default description.
- const WCHAR *pwszVerbDesc; // include an ampersand (&) character for a mnemonic key.
- }; // please Translate().
-} FILETYPEDESC;
-
-#define FTDF_UNICODE 0x0001 // pszDescription and pszVerbDesc in struct are Unicode.
- // the specified service is called with Unicode parameters.
-
-#define FTDF_DEFAULTDISABLED 0x0002 // file type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-
-#define FTDF_BROWSERAUTOOPEN 0x0004 // tells the browser to download and open the file directly
- // without prompt (currently IE and Opera6+) - be careful!
- // use only in conjunction with pszMimeType set.
- // this tells Windows that open can be safely invoked for
- // downloaded files.
- // Note that this flag may create a security risk,
- // because downloaded files could contain malicious content.
- // you need to protect against such an exploit.
-
-#define FTDF_ISTEXT 0x0008 // tells Windows that this file can be opened
- // as a text file using e.g Notepad.
- // only has an effect on Windows XP and higher.
-
-#define FTDF_ISSHORTCUT 0x0010 // file type behaves as shortcut, this means a
- // small overlay arrow is applied and the extension is never shown
-
-#if defined(_UNICODE)
- #define FTDF_TCHAR FTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define FTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-__inline static int AssocMgr_AddNewFileType(const char *ext,const char *mime,const char *desc,const char *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pszDescription=desc;
- ftd.pszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags&~FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-__inline static int AssocMgr_AddNewFileTypeW(const char *ext,const char *mime,const WCHAR *desc,const WCHAR *verb,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- FILETYPEDESC ftd;
- ftd.cbSize=sizeof(FILETYPEDESC);
- ftd.pszFileExt=ext;
- ftd.pszMimeType=mime;
- ftd.pwszDescription=desc;
- ftd.pwszVerbDesc=verb;
- ftd.hInstance=hinst;
- ftd.nIconResID=iconid;
- ftd.pszService=service;
- ftd.flags=flags|FTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWFILETYPE,0,(LPARAM)&ftd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileTypeW
-#else
- #define AssocMgr_AddNewFileTypeT AssocMgr_AddNewFileType
-#endif
-#endif
-
-/* Remove a file type v0.1.0.0+
-Remove a file type registered previously using
-MS_ASSOCMGR_ADDNEWFILETYPE.
-This removes all settings in database and in registry
-associated with the file type.
- wParam=0
- lParam=(WPARAM)(char*)pszFileExt
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEFILETYPE "AssocMgr/RemoveFileType"
-
-/* Add a new url protocol type v0.1.0.0+
-Add a new url type to be registered with Windows.
-You probably want to call this event when
-ME_SYSTEM_MODULESLOADED is fired.
- wParam=0
- lParam=(LPARAM)(URLTYPEDESC*)utd
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_ADDNEWURLTYPE "AssocMgr/AddNewUrlType"
-
-typedef struct {
- int cbSize; // set to sizeof(URLTYPEDESC), in bytes
- union {
- const char *pszDescription; // description for options dialog and in registry.
- const TCHAR *ptszDescription; // please Translate(), use singular form here.
- const WCHAR *pwszDescription;
- };
- HINSTANCE hInstance; // instance of the calling module and where the icon
- // resource is located.
- // always be sure you set this to your own hInstance even if
- // you use the generic default icon
-
- UINT nIconResID; // resource id of an icon to use for the url type.
- // only a small one (16x16) is needed by Windows,
- // e.g. proto icon as used in Miranda.
- // set this to 0 to use the default miranda icon.
-
- const char *pszService; // service to call when a url is opened (can't be NULL)
- // this service will be called with lParam set to
- // the url being opened including the prefix.
- // return zero on suceess, nonzero on error.
-
- DWORD flags; // see UTDF_* flags below
-
- const char *pszProtoPrefix; // protocol prefix, e.g. "http:"
- // last character must be a colon, assumed to be all lower case.
- // may only consist of ascii characters.
-} URLTYPEDESC;
-
-#define UTDF_UNICODE 0x0001 // pszDescription in struct is Unicode.
- // the specified service is called with Unicode parameters.
-
-#define UTDF_DEFAULTDISABLED 0x0002 // url type is not registered by default, it needs to be
- // enabled explicitly on the options page.
-#if defined(_UNICODE)
- #define UTDF_TCHAR UTDF_UNICODE // strings in struct are WCHAR*, service accepts WCHAR*
-#else
- #define UTDF_TCHAR 0 // strings in struct are char*, service accepts char*
-#endif
-
-#if !defined(ASSOCMGR_NOHELPERFUNCTIONS)
-static int __inline AssocMgr_AddNewUrlType(const char *prefix,const char *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags&~UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-static int __inline AssocMgr_AddNewUrlTypeW(const char *prefix,const WCHAR *desc,HINSTANCE hinst,UINT iconid,const char *service,DWORD flags)
-{
- URLTYPEDESC utd;
- utd.cbSize=sizeof(URLTYPEDESC);
- utd.pszProtoPrefix=prefix;
- utd.pwszDescription=desc;
- utd.hInstance=hinst;
- utd.nIconResID=iconid;
- utd.pszService=service;
- utd.flags=flags|UTDF_UNICODE;
- return CallService(MS_ASSOCMGR_ADDNEWURLTYPE,0,(LPARAM)&utd);
-}
-#if defined(_UNICODE)
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlTypeW
-#else
- #define AssocMgr_AddNewUrlTypeT AssocMgr_AddNewUrlType
-#endif
-#endif
-
-/* Remove an url protocol type v0.1.0.0+
-Remove an url registered previously using
-MS_ASSOCMGR_ADDNEWURLTYPE.
-This removes all settings in database and in registry
-associated with the url type.
- wParam=0
- lParam=(WPARAM)(char*)pszProtoPrefix
-Returns 0 on success, nonzero otherwise.
-*/
-#define MS_ASSOCMGR_REMOVEURLTYPE "AssocMgr/RemoveUrlType"
-
-/* utility which should be moved as service into m_netlib.h (MS_NETLIB_URLENCODE already exists) */
-#if defined(MoveMemory) && defined(lstrlen)
-static __inline char *Netlib_UrlDecode(char *str)
-{
- char *psz=str;
- for(;*psz;++psz)
- switch(*psz) {
- case '+':
- *psz=' ';
- break;
- case '%':
- if(!psz[1] || !psz[2]) break;
- MoveMemory(psz,&psz[1],2);
- psz[2]=0;
- *psz=(char)strtol(psz,NULL,16);
- MoveMemory(&psz[1],&psz[3],lstrlenA(&psz[3])+1);
- break;
- }
- return str;
-}
-#endif
-
-#if defined(_MSC_VER)
-#pragma warning(pop) /* restore warning settings */
-#endif
-
-#ifndef ASSOCMGR_NOSETTINGS
-#define SETTING_ONLYWHILERUNNING_DEFAULT 0
-#endif
-
-#endif // M_ASSOCMGR_H
\ No newline at end of file diff --git a/protocols/Yahoo/m_folders.h b/protocols/Yahoo/m_folders.h deleted file mode 100644 index ed373ae555..0000000000 --- a/protocols/Yahoo/m_folders.h +++ /dev/null @@ -1,282 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don''t want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static INT_PTR FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, const char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
-
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, const wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathEx(HANDLE hFolderEntry, char *path, const int size, char *notFound, char *fileName)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- if (strlen(path) > 0)
- {
- strcat(path, "\\");
- }
- else{
- path[0] = '\0';
- }
-
- if (fileName)
- {
- strcat(path, fileName);
- }
-
- return res;
-}
-
-__inline static INT_PTR FoldersGetCustomPathExW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW, wchar_t *fileNameW)
-{
- FOLDERSGETDATA fgd = {0};
- INT_PTR res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
-
- if (wcslen(pathW) > 0)
- {
- wcscat(pathW, L"\\");
- }
- else{
- pathW[0] = L'\0';
- }
-
- if (fileNameW)
- {
- wcscat(pathW, fileNameW);
- }
-
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersGetCustomPathExT FoldersGetCustomPathExW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersGetCustomPathExT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
diff --git a/protocols/facebook/API/m_folders.h b/protocols/facebook/API/m_folders.h deleted file mode 100644 index 0953432c10..0000000000 --- a/protocols/facebook/API/m_folders.h +++ /dev/null @@ -1,218 +0,0 @@ -/*
-Custom profile folders plugin for Miranda IM
-
-Copyright © 2005 Cristian Libotean
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-#ifndef M_CUSTOM_FOLDERS_H
-#define M_CUSTOM_FOLDERS_H
-
-#define FOLDERS_API 501 //dunno why it's here but it is :)
-
-#define PROFILE_PATH "%profile_path%"
-#define CURRENT_PROFILE "%current_profile%"
-#define MIRANDA_PATH "%miranda_path%"
-#define PLUGINS_PATH "%miranda_path%" "\\plugins"
-
-#define TO_WIDE(x) L ## x
-
-#define PROFILE_PATHW L"%profile_path%"
-#define CURRENT_PROFILEW L"%current_profile%"
-#define MIRANDA_PATHW L"%miranda_path%"
-
-#define FOLDER_AVATARS PROFILE_PATH "\\" CURRENT_PROFILE "\\avatars"
-#define FOLDER_VCARDS PROFILE_PATH "\\" CURRENT_PROFILE "\\vcards"
-#define FOLDER_LOGS PROFILE_PATH "\\" CURRENT_PROFILE "\\logs"
-#define FOLDER_RECEIVED_FILES PROFILE_PATH "\\" CURRENT_PROFILE "\\received files"
-#define FOLDER_DOCS MIRANDA_PATH "\\" "docs"
-
-#define FOLDER_CONFIG PLUGINS_PATH "\\" "config"
-
-#define FOLDER_SCRIPTS MIRANDA_PATH "\\" "scripts"
-
-#define FOLDER_UPDATES MIRANDA_PATH "\\" "updates"
-
-#define FOLDER_CUSTOMIZE MIRANDA_PATH "\\" "customize"
-#define FOLDER_CUSTOMIZE_SOUNDS FOLDER_CUSTOMIZE "\\sounds"
-#define FOLDER_CUSTOMIZE_ICONS FOLDER_CUSTOMIZE "\\icons"
-#define FOLDER_CUSTOMIZE_SMILEYS FOLDER_CUSTOMIZE "\\smileys"
-#define FOLDER_CUSTOMIZE_SKINS FOLDER_CUSTOMIZE "\\skins"
-#define FOLDER_CUSTOMIZE_THEMES FOLDER_CUSTOMIZE "\\themes"
-
-
-#define FOLDERS_NAME_MAX_SIZE 64 //maximum name and section size
-
-#define FF_UNICODE 0x00000001
-
-#if defined (UNICODE)
- #define FF_TCHAR FF_UNICODE
-#else
- #define FF_TCHAR 0
-#endif
-
-typedef struct{
- int cbSize; //size of struct
- char szSection[FOLDERS_NAME_MAX_SIZE]; //section name, if it doesn't exist it will be created otherwise it will just add this entry to it
- char szName[FOLDERS_NAME_MAX_SIZE]; //entry name - will be shown in options
- union{
- const char *szFormat; //default string format. Fallback string in case there's no entry in the database for this folder. This should be the initial value for the path, users will be able to change it later.
- const wchar_t *szFormatW; //String is dup()'d so you can free it later. If you set the unicode string don't forget to set the flag accordingly.
- const TCHAR *szFormatT;
- };
- DWORD flags; //FF_* flags
-} FOLDERSDATA;
-
-/*Folders/Register/Path service
- wParam - not used, must be 0
- lParam - (LPARAM) (const FOLDERDATA *) - Data structure filled with
- the necessary information.
- Returns a handle to the registered path or 0 on error.
- You need to use this to call the other services.
-*/
-#define MS_FOLDERS_REGISTER_PATH "Folders/Register/Path"
-
-/*Folders/Get/PathSize service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (int *) - pointer to the variable that receives the size of the path
- string (not including the null character). Depending on the flags set when creating the path
- it will either call strlen() or wcslen() to get the length of the string.
- Returns the size of the buffer.
-*/
-#define MS_FOLDERS_GET_SIZE "Folders/Get/PathSize"
-
-typedef struct{
- int cbSize;
- int nMaxPathSize; //maximum size of buffer. This represents the number of characters that can be copied to it (so for unicode strings you don't send the number of bytes but the length of the string).
- union{
- char *szPath; //pointer to the buffer that receives the path without the last "\\"
- wchar_t *szPathW; //unicode version of the buffer.
- TCHAR *szPathT;
- };
-} FOLDERSGETDATA;
-
-/*Folders/Get/Path service
- wParam - (WPARAM) (int) - handle to registered path
- lParam - (LPARAM) (FOLDERSGETDATA *) pointer to a FOLDERSGETDATA that has all the relevant fields filled.
- Should return 0 on success, or nonzero otherwise.
-*/
-#define MS_FOLDERS_GET_PATH "Folders/Get/Path"
-
-typedef struct{
- int cbSize;
- union{
- char **szPath; //address of a string variable (char *) or (wchar_t*) where the path should be stored (the last \ won't be copied).
- wchar_t **szPathW; //unicode version of string.
- TCHAR **szPathT;
- };
-} FOLDERSGETALLOCDATA;
-
-/*Folders/GetRelativePath/Alloc service
- wParam - (WPARAM) (int) - Handle to registered path
- lParam - (LPARAM) (FOLDERSALLOCDATA *) data
- This service is the same as MS_FOLDERS_GET_PATH with the difference that this service
- allocates the needed space for the buffer. It uses miranda's memory functions for that and you need
- to use those to free the resulting buffer.
- Should return 0 on success, or nonzero otherwise. Currently it only returns 0.
-*/
-#define MS_FOLDERS_GET_PATH_ALLOC "Folders/Get/Path/Alloc"
-
-
-/*Folders/On/Path/Changed
- wParam - (WPARAM) 0
- lParam - (LPARAM) 0
- Triggered when the folders change, you should reget the paths you registered.
-*/
-#define ME_FOLDERS_PATH_CHANGED "Folders/On/Path/Changed"
-
-#ifndef FOLDERS_NO_HELPER_FUNCTIONS
-
-#ifndef M_UTILS_H__
-#error The helper functions require that m_utils.h be included in the project. Please include that file if you want to use the helper functions. If you don't want to use the functions just define FOLDERS_NO_HELPER_FUNCTIONS.
-#endif
-//#include "../../../include/newpluginapi.h"
-
-__inline static HANDLE FoldersRegisterCustomPath(const char *section, const char *name, const char *defaultPath)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0';
- fd.szFormat = defaultPath;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static HANDLE FoldersRegisterCustomPathW(const char *section, const char *name, const wchar_t *defaultPathW)
-{
- FOLDERSDATA fd = {0};
- if (!ServiceExists(MS_FOLDERS_REGISTER_PATH)) return 0;
- fd.cbSize = sizeof(FOLDERSDATA);
- strncpy(fd.szSection, section, FOLDERS_NAME_MAX_SIZE);
- fd.szSection[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- strncpy(fd.szName, name, FOLDERS_NAME_MAX_SIZE);
- fd.szName[FOLDERS_NAME_MAX_SIZE - 1] = '\0'; //make sure it's NULL terminated
- fd.szFormatW = defaultPathW;
- fd.flags = FF_UNICODE;
- return (HANDLE) CallService(MS_FOLDERS_REGISTER_PATH, 0, (LPARAM) &fd);
-}
-
-__inline static int FoldersGetCustomPath(HANDLE hFolderEntry, char *path, const int size, char *notFound)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = size;
- fgd.szPath = path;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- char buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) notFound, (LPARAM) buffer);
- mir_snprintf(path, size, "%s", buffer);
- }
- return res;
-}
-
-__inline static int FoldersGetCustomPathW(HANDLE hFolderEntry, wchar_t *pathW, const int count, wchar_t *notFoundW)
-{
- FOLDERSGETDATA fgd = {0};
- int res;
- fgd.cbSize = sizeof(FOLDERSGETDATA);
- fgd.nMaxPathSize = count;
- fgd.szPathW = pathW;
- res = CallService(MS_FOLDERS_GET_PATH, (WPARAM) hFolderEntry, (LPARAM) &fgd);
- if (res)
- {
- wcsncpy(pathW, notFoundW, count);
- pathW[count - 1] = '\0';
- }
- return res;
-}
-
-# ifdef _UNICODE
-# define FoldersGetCustomPathT FoldersGetCustomPathW
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPathW
-#else
-# define FoldersGetCustomPathT FoldersGetCustomPath
-# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
-#endif
-
-#endif
-
-#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/protocols/facebook/API/m_updater.h b/protocols/facebook/API/m_updater.h deleted file mode 100644 index 488d3722ce..0000000000 --- a/protocols/facebook/API/m_updater.h +++ /dev/null @@ -1,150 +0,0 @@ -#ifndef _M_UPDATER_H
-#define _M_UPDATER_H
-
-// NOTES:
-// - For langpack updates, include a string of the following format in the langpack text file:
-// ";FLID: <file listing name> <version>"
-// version must be four numbers seperated by '.', in the range 0-255 inclusive
-// - Updater will disable plugins that are downloaded but were not active prior to the update (this is so that, if an archive contains e.g. ansi and
-// unicode versions, the correct plugin will be the only one active after the new version is installed)...so if you add a support plugin, you may need
-// to install an ini file to make the plugin activate when miranda restarts after the update
-// - Updater will replace all dlls that have the same internal shortName as a downloaded update dll (this is so that msn1.dll and msn2.dll, for example,
-// will both be updated) - so if you have a unicode and a non-unicode version of a plugin in your archive, you should make the internal names different (which will break automatic
-// updates from the file listing if there is only one file listing entry for both versions, unless you use the 'MS_UPDATE_REGISTER' service below)
-// - Updater will install all files in the root of the archive into the plugins folder, except for langpack files that contain the FLID string which go into the root folder (same
-// folder as miranda32.exe)...all folders in the archive will also be copied to miranda's root folder, and their contents transferred into the new folders. The only exception is a
-// special folder called 'root_files' - if there is a folder by that name in the archive, it's contents will also be copied into miranda's root folder - this is intended to be used
-// to install additional dlls etc that a plugin may require)
-
-// if you set Update.szUpdateURL to the following value when registering, as well as setting your beta site and version data,
-// Updater will ignore szVersionURL and pbVersionPrefix, and attempt to find the file listing URL's from the backend XML data.
-// for this to work, the plugin name in pluginInfo.shortName must match the file listing exactly (except for case)
-#define UPDATER_AUTOREGISTER "UpdaterAUTOREGISTER"
-// Updater will also use the backend xml data if you provide URL's that reference the miranda file listing for updates (so you can use that method
-// if e.g. your plugin shortName does not match the file listing) - it will grab the file listing id from the end of these URLs
-
-typedef struct Update_tag {
- int cbSize;
- char *szComponentName; // component name as it will appear in the UI (will be translated before displaying)
-
- char *szVersionURL; // URL where the current version can be found (NULL to disable)
- BYTE *pbVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- // (note that this URL could point at a binary file - dunno why, but it could :)
- int cpbVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szUpdateURL; // URL where dll/zip is located
- // set to UPDATER_AUTOREGISTER if you want Updater to find the file listing URLs (ensure plugin shortName matches file listing!)
-
- char *szBetaVersionURL; // URL where the beta version can be found (NULL to disable betas)
- BYTE *pbBetaVersionPrefix; // bytes occuring in VersionURL before the version, used to locate the version information within the URL data
- int cpbBetaVersionPrefix; // number of bytes pointed to by pbVersionPrefix
- char *szBetaUpdateURL; // URL where dll/zip is located
-
- BYTE *pbVersion; // bytes of current version, used for comparison with those in VersionURL
- int cpbVersion; // number of bytes pointed to by pbVersion
-
- char *szBetaChangelogURL; // url for displaying changelog for beta versions
-} Update;
-
-// register a comonent with Updater
-//
-// wparam = 0
-// lparam = (LPARAM)&Update
-#define MS_UPDATE_REGISTER "Update/Register"
-
-// utility functions to create a version string from a DWORD or from pluginInfo
-// point buf at a buffer at least 16 chars wide - but note the version string returned may be shorter
-//
-__inline static char *CreateVersionString(DWORD version, char *buf) {
- mir_snprintf(buf, 16, "%d.%d.%d.%d", (version >> 24) & 0xFF, (version >> 16) & 0xFF, (version >> 8) & 0xFF, version & 0xFF);
- return buf;
-}
-
-__inline static char *CreateVersionStringPlugin(PLUGININFO *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-__inline static char *CreateVersionStringPluginEx(PLUGININFOEX *pluginInfo, char *buf) {
- return CreateVersionString(pluginInfo->version, buf);
-}
-
-
-// register the 'easy' way - use this method if you have no beta URL and the plugin is on the miranda file listing
-// NOTE: the plugin version string on the file listing must be the string version of the version in pluginInfo (i.e. 0.0.0.1,
-// four numbers between 0 and 255 inclusivem, so no letters, brackets, etc.)
-//
-// wParam = (int)fileID - this is the file ID from the file listing (i.e. the number at the end of the download link)
-// lParam = (PLUGININFO*)&pluginInfo
-#define MS_UPDATE_REGISTERFL "Update/RegisterFL"
-
-// this function can be used to 'unregister' components - useful for plugins that register non-plugin/langpack components and
-// may need to change those components on the fly
-// lParam = (char *)szComponentName
-#define MS_UPDATE_UNREGISTER "Update/Unregister"
-
-// this event is fired when the startup process is complete, but NOT if a restart is imminent
-// it is designed for status managment plugins to use as a trigger for beggining their own startup process
-// wParam = lParam = 0 (unused)
-// (added in version 0.1.6.0)
-#define ME_UPDATE_STARTUPDONE "Update/StartupDone"
-
-// this service can be used to enable/disable Updater's global status control
-// it can be called from the StartupDone event handler
-// wParam = (BOOL)enable
-// lParam = 0
-// (added in version 0.1.6.0)
-#define MS_UPDATE_ENABLESTATUSCONTROL "Update/EnableStatusControl"
-
-// An description of usage of the above service and event:
-// Say you are a status control plugin that normally sets protocol or global statuses in your ModulesLoaded event handler.
-// In order to make yourself 'Updater compatible', you would move the status control code from ModulesLoaded to another function,
-// say DoStartup. Then, in ModulesLoaded you would check for the existence of the MS_UPDATE_ENABLESTATUSCONTROL service.
-// If it does not exist, call DoStartup. If it does exist, hook the ME_UPDATE_STARTUPDONE event and call DoStartup from there. You may
-// also wish to call MS_UPDATE_ENABLESTATUSCONTROL with wParam == FALSE at this time, to disable Updater's own status control feature.
-
-// this service can be used to determine whether updates are possible for a component with the given name
-// wParam = 0
-// lParam = (char *)szComponentName
-// returns TRUE if updates are supported, FALSE otherwise
-#define MS_UPDATE_ISUPDATESUPPORTED "Update/IsUpdateSupported"
-
-#endif
-
-
-/////////////// Usage Example ///////////////
-
-#ifdef EXAMPLE_CODE
-
-// you need to #include "m_updater.h" and HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded) in your Load function...
-
-int OnModulesLoaded(WPARAM wParam, LPARAM lParam) {
-
- Update update = {0}; // for c you'd use memset or ZeroMemory...
- char szVersion[16];
-
- update.cbSize = sizeof(Update);
-
- update.szComponentName = pluginInfo.shortName;
- update.pbVersion = (BYTE *)CreateVersionString(&pluginInfo, szVersion);
- update.cpbVersion = strlen((char *)update.pbVersion);
-
- // 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)
- update.szUpdateURL = "http://scottellis.com.au:81/test/updater.zip";
- update.szVersionURL = "http://scottellis.com.au:81/test/updater_test.html";
- update.pbVersionPrefix = (BYTE *)"Updater version ";
-
- update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix);
-
- // do the same for the beta versions of the above struct members if you wish to allow beta updates from another URL
-
- CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
-
- // Alternatively, to register a plugin with e.g. file ID 2254 on the file listing...
- // CallService(MS_UPDATE_REGISTERFL, (WPARAM)2254, (LPARAM)&pluginInfo);
-
- return 0;
-}
-
-#endif
diff --git a/protocols/facebook/facebook_10.sln b/protocols/facebook/facebook_10.sln index e473e179a2..8f9e54b602 100644 --- a/protocols/facebook/facebook_10.sln +++ b/protocols/facebook/facebook_10.sln @@ -5,20 +5,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "facebook", "facebook_10.vcx EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Unicode|Win32 = Debug Unicode|Win32
- Debug Unicode|x64 = Debug Unicode|x64
- Release Unicode|Win32 = Release Unicode|Win32
- Release Unicode|x64 = Release Unicode|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
- {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug|Win32.ActiveCfg = Debug|Win32
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug|Win32.Build.0 = Debug|Win32
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug|x64.ActiveCfg = Debug|x64
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Debug|x64.Build.0 = Debug|x64
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release|Win32.ActiveCfg = Release|Win32
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release|Win32.Build.0 = Release|Win32
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release|x64.ActiveCfg = Release|x64
+ {DADE9455-DC28-465A-9604-2CA28052B9FB}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
diff --git a/protocols/facebook/facebook_10.vcxproj b/protocols/facebook/facebook_10.vcxproj index 0d4ee549fe..9198e45689 100644 --- a/protocols/facebook/facebook_10.vcxproj +++ b/protocols/facebook/facebook_10.vcxproj @@ -95,8 +95,6 @@ <IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(IncludePath)</IncludePath>
<IncludePath Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(IncludePath)</IncludePath>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</LinkIncremental>
- <LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<PreBuildEvent>
@@ -106,7 +104,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
- <AdditionalIncludeDirectories>..\..\..\Miranda\trunk\miranda\include;API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;FACEBOOK_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>false</MinimalRebuild>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
@@ -146,7 +144,7 @@ <ClCompile>
<Optimization>Disabled</Optimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
- <AdditionalIncludeDirectories>..\..\..\Miranda\trunk\miranda\include;API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>_DEBUG;_WINDOWS;_USRDLL;FACEBOOK_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<FunctionLevelLinking>false</FunctionLevelLinking>
@@ -183,7 +181,7 @@ <Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\Miranda\trunk\miranda\include;API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;FACEBOOK_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@@ -235,7 +233,7 @@ <Optimization>Full</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
- <AdditionalIncludeDirectories>..\..\..\Miranda\trunk\miranda\include;API;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>../../include;../../plugins/ExternalAPI;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;FACEBOOK_EXPORTS;_CRT_SECURE_NO_WARNINGS;NOMINMAX;_WIN64;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<StringPooling>true</StringPooling>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
diff --git a/protocols/weather/m_cluiframes.h b/protocols/weather/m_cluiframes.h deleted file mode 100644 index 43b37b5133..0000000000 --- a/protocols/weather/m_cluiframes.h +++ /dev/null @@ -1,275 +0,0 @@ -/*
-Miranda ICQ: the free icq client for MS Windows
-Copyright (C) 2000-2 Richard Hughes, Roland Rabien & Tristan Van de Vreede
-
-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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*/
-
-//#pragma hdrstop
-
-////////////////////////////////////
-//Extra Image Column Support +0.5.0.0
-
-//Extra columns type.
-//column arranged in this way
-//
-// [statusicon] ContactName [ADV1][ADV2][SMS][EMAIL][PROTO]
-//
-#define EXTRA_ICON_EMAIL 1
-#define EXTRA_ICON_PROTO 2
-#define EXTRA_ICON_SMS 3
-#define EXTRA_ICON_ADV1 4
-#define EXTRA_ICON_ADV2 5
-#define DEFAULT_TITLEBAR_HEIGHT 18
-
-#define CLS_SKINNEDFRAME 0x0800 //this control will be the main contact list (v. 0.3.4.3+ 2004/11/02)
-
-typedef struct
-{
-int cbSize; //must be sizeof(IconExtraColumn)
-int ColumnType;
-HANDLE hImage; //return value from MS_CLIST_EXTRA_ADD_ICON
-}IconExtraColumn,*pIconExtraColumn;
-
-
-//Set icon for contact at needed column
-//wparam=hContact
-//lparam=pIconExtraColumn
-//return 0 on success,-1 on failure
-//
-//See above for supported columns
-#define MS_CLIST_EXTRA_SET_ICON "CListFrames/SetIconForExraColumn"
-
-//Adding icon to extra image list.
-//Call this in ME_CLIST_EXTRA_LIST_REBUILD event
-//
-//wparam=hIcon
-//lparam=0
-//return hImage on success,-1 on failure
-#define MS_CLIST_EXTRA_ADD_ICON "CListFrames/AddIconToExtraImageList"
-
-
-
-#define ME_CLIST_EXTRA_LIST_REBUILD "CListFrames/OnExtraListRebuild"
-
-//called with wparam=hContact
-#define ME_CLIST_EXTRA_IMAGE_APPLY "CListFrames/OnExtraImageApply"
-
-
-///////////////////////////////////
-
-
-
-
-//
-//want show tooltip for statusbar
-//wparam=(char *)protocolname
-//lparam=0
-#define ME_CLIST_FRAMES_SB_SHOW_TOOLTIP "CListFrames/StatusBarShowToolTip"
-
-
-//want hide tooltip for statusbar
-//wparam=lparam=0
-
-#define ME_CLIST_FRAMES_SB_HIDE_TOOLTIP "CListFrames/StatusBarHideToolTip"
-
-//
-
-
-
-//adds a frame window
-//wParam=(CLISTFrame*)
-//lParam=0
-//returns an integer, the frame id.
-typedef struct tagCLISTFrame {
- DWORD cbSize;
- HWND hWnd ;
- HICON hIcon;
- int align; //al flags below
- int height;
- int Flags; //F_flags below
- union {
- char *name; //frame window name indentifier (DO NOT TRANSLATE)
- wchar_t *wname;
- LPTSTR tname;
- };
- union {
- char *TBname; //titlebar & menu caption
- wchar_t *TBwname;
- LPTSTR TBtname;
- };
- //COLORREF TBBackColour; //titlebar background colour
-} CLISTFrame;
-#define F_VISIBLE 1 //Frame visible
-#define F_SHOWTB 2 //Show TitleBar
-#define F_UNCOLLAPSED 4 //UnCollapse frame
-#define F_LOCKED 8 //Lock Frame
-#define F_NOBORDER 16 //Dont apply WS_BORDER style for window
-#define F_SHOWTBTIP 32 //Show titlebar tooltip
-#define F_NO_SUBCONTAINER 1024 //Support skining no subcontainer needed
-#define F_SKINNED 2048 // skinned frame (for owned subframe only)
-#define F_UNICODE 32768 //Use unicode text
-#ifdef _UNICODE
-# define F_TCHAR F_UNICODE
-#else
-# define F_TCHAR 0
-#endif
-
-// frame alignment
-#define alTop 0x00000001
-#define alBottom 0x00000002
-#define alClient 0x00000004 //only one alClient frame
-#define MS_CLIST_FRAMES_ADDFRAME "CListFrames/AddFrame"
-
-#define MS_CLIST_FRAMES_REMOVEFRAME "CListFrames/RemoveFrame"
-
-//shows all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHOWALLFRAMES "CListFrames/ShowALLFrames"
-
-//shows the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHOWALLFRAMESTB "CListFrames/ShowALLFramesTB"
-
-//hides the titlebars of all frames
-//wParam=lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_HIDEALLFRAMESTB "CListFrames/HideALLFramesTB"
-
-//shows the frame if it is hidden,
-//hides the frame if it is shown
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHFRAME "CListFrames/SHFrame"
-
-//shows the frame titlebar if it is hidden,
-//hides the frame titlebar if it is shown
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SHFRAMETITLEBAR "CListFrame/SHFrameTitleBar"
-
-//locks the frame if it is unlocked,
-//unlock the frame if it is locked
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_ULFRAME "CListFrame/ULFrame"
-
-//collapses the frame if it is uncollapsed,
-//uncollapses the frame if it is collapsed
-//wParam=FrameId
-//lParam=0
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_UCOLLFRAME "CListFrame/UCOLLFrame"
-
-//trigger border flags
-//wparam=frameid
-//lparam=0
-#define MS_CLIST_FRAMES_SETUNBORDER "CListFrame/SetUnBorder"
-
-//trigger skinned flags
-//wparam=frameid
-//lparam=0
-#define MS_CLIST_FRAMES_SETSKINNED "CListFrame/SetSkinnedFrame"
-
-//redraws the frame
-//wParam=FrameId, -1 for all frames
-//lparam=FU_flags
-//returns a pointer to option, -1 on failure
-#define FU_TBREDRAW 1 //redraw titlebar
-#define FU_FMREDRAW 2 //redraw Frame
-#define FU_FMPOS 4 //update Frame position
-#define MS_CLIST_FRAMES_UPDATEFRAME "CListFrame/UpdateFrame"
-
-//gets the frame options
-//(HIWORD)wParam=FrameId
-//(LOWORD)wParam=FO_flag
-//lParam=0
-//returns a pointer to option, -1 on failure
-#define FO_FLAGS 0x0001 //return set of F_VISIBLE,F_SHOWTB,F_UNCOLLAPSED,F_LOCKED,F_NOBORDER,F_SHOWTBTIP
-#define FO_NAME 0x0002 //Change name
-#define FO_TBNAME 0x0003 //Change TB caption
-#define FO_TBSTYLE 0x0004 //Change TB style
-#define FO_TBEXSTYLE 0x0005 //Change TB exstyle
-#define FO_ICON 0x0006 //Change icon
-#define FO_HEIGHT 0x0007 //Change height
-#define FO_ALIGN 0x0008 //Change align
-#define FO_TBTIPNAME 0x0009 //Change TB tooltip
-#define FO_FLOATING 0x000a //Change floating mode
-
-#define FO_UNICODETEXT 0x8000 // flag for FO_NAME,FO_TBNAME, FO_TBTIPNAME set/get lPAram as unicode wchar_t
-#ifdef _UNICODE
- #define FO_TCHAR FO_UNICODETEXT
-#else
- #define FO_TCHAR 0x0000
-#endif
-
-#define MS_CLIST_FRAMES_GETFRAMEOPTIONS "CListFrame/GetFrameOptions"
-
-//sets the frame options
-//(HIWORLD)wParam=FrameId
-//(LOWORD)wParam=FO_flag
-//lParam=value
-//returns 0 on success, -1 on failure
-#define MS_CLIST_FRAMES_SETFRAMEOPTIONS "CListFrame/SetFrameOptions"
-
-
-//menu stuff
-
-//add a new item to the context frame menu
-//wParam=0
-//lParam=(LPARAM)(CLISTMENUITEM*)&mi
-//returns a handle to the new item
-//popupposition=frameid
-//contactowner=advanced parameter
-#define MS_CLIST_ADDCONTEXTFRAMEMENUITEM "CList/AddContextFrameMenuItem"
-
-//remove a item from context frame menu
-//wParam=hMenuItem returned by MS_CLIST_ADDCONTACTMENUITEM
-//lParam=0
-//returns 0 on success, nonzero on failure
-#define MS_CLIST_REMOVECONTEXTFRAMEMENUITEM "CList/RemoveContextFrameMenuItem"
-
-//builds the context menu for a frame
-//wparam=frameid
-//lParam=0
-//returns a HMENU on success, or NULL on failure
-#define MS_CLIST_MENUBUILDFRAMECONTEXT "CList/BuildContextFrameMenu"
-
-/*
-//the frame menu is about to be built
-wparam=frameid
-lparam=
--1 for build from titlebar,
- use
- MS_CLIST_ADDCONTEXTFRAMEMENUITEM
- MS_CLIST_REMOVECONTEXTFRAMEMENUITEM
-
->0 for build in main menu,
-must be popupname=lparam to place your items in right popup of main menu.
- use
- MS_CLIST_ADDMAINMENUITEM
- MS_CLIST_REMOVEMAINMENUITEM
-
-*/
-#define ME_CLIST_PREBUILDFRAMEMENU "CList/PreBuildFrameMenu"
-
-//needed by cluiframes module to add frames menu to main menu.
-//it just calls NotifyEventHooks(hPreBuildFrameMenuEvent,wParam,lParam);
-#define MS_CLIST_FRAMEMENUNOTIFY "CList/ContextFrameMenuNotify"
diff --git a/protocols/weather/weather_10.sln b/protocols/weather/weather_10.sln index 30e43d2cd6..038ac8b9a7 100644 --- a/protocols/weather/weather_10.sln +++ b/protocols/weather/weather_10.sln @@ -5,20 +5,20 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Weather", "weather_10.vcxpr EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug Unicode|Win32 = Debug Unicode|Win32
- Debug Unicode|x64 = Debug Unicode|x64
- Release Unicode|Win32 = Release Unicode|Win32
- Release Unicode|x64 = Release Unicode|x64
+ Debug|Win32 = Debug|Win32
+ Debug|x64 = Debug|x64
+ Release|Win32 = Release|Win32
+ Release|x64 = Release|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug Unicode|Win32.ActiveCfg = Debug Unicode|Win32
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug Unicode|Win32.Build.0 = Debug Unicode|Win32
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug Unicode|x64.ActiveCfg = Debug Unicode|x64
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug Unicode|x64.Build.0 = Debug Unicode|x64
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release Unicode|Win32.ActiveCfg = Release Unicode|Win32
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release Unicode|Win32.Build.0 = Release Unicode|Win32
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release Unicode|x64.ActiveCfg = Release Unicode|x64
- {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release Unicode|x64.Build.0 = Release Unicode|x64
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.ActiveCfg = Debug|Win32
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|Win32.Build.0 = Debug|Win32
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.ActiveCfg = Debug|x64
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Debug|x64.Build.0 = Debug|x64
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.ActiveCfg = Release|Win32
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|Win32.Build.0 = Release|Win32
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.ActiveCfg = Release|x64
+ {6BFE3E13-BD5D-4C1C-BB29-A82FB51A16CE}.Release|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
|