diff options
author | Nvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a> | 2011-05-29 17:12:30 +0000 |
---|---|---|
committer | Nvinside <Nvinside@eced67a3-f377-a0ae-92ae-d6de1850b05a> | 2011-05-29 17:12:30 +0000 |
commit | 5a875467495513c931fc27b954e56589ae65d5fe (patch) | |
tree | a0327089b1f25e8fcc61fa92c1dfd4c3a4905fef | |
parent | a8881f27f7cdb351541e9ae3c29a5028b96557b9 (diff) |
externalapi update
include update
git-svn-id: http://mirotr.googlecode.com/svn/trunk@44 eced67a3-f377-a0ae-92ae-d6de1850b05a
-rw-r--r-- | miranda/ExternalAPI/m_folders.h | 291 | ||||
-rw-r--r-- | miranda/ExternalAPI/m_metacontacts.h | 166 | ||||
-rw-r--r-- | miranda/ExternalAPI/m_msg_buttonsbar.h | 120 | ||||
-rw-r--r-- | miranda/ExternalAPI/m_updater.h | 150 | ||||
-rw-r--r-- | miranda/include/m_chat.h | 26 | ||||
-rw-r--r-- | miranda/include/m_clist.h | 20 | ||||
-rw-r--r-- | miranda/include/m_database.h | 7 | ||||
-rw-r--r-- | miranda/include/m_fontservice.h | 18 | ||||
-rw-r--r-- | miranda/include/m_hotkeys.h | 12 | ||||
-rw-r--r-- | miranda/include/m_jabber.h | 47 | ||||
-rw-r--r-- | miranda/include/m_langpack.h | 103 | ||||
-rw-r--r-- | miranda/include/m_message.h | 12 | ||||
-rw-r--r-- | miranda/include/m_netlib.h | 6 | ||||
-rw-r--r-- | miranda/include/m_plugins.h | 2 | ||||
-rw-r--r-- | miranda/include/m_protoint.h | 4 | ||||
-rw-r--r-- | miranda/include/m_ssl.h | 9 | ||||
-rw-r--r-- | miranda/include/m_version.h | 10 | ||||
-rw-r--r-- | miranda/include/newpluginapi.h | 3 |
18 files changed, 953 insertions, 53 deletions
diff --git a/miranda/ExternalAPI/m_folders.h b/miranda/ExternalAPI/m_folders.h new file mode 100644 index 0000000..c771a1d --- /dev/null +++ b/miranda/ExternalAPI/m_folders.h @@ -0,0 +1,291 @@ +/*
+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 PROFILE_PATHW L"%profile_path%"
+#define CURRENT_PROFILEW L"%current_profile%"
+#define MIRANDA_PATHW L"%miranda_path%"
+#define MIRANDA_USERDATAW L"%miranda_userdata%"
+
+#ifdef _UNICODE
+ #define PROFILE_PATHT PROFILE_PATHW
+ #define CURRENT_PROFILET CURRENT_PROFILEW
+ #define MIRANDA_PATHT MIRANDA_PATHW
+ #define MIRANDA_USERDATAT MIRANDA_USERDATAW
+#else
+ #define PROFILE_PATHT PROFILE_PATH
+ #define CURRENT_PROFILET CURRENT_PROFILE
+ #define MIRANDA_PATHT MIRANDA_PATH
+ #define MIRANDA_USERDATAT MIRANDA_USERDATA
+#endif
+
+#define FOLDER_AVATARS PROFILE_PATHT "\\" CURRENT_PROFILET "\\avatars"
+#define FOLDER_VCARDS PROFILE_PATHT "\\" CURRENT_PROFILET "\\vcards"
+#define FOLDER_LOGS PROFILE_PATHT "\\" CURRENT_PROFILET "\\logs"
+#define FOLDER_RECEIVED_FILES PROFILE_PATHT "\\" CURRENT_PROFILET "\\received files"
+#define FOLDER_DOCS MIRANDA_PATHT "\\" "docs"
+#define FOLDER_CONFIG PLUGINS_PATHT "\\" "config"
+#define FOLDER_SCRIPTS MIRANDA_PATHT "\\" "scripts"
+#define FOLDER_UPDATES MIRANDA_PATHT "\\" "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 TO_WIDE(x) L ## x
+
+#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
+
+__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 FoldersGetCustomPathEx
+# define FoldersRegisterCustomPathT FoldersRegisterCustomPath
+#endif
+
+#endif
+
+#endif //M_CUSTOM_FOLDERS_H
\ No newline at end of file diff --git a/miranda/ExternalAPI/m_metacontacts.h b/miranda/ExternalAPI/m_metacontacts.h new file mode 100644 index 0000000..9f348bd --- /dev/null +++ b/miranda/ExternalAPI/m_metacontacts.h @@ -0,0 +1,166 @@ +/*
+
+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/miranda/ExternalAPI/m_msg_buttonsbar.h b/miranda/ExternalAPI/m_msg_buttonsbar.h new file mode 100644 index 0000000..8a55627 --- /dev/null +++ b/miranda/ExternalAPI/m_msg_buttonsbar.h @@ -0,0 +1,120 @@ +#ifndef M_MSG_BUTTONSBAR_H__
+#define M_MSG_BUTTONSBAR_H__
+
+//////////////////////////////////////////////////////////////////////////
+// Services
+//
+//////////////////////////////////////////////////////////////////////////
+// Adding a button
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+#define MS_BB_ADDBUTTON "TabSRMM/ButtonsBar/AddButton"
+
+//////////////////////////////////////////////////////////////////////////
+// Remove button
+//
+// wParam = 0
+// lParam = (BBButton *) &description, only button ID and ModuleName used
+#define MS_BB_REMOVEBUTTON "TabSRMM/ButtonsBar/RemoveButton"
+
+//////////////////////////////////////////////////////////////////////////
+// ModifyButton(global)
+//
+// wParam = 0
+// lParam = (BBButton *) &description
+#define MS_BB_MODIFYBUTTON "TabSRMM/ButtonsBar/ModifyButton"
+
+
+#define BBSF_HIDDEN (1<<0)
+#define BBSF_DISABLED (1<<1)
+#define BBSF_PUSHED (1<<2)
+#define BBSF_RELEASED (1<<3)
+
+//////////////////////////////////////////////////////////////////////////
+// GetButtonState(local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , only ModuleName and ID used
+// Returns BBButton struct with BBSF_ bbbFlags:
+#define MS_BB_GETBUTTONSTATE "TabSRMM/ButtonsBar/GetButtonState"
+
+//////////////////////////////////////////////////////////////////////////
+// SetButtonState (local)
+//
+// wParam = hContact
+// lParam = (BBButton *) &description , ModuleName, ID,hIcon,Tooltip, and BBSF_ bbbFlags are used
+#define MS_BB_SETBUTTONSTATE "TabSRMM/ButtonsBar/SetButtonState"
+
+
+////////////////////////////////////////////////////////////////
+//Events
+//
+///////////////////////////////////////////////////
+// ToolBar loaded event
+// wParam = 0;
+// lParam = 0;
+// This event will be send after module loaded and after each toolbar reset
+// You should add your buttons on this event
+#define ME_MSG_TOOLBARLOADED "TabSRMM/ButtonsBar/ModuleLoaded"
+
+///////////////////////////////////////////////////
+// ButtonClicked event
+// wParam = (HANDLE)hContact;
+// lParam = (CustomButtonClickData *)&CustomButtonClickData;
+// catch to show a popup menu, etc.
+#define ME_MSG_BUTTONPRESSED "TabSRMM/ButtonsBar/ButtonPressed"
+
+
+//event flags
+#define BBCF_RIGHTBUTTON (1<<0)
+#define BBCF_SHIFTPRESSED (1<<1)
+#define BBCF_CONTROLPRESSED (1<<2)
+#define BBCF_ARROWCLICKED (1<<3)
+
+typedef struct {
+ int cbSize;
+ POINT pt; // screen coordinates for menus
+ char* pszModule; // button owners name
+ DWORD dwButtonId; // registered button ID
+ HWND hwndFrom; // button parents HWND
+ HANDLE hContact; //
+ DWORD flags; // BBCF_ flags
+ } CustomButtonClickData;
+
+
+//button flags
+#define BBBF_DISABLED (1<<0)
+#define BBBF_HIDDEN (1<<1)
+#define BBBF_ISPUSHBUTTON (1<<2)
+#define BBBF_ISARROWBUTTON (1<<3)
+#define BBBF_ISCHATBUTTON (1<<4)
+#define BBBF_ISIMBUTTON (1<<5)
+#define BBBF_ISLSIDEBUTTON (1<<6)
+#define BBBF_ISRSIDEBUTTON (1<<7)
+#define BBBF_CANBEHIDDEN (1<<8)
+#define BBBF_ISDUMMYBUTTON (1<<9)
+#define BBBF_ANSITOOLTIP (1<<10)
+
+#define BBBF_CREATEBYID (1<<11) //only for tabsrmm internal use
+
+typedef struct _tagBBButton
+ {
+ int cbSize; // size of structure
+
+ DWORD dwButtonID; // your button ID, will be combined with pszModuleName for storing settings, etc...
+
+ char* pszModuleName; //module name without spaces and underline symbols (e.g. "tabsrmm")
+ union{
+ char* pszTooltip; //button's tooltip
+ TCHAR* ptszTooltip;
+ };
+ DWORD dwDefPos; // default order pos of button, counted from window edge (left or right)
+ // use value >100, because internal buttons using 10,20,30... 80, etc
+ int iButtonWidth; // must be 0
+ DWORD bbbFlags; // combine of BBBF_ flags above
+ HANDLE hIcon; //Handle to icolib registered icon, it's better to register with pszSection = "TabSRMM/Toolbar"
+ }BBButton;
+
+
+#endif //M_MSG_BUTTONSBAR_H__
\ No newline at end of file diff --git a/miranda/ExternalAPI/m_updater.h b/miranda/ExternalAPI/m_updater.h new file mode 100644 index 0000000..488d372 --- /dev/null +++ b/miranda/ExternalAPI/m_updater.h @@ -0,0 +1,150 @@ +#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/miranda/include/m_chat.h b/miranda/include/m_chat.h index e3cd416..efa21e8 100644 --- a/miranda/include/m_chat.h +++ b/miranda/include/m_chat.h @@ -452,9 +452,9 @@ typedef struct { //------------
#define WINDOW_VISIBLE 2 //make the room window visible
#define WINDOW_HIDDEN 3 //close the room window. Session is not terminated.
-#define WINDOW_MAXIMIZE 4 //make the room window maximized
-#define WINDOW_MINIMIZE 5 //make the room window minimized
-#define WINDOW_CLEARLOG 6 //clear the log of the room window
+#define WINDOW_MAXIMIZE 4 //make the room window maximized
+#define WINDOW_MINIMIZE 5 //make the room window minimized
+#define WINDOW_CLEARLOG 6 //clear the log of the room window
#define GC_EVENT_CONTROL 0x1005
@@ -475,18 +475,18 @@ typedef struct { // The GCEVENT structure
typedef struct {
- int cbSize; // Set to sizeof(GCEVENT);
- GCDEST* pDest; // pointer to a GCDEST structure which specifies the session to receive the event
+ int cbSize; // Set to sizeof(GCEVENT);
+ GCDEST* pDest; // pointer to a GCDEST structure which specifies the session to receive the event
union {
- const char *pszText; // usage depends on type of event, max 2048 characters
+ const char *pszText; // usage depends on type of event, max 2048 characters
const TCHAR *ptszText;
};
union {
- const char* pszNick; // usage depends on type of event
+ const char* pszNick; // usage depends on type of event
const TCHAR* ptszNick;
};
union {
- const char* pszUID; // usage depends on type of event, Do NOT use spaces for unique user identifiers.
+ const char* pszUID; // usage depends on type of event, Do NOT use spaces for unique user identifiers.
const TCHAR* ptszUID;
};
union {
@@ -497,13 +497,13 @@ typedef struct { const char* pszUserInfo; // Additional user information that is displayed after the nickname.
const TCHAR* ptszUserInfo;
};
- // IRC use it to display a hostmask for JOIN, PART (and more) events.
- BOOL bIsMe; // Is this event from the Miranda user?
+ // IRC use it to display a hostmask for JOIN, PART (and more) events.
+ BOOL bIsMe; // Is this event from the Miranda user?
DWORD dwFlags; // event flags: GCEF_ADDTOLOG, GC_UNICODE
- // FALSE any other time than when initializing the window (before sending SESSION_INITDONE)
- DWORD_PTR dwItemData; // User specified data.
- DWORD time; // Timestamp of the event
+ // FALSE any other time than when initializing the window (before sending SESSION_INITDONE)
+ DWORD_PTR dwItemData; // User specified data.
+ DWORD time; // Timestamp of the event
}
GCEVENT;
diff --git a/miranda/include/m_clist.h b/miranda/include/m_clist.h index ce9f75b..334e7d9 100644 --- a/miranda/include/m_clist.h +++ b/miranda/include/m_clist.h @@ -60,11 +60,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //returns NULL if the status mode was unknown
#define GSMDF_PREFIXONLINE 1 //prefix "Online: " to all status modes that
//imply online, eg "Online: Away"
-#define GCMDF_UNICODE 2 //will return TCHAR* instead of char*
+#define GSMDF_UNICODE 2 //will return TCHAR* instead of char*
#if defined( _UNICODE )
- #define GCMDF_TCHAR GCMDF_UNICODE //will return TCHAR* instead of char*
+ #define GSMDF_TCHAR GSMDF_UNICODE //will return TCHAR* instead of char*
#else
- #define GCMDF_TCHAR 0 //will return char*, as usual
+ #define GSMDF_TCHAR 0 //will return char*, as usual
#endif
#define GSMDF_UNTRANSLATED 4
#define MS_CLIST_GETSTATUSMODEDESCRIPTION "CList/GetStatusModeDescription"
@@ -256,7 +256,7 @@ typedef struct { int cbSize; //size in bytes of this structure
HANDLE hContact; //handle to the contact to put the icon by
HICON hIcon; //icon to flash
- DWORD flags; //...of course
+ DWORD flags; //...of course
union
{
HANDLE hDbEvent; //caller defined but should be unique for hContact
@@ -275,7 +275,7 @@ typedef struct { //times. This is for eg online alert
#define CLEF_UNICODE 4 //set pszTooltip as unicode
-#define CLEF_PROTOCOLGLOBAL 8 //set event globally for protocol, hContact has to be NULL,
+#define CLEF_PROTOCOLGLOBAL 8 //set event globally for protocol, hContact has to be NULL,
//lpszProtocol the protocol ID name to be set
#if defined( _UNICODE )
@@ -380,11 +380,11 @@ typedef struct { // to ensure that WM_COMMAND was realy from clist menu not from other menu
// it is reserved range of menu ids from CLISTMENUIDMIN to CLISTMENUIDMAX
// the menu items with ids outside from such range will not be processed by service.
-// Moreover if you process WM_COMMAND youself and your window contains self menu
+// Moreover if you process WM_COMMAND youself and your window contains self menu
// please be sure that you will not call service for non-clist menu items.
// The simplest way is to ensure that your menus are not use item ids from such range.
// Otherwise, you HAVE TO distinguish WM_COMMAND from clist menus and from youê internal menu and
-// DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
+// DO NOT call MS_CLIST_MENUPROCESSCOMMAND for non clist menus.
#define MPCF_CONTACTMENU 1 //test commands from a contact menu
@@ -441,8 +441,8 @@ typedef struct { #define MS_CLIST_PAUSEAUTOHIDE "CList/PauseAutoHide"
//sent when the group get modified (created, renamed or deleted)
-//or contact is moving from group to group
-//wParam=hContact - NULL if operation on group
+//or contact is moving from group to group
+//wParam=hContact - NULL if operation on group
//lParam=pointer to CLISTGROUPCHANGE
typedef struct {
int cbSize; //size in bytes of this structure
@@ -458,7 +458,7 @@ typedef struct { //returns a handle to the new group
//hParentGroup is NULL to create the new group at the root, or can be the
//handle of the group of which the new group should be a subgroup.
-//groupName is a TCHAR* pointing to the group name to create or NULL for
+//groupName is a TCHAR* pointing to the group name to create or NULL for
//API to create unique name by itself
#define MS_CLIST_GROUPCREATE "CList/GroupCreate"
diff --git a/miranda/include/m_database.h b/miranda/include/m_database.h index af5feb7..bf83d31 100644 --- a/miranda/include/m_database.h +++ b/miranda/include/m_database.h @@ -370,9 +370,6 @@ to a call of MS_DB_EVENT_GETTEXT (see below) Always returns 0.
*/
-#define DBEVENTTYPEDESCR_SIZE sizeof(DBEVENTTYPEDESCR)
-#define DBEVENTTYPEDESCR_SIZE_V1 0x10
-
typedef struct
{
int cbSize; // structure size in bytes
@@ -386,6 +383,9 @@ typedef struct }
DBEVENTTYPEDESCR;
+#define DBEVENTTYPEDESCR_SIZE sizeof(DBEVENTTYPEDESCR)
+#define DBEVENTTYPEDESCR_SIZE_V1 (offsetof(DBEVENTTYPEDESCR, textService))
+
// constants for default event behaviour
#define DETF_HISTORY 1 // show event in history
#define DETF_MSGWINDOW 2 // show event in message window
@@ -694,6 +694,7 @@ szFormat can have the following special characters: m Time without minutes, eg hh
d Short date, eg dd/mm/yyyy
D Long date, eg d mmmm yyyy
+ I ISO 8061 Time yyyy-mm-ddThh:mm:ssZ
All other characters are copied across to szDest as-is
*/
typedef struct {
diff --git a/miranda/include/m_fontservice.h b/miranda/include/m_fontservice.h index e16f0bd..b1561b2 100644 --- a/miranda/include/m_fontservice.h +++ b/miranda/include/m_fontservice.h @@ -22,6 +22,8 @@ #define FIDF_NEEDRESTART 64 // setting changes will not take effect until miranda is restarted
#define FIDF_ALLOWREREGISTER 128 // allow plugins to register this font again (i.e. override already registered settings such as flags)
#define FIDF_ALLOWEFFECTS 256 // allow setting of font effects (i.e. underline and strikeout)
+#define FIDF_DISABLESTYLES 512 // don't allow to select font attributes (bold/underline/italics)
+ // FIDF_ALLOWEFFECTS has priority and will override this flag!
// font class
#define FIDF_CLASSMASK 0x70000000
@@ -142,10 +144,20 @@ typedef struct ColourIDW_tag { #define MS_FONT_REGISTER "Font/Register"
#define MS_FONT_REGISTERW "Font/RegisterW"
+__forceinline void FontRegister( FontID* pFontID )
+{ CallService( MS_FONT_REGISTER, (WPARAM)pFontID, 0 );
+}
+
+__forceinline void FontRegisterW( FontIDW* pFontID )
+{ CallService( MS_FONT_REGISTERW, (WPARAM)pFontID, 0 );
+}
+
#if defined( _UNICODE )
- #define MS_FONT_REGISTERT MS_FONT_REGISTERW
+ #define MS_FONT_REGISTERT MS_FONT_REGISTERW
+ #define FontRegisterT FontRegisterW
#else
#define MS_FONT_REGISTERT MS_FONT_REGISTER
+ #define FontRegisterT FontRegister
#endif
// get a font
@@ -223,7 +235,7 @@ typedef struct EffectID_tag int order;
FONTEFFECT value;
-}
+}
EffectID;
typedef struct EffectIDW_tag
@@ -238,7 +250,7 @@ typedef struct EffectIDW_tag int order;
FONTEFFECT value;
-}
+}
EffectIDW;
#if defined( _UNICODE )
diff --git a/miranda/include/m_hotkeys.h b/miranda/include/m_hotkeys.h index 567a68c..a7b628e 100644 --- a/miranda/include/m_hotkeys.h +++ b/miranda/include/m_hotkeys.h @@ -47,9 +47,9 @@ typedef struct const char *pszService; /* Service to call when HotKey Pressed */
WORD DefHotKey; /* default hot key for action */
LPARAM lParam; /* lParam to pass to service */
-#if MIRANDA_VER >= 0x900
- DWORD dwFlags;
-#endif
+ #if MIRANDA_VER >= 0x900
+ DWORD dwFlags;
+ #endif
} HOTKEYDESC;
#if MIRANDA_VER >= 0x900
@@ -104,4 +104,10 @@ use it for own purposes. #define MS_HOTKEY_SUBCLASS "CoreHotkeys/Subclass"
#define MS_HOTKEY_UNSUBCLASS "CoreHotkeys/Unsubclass"
+/* This event is fired when hotkeys were changed
+ wParam = lParam = 0
+*/
+
+#define ME_HOTKEYS_CHANGED "CoreHotkeys/Changed"
+
#endif // M_HOTKEYS_H__
diff --git a/miranda/include/m_jabber.h b/miranda/include/m_jabber.h index 4e1f7f5..b19a656 100644 --- a/miranda/include/m_jabber.h +++ b/miranda/include/m_jabber.h @@ -200,6 +200,53 @@ __forceinline IJabberInterface *getJabberApi(const char *szAccount) return NULL;
}
+/* Custom Status helper API *
+ DB settings and write values to them (UTF-8 strings best). (obsolete)
+ - use JS_GETXSTATUSEX and JS_SETXSTATUSEX for controling Custom Status
+ */
+#define CSSF_MASK_STATUS 0x0001 // status member valid for set/get
+#define CSSF_MASK_NAME 0x0002 // pszName member valid for set/get
+#define CSSF_MASK_MESSAGE 0x0004 // pszMessage member valid for set/get
+#define CSSF_DISABLE_MENU 0x0020 // disable default custom status menu, wParam = bEnable
+#define CSSF_DISABLE_UI 0x0040 // disable default custom status UI, wParam = bEnable
+#define CSSF_DEFAULT_NAME 0x0080 // only with CSSF_MASK_NAME and get API to get default custom status name (wParam = status)
+#define CSSF_STATUSES_COUNT 0x0100 // returns number of custom statuses in wParam, only get API
+#define CSSF_STR_SIZES 0x0200 // returns sizes of custom status name & message (wParam & lParam members) in chars
+#define CSSF_UNICODE 0x1000 // strings are in UCS-2
+
+#if defined(_UNICODE)
+ #define CSSF_TCHAR CSSF_UNICODE
+#else
+ #define CSSF_TCHAR 0
+#endif
+
+typedef struct {
+ int cbSize; // size of the structure
+ int flags; // combination of CSSF_*
+ int *status; // custom status id
+ union {
+ char *pszMessage; // buffer for custom status message
+ TCHAR *ptszMessage;
+ WCHAR *pwszMessage;
+ };
+ WPARAM *wParam; // extra params, see flags
+ LPARAM *lParam;
+} JABBER_CUSTOM_STATUS;
+
+// Sets owner current custom status
+//wParam = 0 // reserved
+//lParam = (JABBER_CUSTOM_STATUS*)pData // contains what to set and new values
+//return = 0 (for success)
+#define JS_SETXSTATUSEX "/SetXStatusEx"
+
+// Retrieves custom status details for specified hContact
+//wParam = (HANDLE)hContact
+//lParam = (JABBER_CUSTOM_STATUS*)pData // receives details (members must be prepared)
+//return = 0 (for success)
+
+// not needed anymore and therefore commented out
+//#define JS_GETXSTATUSEX "/GetXStatusEx"
+
#endif // __cplusplus
#endif // M_JABBER_H__
diff --git a/miranda/include/m_langpack.h b/miranda/include/m_langpack.h index a903313..859b711 100644 --- a/miranda/include/m_langpack.h +++ b/miranda/include/m_langpack.h @@ -2,8 +2,8 @@ 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
+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
@@ -24,6 +24,10 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef M_LANGPACK_H__
#define M_LANGPACK_H__
+#if MIRANDA_VER >= 0x1000 && !defined( _STATIC )
+ #define MIRANDA_CUSTOM_LP
+#endif
+
#define LANG_UNICODE 0x1000
//translates a single string into the user's local language v0.1.1.0+
@@ -35,9 +39,32 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //Note that the Translate() macro as defined below will crash plugins that are
//loaded into Miranda 0.1.0.1 and earlier. If anyone's actually using one of
//these versions, I pity them.
-#define MS_LANGPACK_TRANSLATESTRING "LangPack/TranslateString"
-#define Translate(s) ((char*)CallService(MS_LANGPACK_TRANSLATESTRING,0,(LPARAM)(s)))
-#define TranslateW(s) ((WCHAR*)CallService(MS_LANGPACK_TRANSLATESTRING,LANG_UNICODE,(LPARAM)(s)))
+#define MS_LANGPACK_TRANSLATESTRING "LangPack/TranslateString"
+
+#if defined( MIRANDA_CUSTOM_LP )
+
+extern int hLangpack;
+
+__inline static char* Translate(const char* str)
+{ return (char*)CallService(MS_LANGPACK_TRANSLATESTRING,hLangpack,(LPARAM)(str));
+}
+
+__inline static WCHAR* TranslateW(const WCHAR* str)
+{ return (WCHAR*)CallService(MS_LANGPACK_TRANSLATESTRING,hLangpack+LANG_UNICODE,(LPARAM)(str));
+}
+
+#else
+
+__inline static char* Translate(const char* str)
+{ return (char*)CallService(MS_LANGPACK_TRANSLATESTRING,0,(LPARAM)(str));
+}
+
+__inline static WCHAR* TranslateW(const WCHAR* str)
+{ return (WCHAR*)CallService(MS_LANGPACK_TRANSLATESTRING,LANG_UNICODE,(LPARAM)(str));
+}
+
+#endif
+
#ifdef _UNICODE
#define TranslateT(s) TranslateW(_T(s))
#define TranslateTS(s) TranslateW(s)
@@ -77,6 +104,21 @@ typedef struct { #define LPTDF_NOTITLE 2 //do not translate the title of the dialog
#define MS_LANGPACK_TRANSLATEDIALOG "LangPack/TranslateDialog"
+
+#if defined( MIRANDA_CUSTOM_LP )
+
+__inline static INT_PTR TranslateDialogDefault(HWND hwndDlg)
+{
+ LANGPACKTRANSLATEDIALOG lptd;
+ lptd.cbSize=sizeof(lptd);
+ lptd.flags=hLangpack;
+ lptd.hwndDlg=hwndDlg;
+ lptd.ignoreControls=NULL;
+ return CallService(MS_LANGPACK_TRANSLATEDIALOG,0,(LPARAM)&lptd);
+}
+
+#else
+
__inline static INT_PTR TranslateDialogDefault(HWND hwndDlg)
{
LANGPACKTRANSLATEDIALOG lptd;
@@ -87,12 +129,28 @@ __inline static INT_PTR TranslateDialogDefault(HWND hwndDlg) return CallService(MS_LANGPACK_TRANSLATEDIALOG,0,(LPARAM)&lptd);
}
+#endif
+
//translates a menu into the user's local language v0.1.1.0+
//wParam=(WPARAM)(HMENU)hMenu
-//lParam=0
+//lParam=langpack handle (v.0.10.0+)
//returns 0 on success, nonzero on failure
#define MS_LANGPACK_TRANSLATEMENU "LangPack/TranslateMenu"
+#if defined( MIRANDA_CUSTOM_LP )
+
+__inline static INT_PTR TranslateMenu(HMENU hMenu)
+{ return CallService(MS_LANGPACK_TRANSLATEMENU, (LPARAM)hMenu, hLangpack);
+}
+
+#else
+
+__inline static INT_PTR TranslateMenu(HMENU hMenu)
+{ return CallService(MS_LANGPACK_TRANSLATEMENU, (LPARAM)hMenu, 0);
+}
+
+#endif
+
//returns the codepage used in the language pack v0.4.3.0+
//wParam=0
//lParam=0
@@ -106,9 +164,38 @@ __inline static INT_PTR TranslateDialogDefault(HWND hwndDlg) #define MS_LANGPACK_GETLOCALE "LangPack/GetLocale"
//returns the strdup/wcsdup of lparam according to the langpack v0.4.3.0+
-//wParam=0
+//wParam=langpack handle (v.0.10.0+)
//lParam=(LPARAM)(char*)source string
-//returns a string converted from char* to TCHAR* using the langpack codepage.
+//returns a string converted from char* to TCHAR* using the langpack codepage.
//This string should be freed using mir_free() then
#define MS_LANGPACK_PCHARTOTCHAR "LangPack/PcharToTchar"
+
+#if defined( MIRANDA_CUSTOM_LP )
+
+__inline static INT_PTR Langpack_PCharToTChar(const char* str)
+{ return CallService(MS_LANGPACK_PCHARTOTCHAR, hLangpack, (LPARAM)str);
+}
+
+#else
+
+__inline static INT_PTR Langpack_PCharToTChar(const char* str)
+{ return CallService(MS_LANGPACK_PCHARTOTCHAR, 0, (LPARAM)str);
+}
+
+#endif
+
+//initializes the plugin-specific translation context v0.10.0+
+//wParam=pointer to the langpack handle
+//lParam=PLUGININFOEX* of the caller plugin
+//always returns 0
+#define MS_LANGPACK_REGISTER "LangPack/Register"
+
+#if defined( MIRANDA_CUSTOM_LP )
+
+__forceinline void mir_getLP( PLUGININFOEX* pInfo )
+{ CallService(MS_LANGPACK_REGISTER, (WPARAM)&hLangpack, (LPARAM)pInfo);
+}
+
+#endif
+
#endif // M_LANGPACK_H__
diff --git a/miranda/include/m_message.h b/miranda/include/m_message.h index d93ba7d..372cbfc 100644 --- a/miranda/include/m_message.h +++ b/miranda/include/m_message.h @@ -32,10 +32,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //szText is the text to put in the edit box of the window (but not send)
//szText=NULL will not use any text
//szText!=NULL is only supported on v0.1.2.0+
-//NB: Current versions of the convers plugin use the name
-//"SRMsg/LaunchMessageWindow" instead. For compatibility you should call
-//both names and the correct one will work.
-#define MS_MSG_SENDMESSAGE "SRMsg/SendCommand"
+#define MS_MSG_SENDMESSAGE "SRMsg/SendCommand"
+#define MS_MSG_SENDMESSAGEW "SRMsg/SendCommandW"
+
+#ifdef _UNICODE
+#define MS_MSG_SENDMESSAGET MS_MSG_SENDMESSAGEW
+#else
+#define MS_MSG_SENDMESSAGET MS_MSG_SENDMESSAGE
+#endif
#define ME_MSG_WINDOWEVENT "MessageAPI/WindowEvent"
//wparam=0
diff --git a/miranda/include/m_netlib.h b/miranda/include/m_netlib.h index 20d1a79..06b41c2 100644 --- a/miranda/include/m_netlib.h +++ b/miranda/include/m_netlib.h @@ -477,7 +477,10 @@ struct NETLIBHTTPREQUEST_tag { int resultCode;
char *szResultDescr;
HANDLE nlc;
+ int timeout;
};
+
+#define NETLIBHTTPREQUEST_V1_SIZE (offsetof(NETLIBHTTPREQUEST_tag, timeout))
//typedef struct NETLIBHTTPREQUEST_tag NETLIBHTTPREQUEST; //(above for reasons of forward referencing)
#define MS_NETLIB_SENDHTTPREQUEST "Netlib/SendHttpRequest"
@@ -761,6 +764,7 @@ static INT_PTR Netlib_Logf(HANDLE hUser, const char *fmt, ...) // Inits a required security provider. Right now only NTLM is supported
// Returns HANDLE = NULL on error or non-null value on success
+// Known providers: Basic, NTLM, Negotiate, Kerberos, GSSAPI - (Kerberos SASL)
#define MS_NETLIB_INITSECURITYPROVIDER "Netlib/InitSecurityProvider"
static __inline HANDLE Netlib_InitSecurityProvider( char* szProviderName )
@@ -825,7 +829,7 @@ typedef struct { static __inline char* Netlib_NtlmCreateResponse2( HANDLE hProvider, char* szChallenge, TCHAR* szLogin, TCHAR* szPass, unsigned *complete )
{
- NETLIBNTLMREQUEST2 temp = { sizeof(temp), szChallenge, szLogin, szPass, 0, NNR_TCHAR };
+ NETLIBNTLMREQUEST2 temp = { sizeof(temp), szChallenge, szLogin, szPass, *complete, NNR_TCHAR };
char* res = (char*)CallService( MS_NETLIB_NTLMCREATERESPONSE2, (WPARAM)hProvider, (LPARAM)&temp );
*complete = temp.complete;
return res;
diff --git a/miranda/include/m_plugins.h b/miranda/include/m_plugins.h index 4601644..480ecb0 100644 --- a/miranda/include/m_plugins.h +++ b/miranda/include/m_plugins.h @@ -65,7 +65,7 @@ typedef struct PLUGIN_DB_ENUM { #define DEFMOD_RNDIDLE 23 // v0.3.4a+
#define DEFMOD_CLISTALL 24 // v0.3.4a+ (2004/09/28)
#define DEFMOD_DB 25 // v0.3.4.3+ (2004/10/11)
-#define DEFMOD_FONTSERVICE 26 // v0.7.0+ (2006/11/17)
+//#define DEFMOD_FONTSERVICE 26 // v0.7.0+ (2006/11/17)
#define DEFMOD_UPDATENOTIFY 27
#define DEFMOD_SSL 28 // v0.8.0+
#define DEFMOD_HIGHEST 28
diff --git a/miranda/include/m_protoint.h b/miranda/include/m_protoint.h index 30df172..d124a33 100644 --- a/miranda/include/m_protoint.h +++ b/miranda/include/m_protoint.h @@ -32,7 +32,9 @@ typedef enum EV_PROTO_ONRENAME,
EV_PROTO_ONOPTIONS,
EV_PROTO_ONERASE,
- EV_PROTO_ONMENU
+ EV_PROTO_ONMENU,
+ EV_PROTO_ONCONTACTDELETED,
+ EV_PROTO_DBSETTINGSCHANGED,
}
PROTOEVENTTYPE;
diff --git a/miranda/include/m_ssl.h b/miranda/include/m_ssl.h index 99b2990..cba88e1 100644 --- a/miranda/include/m_ssl.h +++ b/miranda/include/m_ssl.h @@ -21,6 +21,11 @@ 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_SSL_H__
+#define M_SSL_H__ 1
+
+#include <newpluginapi.h>
+
DECLARE_HANDLE(HSSL);
typedef struct
@@ -50,8 +55,10 @@ returns TRUE if all is Ok, and FALSE otherwise #define MS_SYSTEM_GET_SI "Miranda/System/GetSslApi"
-__forceinline int mir_getSI( SSL_API* dest )
+__forceinline INT_PTR mir_getSI( SSL_API* dest )
{
dest->cbSize = sizeof(*dest);
return CallService(MS_SYSTEM_GET_SI, 0, (LPARAM)dest);
}
+
+#endif // M_SSL_H__
diff --git a/miranda/include/m_version.h b/miranda/include/m_version.h index b214014..0e29548 100644 --- a/miranda/include/m_version.h +++ b/miranda/include/m_version.h @@ -27,9 +27,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define MIRANDA_MAKE_VERSION(a,b,c,d) (((((DWORD)(a))&0xFF)<<24)|((((DWORD)(b))&0xFF)<<16)|((((DWORD)(c))&0xFF)<<8)|(((DWORD)(d))&0xFF))
#endif
-#define MIRANDA_VERSION_FILEVERSION 0,9,1,1
-#define MIRANDA_VERSION_STRING "0.9.1.1"
-#define MIRANDA_VERSION_DISPLAY "0.9.1 alpha build #1"
-#define MIRANDA_VERSION_DWORD MIRANDA_MAKE_VERSION(0, 9, 1, 1)
+#define MIRANDA_VERSION_FILEVERSION 0,10,0,2
+#define MIRANDA_VERSION_STRING "0.10.0.2"
+#define MIRANDA_VERSION_DISPLAY "0.10.0 alpha build #2"
+#define MIRANDA_VERSION_DWORD MIRANDA_MAKE_VERSION(0, 10, 0, 2)
+#define MIRANDA_VERSION_CORE MIRANDA_MAKE_VERSION(0, 10, 0, 0)
+#define MIRANDA_VERSION_CORE_STRING "0.10.0.0"
#endif // M_VERSION_H__
diff --git a/miranda/include/newpluginapi.h b/miranda/include/newpluginapi.h index b32abf3..0a51132 100644 --- a/miranda/include/newpluginapi.h +++ b/miranda/include/newpluginapi.h @@ -81,6 +81,7 @@ typedef struct _MUUID { #define MIID_IDLE {0x296f9f3b, 0x5b6f, 0x40e5, {0x8f, 0xb0, 0xa6, 0x49, 0x6c, 0x18, 0xbf, 0xa}}
#define MIID_FONTSERVICE {0x56f39112, 0xe37f, 0x4234, {0xa9, 0xe6, 0x7a, 0x81, 0x17, 0x45, 0xc1, 0x75}}
#define MIID_UPDATENOTIFY {0x4e68b12a, 0x6b54, 0x44de, {0x86, 0x37, 0xf1, 0x12, 0xd, 0xb6, 0x81, 0x40}}
+#define MIID_CRYPTO {0x415ca6e1, 0x895f, 0x40e6, {0x87, 0xbd, 0x9b, 0x39, 0x60, 0x16, 0xd0, 0xe5}}
/* Common plugin interfaces (core plugins) */
#define MIID_DATABASE {0xae77fd33, 0xe484, 0x4dc7, {0x8c, 0xbc, 0x9, 0x9f, 0xed, 0xcc, 0xcf, 0xdd}}
@@ -204,7 +205,7 @@ typedef struct tagPLUGINLINK { #define SetHookDefaultForHookableEvent(a,b) pluginLink->SetHookDefaultForHookableEvent(a,b)
#define CreateServiceFunctionParam(a,b,c) pluginLink->CreateServiceFunctionParam(a,b,c)
#define NotifyEventHooksDirect(a,b,c) pluginLink->NotifyEventHooksDirect(a,b,c)
- #if MIRANDA_VER >= 0x800
+ #if MIRANDA_VER >= 0x800
#define CallProtoService(a,b,c,d) pluginLink->CallProtoService(a,b,c,d)
#define CallContactService(a,b,c,d) pluginLink->CallContactService(a,b,c,d)
#define HookEventParam(a,b,c) pluginLink->HookEventParam(a,b,c)
|