summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu
diff options
context:
space:
mode:
authorVadim Dashevskiy <watcherhd@gmail.com>2012-05-18 10:50:20 +0000
committerVadim Dashevskiy <watcherhd@gmail.com>2012-05-18 10:50:20 +0000
commita85e238092f480e9de278ae507af710633fa2824 (patch)
tree6736cf3074c5e4e7da309e932074de041bc1ba96 /protocols/Gadu-Gadu
parentc58de69f2936e24d2fa13eb415de963a4d7ca71f (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/Gadu-Gadu')
-rw-r--r--protocols/Gadu-Gadu/Gadu-Gadu_10.vcxproj8
-rw-r--r--protocols/Gadu-Gadu/m_assocmgr.h301
-rw-r--r--protocols/Gadu-Gadu/m_folders.h284
-rw-r--r--protocols/Gadu-Gadu/m_metacontacts.h166
4 files changed, 4 insertions, 755 deletions
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