diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-27 16:05:11 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-04-27 16:05:11 +0000 |
commit | 9f6f342eae02d12e9786a771f86a382af19b3bb7 (patch) | |
tree | 6664d33d6fe3241783817a274fdd45cd34baa3ef /ExternalAPI | |
parent | 763847826412f45355904e49d25e5cc89610f96c (diff) |
move api to folder
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@54 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'ExternalAPI')
-rw-r--r-- | ExternalAPI/m_MagneticWindows.h | 86 | ||||
-rw-r--r-- | ExternalAPI/m_db3xsa.h | 119 | ||||
-rw-r--r-- | ExternalAPI/m_flags.h | 103 | ||||
-rw-r--r-- | ExternalAPI/m_kbdnotify.h | 64 | ||||
-rw-r--r-- | ExternalAPI/m_userinfoex.h | 382 |
5 files changed, 754 insertions, 0 deletions
diff --git a/ExternalAPI/m_MagneticWindows.h b/ExternalAPI/m_MagneticWindows.h new file mode 100644 index 0000000..e011c77 --- /dev/null +++ b/ExternalAPI/m_MagneticWindows.h @@ -0,0 +1,86 @@ +#ifndef __M_MAGNETICWINDOWS_H__
+#define __M_MAGNETICWINDOWS_H__
+
+//#include "../include/newpluginapi.h"
+
+// For other Plugins to start snapping for their windows
+// wparam: hwnd of window
+// lparam: 0
+// return: 0 on success, 1 on error
+#define MS_MW_ADDWINDOW "Utils/MagneticWindows/Add"
+
+// For other Plugins to stop snapping for their windows
+// wparam: hwnd of window
+// lparam: 0
+// return: 0 on success, 1 on error
+#define MS_MW_REMWINDOW "Utils/MagneticWindows/Rem"
+
+//decide where to align on the list:
+#define MS_MW_STL_List_Left 0x00000001 //Snaps the window to the left border of the list
+#define MS_MW_STL_List_Top 0x00000002 //Snaps the window to the top border of the list
+#define MS_MW_STL_List_Right 0x00000004 //Snaps the window to the right border of the list
+#define MS_MW_STL_List_Bottom 0x00000008 //Snaps the window to the bottom border of the list
+//decide with what side (of the window you want to snap) to snap to the list
+#define MS_MW_STL_Wnd_Left 0x00000010 //Snaps the window with the left border to the left/right side of the list
+#define MS_MW_STL_Wnd_Top 0x00000020 //Snaps the window with the top border to the top/bottom side of the list
+#define MS_MW_STL_Wnd_Right 0x00000040 //Snaps the window with the right border to the left/right side of the list
+#define MS_MW_STL_Wnd_Bottom 0x00000080 //Snaps the window with the bottom border to the top/bottom side of the list
+
+#define MS_MW_STL_Wnd_FullWidth (MS_MW_STL_Wnd_Left | MS_MW_STL_Wnd_Right)
+ //Snaps to the top/bottom of the list and spans over the full width
+
+#define MS_MW_STL_Wnd_FullHeight (MS_MW_STL_Wnd_Top | MS_MW_STL_Wnd_Bottom)
+ //Snaps to the left/right of the list and spans over the full height
+
+// to place the window in the list combine f.e. MS_MW_STL_List_Left | MS_MW_STL_Wnd_Right | *vetical alignment*
+
+//For other Plugins to snap a window to the list for other Plugins
+// wparam: hwnd of window
+// lparam: combination of the above constants MS_MW_STL_*
+// return: 0 on success, 1 on error
+#define MS_MW_SNAPTOLIST "Utils/MagneticWindows/SnapToList"
+
+// Helper functions
+#ifndef _MW_NO_HELPPER_FUNCTIONS
+
+
+static inline int MagneticWindows_AddWindow(HWND hWnd)
+{
+ if (ServiceExists(MS_MW_ADDWINDOW))
+ {
+ return CallService(MS_MW_ADDWINDOW, (WPARAM) hWnd, 0);
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+static inline int MagneticWindows_RemoveWindow(HWND hWnd)
+{
+ if (ServiceExists(MS_MW_REMWINDOW))
+ {
+ return CallService(MS_MW_REMWINDOW, (WPARAM) hWnd, 0);
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+static inline int MagneticWindows_SnapWindowToList(HWND hWnd, int MS_MW_STL_Options)
+{
+ if (ServiceExists(MS_MW_SNAPTOLIST))
+ {
+ return CallService(MS_MW_SNAPTOLIST, (WPARAM) hWnd, (LPARAM) MS_MW_STL_Options);
+ }
+ else
+ {
+ return -1;
+ }
+}
+
+#endif
+
+
+#endif // __M_MAGNETICWINDOWS_H__
diff --git a/ExternalAPI/m_db3xsa.h b/ExternalAPI/m_db3xsa.h new file mode 100644 index 0000000..b6dbfd0 --- /dev/null +++ b/ExternalAPI/m_db3xsa.h @@ -0,0 +1,119 @@ +/*
+
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2007 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.
+*/
+
+/* DB/SetPassword v0.5.1.3+
+This service is used to set, change or clear the password used for encrypting the profile.
+It opens the password change dialog.
+wParam=0
+lParam=0
+*/
+#define MS_DB_SETPASSWORD "DB/SetPassword"
+
+/* DB/Backup v0.5.1.3+
+This service will make a backup of your current profile. Backups are named
+<ProfileName> xx.bak where xx is the number of backups. The larger the number, the
+older the backup.
+wParam=0
+lParam=0
+*/
+#define MS_DB_BACKUP "DB/Backup"
+
+/* DB/Backup v0.5.1.3+
+This service is the trigger action service and does the same as the service above.
+Only difference is wParam carries flags from trigger plugin.
+wParam=flags
+lParam=0
+*/
+#define MS_DB_BACKUPTRIGGER "DB/BackupTriggerAct"
+
+/* DB/GetProfilePath( W ) v0.5.1.5+
+Gets the path of the profile currently being used by the database module. This
+path does not include the last '\'. It is appended with the profile's name if
+ProfileSubDir=yes is set in the mirandaboot.ini.
+ wParam=( WPARAM )( int )cbName
+ lParam=( LPARAM )( char* )pszName
+pszName is a pointer to the buffer that receives the path of the profile
+cbName is the size in bytes of the pszName buffer
+Returns 0 on success or nonzero otherwise
+*/
+#define MS_DB_GETPROFILEPATHW "DB/GetProfilePathW"
+
+
+/* DB/GetProfilePathBasic( W ) v0.5.1.5+
+Gets the path of the profile currently being used by the database module. This
+path does not include the last '\'. This is never appended with the profile's name.
+ wParam=( WPARAM )( int )cbName
+ lParam=( LPARAM )( char* )pszName
+pszName is a pointer to the buffer that receives the path of the profile
+cbName is the size in bytes of the pszName buffer
+Returns 0 on success or nonzero otherwise
+*/
+#define MS_DB_GETPROFILEPATH_BASIC "DB/GetProfilePathBasic"
+#define MS_DB_GETPROFILEPATH_BASICW "DB/GetProfilePathBasicW"
+
+/* Utils/PathToAbsolute( W ) v0.5.1.5+
+This service routine expands all environment variables of a path string.
+It supports:
+%MIRANDAPATH% - expands to the installation folder of miranda,
+%PROFILEPATH% - expands to the folder the current profile is stored in,
+%PROFILENAME% - expands to the name of the current profile,
+and all windows like environment variables such as:
+%USERPROFILE%, %WINDIR%, ...
+It returns the length of the absolute path in characters on success or
+0 if any of the environment variables was not translated.
+wParam=relative source path ( must be smaller than MAX_PATH )
+lParam=absolute destination path ( must be larger or equal to MAX_PATH )
+*/
+#define MIRANDAPATH "%MIRANDAPATH%"
+#define MIRANDAPATHW L"%MIRANDAPATH%"
+#define PROFILEPATH "%PROFILEPATH%"
+#define PROFILEPATHW L"%PROFILEPATH%"
+#define PROFILENAME "%PROFILENAME%"
+#define PROFILENAMEW L"%PROFILENAME%"
+
+#ifndef MS_UTILS_PATHTOABSOLUTE
+ #define MS_UTILS_PATHTOABSOLUTE "Utils/PathToAbsolute"
+#endif
+#define MS_UTILS_PATHTOABSOLUTEW "Utils/PathToAbsoluteW"
+
+/* Utils/PathToRelative( W ) v0.5.1.5+
+This service parses the given absolute path and translates it to a string
+containing as much environment variables as possible.
+The return value is the length of the relative path in characters.
+wParam=absolute source path ( must be smaller than MAX_PATH )
+lParam=relative destination path ( must be larger or equal to MAX_PATH )
+*/
+#ifndef MS_UTILS_PATHTORELATIVE
+ #define MS_UTILS_PATHTORELATIVE "Utils/PathToRelative"
+#endif
+#define MS_UTILS_PATHTORELATIVEW "Utils/PathToRelativeW"
+
+/* Unicode/Multibyte wrapping via TCHAR
+*/
+#ifdef _UNICODE
+ #define MS_UTILS_PATHTOABSOLUTET MS_UTILS_PATHTOABSOLUTEW
+ #define MS_UTILS_PATHTORELATIVET MS_UTILS_PATHTORELATIVEW
+#else
+ #define MS_UTILS_PATHTOABSOLUTET MS_UTILS_PATHTOABSOLUTE
+ #define MS_UTILS_PATHTORELATIVET MS_UTILS_PATHTORELATIVE
+#endif
\ No newline at end of file diff --git a/ExternalAPI/m_flags.h b/ExternalAPI/m_flags.h new file mode 100644 index 0000000..5130190 --- /dev/null +++ b/ExternalAPI/m_flags.h @@ -0,0 +1,103 @@ +/*
+Miranda IM Country Flags Plugin
+Copyright (C) 2006-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 (Flags-License.txt); if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#ifndef M_FLAGS_H__
+#define M_FLAGS_H__
+
+#if defined (_MSC_VER) && (_MSC_VER >= 1020)
+ #pragma once
+#endif
+
+/*
+ Country Flags Plugin v0.1.0.3
+*/
+
+/* interface id */
+#if !defined(MIID_FLAGS)
+ #define MIID_FLAGS {0x88a3b66e,0xc438,0x4381,{0xbc,0x17,0x71,0xd9,0x9d,0x22,0x5f,0x9c}}
+#endif
+
+/* Load a country flag icon from the skin library. v0.1.0.0+
+The retrieved HICON SHOULDN'T be destroyed, it is managed by IcoLib,
+it should be released using MS_SKIN2_RELEASEICON after use.
+The country numbers can be retrieved using MS_UTILS_GETCOUNTRYLIST.
+Another way to get the country numbers are the CTRY_* constants in winnls.h of WinAPI.
+To retrieve the country number from a locale, call GetLocaleInfo().
+with LOCALE_ICOUNTRY.
+ wParam=countryNumber
+ lParam=(BOOL)fReturnHandle (nonzero to to retrieve the icolib handle instead of the HICON)
+Returns a icon handle (HICON) on success, NULL on error.
+*/
+#define MS_FLAGS_LOADFLAGICON "Flags/LoadFlagIcon"
+
+/* Get a corresponding country given an (external) IP address. v0.1.0.0+
+The retrieved number can be converted to a normal country name
+using MS_UTILS_GETCOUNTRYBYNUMBER.
+ wParam=dwExternalIP (same format as used in Netlib)
+ lParam=0
+Returns a country number on success,
+or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
+*/
+#define MS_FLAGS_IPTOCOUNTRY "Flags/IpToCountry"
+
+/* Create a merged country flag icon. v0.1.0.0+
+The retrieved icon should be released using DestroyIcon() after use.
+ wParam=countryNumberUpper
+ lParam=countryNumberLower
+Returns a icon handle (HICON) on success, NULL on error.
+*/
+#define MS_FLAGS_CREATEMERGEDFLAGICON "Flags/CreateMergedFlagIcon"
+
+/* Detect the origin country of a contact. v0.1.0.0+
+This uses the contacts's IP first, and falls back on using
+CNF_COUNTRY and CNF_COCOUNTRY of contact details.
+To get the contact's IP it relies on the db setting
+"RealIP" in the proto module.
+ wParam=(WPARAM)(HANDLE)hContact
+ lParam=0
+Returns a country number on success,
+or 0xFFFF on failure (MS_UTILS_GETCOUNTRYBYNUMBER returns "Unknown" for this).
+*/
+#define MS_FLAGS_DETECTCONTACTORIGINCOUNTRY "Flags/DetectContactOriginCountry"
+#define MS_FLAGS_GETCONTACTORIGINCOUNTRY "Flags/GetContactOriginCountry" //for beta version 0.1.1.0
+
+#define CTRY_UNSPECIFIED 0
+#define CTRY_OTHER 9999
+#define CTRY_UNKNOWN 0xFFFF
+
+#if !defined(FLAGS_NOSETTINGS) && defined(EXTRA_ICON_ADV2)
+#define SETTING_SHOWSTATUSICONFLAG_DEFAULT 1
+#define SETTING_SHOWEXTRAIMGFLAG_DEFAULT 1
+#define SETTING_EXTRAIMGFLAGCOLUMN_DEFAULT EXTRA_ICON_ADV2
+#define SETTING_USEUNKNOWNFLAG_DEFAULT 1
+#define SETTING_USEIPTOCOUNTRY_DEFAULT 1
+#endif
+
+#ifndef FLAGS_NOHELPERFUNCTIONS
+__inline static HICON LoadFlagIcon(int countryNumber) {
+ if(!ServiceExists(MS_FLAGS_LOADFLAGICON)) return NULL;
+ return (HICON)CallService(MS_FLAGS_LOADFLAGICON,countryNumber,0);
+}
+__inline static HANDLE LoadFlagIconHandle(int countryNumber) {
+ if(!ServiceExists(MS_FLAGS_LOADFLAGICON)) return NULL;
+ return (HICON)CallService(MS_FLAGS_LOADFLAGICON,countryNumber,1);
+}
+#endif
+
+#endif // M_FLAGS_H
diff --git a/ExternalAPI/m_kbdnotify.h b/ExternalAPI/m_kbdnotify.h new file mode 100644 index 0000000..2ab53fe --- /dev/null +++ b/ExternalAPI/m_kbdnotify.h @@ -0,0 +1,64 @@ +/*
+
+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 _KBDNOTIFY_
+#define _KBDNOTIFY_
+
+//Enables all notifications (for use by BossKey)
+//wParam=0
+//lParam=0
+//returns 0
+#define MS_KBDNOTIFY_ENABLE "KeyboardNotify/Enable"
+
+
+//Disables all notifications (for use by BossKey)
+//wParam=0
+//lParam=0
+//returns 0
+#define MS_KBDNOTIFY_DISABLE "KeyboardNotify/Disable"
+
+
+//Makes the flashing begin
+//wParam=(unsigned int)eventCount
+//lParam=(char *)szFlashingSequence or NULL if you want the plugin to use current settings
+//returns 0
+#define MS_KBDNOTIFY_STARTBLINK "KeyboardNotify/StartBlinking"
+
+
+//Receives the number of events that were opened (usuful for the 'until events opened' setting)
+//wParam=(unsigned int)eventCount
+//lParam=0
+//returns 0
+#define MS_KBDNOTIFY_EVENTSOPENED "KeyboardNotify/EventsWereOpened"
+
+
+//Informs if the flashing is active
+//wParam=0
+//lParam=0
+//returns 0 if the flashing is inactive or a pointer to the string representing the sequence being used
+#define MS_KBDNOTIFY_FLASHINGACTIVE "KeyboardNotify/IsFlashingActive"
+
+
+//Normalizes the flashing sequence informed
+//wParam=0
+//lParam=(char *)szFlashingSequence <- it is rewritten
+//returns a pointer to the string representing the sequence normalized (which is in fact lParam)
+#define MS_KBDNOTIFY_NORMALSEQUENCE "KeyboardNotify/NormalizeSequence"
+
+
+#endif
\ No newline at end of file diff --git a/ExternalAPI/m_userinfoex.h b/ExternalAPI/m_userinfoex.h new file mode 100644 index 0000000..53db892 --- /dev/null +++ b/ExternalAPI/m_userinfoex.h @@ -0,0 +1,382 @@ +/*
+Miranda IM: the free IM client for Microsoft* Windows*
+
+Copyright 2000-2009 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_USERINFOEX_H_
+#define _M_USERINFOEX_H_
+/*************************************************************
+ * Interfaces Module
+ */
+
+// {9C23A24B-E6AA-43c6-B0B8-D6C36D2F7B57}
+#define MIID_UIUSERINFOEX { 0x9c23a24b, 0xe6aa, 0x43c6, { 0xb0, 0xb8, 0xd6, 0xc3, 0x6d, 0x2f, 0x7b, 0x57 } }
+// {17DBD7C9-450E-4000-BFB4-908A7EF4CE72}
+#define MIID_CONTACTINFO { 0x17dbd7c9, 0x450e, 0x4000, { 0xbf, 0xb4, 0x90, 0x8a, 0x7e, 0xf4, 0xce, 0x72 } }
+// {02E890BD-278D-4890-918D-AB2CF5DC50BD}
+#define MIID_REMINDER { 0x2e890bd, 0x278d, 0x4890, { 0x91, 0x8d, 0xab, 0x2c, 0xf5, 0xdc, 0x50, 0xbd } }
+
+
+/*************************************************************
+ * PropertySheetPage Module
+ */
+
+/* UserInfo/AddPage v0.1.0.0+
+If the hIcon member of te optiondialogpage is valid, the tree show it for nicer look.
+Otherwise the default icon is displayed for this treeitem.
+*/
+#ifndef ODPF_UNICODE
+ #define ODPF_UNICODE 8 // string fields in OPTIONSDIALOGPAGE are WCHAR*
+#endif
+#define ODPF_ICON 64 // the hIcon member of the option dialog page is valid
+
+/* Handling notifications v0.1.0.4+
+A dialogbox should call SetWindowLongPtr(hDlg, DWLP_MSGRESULT, PSP_CHANGED) on a PSN_INFOCHANGED notification if
+there are unsafed changes and apply button should keep enabled. Otherwise the changed status
+of the dialogbox is resetted as well as the changed status of the details dialog box itself if no page
+called this message. Because UserinfoEx now looks for changes in the settings of a user to keep the
+shown inforamtion up to date.
+*/
+#define PSP_CHANGED 2
+#define PSN_ICONCHANGED 2000
+
+/* PSM_GETBOLDFONT v0.1.0.3+
+wParam=NULL
+lParam=(HFONT*)&hFont
+get bold dialog font. wParam is pointer to a handle that retrieves the boldfont.
+You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the font.
+This function returns TRUE on success or FALSE otherwise.
+*/
+#ifndef PSM_GETBOLDFONT
+ #define PSM_GETBOLDFONT (WM_USER+102)
+#endif
+
+/* PSM_ISLOCKED v0.1.0.4+
+Returns state of propertysheet. If it is locked, The PSM_CHANGED messages sent by a propertysheetpage does not
+have any effect. To aVOID editcontrols, ... to check for changes on redrawing at a load of settings from database or
+if another propertysheetpage is selected, a plugin should check this state and skip those checks to reduce stressing
+the database if such a test if control's content changed does so.
+wParam=NULL
+lParam=NULL
+You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the handle.
+This function returns TRUE if the PropertySheet is locked or FALSE otherwise.
+*/
+#define PSM_ISLOCKED (WM_USER+901)
+
+/* PSM_GETCONTACT v0.1.0.4+
+You can get the handle to the contact the propertysheet is associated with by calling PSM_GETCONTACT
+to the parent of your propertysheetpage - the propertysheet.
+wParam=index or -1 for current item
+lParam=(HANDLE*)&hContact
+You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the handle.
+This function returns TRUE on success or FALSE otherwise.
+*/
+#define PSM_GETCONTACT (WM_USER+903)
+
+/* PSM_GETBASEPROTO v0.1.0.4+
+You can get a pointer to the basic protocol module by sending PSM_GETBASEPROTO to the parent of your propertysheetpage.
+wParam=index or -1 for current item
+lParam=(LPCSTR*)&pszProto
+The propertysheet loads the basic contact protocol on creation for a better handling
+of owners (ICQ) protocol used for changing details on the server. Should also reduce database traffic.
+You can also call GetWindowLong(hDlg, DWLP_MSGRESULT) to get the protocol.
+This function returns TRUE on success or FALSE otherwise.
+*/
+#define PSM_GETBASEPROTO (WM_USER+905)
+
+#define INDEX_CURPAGE (-1)
+/* short helper macros
+*/
+#define PSGetBoldFont(hPsp, hFont) SNDMSG(GetParent((HWND)hPsp), PSM_GETBOLDFONT, (WPARAM)INDEX_CURPAGE, (LPARAM)(HFONT*)&hFont)
+#define PSGetContact(hPsp, hContact) SNDMSG(GetParent((HWND)hPsp), PSM_GETCONTACT, (WPARAM)INDEX_CURPAGE, (LPARAM)(HANDLE*)&hContact)
+#define PSGetBaseProto(hPsp, pszProto) SNDMSG(GetParent((HWND)hPsp), PSM_GETBASEPROTO, (WPARAM)INDEX_CURPAGE, (LPARAM)(LPCSTR*)&pszProto)
+
+/* PspIsLocked v0.1.1.0+
+Changed function a bit, because sometimes SNDMSG does not return the right value.
+Don't know why. But this works fine.
+*/
+static FORCEINLINE BOOLEAN PspIsLocked(HWND hPsp)
+{
+ HWND hPs = GetParent(hPsp);
+ return ((BOOLEAN)SendMessage((hPs), PSM_ISLOCKED, 0, 0) || GetWindowLongPtr((hPs), DWLP_MSGRESULT) != 0);
+}
+
+/* PSM_GETPAGEHWND v0.1.1.1+
+retrieve the windowhandle for a propertysheetpage identified by its id
+wParam=idDlg
+lParam=hInstance
+*/
+#define PSM_GETPAGEHWND (WM_USER+906)
+
+#define PSGetPageHandle(hPsp, idDlg, hInst) SNDMSG(GetParent((HWND)hPsp), PSM_GETPAGEHWND, (WPARAM)idDlg, (LPARAM)hInst)
+
+/* PSM_DLGMESSAGE v0.1.1.1+
+Send a message to a specified propertypage of the details dialog.
+This enables communication between propertypages without the need to know
+the window handles of each page.
+*/
+typedef struct TDlgCommand {
+ HINSTANCE hInst;
+ WORD idDlg;
+ WORD idDlgItem;
+ UINT uMsg;
+ WPARAM wParam;
+ LPARAM lParam;
+} DLGCOMMAND, *LPDLGCOMMAND;
+
+#define PSM_DLGMESSAGE (WM_USER+907)
+
+#define PSSendDlgMessage(hPsp, pDlgCmd) SNDMSG(GetParent((HWND)hPsp), PSM_DLGMESSAGE, NULL, (LPARAM)(LPDLGCOMMAND)pDlgCmd)
+
+
+/* PSM_ISAEROMODE v0.8.2.1+
+This message can be sent to the propertysheet (details dialog) to examine,
+whether the aero adaption mode is enabled or not. This message should be used in
+each propertysheet page's dialog procedure as follows:
+
+ ...
+ switch (msg) {
+ ...
+ case WM_CTLCOLORSTATIC:
+ case WM_CTLCOLORDLG:
+ if (PSIsAeroMode(hDlg))
+ return (INT_PTR)GetStockBrush(WHITE_BRUSH);
+ break;
+ ...
+
+This will draw a propertysheet page with white background, if aero adaption is enabled.
+wParam=not used
+lParam=(BOOL*)&bIsAero
+*/
+#define PSM_ISAEROMODE (WM_USER+908)
+static FORCEINLINE BOOLEAN PSIsAeroMode(HWND hPsp)
+{
+ BOOLEAN bIsAero;
+ SendMessage(GetParent(hPsp), PSM_ISAEROMODE,(WPARAM) NULL, (LPARAM)&bIsAero);
+ return bIsAero;
+}
+
+/*************************************************************
+ * vCard Module
+ */
+
+/* UserInfo/vCardExport v0.1.0.4+
+*/
+#define MS_USERINFO_VCARD_IMPORT "UserInfo/vCard/Import"
+
+#define MS_USERINFO_VCARD_IMPORTALL "UserInfo/vCard/ImportAll"
+/* UserInfo/vCardImport v0.1.0.4+
+*/
+#define MS_USERINFO_VCARD_EXPORT "UserInfo/vCard/Export"
+
+/* UserInfo/vCardImport v0.1.0.4+
+*/
+#define MS_USERINFO_VCARD_EXPORTALL "UserInfo/vCard/ExportAll"
+
+/*************************************************************
+ * time Module
+ */
+
+/* UserInfo/LocalTime v0.1.0.3+
+Computes the local time for the desired contact and writes it to lpst.
+wParam=(WPARAM)hContact
+lParam=(LPSYSTEMTIME)lpst
+The service gets your windows box's local time, reads your timezoneinformation (Windows setting)
+and hContact's timezone from his user details. With these information contact's local time is computed
+considering daylightsaving time.
+Return values are TRUE for success and FALSE if anything went wrong.
+*/
+#define MS_USERINFO_LOCALTIME "UserInfo/LocalTime"
+
+/* UserInfo/LocalTime v0.7.0.1+
+This service provides the timezone information for a given contact
+as known by windows, too. All but the DaylightName and StandardName members
+of the class are filled out and can be used. The values are read
+from the windows registry and therefore keep up to date if the latest
+windows hotfixes are installed. There is no default API in the windows SDK
+to solve this problem.
+wParam=(WPARAM)hContact
+lParam=(TIME_ZONE_INFORMATION*)tzi
+Return values are 0 for success and 1 if no valid timezone is set for the contact.
+*/
+#define MS_USERINFO_TIMEZONEINFO "UserInfo/TimezoneInfo"
+
+/*************************************************************
+ * Reminder module
+ */
+
+/* UserInfo/Reminder/Check v0.1.0.4+
+This service checks if one of your contacts has birthday in the next few days
+wParam = lParam = not used
+*/
+#define MS_USERINFO_REMINDER_CHECK "UserInfo/Reminder/Check"
+
+
+/* UserInfo/Reminder/Check v0.1.1.1+
+This service creates a dialog, that lists all of the anniversaries
+wParam = lParam = not used
+*/
+#define MS_USERINFO_REMINDER_LIST "UserInfo/Reminder/List"
+
+
+/* UserInfo/Reminder/Check v0.1.2.16+
+This service compares birthday date which is set by the protocol module of each contact
+to the first found custom set birthday date. If a difference is detected, the user is asked
+whether to update the custom set birthday by the one of the protocol or not.
+
+If no custom birthday is set yet and the protocol contains a valid birthday, it is copied to
+primary custom module (e.g.: mBirthday or UserInfo).
+wParam = handle to single contact or NULL to backup all
+lParam = not used
+*/
+#define MS_USERINFO_REMINDER_AGGRASIVEBACKUP "UserInfo/Reminder/AggrassiveBackup"
+
+
+/* UserInfo/Refresh v0.7.0.1+
+This service calls PSS_GETINFO for all contacts in the contact list
+wParam = not used
+lParam = not used
+*/
+#define MS_USERINFO_REFRESH "UserInfo/Refresh"
+
+
+/*************************************************************
+ * Uinfobuttonclass module
+ */
+
+// button styles
+#define MBS_DEFBUTTON 0x00001000L // default button
+#define MBS_PUSHBUTTON 0x00002000L // toggle button
+#define MBS_FLAT 0x00004000L // flat button
+#define MBS_DOWNARROW 0x00008000L // has arrow on the right
+
+#define MBF_UNICODE 1
+#ifdef _UNICODE
+ #define MBF_TCHAR MBF_UNICODE
+#else
+ #define MBF_TCHAR 0
+#endif
+
+// BUTTONADDTOOLTIP
+// use lParam=MBF_UNICODE to set unicode tooltips
+// for lParam=0 the string is interpreted as ansi
+
+// message to explicitly translate the buttons text,
+// as it is not done by default translation routine
+// wParam=lParam=NULL
+#define BUTTONTRANSLATE (WM_USER+6)
+
+/* UserInfo/MsgBox v0.1.0.4+
+Slightly modified version of MButtonClass, to draw both text and icon in a button control
+*/
+#define UINFOBUTTONCLASS _T("UInfoButtonClass")
+
+/*************************************************************
+ * contact info module
+ */
+
+// additional information which can be retrieved with this service
+#define CNF_COPHONE 55 // returns company phone (string)
+#define CNF_COFAX 40 // returns company fax (string)
+#define CNF_COCELLULAR 41 // returns company cellular (string)
+#define CNF_COEMAIL 42 // returns company email address (string)
+
+/* CNF_BIRTHDATE v0.1.2.18+
+returns a formated string with the birthdate in it
+wParam - 1 for long dateformat, 0 for short dateformat
+lParam - CONTACTINFO structure as for all other fields, too
+returns 0 on success and 1 on failure
+*/
+#define CNF_BIRTHDATE 43 // returns date of birth (string)
+
+
+/*************************************************************
+ * extended integration module
+ */
+
+/* UserInfo/Homepage/OpenURL v0.1.2.19+
+This service reads the contact's homepage from UserInfo module or contact's protocol module
+and opens the default browser to show it.
+wParam=hContact - handle to contact whose homepage is to show
+lParam=not used
+*/
+#define MS_USERINFO_HOMEPAGE_OPENURL "UserInfo/Homepage/OpenURL"
+
+/*************************************************************
+ * extended database module
+ */
+
+/* DB/Contact/GetSettingStrEx v0.7.0.1+
+This service function reads a database setting from USERINFO module.
+If the setting does not exist, it is looked up in 'pszProto'.
+If 'hContact' points to a MetaContact, the setting is recursivly
+searched in all sub contacts, too, starting with the default contact,
+if the MetaContact does not directly provide the setting.
+This service can directly replace the default MS_DB_CONTACT_GETSETTING_STR
+for reading contact information from the database.
+There will be no difference for the user but the possible source of information.
+
+This service can be used to retrieve all kinds of settings!
+Some versions of the default MS_DB_CONTACT_GETSETTING_STR service return
+an error for BYTE, WORD and DWORD values if cgs.pValue->type is not 0.
+
+wParam = (WPARAM)(HANDLE)hContact
+lParam = (LPARAM)(DBCONTACTGETSETTING*)&cgs
+
+This service returns one of the results of MS_DB_CONTACT_GETSETTING_STR!
+*/
+#define MS_DB_CONTACT_GETSETTING_STR_EX "DB/Contact/GetSettingStrEx"
+
+static FORCEINLINE INT_PTR
+ DBGetContactSettingEx_Helper(
+ HANDLE hContact,
+ const char* pszProto,
+ const char* pszSetting,
+ DBVARIANT *dbv,
+ BYTE nType
+ )
+{
+ INT_PTR rc;
+ DBCONTACTGETSETTING cgs;
+
+ cgs.szModule = pszProto;
+ cgs.szSetting = pszSetting;
+ cgs.pValue = dbv;
+ dbv->type = nType;
+
+ rc = CallService(MS_DB_CONTACT_GETSETTING_STR_EX, (WPARAM)hContact, (LPARAM)&cgs);
+ if (rc == CALLSERVICE_NOTFOUND)
+ {
+ rc = CallService(MS_DB_CONTACT_GETSETTING_STR, (WPARAM)hContact, (LPARAM)&cgs);
+ }
+ return rc;
+}
+
+#define DBGetContactSettingStringEx(c,p,s,v) DBGetContactSettingEx_Helper(c,p,s,v,DBVT_ASCIIZ)
+#define DBGetContactSettingWStringEx(c,p,s,v) DBGetContactSettingEx_Helper(c,p,s,v,DBVT_WCHAR)
+#define DBGetContactSettingUTF8StringEx(c,p,s,v) DBGetContactSettingEx_Helper(c,p,s,v,DBVT_UTF8)
+
+#ifdef _UNICODE
+#define DBGetContactSettingTStringEx DBGetContactSettingWStringEx
+#else
+#define DBGetContactSettingTStringEx DBGetContactSettingStringEx
+#endif
+
+/*************************************************************/
+#endif /* _M_USERINFOEX_H_ */
\ No newline at end of file |