diff options
Diffstat (limited to 'plugins')
650 files changed, 3681 insertions, 3680 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 3a743a2f08..4f5e423ace 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
char proto[64];
HANDLE hHook;
HANDLE hHookMy;
@@ -556,7 +556,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l {
DestroyAnimation(hwnd, data);
- data->hContact = (HCONTACT)lParam;
+ data->hContact = (MCONTACT)lParam;
if (lParam == NULL)
data->proto[0] = '\0';
else
@@ -708,7 +708,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l }
case DM_AVATARCHANGED:
{
- if (data->hContact == (HCONTACT)wParam)
+ if (data->hContact == (MCONTACT)wParam)
{
DestroyAnimation(hwnd, data);
StartAnimation(hwnd, data);
diff --git a/plugins/AVS/src/acc.h b/plugins/AVS/src/acc.h index 576215b1a4..4ac03915f0 100644 --- a/plugins/AVS/src/acc.h +++ b/plugins/AVS/src/acc.h @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA. #ifndef __ACC_H__
# define __ACC_H__
-INT_PTR avSetAvatar(HCONTACT hContact, TCHAR* tszPath );
+INT_PTR avSetAvatar(MCONTACT hContact, TCHAR* tszPath );
INT_PTR avSetMyAvatar( char* szProto, TCHAR* tszPath );
int LoadACC();
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index c6155f3bef..56a443afab 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -88,7 +88,7 @@ static CacheNode* AddToList(CacheNode *node) return pCurrent;
}
-CacheNode *FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny)
+CacheNode *FindAvatarInCache(MCONTACT hContact, BOOL add, BOOL findAny)
{
if (g_shutDown)
return NULL;
@@ -143,7 +143,7 @@ CacheNode *FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny) * popup plugin.
*/
-void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)-1)
+void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)-1)
{
if (g_shutDown)
return;
@@ -154,8 +154,8 @@ void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY NotifyEventHooks(hEventChanged, (WPARAM)hContact, (LPARAM)ace);
if (g_MetaAvail && (node->dwFlags & MC_ISSUBCONTACT) && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
- HCONTACT hMasterContact = (HCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
- if (hMasterContact && (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMasterContact, 0) == hContact &&
+ MCONTACT hMasterContact = (MCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
+ if (hMasterContact && (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMasterContact, 0) == hContact &&
!db_get_b(hMasterContact, "ContactPhoto", "Locked", 0))
NotifyEventHooks(hEventChanged, (WPARAM)hMasterContact, (LPARAM)ace);
}
@@ -200,7 +200,7 @@ void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY // Just delete an avatar from cache
// An cache entry is never deleted. What is deleted is the image handle inside it
// This is done this way to keep track of which avatars avs have to keep track
-void DeleteAvatarFromCache(HCONTACT hContact, BOOL forever)
+void DeleteAvatarFromCache(MCONTACT hContact, BOOL forever)
{
if (g_shutDown)
return;
@@ -222,7 +222,7 @@ void DeleteAvatarFromCache(HCONTACT hContact, BOOL forever) /////////////////////////////////////////////////////////////////////////////////////////
-int SetAvatarAttribute(HCONTACT hContact, DWORD attrib, int mode)
+int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode)
{
if (g_shutDown)
return 0;
@@ -305,7 +305,7 @@ void PicLoader(LPVOID param) mir_sleep(dwDelay);
}
else if (node->mustLoad < 0 && node->ace.hContact) { // delete this picture
- HCONTACT hContact = node->ace.hContact;
+ MCONTACT hContact = node->ace.hContact;
EnterCriticalSection(&cachecs);
node->mustLoad = 0;
node->loaded = 0;
diff --git a/plugins/AVS/src/commonheaders.h b/plugins/AVS/src/commonheaders.h index 2b7b8d7877..6507b2ecd9 100644 --- a/plugins/AVS/src/commonheaders.h +++ b/plugins/AVS/src/commonheaders.h @@ -123,24 +123,24 @@ extern HANDLE hEventChanged, hEventContactAvatarChanged, hMyAvatarChanged; int GetFileHash(TCHAR* filename);
DWORD GetFileSize(TCHAR *szFilename);
-void MakePathRelative(HCONTACT hContact);
-void MakePathRelative(HCONTACT hContact, TCHAR *dest);
+void MakePathRelative(MCONTACT hContact);
+void MakePathRelative(MCONTACT hContact, TCHAR *dest);
HBITMAP LoadPNG(struct avatarCacheEntry *ace, char *szFilename);
void InitCache(void);
void UnloadCache(void);
-int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto);
-void DeleteAvatarFromCache(HCONTACT hContact, BOOL);
+int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto);
+void DeleteAvatarFromCache(MCONTACT hContact, BOOL);
void PicLoader(LPVOID param);
void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, DWORD dwFlags);
-int ChangeAvatar(HCONTACT hContact, BOOL fLoad, BOOL fNotifyHist = FALSE, int pa_format = 0);
+int ChangeAvatar(MCONTACT hContact, BOOL fLoad, BOOL fNotifyHist = FALSE, int pa_format = 0);
void DeleteGlobalUserAvatar();
-int FetchAvatarFor(HCONTACT hContact, char *szProto = NULL);
-CacheNode* FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny = FALSE);
-int SetAvatarAttribute(HCONTACT hContact, DWORD attrib, int mode);
+int FetchAvatarFor(MCONTACT hContact, char *szProto = NULL);
+CacheNode* FindAvatarInCache(MCONTACT hContact, BOOL add, BOOL findAny = FALSE);
+int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode);
void SetIgnoreNotify(char *protocol, BOOL ignore);
INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam);
@@ -149,9 +149,9 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam); INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam);
INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam);
-HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked = -1);
+MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked = -1);
-void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
int Proto_GetDelayAfterFail(const char *proto);
BOOL Proto_NeedDelaysForAvatars(const char *proto);
@@ -161,4 +161,4 @@ int Proto_AvatarImageProportion(const char *proto); void Proto_GetAvatarMaxSize(const char *proto, int *width, int *height);
int Proto_GetAvatarMaxFileSize(const char *proto);
-protoPicCacheEntry* GetProtoDefaultAvatar(HCONTACT hContact);
\ No newline at end of file +protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact);
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index 9e7be9b152..3a2fa368af 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -2,7 +2,7 @@ #include "image_utils.h"
extern int _DebugTrace(const char *fmt, ...);
-extern int _DebugTrace(HCONTACT hContact, const char *fmt, ...);
+extern int _DebugTrace(MCONTACT hContact, const char *fmt, ...);
#define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
@@ -410,7 +410,7 @@ DWORD GetImgHash(HBITMAP hBitmap) /*
* Changes the handle to a grayscale image
*/
-HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap)
+HBITMAP MakeGrayscale(MCONTACT hContact, HBITMAP hBitmap)
{
if (hBitmap) {
FIBITMAP *dib = fei->FI_CreateDIBFromHBITMAP(hBitmap);
@@ -433,7 +433,7 @@ HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap) * See if finds a transparent background in image, and set its transparency
* Return TRUE if found a transparent background
*/
-BOOL MakeTransparentBkg(HCONTACT hContact, HBITMAP *hBitmap)
+BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
{
BYTE *p = NULL;
DWORD dwLen;
diff --git a/plugins/AVS/src/image_utils.h b/plugins/AVS/src/image_utils.h index f22dc47c04..77ff831719 100644 --- a/plugins/AVS/src/image_utils.h +++ b/plugins/AVS/src/image_utils.h @@ -37,8 +37,8 @@ int BmpFilterSaveBitmapW(HBITMAP hBmp, wchar_t *wszFile, int flags); HBITMAP CopyBitmapTo32(HBITMAP hBitmap);
BOOL PreMultiply(HBITMAP hBitmap);
-BOOL MakeTransparentBkg(HCONTACT hContact, HBITMAP *hBitmap);
-HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap);
+BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap);
+HBITMAP MakeGrayscale(MCONTACT hContact, HBITMAP hBitmap);
DWORD GetImgHash(HBITMAP hBitmap);
int AVS_pathIsAbsolute(const TCHAR *path);
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index a4422d83b4..0a4997a54e 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -134,8 +134,8 @@ static int MetaChanged(WPARAM wParam, LPARAM lParam) AVATARCACHEENTRY *ace;
- HCONTACT hContact = (HCONTACT)wParam;
- HCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact);
+ MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact);
// Get the node
CacheNode *node = FindAvatarInCache(hSubContact, TRUE);
@@ -190,7 +190,7 @@ static void LoadAccountInfo(PROTOACCOUNT *acc) g_ProtoPictures.insert(pce);
pce = new protoPicCacheEntry;
- CreateAvatarInCache((HCONTACT)-1, pce, acc->szModuleName);
+ CreateAvatarInCache((MCONTACT)-1, pce, acc->szModuleName);
pce->szProtoname = mir_strdup(acc->szModuleName);
pce->tszAccName = mir_tstrdup(acc->tszAccountName);
g_MyAvatars.insert(pce);
@@ -242,7 +242,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam) static int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
- DeleteAvatarFromCache((HCONTACT)wParam, TRUE);
+ DeleteAvatarFromCache((MCONTACT)wParam, TRUE);
return 0;
}
@@ -401,7 +401,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) // Load global avatar
protoPicCacheEntry *pce = new protoPicCacheEntry;
- CreateAvatarInCache((HCONTACT)-1, pce, "");
+ CreateAvatarInCache((MCONTACT)-1, pce, "");
pce->szProtoname = mir_strdup("");
g_MyAvatars.insert(pce);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index ee1fc4007a..580e375048 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DM_AVATARCHANGED (WM_USER + 12)
#define DM_PROTOCOLCHANGED (WM_USER + 13)
-extern int _DebugPopup(HCONTACT hContact, const char *fmt, ...);
+extern int _DebugPopup(MCONTACT hContact, const char *fmt, ...);
extern INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam);
extern OBJLIST<protoPicCacheEntry> g_ProtoPictures;
extern HANDLE hEventChanged;
@@ -41,7 +41,7 @@ extern BOOL ScreenToClient(HWND hWnd, LPRECT lpRect); static BOOL dialoginit = TRUE;
struct WindowData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hHook;
};
@@ -423,7 +423,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar BOOL newVal = ListView_GetCheckState(hwndList, i);
if (oldVal && !newVal)
- for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
+ for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
DeleteAvatarFromCache(hContact, TRUE);
if (newVal)
@@ -440,7 +440,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar /////////////////////////////////////////////////////////////////////////////////////////
-static void LoadTransparentData(HWND hwndDlg, HCONTACT hContact)
+static void LoadTransparentData(HWND hwndDlg, MCONTACT hContact)
{
CheckDlgButton(hwndDlg, IDC_MAKETRANSPBKG, db_get_b(hContact, "ContactPhoto", "MakeTransparentBkg", db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0)));
SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETPOS, 0, (LPARAM)db_get_w(hContact, "ContactPhoto", "TranspBkgNumPoints", db_get_w(0, AVS_MODULE, "TranspBkgNumPoints", 5)));
@@ -455,7 +455,7 @@ static void LoadTransparentData(HWND hwndDlg, HCONTACT hContact) EnableWindow(GetDlgItem(hwndDlg, IDC_BKG_COLOR_DIFFERENCE), transp_enabled);
}
-static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact)
+static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact)
{
BOOL transp = IsDlgButtonChecked(hwndDlg, IDC_MAKETRANSPBKG);
if (db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0) == transp)
@@ -476,18 +476,18 @@ static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact) db_set_w(hContact, "ContactPhoto", "TranspBkgColorDiff", tmp);
}
-static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact, BOOL locked)
+static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact, BOOL locked)
{
SaveTransparentData(hwndDlg, hContact);
- HCONTACT tmp = GetContactThatHaveTheAvatar(hContact, locked);
+ MCONTACT tmp = GetContactThatHaveTheAvatar(hContact, locked);
if (tmp != hContact)
SaveTransparentData(hwndDlg, tmp);
}
INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
struct WindowData *dat = (struct WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (dat)
@@ -501,10 +501,10 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA struct WindowData *dat = (struct WindowData *)malloc(sizeof(struct WindowData));
if (dat)
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
TranslateDialogDefault(hwndDlg);
if (hContact) {
szNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
@@ -759,7 +759,7 @@ int OptInit(WPARAM wParam, LPARAM lParam) static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
struct WindowData *dat = (struct WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (dat)
@@ -771,7 +771,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa dat = (struct WindowData *) malloc(sizeof(struct WindowData));
if (dat == NULL)
return FALSE;
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
HWND protopic = GetDlgItem(hwndDlg, IDC_PROTOPIC);
SendMessage(protopic, AVATAR_SETCONTACT, 0, (LPARAM) dat->hContact);
@@ -781,7 +781,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa SendMessage(protopic, AVATAR_SETRESIZEIFSMALLER, 0, (LPARAM) FALSE);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
TranslateDialogDefault(hwndDlg);
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? TRUE : FALSE);
@@ -1148,7 +1148,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM lParam) odp.hInstance = g_hInst;
odp.pszTitle = LPGEN("Avatar");
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
if (hContact == NULL) {
// User dialog
odp.pfnDlgProc = DlgProcAvatarProtoInfo;
diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index 9273720962..a7faa9007c 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -45,15 +45,15 @@ A queue to request items. One request is done at a time, REQUEST_WAIT_TIME milis static void RequestThread(void *vParam);
extern HANDLE hShutdownEvent;
-extern int DeleteAvatar(HCONTACT hContact);
-extern void MakePathRelative(HCONTACT hContact, TCHAR *path);
+extern int DeleteAvatar(MCONTACT hContact);
+extern void MakePathRelative(MCONTACT hContact, TCHAR *path);
int Proto_GetDelayAfterFail(const char *proto);
BOOL Proto_IsFetchingWhenProtoNotVisibleAllowed(const char *proto);
BOOL Proto_IsFetchingWhenContactOfflineAllowed(const char *proto);
#ifdef _DEBUG
int _DebugTrace(const char *fmt, ...);
-int _DebugTrace(HCONTACT hContact, const char *fmt, ...);
+int _DebugTrace(MCONTACT hContact, const char *fmt, ...);
#endif
// Functions ////////////////////////////////////////////////////////////////////////////
@@ -100,7 +100,7 @@ static BOOL PollCheckProtocol(const char *szProto) }
// Return true if this contact can have avatar requested
-static BOOL PollContactCanHaveAvatar(HCONTACT hContact, const char *szProto)
+static BOOL PollContactCanHaveAvatar(MCONTACT hContact, const char *szProto)
{
int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
return (Proto_IsFetchingWhenContactOfflineAllowed(szProto) || status != ID_STATUS_OFFLINE)
@@ -108,12 +108,12 @@ static BOOL PollContactCanHaveAvatar(HCONTACT hContact, const char *szProto) }
// Return true if this contact has to be checked
-static BOOL PollCheckContact(HCONTACT hContact, const char *szProto)
+static BOOL PollCheckContact(MCONTACT hContact, const char *szProto)
{
return !db_get_b(hContact, "ContactPhoto", "Locked", 0) && FindAvatarInCache(hContact, FALSE, TRUE) != NULL;
}
-static void QueueRemove(HCONTACT hContact)
+static void QueueRemove(MCONTACT hContact)
{
mir_cslock lck(cs);
@@ -124,7 +124,7 @@ static void QueueRemove(HCONTACT hContact) }
}
-static void QueueAdd(HCONTACT hContact, int waitTime)
+static void QueueAdd(MCONTACT hContact, int waitTime)
{
if (fei == NULL || g_shutDown)
return;
@@ -143,12 +143,12 @@ static void QueueAdd(HCONTACT hContact, int waitTime) }
// Add an contact to a queue
-void QueueAdd(HCONTACT hContact)
+void QueueAdd(MCONTACT hContact)
{
QueueAdd(hContact, waitTime);
}
-void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
+void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
{
QueueRemove(hContact);
@@ -202,7 +202,7 @@ void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *p }
}
-int FetchAvatarFor(HCONTACT hContact, char *szProto)
+int FetchAvatarFor(MCONTACT hContact, char *szProto)
{
int result = GAIR_NOAVATAR;
@@ -258,7 +258,7 @@ static void RequestThread(void *vParam) }
// Will request this item
- HCONTACT hContact = qi.hContact;
+ MCONTACT hContact = qi.hContact;
queue.remove( queue.getCount()-1 );
QueueRemove(hContact);
LeaveCriticalSection(&cs);
diff --git a/plugins/AVS/src/poll.h b/plugins/AVS/src/poll.h index 7b7924a9cf..a7db946467 100644 --- a/plugins/AVS/src/poll.h +++ b/plugins/AVS/src/poll.h @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. struct QueueItem
{
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD check_time;
};
@@ -31,6 +31,6 @@ void InitPolls(); void UninitPolls();
// Add an contact to a queue
-void QueueAdd(HCONTACT hContact);
+void QueueAdd(MCONTACT hContact);
#endif // __POLL_H__
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 85218de38b..b02f0e5d19 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam) if (wParam == 0 || g_shutDown || fei == NULL)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
hContact = GetContactThatHaveTheAvatar(hContact);
// Get the node
@@ -46,7 +46,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam) INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BYTE was_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
if (fei == NULL || was_locked == (BYTE)lParam) // no need for redundant lockings...
@@ -118,7 +118,7 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return FALSE;
}
-static INT_PTR avSetAvatar(HCONTACT hContact, TCHAR *tszPath)
+static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath)
{
BYTE is_locked = 0;
TCHAR FileName[MAX_PATH], szBackupName[MAX_PATH];
@@ -188,12 +188,12 @@ static INT_PTR avSetAvatar(HCONTACT hContact, TCHAR *tszPath) INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam)
{
- return avSetAvatar((HCONTACT)wParam, _A2T((const char*)lParam));
+ return avSetAvatar((MCONTACT)wParam, _A2T((const char*)lParam));
}
INT_PTR SetAvatarW(WPARAM wParam, LPARAM lParam)
{
- return avSetAvatar((HCONTACT)wParam, (TCHAR*)lParam);
+ return avSetAvatar((MCONTACT)wParam, (TCHAR*)lParam);
}
/*
@@ -932,7 +932,7 @@ static void ReloadMyAvatar(LPVOID lpParam) if (g_MyAvatars[i].hbmPic)
DeleteObject(g_MyAvatars[i].hbmPic);
- if (CreateAvatarInCache((HCONTACT)-1, &g_MyAvatars[i], myAvatarProto) != -1)
+ if (CreateAvatarInCache((MCONTACT)-1, &g_MyAvatars[i], myAvatarProto) != -1)
NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, (LPARAM)&g_MyAvatars[i]);
else
NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, 0);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index ed9e674750..35bebb621b 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -37,7 +37,7 @@ int _DebugTrace(const char *fmt, ...) return 0;
}
-int _DebugTrace(HCONTACT hContact, const char *fmt, ...)
+int _DebugTrace(MCONTACT hContact, const char *fmt, ...)
{
char text[1024];
size_t len;
@@ -119,7 +119,7 @@ size_t AVS_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut) * convert the avatar image path to a relative one...
* given: contact handle, path to image
*/
-void MakePathRelative(HCONTACT hContact, TCHAR *path)
+void MakePathRelative(MCONTACT hContact, TCHAR *path)
{
TCHAR szFinalPath[MAX_PATH];
szFinalPath[0] = '\0';
@@ -137,7 +137,7 @@ void MakePathRelative(HCONTACT hContact, TCHAR *path) * given: contact handle
*/
-void MakePathRelative(HCONTACT hContact)
+void MakePathRelative(MCONTACT hContact)
{
DBVARIANT dbv;
if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
@@ -148,7 +148,7 @@ void MakePathRelative(HCONTACT hContact) // create the avatar in cache
// returns 0 if not created (no avatar), iIndex otherwise, -2 if has to request avatar, -3 if avatar too big
-int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)
+int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
{
DBVARIANT dbv = {0};
char *szExt = NULL;
@@ -212,7 +212,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto) }
}
}
- else if (hContact == (HCONTACT)-1) { // create own picture - note, own avatars are not on demand, they are loaded once at
+ else if (hContact == (MCONTACT)-1) { // create own picture - note, own avatars are not on demand, they are loaded once at
// startup and everytime they are changed.
if (szProto[0] == '\0') {
// Global avatar
@@ -274,7 +274,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto) BOOL noTransparency = db_get_b(0, AVS_MODULE, "RemoveAllTransparency", 0);
// Calc image hash
- if (hContact != 0 && hContact != (HCONTACT)-1) {
+ if (hContact != 0 && hContact != (MCONTACT)-1) {
// Have to reset settings? -> do it if image changed
DWORD imgHash = GetImgHash(ace->hbmPic);
if (imgHash != db_get_dw(hContact, "ContactPhoto", "ImageHash", 0)) {
@@ -297,7 +297,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto) }
}
}
- else if (hContact == (HCONTACT)-1) { // My avatars
+ else if (hContact == (MCONTACT)-1) { // My avatars
if (!noTransparency && !isTransparentImage
&& db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0)
&& db_get_b(0, AVS_MODULE, "MakeMyAvatarsTransparent", 0))
@@ -329,7 +329,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto) protoPicCacheEntry *pAce = (protoPicCacheEntry *)ace;
if (hContact == 0)
pAce->dwFlags |= AVS_PROTOPIC;
- else if (hContact == (HCONTACT)-1)
+ else if (hContact == (MCONTACT)-1)
pAce->dwFlags |= AVS_OWNAVATAR;
}
@@ -493,7 +493,7 @@ BOOL Proto_IsFetchingWhenContactOfflineAllowed(const char *proto) /////////////////////////////////////////////////////////////////////////////////////////
-protoPicCacheEntry *GetProtoDefaultAvatar(HCONTACT hContact)
+protoPicCacheEntry *GetProtoDefaultAvatar(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto) {
@@ -506,7 +506,7 @@ protoPicCacheEntry *GetProtoDefaultAvatar(HCONTACT hContact) return NULL;
}
-HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked)
+MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked)
{
if (g_MetaAvail && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
if (db_get_dw(hContact, g_szMetaName, "NumContacts", 0) >= 1) {
@@ -514,13 +514,13 @@ HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked) locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
if (!locked)
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
}
}
return hContact;
}
-int ChangeAvatar(HCONTACT hContact, BOOL fLoad, BOOL fNotifyHist, int pa_format)
+int ChangeAvatar(MCONTACT hContact, BOOL fLoad, BOOL fNotifyHist, int pa_format)
{
if (g_shutDown)
return 0;
diff --git a/plugins/AddContactPlus/src/addcontact.cpp b/plugins/AddContactPlus/src/addcontact.cpp index 009ada955c..6b0e2e99f3 100644 --- a/plugins/AddContactPlus/src/addcontact.cpp +++ b/plugins/AddContactPlus/src/addcontact.cpp @@ -267,7 +267,7 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp psr->id = mir_tstrdup(szUserId);
acs->psr = psr;
- HCONTACT hContact = (HCONTACT)CallProtoService(acs->proto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
+ MCONTACT hContact = (MCONTACT)CallProtoService(acs->proto, PS_ADDTOLIST, IsDlgButtonChecked(hdlg, IDC_ADDTEMP) ? PALF_TEMPORARY : 0, (LPARAM)acs->psr);
if (hContact == NULL) {
MessageBox(NULL,
TranslateT("The contact cannot be added to your contact list. If you are not logged into the selected account, please try to do so. Also, make sure the contact ID is entered correctly."),
diff --git a/plugins/Alarms/src/alarms.cpp b/plugins/Alarms/src/alarms.cpp index 5761003923..2c09fc0267 100644 --- a/plugins/Alarms/src/alarms.cpp +++ b/plugins/Alarms/src/alarms.cpp @@ -64,7 +64,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA return DefWindowProc(hWnd, message, wParam, lParam);
}
-void ShowPopup(HCONTACT hContact, const TCHAR *msg)
+void ShowPopup(MCONTACT hContact, const TCHAR *msg)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
TCHAR *lpzContactName = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
@@ -87,7 +87,7 @@ void ShowPopup(HCONTACT hContact, const TCHAR *msg) static int PluginSendMessage(WPARAM wParam,LPARAM lParam)
{
- CallContactService((HCONTACT)wParam,PSS_MESSAGE,0,lParam);
+ CallContactService((MCONTACT)wParam,PSS_MESSAGE,0,lParam);
return 0;
}
diff --git a/plugins/AssocMgr/src/test.cpp b/plugins/AssocMgr/src/test.cpp index e48b15d779..5031919711 100644 --- a/plugins/AssocMgr/src/test.cpp +++ b/plugins/AssocMgr/src/test.cpp @@ -126,7 +126,7 @@ static int ServiceParseAimLink(WPARAM wParam,LPARAM lParam) /* send a message to a contact */
else if (!_strnicmp(arg,"goim?",5)) {
char *tok,*sn=NULL,*msg=NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
if (*(arg+=5)==0) return 1; /* parse failed */
tok=strtok(arg,"&"); /* first token */
while(tok!=NULL) {
@@ -206,9 +206,9 @@ void aim_links_destroy() #define hInst GetModuleHandleA("ICQ")
static __inline HANDLE HContactFromUIN(DWORD dwUIN,int *Added) { dwUIN; Added; return db_find_first(); }
static __inline HANDLE ICQFindFirstContact(void) { return NULL; }
-static __inline HANDLE ICQFindNextContact(HCONTACT hContact) { hContact; return NULL; }
-static __inline void AddToCache(HCONTACT hContact,DWORD dwUin) { hContact; dwUin; }
-static __inline DWORD ICQGetContactSettingUIN(HCONTACT hContact) { hContact; return 0; }
+static __inline HANDLE ICQFindNextContact(MCONTACT hContact) { hContact; return NULL; }
+static __inline void AddToCache(MCONTACT hContact,DWORD dwUin) { hContact; dwUin; }
+static __inline DWORD ICQGetContactSettingUIN(MCONTACT hContact) { hContact; return 0; }
static __inline HANDLE HandleFromCacheByUin(DWORD dwUin) { dwUin; return NULL; }
#include <m_protosvc.h>
#include <m_message.h>
@@ -254,7 +254,7 @@ typedef struct { static HANDLE IsHContactFromUIN(DWORD uin)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwUin;
hContact=HandleFromCacheByUin(uin);
if(hContact!=NULL) return hContact;
@@ -300,7 +300,7 @@ static void AddIcqUser(ICQFILEINFO *info) static void MessageIcqUser(ICQFILEINFO *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=HContactFromUIN(atoi(info->uin),NULL); /* adds the contact if needed */
if(hContact!=NULL)
@@ -445,7 +445,7 @@ static int ServiceParseYmsgrLink(WPARAM wParam,LPARAM lParam) /* send a message to a contact */
else if (!_strnicmp(arg,"sendim?",7)) {
char *tok,*id=NULL,*msg=NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
if (*(arg+=7)==0) return 1; /* parse failed */
tok=strtok(arg,"&"); /* first token */
if(tok!=NULL) id=tok;
@@ -562,7 +562,7 @@ static int ServiceParseMsnimLink(WPARAM wParam,LPARAM lParam) /* "voice" and "video" not yet implemented, perform same action as "chat" */
else if (!_strnicmp(arg,"chat?",5) || !_strnicmp(arg,"voice?",6) || !_strnicmp(arg,"video?",6)) {
char *tok,*email=NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
if (*(arg+=5)==0) return 1; /* parse failed */
if (*arg=='?' && *(++arg)==0) return 1; /* for "voice?" and "video?" */
tok=strtok(arg,"&"); /* first token */
@@ -637,7 +637,7 @@ static int ServiceParseLink(WPARAM wParam,LPARAM lParam) if(arg==NULL) return 1; /* parse failed */
for (++arg;*arg=='/';++arg);
/* send a message to a contact */
- { HCONTACT hContact;
+ { MCONTACT hContact;
if(ServiceExists(MS_MSG_SENDMESSAGE)) {
hContact=gg_getcontact(atoi(arg),TRUE,FALSE,arg);
if(hContact!=NULL)
@@ -714,7 +714,7 @@ static int ServiceParseXmppURI(WPARAM wParam,LPARAM lParam) /* send a message to a contact */
else if (*arg==0 || (!_strnicmp(arg,"message",7) && (*(arg+7)==';' || *(arg+7)==0))) {
char *tok,*subj=NULL,*body=NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
char msg[1024];
arg+=7;
while(*arg==';') ++arg;
@@ -754,7 +754,7 @@ static int ServiceParseXmppURI(WPARAM wParam,LPARAM lParam) }
/* remove user from contact list */
else if (!_strnicmp(arg,"remove",6) && (*(arg+6)==';' || *(arg+6)==0)) {
- HCONTACT hContact;
+ MCONTACT hContact;
hContact=JabberHContactFromJID(jid);
if(hContact==NULL) /* not yet implemented: show standard miranda dialog here */
CallService(MS_DB_CONTACT_DELETE,(WPARAM)hContact,0);
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp index 92a2fbeaca..2ffcc0a64d 100644 --- a/plugins/AuthState/src/main.cpp +++ b/plugins/AuthState/src/main.cpp @@ -61,7 +61,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfo;
}
-INT_PTR getIconToUse(HCONTACT hContact, LPARAM lParam)
+INT_PTR getIconToUse(MCONTACT hContact, LPARAM lParam)
{
char *proto = GetContactProto(hContact);
// if (lParam == 1) return icon_none;
@@ -94,7 +94,7 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) if (wParam == NULL)
return 0;
- int usedIcon = getIconToUse((HCONTACT)wParam, lParam);
+ int usedIcon = getIconToUse((MCONTACT)wParam, lParam);
const char *icon;
switch (usedIcon) {
@@ -103,14 +103,14 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) case icon_auth: icon = "auth_icon"; break;
default: icon = NULL; break;
}
- ExtraIcon_SetIcon(hExtraIcon, (HCONTACT)wParam, icon);
+ ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, icon);
return 0;
}
int onContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
if (!proto) return 0;
if (!lstrcmpA(cws->szModule,proto))
@@ -123,7 +123,7 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) int onDBContactAdded(WPARAM wParam, LPARAM lParam)
{
// A new contact added, mark it as recent
- db_set_b((HCONTACT)wParam, MODULENAME, "ShowIcons", 1);
+ db_set_b((MCONTACT)wParam, MODULENAME, "ShowIcons", 1);
onExtraImageApplying(wParam, 0);
return 0;
@@ -131,8 +131,8 @@ int onDBContactAdded(WPARAM wParam, LPARAM lParam) INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam)
{
- byte enabled = db_get_b((HCONTACT)wParam,"AuthState","ShowIcons",1);
- db_set_b((HCONTACT)wParam, MODULENAME, "ShowIcons", !enabled);
+ byte enabled = db_get_b((MCONTACT)wParam,"AuthState","ShowIcons",1);
+ db_set_b((MCONTACT)wParam, MODULENAME, "ShowIcons", !enabled);
onExtraImageApplying(wParam, 0);
return 0;
@@ -140,7 +140,7 @@ INT_PTR onAuthMenuSelected(WPARAM wParam, LPARAM lParam) int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *proto = GetContactProto(hContact);
if (!proto)
return 0;
@@ -173,7 +173,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) hExtraIcon = ExtraIcon_Register("authstate", LPGEN("Auth State"), "authgrant_icon");
// Set initial value for all contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
onExtraImageApplying((WPARAM)hContact, 1);
hOptInitialise = HookEvent(ME_OPT_INITIALISE, onOptInitialise);
diff --git a/plugins/AuthState/src/options.cpp b/plugins/AuthState/src/options.cpp index 48fb2add44..9e1f972f55 100644 --- a/plugins/AuthState/src/options.cpp +++ b/plugins/AuthState/src/options.cpp @@ -55,7 +55,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP bContactMenuItem = IsDlgButtonChecked(hwndDlg, IDC_ENABLEMENUITEM);
bIconsForRecentContacts = IsDlgButtonChecked(hwndDlg, IDC_ICONSFORRECENT);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
onExtraImageApplying((WPARAM)hContact,0);
//Store options values to DB
diff --git a/plugins/AutoShutdown/src/watcher.cpp b/plugins/AutoShutdown/src/watcher.cpp index a51db88ff1..5ece5c84df 100644 --- a/plugins/AutoShutdown/src/watcher.cpp +++ b/plugins/AutoShutdown/src/watcher.cpp @@ -181,7 +181,7 @@ static BOOL CheckAllContactsOffline(void) {
BOOL fSmartCheck,fAllOffline=TRUE; /* tentatively */
fSmartCheck=db_get_b(NULL,"AutoShutdown","SmartOfflineCheck",SETTING_SMARTOFFLINECHECK_DEFAULT);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *pszProto = GetContactProto(hContact);
if (pszProto != NULL && CallProtoService(pszProto,PS_GETSTATUS,0,0) != ID_STATUS_OFFLINE) {
if (db_get_b(hContact,pszProto,"ChatRoom",0)) continue;
@@ -203,7 +203,7 @@ static int StatusSettingChanged(WPARAM wParam,LPARAM lParam) if (currentWatcherType&SDWTF_STATUS) {
DBCONTACTWRITESETTING *dbcws=(DBCONTACTWRITESETTING*)lParam;
if ((HANDLE)wParam != NULL && dbcws->value.wVal==ID_STATUS_OFFLINE && !lstrcmpA(dbcws->szSetting,"Status")) {
- char *pszProto = GetContactProto((HCONTACT)wParam);
+ char *pszProto = GetContactProto((MCONTACT)wParam);
if (pszProto != NULL && !lstrcmpA(dbcws->szModule,pszProto))
if (CheckAllContactsOffline())
ShutdownAndStopWatcher();
@@ -239,7 +239,7 @@ static BOOL CALLBACK CpuUsageWatcherProc(BYTE nCpuUsage,LPARAM lParam) static int WeatherUpdated(WPARAM wParam,LPARAM lParam)
{
- char *pszProto = GetContactProto((HCONTACT)wParam);
+ char *pszProto = GetContactProto((MCONTACT)wParam);
if ((BOOL)lParam && pszProto != NULL && CallProtoService(pszProto,PS_GETSTATUS,0,0)==THUNDER)
if (db_get_b(NULL,"AutoShutdown","WeatherShutdown",SETTING_WEATHERSHUTDOWN_DEFAULT))
ServiceShutdown(SDSDT_SHUTDOWN,TRUE);
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp index 82a987b0b5..a0897015d1 100644 --- a/plugins/AvatarHistory/src/AvatarDlg.cpp +++ b/plugins/AvatarHistory/src/AvatarDlg.cpp @@ -23,22 +23,22 @@ Avatar History Plugin HGENMENU hMenu = NULL;
DWORD WINAPI AvatarDialogThread(LPVOID param);
static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM lParam);
-int ShowSaveDialog(HWND hwnd, TCHAR* fn,HCONTACT hContact = NULL);
+int ShowSaveDialog(HWND hwnd, TCHAR* fn,MCONTACT hContact = NULL);
BOOL ProtocolEnabled(const char *proto);
-int FillAvatarListFromDB(HWND list, HCONTACT hContact);
-int FillAvatarListFromFolder(HWND list, HCONTACT hContact);
-int FillAvatarListFromFiles(HWND list, HCONTACT hContact);
+int FillAvatarListFromDB(HWND list, MCONTACT hContact);
+int FillAvatarListFromFolder(HWND list, MCONTACT hContact);
+int FillAvatarListFromFiles(HWND list, MCONTACT hContact);
int CleanupAvatarPic(HWND hwnd);
bool UpdateAvatarPic(HWND hwnd);
-TCHAR * GetContactFolder(TCHAR *fn, HCONTACT hContact);
+TCHAR * GetContactFolder(TCHAR *fn, MCONTACT hContact);
BOOL ResolveShortcut(TCHAR *shortcut, TCHAR *file);
static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam);
struct AvatarDialogData
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR fn[MAX_PATH];
HWND parent;
};
@@ -65,7 +65,7 @@ public: TCHAR *filelink;
};
-int OpenAvatarDialog(HCONTACT hContact, char* fn)
+int OpenAvatarDialog(MCONTACT hContact, char* fn)
{
HWND hAvatarWindow = WindowList_Find(hAvatarWindowsList, hContact);
if (hAvatarWindow)
@@ -222,7 +222,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l DestroyMenu(menu);
ListEntry *le = (ListEntry*) SendMessage(hwndList, LB_GETITEMDATA, pos, 0);
- HCONTACT hContact = (HCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch(ret) {
case ID_AVATARLISTPOPUP_SAVEAS:
ShowSaveDialog(hwnd, le->filename, hContact);
@@ -302,7 +302,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l switch(LOWORD(wParam)) {
case IDOK:
if (HIWORD(wParam) == BN_CLICKED) {
- HCONTACT hContact = (HCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT) GetWindowLongPtr(hwnd, GWLP_USERDATA);
db_set_b(hContact, MODULE_NAME, "AvatarPopups", (BYTE) IsDlgButtonChecked(hwnd, IDC_POPUPUSER));
db_set_b(hContact, MODULE_NAME, "LogToDisk", (BYTE) IsDlgButtonChecked(hwnd, IDC_LOGUSER));
db_set_b(hContact, MODULE_NAME, "LogToHistory", (BYTE) IsDlgButtonChecked(hwnd, IDC_HISTORYUSER));
@@ -324,7 +324,7 @@ static INT_PTR CALLBACK AvatarDlgProc(HWND hwnd,UINT uMsg,WPARAM wParam,LPARAM l case IDC_OPENFOLDER:
if (HIWORD(wParam) == BN_CLICKED && opts.log_per_contact_folders) {
TCHAR avfolder[MAX_PATH];
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
GetContactFolder(avfolder, hContact);
ShellExecute(NULL, db_get_b(NULL, MODULE_NAME, "OpenFolderMethod", 0) ? _T("explore") : _T("open"), avfolder, NULL, NULL, SW_SHOWNORMAL);
return TRUE;
@@ -373,7 +373,7 @@ int AddFileToList(TCHAR *path,TCHAR *lnk,TCHAR *filename, HWND list) return max_pos;
}
-int FillAvatarListFromFiles(HWND list, HCONTACT hContact)
+int FillAvatarListFromFiles(HWND list, MCONTACT hContact)
{
int max_pos = 0;
TCHAR dir[MAX_PATH], path[MAX_PATH];
@@ -400,7 +400,7 @@ int FillAvatarListFromFiles(HWND list, HCONTACT hContact) return 0;
}
-int FillAvatarListFromFolder(HWND list, HCONTACT hContact)
+int FillAvatarListFromFolder(HWND list, MCONTACT hContact)
{
int max_pos = 0;
TCHAR dir[MAX_PATH], path[MAX_PATH];
@@ -429,7 +429,7 @@ int FillAvatarListFromFolder(HWND list, HCONTACT hContact) return 0;
}
-int FillAvatarListFromDB(HWND list, HCONTACT hContact)
+int FillAvatarListFromDB(HWND list, MCONTACT hContact)
{
int max_pos = 0;
BYTE blob[2048];
@@ -513,7 +513,7 @@ int CleanupAvatarPic(HWND hwnd) int PreBuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
Menu_ShowItem(hMenu, ProtocolEnabled(proto));
return 0;
}
@@ -534,12 +534,12 @@ void InitMenuItem() static INT_PTR ShowDialogSvc(WPARAM wParam, LPARAM lParam)
{
- OpenAvatarDialog((HCONTACT)wParam, (char*)lParam);
+ OpenAvatarDialog((MCONTACT)wParam, (char*)lParam);
return 0;
}
-int ShowSaveDialog(HWND hwnd, TCHAR* fn, HCONTACT hContact)
+int ShowSaveDialog(HWND hwnd, TCHAR* fn, MCONTACT hContact)
{
TCHAR filter[MAX_PATH];
TCHAR file[MAX_PATH];
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 156134bea9..927c9d1c03 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -40,7 +40,7 @@ int OptInit(WPARAM wParam,LPARAM lParam); TCHAR* GetHistoryFolder(TCHAR *fn);
TCHAR* GetProtocolFolder(TCHAR *fn, char *proto);
-TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact);
+TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact);
void InitMenuItem();
@@ -84,7 +84,7 @@ static INT_PTR GetCachedAvatar(WPARAM wParam, LPARAM lParam) static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
return ContactEnabled(hContact, "LogToDisk", AVH_DEF_LOGTODISK)
|| ContactEnabled(hContact, "AvatarPopups", AVH_DEF_AVPOPUPS)
|| ContactEnabled(hContact, "LogToHistory", AVH_DEF_LOGTOHISTORY);
@@ -105,11 +105,11 @@ static INT_PTR IsEnabled(WPARAM wParam, LPARAM lParam) static int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
if (proto == NULL)
return 0;
@@ -158,7 +158,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) ShowDebugPopup(hContact, TranslateT("AVH Debug: File copied successfully"), history_filename);
if (ServiceExists(MS_MC_GETMETACONTACT)) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY)) {
TCHAR filename[MAX_PATH] = _T("");
@@ -203,7 +203,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) CreateOldStyleShortcut(hContact, history_filename);
if (ServiceExists(MS_MC_GETMETACONTACT)) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, wParam, 0);
if (hMetaContact != NULL && ContactEnabled(hMetaContact, "LogToDisk", AVH_DEF_LOGTOHISTORY))
CreateOldStyleShortcut(hMetaContact, history_filename);
}
diff --git a/plugins/AvatarHistory/src/AvatarHistory.h b/plugins/AvatarHistory/src/AvatarHistory.h index 334ef74109..fb3900c4fe 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.h +++ b/plugins/AvatarHistory/src/AvatarHistory.h @@ -60,22 +60,22 @@ void LoadOptions(); void SetupIcoLib();
HICON createDefaultOverlayedIcon(BOOL big);
-HICON createProtoOverlayedIcon(HCONTACT hContact);
+HICON createProtoOverlayedIcon(MCONTACT hContact);
int PreBuildContactMenu(WPARAM wParam,LPARAM lParam);
int IcoLibIconsChanged(WPARAM wParam,LPARAM lParam);
-int OpenAvatarDialog(HCONTACT hContact, char* fn);
+int OpenAvatarDialog(MCONTACT hContact, char* fn);
// utils
TCHAR* GetCachedAvatar(char *proto, TCHAR *hash);
BOOL ProtocolEnabled(const char *proto);
-BOOL ContactEnabled(HCONTACT hContact, char *setting, int def);
+BOOL ContactEnabled(MCONTACT hContact, char *setting, int def);
BOOL CopyImageFile(TCHAR *old_file, TCHAR *new_file);
void ConvertToFilename(TCHAR *str, size_t size);
-void CreateOldStyleShortcut(HCONTACT hContact, TCHAR *history_filename);
+void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename);
BOOL CreateShortcut(TCHAR *file, TCHAR *shortcut);
#define POPUP_ACTION_DONOTHING 0
diff --git a/plugins/AvatarHistory/src/icolib.cpp b/plugins/AvatarHistory/src/icolib.cpp index b3307b0a7b..88e6b4cae7 100644 --- a/plugins/AvatarHistory/src/icolib.cpp +++ b/plugins/AvatarHistory/src/icolib.cpp @@ -74,7 +74,7 @@ HICON createDefaultOverlayedIcon(BOOL big) }
-HICON createProtoOverlayedIcon(HCONTACT hContact)
+HICON createProtoOverlayedIcon(MCONTACT hContact)
{
HICON icon1 = LoadIconEx(I_OVERLAY);
diff --git a/plugins/AvatarHistory/src/options.cpp b/plugins/AvatarHistory/src/options.cpp index 7044b2122f..f38ba519fa 100644 --- a/plugins/AvatarHistory/src/options.cpp +++ b/plugins/AvatarHistory/src/options.cpp @@ -133,7 +133,7 @@ static INT_PTR CALLBACK PopupsDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA op.popup_use_win_colors = IsDlgButtonChecked(hwndDlg, IDC_WINCOLORS) != 0;
op.popup_use_default_colors = IsDlgButtonChecked(hwndDlg, IDC_DEFAULTCOLORS) != 0;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
ShowTestPopup(hContact,TranslateT("Test Contact"), TranslateT("Test description"), &op);
break;
}
diff --git a/plugins/AvatarHistory/src/popup.cpp b/plugins/AvatarHistory/src/popup.cpp index ed36550961..af2de3d9ad 100644 --- a/plugins/AvatarHistory/src/popup.cpp +++ b/plugins/AvatarHistory/src/popup.cpp @@ -62,18 +62,18 @@ void ShowErrPopup(const TCHAR *description, const TCHAR *title) }
-void ShowTestPopup(HCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op)
+void ShowTestPopup(MCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op)
{
ShowPopupEx(hContact, title, description, NULL, POPUP_TYPE_TEST, op);
}
-void ShowPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description)
+void ShowPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description)
{
ShowPopupEx(hContact, title, description, (void*)hContact, POPUP_TYPE_NORMAL, &opts);
}
-void ShowDebugPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description)
+void ShowDebugPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description)
{
if (db_get_b(NULL,MODULE_NAME,"Debug",0))
{
@@ -89,7 +89,7 @@ typedef struct PopupDataType;
// Show an popup
-void ShowPopupEx(HCONTACT hContact, const TCHAR *title, const TCHAR *description,
+void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description,
void *plugin_data, int type, const Options *op)
{
if (ServiceExists(MS_POPUP_ADDPOPUPT))
diff --git a/plugins/AvatarHistory/src/popup.h b/plugins/AvatarHistory/src/popup.h index 6738f7d577..edc08e5bcb 100644 --- a/plugins/AvatarHistory/src/popup.h +++ b/plugins/AvatarHistory/src/popup.h @@ -54,16 +54,16 @@ void DeInitPopups(); #define POPUP_TYPE_ERROR 2
// Show an popup
-void ShowPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description);
-void ShowDebugPopup(HCONTACT hContact, const TCHAR *title, const TCHAR *description);
+void ShowPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description);
+void ShowDebugPopup(MCONTACT hContact, const TCHAR *title, const TCHAR *description);
// Show an test
-void ShowTestPopup(HCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op);
+void ShowTestPopup(MCONTACT hContact,const TCHAR *title, const TCHAR *description, const Options *op);
// Show an error popup
void ShowErrPopup(const char *description, const char *title = NULL);
-void ShowPopupEx(HCONTACT hContact, const TCHAR *title, const TCHAR *description,
+void ShowPopupEx(MCONTACT hContact, const TCHAR *title, const TCHAR *description,
void *plugin_data, int type, const Options *op);
diff --git a/plugins/AvatarHistory/src/utils.cpp b/plugins/AvatarHistory/src/utils.cpp index 3d0bd65ec3..57e30f163a 100644 --- a/plugins/AvatarHistory/src/utils.cpp +++ b/plugins/AvatarHistory/src/utils.cpp @@ -34,7 +34,7 @@ BOOL ProtocolEnabled(const char *proto) return (BOOL) db_get_b(NULL, MODULE_NAME, setting, TRUE);
}
-BOOL ContactEnabled(HCONTACT hContact, char *setting, int def)
+BOOL ContactEnabled(MCONTACT hContact, char *setting, int def)
{
if (hContact == NULL)
return FALSE;
@@ -77,7 +77,7 @@ void ConvertToFilename(TCHAR *str, size_t size) }
}
-int GetUIDFromHContact(HCONTACT contact, TCHAR* uinout, int uinout_len)
+int GetUIDFromHContact(MCONTACT contact, TCHAR* uinout, int uinout_len)
{
bool found = true;
@@ -138,7 +138,7 @@ TCHAR* GetProtocolFolder(TCHAR *fn, char *proto) return fn;
}
-TCHAR* GetContactFolder(TCHAR *fn, HCONTACT hContact)
+TCHAR* GetContactFolder(TCHAR *fn, MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
GetProtocolFolder(fn, proto);
@@ -158,7 +158,7 @@ TCHAR* GetContactFolder(TCHAR *fn, HCONTACT hContact) return fn;
}
-TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact)
+TCHAR* GetOldStyleAvatarName(TCHAR *fn, MCONTACT hContact)
{
GetContactFolder(fn, hContact);
@@ -172,7 +172,7 @@ TCHAR* GetOldStyleAvatarName(TCHAR *fn, HCONTACT hContact) return fn;
}
-void CreateOldStyleShortcut(HCONTACT hContact, TCHAR *history_filename)
+void CreateOldStyleShortcut(MCONTACT hContact, TCHAR *history_filename)
{
TCHAR shortcut[MAX_PATH] = _T("");
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp index c02fe931d7..b12e7c8347 100644 --- a/plugins/BasicHistory/src/BasicHistory.cpp +++ b/plugins/BasicHistory/src/BasicHistory.cpp @@ -76,7 +76,7 @@ INT_PTR ExecuteTaskService(WPARAM wParam, LPARAM lParam); int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- int count = EventList::GetContactMessageNumber((HCONTACT)wParam);
+ int count = EventList::GetContactMessageNumber((MCONTACT)wParam);
bool isInList = HistoryWindow::IsInList(GetForegroundWindow());
Menu_ShowItem(hContactMenu, count != 0);
@@ -196,7 +196,7 @@ HICON LoadIconEx(int iconId, int big) INT_PTR ShowContactHistory(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HistoryWindow::Open(hContact);
return 0;
}
@@ -210,7 +210,7 @@ int PreShutdownHistoryModule(WPARAM, LPARAM) int HistoryContactDelete(WPARAM wParam, LPARAM)
{
- HistoryWindow::Close((HCONTACT)wParam);
+ HistoryWindow::Close((MCONTACT)wParam);
return 0;
}
diff --git a/plugins/BasicHistory/src/BinaryExport.cpp b/plugins/BasicHistory/src/BinaryExport.cpp index 5a506d9791..b1dfa52047 100644 --- a/plugins/BasicHistory/src/BinaryExport.cpp +++ b/plugins/BasicHistory/src/BinaryExport.cpp @@ -22,8 +22,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define EXP_FILE (*((std::ofstream*)IExport::stream))
#define IMP_FILE (*((std::ifstream*)IImport::stream))
-std::wstring GetProtocolName(HCONTACT hContact);
-std::wstring GetContactId(HCONTACT hContact);
+std::wstring GetProtocolName(MCONTACT hContact);
+std::wstring GetContactId(MCONTACT hContact);
#pragma pack(push, 1)
@@ -158,7 +158,7 @@ bool ReadHeader(BinaryFileHeader& header, std::istream* stream) return true;
}
-int BinaryExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
+int BinaryExport::IsContactInFile(const std::vector<MCONTACT>& contacts)
{
BinaryFileHeader header;
if (!ReadHeader(header, IImport::stream))
diff --git a/plugins/BasicHistory/src/BinaryExport.h b/plugins/BasicHistory/src/BinaryExport.h index 493e707088..974ac83b7b 100644 --- a/plugins/BasicHistory/src/BinaryExport.h +++ b/plugins/BasicHistory/src/BinaryExport.h @@ -34,7 +34,7 @@ public: virtual void WriteFooter();
virtual void WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText);
virtual void WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei);
- virtual int IsContactInFile(const std::vector<HCONTACT>& contacts);
+ virtual int IsContactInFile(const std::vector<MCONTACT>& contacts);
virtual bool GetEventList(std::vector<IImport::ExternalMessage>& eventList);
virtual ~BinaryExport();
diff --git a/plugins/BasicHistory/src/DatExport.cpp b/plugins/BasicHistory/src/DatExport.cpp index c0882ddc61..43809f6f58 100644 --- a/plugins/BasicHistory/src/DatExport.cpp +++ b/plugins/BasicHistory/src/DatExport.cpp @@ -23,8 +23,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define EXP_FILE (*((std::ofstream*)IExport::stream))
#define IMP_FILE (*((std::ifstream*)IImport::stream))
-std::wstring GetProtocolName(HCONTACT hContact);
-std::wstring GetContactId(HCONTACT hContact);
+std::wstring GetProtocolName(MCONTACT hContact);
+std::wstring GetContactId(MCONTACT hContact);
#pragma pack(push, 1)
@@ -128,7 +128,7 @@ bool ReadHeader(MCHeader& header, std::istream* stream) return true;
}
-int DatExport::IsContactInFile(const std::vector<HCONTACT>& contacts)
+int DatExport::IsContactInFile(const std::vector<MCONTACT>& contacts)
{
MCHeader header;
if (!ReadHeader(header, IImport::stream))
diff --git a/plugins/BasicHistory/src/DatExport.h b/plugins/BasicHistory/src/DatExport.h index 9609a994f6..745626d02b 100644 --- a/plugins/BasicHistory/src/DatExport.h +++ b/plugins/BasicHistory/src/DatExport.h @@ -34,7 +34,7 @@ public: virtual void WriteFooter();
virtual void WriteGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText);
virtual void WriteMessage(bool isMe, const std::wstring &longDate, const std::wstring &shortDate, const std::wstring &user, const std::wstring &message, const DBEVENTINFO& dbei);
- virtual int IsContactInFile(const std::vector<HCONTACT>& contacts);
+ virtual int IsContactInFile(const std::vector<MCONTACT>& contacts);
virtual bool GetEventList(std::vector<IImport::ExternalMessage>& eventList);
DatExport()
@@ -45,7 +45,7 @@ public: virtual ~DatExport();
private:
int dataSize;
- HCONTACT hContact;
+ MCONTACT hContact;
std::string memBuf;
inline int WriteString(const std::wstring &str);
//inline bool ReadString(std::wstring &str, int size);
diff --git a/plugins/BasicHistory/src/EventList.cpp b/plugins/BasicHistory/src/EventList.cpp index e354353c89..d0f63d679e 100644 --- a/plugins/BasicHistory/src/EventList.cpp +++ b/plugins/BasicHistory/src/EventList.cpp @@ -40,7 +40,7 @@ EventList::EventList() goldBlobSize = 0;
}
-EventList::EventList(HCONTACT _hContact, int filter)
+EventList::EventList(MCONTACT _hContact, int filter)
:hWnd(NULL),
isWnd(false),
hContact(_hContact),
@@ -188,7 +188,7 @@ std::wstring EventList::GetFilterName() return filterName;
}
-void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HCONTACT _hContact)
+void EventList::GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _hContact)
{
bool isWndLocal = isWnd;
EventTempIndex ti;
@@ -237,7 +237,7 @@ void EventList::RefreshEventList() std::vector<IImport::ExternalMessage> messages;
EnterCriticalSection(&criticalSection);
- std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -299,7 +299,7 @@ void EventList::RefreshEventList() }
}
-bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
+bool EventList::SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun)
{
InitFilters();
@@ -307,7 +307,7 @@ bool EventList::SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInt std::vector<IImport::ExternalMessage> messages;
EnterCriticalSection(&criticalSection);
- std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
ExportManager imp(hWnd, hContact, 1);
imp.SetAutoImport(it->second.file);
@@ -431,7 +431,7 @@ std::wstring EventList::GetMyName() return myName;
}
-inline std::wstring GetProtocolName(HCONTACT hContact)
+inline std::wstring GetProtocolName(MCONTACT hContact)
{
char* ac = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
std::wstring proto1;
@@ -471,7 +471,7 @@ std::wstring EventList::GetMyId() return myId;
}
-inline std::wstring GetContactId(HCONTACT hContact)
+inline std::wstring GetContactId(MCONTACT hContact)
{
std::wstring id;
CONTACTINFO ci;
@@ -640,10 +640,10 @@ void EventList::RebuildGroup(int selected) }
CRITICAL_SECTION EventList::criticalSection;
-std::map<HCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
+std::map<MCONTACT, EventList::ImportDiscData> EventList::contactFileMap;
std::wstring EventList::contactFileDir;
-void EventList::AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file)
+void EventList::AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file)
{
EnterCriticalSection(&criticalSection);
TCHAR buf[32];
@@ -673,11 +673,11 @@ void EventList::Deinit() DeleteCriticalSection(&EventList::criticalSection);
}
-int EventList::GetContactMessageNumber(HCONTACT hContact)
+int EventList::GetContactMessageNumber(MCONTACT hContact)
{
int count = db_event_count(hContact);
EnterCriticalSection(&criticalSection);
- std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
++count;
@@ -685,11 +685,11 @@ int EventList::GetContactMessageNumber(HCONTACT hContact) return count;
}
-bool EventList::IsImportedHistory(HCONTACT hContact)
+bool EventList::IsImportedHistory(MCONTACT hContact)
{
bool count = false;
EnterCriticalSection(&criticalSection);
- std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end())
count = true;
@@ -697,10 +697,10 @@ bool EventList::IsImportedHistory(HCONTACT hContact) return count;
}
-void EventList::DeleteImporter(HCONTACT hContact)
+void EventList::DeleteImporter(MCONTACT hContact)
{
EnterCriticalSection(&criticalSection);
- std::map<HCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
+ std::map<MCONTACT, EventList::ImportDiscData>::iterator it = contactFileMap.find(hContact);
if (it != contactFileMap.end()) {
DeleteFile(it->second.file.c_str());
contactFileMap.erase(it);
diff --git a/plugins/BasicHistory/src/EventList.h b/plugins/BasicHistory/src/EventList.h index 35d675e4d4..d2640a185e 100644 --- a/plugins/BasicHistory/src/EventList.h +++ b/plugins/BasicHistory/src/EventList.h @@ -72,7 +72,7 @@ private: std::wstring file;
};
- static std::map<HCONTACT, ImportDiscData> contactFileMap;
+ static std::map<MCONTACT, ImportDiscData> contactFileMap;
static std::wstring contactFileDir;
bool CanShowHistory(DBEVENTINFO* dbei);
@@ -80,7 +80,7 @@ private: void InitFilters();
void InitNames();
void AddGroup(const EventIndex& ev);
- void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, HCONTACT _hContact);
+ void GetTempList(std::list<EventTempIndex>& tempList, bool noFilter, bool noExt, MCONTACT _hContact);
void ImportMessages(const std::vector<IImport::ExternalMessage>& messages);
protected:
TCHAR contactName[256];
@@ -102,11 +102,11 @@ protected: void RebuildGroup(int selected);
public:
EventList();
- EventList(HCONTACT _hContact, int filter);
+ EventList(MCONTACT _hContact, int filter);
~EventList();
HWND hWnd;
- HCONTACT hContact;
+ MCONTACT hContact;
std::vector<std::deque<EventIndex> > eventList;
bool useImportedMessages;
@@ -116,7 +116,7 @@ public: int GetFilterNr();
std::wstring GetFilterName();
void RefreshEventList();
- bool SearchInContact(HCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun);
+ bool SearchInContact(MCONTACT hContact, TCHAR *strFind, ComparatorInterface* compFun);
std::wstring GetContactName();
std::wstring GetMyName();
std::wstring GetProtocolName();
@@ -124,10 +124,10 @@ public: std::wstring GetContactId();
std::string GetBaseProtocol();
void MargeMessages(const std::vector<IImport::ExternalMessage>& messages);
- static void AddImporter(HCONTACT hContact, IImport::ImportType type, const std::wstring& file);
- static int GetContactMessageNumber(HCONTACT hContact);
- static bool IsImportedHistory(HCONTACT hContact);
- static void DeleteImporter(HCONTACT hContact);
+ static void AddImporter(MCONTACT hContact, IImport::ImportType type, const std::wstring& file);
+ static int GetContactMessageNumber(MCONTACT hContact);
+ static bool IsImportedHistory(MCONTACT hContact);
+ static void DeleteImporter(MCONTACT hContact);
static void GetObjectDescription( DBEVENTINFO *dbei, TCHAR* str, int cbStr );
bool GetEventData(const EventIndex& ev, EventData& data);
void GetExtEventDBei(const EventIndex& ev);
diff --git a/plugins/BasicHistory/src/ExportManager.cpp b/plugins/BasicHistory/src/ExportManager.cpp index 30453b10a9..bbe33581a0 100644 --- a/plugins/BasicHistory/src/ExportManager.cpp +++ b/plugins/BasicHistory/src/ExportManager.cpp @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "Options.h"
#include "codecvt_CodePage.h"
-ExportManager::ExportManager(HWND _hwnd, HCONTACT _hContact, int filter) :
+ExportManager::ExportManager(HWND _hwnd, MCONTACT _hContact, int filter) :
EventList(_hContact, filter),
hwnd(_hwnd),
oldOnTop(false)
@@ -196,7 +196,7 @@ const TCHAR* ExportManager::GetExt(IImport::ImportType type) return ext;
}
-int ExportManager::Import(IImport::ImportType type, const std::vector<HCONTACT>& contacts)
+int ExportManager::Import(IImport::ImportType type, const std::vector<MCONTACT>& contacts)
{
IImport* imp = NULL;
switch(type) {
@@ -233,7 +233,7 @@ int ExportManager::Import(IImport::ImportType type, const std::vector<HCONTACT>& return t;
}
-bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<HCONTACT>* contacts)
+bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err, bool* differentContact, std::vector<MCONTACT>* contacts)
{
IImport* imp = NULL;
switch(type) {
@@ -258,7 +258,7 @@ bool ExportManager::Import(IImport::ImportType type, std::vector<IImport::Extern return false;
imp->SetStream(stream);
- std::vector<HCONTACT> v;
+ std::vector<MCONTACT> v;
v.push_back(hContact);
bool ret = true;
int contInFile = imp->IsContactInFile(v);
diff --git a/plugins/BasicHistory/src/ExportManager.h b/plugins/BasicHistory/src/ExportManager.h index c0a3a8acf7..09fa0c697b 100644 --- a/plugins/BasicHistory/src/ExportManager.h +++ b/plugins/BasicHistory/src/ExportManager.h @@ -30,7 +30,7 @@ private: protected:
virtual void AddGroup(bool isMe, const std::wstring &time, const std::wstring &user, const std::wstring &eventText, int ico);
public:
- ExportManager(HWND _hwnd, HCONTACT _hContact, int filter);
+ ExportManager(HWND _hwnd, MCONTACT _hContact, int filter);
void SetAutoExport(const std::wstring _file, int _deltaTime, DWORD _now)
{
@@ -52,8 +52,8 @@ public: bool Export(IExport::ExportType type);
void SetDeleteWithoutExportEvents(int _deltaTime, DWORD _now);
void DeleteExportedEvents();
- int Import(IImport::ImportType type, const std::vector<HCONTACT>& contacts);
- bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<HCONTACT>* contacts = NULL);
+ int Import(IImport::ImportType type, const std::vector<MCONTACT>& contacts);
+ bool Import(IImport::ImportType type, std::vector<IImport::ExternalMessage>& eventList, std::wstring* err = NULL, bool* differentContact = NULL, std::vector<MCONTACT>* contacts = NULL);
static const TCHAR* GetExt(IImport::ImportType type);
};
diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 7d95ac81e7..4d1687a101 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -38,7 +38,7 @@ extern IconItem iconList[]; void ResetCList(HWND hWnd);
-HistoryWindow::HistoryWindow(HCONTACT _hContact) :
+HistoryWindow::HistoryWindow(MCONTACT _hContact) :
isDestroyed(true),
splitterY(0),
splitterOrgY(0),
@@ -112,23 +112,23 @@ HistoryWindow::~HistoryWindow() DeleteObject(bkFindBrush);
}
-std::map<HCONTACT, HistoryWindow*> HistoryWindow::windows;
+std::map<MCONTACT, HistoryWindow*> HistoryWindow::windows;
std::vector<HistoryWindow*> HistoryWindow::freeWindows;
void HistoryWindow::Deinit()
{
bool destroyed = true;
- std::vector<HCONTACT> keys;
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ std::vector<MCONTACT> keys;
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
keys.push_back(it->first);
}
}
- for (std::vector<HCONTACT>::iterator it = keys.begin(); it != keys.end(); ++it)
+ for (std::vector<MCONTACT>::iterator it = keys.begin(); it != keys.end(); ++it)
{
- std::map<HCONTACT, HistoryWindow*>::iterator it1 = windows.find(*it);
+ std::map<MCONTACT, HistoryWindow*>::iterator it1 = windows.find(*it);
if (it1 != windows.end())
{
DestroyWindow(it1->second->hWnd);
@@ -160,7 +160,7 @@ void HistoryWindow::Deinit() if (destroyed)
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
delete it->second;
}
@@ -176,7 +176,7 @@ void HistoryWindow::Deinit() }
}
-void HistoryWindow::Open(HCONTACT hContact)
+void HistoryWindow::Open(MCONTACT hContact)
{
if (hContact == NULL)
{
@@ -186,7 +186,7 @@ void HistoryWindow::Open(HCONTACT hContact) }
else
{
- std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end())
{
it->second->Focus();
@@ -199,9 +199,9 @@ void HistoryWindow::Open(HCONTACT hContact) }
}
-void HistoryWindow::Close(HCONTACT hContact)
+void HistoryWindow::Close(MCONTACT hContact)
{
- std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end())
{
if (it->second->isDestroyed)
@@ -223,7 +223,7 @@ void HistoryWindow::Close(HistoryWindow* historyWindow) DestroyWindow(historyWindow->hWnd);
return;
}
- std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
+ std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
if (it != windows.end() && it->second == historyWindow)
{
delete it->second;
@@ -243,11 +243,11 @@ void HistoryWindow::Close(HistoryWindow* historyWindow) }
}
-void HistoryWindow::RebuildEvents(HCONTACT hContact)
+void HistoryWindow::RebuildEvents(MCONTACT hContact)
{
if (hContact != NULL)
{
- std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
+ std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(hContact);
if (it != windows.end() && !it->second->isDestroyed)
{
SendMessage(it->second->hWnd,DM_HREBUILD,0,0);
@@ -265,7 +265,7 @@ void HistoryWindow::RebuildEvents(HCONTACT hContact) void HistoryWindow::ChangeToFreeWindow(HistoryWindow* historyWindow)
{
- std::map<HCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
+ std::map<MCONTACT, HistoryWindow*>::iterator it = windows.find(historyWindow->hContact);
if (it != windows.end() && it->second == historyWindow)
{
windows.erase(it);
@@ -294,7 +294,7 @@ void HistoryWindow::Focus() int HistoryWindow::FontsChanged(WPARAM wParam, LPARAM lParam)
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -345,7 +345,7 @@ void OptionsGroupChanged() void HistoryWindow::OptionsGroupChanged()
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -371,7 +371,7 @@ void OptionsMainChanged() void HistoryWindow::OptionsMainChanged()
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -406,7 +406,7 @@ void OptionsSearchingChanged() void HistoryWindow::OptionsSearchingChanged()
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -427,7 +427,7 @@ void HistoryWindow::OptionsSearchingChanged() INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = NULL;
int start = 0;
int end = 0;
@@ -435,7 +435,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) if (!count)
return FALSE;
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
{
if (!it->second->isDestroyed)
{
@@ -495,7 +495,7 @@ INT_PTR HistoryWindow::DeleteAllUserHistory(WPARAM wParam, LPARAM) bool HistoryWindow::IsInList(HWND hWnd)
{
- for (std::map<HCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
+ for (std::map<MCONTACT, HistoryWindow*>::iterator it = windows.begin(); it != windows.end(); ++it)
if (!it->second->isDestroyed)
if (it->second->hWnd == hWnd)
return true;
@@ -568,18 +568,18 @@ void OpenOptions(char* group, char* page, char* tab = NULL) class ShowMessageData
{
public:
- ShowMessageData(HCONTACT _hContact)
+ ShowMessageData(MCONTACT _hContact)
:hContact(_hContact)
{
}
- ShowMessageData(HCONTACT _hContact, const std::wstring &_str)
+ ShowMessageData(MCONTACT _hContact, const std::wstring &_str)
:hContact(_hContact),
str(_str)
{
}
- HCONTACT hContact;
+ MCONTACT hContact;
std::wstring str;
};
@@ -1643,7 +1643,7 @@ void HistoryWindow::ReloadContacts() cii.cbSize = sizeof(cii);
cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS;
cii.pszText = TranslateT("System");
- hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
+ hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
}
}
else
@@ -1655,7 +1655,7 @@ void HistoryWindow::ReloadContacts() }
}
- for (HCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
+ for (MCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
if (EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || db_get_b(_hContact, metaContactProto, "IsSubcontact", 0) == 0)) {
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
if (hItem == NULL)
@@ -1779,7 +1779,7 @@ bool HistoryWindow::DoHotkey(UINT msg, LPARAM lParam, WPARAM wParam, int window) void HistoryWindow::RestorePos()
{
- HCONTACT contactToLoad = hContact;
+ MCONTACT contactToLoad = hContact;
if (hContact == NULL) {
Utils_RestoreWindowPosition(hWnd,NULL,MODULE,"history_");
contactToLoad = NULL;
@@ -1803,9 +1803,9 @@ void HistoryWindow::RestorePos() void HistoryWindow::SavePos(bool all)
{
- HCONTACT contactToSave = hContact;
+ MCONTACT contactToSave = hContact;
if (all) {
- for (HCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
+ for (MCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) {
db_unset(_hContact, MODULE, "history_x");
db_unset(_hContact, MODULE, "history_y");
db_unset(_hContact, MODULE, "history_width");
@@ -2027,13 +2027,13 @@ void HistoryWindow::DoImport(IImport::ImportType type) ExportManager exp(hWnd, hContact, GetFilterNr());
std::vector<IImport::ExternalMessage> messages;
std::wstring err;
- std::vector<HCONTACT> contacts;
+ std::vector<MCONTACT> contacts;
- for (HCONTACT _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
+ for (MCONTACT _hContact = db_find_first(); _hContact != NULL; _hContact = db_find_next(_hContact))
contacts.push_back(_hContact);
bool changeContact = false;
- HCONTACT lastContact = hContact;
+ MCONTACT lastContact = hContact;
int i = 1;
do
{
@@ -2173,7 +2173,7 @@ bool HistoryWindow::ContactChanged(bool sync) {
if (!isLoading)
{
- HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETSELECTION, 0, 0);
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETSELECTION, 0, 0);
if (hItem != NULL) {
int typeOf = SendDlgItemMessage(hWnd, IDC_LIST_CONTACTS, CLM_GETITEMTYPE,(WPARAM)hItem,0);
if (typeOf == CLCIT_CONTACT) {
@@ -2256,11 +2256,11 @@ void HistoryWindow::FormatQuote(std::wstring& quote, const MessageData& md, cons while(f > 0 && f < (int)msg.length());
}
-HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder)
+MCONTACT HistoryWindow::GetNextContact(MCONTACT hContact, int adder)
{
HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
bool find = false;
- HCONTACT _hContact;
+ MCONTACT _hContact;
if (adder > 0) {
if (hContact != NULL) {
_hContact = db_find_next(hContact);
@@ -2294,7 +2294,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder) }
}
else {
- HCONTACT lastContact = NULL;
+ MCONTACT lastContact = NULL;
_hContact = db_find_first();
while(_hContact && _hContact != hContact) {
HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0);
@@ -2333,7 +2333,7 @@ HCONTACT HistoryWindow::GetNextContact(HCONTACT hContact, int adder) return hContact;
}
-void HistoryWindow::SelectContact(HCONTACT _hContact)
+void HistoryWindow::SelectContact(MCONTACT _hContact)
{
if (hContact != _hContact) {
HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS);
diff --git a/plugins/BasicHistory/src/HistoryWindow.h b/plugins/BasicHistory/src/HistoryWindow.h index 339866edf4..d21403f421 100644 --- a/plugins/BasicHistory/src/HistoryWindow.h +++ b/plugins/BasicHistory/src/HistoryWindow.h @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class HistoryWindow : public SearchContext
{
private:
- HistoryWindow(HCONTACT _hContact);
+ HistoryWindow(MCONTACT _hContact);
void Initialise();
void Destroy();
void SplitterMoved(HWND splitter, LONG pos, bool screenPos);
@@ -49,7 +49,7 @@ private: void ReloadMainOptions();
void DoImport(IImport::ImportType type);
- static std::map<HCONTACT, HistoryWindow*> windows;
+ static std::map<MCONTACT, HistoryWindow*> windows;
static std::vector<HistoryWindow*> freeWindows;
bool isDestroyed;
LONG splitterY;
@@ -67,7 +67,7 @@ private: HIMAGELIST himlSmall, himlNone;
HBRUSH bkBrush;
HBRUSH bkFindBrush;
- HCONTACT hSystem;
+ MCONTACT hSystem;
HWND splitterXhWnd, splitterYhWnd;
bool isStartSelect;
protected:
@@ -75,9 +75,9 @@ protected: public:
~HistoryWindow();
static void Deinit();
- static void Open(HCONTACT hContact);
- static void Close(HCONTACT hContact);
- static void RebuildEvents(HCONTACT hContact);
+ static void Open(MCONTACT hContact);
+ static void Close(MCONTACT hContact);
+ static void RebuildEvents(MCONTACT hContact);
static bool IsInList(HWND hWnd);
static int FontsChanged(WPARAM wParam, LPARAM lParam);
static INT_PTR DeleteAllUserHistory(WPARAM wParam, LPARAM lParam);
@@ -89,7 +89,7 @@ public: // SearchContext interface
virtual void SelectEventGroup(int sel);
- virtual HCONTACT GetNextContact(HCONTACT hContact, int adder);
- virtual void SelectContact(HCONTACT _hContact);
+ virtual MCONTACT GetNextContact(MCONTACT hContact, int adder);
+ virtual void SelectContact(MCONTACT _hContact);
};
diff --git a/plugins/BasicHistory/src/IImport.h b/plugins/BasicHistory/src/IImport.h index 6fc3b6f340..84a65c15f2 100644 --- a/plugins/BasicHistory/src/IImport.h +++ b/plugins/BasicHistory/src/IImport.h @@ -43,7 +43,7 @@ public: }
virtual const TCHAR* GetExt() = 0;
- virtual int IsContactInFile(const std::vector<HCONTACT>& contacts) = 0;
+ virtual int IsContactInFile(const std::vector<MCONTACT>& contacts) = 0;
virtual bool GetEventList(std::vector<ExternalMessage>& eventList) = 0;
virtual ~IImport()
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp index f61be22121..202f25e69c 100644 --- a/plugins/BasicHistory/src/Options.cpp +++ b/plugins/BasicHistory/src/Options.cpp @@ -562,7 +562,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks) db_set_s(0, MODULE, buf, it->zipPassword.c_str());
mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_unset(hContact, MODULE, buf);
for (size_t j = 0; j < it->contacts.size(); ++j)
@@ -617,7 +617,7 @@ void Options::SaveTasks(std::list<TaskOptions>* tasks) db_unset(NULL, MODULE, buf);
mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_unset(hContact, MODULE, buf);
}
@@ -705,7 +705,7 @@ void Options::LoadTasks() }
mir_snprintf(buf, SIZEOF(buf), "IsInTask_%d", i);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, MODULE, buf, 0) == 1)
to.contacts.push_back(hContact);
@@ -1568,7 +1568,7 @@ void ResetListOptions(HWND hwnd) SendMessage(hwnd, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
-void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
+void RebuildList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
{
HANDLE hItem;
if (to->isSystem && hSystem)
@@ -1581,13 +1581,13 @@ void RebuildList(HWND hwnd, HCONTACT hSystem, TaskOptions* to) }
}
-void SaveList(HWND hwnd, HCONTACT hSystem, TaskOptions* to)
+void SaveList(HWND hwnd, MCONTACT hSystem, TaskOptions* to)
{
to->contacts.clear();
if (hSystem)
to->isSystem = SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM)hSystem, 0) != 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendMessage(hwnd, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem && SendMessage(hwnd, CLM_GETCHECKMARK, (WPARAM) hItem, 0))
to->contacts.push_back(hContact);
@@ -1602,7 +1602,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top = NULL, std::wstri INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hSystem;
+ static MCONTACT hSystem;
switch(msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
@@ -1738,7 +1738,7 @@ INT_PTR CALLBACK Options::DlgProcOptsTask(HWND hwndDlg, UINT msg, WPARAM wParam, cii.cbSize = sizeof(cii);
cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX | CLCIIF_BELOWCONTACTS;
cii.pszText = TranslateT("System");
- hSystem = (HCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
+ hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii);
SendMessage(contactList, CLM_AUTOREBUILD, 0, 0);
ResetListOptions(contactList);
RebuildList(contactList, hSystem, to);
diff --git a/plugins/BasicHistory/src/Options.h b/plugins/BasicHistory/src/Options.h index 99da9d7908..d4e13a60d4 100644 --- a/plugins/BasicHistory/src/Options.h +++ b/plugins/BasicHistory/src/Options.h @@ -92,7 +92,7 @@ struct TaskOptions std::wstring filePath;
std::wstring taskName;
std::string zipPassword; // char* because zip file using ANSI password
- std::vector<HCONTACT> contacts;
+ std::vector<MCONTACT> contacts;
TaskOptions()
{
forceExecute = false;
diff --git a/plugins/BasicHistory/src/Scheduler.cpp b/plugins/BasicHistory/src/Scheduler.cpp index dcd9dd5593..4b18ae58c3 100644 --- a/plugins/BasicHistory/src/Scheduler.cpp +++ b/plugins/BasicHistory/src/Scheduler.cpp @@ -219,7 +219,7 @@ bool IsValidTask(TaskOptions& to, std::list<TaskOptions>* top, std::wstring* err static void CALLBACK DoRebuildEventsInMainAPCFunc(ULONG_PTR dwParam)
{
- HCONTACT *contacts = (HCONTACT*)dwParam;
+ MCONTACT *contacts = (MCONTACT*)dwParam;
size_t size = (size_t)contacts[0];
for (size_t i = 1; i <= size; ++i)
HistoryWindow::RebuildEvents(contacts[i]);
@@ -277,7 +277,7 @@ bool DoTask(TaskOptions& to) std::wstring filePath = to.filePath;
std::wstring dir;
std::list<std::wstring> files;
- std::vector<HCONTACT> contacts;
+ std::vector<MCONTACT> contacts;
if (to.useFtp || to.compress) {
std::map<std::wstring, bool> existingContacts;
TCHAR temp[MAX_PATH];
@@ -352,7 +352,7 @@ bool DoTask(TaskOptions& to) }
if (!error) {
- std::list<HCONTACT> contactList;
+ std::list<MCONTACT> contactList;
for (std::list<std::wstring>::iterator it = files.begin(); it != files.end(); ++it) {
mExp.SetAutoImport(*it);
int ret = mExp.Import(to.importType, contacts);
@@ -410,10 +410,10 @@ bool DoTask(TaskOptions& to) }
if (contactList.size() > 0) {
- HCONTACT *contacts = new HCONTACT[contactList.size() + 1];
- contacts[0] = (HCONTACT)contactList.size();
+ MCONTACT *contacts = new MCONTACT[contactList.size() + 1];
+ contacts[0] = (MCONTACT)contactList.size();
int i = 1;
- for (std::list<HCONTACT>::iterator it = contactList.begin(); it != contactList.end(); ++it)
+ for (std::list<MCONTACT>::iterator it = contactList.begin(); it != contactList.end(); ++it)
contacts[i++] = *it;
QueueUserAPC(DoRebuildEventsInMainAPCFunc, g_hMainThread, (ULONG_PTR) contacts);
diff --git a/plugins/BasicHistory/src/SearchContext.h b/plugins/BasicHistory/src/SearchContext.h index 4c9e6f04dc..3e26475e2f 100644 --- a/plugins/BasicHistory/src/SearchContext.h +++ b/plugins/BasicHistory/src/SearchContext.h @@ -29,8 +29,8 @@ public: int selected;
virtual void SelectEventGroup(int sel) = 0;
- virtual HCONTACT GetNextContact(HCONTACT hContact, int adder) = 0;
- virtual void SelectContact(HCONTACT _hContact) = 0;
+ virtual MCONTACT GetNextContact(MCONTACT hContact, int adder) = 0;
+ virtual void SelectContact(MCONTACT _hContact) = 0;
struct MessageData
{
diff --git a/plugins/BasicHistory/src/Searcher.cpp b/plugins/BasicHistory/src/Searcher.cpp index 4a1ed6dce1..1e78b2750e 100644 --- a/plugins/BasicHistory/src/Searcher.cpp +++ b/plugins/BasicHistory/src/Searcher.cpp @@ -223,7 +223,7 @@ void Searcher::Find() if (sel < 0) {
isFindContactChanged = true;
if (allUsers) {
- HCONTACT hNext = context->hContact;
+ MCONTACT hNext = context->hContact;
do
{
hNext = context->GetNextContact(hNext, adder2);
@@ -237,7 +237,7 @@ void Searcher::Find() else if (sel >= (int)context->eventList.size()) {
isFindContactChanged = true;
if (allUsers) {
- HCONTACT hNext = context->hContact;
+ MCONTACT hNext = context->hContact;
do
{
hNext = context->GetNextContact(hNext, adder2);
diff --git a/plugins/BasicHistory/src/Searcher.h b/plugins/BasicHistory/src/Searcher.h index e8ce263f11..a3229da1f5 100644 --- a/plugins/BasicHistory/src/Searcher.h +++ b/plugins/BasicHistory/src/Searcher.h @@ -26,7 +26,7 @@ private: int lastFindSelection;
int startFindPos;
int startFindSel;
- HCONTACT startFindContact;
+ MCONTACT startFindContact;
bool isFindSelChanged;
bool isFindContactChanged;
bool findBack, matchCase, matchWholeWords, onlyIn, onlyOut, onlyGroup, allUsers, searchForInLG, searchForInMes;
diff --git a/plugins/Boltun/src/Engine/TalkEngine.cpp b/plugins/Boltun/src/Engine/TalkEngine.cpp index d771012a5f..3fe283c64a 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.cpp +++ b/plugins/Boltun/src/Engine/TalkEngine.cpp @@ -76,7 +76,7 @@ TalkBot::TalkBot(const Mind& goodMind) :mind(goodMind), beSilent(false), makeLowercase(false),
understandAlways(false)
{
- contactDatas = new PerContactData<Mind, ContactData, HCONTACT>(mind);
+ contactDatas = new PerContactData<Mind, ContactData, MCONTACT>(mind);
}
TalkBot::~TalkBot()
@@ -84,7 +84,7 @@ TalkBot::~TalkBot() delete contactDatas;
}
-tstring TalkBot::GetInitMessage(HCONTACT contact)
+tstring TalkBot::GetInitMessage(MCONTACT contact)
{
ContactData* d = contactDatas->GetData(contact);
tstring s = d->initial.GetString();
@@ -272,7 +272,7 @@ tstring TalkBot::AllReplies(const tstring &incomingMessage, ContactData *contact return tstring();
}
-TalkBot::MessageInfo* TalkBot::Reply(HCONTACT contact, tstring incomingMessage, bool saveChoice)
+TalkBot::MessageInfo* TalkBot::Reply(MCONTACT contact, tstring incomingMessage, bool saveChoice)
{
TCHAR* str = new TCHAR[incomingMessage.length()+1];
_tcscpy(str, incomingMessage.c_str());
@@ -370,7 +370,7 @@ bool TalkBot::FindExact(ContactData *contactData, const tstring &incomingMessage return true;
}
-void TalkBot::AnswerGiven(HCONTACT contact, const TalkBot::MessageInfo& info)
+void TalkBot::AnswerGiven(MCONTACT contact, const TalkBot::MessageInfo& info)
{
ContactData *contactData = contactDatas->GetData(contact);
RecordAnswer(contactData, info);
diff --git a/plugins/Boltun/src/Engine/TalkEngine.h b/plugins/Boltun/src/Engine/TalkEngine.h index 9701b09637..423d6a2666 100644 --- a/plugins/Boltun/src/Engine/TalkEngine.h +++ b/plugins/Boltun/src/Engine/TalkEngine.h @@ -74,7 +74,7 @@ private: }
};
- PerContactData<Mind, ContactData, HCONTACT>* contactDatas;
+ PerContactData<Mind, ContactData, MCONTACT>* contactDatas;
const Mind mind;
bool beSilent;
bool makeLowercase;
@@ -103,9 +103,9 @@ public: void SetLowercase(const bool isLowercase);
void SetUnderstandAlways(const bool understandAlways);
//const MindData *GetData();
- std::tstring GetInitMessage(HCONTACT contact);
- MessageInfo* Reply(HCONTACT contact, const std::tstring incomingMessage, bool saveChoice);
- void AnswerGiven(HCONTACT contact, const MessageInfo &info);
+ std::tstring GetInitMessage(MCONTACT contact);
+ MessageInfo* Reply(MCONTACT contact, const std::tstring incomingMessage, bool saveChoice);
+ void AnswerGiven(MCONTACT contact, const MessageInfo &info);
};
#endif
diff --git a/plugins/Boltun/src/actionQueue.cpp b/plugins/Boltun/src/actionQueue.cpp index fab338a8dc..1c3bf5a25c 100644 --- a/plugins/Boltun/src/actionQueue.cpp +++ b/plugins/Boltun/src/actionQueue.cpp @@ -29,22 +29,22 @@ using namespace std; extern TalkBot* bot;
-typedef void (*ActionHandler)(HCONTACT hContact, const TalkBot::MessageInfo *inf);
+typedef void (*ActionHandler)(MCONTACT hContact, const TalkBot::MessageInfo *inf);
typedef struct _QueueElement {
- HCONTACT hContact;
+ MCONTACT hContact;
const TalkBot::MessageInfo *inf;
ActionHandler Handler;
bool Sticky;
int TimeOffset;
- _QueueElement(HCONTACT contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false)
+ _QueueElement(MCONTACT contact, ActionHandler handler, int timeOffset, const TalkBot::MessageInfo *info = NULL, bool sticky = false)
:hContact(contact), Handler(handler), TimeOffset(timeOffset), inf(info), Sticky(sticky)
{
}
} QueueElement;
static list<QueueElement> actionQueue;
-static set<HCONTACT> typingContacts;
+static set<MCONTACT> typingContacts;
UINT_PTR timerID = 0;
CriticalSection cs;
@@ -72,7 +72,7 @@ void UpdateTimer() timerID = 0;
}
-static bool NotifyTyping(HCONTACT hContact)
+static bool NotifyTyping(MCONTACT hContact)
{
int res = db_get_b(hContact, "SRMsg", "SupportTyping", 2);
if (res == 2)
@@ -80,7 +80,7 @@ static bool NotifyTyping(HCONTACT hContact) return res != 0;
}
-static void TimerAnswer(HCONTACT hContact, const TalkBot::MessageInfo* info)
+static void TimerAnswer(MCONTACT hContact, const TalkBot::MessageInfo* info)
{
DBEVENTINFO ldbei;
int size = (int)info->Answer.length() + 1;
@@ -118,7 +118,7 @@ static void TimerAnswer(HCONTACT hContact, const TalkBot::MessageInfo* info) typingContactsLock.Leave();
}
-static void StartTyping(HCONTACT hContact, const TalkBot::MessageInfo*)
+static void StartTyping(MCONTACT hContact, const TalkBot::MessageInfo*)
{
CallService(MS_PROTO_SELFISTYPING, (WPARAM)hContact,
(LPARAM)PROTOTYPE_SELFTYPING_ON);
@@ -127,7 +127,7 @@ static void StartTyping(HCONTACT hContact, const TalkBot::MessageInfo*) typingContactsLock.Leave();
}
-void DoAnswer(HCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = false)
+void DoAnswer(MCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = false)
{
if (info->Answer[0] == _T('\0'))
return;
@@ -206,7 +206,7 @@ void DoAnswer(HCONTACT hContact, const TalkBot::MessageInfo *info, bool sticky = cs.Leave();
}
-void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer)
+void AnswerToContact(MCONTACT hContact, const TCHAR* messageToAnswer)
{
if (Config.TalkWarnContacts && db_get_b(hContact, BOLTUN_KEY,
DB_CONTACT_WARNED, FALSE) == FALSE)
@@ -218,7 +218,7 @@ void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer) DoAnswer(hContact, bot->Reply(hContact, messageToAnswer, false));
}
-void StartChatting(HCONTACT hContact)
+void StartChatting(MCONTACT hContact)
{
DoAnswer(hContact, new TalkBot::MessageInfo(bot->GetInitMessage(hContact)), true);
}
diff --git a/plugins/Boltun/src/actionQueue.h b/plugins/Boltun/src/actionQueue.h index e8d62b8f6b..492bdcb24e 100644 --- a/plugins/Boltun/src/actionQueue.h +++ b/plugins/Boltun/src/actionQueue.h @@ -21,8 +21,8 @@ #ifndef ACTIONQUEUE_H
#define ACTIONQUEUE_H
-void AnswerToContact(HCONTACT hContact, const TCHAR* messageToAnswer);
+void AnswerToContact(MCONTACT hContact, const TCHAR* messageToAnswer);
-void StartChatting(HCONTACT hContact);
+void StartChatting(MCONTACT hContact);
#endif /* ACTIONQUEUE_H */
\ No newline at end of file diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp index 709e5b3a9f..bdea12d4d9 100644 --- a/plugins/Boltun/src/boltun.cpp +++ b/plugins/Boltun/src/boltun.cpp @@ -178,7 +178,7 @@ static bool LoadMind(const TCHAR* filename, int &line) return true;
}*/
-static bool BoltunAutoChat(HCONTACT hContact)
+static bool BoltunAutoChat(MCONTACT hContact)
{
if (db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT
, FALSE) == TRUE)
@@ -212,7 +212,7 @@ static bool BoltunAutoChat(HCONTACT hContact) static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDbEvent = (HANDLE)lParam;
if (!BoltunAutoChat(hContact))
return 0;
@@ -501,7 +501,7 @@ static int MessageOptInit(WPARAM wParam, LPARAM lParam) static int ContactClick(WPARAM wParam, LPARAM lParam, BOOL clickNotToChat)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BOOL boltunautochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_AUTO_CHAT, FALSE);
BOOL boltunnottochat = db_get_b(hContact, BOLTUN_KEY, DB_CONTACT_BOLTUN_NOT_TO_CHAT, FALSE);
@@ -545,7 +545,7 @@ static INT_PTR ContactClickNotToChat(WPARAM wParam, LPARAM lParam) static INT_PTR ContactClickStartChatting(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
StartChatting(hContact);
return 0;
}
@@ -554,7 +554,7 @@ static int MessagePrebuild(WPARAM wParam, LPARAM lParam) {
CLISTMENUITEM clmi = { sizeof(clmi) };
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!blInit || (db_get_b(hContact,"CList","NotOnList",0) == 1))
{
clmi.flags = CMIM_FLAGS | CMIF_GRAYED;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp index ecf709b150..d60229c7fc 100644 --- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp +++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp @@ -67,19 +67,19 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE;
}
-time_t getLastSeen(HCONTACT hContact)
+time_t getLastSeen(MCONTACT hContact)
{
return db_get_dw(hContact, MODULE_NAME, "LastSeen", db_get_dw(hContact, MODULE_NAME, "CreationTime", (DWORD)-1));
}
-void setLastSeen(HCONTACT hContact)
+void setLastSeen(MCONTACT hContact)
{
db_set_dw(hContact, MODULE_NAME, "LastSeen", (DWORD)time(NULL));
if (db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0))
db_set_b(hContact, MODULE_NAME, "StillAbsentNotified", 0);
}
-time_t getLastInputMsg(HCONTACT hContact)
+time_t getLastInputMsg(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -212,7 +212,7 @@ LRESULT CALLBACK PopupDlgProcNoSet(HWND hWnd, UINT message, WPARAM wParam, LPARA /**
* Checks - whether user has been gone for specified number of days
*/
-bool isContactGoneFor(HCONTACT hContact, int days)
+bool isContactGoneFor(MCONTACT hContact, int days)
{
time_t lastSeen = getLastSeen(hContact);
time_t lastInputMsg = getLastInputMsg(hContact);
@@ -257,7 +257,7 @@ bool isContactGoneFor(HCONTACT hContact, int days) return (daysSinceOnline >= days && (daysSinceMessage == -1 || daysSinceMessage >= days));
}
-void ReturnNotify(HCONTACT hContact, TCHAR *message)
+void ReturnNotify(MCONTACT hContact, TCHAR *message)
{
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || db_get_b(hContact, "CList", "Hidden", 0) == 1)
return;
@@ -297,7 +297,7 @@ void ReturnNotify(HCONTACT hContact, TCHAR *message) }
}
-void GoneNotify(HCONTACT hContact, TCHAR *message)
+void GoneNotify(MCONTACT hContact, TCHAR *message)
{
if (db_get_b(hContact, "CList", "NotOnList", 0) == 1 || db_get_b(hContact, "CList", "Hidden", 0) == 1)
return;
@@ -343,12 +343,12 @@ void GoneNotify(HCONTACT hContact, TCHAR *message) */
INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (lParam) {
CLISTEVENT* cle = (CLISTEVENT*)lParam;
hContact = cle->hContact;
}
- else hContact = (HCONTACT)wParam;
+ else hContact = (MCONTACT)wParam;
CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
return 0;
@@ -361,12 +361,12 @@ INT_PTR MissYouAction(WPARAM wParam, LPARAM lParam) */
INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (lParam) {
CLISTEVENT* cle = (CLISTEVENT*)lParam;
hContact = cle->hContact;
}
- else hContact = (HCONTACT)wParam;
+ else hContact = (MCONTACT)wParam;
if (options.iShowMessageWindow>0)
CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
@@ -385,12 +385,12 @@ INT_PTR ContactReturnedAction(WPARAM wParam, LPARAM lParam) */
INT_PTR ContactStillAbsentAction(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (lParam) {
CLISTEVENT* cle = (CLISTEVENT*)lParam;
hContact = cle->hContact;
}
- else hContact = (HCONTACT)wParam;
+ else hContact = (MCONTACT)wParam;
switch (options.action2) {
case GCA_DELETE:
@@ -423,15 +423,15 @@ int onIconsChanged(WPARAM wParam, LPARAM lParam) */
INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam)
{
- if (db_get_b((HCONTACT)wParam, MODULE_NAME, "MissYou", 0)) {
- db_set_b((HCONTACT)wParam, MODULE_NAME, "MissYou", 0);
+ if (db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0)) {
+ db_set_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0);
if (options.MissYouIcon)
- ExtraIcon_Clear(hExtraIcon, (HCONTACT)wParam);
+ ExtraIcon_Clear(hExtraIcon, (MCONTACT)wParam);
}
else {
- db_set_b((HCONTACT)wParam, MODULE_NAME, "MissYou", 1);
+ db_set_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 1);
if (options.MissYouIcon)
- ExtraIcon_SetIcon(hExtraIcon, (HCONTACT)wParam, "enabled_icon");
+ ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "enabled_icon");
}
return 0;
@@ -442,13 +442,13 @@ INT_PTR MenuMissYouClick(WPARAM wParam, LPARAM lParam) */
int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
if (!proto)
return 0;
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_TCHAR;
- if (db_get_b((HCONTACT)wParam, MODULE_NAME, "MissYou", 0)) {
+ if (db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0)) {
mi.ptszName = LPGENT("Disable Miss You");
mi.icolibItem = iconList[1].hIcolib;
}
@@ -457,14 +457,14 @@ int onPrebuildContactMenu(WPARAM wParam, LPARAM lParam) mi.icolibItem = iconList[2].hIcolib;
}
Menu_ModifyItem(hContactMenu, &mi);
- Menu_ShowItem(hContactMenu, !db_get_b((HCONTACT)wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
+ Menu_ShowItem(hContactMenu, !db_get_b((MCONTACT)wParam, proto, "ChatRoom", 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND));
return 0;
}
int onExtraImageApplying(WPARAM wParam, LPARAM lParam)
{
- if ( db_get_b((HCONTACT)wParam, MODULE_NAME, "MissYou", 0))
- ExtraIcon_SetIcon(hExtraIcon, (HCONTACT)wParam, "enabled_icon");
+ if ( db_get_b((MCONTACT)wParam, MODULE_NAME, "MissYou", 0))
+ ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "enabled_icon");
return 0;
}
@@ -474,7 +474,7 @@ int onExtraImageApplying(WPARAM wParam, LPARAM lParam) */
int SettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
DBCONTACTWRITESETTING *inf = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL || inf->value.type == DBVT_DELETED || strcmp(inf->szSetting, "Status") != 0)
@@ -565,7 +565,7 @@ int SettingChanged(WPARAM wParam, LPARAM lParam) void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto && (db_get_b(hContact, proto, "ChatRoom", 0) == 0) && (CallProtoService(proto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND) && isContactGoneFor(hContact, options.iAbsencePeriod2) && (db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0) == 0))
{
@@ -671,7 +671,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda int ContactAdded(WPARAM wParam, LPARAM lParam)
{
- db_set_dw((HCONTACT)wParam, MODULE_NAME, "CreationTime", (DWORD)time(0));
+ db_set_dw((MCONTACT)wParam, MODULE_NAME, "CreationTime", (DWORD)time(0));
return 0;
}
@@ -709,7 +709,7 @@ extern "C" int __declspec(dllexport) Load(void) DBVARIANT dbv;
DWORD current_time = (DWORD)time(0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if ( !db_get(hContact, MODULE_NAME, "CreationTime", &dbv))
db_free(&dbv);
else
diff --git a/plugins/BuddyExpectator/src/options.cpp b/plugins/BuddyExpectator/src/options.cpp index 7d710ce26c..7fe24fdf46 100644 --- a/plugins/BuddyExpectator/src/options.cpp +++ b/plugins/BuddyExpectator/src/options.cpp @@ -25,9 +25,9 @@ #define DEF_COLOR_FORE 0x000000
extern HICON hIcon;
-extern time_t getLastSeen(HCONTACT);
-extern time_t getLastInputMsg(HCONTACT);
-extern bool isContactGoneFor(HCONTACT, int);
+extern time_t getLastSeen(MCONTACT);
+extern time_t getLastInputMsg(MCONTACT);
+extern bool isContactGoneFor(MCONTACT, int);
Options options;
void LoadOptions()
@@ -247,7 +247,7 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, SaveOptions();
// clear all notified settings
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if(db_get_b(hContact, MODULE_NAME, "StillAbsentNotified", 0))
db_set_b(hContact, MODULE_NAME, "StillAbsentNotified", 0);
@@ -458,7 +458,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar {
time_t tmpTime;
TCHAR tmpBuf[51] = {0};
- tmpTime = getLastSeen((HCONTACT)lparam);
+ tmpTime = getLastSeen((MCONTACT)lparam);
if (tmpTime == -1)
SetDlgItemText(hdlg, IDC_EDIT_LASTSEEN, TranslateT("not detected"));
else {
@@ -466,7 +466,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar SetDlgItemText(hdlg, IDC_EDIT_LASTSEEN, tmpBuf);
}
- tmpTime = getLastInputMsg((HCONTACT)lparam);
+ tmpTime = getLastInputMsg((MCONTACT)lparam);
if (tmpTime == -1)
SetDlgItemText(hdlg, IDC_EDIT_LASTINPUT, TranslateT("not found"));
else {
@@ -474,19 +474,19 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar SetDlgItemText(hdlg, IDC_EDIT_LASTINPUT, tmpBuf);
}
- unsigned int AbsencePeriod = db_get_dw((HCONTACT)lparam, MODULE_NAME, "iAbsencePeriod", options.iAbsencePeriod);
+ unsigned int AbsencePeriod = db_get_dw((MCONTACT)lparam, MODULE_NAME, "iAbsencePeriod", options.iAbsencePeriod);
SendDlgItemMessage(hdlg, IDC_SPINABSENCE, UDM_SETRANGE, 0, MAKELONG(999, 1));
SetDlgItemInt(hdlg, IDC_EDITABSENCE, AbsencePeriod, FALSE);
- if (isContactGoneFor((HCONTACT)lparam, options.iAbsencePeriod2))
+ if (isContactGoneFor((MCONTACT)lparam, options.iAbsencePeriod2))
SetDlgItemText(hdlg, IDC_EDIT_WILLNOTICE, TranslateT("This contact has been absent for an extended period of time."));
else
SetDlgItemText(hdlg, IDC_EDIT_WILLNOTICE, _T(""));
- SendMessage(GetDlgItem(hdlg, IDC_CHECK_MISSYOU), BM_SETCHECK, db_get_b((HCONTACT)lparam, MODULE_NAME, "MissYou", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
- SendMessage(GetDlgItem(hdlg, IDC_CHECK_NOTIFYALWAYS), BM_SETCHECK, db_get_b((HCONTACT)lparam, MODULE_NAME, "MissYouNotifyAlways", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
- SendMessage(GetDlgItem(hdlg, IDC_CHECK_NEVERHIDE), BM_SETCHECK, db_get_b((HCONTACT)lparam, MODULE_NAME, "NeverHide", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendMessage(GetDlgItem(hdlg, IDC_CHECK_MISSYOU), BM_SETCHECK, db_get_b((MCONTACT)lparam, MODULE_NAME, "MissYou", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendMessage(GetDlgItem(hdlg, IDC_CHECK_NOTIFYALWAYS), BM_SETCHECK, db_get_b((MCONTACT)lparam, MODULE_NAME, "MissYouNotifyAlways", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendMessage(GetDlgItem(hdlg, IDC_CHECK_NEVERHIDE), BM_SETCHECK, db_get_b((MCONTACT)lparam, MODULE_NAME, "NeverHide", 0) ? BST_CHECKED : BST_UNCHECKED, 0);
TranslateDialogDefault(hdlg);
return TRUE;
@@ -500,7 +500,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lpar {
case (PSN_APPLY):
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lparam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lparam)->lParam;
if (hContact)
{
db_set_dw(hContact, MODULE_NAME, "iAbsencePeriod", GetDlgItemInt(hdlg, IDC_EDITABSENCE, 0, FALSE));
diff --git a/plugins/BuddyPounce/src/dialog.cpp b/plugins/BuddyPounce/src/dialog.cpp index 3307f81901..464e9ea1cf 100644 --- a/plugins/BuddyPounce/src/dialog.cpp +++ b/plugins/BuddyPounce/src/dialog.cpp @@ -10,9 +10,9 @@ void populateSettingsList(HWND hwnd2List) SendMessage(hwnd2List, LB_ADDSTRING, 0, (LPARAM)TranslateT("Confirmation Window"));
}
-void populateContacts(HCONTACT BPhContact, HWND hwnd2CB)
+void populateContacts(MCONTACT BPhContact, HWND hwnd2CB)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *szProto = GetContactProto(hContact);
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
TCHAR name[300];
@@ -25,7 +25,7 @@ void populateContacts(HCONTACT BPhContact, HWND hwnd2CB) }
}
-void saveLastSetting(HCONTACT hContact, HWND hwnd)
+void saveLastSetting(MCONTACT hContact, HWND hwnd)
{
TCHAR number[8];//, string[1024];//for sending file name
switch (db_get_b(hContact, modname, "LastSetting", 2)) { // nothing to do
@@ -63,7 +63,7 @@ void hideAll(HWND hwnd) ShowWindow(GetDlgItem(hwnd, IDC_SPIN), SW_HIDE);
}
-void getDefaultMessage(HWND hwnd, UINT control, HCONTACT hContact)
+void getDefaultMessage(HWND hwnd, UINT control, MCONTACT hContact)
{
DBVARIANT dbv;
if (!db_get_ts(hContact, modname, "PounceMsg", &dbv)) {
@@ -178,7 +178,7 @@ void statusModes(windowInfo *wi, int myStatusMode) // myStatusMode=1 sendIfMySta CheckDlgButton(hwnd, IDC_CHECK10, (statusFlag&LUNCH)>>9);
}
-void deletePounce(HCONTACT hContact)
+void deletePounce(MCONTACT hContact)
{
db_unset(hContact,modname, "PounceMsg");
db_unset(hContact,modname, "SendIfMyStatusIsFLAG");
@@ -192,12 +192,12 @@ void deletePounce(HCONTACT hContact) INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch(msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwnd);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)lParam);
getDefaultMessage(hwnd, IDC_MESSAGE, hContact);
@@ -259,7 +259,7 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l msg(TranslateT("error......"), TranslateT("Buddy Pounce"));
DestroyWindow(hwnd);
}
- wi->hContact = (HCONTACT)lParam;
+ wi->hContact = (MCONTACT)lParam;
wi->SendIfMy = 0;
wi->SendWhenThey = 0;
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)wi);
@@ -290,7 +290,7 @@ INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case IDC_SIMPLE:
case IDOK:
{
- HCONTACT hContact = (HCONTACT)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETITEMDATA, SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETCURSEL,0,0),0);
+ MCONTACT hContact = (MCONTACT)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETITEMDATA, SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETCURSEL,0,0),0);
int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE))+1;
if (length>1) {
TCHAR *text = (TCHAR*)mir_alloc(length*sizeof(TCHAR));
@@ -416,7 +416,7 @@ INT_PTR CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, L switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
windowInfo *wi = (windowInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA);
- HCONTACT hContact = ((windowInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA))->hContact;
+ MCONTACT hContact = ((windowInfo *)GetWindowLongPtr(hwnd, GWLP_USERDATA))->hContact;
int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_MESSAGE))+1;
if (length > 1) {
TCHAR *text = (TCHAR*)mir_alloc(length*sizeof(TCHAR));
@@ -570,13 +570,13 @@ INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
switch(msg) {
case WM_INITDIALOG:
SetWindowLongPtr(hwnd, GWLP_USERDATA, (WPARAM)lParam);
TranslateDialogDefault(hwnd);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
{
DBVARIANT dbv;
if (db_get_ts(hContact, modname, "PounceMsg", &dbv))
@@ -608,7 +608,7 @@ INT_PTR CALLBACK PounceSentDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return 0;
}
-void CreateMessageAcknowlegedWindow(HCONTACT hContact, int SentSuccess)
+void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess)
{
HWND hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONFIRMSEND), 0, PounceSentDlgProc, (LPARAM)hContact);
TCHAR msg[256];
diff --git a/plugins/BuddyPounce/src/headers.h b/plugins/BuddyPounce/src/headers.h index 48c499442c..508f3d03f9 100644 --- a/plugins/BuddyPounce/src/headers.h +++ b/plugins/BuddyPounce/src/headers.h @@ -47,14 +47,14 @@ struct windowInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
HWND SendIfMy;
HWND SendWhenThey;
};
struct SendPounceDlgProcStruct
{
- HCONTACT hContact;
+ MCONTACT hContact;
int timer;
TCHAR *message;
};
@@ -66,13 +66,13 @@ extern HINSTANCE hInst; //=======================================================
// main.c
-void SendPounce(TCHAR* text, HCONTACT hContact);
+void SendPounce(TCHAR* text, MCONTACT hContact);
//dialog.c
INT_PTR CALLBACK BuddyPounceDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK BuddyPounceSimpleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK BuddyPounceOptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK SendPounceDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void CreateMessageAcknowlegedWindow(HCONTACT hContact, int SentSuccess);
+void CreateMessageAcknowlegedWindow(MCONTACT hContact, int SentSuccess);
#endif //_COMMONHEADERS_H
\ No newline at end of file diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp index 18e8a64c44..8d87f43033 100644 --- a/plugins/BuddyPounce/src/main.cpp +++ b/plugins/BuddyPounce/src/main.cpp @@ -133,7 +133,7 @@ int statusCheck(int statusFlag, int status) }
return 0;
}
-int CheckDate(HCONTACT hContact)
+int CheckDate(MCONTACT hContact)
{
time_t curtime = time (NULL);
if(!db_get_b(hContact,modname,"GiveUpDays",0))
@@ -143,7 +143,7 @@ int CheckDate(HCONTACT hContact) return 0;
}
-void SendPounce(TCHAR *text, HCONTACT hContact)
+void SendPounce(TCHAR *text, MCONTACT hContact)
{
char* pszUtf = mir_utf8encodeT(text);
if (HANDLE hSendId = (HANDLE)CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)pszUtf))
@@ -153,14 +153,14 @@ void SendPounce(TCHAR *text, HCONTACT hContact) int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
char *szProto = GetContactProto(hContact);
if((HANDLE)wParam == NULL || strcmp(cws->szSetting,"Status")) return 0;
if (szProto && (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM)) {
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w((HCONTACT)wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
+ int oldStatus = db_get_w((MCONTACT)wParam,"UserOnline","OldStatus",ID_STATUS_OFFLINE);
if (newStatus != oldStatus && wParam != NULL && newStatus != ID_STATUS_OFFLINE) {
DBVARIANT dbv;
@@ -192,7 +192,7 @@ int UserOnlineSettingChanged(WPARAM wParam,LPARAM lParam) INT_PTR BuddyPounceMenuCommand(WPARAM wParam, LPARAM lParam)
{
- if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b((HCONTACT)wParam, modname, "UseAdvanced", 0))
+ if (db_get_b(NULL, modname, "UseAdvanced", 0) || db_get_b((MCONTACT)wParam, modname, "UseAdvanced", 0))
CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE),0,BuddyPounceDlgProc, wParam);
else CreateDialogParam(hInst,MAKEINTRESOURCE(IDD_POUNCE_SIMPLE),0,BuddyPounceSimpleDlgProc, wParam);
return 0;
@@ -200,7 +200,7 @@ INT_PTR BuddyPounceMenuCommand(WPARAM wParam, LPARAM lParam) INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR* message = (TCHAR*)lParam;
time_t today = time(NULL);
db_set_ws(hContact, modname, "PounceMsg", message);
@@ -214,7 +214,7 @@ INT_PTR AddSimpleMessage(WPARAM wParam, LPARAM lParam) INT_PTR AddToPounce(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR* message = (TCHAR*)lParam;
DBVARIANT dbv;
if (!db_get_ts(hContact, modname, "PounceMsg",&dbv))
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 22725f9e07..b6d0bc1eb3 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -67,7 +67,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) static int OnDbChanged(WPARAM wparam, LPARAM lparam)
{
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
DBCONTACTWRITESETTING *cws = ( DBCONTACTWRITESETTING* )lparam;
// if user changes his UIN or JID on any account
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp index 9036ac1e00..c79ace857e 100644 --- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp +++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp @@ -83,25 +83,25 @@ static VOID NTAPI ShowContactMenu(ULONG_PTR wParam) void Popup_DoAction(HWND hWnd, BYTE Action, PLUGIN_DATA *pdata)
{
- HCONTACT hContact = (HCONTACT)CallService(MS_POPUP_GETCONTACT, (WPARAM)hWnd, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_POPUP_GETCONTACT, (WPARAM)hWnd, 0);
switch (Action) {
case PCA_OPENMESSAGEWND: // open message window
- if (hContact && hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact && hContact != INVALID_CONTACT_ID)
CallServiceSync(ServiceExists("SRMsg/LaunchMessageWindow") ? "SRMsg/LaunchMessageWindow" : MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
break;
case PCA_OPENMENU: // open contact menu
- if (hContact && hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact && hContact != INVALID_CONTACT_ID)
QueueUserAPC(ShowContactMenu, g_hMainThread, (ULONG_PTR)hContact);
break;
case PCA_OPENDETAILS: // open contact details window
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
CallServiceSync(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
case PCA_OPENHISTORY: // open contact history
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
CallServiceSync(MS_HISTORY_SHOWCONTACTHISTORY, (WPARAM)hContact, 0);
break;
@@ -201,7 +201,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (lstrcmpA(cws->szSetting, DB_MIRVER))
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
SHOWPOPUP_DATA sd = {0};
char *szProto = GetContactProto(hContact);
if (g_PreviewOptPage)
@@ -231,7 +231,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) PopupOptPage.DBToMem();
}
- HCONTACT hContactOrMeta = (hContact && bMetaContactsExists) ? (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0) : hContact;
+ MCONTACT hContactOrMeta = (hContact && bMetaContactsExists) ? (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0) : hContact;
if (!hContactOrMeta)
hContactOrMeta = hContact;
diff --git a/plugins/ClientChangeNotify/src/Common.h b/plugins/ClientChangeNotify/src/Common.h index f9ce032674..d29080795b 100644 --- a/plugins/ClientChangeNotify/src/Common.h +++ b/plugins/ClientChangeNotify/src/Common.h @@ -138,7 +138,7 @@ struct PLUGIN_DATA struct SHOWPOPUP_DATA
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCString OldMirVer;
TCString MirVer;
COptPage *PopupOptPage;
diff --git a/plugins/ClientChangeNotify/src/CommonLibs/CString.cpp b/plugins/ClientChangeNotify/src/CommonLibs/CString.cpp index 52e4f69295..38d96882d5 100644 --- a/plugins/ClientChangeNotify/src/CommonLibs/CString.cpp +++ b/plugins/ClientChangeNotify/src/CommonLibs/CString.cpp @@ -272,19 +272,19 @@ template class TString<TCHAR>; template class TString<char>;
template class TString<WCHAR>;
-CString db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
+CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue)
{
ptrA p( db_get_sa(hContact, szModule, szSetting));
return CString(p == NULL ? szDefaultValue : p);
}
-TCString db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
+TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
{
ptrT p( db_get_tsa(hContact, szModule, szSetting));
return TCString(p == NULL ? szDefaultValue : p);
}
-TCString DBGetContactSettingAsString(HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
+TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue)
{ // also converts numeric values to a string
DBVARIANT dbv = {0};
int iRes = db_get_ws(hContact, szModule, szSetting, &dbv);
diff --git a/plugins/ClientChangeNotify/src/CommonLibs/CString.h b/plugins/ClientChangeNotify/src/CommonLibs/CString.h index c1f555c72a..0d81a4f7c3 100644 --- a/plugins/ClientChangeNotify/src/CommonLibs/CString.h +++ b/plugins/ClientChangeNotify/src/CommonLibs/CString.h @@ -163,10 +163,10 @@ __inline CHARARRAY WCHAR2UTF8(WCString Str) #undef db_get_s
-CString db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue);
-TCString db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue);
-int db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
-TCString DBGetContactSettingAsString(HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue); // also converts numeric values to a string
+CString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *szDefaultValue);
+TCString db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue);
+int db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+TCString DBGetContactSettingAsString(MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *szDefaultValue); // also converts numeric values to a string
// various string helpers. their return values are valid only while the class is visible
class UTF8Encode
diff --git a/plugins/Clist_blind/src/clcopts.cpp b/plugins/Clist_blind/src/clcopts.cpp index 806b58c785..49f4f32ff8 100644 --- a/plugins/Clist_blind/src/clcopts.cpp +++ b/plugins/Clist_blind/src/clcopts.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
-TCHAR* MyDBGetContactSettingTString(HCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def);
+TCHAR* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def);
#define DBFONTF_BOLD 1
diff --git a/plugins/Clist_blind/src/clistopts.cpp b/plugins/Clist_blind/src/clistopts.cpp index f709c123f0..bc06a27efa 100644 --- a/plugins/Clist_blind/src/clistopts.cpp +++ b/plugins/Clist_blind/src/clistopts.cpp @@ -28,7 +28,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (msg) {
case WM_USER + 1:
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
&& lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg)) {
@@ -221,7 +221,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP pcli->pfnTrayIconIconsChanged();
pcli->pfnLoadContactTree(); /* this won't do job properly since it only really works when changes happen */
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE); /* force reshuffle */
+ pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID); /* force reshuffle */
return TRUE;
}
break;
diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index 593c331d66..a800916b8d 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -185,7 +185,7 @@ extern "C" int __declspec(dllexport) Unload(void) /////////////////////////////////////////////////////////////////////////////////////////
-TCHAR* MyDBGetContactSettingTString(HCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
+TCHAR* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
{
DBVARIANT dbv;
diff --git a/plugins/Clist_modern/src/hdr/modern_awaymsg.h b/plugins/Clist_modern/src/hdr/modern_awaymsg.h index df40446f2c..702358721c 100644 --- a/plugins/Clist_modern/src/hdr/modern_awaymsg.h +++ b/plugins/Clist_modern/src/hdr/modern_awaymsg.h @@ -34,4 +34,4 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void InitAwayMsgModule();
void UninitAwayMsgModule();
-void amRequestAwayMsg(HCONTACT hContact);
+void amRequestAwayMsg(MCONTACT hContact);
diff --git a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h index 9b32eb6788..24dc9db73d 100644 --- a/plugins/Clist_modern/src/hdr/modern_cache_funcs.h +++ b/plugins/Clist_modern/src/hdr/modern_cache_funcs.h @@ -37,11 +37,11 @@ void Cache_GetFirstLineText(ClcData *dat, ClcContact *contact); void Cache_GetSecondLineText(struct SHORTDATA *dat, ClcCacheEntry *pdnce);
void Cache_GetThirdLineText(struct SHORTDATA *dat, ClcCacheEntry *pdnce);
void Cache_GetAvatar(ClcData *dat, ClcContact *contact);
-void Cache_GetTimezone(ClcData *dat, HCONTACT hContact);
+void Cache_GetTimezone(ClcData *dat, MCONTACT hContact);
int Cache_GetLineText(ClcCacheEntry *pdnce, int type, LPTSTR text, int text_size, TCHAR *variable_text, BOOL xstatus_has_priority,
BOOL show_status_if_no_away, BOOL show_listening_if_no_away, BOOL use_name_and_message_for_xstatus,
BOOL pdnce_time_show_only_if_different);
-void amRequestAwayMsg(HCONTACT hContact);
+void amRequestAwayMsg(MCONTACT hContact);
#endif // __CACHE_FUNCS_H__
diff --git a/plugins/Clist_modern/src/hdr/modern_clc.h b/plugins/Clist_modern/src/hdr/modern_clc.h index 2e8cfe1224..5cffd61852 100644 --- a/plugins/Clist_modern/src/hdr/modern_clc.h +++ b/plugins/Clist_modern/src/hdr/modern_clc.h @@ -396,7 +396,7 @@ void ClcOptionsChanged(void); //clcidents.c
int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex);
-int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts);
+int FindItem(HWND hwnd, ClcData *dat, MCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts);
int cliGetRowByIndex(ClcData *dat,int testindex,ClcContact **contact,ClcGroup **subgroup);
HANDLE ContactToHItem(ClcContact *contact);
HANDLE ContactToItemHandle(ClcContact *contact,DWORD *nmFlags);
@@ -407,8 +407,8 @@ ClcGroup *cli_AddGroup(HWND hwnd,ClcData *dat,const TCHAR *szName,DWORD flags,in void cli_FreeGroup(ClcGroup *group);
int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText);
void cliRebuildEntireList(HWND hwnd, ClcData *dat);
-void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem);
-void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline);
+void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
+void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline);
void cli_SortCLC(HWND hwnd,ClcData *dat,int useInsertionSort);
int GetNewSelection(ClcGroup *group,int selection, int direction);
@@ -433,13 +433,13 @@ DWORD GetDefaultExStyle(void); void GetFontSetting(int i,LOGFONT *lf,COLORREF *colour,BYTE *effect, COLORREF *eColour1,COLORREF *eColour2);
//clistsettings.c
-TCHAR * GetContactDisplayNameW(HCONTACT hContact, int mode );
+TCHAR * GetContactDisplayNameW(MCONTACT hContact, int mode );
//groups.c
TCHAR* GetGroupNameTS( int idx, DWORD* pdwFlags );
int RenameGroupT(WPARAM groupID, LPARAM newName);
-int GetContactCachedStatus(HCONTACT hContact);
-char *GetContactCachedProtocol(HCONTACT hContact);
+int GetContactCachedStatus(MCONTACT hContact);
+char *GetContactCachedProtocol(MCONTACT hContact);
#endif /* _CLC_H_ */
diff --git a/plugins/Clist_modern/src/hdr/modern_clist.h b/plugins/Clist_modern/src/hdr/modern_clist.h index 1c6c5923e8..65cfaeb76e 100644 --- a/plugins/Clist_modern/src/hdr/modern_clist.h +++ b/plugins/Clist_modern/src/hdr/modern_clist.h @@ -28,9 +28,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CLIST_H_
void LoadContactTree(void);
-HTREEITEM GetTreeItemByHContact(HCONTACT hContact);
-void cli_ChangeContactIcon(HCONTACT hContact,int iIcon,int add);
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
+HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
+void cli_ChangeContactIcon(MCONTACT hContact,int iIcon,int add);
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
///////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/Clist_modern/src/hdr/modern_commonheaders.h b/plugins/Clist_modern/src/hdr/modern_commonheaders.h index 636388c61a..320010f101 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonheaders.h +++ b/plugins/Clist_modern/src/hdr/modern_commonheaders.h @@ -241,14 +241,14 @@ int AniAva_InitModule(); // HAVE TO BE AFTER GDI+ INITIALIZED int AniAva_UnloadModule();
int AniAva_UpdateOptions(); //reload options, //hot enable/disable engine
-int AniAva_AddAvatar(HCONTACT hContact, TCHAR * szFilename, int width, int heigth); // adds avatars to be displayed
-int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha); // update avatars pos
-int AniAva_InvalidateAvatarPositions(HCONTACT hContact); // reset positions of avatars to be drawn (still be painted at same place)
+int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth); // adds avatars to be displayed
+int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha); // update avatars pos
+int AniAva_InvalidateAvatarPositions(MCONTACT hContact); // reset positions of avatars to be drawn (still be painted at same place)
int AniAva_RemoveInvalidatedAvatars(); // all avatars without validated position will be stop painted and probably removed
-int AniAva_RemoveAvatar(HCONTACT hContact); // remove avatar
+int AniAva_RemoveAvatar(MCONTACT hContact); // remove avatar
int AniAva_RedrawAllAvatars(BOOL updateZOrder); // request to repaint all
void AniAva_UpdateParent();
-int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc );
+int AniAva_RenderAvatar(MCONTACT hContact, HDC hdcMem, RECT *rc );
#define CCI_NAME 1
#define CCI_GROUP (1<<1)
diff --git a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h index 838686b5d7..e6998c3a95 100644 --- a/plugins/Clist_modern/src/hdr/modern_commonprototypes.h +++ b/plugins/Clist_modern/src/hdr/modern_commonprototypes.h @@ -207,21 +207,21 @@ INT_PTR CALLBACK DlgSkinEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM INT_PTR CALLBACK DlgTmplEditorOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam); //RowTemplate.c
BOOL FindMenuHanleByGlobalID(HMENU hMenu, int globalID, struct _MenuItemHandles * dat); //GenMenu.c
BOOL MatchMask(char *name, char *mask); //mod_skin_selector.c
-char* GetContactCachedProtocol(HCONTACT hContact); //clistsettings.c
+char* GetContactCachedProtocol(MCONTACT hContact); //clistsettings.c
char* GetParamN(char *string, char *buf, int buflen, BYTE paramN, char Delim, BOOL SkipSpaces); //mod_skin_selector.c
WCHAR* GetParamN(WCHAR *string, WCHAR *buf, int buflen, BYTE paramN, WCHAR Delim, BOOL SkipSpaces);
-DWORD CompareContacts2_getLMTime(HCONTACT u); //contact.c
+DWORD CompareContacts2_getLMTime(MCONTACT u); //contact.c
DWORD mod_CalcHash(const char * a); //mod_skin_selector.c
-HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status); //clistmod.c
+HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto,int status); //clistmod.c
HICON GetMainStatusOverlay(int STATUS); //clc.c
-int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c
+int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, ClcData *dat); //clcitems.c
int BgStatusBarChange(WPARAM wParam,LPARAM lParam); //clcopts.c
-int ClcDoProtoAck(HCONTACT wParam, ACKDATA *ack); //clc.c
+int ClcDoProtoAck(MCONTACT wParam, ACKDATA *ack); //clc.c
int ModernSkinButtonDeleteAll(); //modernbutton.c
-int GetContactCachedStatus(HCONTACT hContact); //clistsettings.c
+int GetContactCachedStatus(MCONTACT hContact); //clistsettings.c
int GetContactIconC(ClcCacheEntry *cacheEntry); //clistmod.c
int GetContactIndex(ClcGroup *group,ClcContact *contact); //clcidents.c
-int GetStatusForContact(HCONTACT hContact,char *szProto); //clistsettings.c
+int GetStatusForContact(MCONTACT hContact,char *szProto); //clistsettings.c
int InitCustomMenus(void); //clistmenus.c
int InitFramesMenus(void); //framesmenus.c
int LoadMoveToGroup(); //movetogroup.c
@@ -247,7 +247,7 @@ void Docking_GetMonitorRectFromWindow(HWND hWnd,RECT *rc); void DrawAvatarImageWithGDIp(HDC hDestDC,int x, int y, DWORD width, DWORD height, HBITMAP hbmp, int x1, int y1, DWORD width1, DWORD height1,DWORD flag,BYTE alpha); //gdiplus.cpp
void FreeRowCell(); //RowHeight
void InitGdiPlus(); //gdiplus.cpp
-void InvalidateDNCEbyPointer(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); //clistsettings.c
+void InvalidateDNCEbyPointer(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType); //clistsettings.c
void ShutdownGdiPlus(); //gdiplus.cpp
void UninitCustomMenus(); //clistmenus.c
void UnloadAvatarOverlayIcon(); //clc.c
@@ -255,7 +255,7 @@ void UnLoadContactListModule(); / void UpdateAllAvatars(ClcData *dat); //cache_func.c
//cluiframes.c
-void gtaRenewText(HCONTACT hContact);
+void gtaRenewText(MCONTACT hContact);
int ExtraImage_ExtraIDToColumnNum(int extra);
int LoadSkinButtonModule();
@@ -281,15 +281,15 @@ int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly);
int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk);
int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex);
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact);
-int cli_GetContactIcon(HCONTACT hContact);
-int cli_RemoveEvent(HCONTACT hContact, HANDLE hDbEvent);
-void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline);
-void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem);
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact);
+int cli_GetContactIcon(MCONTACT hContact);
+int cli_RemoveEvent(MCONTACT hContact, HANDLE hDbEvent);
+void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline);
+void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
void cli_FreeContact( ClcContact* );
void cli_FreeGroup( ClcGroup* );
char* cli_GetGroupCountsText(ClcData *dat, ClcContact *contact);
-void cli_ChangeContactIcon(HCONTACT hContact,int iIcon,int add);
+void cli_ChangeContactIcon(MCONTACT hContact,int iIcon,int add);
LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wParam,LPARAM lParam);
struct CListEvent* cliCreateEvent( void );
struct CListEvent* cli_AddEvent(CLISTEVENT *cle);
@@ -302,7 +302,7 @@ int cliTrayCalcChanged(const char *szChangedProto, int averageMode, int netP int cliTrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam);
void cliCluiProtocolStatusChanged(int status,const char * proto);
HMENU cliBuildGroupPopupMenu(ClcGroup *group);
-void cliInvalidateDisplayNameCacheEntry(HCONTACT hContact);
+void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact);
void cliCheckCacheItem(ClcCacheEntry *pdnce);
void cli_SaveStateAndRebuildList(HWND hwnd, ClcData *dat);
void CLUI_cli_LoadCluiGlobalOpts(void);
@@ -310,8 +310,8 @@ INT_PTR cli_TrayIconProcessMessage(WPARAM wParam,LPARAM lParam); BOOL CLUI__cliInvalidateRect(HWND hWnd, CONST RECT* lpRect,BOOL bErase );
ClcContact* cliCreateClcContact( void );
-ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact);
-ClcCacheEntry* cliGetCacheEntry(HCONTACT hContact);
+ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact);
+ClcCacheEntry* cliGetCacheEntry(MCONTACT hContact);
#define WM_DWMCOMPOSITIONCHANGED 0x031E
@@ -332,7 +332,7 @@ extern tPaintCallbackProc CLCPaint_PaintCallbackProc(HWND hWnd, HDC hDC, RECT *r /* SkinEngine.c */
-BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault);
+BYTE SkinDBGetContactSettingByte(MCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault);
extern OVERLAYICONINFO g_pAvatarOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1];
extern OVERLAYICONINFO g_pStatusOverlayIcons[ID_STATUS_OUTTOLUNCH - ID_STATUS_OFFLINE + 1];
diff --git a/plugins/Clist_modern/src/hdr/modern_gettextasync.h b/plugins/Clist_modern/src/hdr/modern_gettextasync.h index 4e8c7c6ed5..386b721b19 100644 --- a/plugins/Clist_modern/src/hdr/modern_gettextasync.h +++ b/plugins/Clist_modern/src/hdr/modern_gettextasync.h @@ -1,5 +1,5 @@ #pragma once
void InitCacheAsync();
void UninitCacheAsync();
-void gtaRenewText(HCONTACT hContact);
-int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact);
+void gtaRenewText(MCONTACT hContact);
+int gtaAddRequest(ClcData *dat,ClcContact *contact,MCONTACT hContact);
diff --git a/plugins/Clist_modern/src/hdr/modern_global_structure.h b/plugins/Clist_modern/src/hdr/modern_global_structure.h index 7be8dd2ff8..10b238cbfa 100644 --- a/plugins/Clist_modern/src/hdr/modern_global_structure.h +++ b/plugins/Clist_modern/src/hdr/modern_global_structure.h @@ -18,7 +18,7 @@ typedef struct tagCLUIDATA DWORD dwFlags;
TCHAR *szNoEvents;
int hIconNotify;
- HCONTACT hUpdateContact;
+ MCONTACT hUpdateContact;
/* Contact List View Mode */
TCHAR groupFilter[2048];
diff --git a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h index 0eebf53cba..20d662aee7 100644 --- a/plugins/Clist_modern/src/hdr/modern_skinned_profile.h +++ b/plugins/Clist_modern/src/hdr/modern_skinned_profile.h @@ -233,10 +233,10 @@ public: HRESULT Init();
HRESULT Clear();
- static BYTE SpiGetSkinByte (HCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue );
- static WORD SpiGetSkinWord (HCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue );
- static DWORD SpiGetSkinDword(HCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue );
- static BOOL SpiCheckSkinned(HCONTACT hContact, const char * szSection, const char * szKey );
+ static BYTE SpiGetSkinByte (MCONTACT hContact, const char * szSection, const char * szKey, const BYTE defValue );
+ static WORD SpiGetSkinWord (MCONTACT hContact, const char * szSection, const char * szKey, const WORD defValue );
+ static DWORD SpiGetSkinDword(MCONTACT hContact, const char * szSection, const char * szKey, const DWORD defValue );
+ static BOOL SpiCheckSkinned(MCONTACT hContact, const char * szSection, const char * szKey );
};
diff --git a/plugins/Clist_modern/src/modern_aniavatars.cpp b/plugins/Clist_modern/src/modern_aniavatars.cpp index 1a27ac5079..03bd11a014 100644 --- a/plugins/Clist_modern/src/modern_aniavatars.cpp +++ b/plugins/Clist_modern/src/modern_aniavatars.cpp @@ -60,7 +60,7 @@ enum { struct ANIAVA_OBJECT
{
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hWindow;
BOOL bInvalidPos;
BOOL bToBeDeleted;
@@ -284,7 +284,7 @@ int AniAva_UpdateOptions() }
// adds avatars to be displayed
-int AniAva_AddAvatar(HCONTACT hContact, TCHAR * szFilename, int width, int heigth)
+int AniAva_AddAvatar(MCONTACT hContact, TCHAR * szFilename, int width, int heigth)
{
aacheck 0;
if (!GDIPlus_IsAnimatedGif (szFilename))
@@ -344,7 +344,7 @@ void AniAva_UpdateParent() }
}
-ANIAVA_OBJECT * FindAvatarByContact(HCONTACT hContact )
+ANIAVA_OBJECT * FindAvatarByContact(MCONTACT hContact )
{
for ( int i=0; i < s_Objects.getCount(); i++) {
ANIAVA_OBJECT *pai = ((ANIAVA_OBJECT *)s_Objects[i]);
@@ -354,7 +354,7 @@ ANIAVA_OBJECT * FindAvatarByContact(HCONTACT hContact ) return NULL;
}
-int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc )
+int AniAva_RenderAvatar(MCONTACT hContact, HDC hdcMem, RECT *rc )
{
aacheck 0;
mir_cslock lck(s_CS);
@@ -365,7 +365,7 @@ int AniAva_RenderAvatar(HCONTACT hContact, HDC hdcMem, RECT *rc ) }
// update avatars pos
-int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha)
+int AniAva_SetAvatarPos(MCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha)
{
aacheck 0;
mir_cslock lck(s_CS);
@@ -404,7 +404,7 @@ int AniAva_SetAvatarPos(HCONTACT hContact, RECT *rc, int overlayIdx, BYTE bAlpha return 1;
}
// remove avatar
-int AniAva_RemoveAvatar(HCONTACT hContact)
+int AniAva_RemoveAvatar(MCONTACT hContact)
{
aacheck 0;
mir_cslock lck(s_CS);
@@ -419,7 +419,7 @@ int AniAva_RemoveAvatar(HCONTACT hContact) return 1;
}
// reset positions of avatars to be drawn (still be painted at same place)
-int AniAva_InvalidateAvatarPositions(HCONTACT hContact)
+int AniAva_InvalidateAvatarPositions(MCONTACT hContact)
{
aacheck 0;
mir_cslock lck(s_CS);
diff --git a/plugins/Clist_modern/src/modern_awaymsg.cpp b/plugins/Clist_modern/src/modern_awaymsg.cpp index d38758b403..75cc325e06 100644 --- a/plugins/Clist_modern/src/modern_awaymsg.cpp +++ b/plugins/Clist_modern/src/modern_awaymsg.cpp @@ -45,7 +45,7 @@ static DWORD amRequestTick = 0; /*
* Add contact handle to requests queue
*/
-static int amAddHandleToChain(HCONTACT hContact)
+static int amAddHandleToChain(MCONTACT hContact)
{
mir_cslockfull lck(amCS);
if (amItems.find((HANDLE)hContact) != NULL)
@@ -60,13 +60,13 @@ static int amAddHandleToChain(HCONTACT hContact) /*
* Gets handle from queue for request
*/
-static HCONTACT amGetCurrentChain()
+static MCONTACT amGetCurrentChain()
{
mir_cslock lck(amCS);
if (amItems.getCount() == 0)
return NULL;
- HCONTACT res = (HCONTACT)amItems[0];
+ MCONTACT res = (MCONTACT)amItems[0];
amItems.remove(0);
return res;
}
@@ -82,7 +82,7 @@ static void amThreadProc(void *) memset(&dnce, 0, sizeof(dnce));
while (!MirandaExiting()) {
- HCONTACT hContact = amGetCurrentChain();
+ MCONTACT hContact = amGetCurrentChain();
while (hContact) {
DWORD time = GetTickCount();
if ((time-amRequestTick) < AMASKPERIOD) {
@@ -143,7 +143,7 @@ BOOL amWakeThread() /*
* Sub to be called outside on status changing to retrieve away message
*/
-void amRequestAwayMsg(HCONTACT hContact)
+void amRequestAwayMsg(MCONTACT hContact)
{
if (!g_CluiData.bInternalAwayMsgDiscovery || !hContact)
return;
diff --git a/plugins/Clist_modern/src/modern_cachefuncs.cpp b/plugins/Clist_modern/src/modern_cachefuncs.cpp index 0066366f4c..44415f83b4 100644 --- a/plugins/Clist_modern/src/modern_cachefuncs.cpp +++ b/plugins/Clist_modern/src/modern_cachefuncs.cpp @@ -54,7 +54,7 @@ void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag ); /*
* Get time zone for contact
*/
-void Cache_GetTimezone(ClcData *dat, HCONTACT hContact)
+void Cache_GetTimezone(ClcData *dat, MCONTACT hContact)
{
ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry(hContact);
if (dat == NULL && pcli->hwndContactTree)
@@ -205,7 +205,7 @@ void CSmileyString::ReplaceSmileys(struct SHORTDATA *dat, ClcCacheEntry *pdnce, sp.Protocolname = pdnce->m_cache_cszProto;
if ( db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) != 1 && pdnce->m_cache_cszProto != NULL && g_szMetaModuleName && strcmp(pdnce->m_cache_cszProto, g_szMetaModuleName) == 0) {
- HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->hContact, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (LPARAM)pdnce->hContact, 0);
if (hContact != 0)
sp.Protocolname = GetContactProto(hContact);
}
diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 9fb0abf495..2cbe60d814 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -162,7 +162,7 @@ static int clcHookSmileyAddOptionsChanged(WPARAM wParam,LPARAM lParam) static int clcHookProtoAck(WPARAM wParam, LPARAM lParam)
{
- return ClcDoProtoAck((HCONTACT)wParam, (ACKDATA*)lParam);
+ return ClcDoProtoAck((MCONTACT)wParam, (ACKDATA*)lParam);
}
static int clcHookIconsChanged(WPARAM wParam, LPARAM lParam)
@@ -259,7 +259,7 @@ static int clcHookSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"ListeningTo"))
pcli->pfnClcBroadcast( INTM_STATUSMSGCHANGED,wParam,0);
else if (!strcmp(cws->szSetting,"Transport") || !strcmp(cws->szSetting,"IsTransported")) {
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
pcli->pfnClcBroadcast( CLM_AUTOREBUILD,wParam,0);
}
}
@@ -274,8 +274,8 @@ static int clcHookDbEventAdded(WPARAM wParam,LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lParam, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((HCONTACT)wParam);
- db_set_dw((HCONTACT)wParam, "CList", "mf_lastmsg", dbei.timestamp);
+ ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam);
+ db_set_dw((MCONTACT)wParam, "CList", "mf_lastmsg", dbei.timestamp);
if (pdnce)
pdnce->dwLastMsgTime = dbei.timestamp;
}
@@ -1257,7 +1257,7 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if ( ServiceExists(MS_MC_ADDTOMETA)) {
ClcContact *contDest, *contSour;
int res;
- HCONTACT handle, hcontact;
+ MCONTACT handle, hcontact;
cliGetRowByIndex(dat,dat->iDragItem,&contSour,NULL);
cliGetRowByIndex(dat,dat->selection,&contDest,NULL);
@@ -1265,23 +1265,23 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) {
if (g_szMetaModuleName && mir_strcmp(contSour->proto,g_szMetaModuleName)) {
if (!contSour->isSubcontact) {
- HCONTACT hDest = contDest->hContact;
+ MCONTACT hDest = contDest->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be converted to MetaContact and '%s' be added to it?"),contDest->szText, contSour->szText);
res = MessageBox(hwnd,Wording,TranslateT("Converting to MetaContact"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
- handle = (HCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hDest,0);
+ handle = (MCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hDest,0);
if (!handle) return 0;
CallService(MS_MC_ADDTOMETA,(WPARAM)hcontact,(LPARAM)handle);
}
}
else {
hcontact = contSour->hContact;
- HCONTACT hfrom = contSour->subcontacts->hContact;
- HCONTACT hdest = contDest->hContact;
+ MCONTACT hfrom = contSour->subcontacts->hContact;
+ MCONTACT hdest = contDest->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be converted to MetaContact and '%s' be added to it (remove it from '%s')?"), contDest->szText,contSour->szText,contSour->subcontacts->szText);
res = MessageBox(hwnd,Wording,TranslateT("Converting to MetaContact (Moving)"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
- HCONTACT handle = (HCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0);
+ MCONTACT handle = (MCONTACT)CallService(MS_MC_CONVERTTOMETA,(WPARAM)hdest,0);
if (!handle)
return 0;
@@ -1303,8 +1303,8 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) {
if (g_szMetaModuleName && strcmp(contSour->proto,g_szMetaModuleName)) {
if (!contSour->isSubcontact) {
- HCONTACT hcontact = contSour->hContact;
- HCONTACT handle = contDest->hContact;
+ MCONTACT hcontact = contSour->hContact;
+ MCONTACT handle = contDest->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be added to metacontact '%s'?"),contSour->szText, contDest->szText);
res = MessageBox(hwnd,Wording,TranslateT("Adding contact to MetaContact"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
@@ -1314,16 +1314,16 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, }
else {
if (contSour->subcontacts == contDest) {
- HCONTACT hsour = contSour->hContact;
+ MCONTACT hsour = contSour->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be default?"),contSour->szText);
res = MessageBox(hwnd,Wording,TranslateT("Set default contact"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1)
CallService(MS_MC_SETDEFAULTCONTACT,(WPARAM)contDest->hContact,(LPARAM)hsour);
}
else {
- HCONTACT hcontact = contSour->hContact;
- HCONTACT hfrom = contSour->subcontacts->hContact;
- HCONTACT handle = contDest->hContact;
+ MCONTACT hcontact = contSour->hContact;
+ MCONTACT hfrom = contSour->subcontacts->hContact;
+ MCONTACT handle = contDest->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be removed from MetaContact '%s' and added to '%s'?"), contSour->szText,contSour->subcontacts->szText,contDest->szText);
res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
@@ -1347,8 +1347,8 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, if (contSour->type == CLCIT_CONTACT) {
if (g_szMetaModuleName && strcmp(contSour->proto,g_szMetaModuleName)) {
if (!contSour->isSubcontact) {
- HCONTACT hcontact = contSour->hContact;
- HCONTACT handle = contDest->subcontacts->hContact;
+ MCONTACT hcontact = contSour->hContact;
+ MCONTACT handle = contDest->subcontacts->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be added to MetaContact '%s'?"), contSour->szText,contDest->subcontacts->szText);
int res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
@@ -1357,9 +1357,9 @@ static LRESULT clcOnLButtonUp(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, }
}
else if (contSour->subcontacts != contDest->subcontacts) {
- HCONTACT hcontact = contSour->hContact;
- HCONTACT hfrom = contSour->subcontacts->hContact;
- HCONTACT handle = contDest->subcontacts->hContact;
+ MCONTACT hcontact = contSour->hContact;
+ MCONTACT hfrom = contSour->subcontacts->hContact;
+ MCONTACT handle = contDest->subcontacts->hContact;
mir_sntprintf(Wording,SIZEOF(Wording),TranslateT("Do you want contact '%s' to be removed from MetaContact '%s' and added to '%s'?"), contSour->szText,contSour->subcontacts->szText,contDest->subcontacts->szText);
int res = MessageBox(hwnd,Wording,TranslateT("Changing MetaContacts (Moving)"),MB_OKCANCEL|MB_ICONQUESTION);
if (res == 1) {
@@ -1476,10 +1476,10 @@ static LRESULT clcOnIntmGroupChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM w memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage));
flags = contact->flags;
}
- pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) {
+ pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) {
NMCLISTCONTROL nm;
- pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
+ pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
if (pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
if (flags & CONTACTF_CHECKED)
@@ -1505,24 +1505,24 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP BOOL needRepaint = FALSE;
WORD status;
RECT iconRect = {0};
- int contacticon = corecli.pfnGetContactIcon((HCONTACT)wParam);
- HCONTACT hSelItem = NULL;
+ int contacticon = corecli.pfnGetContactIcon((MCONTACT)wParam);
+ MCONTACT hSelItem = NULL;
ClcContact *selcontact = NULL;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
status = ID_STATUS_OFFLINE;
else
- status = GetContactCachedStatus((HCONTACT)wParam);
+ status = GetContactCachedStatus((MCONTACT)wParam);
BOOL image_is_special = (LOWORD(contacticon) != (LOWORD(lParam))); //check only base icons
- int nHiddenStatus = CLVM_GetContactHiddenStatus((HCONTACT)wParam, szProto, dat);
+ int nHiddenStatus = CLVM_GetContactHiddenStatus((MCONTACT)wParam, szProto, dat);
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
bool isVisiblebyFilter = (( ( style & CLS_SHOWHIDDEN ) && nHiddenStatus != -1 ) || !nHiddenStatus );
bool ifVisibleByClui = !pcli->pfnIsHiddenMode( dat, status );
bool isVisible = g_CluiData.bFilterEffective&CLVM_FILTER_STATUS ? TRUE : ifVisibleByClui;
- bool isIconChanged = cli_GetContactIcon((HCONTACT)wParam) != LOWORD(lParam);
+ bool isIconChanged = cli_GetContactIcon((MCONTACT)wParam) != LOWORD(lParam);
shouldShow = isVisiblebyFilter && ( isVisible || isIconChanged ) ;
@@ -1531,15 +1531,15 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP if (!pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
- pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
+ pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
recalcScrollBar = 1;
needRepaint = TRUE;
pcli->pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = lParam;
contact->image_is_special = image_is_special;
- pcli->pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
}
}
@@ -1553,7 +1553,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && ((style & CLS_HIDEOFFLINE) || group->hideOffline || g_CluiData.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
needRepaint = TRUE;
recalcScrollBar = 1;
@@ -1601,7 +1601,7 @@ static LRESULT clcOnIntmIconChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ClcContact *contact;
- if (FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE))
+ if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE))
Cache_GetAvatar(dat, contact);
else if (dat->use_avatar_service && !wParam)
UpdateAllAvatars(dat);
@@ -1613,7 +1613,7 @@ static LRESULT clcOnIntmAvatarChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM static LRESULT clcOnIntmTimeZoneChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ClcContact *contact;
- if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE))
+ if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE))
return corecli.pfnContactListControlWndProc(hwnd,msg,wParam,lParam);
if (contact) {
@@ -1628,13 +1628,13 @@ static LRESULT clcOnIntmNameChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wP {
int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
ClcContact *contact;
- if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, FALSE))
+ if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, FALSE))
return ret;
- lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
if (contact) {
Cache_GetText(dat,contact,1);
cliRecalcScrollBar(hwnd,dat);
@@ -1653,7 +1653,7 @@ static LRESULT clcOnIntmApparentModeChanged(ClcData *dat, HWND hwnd, UINT msg, W static LRESULT clcOnIntmStatusMsgChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
ClcContact *contact;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL || IsHContactInfo(hContact) || IsHContactGroup(hContact))
return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
if (!FindItem(hwnd,dat,hContact,&contact,NULL,NULL,FALSE))
@@ -1672,7 +1672,7 @@ static LRESULT clcOnIntmNotOnListChanged(ClcData *dat, HWND hwnd, UINT msg, WPAR DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
ClcContact *contact;
- if (!FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, TRUE))
+ if (!FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE))
return corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
if (contact->type != CLCIT_CONTACT)
@@ -1702,18 +1702,18 @@ static LRESULT clcOnIntmStatusChanged(ClcData *dat, HWND hwnd, UINT msg, WPARAM {
int ret = corecli.pfnContactListControlWndProc(hwnd, msg, wParam, lParam);
if (wParam != 0) {
- ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((HCONTACT)wParam);
+ ClcCacheEntry *pdnce = pcli->pfnGetCacheEntry((MCONTACT)wParam);
if (pdnce && pdnce->m_cache_cszProto) {
pdnce___SetStatus( pdnce, GetStatusForContact(pdnce->hContact,pdnce->m_cache_cszProto));
if (!dat->force_in_dialog && (dat->second_line_show || dat->third_line_show))
gtaRenewText(pdnce->hContact);
- SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon((HCONTACT)wParam));
+ SendMessage(hwnd, INTM_ICONCHANGED, wParam, corecli.pfnGetContactIcon((MCONTACT)wParam));
ClcContact *contact;
- if (FindItem(hwnd, dat, (HCONTACT)wParam, &contact, NULL, NULL, TRUE)) {
+ if (FindItem(hwnd, dat, (MCONTACT)wParam, &contact, NULL, NULL, TRUE)) {
if (contact && contact->type == CLCIT_CONTACT) {
if (!contact->image_is_special && pdnce___GetStatus( pdnce ) > ID_STATUS_OFFLINE)
- contact->iImage = corecli.pfnGetContactIcon((HCONTACT)wParam);
+ contact->iImage = corecli.pfnGetContactIcon((MCONTACT)wParam);
if (contact->isSubcontact && contact->subcontacts && contact->subcontacts->type == CLCIT_CONTACT)
pcli->pfnClcBroadcast(INTM_STATUSCHANGED, (WPARAM)contact->subcontacts->hContact, 0); //forward status changing to host meta contact
}
@@ -1764,7 +1764,7 @@ int ClcUnloadModule() return 0;
}
-int ClcDoProtoAck(HCONTACT wParam, ACKDATA * ack)
+int ClcDoProtoAck(MCONTACT wParam, ACKDATA * ack)
{
if (MirandaExiting()) return 0;
if (ack->type == ACKTYPE_STATUS) {
diff --git a/plugins/Clist_modern/src/modern_clcidents.cpp b/plugins/Clist_modern/src/modern_clcidents.cpp index 26260fd015..93c5c3a9eb 100644 --- a/plugins/Clist_modern/src/modern_clcidents.cpp +++ b/plugins/Clist_modern/src/modern_clcidents.cpp @@ -106,10 +106,10 @@ int cliGetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex) int cliFindItem(HWND hwnd, ClcData *dat, HANDLE hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible)
{
- return FindItem(hwnd, dat, (HCONTACT)hItem, contact, subgroup, isVisible, FALSE);
+ return FindItem(hwnd, dat, (MCONTACT)hItem, contact, subgroup, isVisible, FALSE);
}
-int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts)
+int FindItem(HWND hwnd, ClcData *dat, MCONTACT hItem, ClcContact **contact, ClcGroup **subgroup, int *isVisible, BOOL isIgnoreSubcontacts)
{
int index = 0, i;
int nowVisible = 1;
@@ -140,7 +140,7 @@ int FindItem(HWND hwnd, ClcData *dat, HCONTACT hItem, ClcContact **contact, ClcG if (nowVisible) index++;
if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR)hItem&~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) ||
(IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == hItem) ||
- (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR)hItem&~HCONTACT_ISINFO)))
+ (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR)hItem&~HCONTACT_ISINFO)))
{
if (isVisible) {
if (!nowVisible) *isVisible = 0;
diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index dcb0d89b10..782ac49787 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -46,7 +46,7 @@ void AddSubcontacts(ClcData *dat, ClcContact *cont, BOOL showOfflineHereGroup) cont->SubAllocated = subcount;
int i=0;
for (int j = 0; j < subcount; j++) {
- HCONTACT hsub = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
+ MCONTACT hsub = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
cacheEntry = pcli->pfnGetCacheEntry(hsub);
WORD wStatus = pdnce___GetStatus(cacheEntry);
if (showOfflineHereGroup || (!( db_get_b(NULL,"CLC","MetaHideOfflineSub",SETTING_METAHIDEOFFLINESUB_DEFAULT) && db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT))
@@ -145,7 +145,7 @@ int cli_AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText) return i;
}
-static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, HCONTACT hContact)
+static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = NULL;
WORD apparentMode;
@@ -211,7 +211,7 @@ static void _LoadDataToContact(ClcContact *cont, ClcGroup *group, ClcData *dat, static ClcContact *AddContactToGroup(ClcData *dat,ClcGroup *group, ClcCacheEntry *cacheEntry)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int i;
if (cacheEntry == NULL) return NULL;
if (group == NULL) return NULL;
@@ -259,7 +259,7 @@ void * AddTempGroup(HWND hwnd,ClcData *dat,const TCHAR *szName,DWORD flags,int g return NULL;
}
-void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTotalCount,int checkHideOffline)
+void cli_AddContactToTree(HWND hwnd,ClcData *dat,MCONTACT hContact,int updateTotalCount,int checkHideOffline)
{
ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hContact);
if (dat->IsMetaContactsEnabled && cacheEntry && cacheEntry->m_cache_nHiddenSubcontact)
@@ -277,7 +277,7 @@ void cli_AddContactToTree(HWND hwnd,ClcData *dat,HCONTACT hContact,int updateTot return;
}
-void cli_DeleteItemFromTree(HWND hwnd, HCONTACT hItem)
+void cli_DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
{
ClcData *dat = (ClcData *) GetWindowLongPtr(hwnd, 0);
ClearRowByIndexCache();
@@ -300,16 +300,16 @@ __inline BOOL CLCItems_IsShowOfflineGroup(ClcGroup* group) return (groupFlags&GROUPF_SHOWOFFLINE) != 0;
}
-HCONTACT SaveSelection(ClcData *dat)
+MCONTACT SaveSelection(ClcData *dat)
{
ClcContact *selcontact = NULL;
if (pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) == -1)
return NULL;
- return (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ return (MCONTACT)pcli->pfnContactToHItem(selcontact);
}
-int RestoreSelection(ClcData *dat, HCONTACT hSelected)
+int RestoreSelection(ClcData *dat, MCONTACT hSelected)
{
ClcContact *selcontact = NULL;
ClcGroup *selgroup = NULL;
@@ -353,7 +353,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) dat->list.cl.increment = 50;
dat->needsResort = 1;
- HCONTACT hSelected = SaveSelection(dat);
+ MCONTACT hSelected = SaveSelection(dat);
dat->selection = -1;
dat->HiLightMode = db_get_b(NULL,"CLC","HiLightMode",SETTING_HILIGHTMODE_DEFAULT);
{
@@ -366,7 +366,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) }
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *cacheEntry = NULL;
cont = NULL;
cacheEntry = pcli->pfnGetCacheEntry(hContact);
@@ -432,7 +432,7 @@ void cliRebuildEntireList(HWND hwnd, ClcData *dat) void cli_SortCLC(HWND hwnd, ClcData *dat, int useInsertionSort)
{
- HCONTACT hSelected = SaveSelection(dat);
+ MCONTACT hSelected = SaveSelection(dat);
corecli.pfnSortCLC(hwnd,dat,useInsertionSort);
@@ -470,7 +470,7 @@ int GetNewSelection(ClcGroup *group, int selection, int direction) }
struct SavedContactState_t {
- HCONTACT hContact;
+ MCONTACT hContact;
WORD iExtraImage[EXTRA_ICON_COUNT];
int checked;
};
@@ -619,7 +619,7 @@ ClcContact* cliCreateClcContact() return contact;
}
-ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact )
+ClcCacheEntry* cliCreateCacheItem(MCONTACT hContact )
{
ClcCacheEntry *p = (ClcCacheEntry *)mir_calloc(sizeof( ClcCacheEntry ));
if (p == NULL)
@@ -634,10 +634,10 @@ ClcCacheEntry* cliCreateCacheItem(HCONTACT hContact ) return p;
}
-void cliInvalidateDisplayNameCacheEntry(HCONTACT hContact)
+void cliInvalidateDisplayNameCacheEntry(MCONTACT hContact)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
- corecli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE);
+ if (hContact == INVALID_CONTACT_ID)
+ corecli.pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID);
else {
ClcCacheEntry *p = pcli->pfnGetCacheEntry(hContact);
if (p)
@@ -685,7 +685,7 @@ int cliGetGroupContentsCount(ClcGroup *group, int visibleOnly) * also cares about sub contacts (if meta is active)
*/
-int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szProto, ClcData *dat)
+int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat)
{
int dbHidden = db_get_b(hContact, "CList", "Hidden", 0); // default hidden state, always respect it.
int filterResult = 1;
diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index 652564c0ba..f0933fc4bc 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -35,7 +35,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd,ClcData *dat,UINT msg,WPARAM wPara switch(msg) {
case CLM_DELETEITEM:
- pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
clcSetDelayTimer( TIMERID_DELAYEDRESORTCLC, hwnd, 1 ); //pcli->pfnSortCLC(hwnd, dat, 1);
clcSetDelayTimer( TIMERID_RECALCSCROLLBAR, hwnd, 2 ); //pcli->pfnRecalcScrollBar(hwnd, dat);
return 0;
diff --git a/plugins/Clist_modern/src/modern_clistevents.cpp b/plugins/Clist_modern/src/modern_clistevents.cpp index bf19a6c5c2..841244e6a4 100644 --- a/plugins/Clist_modern/src/modern_clistevents.cpp +++ b/plugins/Clist_modern/src/modern_clistevents.cpp @@ -75,7 +75,7 @@ static int iconsOn; struct NotifyMenuItemExData {
- HCONTACT hContact;
+ MCONTACT hContact;
int iIcon; // icon index in the image list
HICON hIcon; // corresponding icon handle
HANDLE hDbEvent;
@@ -176,7 +176,7 @@ struct CListEvent* cli_AddEvent(CLISTEVENT *cle) }
-int cli_RemoveEvent(HCONTACT hContact, HANDLE hDbEvent)
+int cli_RemoveEvent(MCONTACT hContact, HANDLE hDbEvent)
{
int i;
int res = 0;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 78d7b35238..28db20bfde 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -94,7 +94,7 @@ static IconItem iconList[] = static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam)
{
- BYTE bContactRate = db_get_b((HCONTACT)wParam, "CList", "Rate", 0);
+ BYTE bContactRate = db_get_b((MCONTACT)wParam, "CList", "Rate", 0);
if ( bContactRate > SIZEOF(rates)-1)
bContactRate = SIZEOF(rates)-1;
@@ -149,7 +149,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) mi.hIcon = NULL;
mi.ptszName = LPGENT("Show even if offline");
- mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((HCONTACT)wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
+ mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR | (db_get_b((MCONTACT)wParam, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
mi.pszService = CLUI_FAVTOGGLESHOWOFFLINE;
mi.popupPosition = i+100000000;
mi.position = -100000000;
@@ -165,7 +165,7 @@ static int FAV_OnContactMenuBuild(WPARAM wParam,LPARAM lParam) INT_PTR FAV_SetRate(WPARAM hContact, LPARAM nRate)
{
if (hContact)
- db_set_b((HCONTACT)hContact, "CList", "Rate", (BYTE)nRate);
+ db_set_b((MCONTACT)hContact, "CList", "Rate", (BYTE)nRate);
return 0;
}
@@ -173,7 +173,7 @@ INT_PTR FAV_SetRate(WPARAM hContact, LPARAM nRate) INT_PTR FAV_ToggleShowOffline(WPARAM hContact,LPARAM lParam)
{
if (hContact)
- db_set_b((HCONTACT)hContact, "CList", "noOffline", !db_get_b((HCONTACT)hContact, "CList", "noOffline", 0));
+ db_set_b((MCONTACT)hContact, "CList", "noOffline", !db_get_b((MCONTACT)hContact, "CList", "noOffline", 0));
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clistmod.cpp b/plugins/Clist_modern/src/modern_clistmod.cpp index d7da7a01a5..943fde598e 100644 --- a/plugins/Clist_modern/src/modern_clistmod.cpp +++ b/plugins/Clist_modern/src/modern_clistmod.cpp @@ -42,7 +42,7 @@ int GetContactDisplayName(WPARAM wParam,LPARAM lParam); int CListOptInit(WPARAM wParam,LPARAM lParam);
int SkinOptInit(WPARAM wParam,LPARAM lParam);
int ModernSkinOptInit(WPARAM wParam,LPARAM lParam);
-int EventsProcessContactDoubleClick(HCONTACT hContact);
+int EventsProcessContactDoubleClick(MCONTACT hContact);
INT_PTR TrayIconPauseAutoHide(WPARAM wParam,LPARAM lParam);
@@ -52,7 +52,7 @@ void UninitTrayMenu(); HIMAGELIST hCListImages = NULL;
//returns normal icon or combined with status overlay. Needs to be destroyed.
-HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status)
+HICON cliGetIconFromStatusMode(MCONTACT hContact, const char *szProto,int status)
{
// check if options is turned on
BYTE trayOption = db_get_b(NULL,"CLUI","XStatusTray",SETTING_TRAYOPTION_DEFAULT);
@@ -81,15 +81,15 @@ HICON cliGetIconFromStatusMode(HCONTACT hContact, const char *szProto,int status return ske_ImageList_GetIcon(g_himlCListClc,pcli->pfnIconFromStatusMode(szProto,status,hContact),ILD_NORMAL);
}
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact)
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact)
{
if (hContact && szProto) {
char *szActProto = (char*)szProto;
int nActStatus = nStatus;
- HCONTACT hActContact = hContact;
+ MCONTACT hActContact = hContact;
if (!db_get_b(NULL,"CLC","Meta",SETTING_USEMETAICON_DEFAULT) && g_szMetaModuleName && !mir_strcmp(szActProto,g_szMetaModuleName)) {
// substitute params by mostonline contact datas
- HCONTACT hMostOnlineContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
+ MCONTACT hMostOnlineContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
if (hMostOnlineContact) {
ClcCacheEntry *cacheEntry = pcli->pfnGetCacheEntry(hMostOnlineContact);
if (cacheEntry && cacheEntry->m_cache_cszProto) {
@@ -118,7 +118,7 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact) return corecli.pfnIconFromStatusMode(szProto,nStatus,NULL);
}
-int cli_GetContactIcon(HCONTACT hContact)
+int cli_GetContactIcon(MCONTACT hContact)
{
int res = corecli.pfnGetContactIcon(hContact);
if (res != -1)
diff --git a/plugins/Clist_modern/src/modern_clistsettings.cpp b/plugins/Clist_modern/src/modern_clistsettings.cpp index 83c4edb7bd..f59c355d4a 100644 --- a/plugins/Clist_modern/src/modern_clistsettings.cpp +++ b/plugins/Clist_modern/src/modern_clistsettings.cpp @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "hdr/modern_commonprototypes.h"
#include "hdr/modern_awaymsg.h"
-void InsertContactIntoTree(HCONTACT hContact,int status);
+void InsertContactIntoTree(MCONTACT hContact,int status);
static ClcCacheEntry *displayNameCache;
void CListSettings_FreeCacheItemDataOption( ClcCacheEntry *pDst, DWORD flag );
@@ -36,11 +36,11 @@ static int displayNameCacheSize; BOOL CLM_AUTOREBUILD_WAS_POSTED = FALSE;
SortedList *clistCache = NULL;
-char *GetProtoForContact(HCONTACT hContact);
-int GetStatusForContact(HCONTACT hContact,char *szProto);
+char *GetProtoForContact(MCONTACT hContact);
+int GetStatusForContact(MCONTACT hContact,char *szProto);
TCHAR *UnknownConctactTranslatedName = NULL;
-void InvalidateDNCEbyPointer(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
+void InvalidateDNCEbyPointer(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
static int handleCompare( void* c1, void* c2 )
{
@@ -86,7 +86,7 @@ void FreeDisplayNameCache() }
}
-ClcCacheEntry* cliGetCacheEntry(HCONTACT hContact)
+ClcCacheEntry* cliGetCacheEntry(MCONTACT hContact)
{
if (!clistCache) return NULL;
@@ -205,7 +205,7 @@ int CListSettings_SetToCache(ClcCacheEntry *pSrc, DWORD flag) void cliFreeCacheItem( ClcCacheEntry *p )
{
- HCONTACT hContact = p->hContact;
+ MCONTACT hContact = p->hContact;
TRACEVAR("cliFreeCacheItem hContact = %d",hContact);
p->freeName();
mir_free_and_nil(p->tszGroup);
@@ -299,7 +299,7 @@ void IvalidateDisplayNameCache(DWORD mode) }
}
-void InvalidateDNCEbyPointer(HCONTACT hContact, ClcCacheEntry *pdnce, int SettingType)
+void InvalidateDNCEbyPointer(MCONTACT hContact, ClcCacheEntry *pdnce, int SettingType)
{
if (hContact == NULL || pdnce == NULL)
return;
@@ -344,7 +344,7 @@ void InvalidateDNCEbyPointer(HCONTACT hContact, ClcCacheEntry *pdnce, int Settin pdnce->IsExpanded = -1;
}
-char *GetContactCachedProtocol(HCONTACT hContact)
+char *GetContactCachedProtocol(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = NULL;
cacheEntry = pcli->pfnGetCacheEntry(hContact);
@@ -354,12 +354,12 @@ char *GetContactCachedProtocol(HCONTACT hContact) return NULL;
}
-char* GetProtoForContact(HCONTACT hContact)
+char* GetProtoForContact(MCONTACT hContact)
{
return (char*)CallService(MS_PROTO_GETCONTACTBASEACCOUNT,(WPARAM)hContact,0);
}
-int GetStatusForContact(HCONTACT hContact,char *szProto)
+int GetStatusForContact(MCONTACT hContact,char *szProto)
{
return (szProto) ? (int)(db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) : ID_STATUS_OFFLINE;
}
@@ -393,7 +393,7 @@ LBL_Unknown: isUnknown = false;
}
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
{
ClcCacheEntry *cacheEntry = NULL;
cacheEntry = pcli->pfnGetCacheEntry(hContact);
@@ -407,7 +407,7 @@ int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Stat };
-int GetContactCachedStatus(HCONTACT hContact)
+int GetContactCachedStatus(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = NULL;
cacheEntry = pcli->pfnGetCacheEntry(hContact);
@@ -417,7 +417,7 @@ int GetContactCachedStatus(HCONTACT hContact) int ContactAdded(WPARAM wParam,LPARAM lParam)
{
if (!MirandaExiting()) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode((char*)GetContactCachedProtocol(hContact),ID_STATUS_OFFLINE,hContact),1); ///by FYR
pcli->pfnSortContacts();
}
@@ -426,7 +426,7 @@ int ContactAdded(WPARAM wParam,LPARAM lParam) int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (MirandaExiting() || !pcli || !clistCache || hContact == NULL)
return 0;
@@ -494,7 +494,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) else if (!strcmp(cws->szSetting,"Hidden")) {
InvalidateDNCEbyPointer(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
cli_ChangeContactIcon(hContact,pcli->pfnIconFromStatusMode(szProto,
szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE), hContact),1); //by FYR
}
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp index 2ed245edd2..86db9f4b91 100644 --- a/plugins/Clist_modern/src/modern_clui.cpp +++ b/plugins/Clist_modern/src/modern_clui.cpp @@ -188,7 +188,7 @@ int CLUI::OnEvent_ContactMenuPreBuild(WPARAM wParam, LPARAM lParam) if ( lstrcmp( _T(CLISTCONTROL_CLASS), cls))
hwndClist = pcli->hwndContactList;
- HCONTACT hItem = (HCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
+ MCONTACT hItem = (MCONTACT)SendMessage(hwndClist, CLM_GETSELECTION, 0, 0);
Menu_ShowItem(hRenameMenuItem, hItem != 0);
if (!hItem || !IsHContactContact(hItem) || !db_get_b(NULL,"CList","AvatarsShow",SETTINGS_SHOWAVATARS_DEFAULT)) {
@@ -240,7 +240,7 @@ INT_PTR CLUI::Service_ShowStatusMenu(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
db_set_b(hContact, "CList", "HideContactAvatar", 0);
@@ -250,7 +250,7 @@ INT_PTR CLUI::Service_Menu_ShowContactAvatar(WPARAM wParam,LPARAM lParam) INT_PTR CLUI::Service_Menu_HideContactAvatar(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
db_set_b(hContact, "CList", "HideContactAvatar", 1);
diff --git a/plugins/Clist_modern/src/modern_contact.cpp b/plugins/Clist_modern/src/modern_contact.cpp index a4390b70d6..9607ed864b 100644 --- a/plugins/Clist_modern/src/modern_contact.cpp +++ b/plugins/Clist_modern/src/modern_contact.cpp @@ -42,13 +42,13 @@ struct {ID_STATUS_ONTHEPHONE,150},
{ID_STATUS_OUTTOLUNCH,425}};
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
return (GetContactCachedStatus(hContact));
}
-void cli_ChangeContactIcon(HCONTACT hContact, int iIcon, int add)
+void cli_ChangeContactIcon(MCONTACT hContact, int iIcon, int add)
{
corecli.pfnChangeContactIcon(hContact, iIcon, add);
}
@@ -62,7 +62,7 @@ static int GetStatusModeOrdering(int statusMode) }
-DWORD CompareContacts2_getLMTime(HCONTACT hContact)
+DWORD CompareContacts2_getLMTime(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while(hDbEvent) {
@@ -101,8 +101,8 @@ int CompareContacts2(const ClcContact *contact1,const ClcContact *contact2, int if ((INT_PTR)contact1 < 100 || (INT_PTR)contact2 < 100) return 0;
- HCONTACT a = contact1->hContact;
- HCONTACT b = contact2->hContact;
+ MCONTACT a = contact1->hContact;
+ MCONTACT b = contact2->hContact;
namea = (TCHAR *)contact1->szText;
statusa = GetContactCachedStatus(contact1->hContact);
diff --git a/plugins/Clist_modern/src/modern_gettextasync.cpp b/plugins/Clist_modern/src/modern_gettextasync.cpp index 6194bcb3c2..32ab8042f8 100644 --- a/plugins/Clist_modern/src/modern_gettextasync.cpp +++ b/plugins/Clist_modern/src/modern_gettextasync.cpp @@ -42,7 +42,7 @@ int CLUI_SyncGetShortData(WPARAM wParam, LPARAM lParam); #define gtaunlock LeaveCriticalSection( >aCS )
typedef struct _GetTextAsyncItem {
- HCONTACT hContact;
+ MCONTACT hContact;
ClcData *dat;
struct _GetTextAsyncItem *Next;
} GTACHAINITEM;
@@ -134,7 +134,7 @@ BOOL gtaWakeThread() return FALSE;
}
-int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact)
+int gtaAddRequest(ClcData *dat,ClcContact *contact,MCONTACT hContact)
{
if (MirandaExiting()) return 0;
gtalock;
@@ -159,7 +159,7 @@ int gtaAddRequest(ClcData *dat,ClcContact *contact,HCONTACT hContact) return FALSE;
}
-void gtaRenewText(HCONTACT hContact)
+void gtaRenewText(MCONTACT hContact)
{
gtaAddRequest(NULL,NULL, hContact);
}
diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index db2a5a4ae0..e4166f89e9 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -165,7 +165,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i case TC_TEXT2:
{
int tmp = 0;
- HCONTACT hContact = pdnce->hContact;
+ MCONTACT hContact = pdnce->hContact;
if (dat->second_line_show && pdnce->szSecondLineText && pdnce->szSecondLineText[0] )
{
tmp = dat->fontModernInfo[FONTID_SECONDLINE].fontHeight;
@@ -192,7 +192,7 @@ int mod_CalcRowHeight_worker(ClcData *dat, HWND hwnd, ClcContact *contact, int i case TC_TEXT3:
{
- HCONTACT hContact = pdnce->hContact;
+ MCONTACT hContact = pdnce->hContact;
int tmp = 0;
if (dat->third_line_show && pdnce->szThirdLineText && pdnce->szThirdLineText[0]) {
tmp = dat->fontModernInfo[FONTID_THIRDLINE].fontHeight;
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 74159b8b68..62eae4b80a 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -4081,7 +4081,7 @@ HICON ske_CreateJoinedIcon(HICON hBottom, HICON hTop, BYTE alpha) #define SKINSETSECTION "SkinnedSettings"
-BOOL SkinDBGetContactSetting(HCONTACT hContact, const char* szSection, const char*szKey, DBVARIANT * retdbv, BOOL * bSkinned )
+BOOL SkinDBGetContactSetting(MCONTACT hContact, const char* szSection, const char*szKey, DBVARIANT * retdbv, BOOL * bSkinned )
{
if (!hContact) { //only for not contact settings
char *szSkinKey;
@@ -4096,7 +4096,7 @@ BOOL SkinDBGetContactSetting(HCONTACT hContact, const char* szSection, const cha return db_get(hContact, szSection, szKey, retdbv);
}
-BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault)
+BYTE SkinDBGetContactSettingByte(MCONTACT hContact, const char* szSection, const char*szKey, BYTE bDefault)
{
DBVARIANT dbv = { 0 };
BOOL bSkinned = FALSE;
@@ -4115,7 +4115,7 @@ BYTE SkinDBGetContactSettingByte(HCONTACT hContact, const char* szSection, const return bDefault;
}
-WORD SkinDBGetContactSettingWord(HCONTACT hContact, const char* szSection, const char*szKey, WORD wDefault)
+WORD SkinDBGetContactSettingWord(MCONTACT hContact, const char* szSection, const char*szKey, WORD wDefault)
{
BOOL bSkinned = FALSE;
DBVARIANT dbv = { 0 };
@@ -4132,7 +4132,7 @@ WORD SkinDBGetContactSettingWord(HCONTACT hContact, const char* szSection, const return wDefault;
}
-DWORD SkinDBGetContactSettingDword(HCONTACT hContact, const char* szSection, const char*szKey, DWORD dwDefault)
+DWORD SkinDBGetContactSettingDword(MCONTACT hContact, const char* szSection, const char*szKey, DWORD dwDefault)
{
DBVARIANT dbv = { 0 };
BOOL bSkinned = FALSE;
diff --git a/plugins/Clist_modern/src/modern_viewmodebar.cpp b/plugins/Clist_modern/src/modern_viewmodebar.cpp index db1f1e8b62..135448605c 100644 --- a/plugins/Clist_modern/src/modern_viewmodebar.cpp +++ b/plugins/Clist_modern/src/modern_viewmodebar.cpp @@ -164,7 +164,7 @@ static void ShowPage(HWND hwnd, int page) }
}
-static int UpdateClistItem(HCONTACT hContact, DWORD mask)
+static int UpdateClistItem(MCONTACT hContact, DWORD mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
@@ -188,8 +188,8 @@ static void UpdateStickies() DWORD localMask;
int i;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HCONTACT hItem = (HCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, (BYTE)db_get_dw(hContact, CLVM_MODULE, g_szModename, 0) ? 1 : 0);
localMask = HIWORD(db_get_dw(hContact, CLVM_MODULE, g_szModename, 0));
@@ -450,7 +450,7 @@ void SaveState() ptrA szModeName(mir_utf8encodeT(szTempModeName));
DWORD dwGlobalMask = GetMaskForItem(hInfoItem);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem == NULL)
continue;
@@ -656,7 +656,7 @@ void DeleteViewMode( char * szName ) SetWindowText(hwndSelector, TranslateT("All contacts"));
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_dw(hContact, CLVM_MODULE, szName, -1) != -1)
db_set_dw(hContact, CLVM_MODULE, szName, 0);
}
@@ -844,7 +844,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case IDC_CLEARALL:
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp index 4f406eee21..648071ca5e 100644 --- a/plugins/Clist_mw/src/clc.cpp +++ b/plugins/Clist_mw/src/clc.cpp @@ -48,7 +48,7 @@ static int stopStatusUpdater = 0; void StatusUpdaterThread(void*)
{
int i,curdelay,lastcheck = 0;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST);
@@ -143,9 +143,9 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L case INTM_ICONCHANGED:
{
int recalcScrollBar = 0,shouldShow;
- HCONTACT hSelItem = NULL;
+ MCONTACT hSelItem = NULL;
struct ClcContact *selcontact = NULL;
- ClcCacheEntry *cacheEntry = GetContactFullCacheEntry((HCONTACT)wParam);
+ ClcCacheEntry *cacheEntry = GetContactFullCacheEntry((MCONTACT)wParam);
WORD status;
int needsResort = 0;
@@ -158,21 +158,21 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L // this means an offline msg is flashing, so the contact should be shown
shouldShow = (GetWindowLongPtr(hwnd,GWL_STYLE) & CLS_SHOWHIDDEN || !cacheEntry->bIsHidden) &&
- (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((HCONTACT)wParam) != LOWORD(lParam));
+ (!pcli->pfnIsHiddenMode(dat, status) || cacheEntry->noHiddenOffline || pcli->pfnGetContactIcon((MCONTACT)wParam) != LOWORD(lParam));
ClcContact *contact;
ClcGroup *group;
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
- AddContactToTree(hwnd, dat, (HCONTACT)wParam, 0, 0);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
+ AddContactToTree(hwnd, dat, (MCONTACT)wParam, 0, 0);
needsResort = 1;
recalcScrollBar = 1;
FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = (WORD)lParam;
- pcli->pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ pcli->pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
}
}
@@ -185,7 +185,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if ( !shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection>=0 && GetRowByIndex(dat,dat->selection,&selcontact,NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
RemoveItemFromGroup(hwnd,group,contact,0);
recalcScrollBar = 1;
dat->needsResort = 1;
@@ -222,7 +222,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L ClcGroup *group;
if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL) && contact != NULL) {
contact->flags &= ~CONTACTF_STATUSMSG;
- if (!db_get_ts((HCONTACT)wParam, "CList", "StatusMsg", &dbv)) {
+ if (!db_get_ts((MCONTACT)wParam, "CList", "StatusMsg", &dbv)) {
int j;
if (dbv.ptszVal == NULL || _tcslen(dbv.ptszVal) == 0) break;
lstrcpyn(contact->szStatusMsg, dbv.ptszVal, SIZEOF(contact->szStatusMsg));
diff --git a/plugins/Clist_mw/src/clc.h b/plugins/Clist_mw/src/clc.h index a64b3e055b..d48f962476 100644 --- a/plugins/Clist_mw/src/clc.h +++ b/plugins/Clist_mw/src/clc.h @@ -92,8 +92,8 @@ int AddInfoItemToGroup(ClcGroup *group,int flags,const TCHAR *pszText); void FreeContact(struct ClcContact *p);
void RebuildEntireList(HWND hwnd,struct ClcData *dat);
ClcGroup *RemoveItemFromGroup(HWND hwnd,ClcGroup *group,struct ClcContact *contact,int updateTotalCount);
-void DeleteItemFromTree(HWND hwnd, HCONTACT hItem);
-void AddContactToTree(HWND hwnd, struct ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline);
+void DeleteItemFromTree(HWND hwnd, MCONTACT hItem);
+void AddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort);
int GetGroupContentsCount(ClcGroup *group,int visibleOnly);
int GetNewSelection(ClcGroup *group,int selection, int direction);
@@ -124,8 +124,8 @@ void UnregisterFileDropping(HWND hwnd); //cluiservices.c
void FreeProtocolData( void );
-int GetContactCachedStatus(HCONTACT hContact);
-char *GetContactCachedProtocol(HCONTACT hContact);
+int GetContactCachedStatus(MCONTACT hContact);
+char *GetContactCachedProtocol(MCONTACT hContact);
#define CLUI_SetDrawerService "CLUI/SETDRAWERSERVICE"
typedef struct {
diff --git a/plugins/Clist_mw/src/clcidents.cpp b/plugins/Clist_mw/src/clcidents.cpp index 20c361e321..967e13abd3 100644 --- a/plugins/Clist_mw/src/clcidents.cpp +++ b/plugins/Clist_mw/src/clcidents.cpp @@ -80,7 +80,7 @@ int GetRowsPriorTo(ClcGroup *group,ClcGroup *subgroup,int contactIndex) return -1;
}
-ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,HCONTACT hContact)
+ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,MCONTACT hContact)
{
if (hContact == 0)
return NULL;
@@ -107,11 +107,11 @@ ClcCacheEntry *GetCLCFullCacheEntry(struct ClcData *dat,HCONTACT hContact) return (pdnce);
}
-void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact)
+void ClearClcContactCache(struct ClcData *dat,MCONTACT hContact)
{
ClcCacheEntry *cacheEntry;
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
int i,tick;
tick = GetTickCount();
@@ -133,7 +133,7 @@ void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact) }
}
-void SetClcContactCacheItem(struct ClcData *dat, HCONTACT hContact, void *contact)
+void SetClcContactCacheItem(struct ClcData *dat, MCONTACT hContact, void *contact)
{
ClcCacheEntry *cacheEntry;
if ( !IsHContactGroup(hContact) && !IsHContactInfo(hContact)) {
@@ -153,7 +153,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c if (isVisible == NULL && hItem != NULL && subgroup == NULL && !IsHContactGroup(hItem) && !IsHContactInfo(hItem)) {
//try use cache
- ClcCacheEntry *cacheEntry = GetCLCFullCacheEntry(dat, (HCONTACT)hItem);
+ ClcCacheEntry *cacheEntry = GetCLCFullCacheEntry(dat, (MCONTACT)hItem);
if (cacheEntry != NULL) {
if (cacheEntry->ClcContact == NULL) {
int *isv = {0};
@@ -216,7 +216,7 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, struct ClcContact **c if (group->cl.items[group->scanIndex]->type == CLCIT_CONTACT &&
group->cl.items[group->scanIndex]->SubAllocated>0)
for (i = 1; i<=group->cl.items[group->scanIndex]->SubAllocated; i++)
- if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == (HCONTACT)hItem) {
+ if (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->subcontacts[i-1].hContact == (MCONTACT)hItem) {
if (contact) *contact = &group->cl.items[group->scanIndex]->subcontacts[i-1];
if (subgroup) *subgroup = group;
return 1;
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp index ff0e148a15..93359b6deb 100644 --- a/plugins/Clist_mw/src/clcitems.cpp +++ b/plugins/Clist_mw/src/clcitems.cpp @@ -36,7 +36,7 @@ extern void (*saveFreeGroup)(ClcGroup *p); //routines for managing adding/removal of items in the list, including sorting
-extern void ClearClcContactCache(struct ClcData *dat,HCONTACT hContact);
+extern void ClearClcContactCache(struct ClcData *dat,MCONTACT hContact);
void AddSubcontacts(struct ClcContact * cont)
{
@@ -51,7 +51,7 @@ void AddSubcontacts(struct ClcContact * cont) cont->SubAllocated = subcount;
i = 0;
for (j = 0; j<subcount; j++) {
- HCONTACT hsub = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
+ MCONTACT hsub = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)cont->hContact, j);
cacheEntry = GetContactFullCacheEntry(hsub);
if ( !(db_get_b(NULL,"CLC","MetaHideOfflineSub",1) && db_get_b(NULL, "CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) ||
cacheEntry->status != ID_STATUS_OFFLINE )
@@ -114,7 +114,7 @@ static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group, char *szProto;
WORD apparentMode;
DWORD idleMode;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
int i;
int img = -1;
@@ -182,7 +182,7 @@ static struct ClcContact* AddContactToGroup(struct ClcData *dat,ClcGroup *group, return group->cl.items[i];
}
-void AddContactToTree(HWND hwnd, ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline)
+void AddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
{
if ( FindItem(hwnd,dat,(HANDLE)hContact,NULL,NULL,NULL) == 1)
return;
@@ -274,7 +274,7 @@ ClcGroup *RemoveItemFromGroup(HWND hwnd,ClcGroup *group,struct ClcContact *conta return group;
}
-void DeleteItemFromTree(HWND hwnd, HCONTACT hItem)
+void DeleteItemFromTree(HWND hwnd, MCONTACT hItem)
{
struct ClcContact *contact;
ClcGroup *group;
@@ -326,7 +326,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) int tick = GetTickCount();
ClearRowByIndexCache();
- ClearClcContactCache(dat, (HCONTACT)INVALID_HANDLE_VALUE);
+ ClearClcContactCache(dat, INVALID_CONTACT_ID);
dat->list.expanded = 1;
dat->list.hideOffline = db_get_b(NULL,"CLC","HideOfflineRoot",0);
@@ -348,7 +348,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat) }
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *cacheEntry;
cont = NULL;
cacheEntry = GetContactFullCacheEntry(hContact);
@@ -513,7 +513,7 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort) struct SavedContactState_t
{
- HCONTACT hContact;
+ MCONTACT hContact;
WORD iExtraImage[EXTRA_ICON_COUNT];
int checked;
};
diff --git a/plugins/Clist_mw/src/clist.h b/plugins/Clist_mw/src/clist.h index 7b7b2e1589..dad33fa285 100644 --- a/plugins/Clist_mw/src/clist.h +++ b/plugins/Clist_mw/src/clist.h @@ -26,12 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define _CLIST_H_
void LoadContactTree(void);
-int ExtIconFromStatusMode(HCONTACT hContact, const char *szProto,int status);
-HTREEITEM GetTreeItemByHContact(HCONTACT hContact);
+int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status);
+HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
void TrayIconUpdateWithImageList(int iImage,const char *szNewTip,char *szPreferredProto);
void SortContacts(void);
-void ChangeContactIcon(HCONTACT hContact,int iIcon,int add);
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
+void ChangeContactIcon(MCONTACT hContact,int iIcon,int add);
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status);
struct ClcCacheEntry : public ClcCacheEntryBase
{
@@ -50,6 +50,6 @@ struct ClcCacheEntry : public ClcCacheEntryBase boolean isUnknown;
};
-ClcCacheEntry* GetContactFullCacheEntry(HCONTACT hContact);
+ClcCacheEntry* GetContactFullCacheEntry(MCONTACT hContact);
#endif
\ No newline at end of file diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp index be79bfcfcf..13720def98 100644 --- a/plugins/Clist_mw/src/clistmod.cpp +++ b/plugins/Clist_mw/src/clistmod.cpp @@ -42,17 +42,17 @@ extern BYTE nameOrder[]; static HANDLE hSettingChanged, hProtoAckHook;
/////////// End by FYR ////////
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact)
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact)
{
int result = -1;
if (hContact && szProto) {
char * szActProto = (char*)szProto;
int nActStatus = nStatus;
- HCONTACT hActContact = hContact;
+ MCONTACT hActContact = hContact;
if ( !db_get_b(NULL,"CLC","Meta",0) && !strcmp(szActProto,"MetaContacts")) {
// substitute params by mostonline contact datas
- HCONTACT hMostOnlineContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
- if (hMostOnlineContact && hMostOnlineContact != (HCONTACT)CALLSERVICE_NOTFOUND) {
+ MCONTACT hMostOnlineContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hActContact, 0);
+ if (hMostOnlineContact && hMostOnlineContact != (MCONTACT)CALLSERVICE_NOTFOUND) {
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hMostOnlineContact);
if (cacheEntry && cacheEntry->szProto) {
szActProto = cacheEntry->szProto;
@@ -75,14 +75,14 @@ int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact) ////////// By FYR/////////////
-int ExtIconFromStatusMode(HCONTACT hContact, const char *szProto,int status)
+int ExtIconFromStatusMode(MCONTACT hContact, const char *szProto,int status)
{
/* if ( db_get_b( NULL, "CLC", "Meta", 0 ) == 1 )
return pcli->pfnIconFromStatusMode(szProto,status,hContact);
if ( szProto != NULL ) {
if (strcmp(szProto,"MetaContacts") == 0 ) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(UINT)hContact,0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(UINT)hContact,0);
if ( hContact != 0 ) {
szProto = GetContactProto((UINT)hContact,0);
status = db_get_w(hContact,szProto,"Status",ID_STATUS_OFFLINE);
@@ -128,7 +128,7 @@ static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam) int LoadContactListModule(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_s(hContact, "CList", "StatusMsg", "");
hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
diff --git a/plugins/Clist_mw/src/clistopts.cpp b/plugins/Clist_mw/src/clistopts.cpp index c85b67c4f2..1d6d5917f5 100644 --- a/plugins/Clist_mw/src/clistopts.cpp +++ b/plugins/Clist_mw/src/clistopts.cpp @@ -51,7 +51,7 @@ static INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
case WM_USER+1:
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING * ws = (DBCONTACTWRITESETTING *)lParam;
if ( hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL
&& lstrcmpiA(ws->szModule,"CList") == 0 && lstrcmpiA(ws->szSetting,"UseGroups") == 0
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp index 29a14487cf..43883dfd95 100644 --- a/plugins/Clist_mw/src/clistsettings.cpp +++ b/plugins/Clist_mw/src/clistsettings.cpp @@ -25,12 +25,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
#include "clist.h"
-TCHAR *GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown);
-char *GetProtoForContact(HCONTACT hContact);
-int GetStatusForContact(HCONTACT hContact,char *szProto);
+TCHAR *GetNameForContact(MCONTACT hContact,int flag,boolean *isUnknown);
+char *GetProtoForContact(MCONTACT hContact);
+int GetStatusForContact(MCONTACT hContact,char *szProto);
TCHAR *UnknownConctactTranslatedName;
extern boolean OnModulesLoadedCalled;
-void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
+void InvalidateDisplayNameCacheEntryByPDNE(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType);
static int handleCompare( ClcCacheEntry* c1, ClcCacheEntry* c2 )
{
@@ -46,7 +46,7 @@ void InitDisplayNameCache(SortedList *list) list->increment = CallService(MS_DB_CONTACT_GETCOUNT,0,0)+1;
i = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *pdnce = (ClcCacheEntry *)mir_calloc(sizeof(ClcCacheEntry));
pdnce->hContact = hContact;
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,0);
@@ -143,7 +143,7 @@ void CheckPDNCE(ClcCacheEntry *_pdnce) pdnce->IsExpanded = db_get_b(pdnce->hContact,"CList","Expanded",0);
}
-void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnce,int SettingType)
+void InvalidateDisplayNameCacheEntryByPDNE(MCONTACT hContact,ClcCacheEntry *pdnce,int SettingType)
{
if ( hContact == NULL || pdnce == NULL )
return;
@@ -192,7 +192,7 @@ void InvalidateDisplayNameCacheEntryByPDNE(HCONTACT hContact,ClcCacheEntry *pdnc pdnce->IsExpanded = -1;
}
-char *GetContactCachedProtocol(HCONTACT hContact)
+char *GetContactCachedProtocol(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry&&cacheEntry->szProto)
@@ -201,21 +201,21 @@ char *GetContactCachedProtocol(HCONTACT hContact) return NULL;
}
-char *GetProtoForContact(HCONTACT hContact)
+char *GetProtoForContact(MCONTACT hContact)
{
return mir_strdup(GetContactProto(hContact));
}
-int GetStatusForContact(HCONTACT hContact,char *szProto)
+int GetStatusForContact(MCONTACT hContact,char *szProto)
{
int status = ID_STATUS_OFFLINE;
if (szProto)
- status = db_get_w((HCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ status = db_get_w((MCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
return (status);
}
-TCHAR* GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown)
+TCHAR* GetNameForContact(MCONTACT hContact,int flag,boolean *isUnknown)
{
TCHAR* result = pcli->pfnGetContactDisplayName(hContact, flag | GCDNF_NOCACHE);
@@ -229,7 +229,7 @@ TCHAR* GetNameForContact(HCONTACT hContact,int flag,boolean *isUnknown) return result;
}
-ClcCacheEntry *GetContactFullCacheEntry(HCONTACT hContact)
+ClcCacheEntry *GetContactFullCacheEntry(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL)
@@ -238,7 +238,7 @@ ClcCacheEntry *GetContactFullCacheEntry(HCONTACT hContact) return NULL;
}
-int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
+int GetContactInfosForSort(MCONTACT hContact,char **Proto,TCHAR **Name,int *Status)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry != NULL)
@@ -250,7 +250,7 @@ int GetContactInfosForSort(HCONTACT hContact,char **Proto,TCHAR **Name,int *Stat return 0;
}
-int GetContactCachedStatus(HCONTACT hContact)
+int GetContactCachedStatus(MCONTACT hContact)
{
ClcCacheEntry *cacheEntry = (ClcCacheEntry *)pcli->pfnGetCacheEntry(hContact);
if (cacheEntry&&cacheEntry->status != 0) return cacheEntry->status;
@@ -260,7 +260,7 @@ int GetContactCachedStatus(HCONTACT hContact) int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// Early exit
if (hContact == NULL)
@@ -315,7 +315,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) if ( !strcmp(cws->szSetting,"Hidden")) {
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,cws->value.type);
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact, szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)), 1); //by FYR
}
}
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp index 1dffd90f71..4ed273132a 100644 --- a/plugins/Clist_mw/src/clui.cpp +++ b/plugins/Clist_mw/src/clui.cpp @@ -93,7 +93,7 @@ static int CluiModulesLoaded(WPARAM wParam,LPARAM lParam) PostMessage(pcli->hwndContactList,M_CREATECLC,0,0);
OnModulesLoadedCalled = TRUE;
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)INVALID_HANDLE_VALUE);
+ pcli->pfnInvalidateDisplayNameCacheEntry(INVALID_CONTACT_ID);
InitGroupMenus();
RegisterProtoIconsForAllProtoIconLib();
return 0;
diff --git a/plugins/Clist_mw/src/commonheaders.h b/plugins/Clist_mw/src/commonheaders.h index 70dffe6570..ed78d84707 100644 --- a/plugins/Clist_mw/src/commonheaders.h +++ b/plugins/Clist_mw/src/commonheaders.h @@ -88,7 +88,7 @@ extern int __cdecl MyStrCmpiT(const TCHAR *a, const TCHAR *b); extern DWORD exceptFunction(LPEXCEPTION_POINTERS EP);
-extern int (*saveIconFromStatusMode)(const char *szProto, int nStatus, HCONTACT hContact);
+extern int (*saveIconFromStatusMode)(const char *szProto, int nStatus, MCONTACT hContact);
//from bkg options
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp index a41cc99992..fa87740548 100644 --- a/plugins/Clist_mw/src/contact.cpp +++ b/plugins/Clist_mw/src/contact.cpp @@ -27,8 +27,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "clist.h"
extern HANDLE hContactIconChangedEvent;
-extern int GetContactCachedStatus(HCONTACT hContact);
-extern char *GetContactCachedProtocol(HCONTACT hContact);
+extern int GetContactCachedStatus(MCONTACT hContact);
+extern char *GetContactCachedProtocol(MCONTACT hContact);
int sortByStatus;
static int sortByProto;
@@ -47,7 +47,7 @@ struct { {ID_STATUS_ONTHEPHONE,150},
{ID_STATUS_OUTTOLUNCH,425}};
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
/*
@@ -60,7 +60,7 @@ static int GetContactStatus(HCONTACT hContact) return (GetContactCachedStatus(hContact));
}
-void ChangeContactIcon(HCONTACT hContact,int iIcon,int add)
+void ChangeContactIcon(MCONTACT hContact,int iIcon,int add)
{
//clui MS_CLUI_CONTACTADDED MS_CLUI_CONTACTSETICON this methods is null
//CallService(add?MS_CLUI_CONTACTADDED:MS_CLUI_CONTACTSETICON,(WPARAM)hContact,iIcon);
@@ -87,7 +87,7 @@ void LoadContactTree(void) int hideOffline = db_get_b(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ClcCacheEntry *cacheEntry = GetContactFullCacheEntry(hContact);
if (cacheEntry == NULL) {
MessageBoxA(0,"Fail To Get CacheEntry for hContact","!!!!!",0);
@@ -114,7 +114,7 @@ void LoadContactTree(void) int CompareContacts( const struct ClcContact *contact1, const struct ClcContact *contact2 )
{
- HCONTACT a = contact1->hContact, b = contact2->hContact;
+ MCONTACT a = contact1->hContact, b = contact2->hContact;
TCHAR *namea,*nameb;
int statusa,statusb;
char *szProto1,*szProto2;
@@ -167,7 +167,7 @@ void SortContacts(void) INT_PTR ContactChangeGroup(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CallService(MS_CLUI_CONTACTDELETED,wParam,0);
if ((HANDLE)lParam == NULL)
diff --git a/plugins/Clist_mw/src/init.cpp b/plugins/Clist_mw/src/init.cpp index 940927a4b3..78b9f51a9a 100644 --- a/plugins/Clist_mw/src/init.cpp +++ b/plugins/Clist_mw/src/init.cpp @@ -67,8 +67,8 @@ void SortCLC(HWND hwnd,struct ClcData *dat,int useInsertionSort); INT_PTR ( *saveTrayIconProcessMessage )(WPARAM wParam,LPARAM lParam);
INT_PTR TrayIconProcessMessage(WPARAM wParam,LPARAM lParam);
-int (*saveIconFromStatusMode)(const char *szProto,int nStatus, HCONTACT hContact);
-int cli_IconFromStatusMode(const char *szProto,int nStatus, HCONTACT hContact);
+int (*saveIconFromStatusMode)(const char *szProto,int nStatus, MCONTACT hContact);
+int cli_IconFromStatusMode(const char *szProto,int nStatus, MCONTACT hContact);
//from clcfonts
void RegisterCListFonts( void );
@@ -140,7 +140,7 @@ static struct ClcContact* fnCreateClcContact( void ) return (struct ClcContact*)mir_calloc( sizeof( struct ClcContact ));
}
-static ClcCacheEntry *fnCreateCacheItem(HCONTACT hContact )
+static ClcCacheEntry *fnCreateCacheItem(MCONTACT hContact )
{
ClcCacheEntry *p = (ClcCacheEntry *)mir_calloc( sizeof( ClcCacheEntry ));
if ( p )
diff --git a/plugins/Clist_nicer/src/Include/clc.h b/plugins/Clist_nicer/src/Include/clc.h index afb5a7ece5..9bec318541 100644 --- a/plugins/Clist_nicer/src/Include/clc.h +++ b/plugins/Clist_nicer/src/Include/clc.h @@ -103,7 +103,7 @@ typedef struct _OrderTreeData struct TExtraCache
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hTimeZone;
BYTE valid;
TCHAR *statusMsg;
@@ -121,7 +121,7 @@ struct ClcContact : public ClcContactBase BOOL bIsMeta;
BYTE xStatus;
int xStatusIcon;
- HCONTACT hSubContact;
+ MCONTACT hSubContact;
char *metaProto;
DWORD codePage;
WORD wStatus;
@@ -233,7 +233,7 @@ struct TCluiData { HMENU hMenuNotify;
int iLastEventAdded;
int wNextMenuID;
- HCONTACT hUpdateContact;
+ MCONTACT hUpdateContact;
DWORD sortTimer;
TCHAR *szNoEvents;
BOOL forceResize;
@@ -329,7 +329,7 @@ struct IconDesc { };
struct NotifyMenuItemExData {
- HCONTACT hContact;
+ MCONTACT hContact;
int iIcon; // icon index in the image list
HICON hIcon; // corresponding icon handle
HANDLE hDbEvent;
@@ -357,7 +357,7 @@ HANDLE ContactToItemHandle(ClcContact *contact, DWORD *nmFlags); //clcitems.c
void RebuildEntireList(HWND hwnd, struct ClcData *dat);
-DWORD INTSORT_GetLastMsgTime(HCONTACT hContact);
+DWORD INTSORT_GetLastMsgTime(MCONTACT hContact);
//clcmsgs.c
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -409,10 +409,10 @@ void ConfigureEventArea(HWND hwnd); void ClearIcons(int mode);
void SkinDrawBg(HWND hwnd, HDC hdc);
int GetBasicFontID(ClcContact * contact);
-extern int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szStatus, struct ClcData *dat);
+extern int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szStatus, struct ClcData *dat);
void CreateViewModeFrame();
-int GetExtraCache(HCONTACT hContact, char *szProto);
-void ReloadExtraInfo(HCONTACT hContact);
+int GetExtraCache(MCONTACT hContact, char *szProto);
+void ReloadExtraInfo(MCONTACT hContact);
void LoadAvatarForContact(ClcContact *p);
void ApplyViewMode(const char *name);
@@ -425,7 +425,7 @@ void __inline PaintItem(HDC hdcMem, ClcGroup *group, ClcContact *contact, int in void Reload3dBevelColors();
void ReloadThemedOptions();
void SetButtonToSkinned();
-void RTL_DetectAndSet(ClcContact *contact, HCONTACT hContact);
+void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact);
void RTL_DetectGroupName(ClcContact *group);
void CLN_LoadAllIcons(BOOL mode);
void ReloadSkinItemsToCache();
diff --git a/plugins/Clist_nicer/src/Include/clist.h b/plugins/Clist_nicer/src/Include/clist.h index 51c769d031..6f85122933 100644 --- a/plugins/Clist_nicer/src/Include/clist.h +++ b/plugins/Clist_nicer/src/Include/clist.h @@ -23,8 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
void LoadContactTree(void);
-int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON *phIcon);
-HTREEITEM GetTreeItemByHContact(HCONTACT hContact);
+int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon);
+HTREEITEM GetTreeItemByHContact(MCONTACT hContact);
void SortContacts(void);
#define CLUIINTM_REDRAW (WM_USER+100)
diff --git a/plugins/Clist_nicer/src/Include/config.h b/plugins/Clist_nicer/src/Include/config.h index e40a92d36c..30317670ec 100644 --- a/plugins/Clist_nicer/src/Include/config.h +++ b/plugins/Clist_nicer/src/Include/config.h @@ -52,34 +52,34 @@ class cfg public:
static void init();
- static DWORD getDword(const HCONTACT hContact, const char *szModule, const char *szSetting, DWORD uDefault);
+ static DWORD getDword(const MCONTACT hContact, const char *szModule, const char *szSetting, DWORD uDefault);
static DWORD getDword(const char *szModule, const char *szSetting, DWORD uDefault);
static DWORD getDword(const char *szSetting, DWORD uDefault);
- static WORD getWord(const HCONTACT hContact, const char *szModule, const char *szSetting, WORD uDefault);
+ static WORD getWord(const MCONTACT hContact, const char *szModule, const char *szSetting, WORD uDefault);
static WORD getWord(const char *szModule, const char *szSetting, WORD uDefault);
static WORD getWord(const char *szSetting, WORD uDefault);
- static int getByte(const HCONTACT hContact, const char *szModule, const char *szSetting, int uDefault);
+ static int getByte(const MCONTACT hContact, const char *szModule, const char *szSetting, int uDefault);
static int getByte(const char *szModule, const char *szSetting, int uDefault);
static int getByte(const char *szSetting, int uDefault);
- static INT_PTR getTString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
- static INT_PTR getString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+ static INT_PTR getTString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+ static INT_PTR getString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
- static INT_PTR writeDword(const HCONTACT hContact, const char *szModule, const char *szSetting, DWORD value);
+ static INT_PTR writeDword(const MCONTACT hContact, const char *szModule, const char *szSetting, DWORD value);
static INT_PTR writeDword(const char *szModule, const char *szSetting, DWORD value);
- static INT_PTR writeWord(const HCONTACT hContact, const char *szModule, const char *szSetting, WORD value);
+ static INT_PTR writeWord(const MCONTACT hContact, const char *szModule, const char *szSetting, WORD value);
static INT_PTR writeWord(const char *szModule, const char *szSetting, WORD value);
- static INT_PTR writeByte(const HCONTACT hContact, const char *szModule, const char *szSetting, BYTE value);
+ static INT_PTR writeByte(const MCONTACT hContact, const char *szModule, const char *szSetting, BYTE value);
static INT_PTR writeByte(const char *szModule, const char *szSetting, BYTE value);
- static INT_PTR writeTString(const HCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *st);
- static INT_PTR writeString(const HCONTACT hContact, const char *szModule, const char *szSetting, const char *st);
+ static INT_PTR writeTString(const MCONTACT hContact, const char *szModule, const char *szSetting, const TCHAR *st);
+ static INT_PTR writeString(const MCONTACT hContact, const char *szModule, const char *szSetting, const char *st);
- static TExtraCache* getCache(const HCONTACT hContact, const char *szProto);
+ static TExtraCache* getCache(const MCONTACT hContact, const char *szProto);
public:
static TCluiData dat;
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 973cb5a267..a80632ae94 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -46,7 +46,7 @@ static HRESULT(WINAPI *MyCloseThemeData)(HANDLE); LONG g_cxsmIcon, g_cysmIcon;
-void SetDBButtonStates(HCONTACT hContact);
+void SetDBButtonStates(MCONTACT hContact);
HMENU BuildGroupPopupMenu(ClcGroup* group)
{
@@ -78,14 +78,14 @@ static int ClcEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get((HANDLE)lParam, &dbei);
if (dbei.eventType == EVENTTYPE_MESSAGE && !(dbei.flags & DBEF_SENT)) {
- DWORD firstTime = cfg::getDword((HCONTACT)wParam, "CList", "mf_firstEvent", 0);
- DWORD count = cfg::getDword((HCONTACT)wParam, "CList", "mf_count", 0);
+ DWORD firstTime = cfg::getDword((MCONTACT)wParam, "CList", "mf_firstEvent", 0);
+ DWORD count = cfg::getDword((MCONTACT)wParam, "CList", "mf_count", 0);
count++;
new_freq = count ? (dbei.timestamp - firstTime) / count : 0x7fffffff;
- cfg::writeDword((HCONTACT)wParam, "CList", "mf_freq", new_freq);
- cfg::writeDword((HCONTACT)wParam, "CList", "mf_count", count);
+ cfg::writeDword((MCONTACT)wParam, "CList", "mf_freq", new_freq);
+ cfg::writeDword((MCONTACT)wParam, "CList", "mf_count", count);
- TExtraCache *p = cfg::getCache((HCONTACT)wParam, NULL);
+ TExtraCache *p = cfg::getCache((MCONTACT)wParam, NULL);
if (p) {
p->dwLastMsgTime = dbei.timestamp;
if (new_freq)
@@ -111,9 +111,9 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if ( !__strcmp(cws->szSetting, "ANSIcodepage"))
pcli->pfnClcBroadcast(INTM_CODEPAGECHANGED, wParam, lParam);
else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName"))
- ReloadExtraInfo((HCONTACT)wParam);
+ ReloadExtraInfo((MCONTACT)wParam);
}
- else if (wParam != 0 && (szProto = GetContactProto((HCONTACT)wParam)) != NULL) {
+ else if (wParam != 0 && (szProto = GetContactProto((MCONTACT)wParam)) != NULL) {
char *id = NULL;
if ( !__strcmp(cws->szModule, "Protocol") && !__strcmp(cws->szSetting, "p")) {
char *szProto_s;
@@ -122,24 +122,24 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) szProto_s = NULL;
else
szProto_s = cws->value.pszVal;
- pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord((HCONTACT)wParam, szProto_s, "Status", ID_STATUS_OFFLINE), (HCONTACT)wParam, NULL), 0);
+ pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(szProto_s, szProto_s == NULL ? ID_STATUS_OFFLINE : cfg::getWord((MCONTACT)wParam, szProto_s, "Status", ID_STATUS_OFFLINE), (MCONTACT)wParam, NULL), 0);
}
// something is being written to a protocol module
if ( !__strcmp(szProto, cws->szModule)) {
// was a unique setting key written?
- pcli->pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ pcli->pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
if ( !__strcmp(cws->szSetting, "Status")) {
- if (!cfg::getByte((HCONTACT)wParam, "CList", "Hidden", 0)) {
+ if (!cfg::getByte((MCONTACT)wParam, "CList", "Hidden", 0)) {
if (cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT)) {
// User's state is changing, and we are hideOffline-ing
if (cws->value.wVal == ID_STATUS_OFFLINE) {
- pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 0);
+ pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0);
CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
return 0;
}
- pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 1);
+ pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 1);
}
- pcli->pfnChangeContactIcon((HCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (HCONTACT)wParam, NULL), 0);
+ pcli->pfnChangeContactIcon((MCONTACT)wParam, IconFromStatusMode(cws->szModule, cws->value.wVal, (MCONTACT)wParam, NULL), 0);
}
SendMessage(pcli->hwndContactTree, INTM_STATUSCHANGED, wParam, lParam);
return 0;
@@ -149,7 +149,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) else if (strstr(cws->szSetting, "XStatus"))
SendMessage(pcli->hwndContactTree, INTM_XSTATUSCHANGED, wParam, lParam);
else if ( !__strcmp(cws->szSetting, "Timezone") || !__strcmp(cws->szSetting, "TzName"))
- ReloadExtraInfo((HCONTACT)wParam);
+ ReloadExtraInfo((MCONTACT)wParam);
if (cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS) && !__strcmp(szProto, cfg::dat.szMetaName)) {
if ((lstrlenA(cws->szSetting) > 6 && !strncmp(cws->szSetting, "Status", 6)) || strstr("Default,ForceSend,Nick", cws->szSetting))
@@ -288,9 +288,9 @@ LBL_Def: memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage));
flags = contact->flags;
}
- pcli->pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((HCONTACT)wParam, NULL, dat)) {
- pcli->pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
+ pcli->pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus((MCONTACT)wParam, NULL, dat)) {
+ pcli->pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
if (flags & CONTACTF_CHECKED)
@@ -313,10 +313,10 @@ LBL_Def: case INTM_ICONCHANGED:
{
int recalcScrollBar = 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
WORD status = ID_STATUS_OFFLINE;
int contactRemoved = 0;
- HCONTACT hSelItem = NULL;
+ MCONTACT hSelItem = NULL;
ClcContact *selcontact = NULL;
char *szProto = GetContactProto(hContact);
@@ -332,7 +332,7 @@ LBL_Def: if (!FindItem(hwnd, dat, (HANDLE)hContact, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
pcli->pfnAddContactToTree(hwnd, dat, hContact, 0, 0);
recalcScrollBar = 1;
FindItem(hwnd, dat, (HANDLE)hContact, &contact, NULL, NULL);
@@ -349,7 +349,7 @@ LBL_Def: break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline || cfg::dat.bFilterEffective)) { // CLVM changed
if (dat->selection >= 0 && pcli->pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)pcli->pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)pcli->pfnContactToHItem(selcontact);
pcli->pfnRemoveItemFromGroup(hwnd, group, contact, 0);
contactRemoved = TRUE;
recalcScrollBar = 1;
@@ -382,7 +382,7 @@ LBL_Def: break;
if (contact->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- contact->hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)contact->hContact, 0);
+ contact->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)contact->hContact, 0);
contact->metaProto = GetContactProto(contact->hSubContact);
contact->iImage = pcli->pfnGetContactIcon(contact->hSubContact);
if (contact->pExtra) {
@@ -412,7 +412,7 @@ LBL_Def: ClcContact *contact;
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
RTL_DetectAndSet(contact, 0);
@@ -423,7 +423,7 @@ LBL_Def: case INTM_CODEPAGECHANGED:
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->codePage = cfg::getDword((HCONTACT)wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword((HCONTACT)wParam, "UserInfo", "ANSIcodepage", CP_ACP));
+ contact->codePage = cfg::getDword((MCONTACT)wParam, "Tab_SRMsg", "ANSIcodepage", cfg::getDword((MCONTACT)wParam, "UserInfo", "ANSIcodepage", CP_ACP));
PostMessage(hwnd, INTM_INVALIDATE, 0, 0);
goto LBL_Def;
@@ -467,7 +467,7 @@ LBL_Def: char *szProto = NULL;
if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
- p = cfg::getCache((HCONTACT)wParam, NULL);
+ p = cfg::getCache((MCONTACT)wParam, NULL);
else {
p = contact->pExtra;
szProto = contact->proto;
@@ -479,7 +479,7 @@ LBL_Def: case INTM_STATUSCHANGED:
if (FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- WORD wStatus = cfg::getWord((HCONTACT)wParam, contact->proto, "Status", ID_STATUS_OFFLINE);
+ WORD wStatus = cfg::getWord((MCONTACT)wParam, contact->proto, "Status", ID_STATUS_OFFLINE);
if (cfg::dat.bNoOfflineAvatars && wStatus != ID_STATUS_OFFLINE && contact->wStatus == ID_STATUS_OFFLINE) {
contact->wStatus = wStatus;
if (cfg::dat.bAvatarServiceAvail && contact->ace == NULL)
@@ -494,9 +494,9 @@ LBL_Def: if (!FindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->proto = GetContactProto((HCONTACT)wParam);
+ contact->proto = GetContactProto((MCONTACT)wParam);
CallService(MS_CLIST_INVALIDATEDISPLAYNAME, wParam, 0);
- lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
RTL_DetectAndSet(contact, 0);
@@ -545,7 +545,7 @@ LBL_Def: break;
contact->flags &= ~CONTACTF_IDLE;
- if (cfg::getDword((HCONTACT)wParam, szProto, "IdleTS", 0)) {
+ if (cfg::getDword((MCONTACT)wParam, szProto, "IdleTS", 0)) {
contact->flags |= CONTACTF_IDLE;
}
PostMessage(hwnd, INTM_INVALIDATE, 0, (LPARAM)contact->hContact);
@@ -557,14 +557,14 @@ LBL_Def: {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
char *szProto = (char *)cws->szModule;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TExtraCache *p;
if (!FindItem(hwnd, dat, (HANDLE)hContact, &contact, NULL, NULL)) {
p = cfg::getCache(hContact, szProto);
if (!dat->bisEmbedded && cfg::dat.bMetaAvail && szProto) { // may be a subcontact, forward the xstatus
if (cfg::getByte(hContact, cfg::dat.szMetaName, "IsSubcontact", 0)) {
- HCONTACT hMasterContact = (HCONTACT)cfg::getDword(hContact, cfg::dat.szMetaName, "Handle", 0);
+ MCONTACT hMasterContact = (MCONTACT)cfg::getDword(hContact, cfg::dat.szMetaName, "Handle", 0);
if (hMasterContact && hMasterContact != hContact) // avoid recursive call of settings handler
cfg::writeByte(hMasterContact, cfg::dat.szMetaName, "XStatusId",
(BYTE)cfg::getByte(hContact, szProto, "XStatusId", 0));
diff --git a/plugins/Clist_nicer/src/clcidents.cpp b/plugins/Clist_nicer/src/clcidents.cpp index 18dae02c34..dc9d34b7c0 100644 --- a/plugins/Clist_nicer/src/clcidents.cpp +++ b/plugins/Clist_nicer/src/clcidents.cpp @@ -66,8 +66,8 @@ int FindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contact, if (nowVisible)
index++;
if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP && ((UINT_PTR) hItem & ~HCONTACT_ISGROUP) == group->cl.items[group->scanIndex]->groupId) ||
- (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (HCONTACT)hItem) ||
- (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR) hItem & ~HCONTACT_ISINFO)))
+ (IsHContactContact(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_CONTACT && group->cl.items[group->scanIndex]->hContact == (MCONTACT)hItem) ||
+ (IsHContactInfo(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_INFO && group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR) hItem & ~HCONTACT_ISINFO)))
{
if (isVisible) {
if ( !nowVisible)
diff --git a/plugins/Clist_nicer/src/clcitems.cpp b/plugins/Clist_nicer/src/clcitems.cpp index 4f01d00972..856dfe77e7 100644 --- a/plugins/Clist_nicer/src/clcitems.cpp +++ b/plugins/Clist_nicer/src/clcitems.cpp @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include <commonheaders.h>
-extern int ( *saveAddContactToGroup )(struct ClcData *dat, ClcGroup *group, HCONTACT hContact);
+extern int ( *saveAddContactToGroup )(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
extern int ( *saveAddInfoItemToGroup )(ClcGroup *group, int flags, const TCHAR *pszText);
extern ClcGroup* ( *saveRemoveItemFromGroup )(HWND hwnd, ClcGroup *group, ClcContact *contact, int updateTotalCount);
extern ClcGroup* ( *saveAddGroup )(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD flags, int groupId, int calcTotalMembers);
-static void TZ_LoadTimeZone(HCONTACT hContact, struct TExtraCache *c, const char *szProto);
+static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c, const char *szProto);
//routines for managing adding/removal of items in the list, including sorting
@@ -92,7 +92,7 @@ void LoadAvatarForContact(ClcContact *p) p->cFlags &= ~ECF_AVATAR;
}
-int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact)
+int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
{
int i = saveAddContactToGroup(dat, group, hContact);
ClcContact* p = group->cl.items[i];
@@ -105,7 +105,7 @@ int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact) else
p->bIsMeta = FALSE;
if (p->bIsMeta && cfg::dat.bMetaAvail && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- p->hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ p->hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
p->metaProto = GetContactProto(p->hSubContact);
p->iImage = pcli->pfnGetContactIcon(p->hSubContact);
}
@@ -163,7 +163,7 @@ void RebuildEntireList(HWND hwnd, struct ClcData *dat) }
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (style & CLS_SHOWHIDDEN || !CLVM_GetContactHiddenStatus(hContact, NULL, dat)) {
ZeroMemory((void *)&dbv, sizeof(dbv));
if (cfg::getTString(hContact, "CList", "Group", &dbv))
@@ -228,7 +228,7 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) return 0;
p->bStatusMsgValid = STATUSMSG_NOTFOUND;
- HCONTACT hContact = p->hContact;
+ MCONTACT hContact = p->hContact;
int result = cfg::getTString(hContact, "CList", "StatusMsg", &dbv);
if ( !result && lstrlen(dbv.ptszVal) > 1)
@@ -322,14 +322,14 @@ BYTE GetCachedStatusMsg(TExtraCache *p, char *szProto) * differences.
*/
-static void TZ_LoadTimeZone(HCONTACT hContact, struct TExtraCache *c, const char *szProto)
+static void TZ_LoadTimeZone(MCONTACT hContact, struct TExtraCache *c, const char *szProto)
{
DWORD flags = 0;
if (cfg::dat.bShowLocalTimeSelective) flags |= TZF_DIFONLY;
c->hTimeZone = tmi.createByContact(hContact, flags);
}
-void ReloadExtraInfo(HCONTACT hContact)
+void ReloadExtraInfo(MCONTACT hContact)
{
if (hContact && pcli->hwndContactTree) {
TExtraCache *p = cfg::getCache(hContact, NULL);
@@ -347,7 +347,7 @@ void ReloadExtraInfo(HCONTACT hContact) */
-void RTL_DetectAndSet(ClcContact *contact, HCONTACT hContact)
+void RTL_DetectAndSet(ClcContact *contact, MCONTACT hContact)
{
WORD infoTypeC2[12];
int i;
@@ -425,7 +425,7 @@ void GetExtendedInfo(ClcContact *contact, ClcData *dat) void LoadSkinItemToCache(TExtraCache *cEntry, const char *szProto)
{
- HCONTACT hContact = cEntry->hContact;
+ MCONTACT hContact = cEntry->hContact;
if (cfg::getByte(hContact, "EXTBK", "VALID", 0)) {
if (cEntry->status_item == NULL)
@@ -462,7 +462,7 @@ void LoadSkinItemToCache(TExtraCache *cEntry, const char *szProto) * also cares about sub contacts (if meta is active)
*/
-int __fastcall CLVM_GetContactHiddenStatus(HCONTACT hContact, char *szProto, struct ClcData *dat)
+int __fastcall CLVM_GetContactHiddenStatus(MCONTACT hContact, char *szProto, struct ClcData *dat)
{
int dbHidden = cfg::getByte(hContact, "CList", "Hidden", 0); // default hidden state, always respect it.
int filterResult = 1;
diff --git a/plugins/Clist_nicer/src/clistevents.cpp b/plugins/Clist_nicer/src/clistevents.cpp index dd9870e7e4..613936a45d 100644 --- a/plugins/Clist_nicer/src/clistevents.cpp +++ b/plugins/Clist_nicer/src/clistevents.cpp @@ -29,7 +29,7 @@ static HWND hwndEventFrame = 0; HFONT __fastcall ChangeToFont(HDC hdc, struct ClcData *dat, int id, int *fontHeight);
extern struct CListEvent* ( *saveAddEvent )(CLISTEVENT *cle);
-extern int ( *saveRemoveEvent )(HCONTACT hContact, HANDLE hDbEvent);
+extern int ( *saveRemoveEvent )(MCONTACT hContact, HANDLE hDbEvent);
extern FRAMEWND *wndFrameEventArea;
extern HPEN g_hPenCLUIFrames;
@@ -333,7 +333,7 @@ struct CListEvent* AddEvent(CLISTEVENT *cle) // wParam=(WPARAM)(HANDLE)hContact
// lParam=(LPARAM)(HANDLE)hDbEvent
// Returns 0 if the event was successfully removed, or nonzero if the event was not found
-int RemoveEvent(HCONTACT hContact, HANDLE hDbEvent)
+int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent)
{
HANDLE hItem;
int i;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp index 1fec1b1175..9526e4f946 100644 --- a/plugins/Clist_nicer/src/clistmenus.cpp +++ b/plugins/Clist_nicer/src/clistmenus.cpp @@ -68,7 +68,7 @@ static HANDLE hWindowListIGN = 0; static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
switch(msg) {
case WM_INITDIALOG:
@@ -78,7 +78,7 @@ static INT_PTR CALLBACK IgnoreDialogProc(HWND hWnd, UINT msg, WPARAM wParam, LPA int pCaps;
HWND hwndAdd;
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR)hContact);
dwMask = cfg::getDword(hContact, "Ignore", "Mask1", 0);
SendMessage(hWnd, WM_USER + 100, (WPARAM)hContact, dwMask);
@@ -365,7 +365,7 @@ static INT_PTR SetContactIgnore(WPARAM wParam, LPARAM lParam) if (hWindowListIGN == 0)
hWindowListIGN = WindowList_Create();
- hWnd = WindowList_Find(hWindowListIGN, (HCONTACT)wParam);
+ hWnd = WindowList_Find(hWindowListIGN, (MCONTACT)wParam);
if ( wParam ) {
if ( hWnd == 0 )
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_QUICKIGNORE), 0, IgnoreDialogProc, (LPARAM)wParam);
diff --git a/plugins/Clist_nicer/src/clistmod.cpp b/plugins/Clist_nicer/src/clistmod.cpp index 2514716017..2a838b39dc 100644 --- a/plugins/Clist_nicer/src/clistmod.cpp +++ b/plugins/Clist_nicer/src/clistmod.cpp @@ -30,7 +30,7 @@ extern int RemoveEvent(WPARAM wParam, LPARAM lParam); int InitCustomMenus(void);
void UninitCustomMenus(void);
INT_PTR GetContactStatusMessage(WPARAM wParam, LPARAM lParam);
-int EventsProcessContactDoubleClick(HCONTACT hContact);
+int EventsProcessContactDoubleClick(MCONTACT hContact);
int SetHideOffline(WPARAM wParam, LPARAM lParam);
extern HIMAGELIST hCListImages;
@@ -44,9 +44,9 @@ static INT_PTR GetStatusMode(WPARAM wParam, LPARAM lParam) return(g_maxStatus == ID_STATUS_OFFLINE ? pcli->currentDesiredStatusMode : g_maxStatus);
}
-extern int ( *saveIconFromStatusMode )( const char *szProto, int status, HCONTACT hContact );
+extern int ( *saveIconFromStatusMode )( const char *szProto, int status, MCONTACT hContact );
-int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON *phIcon)
+int IconFromStatusMode(const char *szProto, int status, MCONTACT hContact, HICON *phIcon)
{
if (phIcon != NULL)
*phIcon = NULL;
@@ -55,7 +55,7 @@ int IconFromStatusMode(const char *szProto, int status, HCONTACT hContact, HICON int finalStatus;
if (szProto != NULL && !strcmp(szProto, cfg::dat.szMetaName) && cfg::dat.bMetaAvail && hContact != 0 && !(cfg::dat.dwFlags & CLUI_USEMETAICONS)) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
szFinalProto = GetContactProto(hSubContact);
finalStatus = (status == 0) ? (WORD) cfg::getWord(hSubContact, szFinalProto, "Status", ID_STATUS_OFFLINE) : status;
hContact = hSubContact;
diff --git a/plugins/Clist_nicer/src/clistopts.cpp b/plugins/Clist_nicer/src/clistopts.cpp index 5517524a5f..775a6b5c1c 100644 --- a/plugins/Clist_nicer/src/clistopts.cpp +++ b/plugins/Clist_nicer/src/clistopts.cpp @@ -39,7 +39,7 @@ INT_PTR CALLBACK DlgProcGenOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP switch (msg) {
case WM_USER+1:
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *ws = (DBCONTACTWRITESETTING *) lParam;
if (hContact == NULL && ws != NULL && ws->szModule != NULL && ws->szSetting != NULL && lstrcmpiA(ws->szModule, "CList") == 0 && lstrcmpiA(ws->szSetting, "UseGroups") == 0 && IsWindowVisible(hwndDlg))
CheckDlgButton(hwndDlg, IDC_DISABLEGROUPS, ws->value.bVal == 0);
diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 72a579d453..5772d3a0a4 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -400,10 +400,10 @@ void ConfigureCLUIGeometry(int mode) * set the states of defined database action buttons (only if button is a toggle)
*/
-void SetDBButtonStates(HCONTACT hPassedContact)
+void SetDBButtonStates(MCONTACT hPassedContact)
{
ButtonItem *buttonItem = g_ButtonItems;
- HCONTACT hContact = 0, hFinalContact = 0;
+ MCONTACT hContact = 0, hFinalContact = 0;
char *szModule, *szSetting;
int sel = cfg::clcdat ? cfg::clcdat->selection : -1;
ClcContact *contact = 0;
@@ -714,7 +714,7 @@ int CustomDrawScrollBars(NMCSBCUSTOMDRAW *nmcsbcd) extern LRESULT(CALLBACK *saveContactListWndProc)(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam);
-static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, HCONTACT hContact)
+static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCONTACT hContact)
{
if (item->dwFlags & BUTTON_PASSHCONTACTW || item->dwFlags & BUTTON_PASSHCONTACTL || item->dwFlags & BUTTON_ISCONTACTDBACTION) {
if (hContact == 0)
@@ -1344,7 +1344,7 @@ skipbg: ButtonItem *item = g_ButtonItems;
WPARAM wwParam = 0;
LPARAM llParam = 0;
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
ClcContact *contact = 0;
int sel = cfg::clcdat ? cfg::clcdat->selection : -1;
int serviceFailure = FALSE;
@@ -1378,7 +1378,7 @@ skipbg: BYTE *pValue;
char *szModule = item->szModule;
char *szSetting = item->szSetting;
- HCONTACT finalhContact = 0;
+ MCONTACT finalhContact = 0;
if (item->dwFlags & BUTTON_ISCONTACTDBACTION || item->dwFlags & BUTTON_DBACTIONONCONTACT) {
contactOK = ServiceParamsOK(item, &wwParam, &llParam, hContact);
diff --git a/plugins/Clist_nicer/src/config.cpp b/plugins/Clist_nicer/src/config.cpp index 189471c5e1..7ccb4840d4 100644 --- a/plugins/Clist_nicer/src/config.cpp +++ b/plugins/Clist_nicer/src/config.cpp @@ -52,7 +52,7 @@ void cfg::init() InitializeCriticalSection(&cachecs);
}
-DWORD cfg::getDword(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD uDefault = 0)
+DWORD cfg::getDword(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD uDefault = 0)
{
return((DWORD)db_get_dw(hContact, szModule, szSetting, uDefault));
}
@@ -76,7 +76,7 @@ DWORD cfg::getDword(const char *szModule, const char *szSetting, DWORD uDefault) }
-WORD cfg::getWord(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD uDefault = 0)
+WORD cfg::getWord(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD uDefault = 0)
{
return((WORD)db_get_w(hContact, szModule, szSetting, uDefault));
}
@@ -102,7 +102,7 @@ WORD cfg::getWord(const char *szModule, const char *szSetting, WORD uDefault) /*
* same for bytes now
*/
-int cfg::getByte(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, int uDefault = 0)
+int cfg::getByte(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, int uDefault = 0)
{
return(db_get_b(hContact, szModule, szSetting, uDefault));
}
@@ -117,12 +117,12 @@ int cfg::getByte(const char *szModule, const char *szSetting, int uDefault) return(db_get_b(0, szModule, szSetting, uDefault));
}
-INT_PTR cfg::getTString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+INT_PTR cfg::getTString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
return(db_get_ts(hContact, szModule, szSetting, dbv));
}
-INT_PTR cfg::getString(const HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+INT_PTR cfg::getString(const MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
return(db_get_s(hContact, szModule, szSetting, dbv));
}
@@ -131,7 +131,7 @@ INT_PTR cfg::getString(const HCONTACT hContact, const char *szModule, const char * writer functions
*/
-INT_PTR cfg::writeDword(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD value = 0)
+INT_PTR cfg::writeDword(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, DWORD value = 0)
{
return(db_set_dw(hContact, szModule, szSetting, value));
}
@@ -141,7 +141,7 @@ INT_PTR cfg::writeDword(const char *szModule = 0, const char *szSetting = 0, DWO return(db_set_dw(0, szModule, szSetting, value));
}
-INT_PTR cfg::writeWord(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD value = 0)
+INT_PTR cfg::writeWord(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, WORD value = 0)
{
return(db_set_w(hContact, szModule, szSetting, value));
}
@@ -151,7 +151,7 @@ INT_PTR cfg::writeWord(const char *szModule = 0, const char *szSetting = 0, WORD return(db_set_w(0, szModule, szSetting, value));
}
-INT_PTR cfg::writeByte(const HCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, BYTE value = 0)
+INT_PTR cfg::writeByte(const MCONTACT hContact = 0, const char *szModule = 0, const char *szSetting = 0, BYTE value = 0)
{
return(db_set_b(hContact, szModule, szSetting, value));
}
@@ -161,17 +161,17 @@ INT_PTR cfg::writeByte(const char *szModule = 0, const char *szSetting = 0, BYTE return(db_set_b(0, szModule, szSetting, value));
}
-INT_PTR cfg::writeTString(const HCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const TCHAR *str = 0)
+INT_PTR cfg::writeTString(const MCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const TCHAR *str = 0)
{
return(db_set_ts(hContact, szModule, szSetting, str));
}
-INT_PTR cfg::writeString(const HCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const char *str = 0)
+INT_PTR cfg::writeString(const MCONTACT hContact, const char *szModule = 0, const char *szSetting = 0, const char *str = 0)
{
return(db_set_s(hContact, szModule, szSetting, str));
}
-TExtraCache* cfg::getCache(const HCONTACT hContact, const char *szProto)
+TExtraCache* cfg::getCache(const MCONTACT hContact, const char *szProto)
{
int idx = cfg::arCache.getIndex((TExtraCache*)&hContact);
if (idx != -1)
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp index 88d2defe08..1fb7fb9b9a 100644 --- a/plugins/Clist_nicer/src/contact.cpp +++ b/plugins/Clist_nicer/src/contact.cpp @@ -39,7 +39,7 @@ struct { {ID_STATUS_OUTTOLUNCH,425}
};
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
char *szProto;
@@ -61,7 +61,7 @@ int __forceinline GetStatusModeOrdering(int statusMode) int mf_updatethread_running = TRUE;
HANDLE hThreadMFUpdate = 0;
-static void MF_CalcFrequency(HCONTACT hContact, DWORD dwCutoffDays, int doSleep)
+static void MF_CalcFrequency(MCONTACT hContact, DWORD dwCutoffDays, int doSleep)
{
DWORD curTime = time(NULL);
DWORD frequency, eventCount;
@@ -109,7 +109,7 @@ void MF_UpdateThread(LPVOID) ResetEvent(hEvent);
while(mf_updatethread_running) {
- for (HCONTACT hContact = db_find_first(); hContact && mf_updatethread_running; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact && mf_updatethread_running; hContact = db_find_next(hContact)) {
MF_CalcFrequency(hContact, 50, 1);
if (mf_updatethread_running)
WaitForSingleObject(hEvent, 5000);
@@ -140,7 +140,7 @@ void LoadContactTree(void) hideOffline = cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL), 1);
@@ -162,7 +162,7 @@ void LoadContactTree(void) CallService(MS_CLUI_LISTENDREBUILD, 0, 0);
}
-DWORD INTSORT_GetLastMsgTime(HCONTACT hContact)
+DWORD INTSORT_GetLastMsgTime(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while(hDbEvent) {
diff --git a/plugins/Clist_nicer/src/extBackg.cpp b/plugins/Clist_nicer/src/extBackg.cpp index 0ed8a12036..8fa7588976 100644 --- a/plugins/Clist_nicer/src/extBackg.cpp +++ b/plugins/Clist_nicer/src/extBackg.cpp @@ -1261,7 +1261,7 @@ void LoadPerContactSkins(TCHAR *tszFileName) }
if (items) {
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
continue;
diff --git a/plugins/Clist_nicer/src/init.cpp b/plugins/Clist_nicer/src/init.cpp index 683c2fd72f..28793ebcc6 100644 --- a/plugins/Clist_nicer/src/init.cpp +++ b/plugins/Clist_nicer/src/init.cpp @@ -57,8 +57,8 @@ int ClcShutdown(WPARAM wParam, LPARAM lParam); void (*saveLoadClcOptions)(HWND hwnd, struct ClcData *dat);
void LoadClcOptions(HWND hwnd, struct ClcData *dat);
-int (*saveAddContactToGroup)(struct ClcData *dat, ClcGroup *group, HCONTACT hContact);
-int AddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact);
+int (*saveAddContactToGroup)(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
+int AddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
CListEvent* (*saveAddEvent)(CLISTEVENT *cle);
CListEvent* AddEvent(CLISTEVENT *cle);
@@ -75,13 +75,13 @@ LRESULT CALLBACK ContactListWndProc(HWND hwnd, UINT message, WPARAM wParam, LPAR LRESULT (CALLBACK *saveContactListControlWndProc)(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-int (*saveIconFromStatusMode)(const char *szProto, int status, HCONTACT hContact);
+int (*saveIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact);
LRESULT(*saveProcessExternalMessages)(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
LRESULT ProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam);
-int (*saveRemoveEvent)(HCONTACT hContact, HANDLE hDbEvent);
-int RemoveEvent(HCONTACT hContact, HANDLE hDbEvent);
+int (*saveRemoveEvent)(MCONTACT hContact, HANDLE hDbEvent);
+int RemoveEvent(MCONTACT hContact, HANDLE hDbEvent);
INT_PTR (*saveTrayIconProcessMessage)(WPARAM wParam, LPARAM lParam);
INT_PTR TrayIconProcessMessage(WPARAM wParam, LPARAM lParam);
@@ -194,7 +194,7 @@ static int systemModulesLoaded(WPARAM wParam, LPARAM lParam) return 0;
}
-static int fnIconFromStatusMode(const char* szProto, int status, HCONTACT hContact)
+static int fnIconFromStatusMode(const char* szProto, int status, MCONTACT hContact)
{
return IconFromStatusMode(szProto, status, hContact, NULL);
}
diff --git a/plugins/Clist_nicer/src/viewmodes.cpp b/plugins/Clist_nicer/src/viewmodes.cpp index c189db26bb..cd163a2f36 100644 --- a/plugins/Clist_nicer/src/viewmodes.cpp +++ b/plugins/Clist_nicer/src/viewmodes.cpp @@ -120,7 +120,7 @@ static void ShowPage(HWND hwnd, int page) }
}
-static int UpdateClistItem(HCONTACT hContact, DWORD mask)
+static int UpdateClistItem(MCONTACT hContact, DWORD mask)
{
for (int i = ID_STATUS_OFFLINE; i <= ID_STATUS_OUTTOLUNCH; i++)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETEXTRAIMAGE, (WPARAM)hContact, MAKELONG(i - ID_STATUS_OFFLINE,
@@ -141,8 +141,8 @@ static DWORD GetMaskForItem(HANDLE hItem) static void UpdateStickies()
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HCONTACT hItem = (HCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, cfg::getByte(hContact, "CLVM", g_szModename, 0) ? 1 : 0);
DWORD localMask = HIWORD(cfg::getDword(hContact, "CLVM", g_szModename, 0));
@@ -393,7 +393,7 @@ void SaveState() SendDlgItemMessageA(clvmHwnd, IDC_VIEWMODES, LB_GETTEXT, clvm_curItem, (LPARAM)szModeName);
dwGlobalMask = GetMaskForItem(hInfoItem);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
hItem = (HANDLE)SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
if (SendDlgItemMessage(clvmHwnd, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
@@ -672,7 +672,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0);
SetWindowTextA(hwndSelector, Translate("No view mode"));
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (cfg::getDword(hContact, "CLVM", szBuf, -1) != -1)
cfg::writeDword(hContact, "CLVM", szBuf, 0);
@@ -718,7 +718,7 @@ INT_PTR CALLBACK DlgProcViewModesSetup(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
case IDC_CLEARALL:
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index 5c2b9388a3..2cc5b4400f 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -1066,13 +1066,13 @@ void HandleCallServiceCommand(PCommand command, TArgument *argv, int argc, PRepl }
-HCONTACT ParseContactParam(char *contact)
+MCONTACT ParseContactParam(char *contact)
{
char name[512];
char account[128];
char protocol[128];
char *p = strrchr(contact, ':');
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (p)
{
*p = 0;
@@ -1099,7 +1099,7 @@ void HandleMessageCommand(PCommand command, TArgument *argv, int argc, PReply re int i;
char *contact;
char buffer[1024];
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProcess = NULL;
ACKDATA *ack = NULL;
for (i = 2; i < argc - 1; i++)
@@ -1675,7 +1675,7 @@ void HandleProxyCommand(PCommand command, TArgument *argv, int argc, PReply repl }
}
-int ContactMatchSearch(HCONTACT hContact, char *contact, char *id, char *account, TArgument *argv, int argc)
+int ContactMatchSearch(MCONTACT hContact, char *contact, char *id, char *account, TArgument *argv, int argc)
{
int matches = 1;
int i;
@@ -1757,7 +1757,7 @@ int ContactMatchSearch(HCONTACT hContact, char *contact, char *id, char *account DWORD WINAPI OpenMessageWindowThread(void *data)
{
- HCONTACT hContact = (HCONTACT) data;
+ MCONTACT hContact = (MCONTACT) data;
if (hContact)
{
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM) hContact, 0);
@@ -1780,7 +1780,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r int count = 0;
reply->code = MIMRES_SUCCESS;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, protocol, sizeof(protocol));
char *contact = GetContactName(hContact, protocol);
@@ -1821,7 +1821,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, protocol, sizeof(protocol));
char *contact = GetContactName(hContact, protocol);
@@ -1840,7 +1840,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r reply->code = MIMRES_SUCCESS;
*reply->message = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hUnreadEvent = db_event_firstUnread(hContact);
if (hUnreadEvent != NULL) {
DWORD threadID;
@@ -1916,7 +1916,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re reply->code = MIMRES_SUCCESS;
mir_snprintf(reply->message, reply->cMessage, Translate("No unread messages found."));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hEvent = db_event_firstUnread(hContact);
if (hEvent != NULL) {
count = 0;
@@ -1958,7 +1958,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re case 4:
{
char *contact = argv[3];
- HCONTACT hContact = ParseContactParam(contact);
+ MCONTACT hContact = ParseContactParam(contact);
if (hContact)
{
if (_stricmp(cmd, "unread") == 0)
@@ -1993,7 +1993,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re case 6:
{
char *contact = argv[3];
- HCONTACT hContact = ParseContactParam(contact);
+ MCONTACT hContact = ParseContactParam(contact);
if (hContact)
{
@@ -2139,7 +2139,7 @@ void HandleIgnoreCommand(PCommand command, TArgument *argv, int argc, PReply rep return;
}
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
char *contact;
for (int i = 3; i < argc; i++)
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp index 5376dfed3d..a4d8a43251 100644 --- a/plugins/CmdLine/src/utils.cpp +++ b/plugins/CmdLine/src/utils.cpp @@ -123,7 +123,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) i = size;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -154,7 +154,7 @@ int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName return res;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -202,7 +202,7 @@ int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, }
#pragma warning (disable: 4312)
-TCHAR *GetContactName(HCONTACT hContact, char *szProto)
+TCHAR *GetContactName(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
INT_PTR ret;
@@ -244,14 +244,14 @@ TCHAR *GetContactName(HCONTACT hContact, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-void GetContactProto(HCONTACT hContact, char *szProto, size_t size)
+void GetContactProto(MCONTACT hContact, char *szProto, size_t size)
{
GetStringFromDatabase(hContact, "Protocol", "p", NULL, szProto, size);
}
#pragma warning (default: 4312)
#pragma warning (disable: 4312)
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
char protocol[256];
GetContactProto(hContact, protocol, sizeof(protocol));
@@ -259,7 +259,7 @@ TCHAR *GetContactID(HCONTACT hContact) return GetContactID(hContact, protocol);
}
-TCHAR *GetContactID(HCONTACT hContact, char *szProto)
+TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
INT_PTR ret;
@@ -326,14 +326,14 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
{
TCHAR dispName[1024];
char cProtocol[256];
char *tmp;
int found = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProto(hContact, cProtocol, sizeof(cProtocol));
TCHAR *szHandle = GetContactID(hContact, cProtocol);
@@ -353,7 +353,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
{
char protocol[1024];
WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
diff --git a/plugins/CmdLine/src/utils.h b/plugins/CmdLine/src/utils.h index 73d92eff93..a3fb389d33 100644 --- a/plugins/CmdLine/src/utils.h +++ b/plugins/CmdLine/src/utils.h @@ -43,17 +43,17 @@ void ScreenToClient(HWND hWnd, LPRECT rect); void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, size_t size);
int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, size_t count);
-TCHAR *GetContactName(HCONTACT hContact, char *szProto);
-TCHAR *GetContactID(HCONTACT hContact);
-TCHAR *GetContactID(HCONTACT hContact, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
-void GetContactProto(HCONTACT hContact, char *szProto, size_t size);
+TCHAR *GetContactName(MCONTACT hContact, char *szProto);
+TCHAR *GetContactID(MCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
+void GetContactProto(MCONTACT hContact, char *szProto, size_t size);
int MyPUShowMessage(char *lpzText, BYTE kind);
diff --git a/plugins/ConnectionNotify/src/ConnectionNotify.cpp b/plugins/ConnectionNotify/src/ConnectionNotify.cpp index e412ac2200..474b7cff84 100644 --- a/plugins/ConnectionNotify/src/ConnectionNotify.cpp +++ b/plugins/ConnectionNotify/src/ConnectionNotify.cpp @@ -893,7 +893,7 @@ extern "C" int __declspec(dllexport) Load(void) CallService(MS_PROTO_REGISTERMODULE,0,(LPARAM)&pd);
//set all contacts to offline
- for (HCONTACT hContact = db_find_first(PLUGINNAME); hContact != NULL; hContact = db_find_next(hContact,PLUGINNAME))
+ for (MCONTACT hContact = db_find_first(PLUGINNAME); hContact != NULL; hContact = db_find_next(hContact,PLUGINNAME))
db_set_w(hContact,PLUGINNAME,"status",ID_STATUS_OFFLINE);
mir_snprintf(service,sizeof(service), "%s%s", PLUGINNAME, PS_GETCAPS);
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp index 5d42d3db9c..87da26fa8e 100644 --- a/plugins/ContactsPlus/src/main.cpp +++ b/plugins/ContactsPlus/src/main.cpp @@ -59,7 +59,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) static int HookDBEventAdded(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDbEvent = (HANDLE)lParam;
//process the event
DBEVENTINFO dbe = { sizeof(dbe) };
@@ -92,7 +92,7 @@ static int HookDBEventAdded(WPARAM wParam, LPARAM lParam) static void ProcessUnreadEvents(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -117,7 +117,7 @@ static bool CheckContactsServiceSupport(const char* szProto) static int HookPreBuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *szProto = GetContactProto(hContact);
int bVisible = FALSE;
@@ -156,7 +156,7 @@ static int HookModulesLoaded(WPARAM wParam, LPARAM lParam) static int HookContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (strcmpnull(cws->szModule, "CList") && strcmpnull(cws->szModule, szProto)) return 0;
@@ -167,13 +167,13 @@ static int HookContactSettingChanged(WPARAM wParam, LPARAM lParam) static int HookContactDeleted(WPARAM wParam, LPARAM lParam)
{ // if our contact gets deleted close his window
- HWND h = WindowList_Find(ghSendWindowList, (HCONTACT)wParam);
+ HWND h = WindowList_Find(ghSendWindowList, (MCONTACT)wParam);
if (h)
SendMessage(h, WM_CLOSE, 0, 0);
// since we hack the window list - more windows for one contact, we need to close them all
- while (h = WindowList_Find(ghRecvWindowList, (HCONTACT)wParam))
+ while (h = WindowList_Find(ghRecvWindowList, (MCONTACT)wParam))
SendMessage(h, WM_CLOSE, 0, 0);
return 0;
}
@@ -181,7 +181,7 @@ static int HookContactDeleted(WPARAM wParam, LPARAM lParam) static INT_PTR ServiceSendCommand(WPARAM wParam, LPARAM lParam)
{
//find window for hContact
- HWND hWnd = WindowList_Find(ghSendWindowList, (HCONTACT)wParam);
+ HWND hWnd = WindowList_Find(ghSendWindowList, (MCONTACT)wParam);
if (!hWnd)
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SEND), NULL, SendDlgProc, wParam);
else {
diff --git a/plugins/ContactsPlus/src/receive.cpp b/plugins/ContactsPlus/src/receive.cpp index 02c219edba..6b79314c20 100644 --- a/plugins/ContactsPlus/src/receive.cpp +++ b/plugins/ContactsPlus/src/receive.cpp @@ -25,7 +25,7 @@ /* TRecvContactsData */
-TRecvContactsData::TRecvContactsData(HCONTACT contact)
+TRecvContactsData::TRecvContactsData(MCONTACT contact)
{
mhContact = contact;
hHook = NULL;
@@ -136,7 +136,7 @@ static void RebuildGroupCombo(HWND hwndDlg) }
}
-static HCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *wndData, int iItem)
+static MCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *wndData, int iItem)
{
TCHAR *caUIN = ListView_GetItemTextEx(GetDlgItem(hwndDlg, IDC_CONTACTS), iItem, 0);
char *szProto = GetContactProto(wndData->mhContact);
@@ -144,7 +144,7 @@ static HCONTACT CreateTemporaryContactForItem(HWND hwndDlg, TRecvContactsData *w replaceStrT(wndData->haUin, caUIN);
for (int j = 0; j < wndData->cbReceived; j++)
if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN))
- return (HCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
+ return (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(PALF_TEMPORARY, j), (LPARAM)wndData->mhDbEvent);
return NULL;
}
@@ -162,7 +162,7 @@ void RecvListView_AddColumn(HWND hList, int nWidth, TCHAR *szTitle, int nItem) INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
TRecvContactsData *wndData = (TRecvContactsData*)GetWindowLongPtr(hwndDlg, DWLP_USER);
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
@@ -317,7 +317,7 @@ INT_PTR CALLBACK RecvDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara for (int j = 0; j < wndData->cbReceived; j++) // determine item index in packet
if (!lstrcmp(wndData->maReceived[j]->mcaUIN, caUIN)) {
char *szProto =GetContactProto(wndData->mhContact);
- hContact = (HCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
+ hContact = (MCONTACT)CallProtoService(szProto, PS_ADDTOLISTBYEVENT, MAKEWPARAM(0, j), (LPARAM)wndData->mhDbEvent);
if (hContact && caGroup) {
// use newest group API if available
if (ServiceExists(MS_CLIST_CONTACTCHANGEGROUP))
diff --git a/plugins/ContactsPlus/src/receive.h b/plugins/ContactsPlus/src/receive.h index 1ad8eed542..3f67906930 100644 --- a/plugins/ContactsPlus/src/receive.h +++ b/plugins/ContactsPlus/src/receive.h @@ -43,11 +43,11 @@ struct TReceivedItem { struct TRecvContactsData
{
- TRecvContactsData(HCONTACT contact);
+ TRecvContactsData(MCONTACT contact);
~TRecvContactsData();
HANDLE mhDbEvent; // handle to recv DB event
- HCONTACT mhContact; // from whom we received this
+ MCONTACT mhContact; // from whom we received this
HIMAGELIST mhListIcon;// icons for listview
HMENU mhPopup; // popup menu for listview
HANDLE hHook; // hook to event
diff --git a/plugins/ContactsPlus/src/send.cpp b/plugins/ContactsPlus/src/send.cpp index d0a2c511a3..a988481b6b 100644 --- a/plugins/ContactsPlus/src/send.cpp +++ b/plugins/ContactsPlus/src/send.cpp @@ -60,7 +60,7 @@ void TSendProcessList::Remove(HANDLE hProcc) /* TSendContactsData */
-TSendContactsData::TSendContactsData(HCONTACT contact) : uacklist()
+TSendContactsData::TSendContactsData(MCONTACT contact) : uacklist()
{
hContact = contact;
hHook = NULL;
@@ -107,14 +107,14 @@ void TSendContactsData::ClearContacts() nContacts = 0;
}
-void TSendContactsData::AddContact(HCONTACT hContact)
+void TSendContactsData::AddContact(MCONTACT hContact)
{
- aContacts = (HCONTACT*)mir_realloc(aContacts, (nContacts + 1)*sizeof(HCONTACT));
+ aContacts = (MCONTACT*)mir_realloc(aContacts, (nContacts + 1)*sizeof(MCONTACT));
aContacts[nContacts] = hContact;
nContacts++;
}
-int TSendContactsData::SendContactsPacket(HWND hwndDlg, HCONTACT *phContacts, int nContacts)
+int TSendContactsData::SendContactsPacket(HWND hwndDlg, MCONTACT *phContacts, int nContacts)
{
HANDLE hProcc = (HANDLE)CallContactService(hContact, PSS_CONTACTS, MAKEWPARAM(0, nContacts), (LPARAM)phContacts);
if (!hProcc) {
@@ -126,8 +126,8 @@ int TSendContactsData::SendContactsPacket(HWND hwndDlg, HCONTACT *phContacts, in TAckData *ackData = gaAckData.Add(hProcc, new TAckData(hContact));
uacklist.Add(hProcc);
ackData->nContacts = nContacts;
- ackData->aContacts = (HCONTACT*)mir_alloc(nContacts*sizeof(HCONTACT));
- memmove(ackData->aContacts, phContacts, nContacts*sizeof(HCONTACT)); // copy the array of hContact for ack array
+ ackData->aContacts = (MCONTACT*)mir_alloc(nContacts*sizeof(MCONTACT));
+ memmove(ackData->aContacts, phContacts, nContacts*sizeof(MCONTACT)); // copy the array of hContact for ack array
EnableDlgItem(hwndDlg, IDOK, FALSE);
EnableDlgItem(hwndDlg, IDC_LIST, FALSE);
return TRUE; // Success
@@ -179,12 +179,12 @@ static void ResetListOptions(HWND hwndList) }
}
-static HCONTACT FindNextClistContact(HWND hList, HCONTACT hContact, HCONTACT *phItem)
+static MCONTACT FindNextClistContact(HWND hList, MCONTACT hContact, MCONTACT *phItem)
{
- HCONTACT hNextContact = db_find_next(hContact);
- HCONTACT hNextItem = NULL;
+ MCONTACT hNextContact = db_find_next(hContact);
+ MCONTACT hNextItem = NULL;
- while (hNextContact && !(hNextItem = (HCONTACT)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hNextContact, 0)))
+ while (hNextContact && !(hNextItem = (MCONTACT)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hNextContact, 0)))
hNextContact = db_find_next(hNextContact);
if (phItem)
@@ -194,10 +194,10 @@ static HCONTACT FindNextClistContact(HWND hList, HCONTACT hContact, HCONTACT *ph }
-static HCONTACT FindFirstClistContact(HWND hList, HCONTACT *phItem)
+static MCONTACT FindFirstClistContact(HWND hList, MCONTACT *phItem)
{
- HCONTACT hContact = db_find_first();
- HCONTACT hItem = (HCONTACT)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hContact = db_find_first();
+ MCONTACT hItem = (MCONTACT)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hContact && !hItem)
return FindNextClistContact(hList, hContact, phItem);
@@ -211,7 +211,7 @@ static HCONTACT FindFirstClistContact(HWND hList, HCONTACT *phItem) bool binListEvent = FALSE;
-static void SetAllContactChecks(HWND hwndList, HCONTACT hReceiver) // doubtful name
+static void SetAllContactChecks(HWND hwndList, MCONTACT hReceiver) // doubtful name
{
if (binListEvent)
return;
@@ -226,7 +226,7 @@ static void SetAllContactChecks(HWND hwndList, HCONTACT hReceiver) // doubtful n else
SendMessage(hwndList, CLM_SETHIDEEMPTYGROUPS, (WPARAM)FALSE, 0);
- HCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
+ MCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
while (hContact) {
char* szProto2 = GetContactProto(hContact);
@@ -251,9 +251,9 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara TranslateDialogDefault(hwndDlg);
SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadIcon(hInst, MAKEINTRESOURCE(IDI_CONTACTS)));
ResetListOptions(GetDlgItem(hwndDlg, IDC_LIST));
- SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), (HCONTACT)lParam);
- WindowList_Add(ghSendWindowList, hwndDlg, (HCONTACT)lParam);
- wndData = new TSendContactsData((HCONTACT)lParam);
+ SetAllContactChecks(GetDlgItem(hwndDlg, IDC_LIST), (MCONTACT)lParam);
+ WindowList_Add(ghSendWindowList, hwndDlg, (MCONTACT)lParam);
+ wndData = new TSendContactsData((MCONTACT)lParam);
SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG)wndData);
// new dlg init
wndData->hIcons[0] = InitMButton(hwndDlg, IDC_ADD, MAKEINTRESOURCEA(IDI_ADDCONTACT), LPGEN("Add Contact Permanently to List"));
@@ -342,7 +342,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara switch (LOWORD(wParam)) {
case IDOK:
if (IsWindowEnabled(GetDlgItem(hwndDlg, IDOK))) {
- HCONTACT hContact, hItem;
+ MCONTACT hContact, hItem;
wndData->ClearContacts(); // do not include contacts twice
HWND hList = GetDlgItem(hwndDlg, IDC_LIST);
@@ -370,7 +370,7 @@ INT_PTR CALLBACK SendDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara {
// select all contacts
HWND hwndList = GetDlgItem(hwndDlg, IDC_LIST);
- HCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
+ MCONTACT hItem, hContact = FindFirstClistContact(hwndList, &hItem);
while (hContact) {
SendMessage(hwndList, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
hContact = FindNextClistContact(hwndList, hContact, &hItem);
diff --git a/plugins/ContactsPlus/src/send.h b/plugins/ContactsPlus/src/send.h index 8a8c1250ed..9b6f7b61a2 100644 --- a/plugins/ContactsPlus/src/send.h +++ b/plugins/ContactsPlus/src/send.h @@ -53,27 +53,27 @@ struct TSendContactsData { // hope uack is released automaticly, static propert HANDLE hHook; // hook to event
void HookProtoAck(HWND hwndDlg);
void UnhookProtoAck();
- HCONTACT *aContacts; // contacts to be sent
+ MCONTACT *aContacts; // contacts to be sent
int nContacts; // now many UIDs shall we send?
void ClearContacts();
- void AddContact(HCONTACT hContact);
- HCONTACT hContact; // to whom shall we send?
+ void AddContact(MCONTACT hContact);
+ MCONTACT hContact; // to whom shall we send?
TSendProcessList uacklist;// ackdata - necessary for errorbox
HWND hError; // handle of error box, if any
void ShowErrorDlg(HWND hwndDlg, char* szMsg, bool bAllowRetry);
- int SendContactsPacket(HWND hwndDlg, HCONTACT *phContacts, int nContacts);
+ int SendContactsPacket(HWND hwndDlg, MCONTACT *phContacts, int nContacts);
int SendContacts(HWND hwndDlg);
HICON hIcons[4]; // icons for dialog
- TSendContactsData(HCONTACT contact);
+ TSendContactsData(MCONTACT contact);
~TSendContactsData();
};
struct TAckData
{
- HCONTACT hContact; // to whom was it sent
- HCONTACT* aContacts; // obj
+ MCONTACT hContact; // to whom was it sent
+ MCONTACT* aContacts; // obj
int nContacts; // how many
- TAckData(HCONTACT contact) { hContact = contact; aContacts = NULL; nContacts = 0;};
+ TAckData(MCONTACT contact) { hContact = contact; aContacts = NULL; nContacts = 0;};
~TAckData() { mir_free(aContacts); }
};
diff --git a/plugins/ContactsPlus/src/utils.cpp b/plugins/ContactsPlus/src/utils.cpp index 523c6ad055..546468bd20 100644 --- a/plugins/ContactsPlus/src/utils.cpp +++ b/plugins/ContactsPlus/src/utils.cpp @@ -55,7 +55,7 @@ char* __fastcall null_strdup(const char *string) return NULL;
}
-TCHAR* GetContactUID(HCONTACT hContact)
+TCHAR* GetContactUID(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
char *uid = (char*)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
@@ -87,7 +87,7 @@ TCHAR* GetContactUID(HCONTACT hContact) return NULL;
}
-void DialogAddContactExecute(HWND hwndDlg, HCONTACT hNewContact)
+void DialogAddContactExecute(HWND hwndDlg, MCONTACT hNewContact)
{
ADDCONTACTSTRUCT acs = { 0 };
acs.hContact = hNewContact;
@@ -96,7 +96,7 @@ void DialogAddContactExecute(HWND hwndDlg, HCONTACT hNewContact) }
-void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, HCONTACT hContact)
+void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact)
{
LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam;
@@ -112,7 +112,7 @@ void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, HCONTACT hContact) }
-void UpdateDialogTitle(HWND hwndDlg, HCONTACT hContact, TCHAR *pszTitleStart)
+void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart)
{
TCHAR newtitle[512];
lstrcpyn(newtitle, TranslateTS(pszTitleStart), SIZEOF(newtitle));
@@ -138,7 +138,7 @@ void UpdateDialogTitle(HWND hwndDlg, HCONTACT hContact, TCHAR *pszTitleStart) }
-void UpdateDialogAddButton(HWND hwndDlg, HCONTACT hContact)
+void UpdateDialogAddButton(HWND hwndDlg, MCONTACT hContact)
{
int bVisible = db_get_b(hContact, "CList", "NotOnList", 0);
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), bVisible ? SW_SHOW : SW_HIDE);
@@ -157,7 +157,7 @@ HICON InitMButton(HWND hDlg, int idButton, LPCSTR szIcon, char *szTip) }
-HICON LoadContactProtoIcon(HCONTACT hContact)
+HICON LoadContactProtoIcon(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto)
diff --git a/plugins/ContactsPlus/src/utils.h b/plugins/ContactsPlus/src/utils.h index d62bee86ae..f0337c3dab 100644 --- a/plugins/ContactsPlus/src/utils.h +++ b/plugins/ContactsPlus/src/utils.h @@ -32,17 +32,17 @@ int __fastcall strcmpnull(const char *str1, const char *str2); void __fastcall strcpynull(char *str1, const char *str2);
char* __fastcall null_strdup(const char *string);
-TCHAR* GetContactUID(HCONTACT hContact);
+TCHAR* GetContactUID(MCONTACT hContact);
-void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, HCONTACT hContact);
-void UpdateDialogTitle(HWND hwndDlg, HCONTACT hContact, TCHAR *pszTitleStart);
-void UpdateDialogAddButton(HWND hwndDlg, HCONTACT hContact);
+void DrawProtocolIcon(HWND hwndDlg, LPARAM lParam, MCONTACT hContact);
+void UpdateDialogTitle(HWND hwndDlg, MCONTACT hContact, TCHAR *pszTitleStart);
+void UpdateDialogAddButton(HWND hwndDlg, MCONTACT hContact);
HICON InitMButton(HWND hDlg, int idButton, LPCSTR szIcon, char* szTip);
-void DialogAddContactExecute(HWND hwndDlg, HCONTACT hNewContact);
+void DialogAddContactExecute(HWND hwndDlg, MCONTACT hNewContact);
-HICON LoadContactProtoIcon(HCONTACT hContact);
+HICON LoadContactProtoIcon(MCONTACT hContact);
void EnableDlgItem(HWND hwndDlg, UINT control, int state);
diff --git a/plugins/CountryFlags/src/extraimg.cpp b/plugins/CountryFlags/src/extraimg.cpp index 141301a970..34514b0c88 100644 --- a/plugins/CountryFlags/src/extraimg.cpp +++ b/plugins/CountryFlags/src/extraimg.cpp @@ -27,15 +27,15 @@ static HANDLE hServiceDetectContactOrigin; static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam)
{
int countryNumber = 0xFFFF;
- char *pszProto = GetContactProto((HCONTACT)wParam);
+ char *pszProto = GetContactProto((MCONTACT)wParam);
/* ip detect */
if (bUseIpToCountry)
- countryNumber = ServiceIpToCountry(db_get_dw((HCONTACT)wParam,pszProto,"RealIP",0),0);
+ countryNumber = ServiceIpToCountry(db_get_dw((MCONTACT)wParam,pszProto,"RealIP",0),0);
/* fallback */
if (countryNumber == 0xFFFF)
- countryNumber = db_get_w((HCONTACT)wParam,pszProto,"Country",0);
+ countryNumber = db_get_w((MCONTACT)wParam,pszProto,"Country",0);
if (countryNumber == 0 || countryNumber == 0xFFFF)
- countryNumber = db_get_w((HCONTACT)wParam,pszProto,"CompanyCountry",0);
+ countryNumber = db_get_w((MCONTACT)wParam,pszProto,"CompanyCountry",0);
return (countryNumber == 0) ? 0xFFFF : countryNumber;
}
@@ -45,7 +45,7 @@ static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam) static HANDLE hExtraIcon;
-static void CALLBACK SetExtraImage(HCONTACT hContact)
+static void CALLBACK SetExtraImage(MCONTACT hContact)
{
if (!bShowExtraIcon)
return;
@@ -63,14 +63,14 @@ static void CALLBACK SetExtraImage(HCONTACT hContact) // always call in context of main thread
static void RemoveExtraImages(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
ExtraIcon_Clear(hExtraIcon, hContact);
}
// always call in context of main thread
static void EnsureExtraImages(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SetExtraImage(hContact);
}
@@ -87,7 +87,7 @@ void UpdateExtraImages() #define STATUSICON_REFRESHDELAY 100 /* time for which setting changes are buffered */
// always call in context of main thread
-static void __fastcall SetStatusIcon(HCONTACT hContact,int countryNumber)
+static void __fastcall SetStatusIcon(MCONTACT hContact,int countryNumber)
{
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
@@ -106,7 +106,7 @@ static void __fastcall SetStatusIcon(HCONTACT hContact,int countryNumber) }
// always call in context of main thread
-static void __fastcall UnsetStatusIcon(HCONTACT hContact)
+static void __fastcall UnsetStatusIcon(MCONTACT hContact)
{
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
@@ -167,7 +167,7 @@ static int ExtraImgSettingChanged(WPARAM wParam,LPARAM lParam) /* user details update */
if (!lstrcmpA(dbcws->szSetting,"RealIP") || !lstrcmpA(dbcws->szSetting,"Country") || !lstrcmpA(dbcws->szSetting,"CompanyCountry")) {
/* Extra Image */
- SetExtraImage((HCONTACT)wParam);
+ SetExtraImage((MCONTACT)wParam);
/* Status Icon */
if (ServiceExists(MS_MSG_REMOVEICON))
CallFunctionBuffered(UpdateStatusIcons,0,FALSE,STATUSICON_REFRESHDELAY);
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp index a42cc054de..3114a0b4e2 100644 --- a/plugins/CyrTranslit/src/MirandaContact.cpp +++ b/plugins/CyrTranslit/src/MirandaContact.cpp @@ -47,14 +47,14 @@ void MirandaContact::initialize() //------------------------------------------------------------------------------
-bool MirandaContact::bIsActive(HCONTACT hContact)
+bool MirandaContact::bIsActive(MCONTACT hContact)
{
return db_get_b(hContact, SETTINGS_MODULE, SETTING_SHOULD_TRANSLITERATE, 0) != 0;
}
//------------------------------------------------------------------------------
-void MirandaContact::save(HCONTACT hContact, bool bValue)
+void MirandaContact::save(MCONTACT hContact, bool bValue)
{
db_set_b(hContact, SETTINGS_MODULE, SETTING_SHOULD_TRANSLITERATE, bValue);
}
@@ -80,7 +80,7 @@ void MirandaContact::addMenuItem() INT_PTR MirandaContact::onMenuCommandTransliterate(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
if (!CallService(MS_DB_CONTACT_IS, wParam, 0))
return 0;
@@ -93,7 +93,7 @@ INT_PTR MirandaContact::onMenuCommandTransliterate(WPARAM wParam, LPARAM lParam) int MirandaContact::onPreBuildContactMenu(WPARAM wParam, LPARAM lParam)
{
if (!hTransliterateCmdMenuItem) return 0;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
if (!CallService(MS_DB_CONTACT_IS, wParam, 0)) return 0;
CLISTMENUITEM mi = { sizeof(mi) };
diff --git a/plugins/CyrTranslit/src/MirandaContact.h b/plugins/CyrTranslit/src/MirandaContact.h index cad1b7f516..19e313ae1a 100644 --- a/plugins/CyrTranslit/src/MirandaContact.h +++ b/plugins/CyrTranslit/src/MirandaContact.h @@ -42,14 +42,14 @@ public: * @param hContact The handle of the contact object to be instantiated.
* @return The Miranda IM contact having the passed handle.
*/
- static bool bIsActive(HCONTACT hContact);
+ static bool bIsActive(MCONTACT hContact);
/**
* Saves this object's data to the persistent storage -- the Miranda
* database. This information may be retreived later on by means of
* getContact() factory method invocation.
*/
- static void save(HCONTACT hContact, bool bValue);
+ static void save(MCONTACT hContact, bool bValue);
private:
static const char* SETTINGS_MODULE;
diff --git a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp index 0a28996127..748e27cd2d 100644 --- a/plugins/DbEditorPP/src/addeditsettingsdlg.cpp +++ b/plugins/DbEditorPP/src/addeditsettingsdlg.cpp @@ -1,6 +1,6 @@ #include "headers.h"
-static BOOL Convert(HCONTACT hContact, char* module, char* setting, int value, int toType) // 0 = byte, 1 = word, 2 = dword, 3 = string
+static BOOL Convert(MCONTACT hContact, char* module, char* setting, int value, int toType) // 0 = byte, 1 = word, 2 = dword, 3 = string
{
int Result = 1;
char temp[64];
@@ -30,7 +30,7 @@ static BOOL Convert(HCONTACT hContact, char* module, char* setting, int value, i }
-BOOL convertSetting(HCONTACT hContact, char* module, char* setting, int toType) // 0 = byte, 1 = word, 2 = dword, 3 = string, 4 = unicode
+BOOL convertSetting(MCONTACT hContact, char* module, char* setting, int toType) // 0 = byte, 1 = word, 2 = dword, 3 = string, 4 = unicode
{
DBVARIANT dbv = {0};
BOOL Result = 0;
@@ -419,7 +419,7 @@ INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l return 0;
}
-void editSetting(HCONTACT hContact, char* module, char* setting)
+void editSetting(MCONTACT hContact, char* module, char* setting)
{
DBVARIANT dbv = {0}; // freed in the dialog
if (!GetSetting(hContact,module, setting, &dbv))
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index db23d4ab21..896f953a46 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -1,6 +1,6 @@ #include "headers.h"
-void copyModule(char* module, HCONTACT hContactFrom, HCONTACT hContactTo)
+void copyModule(char* module, MCONTACT hContactFrom, MCONTACT hContactTo)
{
ModuleSettingLL msll;
@@ -44,7 +44,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
int index, loaded;
char szProto[256];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (GetValue(hContact,"Protocol","p",szProto,SIZEOF(szProto)))
loaded = IsProtocolLoaded(szProto);
else
@@ -100,12 +100,12 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara case IDOK:
if (!IsDlgButtonChecked(hwnd,CHK_COPY2ALL)) {
- HCONTACT hContact = (HCONTACT)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETITEMDATA, SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETCURSEL, 0, 0), 0);
+ MCONTACT hContact = (MCONTACT)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETITEMDATA, SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_GETCURSEL, 0, 0), 0);
copyModule(mac->module, mac->hContact, hContact);
}
else {
SetCursor(LoadCursor(NULL,IDC_WAIT));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
copyModule(mac->module, mac->hContact, hContact);
SetCursor(LoadCursor(NULL,IDC_ARROW));
@@ -124,7 +124,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return 0;
}
-void copyModuleMenuItem(char* module, HCONTACT hContact)
+void copyModuleMenuItem(char* module, MCONTACT hContact)
{
ModuleAndContact *mac = (ModuleAndContact *)mir_calloc(sizeof(ModuleAndContact));
mac->hContact = hContact;
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index 73d277e100..394d4added 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -3,7 +3,7 @@ static int working;
static HWND hwnd2Delete = NULL;
-int deleteModule(char* module, HCONTACT hContact, int fromMenu)
+int deleteModule(char* module, MCONTACT hContact, int fromMenu)
{
char msg[1024];
ModuleSettingLL settinglist;
@@ -47,7 +47,7 @@ void __cdecl PopulateModuleDropListThreadFunc(LPVOID di) module = module->next;
continue;
}
- for (HCONTACT hContact = db_find_first();moduleEmpty && hContact;hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first();moduleEmpty && hContact;hContact = db_find_next(hContact)) {
if (!IsModuleEmpty(hContact,module->name)) {
SendDlgItemMessage(hwnd,IDC_CONTACTS,CB_ADDSTRING,0,(LPARAM)module->name);
moduleEmpty = 0;
@@ -94,7 +94,7 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM char text[128];
GetDlgItemText(hwnd,IDC_CONTACTS,text,128);
SetCursor(LoadCursor(NULL,IDC_WAIT));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
deleteModule(text,hContact,1);
// do the null
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index b1c5cf436d..d15655fffb 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -81,7 +81,7 @@ char* StrReplace (char* Search, char* Replace, char* Resource) return Resource;
}
-void exportModule(HCONTACT hContact, char* module, FILE* file)
+void exportModule(MCONTACT hContact, char* module, FILE* file)
{
char tmp[32];
ModuleSettingLL settinglist;
@@ -152,7 +152,7 @@ void exportModule(HCONTACT hContact, char* module, FILE* file) FreeModuleSettingLL(&settinglist);
}
-char *NickFromHContact(HCONTACT hContact)
+char *NickFromHContact(MCONTACT hContact)
{
static char nick[512] = "";
@@ -193,7 +193,7 @@ char *NickFromHContact(HCONTACT hContact) return nick;
}
-void exportDB(HCONTACT hContact, char* module) // hContact == -1 export entire db. module == NULL export entire contact.
+void exportDB(MCONTACT hContact, char* module) // hContact == -1 export entire db. module == NULL export entire contact.
{ // hContact == -1, module == "" - all contacts
FILE* file = NULL;
char fileName[MAX_PATH];
@@ -211,7 +211,7 @@ void exportDB(HCONTACT hContact, char* module) // hContact == -1 export entire d SetCursor(LoadCursor(NULL,IDC_WAIT));
// exporting entire db
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
{
hContact = NULL;
@@ -326,20 +326,20 @@ void exportDB(HCONTACT hContact, char* module) // hContact == -1 export entire d FreeModuleSettingLL(&modlist);
}
-HCONTACT CheckNewContact(char *myProto, char *uid, char *myName)
+MCONTACT CheckNewContact(char *myProto, char *uid, char *myName)
{
char szProto[256], szName[256];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (DBGetContactSettingStringStatic(hContact, "Protocol", "p", szProto, 256))
if (!mir_strcmp(szProto, myProto))
if (GetValue(hContact, szProto, uid, szName, SIZEOF(szName)) && !mir_strcmp(szName, myName))
return hContact;
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
}
-void importSettings(HCONTACT hContact, char *importstring )
+void importSettings(MCONTACT hContact, char *importstring )
{
char module[256] = "", setting[256] = "", *end;
int i=0, value, type;
@@ -364,7 +364,7 @@ void importSettings(HCONTACT hContact, char *importstring ) else if (!strncmp(&importstring[i],"CONTACT:", strlen("CONTACT:")))
{
int len, add = 1;
- hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ hContact = INVALID_CONTACT_ID;
i = i + (int)strlen("CONTACT:");
len = (int)strlen(&importstring[i]);
@@ -403,9 +403,9 @@ void importSettings(HCONTACT hContact, char *importstring ) }
}
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
{
- HCONTACT temp = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT temp = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (temp)
hContact = temp;
}
@@ -566,7 +566,7 @@ INT_PTR CALLBACK ImportDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam case IDOK:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
int length = GetWindowTextLength(GetDlgItem(hwnd, IDC_TEXT));
char *string;
if (length)
@@ -591,7 +591,7 @@ INT_PTR CALLBACK ImportDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam return 0;
}
-void ImportSettingsMenuItem(HCONTACT hContact)
+void ImportSettingsMenuItem(MCONTACT hContact)
{
if (hwnd2importWindow)
DestroyWindow(hwnd2importWindow);
@@ -625,7 +625,7 @@ BOOL Exists(LPCTSTR strName) return GetFileAttributes(strName) != INVALID_FILE_ATTRIBUTES;
}
-void ImportSettingsFromFileMenuItem(HCONTACT hContact, char* FilePath)
+void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath)
{
char szFileNames[MAX_PATH*10] = {0};
char szPath[MAX_PATH] = "";
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index 2f0f27e33a..6e981b1384 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -178,7 +178,7 @@ INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP return 0;
}
-void ItemFound(HWND hwnd, HCONTACT hContact,const char *module,const char *setting,const char* value,int type)
+void ItemFound(HWND hwnd, MCONTACT hContact,const char *module,const char *setting,const char* value,int type)
{
ItemInfo *ii = (ItemInfo*)mir_calloc(sizeof(ItemInfo));
if (!ii) return;
@@ -262,7 +262,7 @@ char* multiReplace(const char* value, const char *find, const char *replace, int return mir_tstrdup(value);
}
-int replaceValue(HWND hwnd, HCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv, const char *find, const char *replace, int mode)
+int replaceValue(HWND hwnd, MCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv, const char *find, const char *replace, int mode)
{
int count = 0;
DWORD num = 0;
@@ -334,7 +334,7 @@ int replaceValue(HWND hwnd, HCONTACT hContact, const char *module, const char *s return count;
}
-int replaceSetting(HWND hwnd, HCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv, const char *find, const char *replace, int mode)
+int replaceSetting(HWND hwnd, MCONTACT hContact, const char *module, const char *setting, DBVARIANT *dbv, const char *find, const char *replace, int mode)
{
char *szSetting;
ptrA myreplace;
@@ -370,7 +370,7 @@ int replaceSetting(HWND hwnd, HCONTACT hContact, const char *module, const char }
-int replaceModule(HWND hwnd, HCONTACT hContact, const char *module, const char *find, const char *replace, int mode)
+int replaceModule(HWND hwnd, MCONTACT hContact, const char *module, const char *find, const char *replace, int mode)
{
ModuleSettingLL msll;
ModSetLinkLinkItem *setting;
@@ -468,7 +468,7 @@ void __cdecl FindSettings(LPVOID di) int options = ((FindInfo*)di)->options;
ModuleSettingLL ModuleList, SettingList;
ModSetLinkLinkItem *module, *setting;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv = { 0 };
int caseSensitive = options & FW_CASE;
int exactMatch = options & FW_EXACT;
diff --git a/plugins/DbEditorPP/src/headers.h b/plugins/DbEditorPP/src/headers.h index 4e3a2f8b9f..d6e0c7006a 100644 --- a/plugins/DbEditorPP/src/headers.h +++ b/plugins/DbEditorPP/src/headers.h @@ -57,7 +57,7 @@ HICON LoadSkinnedDBEIcon(int icon); int AddIconToList(HIMAGELIST hil, HICON hIcon);
void AddProtoIconsToList(HIMAGELIST hil, int newshift);
int GetProtoIcon(char *szProto);
-extern HCONTACT hRestore;
+extern MCONTACT hRestore;
extern HGENMENU hUserMenu;
/////////////////////
@@ -109,11 +109,11 @@ extern HGENMENU hUserMenu; typedef struct {
int type; // from above types
- HCONTACT hContact;
+ MCONTACT hContact;
} ModuleTreeInfoStruct;
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
char* module;
HWND hwnd2Edit;
int selectedItem; // item that is currently selected
@@ -125,7 +125,7 @@ typedef struct { struct DBsetting {
DBVARIANT dbv;
- HCONTACT hContact;
+ MCONTACT hContact;
char *module;
char *setting;
int WatchModule; // above defines
@@ -133,7 +133,7 @@ struct DBsetting { typedef struct {
char module[256];
- HCONTACT hContact;
+ MCONTACT hContact;
} ModuleAndContact;
// find window
@@ -143,7 +143,7 @@ typedef struct { typedef struct {
int type; // above types
- HCONTACT hContact;
+ MCONTACT hContact;
char module[256];
char setting[256];
} ItemInfo;
@@ -182,67 +182,67 @@ extern BOOL usePopups; #define HEX_DWORD 4
//main.c
-int DBGetContactSettingStringStatic(HCONTACT hContact, char* szModule, char* szSetting, char* value, int maxLength);
-int WriteBlobFromString(HCONTACT hContact,const char *szModule,const char *szSetting, const char *Value, int len);
-int GetSetting(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
-int GetValue(HCONTACT hContact, const char* szModule, const char* szSetting, char* Value, int length);
-int GetValueW(HCONTACT hContact, const char* szModule, const char* szSetting, WCHAR* Value, int length);
+int DBGetContactSettingStringStatic(MCONTACT hContact, char* szModule, char* szSetting, char* value, int maxLength);
+int WriteBlobFromString(MCONTACT hContact,const char *szModule,const char *szSetting, const char *Value, int len);
+int GetSetting(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+int GetValue(MCONTACT hContact, const char* szModule, const char* szSetting, char* Value, int length);
+int GetValueW(MCONTACT hContact, const char* szModule, const char* szSetting, WCHAR* Value, int length);
char* u2a( wchar_t* src );
wchar_t *a2u( char* src , wchar_t *buffer, int len );
-WCHAR *GetContactName(HCONTACT hContact, const char *szProto, int unicode);
+WCHAR *GetContactName(MCONTACT hContact, const char *szProto, int unicode);
BOOL IsProtocolLoaded(char* pszProtocolName);
// main_window.c
INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// modules.c
-int deleteModule(char* module, HCONTACT hContact, int fromMenu);
+int deleteModule(char* module, MCONTACT hContact, int fromMenu);
void deleteModuleGui();
-void renameModule(char* oldName, char* newName, HCONTACT hContact);
+void renameModule(char* oldName, char* newName, MCONTACT hContact);
INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-int CloneContact(HCONTACT hContact);
+int CloneContact(MCONTACT hContact);
// moduletree.c
-void replaceTreeItem(HWND hwnd, HCONTACT hContact, const char *module, const char *newModule);
+void replaceTreeItem(HWND hwnd, MCONTACT hContact, const char *module, const char *newModule);
void refreshTree(BOOL restore);
void __cdecl PopulateModuleTreeThreadFunc(LPVOID di);
-void freeTree(HWND hwnd2Tree, HCONTACT hContact);
-int findItemInTree(HWND hwnd2Tree, HCONTACT hContact, char* module);
+void freeTree(HWND hwnd2Tree, MCONTACT hContact);
+int findItemInTree(HWND hwnd2Tree, MCONTACT hContact, char* module);
// settinglist.c
void setupSettingsList(HWND hwnd2List);
void saveListSettings(HWND hwnd2List);
void ClearListview(HWND hwnd2Settings);
-void DeleteSettingsFromList(HWND hSettings, HCONTACT hContact, char *module, char *setting);
-void PopulateSettings(HWND hwnd2Settings, HCONTACT hContact, char* module);
+void DeleteSettingsFromList(HWND hSettings, MCONTACT hContact, char *module, char *setting);
+void PopulateSettings(HWND hwnd2Settings, MCONTACT hContact, char* module);
void SelectSetting(char* setting);
// addeditsettingsdlg.c
INT_PTR CALLBACK EditSettingDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void editSetting(HCONTACT hContact, char* module, char* setting);
-BOOL convertSetting(HCONTACT hContact, char* module, char* setting, int toType); // 0 = byte, 1 = word, 2 = dword, 3 = string
+void editSetting(MCONTACT hContact, char* module, char* setting);
+BOOL convertSetting(MCONTACT hContact, char* module, char* setting, int toType); // 0 = byte, 1 = word, 2 = dword, 3 = string
// exportimport.c
-void exportDB(HCONTACT hContact, char* module); // hContact == -1 export entire db. module == NULL export entire contact
-void ImportSettingsMenuItem(HCONTACT hContact);
-void ImportSettingsFromFileMenuItem(HCONTACT hContact, char* FilePath);
+void exportDB(MCONTACT hContact, char* module); // hContact == -1 export entire db. module == NULL export entire contact
+void ImportSettingsMenuItem(MCONTACT hContact);
+void ImportSettingsFromFileMenuItem(MCONTACT hContact, char* FilePath);
// find window.c
INT_PTR CALLBACK FindWindowDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// copymodule.c
-void copyModuleMenuItem(char* module, HCONTACT hContact);
-void copyModule(char* module, HCONTACT hContactFrom, HCONTACT hContactTo);
+void copyModuleMenuItem(char* module, MCONTACT hContact);
+void copyModule(char* module, MCONTACT hContactFrom, MCONTACT hContactTo);
// options.c
int OptInit(WPARAM wParam,LPARAM lParam);
// watchlist
-int addSettingToWatchList(HCONTACT hContact, char* module, char* setting);
+int addSettingToWatchList(MCONTACT hContact, char* module, char* setting);
void freeWatchListItem(int item);
void PopulateWatchedWindow(HWND hwnd);
void freeAllWatches();
INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void popupWatchedVar(HCONTACT hContact,const char* module,const char* setting);
+void popupWatchedVar(MCONTACT hContact,const char* module,const char* setting);
#endif //_COMMONHEADERS_H
\ No newline at end of file diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp index 0c621f7169..d0691b97ec 100644 --- a/plugins/DbEditorPP/src/main.cpp +++ b/plugins/DbEditorPP/src/main.cpp @@ -11,7 +11,7 @@ int hLangpack; BYTE nameOrder[NAMEORDERCOUNT];
HGENMENU hUserMenu;
WatchListArrayStruct WatchListArray;
-HCONTACT hRestore;
+MCONTACT hRestore;
HANDLE sMenuCommand, sImport, sServicemodeLaunch;
HANDLE hModulesLoadedHook = NULL, hSettingsChangedHook=NULL, hOptInitHook=NULL, hPreShutdownHook=NULL;
@@ -51,12 +51,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) return TRUE;
}
-void settingChanged(HWND hwnd2Settings, HCONTACT hContact, char* module, char* setting);
+void settingChanged(HWND hwnd2Settings, MCONTACT hContact, char* module, char* setting);
int DBSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *setting;
SettingListInfo* info;
@@ -106,7 +106,7 @@ int DBSettingChanged(WPARAM wParam,LPARAM lParam) INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM lParam)
{
if (!hwnd2mainWindow) { // so only opens 1 at a time
- hRestore = (HCONTACT)wParam;
+ hRestore = (MCONTACT)wParam;
SetCursor(LoadCursor(NULL,IDC_WAIT));
CreateDialog(hInst, MAKEINTRESOURCE(IDD_MAIN), 0, MainDlgProc);
}
@@ -114,7 +114,7 @@ INT_PTR DBEditorppMenuCommand(WPARAM wParam, LPARAM lParam) ShowWindow(hwnd2mainWindow, SW_RESTORE);
SetForegroundWindow(hwnd2mainWindow);
if (!hRestore && wParam) {
- hRestore = (HCONTACT)wParam;
+ hRestore = (MCONTACT)wParam;
refreshTree(4);
}
}
@@ -225,7 +225,7 @@ INT_PTR ServiceMode(WPARAM wParam, LPARAM lParam) INT_PTR ImportFromFile(WPARAM wParam, LPARAM lParam)
{
- ImportSettingsFromFileMenuItem((HCONTACT)wParam, (char*)lParam);
+ ImportSettingsFromFileMenuItem((MCONTACT)wParam, (char*)lParam);
return 0;
}
@@ -267,7 +267,7 @@ extern "C" __declspec(dllexport) int Unload(void) // db_get_s (prob shouldnt use this unless u know how big the string is gonna be..)
//=======================================================
-int DBGetContactSettingStringStatic(HCONTACT hContact, char* szModule, char* szSetting, char* value, int maxLength)
+int DBGetContactSettingStringStatic(MCONTACT hContact, char* szModule, char* szSetting, char* value, int maxLength)
{
DBVARIANT dbv;
if (!db_get(hContact, szModule, szSetting, &dbv)) {
@@ -283,7 +283,7 @@ int DBGetContactSettingStringStatic(HCONTACT hContact, char* szModule, char* szS return 0;
}
-int WriteBlobFromString(HCONTACT hContact,const char *szModule,const char *szSetting, const char *szValue, int len)
+int WriteBlobFromString(MCONTACT hContact,const char *szModule,const char *szSetting, const char *szValue, int len)
{
int j=0, i = 0;
BYTE *data = NULL;
@@ -316,12 +316,12 @@ int WriteBlobFromString(HCONTACT hContact,const char *szModule,const char *szSet return 0;
}
-int GetSetting(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+int GetSetting(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
return db_get_s(hContact, szModule, szSetting, dbv, 0);
}
-int GetValue(HCONTACT hContact, const char* szModule, const char* szSetting, char* Value, int length)
+int GetValue(MCONTACT hContact, const char* szModule, const char* szSetting, char* Value, int length)
{
DBVARIANT dbv = {0};
@@ -361,7 +361,7 @@ int GetValue(HCONTACT hContact, const char* szModule, const char* szSetting, cha return 0;
}
-int GetValueW(HCONTACT hContact, const char* szModule, const char* szSetting, WCHAR* Value, int length)
+int GetValueW(MCONTACT hContact, const char* szModule, const char* szSetting, WCHAR* Value, int length)
{
DBVARIANT dbv = { 0 };
WCHAR *wc;
@@ -435,7 +435,7 @@ wchar_t* a2u(char* src, wchar_t *buffer, int len) return result;
}
-int GetDatabaseString(HCONTACT hContact, const char *szModule, const char* szSetting, WCHAR *Value, int length, BOOL unicode)
+int GetDatabaseString(MCONTACT hContact, const char *szModule, const char* szSetting, WCHAR *Value, int length, BOOL unicode)
{
if (unicode)
return GetValueW(hContact, szModule, szSetting, Value, length);
@@ -443,7 +443,7 @@ int GetDatabaseString(HCONTACT hContact, const char *szModule, const char* szSet return GetValue(hContact, szModule, szSetting, (char*)Value, length);
}
-WCHAR* GetContactName(HCONTACT hContact, const char *szProto, int unicode)
+WCHAR* GetContactName(MCONTACT hContact, const char *szProto, int unicode)
{
int i, r = 0;
static WCHAR res[512];
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index 714a5cfed2..02b0c98c9b 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -113,7 +113,7 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM tvi.cchTextMax = 255;
if (TreeView_GetItem(hwnd,&tvi) && tvi.lParam) {
ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct*)tvi.lParam;
- HCONTACT hContact = mtis->hContact;
+ MCONTACT hContact = mtis->hContact;
if (wParam == VK_DELETE) {
if ((mtis->type) & MODULE) {
if (deleteModule(module, hContact,0)) {
@@ -161,7 +161,7 @@ static LRESULT CALLBACK SettingListSubclassProc(HWND hwnd,UINT msg,WPARAM wParam case WM_KEYDOWN:
if (wParam == VK_DELETE || wParam == VK_F5 || (wParam == VK_F2 && ListView_GetSelectedCount(hwnd) == 1)) {
char *module, setting[256];
- HCONTACT hContact;
+ MCONTACT hContact;
SettingListInfo* sli = (SettingListInfo*)GetWindowLongPtr(hwnd,GWLP_USERDATA);
if (!sli) break;
hContact = sli->hContact;
@@ -369,7 +369,7 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (item = TreeView_GetSelection(hwnd2Tree)) {
int type = MODULE;
TVITEM tvi = {0};
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
tvi.mask=TVIF_HANDLE|TVIF_PARAM|TVIF_TEXT;
tvi.pszText = module;
tvi.cchTextMax = 255;
@@ -470,10 +470,10 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) freeAllWatches();
break;
case MENU_EXPORTDB: // all db
- exportDB((HCONTACT)INVALID_HANDLE_VALUE, 0);
+ exportDB(INVALID_CONTACT_ID, 0);
break;
case MENU_EXPORTCONTACT: // all contacts
- exportDB((HCONTACT)INVALID_HANDLE_VALUE, "");
+ exportDB(INVALID_CONTACT_ID, "");
break;
case MENU_EXPORTMODULE: // all settings
exportDB(NULL, 0);
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp index dfc4c82a51..42e21b67f0 100644 --- a/plugins/DbEditorPP/src/modsettingenum.cpp +++ b/plugins/DbEditorPP/src/modsettingenum.cpp @@ -56,7 +56,7 @@ int enumSettingsProc(const char *szSetting, LPARAM lParam) return enumModulesSettingsProc(szSetting, 0, lParam);
}
-int EnumSettings(HCONTACT hContact, char* module, ModuleSettingLL *msll)
+int EnumSettings(MCONTACT hContact, char* module, ModuleSettingLL *msll)
{
DBCONTACTENUMSETTINGS dbces;
// enum all setting the contact has for the module
@@ -73,7 +73,7 @@ int CheckIfModuleIsEmptyProc(const char *szSetting, LPARAM lParam) return 1;
}
-int IsModuleEmpty(HCONTACT hContact, char* szModule)
+int IsModuleEmpty(MCONTACT hContact, char* szModule)
{
DBCONTACTENUMSETTINGS dbces;
dbces.pfnEnumProc = CheckIfModuleIsEmptyProc;
diff --git a/plugins/DbEditorPP/src/modsettingenum.h b/plugins/DbEditorPP/src/modsettingenum.h index 145202575f..ea37a0d00b 100644 --- a/plugins/DbEditorPP/src/modsettingenum.h +++ b/plugins/DbEditorPP/src/modsettingenum.h @@ -11,8 +11,8 @@ struct ModuleSettingLL };
int EnumModules(ModuleSettingLL *msll);
-int EnumSettings(HCONTACT hContact, char *module, ModuleSettingLL *msll);
+int EnumSettings(MCONTACT hContact, char *module, ModuleSettingLL *msll);
void FreeModuleSettingLL(ModuleSettingLL *msll);
-int IsModuleEmpty(HCONTACT hContact, char *szModule);
+int IsModuleEmpty(MCONTACT hContact, char *szModule);
diff --git a/plugins/DbEditorPP/src/modules.cpp b/plugins/DbEditorPP/src/modules.cpp index b0765bd9b0..0ba361fe45 100644 --- a/plugins/DbEditorPP/src/modules.cpp +++ b/plugins/DbEditorPP/src/modules.cpp @@ -1,6 +1,6 @@ #include "headers.h"
-void renameModule(char* oldName, char* newName, HCONTACT hContact)
+void renameModule(char* oldName, char* newName, MCONTACT hContact)
{
DBVARIANT dbv;
ModuleSettingLL settinglist;
@@ -56,10 +56,10 @@ INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam if (IsDlgButtonChecked(hwnd, CHK_ADD2ALL)) {
// null contact
db_set_b(NULL, modulename, "(Default)", 0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_b(hContact, modulename, "(Default)", 0);
}
- else db_set_b((HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), modulename, "(Default)", 0);
+ else db_set_b((MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), modulename, "(Default)", 0);
refreshTree(1);
}
@@ -72,9 +72,9 @@ INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam return 0;
}
-int CloneContact(HCONTACT hContact)
+int CloneContact(MCONTACT hContact)
{
- HCONTACT newContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT newContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!newContact)
return 0;
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index f2ed81003f..b6b150e7f5 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -6,7 +6,7 @@ static ModuleTreeInfoStruct contacts_mtis = {CONTACT_ROOT_ITEM, 0}; static ModuleTreeInfoStruct settings_mtis = {CONTACT, 0};
-int doContacts(HWND hwnd2Tree, HTREEITEM contactsRoot, ModuleSettingLL *modlist, HCONTACT hSelectedContact, char *SelectedModule, char *SelectedSetting)
+int doContacts(HWND hwnd2Tree, HTREEITEM contactsRoot, ModuleSettingLL *modlist, MCONTACT hSelectedContact, char *SelectedModule, char *SelectedSetting)
{
TVINSERTSTRUCT tvi;
HTREEITEM contact;
@@ -23,7 +23,7 @@ int doContacts(HWND hwnd2Tree, HTREEITEM contactsRoot, ModuleSettingLL *modlist, tvi.hInsertAfter = TVI_SORT;
tvi.item.cChildren = 1;
- for (HCONTACT hContact = db_find_first(); hContact && hwnd2mainWindow; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact && hwnd2mainWindow; hContact = db_find_next(hContact)) {
char szProto[100];
if (DBGetContactSettingStringStatic(hContact, "Protocol", "p", szProto, SIZEOF(szProto))) {
icon = GetProtoIcon(szProto);
@@ -124,7 +124,7 @@ void doItems(HWND hwnd2Tree,ModuleSettingLL *modlist, int count) {
TVINSERTSTRUCT tvi;
TVITEM item ={0};
- HCONTACT hContact;
+ MCONTACT hContact;
ModuleTreeInfoStruct *lParam;
ModSetLinkLinkItem *module;
char percent[96], title[64];
@@ -183,7 +183,7 @@ void doItems(HWND hwnd2Tree,ModuleSettingLL *modlist, int count) SetWindowText(hwnd, TranslateT("Database Editor++"));
}
-int findItemInTree(HWND hwnd2Tree, HCONTACT hContact, char* module)
+int findItemInTree(HWND hwnd2Tree, MCONTACT hContact, char* module)
/* the following code to go through the whole tree is nicked from codeguru..
http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */
{
@@ -218,7 +218,7 @@ int findItemInTree(HWND hwnd2Tree, HCONTACT hContact, char* module) return -1;
}
-void freeTree(HWND hwnd2Tree, HCONTACT hContact)
+void freeTree(HWND hwnd2Tree, MCONTACT hContact)
/* the following code to go through the whole tree is nicked from codeguru..
http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */
{
@@ -256,7 +256,7 @@ void freeTree(HWND hwnd2Tree, HCONTACT hContact) while (item.hItem);
}
-BOOL findAndRemoveDuplicates(HWND hwnd2Tree, HCONTACT hContact, char* module)
+BOOL findAndRemoveDuplicates(HWND hwnd2Tree, MCONTACT hContact, char* module)
/* the following code to go through the whole tree is nicked from codeguru..
http://www.codeguru.com/Cpp/controls/treeview/treetraversal/comments.php/c683/?thread=7680 */
{
@@ -306,7 +306,7 @@ BOOL findAndRemoveDuplicates(HWND hwnd2Tree, HCONTACT hContact, char* module) }
-void replaceTreeItem(HWND hwnd, HCONTACT hContact, const char *module, const char *newModule)
+void replaceTreeItem(HWND hwnd, MCONTACT hContact, const char *module, const char *newModule)
{
int hItem = findItemInTree(hwnd, hContact, (char*)module);
HTREEITEM hParent;
@@ -360,8 +360,8 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) HWND hwnd2Tree = GetDlgItem(hwnd2mainWindow,IDC_MODULES);
char SelectedModule[256] = {0};
char SelectedSetting[256] = {0};
- HCONTACT hSelectedContact = hRestore;
- HCONTACT hContact;
+ MCONTACT hSelectedContact = hRestore;
+ MCONTACT hContact;
HTREEITEM contact, contactsRoot;
int count;
@@ -402,8 +402,8 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) }
case 2: // restore saved
if (GetValue(NULL,modname,"LastModule",SelectedModule,SIZEOF(SelectedModule))) {
- hSelectedContact = (HCONTACT)db_get_dw(NULL, modname, "LastContact", (DWORD)INVALID_HANDLE_VALUE);
- if (hSelectedContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ hSelectedContact = (MCONTACT)db_get_dw(NULL, modname, "LastContact", (DWORD)INVALID_HANDLE_VALUE);
+ if (hSelectedContact != INVALID_CONTACT_ID)
Select = 1;
GetValue(NULL,modname,"LastSetting",SelectedSetting,SIZEOF(SelectedSetting));
}
@@ -411,7 +411,7 @@ void __cdecl PopulateModuleTreeThreadFunc(LPVOID di) case 3: // restore from user menu
case 4: // jump from user menu
- if (hSelectedContact && hSelectedContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hSelectedContact && hSelectedContact != INVALID_CONTACT_ID)
Select = 1;
break;
}
@@ -557,7 +557,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd HWND hwnd2Tree = GetDlgItem(hwnd2mainWindow,IDC_MODULES);
ModSetLinkLinkItem *module;
ModuleSettingLL modlist;
- HCONTACT hContact = mtis->hContact;
+ MCONTACT hContact = mtis->hContact;
mtis->type = CONTACT;
@@ -598,7 +598,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd LPNMTREEVIEW pnmtv = (LPNMTREEVIEW)lParam;
TVITEM tvi = {0};
char text[264];
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwnd2Settings = GetDlgItem(hwnd, IDC_SETTINGS);
tvi.mask = TVIF_HANDLE|TVIF_PARAM|TVIF_TEXT;
tvi.hItem = pnmtv->itemNew.hItem;
@@ -767,7 +767,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i TreeView_GetItem(((LPNMHDR)lParam)->hwndFrom,&tvi);
if (tvi.lParam) {
ModuleTreeInfoStruct *mtis = (ModuleTreeInfoStruct *)tvi.lParam;
- HCONTACT hContact = mtis->hContact;
+ MCONTACT hContact = mtis->hContact;
GetCursorPos(&(hti.pt));
hMenu = LoadMenu(hInst, MAKEINTRESOURCE(IDR_CONTEXTMENU));
TranslateMenu(hMenu);
@@ -829,7 +829,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i break;
case MENU_EXPORTDB:
- exportDB((HCONTACT)INVALID_HANDLE_VALUE, module);
+ exportDB(INVALID_CONTACT_ID, module);
break;
}
}
@@ -907,7 +907,7 @@ void moduleListRightClick(HWND hwnd, WPARAM wParam,LPARAM lParam) // hwnd here i case 4: // Contacts root
switch ( TrackPopupMenu(hSubMenu, TPM_RETURNCMD, hti.pt.x, hti.pt.y, 0, hwnd, NULL)) {
case MENU_EXPORTCONTACT:
- exportDB((HCONTACT)INVALID_HANDLE_VALUE, "");
+ exportDB(INVALID_CONTACT_ID, "");
break;
case MENU_IMPORTFROMTEXT:
ImportSettingsMenuItem(NULL);
diff --git a/plugins/DbEditorPP/src/settinglist.cpp b/plugins/DbEditorPP/src/settinglist.cpp index d98f8a0144..84b9e8a0a3 100644 --- a/plugins/DbEditorPP/src/settinglist.cpp +++ b/plugins/DbEditorPP/src/settinglist.cpp @@ -53,7 +53,7 @@ void ClearListview(HWND hwnd2Settings) ListView_DeleteAllItems(hwnd2Settings);
}
-void DeleteSettingsFromList(HWND hSettings, HCONTACT hContact, char *module, char *setting)
+void DeleteSettingsFromList(HWND hSettings, MCONTACT hContact, char *module, char *setting)
{
int count = ListView_GetSelectedCount(hSettings);
@@ -93,7 +93,7 @@ void DeleteSettingsFromList(HWND hSettings, HCONTACT hContact, char *module, cha }
}
-void additem(HWND hwnd2Settings,HCONTACT hContact, char* module, char* setting, int index)
+void additem(HWND hwnd2Settings,MCONTACT hContact, char* module, char* setting, int index)
{
char *data = NULL;
LVITEM lvi;
@@ -213,7 +213,7 @@ void additem(HWND hwnd2Settings,HCONTACT hContact, char* module, char* setting, mir_free(data);
}
-void PopulateSettings(HWND hwnd2Settings, HCONTACT hContact, char* module)
+void PopulateSettings(HWND hwnd2Settings, MCONTACT hContact, char* module)
{
SettingListInfo* info = (SettingListInfo*)mir_calloc(sizeof(SettingListInfo));
LVITEM lvItem;
@@ -270,7 +270,7 @@ void SelectSetting(char *setting) }
}
-void settingChanged(HWND hwnd2Settings, HCONTACT hContact, char* module, char* setting)
+void settingChanged(HWND hwnd2Settings, MCONTACT hContact, char* module, char* setting)
{
LVITEM lvItem;
LVFINDINFO lvfi;
@@ -296,7 +296,7 @@ static WNDPROC SettingLabelEditSubClass; struct EditLabelInfoStruct
{
- HCONTACT hContact;
+ MCONTACT hContact;
char module[256];
char setting[256];
int item;
@@ -762,7 +762,7 @@ void SettingsListRightClick(HWND hwnd, WPARAM wParam, LPARAM lParam) // hwnd her return;
char setting[256], *module;
- HCONTACT hContact;
+ MCONTACT hContact;
LVHITTESTINFO hti;
POINT pt;
HMENU hMenu, hSubMenu;
diff --git a/plugins/DbEditorPP/src/watchedvars.cpp b/plugins/DbEditorPP/src/watchedvars.cpp index f4dc64f79e..df5468c285 100644 --- a/plugins/DbEditorPP/src/watchedvars.cpp +++ b/plugins/DbEditorPP/src/watchedvars.cpp @@ -1,6 +1,6 @@ #include "headers.h"
-int addSettingToWatchList(HCONTACT hContact, char* module, char* setting)
+int addSettingToWatchList(MCONTACT hContact, char* module, char* setting)
{
if (WatchListArray.count == WatchListArray.size)
{
@@ -36,7 +36,7 @@ void addwatchtolist(HWND hwnd2list, struct DBsetting *lParam) int index;
char data[32], tmp[32];
DBVARIANT *dbv = &(lParam->dbv);
- HCONTACT hContact = lParam->hContact;
+ MCONTACT hContact = lParam->hContact;
char *module = lParam->module;
char *setting = lParam->setting;
if (!module) return;
@@ -263,7 +263,7 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) if (ListView_GetItem(GetDlgItem(hwnd,IDC_VARS),&lvi))
{
ItemInfo ii;
- ii.hContact = (HCONTACT)lvi.lParam;
+ ii.hContact = (MCONTACT)lvi.lParam;
ListView_GetItemText(GetDlgItem(hwnd,IDC_VARS),hti.iItem,1,ii.module,128);
ListView_GetItemText(GetDlgItem(hwnd,IDC_VARS),hti.iItem,2,ii.setting,128);
ii.type = FW_SETTINGNAME;
@@ -282,7 +282,7 @@ INT_PTR CALLBACK WatchDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) }
-void popupWatchedVar(HCONTACT hContact,const char* module,const char* setting)
+void popupWatchedVar(MCONTACT hContact,const char* module,const char* setting)
{
HICON hIcon = LoadIcon(hInst, MAKEINTRESOURCE(ICO_REGEDIT));
char lpzContactName[MAX_CONTACTNAME];
@@ -329,7 +329,7 @@ void popupWatchedVar(HCONTACT hContact,const char* module,const char* setting) db_free(&dbv);
POPUPDATA ppd = { 0 };
- ppd.lchContact = (HCONTACT)hContact;
+ ppd.lchContact = (MCONTACT)hContact;
ppd.lchIcon = hIcon;
lstrcpyn(ppd.lpzContactName, lpzContactName,MAX_CONTACTNAME);
lstrcpyn(ppd.lpzText, lpzText,MAX_SECONDLINE);
diff --git a/plugins/ExternalAPI/m_ContactSettings.h b/plugins/ExternalAPI/m_ContactSettings.h index 9118a97a0f..1b497ab479 100644 --- a/plugins/ExternalAPI/m_ContactSettings.h +++ b/plugins/ExternalAPI/m_ContactSettings.h @@ -26,7 +26,7 @@ typedef struct { int Type; // one of CSIT_ constants; value of this field depends on what settings dialog was opened: contact settings or group settings
union
{
- HCONTACT hContact; // used when Type == CSIT_CONTACT
+ MCONTACT hContact; // used when Type == CSIT_CONTACT
int groupID; // used when Type == CSIT_GROUP
};
} CONTACTSETTINGSINIT;
diff --git a/plugins/ExternalAPI/m_LogService.h b/plugins/ExternalAPI/m_LogService.h index a8cf3f348c..3acd6be1d6 100644 --- a/plugins/ExternalAPI/m_LogService.h +++ b/plugins/ExternalAPI/m_LogService.h @@ -89,7 +89,7 @@ __inline static INT_PTR logservice_register(char *szID, TCHAR *tszTitle, TCHAR * typedef struct {
int cbSize; // sizeof(LS_MSGINFO)
char *szID;
- HCONTACT hContact; // may be NULL if no contact is associated with the message
+ MCONTACT hContact; // may be NULL if no contact is associated with the message
union
{
char *szMsg; // the message
@@ -106,7 +106,7 @@ typedef struct { // returns 0 on success
#define MS_LOGSERVICE_LOG "LogService/Log"
-__inline static INT_PTR logservice_log(char *szID, HCONTACT hContact, TCHAR *tszMsg)
+__inline static INT_PTR logservice_log(char *szID, MCONTACT hContact, TCHAR *tszMsg)
{
LS_MSGINFO mi;
ZeroMemory(&mi, sizeof(LS_MSGINFO));
@@ -131,7 +131,7 @@ __inline static INT_PTR logservice_log(char *szID, HCONTACT hContact, TCHAR *tsz typedef struct {
int cbSize; // [in]; sizeof(LS_LOGINFO)
char *szID; // [in]
- HCONTACT hContact; // [in]; may be NULL
+ MCONTACT hContact; // [in]; may be NULL
union
{
char *szLogPath; // [in]; pointer to a string to receive log file name, including full path. May be NULL. The string must be at least MAX_PATH characters long
diff --git a/plugins/ExternalAPI/m_account.h b/plugins/ExternalAPI/m_account.h index 88ad067239..e4b1820976 100644 --- a/plugins/ExternalAPI/m_account.h +++ b/plugins/ExternalAPI/m_account.h @@ -187,7 +187,7 @@ typedef struct CAccount PSWMRG MessagesAccessSO;
//For clist contact notification
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL isCounting;
struct CAccount *Next;
diff --git a/plugins/ExternalAPI/m_flash.h b/plugins/ExternalAPI/m_flash.h index 868a6cda07..96a8407103 100644 --- a/plugins/ExternalAPI/m_flash.h +++ b/plugins/ExternalAPI/m_flash.h @@ -79,7 +79,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // FLASHAVATAR structure
typedef struct {
- HCONTACT hContact; // contact who flash avatar belongs to
+ MCONTACT hContact; // contact who flash avatar belongs to
HWND hWindow; // handle of flash avatar object
HWND hParentWindow; // handle of flash avatar's parent object
TCHAR* cUrl; // url of .swf file
diff --git a/plugins/ExternalAPI/m_ftpfile.h b/plugins/ExternalAPI/m_ftpfile.h index 6bf82bb469..a51e1cd037 100644 --- a/plugins/ExternalAPI/m_ftpfile.h +++ b/plugins/ExternalAPI/m_ftpfile.h @@ -44,7 +44,7 @@ Boston, MA 02111-1307, USA. typedef struct
{
int cbSize; // size of the structure
- HCONTACT hContact; // contact handle, can be NULL
+ MCONTACT hContact; // contact handle, can be NULL
BYTE ftpNum; // number of the FTP server which will be used for upload, can be one of FNUM_* values
BYTE mode; // upload mode, can be one of FMODE_* values
DWORD flags; // bitwise OR of the FUPL_* flags above
@@ -66,7 +66,7 @@ typedef struct //
#define MS_FTPFILE_UPLOAD "FTPFile/Upload"
-__inline static INT_PTR FTPFileUploadA(HCONTACT hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
+__inline static INT_PTR FTPFileUploadA(MCONTACT hContact, BYTE ftpNum, BYTE mode, char **pszObjects, int objCount)
{
FTPUPLOAD ftpu = {0};
ftpu.cbSize = sizeof(ftpu);
@@ -78,7 +78,7 @@ __inline static INT_PTR FTPFileUploadA(HCONTACT hContact, BYTE ftpNum, BYTE mode return CallService(MS_FTPFILE_UPLOAD, 0, (LPARAM)&ftpu);
}
-__inline static INT_PTR FTPFileUploadW(HCONTACT hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
+__inline static INT_PTR FTPFileUploadW(MCONTACT hContact, BYTE ftpNum, BYTE mode, wchar_t **pswzObjects, int objCount)
{
FTPUPLOAD ftpu = {0};
ftpu.cbSize = sizeof(ftpu);
diff --git a/plugins/ExternalAPI/m_ieview.h b/plugins/ExternalAPI/m_ieview.h index 44b8d5201d..08277c92e0 100644 --- a/plugins/ExternalAPI/m_ieview.h +++ b/plugins/ExternalAPI/m_ieview.h @@ -165,7 +165,7 @@ typedef struct { int iType; // one of IEE_* values
DWORD dwFlags; // one of IEEF_* values
HWND hwnd; // HWND returned by IEW_CREATE
- HCONTACT hContact; // contact
+ MCONTACT hContact; // contact
union {
HANDLE hDbEventFirst; // first event to log, when IEE_LOG_EVENTS returns it will contain
// the last event actually logged or NULL if no event was logged (IEE_LOG_EVENTS)
diff --git a/plugins/ExternalAPI/m_msg_buttonsbar.h b/plugins/ExternalAPI/m_msg_buttonsbar.h index e56bcafd81..73d4619229 100644 --- a/plugins/ExternalAPI/m_msg_buttonsbar.h +++ b/plugins/ExternalAPI/m_msg_buttonsbar.h @@ -83,7 +83,7 @@ typedef struct { char* pszModule; // button owners name
DWORD dwButtonId; // registered button ID
HWND hwndFrom; // button parents HWND
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD flags; // BBCF_ flags
} CustomButtonClickData;
diff --git a/plugins/ExternalAPI/m_popup2.h b/plugins/ExternalAPI/m_popup2.h index c28a94cded..073955b945 100644 --- a/plugins/ExternalAPI/m_popup2.h +++ b/plugins/ExternalAPI/m_popup2.h @@ -70,7 +70,7 @@ typedef struct DWORD flags;
// miranda bindings
- HCONTACT lchContact;
+ MCONTACT lchContact;
HANDLE lchEvent;
// style
@@ -123,7 +123,7 @@ typedef struct // Unicode version of POPUPDATAEX_V2
typedef struct
{
- HCONTACT lchContact;
+ MCONTACT lchContact;
HICON lchIcon;
union
{
diff --git a/plugins/ExternalAPI/m_smileyadd.h b/plugins/ExternalAPI/m_smileyadd.h index c0d9aacaa7..97c18dccdb 100644 --- a/plugins/ExternalAPI/m_smileyadd.h +++ b/plugins/ExternalAPI/m_smileyadd.h @@ -37,7 +37,7 @@ typedef struct //If not found or NULL, "Standard" will be used
unsigned flags; //Flags (SAFLRE_*) that define the behaivior
BOOL disableRedraw; //Parameter have been depricated, have no effect on operation
- HCONTACT hContact; //Contact handle
+ MCONTACT hContact; //Contact handle
} SMADD_RICHEDIT3;
//Replace smileys in a rich edit control...
@@ -65,7 +65,7 @@ typedef struct LPARAM targetWParam; //Target WParam to be sent (LParam will be char* to select smiley)
//see the example file.
HWND hwndParent; //Parent window for smiley dialog
- HCONTACT hContact; //Contact handle
+ MCONTACT hContact; //Contact handle
} SMADD_SHOWSEL3;
//Show smiley selection window
@@ -85,7 +85,7 @@ typedef struct //NULL if the buttonicon is not defined...
int NumberOfVisibleSmileys; //Number of visible smileys defined.
int NumberOfSmileys; //Number of total smileys defined
- HCONTACT hContact; //Contact handle
+ MCONTACT hContact; //Contact handle
} SMADD_INFO2;
//get button smiley icon
@@ -131,7 +131,7 @@ typedef struct unsigned numSmileys; //Number of Smileys found, this parameter filled by SmileyAdd
unsigned oflag; //One of the SAFL_ flags specifies content of the parse results
//this parameter filled by SmileyAdd
- HCONTACT hContact; //Contact handle
+ MCONTACT hContact; //Contact handle
} SMADD_BATCHPARSE2;
typedef struct
@@ -237,7 +237,7 @@ typedef struct typedef struct
{
unsigned cbSize; // size of the structure
- HCONTACT hContact;
+ MCONTACT hContact;
int type; // 0 - directory, 1 - file;
TCHAR* path; // smiley category name for reference
} SMADD_CONT;
diff --git a/plugins/ExternalAPI/m_spellchecker.h b/plugins/ExternalAPI/m_spellchecker.h index d3d4378872..71ad5d50fe 100644 --- a/plugins/ExternalAPI/m_spellchecker.h +++ b/plugins/ExternalAPI/m_spellchecker.h @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA. typedef struct {
int cbSize;
- HCONTACT hContact; // The contact to get the settings from, or NULL
+ MCONTACT hContact; // The contact to get the settings from, or NULL
HWND hwnd; // The hwnd of the richedit
char *window_name; // A name for this richedit
} SPELLCHECKER_ITEM;
diff --git a/plugins/ExternalAPI/m_text.h b/plugins/ExternalAPI/m_text.h index 3f8007b26d..666c88411a 100644 --- a/plugins/ExternalAPI/m_text.h +++ b/plugins/ExternalAPI/m_text.h @@ -47,7 +47,7 @@ typedef struct _tagMTEXT_interface { #else
HANDLE (DLL_CALLCONV *CreateT) (HANDLE userHandle, char *text);
#endif
- HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, HCONTACT hContact, void *text, DWORD flags);
+ HANDLE (DLL_CALLCONV *CreateEx) (HANDLE userHandle, MCONTACT hContact, void *text, DWORD flags);
int (DLL_CALLCONV *Measure) (HDC dc, SIZE *sz, HANDLE text);
int (DLL_CALLCONV *Display) (HDC dc, POINT pos, SIZE sz, HANDLE text);
int (DLL_CALLCONV *SetParent) (HANDLE text, HWND hwnd, RECT rect);
@@ -109,7 +109,7 @@ enum typedef struct tagMTEXTCREATE
{
DWORD cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
void *text; // this is 'char *' or 'WCHAR *'
DWORD flags;
diff --git a/plugins/ExternalAPI/m_tipper.h b/plugins/ExternalAPI/m_tipper.h index eceb4cc573..2f703df395 100644 --- a/plugins/ExternalAPI/m_tipper.h +++ b/plugins/ExternalAPI/m_tipper.h @@ -26,7 +26,7 @@ Boston, MA 02111-1307, USA. // translation function type
// use hContact, module and setting to read your db value(s) and put the resulting string into buff
// return buff if the translation was successful, or return 0 for failure
-typedef TCHAR *(TranslateFunc)(HCONTACT hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
+typedef TCHAR *(TranslateFunc)(MCONTACT hContact, const char *module, const char *setting_or_prefix, TCHAR *buff, int bufflen);
typedef struct {
TranslateFunc *transFunc; // address of your translation function (see typedef above)
diff --git a/plugins/ExternalAPI/m_userinfoex.h b/plugins/ExternalAPI/m_userinfoex.h index 9e244309bf..e0079d36cd 100644 --- a/plugins/ExternalAPI/m_userinfoex.h +++ b/plugins/ExternalAPI/m_userinfoex.h @@ -335,7 +335,7 @@ This service returns one of the results of MS_DB_CONTACT_GETSETTING_STR! static FORCEINLINE INT_PTR
DBGetContactSettingEx_Helper(
- HCONTACT hContact,
+ MCONTACT hContact,
const char* pszProto,
const char* pszSetting,
DBVARIANT *dbv,
diff --git a/plugins/ExternalAPI/m_variables.h b/plugins/ExternalAPI/m_variables.h index 2fc1d22c78..5dbfdfc5d9 100644 --- a/plugins/ExternalAPI/m_variables.h +++ b/plugins/ExternalAPI/m_variables.h @@ -77,7 +77,7 @@ typedef struct { WCHAR *wszExtraText;
TCHAR *tszExtraText;
};
- HCONTACT hContact; // Handle to contact (can be NULL) -> The field "subject"
+ MCONTACT hContact; // Handle to contact (can be NULL) -> The field "subject"
// represents this contact.
int pCount; // (output) Number of succesful parsed tokens, needs to be set
// to 0 before the call
@@ -110,7 +110,7 @@ typedef struct { // The returned string needs to be freed using mir_free.
#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact)
+__inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, MCONTACT hContact)
{
FORMATINFO fi = { sizeof(fi) };
fi.tszFormat = tszFormat;
@@ -121,7 +121,7 @@ __inline static TCHAR *variables_parse(TCHAR *tszFormat, TCHAR *tszExtraText, HC }
#endif
-__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact,
+__inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, MCONTACT hContact,
TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize) {
FORMATINFO fi = { 0 };
@@ -145,7 +145,7 @@ __inline static TCHAR *variables_parse_ex(TCHAR *tszFormat, TCHAR *tszExtraText, // Note: The returned pointer needs to be released using your own free().
#ifndef VARIABLES_NOHELPER
-__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact)
+__inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, MCONTACT hContact)
{
if (ServiceExists(MS_VARS_FORMATSTRING)) {
FORMATINFO fi = { sizeof(fi) };
@@ -160,7 +160,7 @@ __inline static TCHAR *variables_parsedup(TCHAR *tszFormat, TCHAR *tszExtraText, return tszFormat ? mir_tstrdup(tszFormat) : tszFormat;
}
-__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, HCONTACT hContact,
+__inline static TCHAR *variables_parsedup_ex(TCHAR *tszFormat, TCHAR *tszExtraText, MCONTACT hContact,
TCHAR **tszaTemporaryVars, int cbTemporaryVarsSize)
{
if (ServiceExists(MS_VARS_FORMATSTRING)) {
diff --git a/plugins/ExternalAPI/m_voice.h b/plugins/ExternalAPI/m_voice.h index 68d48510d3..5adf159f05 100644 --- a/plugins/ExternalAPI/m_voice.h +++ b/plugins/ExternalAPI/m_voice.h @@ -48,7 +48,7 @@ typedef struct { char *id; // Protocol especific ID for this call
int flags; // Can be VOICE_CALL_CONTACT or VOICE_CALL_STRING (VOICE_UNICODE to say the string is unicode)
union { // Who to call
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *ptszContact;
char *pszContact;
WCHAR *pwszContact;
diff --git a/plugins/ExternalAPI/m_weather.h b/plugins/ExternalAPI/m_weather.h index 5a290b838d..cf1a522261 100644 --- a/plugins/ExternalAPI/m_weather.h +++ b/plugins/ExternalAPI/m_weather.h @@ -46,8 +46,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //============ WEATHER CONDITION STRUCT ============
// weather conditions (added in v0.1.2.0)
-typedef struct {
- HCONTACT hContact;
+typedef struct
+{
+ MCONTACT hContact;
TCHAR id[128];
TCHAR city[128];
TCHAR update[64];
diff --git a/plugins/ExternalAPI/m_yamn.h b/plugins/ExternalAPI/m_yamn.h index 0211cd9936..43b8fccffc 100644 --- a/plugins/ExternalAPI/m_yamn.h +++ b/plugins/ExternalAPI/m_yamn.h @@ -94,7 +94,7 @@ struct CExportedServices //
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
+//of the MCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
#define MS_YAMN_CLISTCONTEXT "YAMN/Service/ClistContactContextMenu"
@@ -104,7 +104,7 @@ struct CExportedServices //
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
+//of the MCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
#define MS_YAMN_CLISTCONTEXTAPP "YAMN/Service/ClistContactContextMenuApp"
@@ -114,7 +114,7 @@ struct CExportedServices //
//Event is fired when there is a double click on a CList contact,
//it is upto the caller to check for the protocol & status
-//of the HCONTACT, it's not done for you anymore since it didn't make
+//of the MCONTACT, it's not done for you anymore since it didn't make
//sense to store all this information in memory, etc.
#define MS_YAMN_CLISTDBLCLICK "YAMN/Service/ClistContactDoubleclicked"
diff --git a/plugins/FTPFileYM/src/dialog.cpp b/plugins/FTPFileYM/src/dialog.cpp index fa6a1f6dbd..ccc015afcf 100644 --- a/plugins/FTPFileYM/src/dialog.cpp +++ b/plugins/FTPFileYM/src/dialog.cpp @@ -229,7 +229,7 @@ INT_PTR CALLBACK UploadDialog::UploadDlgProc(HWND hwndDlg, UINT msg, WPARAM wPar }
case WM_COMMAND:
{
- HCONTACT hContact = uDlg->tabs[uDlg->activeTab]->job->hContact;
+ MCONTACT hContact = uDlg->tabs[uDlg->activeTab]->job->hContact;
if (hContact != NULL)
{
if (CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(LOWORD(wParam),MPCF_CONTACTMENU), (LPARAM)hContact))
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp index 8e91fba3fa..14eeeabb8e 100644 --- a/plugins/FTPFileYM/src/ftpfile.cpp +++ b/plugins/FTPFileYM/src/ftpfile.cpp @@ -35,7 +35,7 @@ extern Options &opt; int PrebuildContactMenu(WPARAM wParam, LPARAM lParam);
void PrebuildMainMenu();
int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam);
-int UploadFile(HCONTACT hContact, int iFtpNum, UploadJob::EMode mode);
+int UploadFile(MCONTACT hContact, int iFtpNum, UploadJob::EMode mode);
static PLUGININFOEX pluginInfoEx =
{
@@ -210,7 +210,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
bool bIsContact = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto) bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) ? true : false;
bool bHideRoot = opt.bHideInactive;
@@ -236,7 +236,7 @@ void PrebuildMainMenu() int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
{
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact)
{
@@ -292,7 +292,7 @@ int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam) return 0;
}
-int UploadFile(HCONTACT hContact, int iFtpNum, GenericJob::EMode mode, void **objects, int objCount, DWORD flags)
+int UploadFile(MCONTACT hContact, int iFtpNum, GenericJob::EMode mode, void **objects, int objCount, DWORD flags)
{
if (!ftpList[iFtpNum]->isValid())
{
@@ -334,7 +334,7 @@ int UploadFile(HCONTACT hContact, int iFtpNum, GenericJob::EMode mode, void **ob return 0;
}
-int UploadFile(HCONTACT hContact, int iFtpNum, GenericJob::EMode mode)
+int UploadFile(MCONTACT hContact, int iFtpNum, GenericJob::EMode mode)
{
return UploadFile(hContact, iFtpNum, mode, NULL, 0, 0);
}
@@ -363,7 +363,7 @@ INT_PTR ShowManagerService(WPARAM wParam, LPARAM lParam) INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int ftpNum = lParam & (1|2|4);
int mode = lParam & (UploadJob::FTP_RAWFILE | UploadJob::FTP_ZIPFILE | UploadJob::FTP_ZIPFOLDER);
return UploadFile(hContact, ftpNum, (UploadJob::EMode)mode);
diff --git a/plugins/FTPFileYM/src/job_generic.cpp b/plugins/FTPFileYM/src/job_generic.cpp index bfac7ccf79..7035ee6703 100644 --- a/plugins/FTPFileYM/src/job_generic.cpp +++ b/plugins/FTPFileYM/src/job_generic.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. extern UploadDialog *uDlg;
extern ServerList &ftpList;
-GenericJob::GenericJob(HCONTACT _hContact, int _iFtpNum, EMode _mode) :
+GenericJob::GenericJob(MCONTACT _hContact, int _iFtpNum, EMode _mode) :
hContact(_hContact),iFtpNum(_iFtpNum),mode(_mode),status(STATUS_CREATED),ftp(ftpList[iFtpNum])
{
this->stzFilePath[0] = 0;
diff --git a/plugins/FTPFileYM/src/job_generic.h b/plugins/FTPFileYM/src/job_generic.h index 0003045300..61045fb5a7 100644 --- a/plugins/FTPFileYM/src/job_generic.h +++ b/plugins/FTPFileYM/src/job_generic.h @@ -66,7 +66,7 @@ public: STATUS_COMPLETED
};
- HCONTACT hContact;
+ MCONTACT hContact;
int iFtpNum, fileID;
ServerList::FTP *ftp;
TCHAR stzFilePath[1024];
@@ -79,7 +79,7 @@ public: vector<TCHAR *> files;
TCHAR * operator[] (int i) const { return files[i];}
- GenericJob(HCONTACT hContact, int iFtpNum, EMode mode);
+ GenericJob(MCONTACT hContact, int iFtpNum, EMode mode);
GenericJob(GenericJob *job);
virtual ~GenericJob();
diff --git a/plugins/FTPFileYM/src/job_packer.cpp b/plugins/FTPFileYM/src/job_packer.cpp index a57d9dc402..26f1bc9ad5 100644 --- a/plugins/FTPFileYM/src/job_packer.cpp +++ b/plugins/FTPFileYM/src/job_packer.cpp @@ -25,7 +25,7 @@ int PackerJob::iRunningJobCount = 0; extern UploadDialog *uDlg;
extern Options &opt;
-PackerJob::PackerJob(HCONTACT _hContact, int _iFtpNum, EMode _mode) :
+PackerJob::PackerJob(MCONTACT _hContact, int _iFtpNum, EMode _mode) :
GenericJob(_hContact, _iFtpNum, _mode),uiFileSize(0),uiReaded(0),lastUpdateTick(0)
{ }
diff --git a/plugins/FTPFileYM/src/job_packer.h b/plugins/FTPFileYM/src/job_packer.h index 37c7edc055..297f256076 100644 --- a/plugins/FTPFileYM/src/job_packer.h +++ b/plugins/FTPFileYM/src/job_packer.h @@ -46,7 +46,7 @@ private: bool isCanceled();
public:
- PackerJob(HCONTACT hContact, int iFtpNum, EMode mode);
+ PackerJob(MCONTACT hContact, int iFtpNum, EMode mode);
virtual ~PackerJob() {};
virtual void start();
diff --git a/plugins/FTPFileYM/src/job_upload.cpp b/plugins/FTPFileYM/src/job_upload.cpp index 2d0a596da9..abe8240f93 100644 --- a/plugins/FTPFileYM/src/job_upload.cpp +++ b/plugins/FTPFileYM/src/job_upload.cpp @@ -25,7 +25,7 @@ int UploadJob::iRunningJobCount = 0; extern UploadDialog *uDlg;
extern ServerList &ftpList;
-UploadJob::UploadJob(HCONTACT _hContact, int _iFtpNum, EMode _mode) :
+UploadJob::UploadJob(MCONTACT _hContact, int _iFtpNum, EMode _mode) :
GenericJob(_hContact, _iFtpNum, _mode),fp(NULL)
{
this->szFileLink[0] = 0;
diff --git a/plugins/FTPFileYM/src/job_upload.h b/plugins/FTPFileYM/src/job_upload.h index 0679773cfd..3e4112befb 100644 --- a/plugins/FTPFileYM/src/job_upload.h +++ b/plugins/FTPFileYM/src/job_upload.h @@ -65,7 +65,7 @@ public: char szFileLink[256];
static Event jobDone;
- UploadJob(HCONTACT _hContact, int _iFtpNum, EMode _mode);
+ UploadJob(MCONTACT _hContact, int _iFtpNum, EMode _mode);
UploadJob(UploadJob *job);
UploadJob(PackerJob *job);
virtual ~UploadJob();
diff --git a/plugins/FTPFileYM/src/mir_db.cpp b/plugins/FTPFileYM/src/mir_db.cpp index bf21c1f472..dedd8dc256 100644 --- a/plugins/FTPFileYM/src/mir_db.cpp +++ b/plugins/FTPFileYM/src/mir_db.cpp @@ -18,63 +18,63 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-int DB::setByteF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
+int DB::setByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_set_b(hContact, szModule, formSet, iValue);
}
-int DB::setWordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
+int DB::setWordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_set_w(hContact, szModule, formSet, iValue);
}
-int DB::setDwordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
+int DB::setDwordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_set_dw(hContact, szModule, formSet, iValue);
}
-int DB::setAStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, char *szValue)
+int DB::setAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *szValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_set_s(hContact, szModule, formSet, szValue);
}
-int DB::setStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue)
+int DB::setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_set_ts(hContact, szModule, formSet, stzValue);
}
-int DB::getByteF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
+int DB::getByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_get_b(hContact, szModule, formSet, iErrorValue);
}
-int DB::getWordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
+int DB::getWordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_get_w(hContact, szModule, formSet, iErrorValue);
}
-int DB::getDwordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
+int DB::getDwordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return db_get_dw(hContact, szModule, formSet, iErrorValue);
}
-int DB::getAString(HCONTACT hContact, char *szModule, char *szSetting, char *buff)
+int DB::getAString(MCONTACT hContact, char *szModule, char *szSetting, char *buff)
{
DBVARIANT dbv;
if (!db_get_s(hContact, szModule, szSetting, &dbv))
@@ -88,14 +88,14 @@ int DB::getAString(HCONTACT hContact, char *szModule, char *szSetting, char *buf return 1;
}
-int DB::getAStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, char *buff)
+int DB::getAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *buff)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return getAString(hContact, szModule, formSet, buff);
}
-int DB::getString(HCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff)
+int DB::getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff)
{
DBVARIANT dbv;
if (!db_get_ts(hContact, szModule, szSetting, &dbv))
@@ -109,14 +109,14 @@ int DB::getString(HCONTACT hContact, char *szModule, char *szSetting, TCHAR *buf return 1;
}
-int DB::getStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff)
+int DB::getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
return getString(hContact, szModule, formSet, buff);
}
-int DB::deleteSettingF(HCONTACT hContact, char *szModule, char *szSetting, int id)
+int DB::deleteSettingF(MCONTACT hContact, char *szModule, char *szSetting, int id)
{
char formSet[256];
mir_snprintf(formSet, sizeof(formSet), szSetting, id);
diff --git a/plugins/FTPFileYM/src/mir_db.h b/plugins/FTPFileYM/src/mir_db.h index e5175fdc0a..aeceb31576 100644 --- a/plugins/FTPFileYM/src/mir_db.h +++ b/plugins/FTPFileYM/src/mir_db.h @@ -23,22 +23,22 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. class DB
{
public:
- static int setByteF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
- static int setWordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
- static int setDwordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
+ static int setByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
+ static int setWordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
+ static int setDwordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iValue);
- static int setAStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, char *szValue);
- static int setStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue);
+ static int setAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *szValue);
+ static int setStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *stzValue);
- static int getByteF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
- static int getWordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
- static int getDwordF(HCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
+ static int getByteF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
+ static int getWordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
+ static int getDwordF(MCONTACT hContact, char *szModule, char *szSetting, int id, int iErrorValue = -1);
// !!!!!!!!!!!!!!!!!!! dangerous as hell
- static int getAString(HCONTACT hContact, char *szModule, char *szSetting, char *buff);
- static int getAStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, char *buff);
- static int getString(HCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff);
- static int getStringF(HCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff);
+ static int getAString(MCONTACT hContact, char *szModule, char *szSetting, char *buff);
+ static int getAStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, char *buff);
+ static int getString(MCONTACT hContact, char *szModule, char *szSetting, TCHAR *buff);
+ static int getStringF(MCONTACT hContact, char *szModule, char *szSetting, int id, TCHAR *buff);
- static int deleteSettingF(HCONTACT hContact, char *szModule, char *szSetting, int id);
+ static int deleteSettingF(MCONTACT hContact, char *szModule, char *szSetting, int id);
};
diff --git a/plugins/FavContacts/src/contact_cache.cpp b/plugins/FavContacts/src/contact_cache.cpp index b61fc00f95..f934015eb2 100644 --- a/plugins/FavContacts/src/contact_cache.cpp +++ b/plugins/FavContacts/src/contact_cache.cpp @@ -2,7 +2,7 @@ int __cdecl CContactCache::OnDbEventAdded(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hEvent = (HANDLE)lParam;
DBEVENTINFO dbei = {0};
@@ -81,7 +81,7 @@ void CContactCache::Rebuild() unsigned long timestamp = time(NULL);
m_lastUpdate = time(NULL);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
TContactInfo *info = new TContactInfo;
info->hContact = hContact;
info->rate = 0;
@@ -102,7 +102,7 @@ void CContactCache::Rebuild() }
}
-HCONTACT CContactCache::get(int rate)
+MCONTACT CContactCache::get(int rate)
{
if (rate >= 0 && rate < m_cache.getCount())
return m_cache[rate].hContact;
@@ -116,7 +116,7 @@ float CContactCache::getWeight(int rate) return -1;
}
-static bool AppendInfo(TCHAR *buf, int size, HCONTACT hContact, int info)
+static bool AppendInfo(TCHAR *buf, int size, MCONTACT hContact, int info)
{
CONTACTINFO ci = {0};
ci.cbSize = sizeof(ci);
diff --git a/plugins/FavContacts/src/contact_cache.h b/plugins/FavContacts/src/contact_cache.h index 15c3b2c81a..b3ad95e027 100644 --- a/plugins/FavContacts/src/contact_cache.h +++ b/plugins/FavContacts/src/contact_cache.h @@ -10,7 +10,7 @@ private: struct TContactInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
float rate;
TCHAR info[INFOSIZE];
bool infoLoaded;
@@ -52,7 +52,7 @@ public: void Unlock() { LeaveCriticalSection(&m_cs); }
void Rebuild();
- HCONTACT get(int rate);
+ MCONTACT get(int rate);
float getWeight(int rate);
bool filter(int rate, TCHAR *str);
};
diff --git a/plugins/FavContacts/src/favlist.h b/plugins/FavContacts/src/favlist.h index c0ebd6e2d0..0f16ef8fb6 100644 --- a/plugins/FavContacts/src/favlist.h +++ b/plugins/FavContacts/src/favlist.h @@ -4,7 +4,7 @@ struct TContactInfo
{
private:
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD status;
TCHAR *name;
TCHAR *group;
@@ -12,7 +12,7 @@ private: float fRate;
public:
- TContactInfo(HCONTACT hContact, bool bManual, float fRate = 0)
+ TContactInfo(MCONTACT hContact, bool bManual, float fRate = 0)
{
DBVARIANT dbv = {0};
@@ -41,7 +41,7 @@ public: mir_free(group);
}
- HCONTACT getHandle() const
+ MCONTACT getHandle() const
{
return hContact;
}
@@ -89,7 +89,7 @@ public: return nGroups;
}
- TContactInfo *addContact(HCONTACT hContact, bool bManual)
+ TContactInfo *addContact(MCONTACT hContact, bool bManual)
{
TContactInfo *info = new TContactInfo(hContact, bManual);
this->insert(info);
@@ -102,7 +102,7 @@ public: nGroups = 1;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, "FavContacts", "IsFavourite", 0))
{
TCHAR *group = addContact(hContact, true)->getGroup();
@@ -113,7 +113,7 @@ public: int nRecent = 0;
for (int i = 0; nRecent < g_Options.wMaxRecent; ++i) {
- HCONTACT hContact = g_contactCache->get(i);
+ MCONTACT hContact = g_contactCache->get(i);
if (!hContact) break;
if (!db_get_b(hContact, "FavContacts", "IsFavourite", 0))
{
diff --git a/plugins/FavContacts/src/http_api.cpp b/plugins/FavContacts/src/http_api.cpp index bce57b0a7a..693ba4cd28 100644 --- a/plugins/FavContacts/src/http_api.cpp +++ b/plugins/FavContacts/src/http_api.cpp @@ -67,7 +67,7 @@ public: for (int i = 0; i < favList.getCount(); ++i)
{
- HCONTACT hContact = favList[i]->getHandle();
+ MCONTACT hContact = favList[i]->getHandle();
TCHAR *name = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
AVATARCACHEENTRY *avatar = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
int status = db_get_w(hContact, GetContactProto(hContact), "Status", ID_STATUS_OFFLINE);
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp index 4982a7fcb9..ee53ee1b06 100644 --- a/plugins/FavContacts/src/main.cpp +++ b/plugins/FavContacts/src/main.cpp @@ -75,7 +75,7 @@ TCHAR g_filter[1024] = {0}; Options g_Options = {0};
static HANDLE hDialogsList = NULL;
-static HCONTACT hContactToActivate = NULL;
+static MCONTACT hContactToActivate = NULL;
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
@@ -248,7 +248,7 @@ int ProcessModulesLoaded(WPARAM wParam, LPARAM lParam) Hotkey_Register(&hotkey);
if (ServiceExists(MS_AV_GETAVATARBITMAP)) {
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, "FavContacts", "IsFavourite", 0))
CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
}
@@ -387,7 +387,7 @@ static BOOL sttMeasureItem_Group(LPMEASUREITEMSTRUCT lpmis, Options *options) static BOOL sttMeasureItem_Contact(LPMEASUREITEMSTRUCT lpmis, Options *options)
{
- HCONTACT hContact = (HCONTACT)lpmis->itemData;
+ MCONTACT hContact = (MCONTACT)lpmis->itemData;
lpmis->itemHeight = 4;
lpmis->itemWidth = 8+10;
@@ -525,7 +525,7 @@ void ImageList_DrawDimmed(HIMAGELIST himl, int i, HDC hdc, int left, int top, UI static BOOL sttDrawItem_Contact(LPDRAWITEMSTRUCT lpdis, Options *options = NULL)
{
- HCONTACT hContact = (HCONTACT)lpdis->itemData;
+ MCONTACT hContact = (MCONTACT)lpdis->itemData;
HDC hdcTemp = CreateCompatibleDC(lpdis->hDC);
HBITMAP hbmTemp = CreateCompatibleBitmap(lpdis->hDC, lpdis->rcItem.right-lpdis->rcItem.left, lpdis->rcItem.bottom-lpdis->rcItem.top);
@@ -703,7 +703,7 @@ static BOOL sttDrawItem(LPDRAWITEMSTRUCT lpdis, Options *options=NULL) static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hContact = NULL;
+ static MCONTACT hContact = NULL;
switch (message) {
case WM_MEASUREITEM:
@@ -749,7 +749,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, int nRecent = 0;
int maxRecent = g_Options.wMaxRecent ? g_Options.wMaxRecent : 10;
for (int i = 0; nRecent < maxRecent; ++i) {
- HCONTACT hContact = g_contactCache->get(i);
+ MCONTACT hContact = g_contactCache->get(i);
if (!hContact) break;
if (!g_contactCache->filter(i, g_filter)) continue;
@@ -764,7 +764,7 @@ static LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, MENUITEMINFO mii = { sizeof(mii) };
mii.fMask = MIIM_DATA;
GetMenuItemInfo((HMENU)lParam, wParam, TRUE, &mii);
- HCONTACT hContact = (HCONTACT)mii.dwItemData;
+ MCONTACT hContact = (MCONTACT)mii.dwItemData;
if (!CallService(MS_DB_CONTACT_IS, mii.dwItemData, 0)) return FALSE;
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
@@ -793,7 +793,7 @@ int sttShowMenu(bool centered) SIZE szColumn = {0};
TCHAR *prevGroup = NULL;
int i, idItem = 100;
- HCONTACT hContact;
+ MCONTACT hContact;
favList.build();
@@ -867,7 +867,7 @@ int sttShowMenu(bool centered) mii.cbSize = sizeof(mii);
mii.fMask = MIIM_DATA;
GetMenuItemInfo(hMenu, res, FALSE, &mii);
- hContact = (HCONTACT)mii.dwItemData;
+ hContact = (MCONTACT)mii.dwItemData;
}
SetForegroundWindow(hwndSave);
DestroyMenu(hMenu);
@@ -892,7 +892,7 @@ INT_PTR svcShowMenuCentered(WPARAM wParam, LPARAM lParam) INT_PTR svcOpenContact(WPARAM wParam, LPARAM lParam)
{
- hContactToActivate = (HCONTACT)wParam;
+ hContactToActivate = (MCONTACT)wParam;
CallService(MS_CLIST_CONTACTDOUBLECLICKED, (WPARAM)hContactToActivate, 0);
return 0;
}
@@ -940,7 +940,7 @@ int ProcessSrmmIconClick( WPARAM wParam, LPARAM lParam ) StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (lstrcmpA(sicd->szModule, "FavContacts")) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -977,7 +977,7 @@ static void sttResetListOptions(HWND hwndList) static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
static bool bInitialized = false;
- static HCONTACT hSelectedContact = 0;
+ static MCONTACT hSelectedContact = 0;
switch (msg) {
case WM_INITDIALOG:
@@ -1005,7 +1005,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA hSelectedContact = db_find_first();
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0),
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -1127,7 +1127,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA sttSaveOptions();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE fav = SendDlgItemMessage(hwnd, IDC_CLIST, CLM_GETCHECKMARK,
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (fav != db_get_b(hContact, "FavContacts", "IsFavourite", 0))
@@ -1145,7 +1145,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case CLN_NEWCONTACT:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
SendDlgItemMessage(hwnd, IDC_CLIST, CLM_SETCHECKMARK, iSelection,
db_get_b(hContact, "FavContacts", "IsFavourite", 0));
@@ -1156,7 +1156,7 @@ static INT_PTR CALLBACK OptionsDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARA case CLN_CHECKCHANGED:
iSelection = (int)((NMCLISTCONTROL *)lParam)->hItem;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (SendDlgItemMessage(hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection) {
hSelectedContact = hContact;
RedrawWindow(GetDlgItem(hwnd, IDC_CANVAS), NULL, NULL, RDW_INVALIDATE);
diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index de324848ae..9728ff95f2 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -64,7 +64,7 @@ char cCmdList[CMD_COUNT] = static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = PUGetContact(hWnd);
+ MCONTACT hContact = PUGetContact(hWnd);
HWND hDlg = (HWND)PUGetPluginData(hWnd);
/*
if(hContact)
@@ -112,7 +112,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM //
// Just create simple Popup for specified contact
//
-void MakePopupMsg(HWND hDlg, HCONTACT hContact, char *msg)
+void MakePopupMsg(HWND hDlg, MCONTACT hContact, char *msg)
{
HWND hFocused = GetForegroundWindow();
if(hDlg == hFocused || hDlg == GetParent(hFocused)) return;
@@ -156,7 +156,7 @@ int RetrieveFileSize(char *filename) return handle;
}
-FILEECHO::FILEECHO(HCONTACT Contact)
+FILEECHO::FILEECHO(MCONTACT Contact)
{
hContact = Contact;
dwSendInterval = db_get_dw(NULL, SERVICE_NAME, "SendDelay", 6000);
diff --git a/plugins/FileAsMessage/src/dialog.h b/plugins/FileAsMessage/src/dialog.h index e8914ef5b5..962781b661 100644 --- a/plugins/FileAsMessage/src/dialog.h +++ b/plugins/FileAsMessage/src/dialog.h @@ -54,7 +54,7 @@ extern char cFECmd[CMD_COUNT]; struct FILEECHO
{
public:
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hDlg;
bool inSend;
@@ -90,7 +90,7 @@ public: uint overhead;
#endif
- FILEECHO(HCONTACT Contact);
+ FILEECHO(MCONTACT Contact);
void setState(DWORD state);
void updateProgress();
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index 66362e9cdb..1472a5cb0e 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -54,7 +54,7 @@ int OnSettingChanged(WPARAM wParam,LPARAM lParam) {
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- HWND hwnd = WindowList_Find(hFileList,(HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hFileList,(MCONTACT)wParam);
PostMessage(hwnd, WM_FE_STATUSCHANGE, 0,0);
//OnSkinIconsChanged(0,0);
//PostMessage(hwnd, WM_FE_SKINCHANGE, 0,0);
@@ -94,7 +94,7 @@ INT_PTR OnRecvFile(WPARAM wParam, LPARAM lParam) INT_PTR OnSendFile(WPARAM wParam, LPARAM lParam)
{
- HWND hwnd = WindowList_Find(hFileList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hFileList, (MCONTACT)wParam);
if(IsWindow(hwnd))
{
SetForegroundWindow(hwnd);
@@ -103,7 +103,7 @@ INT_PTR OnSendFile(WPARAM wParam, LPARAM lParam) else
{
if(hwnd != 0) WindowList_Remove(hFileList, hwnd);
- FILEECHO *fe = new FILEECHO((HCONTACT)wParam);
+ FILEECHO *fe = new FILEECHO((MCONTACT)wParam);
fe->inSend = TRUE;
hwnd = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_MAIN), NULL, DialogProc, (LPARAM)fe);
if(hwnd == NULL)
diff --git a/plugins/FingerprintNG/src/fingerprint.cpp b/plugins/FingerprintNG/src/fingerprint.cpp index 82addeed47..4790a2c184 100644 --- a/plugins/FingerprintNG/src/fingerprint.cpp +++ b/plugins/FingerprintNG/src/fingerprint.cpp @@ -140,7 +140,7 @@ void RegisterIcons() * 3)Set ExtraImage for contact
*/
-static void SetSrmmIcon(HCONTACT hContact, LPTSTR ptszMirver)
+static void SetSrmmIcon(MCONTACT hContact, LPTSTR ptszMirver)
{
StatusIconData sid = { sizeof(sid) };
sid.szModule = MODULENAME;
@@ -156,7 +156,7 @@ static void SetSrmmIcon(HCONTACT hContact, LPTSTR ptszMirver) Srmm_ModifyIcon(hContact, &sid);
}
-int __fastcall ApplyFingerprintImage(HCONTACT hContact, LPTSTR szMirVer)
+int __fastcall ApplyFingerprintImage(MCONTACT hContact, LPTSTR szMirVer)
{
if (hContact == NULL)
return 0;
@@ -838,7 +838,7 @@ static int OnIconsChanged(WPARAM wParam, LPARAM lParam) int OnExtraImageApply(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -862,7 +862,7 @@ int OnExtraImageApply(WPARAM wParam, LPARAM lParam) static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
diff --git a/plugins/FingerprintNG/src/options.cpp b/plugins/FingerprintNG/src/options.cpp index 13614c5a19..74b62bacc9 100644 --- a/plugins/FingerprintNG/src/options.cpp +++ b/plugins/FingerprintNG/src/options.cpp @@ -103,7 +103,7 @@ static INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LP ClearFI();
RegisterIcons();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
OnExtraImageApply((WPARAM)hContact, 0);
}
break;
diff --git a/plugins/FlashAvatars/src/cflash.cpp b/plugins/FlashAvatars/src/cflash.cpp index c06a6c40d7..7b280a6e45 100644 --- a/plugins/FlashAvatars/src/cflash.cpp +++ b/plugins/FlashAvatars/src/cflash.cpp @@ -31,13 +31,13 @@ int __fastcall strcmpnull(const char *str1, const char *str2) { struct flash_avatar_item : public MZeroedObject
{
- HCONTACT hContact;
+ MCONTACT hContact;
FLASHAVATAR hFA;
IShockwaveFlash* pFlash;
char* getProto() { return (hFA.cProto) ? hFA.cProto : GetContactProto(hFA.hContact); }
- flash_avatar_item(HCONTACT contact, FLASHAVATAR& fa, IShockwaveFlash *flash) { hContact = contact; hFA = fa; pFlash = flash; }
+ flash_avatar_item(MCONTACT contact, FLASHAVATAR& fa, IShockwaveFlash *flash) { hContact = contact; hFA = fa; pFlash = flash; }
};
static int CompareFlashItems(const flash_avatar_item* p1, const flash_avatar_item* p2) {
@@ -477,13 +477,13 @@ static int statusChanged(WPARAM wParam, LPARAM lParam) Lock l(cs);
for(int i = 0; i < FlashList.getCount(); i++) {
flash_avatar_item *item = FlashList[i];
- if (item->hContact == (HCONTACT)wParam) {
+ if (item->hContact == (MCONTACT)wParam) {
IShockwaveFlash* flash = item->pFlash;
if (flash) {
getFace();
flash->SetVariable(L"face.emotion", _bstr_t(face).copy());
}
- } else if (item->hContact > (HCONTACT)wParam)
+ } else if (item->hContact > (MCONTACT)wParam)
break; // the list is sorted by hContact
}
return 0;
@@ -542,7 +542,7 @@ static int eventAdded(WPARAM wParam, LPARAM lParam) face = AV_NORMAL;
}
- HCONTACT hContact = (dbei.flags & DBEF_SENT) ? 0 : (HCONTACT)wParam;
+ MCONTACT hContact = (dbei.flags & DBEF_SENT) ? 0 : (MCONTACT)wParam;
for(int i=0; i<FlashList.getCount(); i++) {
flash_avatar_item *item = FlashList[i];
if (item->hContact == hContact && !strcmpnull(dbei.szModule, item->getProto())) {
diff --git a/plugins/FloatingContacts/src/fltcont.h b/plugins/FloatingContacts/src/fltcont.h index d7d1a12bb6..3bb3138f86 100644 --- a/plugins/FloatingContacts/src/fltcont.h +++ b/plugins/FloatingContacts/src/fltcont.h @@ -140,7 +140,7 @@ static __forceinline BOOL ImageList_GetIconSize_my(HIMAGELIST himl, SIZE &sz) return res;
}
-void RegHotkey ( HCONTACT hContact, HWND hwnd );
+void RegHotkey ( MCONTACT hContact, HWND hwnd );
BOOL IsStatusVisible ( int status );
BOOL HideOnFullScreen ();
void SendMsgDialog ( HWND hwnd, TCHAR *pText );
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp index 4194fad79a..b303a07796 100644 --- a/plugins/FloatingContacts/src/main.cpp +++ b/plugins/FloatingContacts/src/main.cpp @@ -22,18 +22,18 @@ No warranty for any misbehaviour. // TODO: move to some more approriate place, probably part of Thumbs manager
static void LoadContacts(void);
-static void LoadContact(HCONTACT hContact);
+static void LoadContact(MCONTACT hContact);
// Internal funcs
static void RepaintWindow(HWND hwnd, HDC hdc);
static void LoadMenus();
-static void CreateThumbWnd(TCHAR *ptszName, HCONTACT hContact, int nX, int nY);
+static void CreateThumbWnd(TCHAR *ptszName, MCONTACT hContact, int nX, int nY);
static void RegisterWindowClass(void);
static void UnregisterWindowClass(void);
static void LoadDBSettings(void);
static void CreateThumbsFont(void);
static void CreateBackgroundBrush(void);
-static int GetContactStatus(HCONTACT hContact);
+static int GetContactStatus(MCONTACT hContact);
static void GetScreenRect(void);
extern void SetThumbsOpacity(BYTE btAlpha);
static int ClcStatusToPf2(int status);
@@ -44,7 +44,7 @@ HINSTANCE hInst; HFONT hFont[FLT_FONTIDS];
COLORREF tColor[FLT_FONTIDS];
HIMAGELIST himlMiranda;
-HCONTACT hNewContact;
+MCONTACT hNewContact;
HPEN hLTEdgesPen;
HPEN hRBEdgesPen;
@@ -136,7 +136,7 @@ static LPCTSTR s_fonts[FLT_FONTIDS] = static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->DeleteContactPos();
@@ -147,7 +147,7 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam) static int OnContactIconChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->RefreshContactIcon((int)lParam);
@@ -163,7 +163,7 @@ static int OnContactDrag(WPARAM wParam, LPARAM lParam) POINT pt;
GetCursorPos(&pt);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb == NULL) {
int idStatus = GetContactStatus(hContact);
@@ -188,7 +188,7 @@ static int OnContactDrop(WPARAM wParam, LPARAM lParam) RECT rcMiranda;
RECT rcThumb;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (hNewContact == hContact && pThumb != NULL) {
@@ -204,7 +204,7 @@ static int OnContactDrop(WPARAM wParam, LPARAM lParam) static int OnContactDragStop(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb != NULL && hNewContact == hContact) {
thumbList.RemoveThumb(pThumb);
@@ -228,7 +228,7 @@ static int OnSkinIconsChanged(WPARAM wParam, LPARAM lParam) static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
int idStatus = ID_STATUS_OFFLINE;
BOOL bRefresh = TRUE;
@@ -292,7 +292,7 @@ static int OnStatusModeChange(WPARAM wParam, LPARAM lParam) static int OnPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- ThumbInfo *pThumb = thumbList.FindThumbByContact((HCONTACT)wParam);
+ ThumbInfo *pThumb = thumbList.FindThumbByContact((MCONTACT)wParam);
Menu_ShowItem(hMenuItemRemove, pThumb != NULL);
Menu_ShowItem(hMenuItemHideAll, !fcOpt.bHideAll);
@@ -516,7 +516,7 @@ static void UnregisterWindowClass() UnregisterClass(WND_CLASS, hInst);
}
-static void CreateThumbWnd(TCHAR *ptszName, HCONTACT hContact, int nX, int nY)
+static void CreateThumbWnd(TCHAR *ptszName, MCONTACT hContact, int nX, int nY)
{
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb != NULL)
@@ -609,7 +609,7 @@ static void CreateBackgroundBrush() SetClassLong((HWND)WND_CLASS, GCLP_HBRBACKGROUND, (LONG)hBkBrush);
}
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
if (hContact == NULL) {
assert( !"Contact is NULL" );
@@ -646,7 +646,7 @@ BOOL IsStatusVisible(int status) return (0 == (dwOfflineModes & ClcStatusToPf2(status)));
}
-void RegHotkey(HCONTACT hContact, HWND hwnd)
+void RegHotkey(MCONTACT hContact, HWND hwnd)
{
char szBuf[MAX_PATH] = {0};
@@ -696,7 +696,7 @@ void SaveContactsPos() static void LoadContacts()
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
LoadContact(hContact);
}
@@ -719,7 +719,7 @@ static INT_PTR OnMainMenu_HideAll(WPARAM wParam, LPARAM lParam) static INT_PTR OnContactMenu_Remove(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (pThumb) {
pThumb->DeleteContactPos();
@@ -777,7 +777,7 @@ static void LoadMenus() /////////////////////////////////////////////////////////////////////////////////////////
-static void LoadContact( HCONTACT hContact )
+static void LoadContact( MCONTACT hContact )
{
ThumbInfo *pThumb = thumbList.FindThumbByContact(hContact);
if (hContact == NULL)
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index 37b51e95b9..69228d7265 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -768,7 +768,7 @@ ThumbList::~ThumbList() {
}
-ThumbInfo *ThumbList::AddThumb(HWND hwnd, TCHAR *ptszName, HCONTACT hContact)
+ThumbInfo *ThumbList::AddThumb(HWND hwnd, TCHAR *ptszName, MCONTACT hContact)
{
if (ptszName == NULL || hContact == NULL || hwnd == NULL)
return NULL;
@@ -813,7 +813,7 @@ ThumbInfo* ThumbList::FindThumb(HWND hwnd) return NULL;
}
-ThumbInfo *ThumbList::FindThumbByContact(HCONTACT hContact)
+ThumbInfo *ThumbList::FindThumbByContact(MCONTACT hContact)
{
if (!hContact) return NULL;
diff --git a/plugins/FloatingContacts/src/thumbs.h b/plugins/FloatingContacts/src/thumbs.h index f13251e22a..c1bedb61ef 100644 --- a/plugins/FloatingContacts/src/thumbs.h +++ b/plugins/FloatingContacts/src/thumbs.h @@ -12,7 +12,7 @@ DockOpt; struct ThumbInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwnd;
TCHAR ptszName[USERNAME_LEN];
int iIcon;
@@ -60,11 +60,11 @@ public: ThumbList();
~ThumbList();
- ThumbInfo* AddThumb(HWND hwnd, TCHAR *ptszName, HCONTACT hContact);
+ ThumbInfo* AddThumb(HWND hwnd, TCHAR *ptszName, MCONTACT hContact);
void RemoveThumb(ThumbInfo *pThumb);
ThumbInfo* FindThumb(HWND hwnd);
- ThumbInfo* FindThumbByContact(HCONTACT hContact);
+ ThumbInfo* FindThumbByContact(MCONTACT hContact);
};
extern ThumbList thumbList;
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp index 1bb124b2d2..26eb3a534c 100644 --- a/plugins/HTTPServer/src/GuiElements.cpp +++ b/plugins/HTTPServer/src/GuiElements.cpp @@ -92,7 +92,7 @@ void ReplaceAll(string &sSrc, const char * pszReplace, const char * pszNew) { // Developer : KN
/////////////////////////////////////////////////////////////////////
-string DBGetString(HCONTACT hContact, const char *szModule, const char *szSetting, const char * pszError) {
+string DBGetString(MCONTACT hContact, const char *szModule, const char *szSetting, const char * pszError) {
string ret;
DBVARIANT dbv = {0};
if (! db_get(hContact, szModule, szSetting, &dbv)) {
@@ -1014,7 +1014,7 @@ void SendLinkToUser(WPARAM wParam, char *pszSrvPath) { /////////////////////////////////////////////////////////////////////
static INT_PTR nShareNewFile(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// used to be _MAX_PATH
// changed it since selecting multiple files requires a bigger buffer
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp index 76d3e2df02..8e3a9eaa7d 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist.cpp @@ -123,7 +123,7 @@ int InitOptionsDlg(WPARAM wParam, LPARAM) static INT_PTR LinkList_Main(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = WindowList_Find(hWindowList, hContact);
if ( hWnd != NULL ) {
int len;
diff --git a/plugins/HistoryLinkListPlus/src/linklist.h b/plugins/HistoryLinkListPlus/src/linklist.h index 9806f72204..be23192b05 100644 --- a/plugins/HistoryLinkListPlus/src/linklist.h +++ b/plugins/HistoryLinkListPlus/src/linklist.h @@ -137,7 +137,7 @@ typedef struct LISTELEMENT LISTELEMENT; // Dialogbox Parameter
typedef struct{
- HCONTACT hContact;
+ MCONTACT hContact;
LISTELEMENT *listStart;
UINT findMessage;
CHARRANGE chrg;
diff --git a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp index e9986938b6..067f67043a 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_dlg.cpp @@ -38,7 +38,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) {
case WM_INITDIALOG:
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR title[256];
TCHAR filter[FILTERTEXT];
RECT rc;
@@ -441,7 +441,7 @@ INT_PTR WINAPI MainDlgProc( HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam ) case WM_DESTROY:
{
- HCONTACT hContact;
+ MCONTACT hContact;
if ( db_get_b(NULL, LINKLIST_MODULE, LINKLIST_SAVESPECIAL, 0x00) == 0x00 )
hContact = NULL;
else
diff --git a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp index a875c3fdd8..9b2485d476 100644 --- a/plugins/HistoryLinkListPlus/src/linklist_fct.cpp +++ b/plugins/HistoryLinkListPlus/src/linklist_fct.cpp @@ -1202,7 +1202,7 @@ This function is derived from his Wordlookup Plugin int DBUpdate(WPARAM wParam, LPARAM lParam)
{
HANDLE hEvent=(HANDLE)lParam;
- HWND hDlg = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hDlg = WindowList_Find(hWindowList, (MCONTACT)wParam);
DIALOGPARAM *DlgParam;
HMENU listMenu = GetMenu(hDlg);
int linkNum = 0;
diff --git a/plugins/HistorySweeperLight/src/historysweeperlight.cpp b/plugins/HistorySweeperLight/src/historysweeperlight.cpp index 5c44ba7852..827481ad65 100644 --- a/plugins/HistorySweeperLight/src/historysweeperlight.cpp +++ b/plugins/HistorySweeperLight/src/historysweeperlight.cpp @@ -93,7 +93,7 @@ static int CompareBookmarks( const void* p1, const void* p2 ) return (BYTE*)((BEventData*)p1)->hDBEvent - (BYTE*)((BEventData*)p2)->hDBEvent;
}
-static void GetBookmarks(HCONTACT hContact, BEventData** books, size_t* bookcnt )
+static void GetBookmarks(MCONTACT hContact, BEventData** books, size_t* bookcnt )
{
*books = NULL;
*bookcnt = 0;
@@ -132,7 +132,7 @@ static void GetBookmarks(HCONTACT hContact, BEventData** books, size_t* bookcnt }
//Sweep history from specified contact
-void SweepHistoryFromContact(HCONTACT hContact, CriteriaStruct Criteria, BOOL keepUnread)
+void SweepHistoryFromContact(MCONTACT hContact, CriteriaStruct Criteria, BOOL keepUnread)
{
int lPolicy;
if (hContact == NULL) // for system history
@@ -209,7 +209,7 @@ void ShutdownAction(void) SweepHistoryFromContact(NULL, Criteria, FALSE); // sweep system history, keepunread==0
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SweepHistoryFromContact(hContact, Criteria, TRUE); // sweep contact history, keepunread==1
}
diff --git a/plugins/HistorySweeperLight/src/main.cpp b/plugins/HistorySweeperLight/src/main.cpp index 438d09c5f7..e19a516674 100644 --- a/plugins/HistorySweeperLight/src/main.cpp +++ b/plugins/HistorySweeperLight/src/main.cpp @@ -53,7 +53,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) if ( !(sicd->flags & MBCF_RIGHTBUTTON) && !lstrcmpA(sicd->szModule, ModuleName)
&& db_get_b(NULL, ModuleName, "ChangeInMW", 0))
{
- int nh = sicd->dwId; HCONTACT hContact = (HCONTACT)wParam;
+ int nh = sicd->dwId; MCONTACT hContact = (MCONTACT)wParam;
StatusIconData sid = { sizeof(sid) };
sid.szModule = ModuleName;
@@ -62,7 +62,7 @@ int OnIconPressed(WPARAM wParam, LPARAM lParam) Srmm_ModifyIcon(hContact, &sid);
nh = (nh + 1) % 4;
- db_set_b((HCONTACT)wParam, ModuleName, "SweepHistory", (BYTE)nh);
+ db_set_b((MCONTACT)wParam, ModuleName, "SweepHistory", (BYTE)nh);
sid.dwId = nh;
sid.flags = 0;
@@ -111,7 +111,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) Srmm_AddIcon(&sid);
// for new contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ZeroMemory(&sid,sizeof(sid));
sweep = db_get_b(hContact, ModuleName, "SweepHistory", 0);
diff --git a/plugins/HistorySweeperLight/src/options.cpp b/plugins/HistorySweeperLight/src/options.cpp index 1d8cc4d4f0..fc6d6418e8 100644 --- a/plugins/HistorySweeperLight/src/options.cpp +++ b/plugins/HistorySweeperLight/src/options.cpp @@ -107,7 +107,7 @@ static void ShowAllContactIcons(HWND hwndList) SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hSystemHistory,
MAKELPARAM(0, db_get_b(NULL, ModuleName, "SweepSHistory", 0)));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem,
MAKELPARAM(0, db_get_b(hContact, ModuleName, "SweepHistory", 0)));
@@ -174,7 +174,7 @@ void SaveSettings(HWND hwndDlg) db_set_b(NULL, ModuleName, "SweepSHistory",
(BYTE)SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hSystemHistory, 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
st = SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, 0);
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp index d8ae83bc32..b8fc6eb740 100644 --- a/plugins/IEView/src/HTMLBuilder.cpp +++ b/plugins/IEView/src/HTMLBuilder.cpp @@ -41,7 +41,7 @@ HTMLBuilder::~HTMLBuilder() mir_free((void*)lastIEViewEvent.pszProto);
}
-bool HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
+bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
{
TextToken *token = NULL, *token2;
switch (level) {
@@ -86,7 +86,7 @@ bool HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *te return false;
}
-wchar_t* HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent)
+wchar_t* HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent)
{
int outputSize;
wchar_t *output = NULL;
@@ -95,7 +95,7 @@ wchar_t* HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t return output;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const wchar_t *wtext, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const wchar_t *wtext, int flags, bool isSent)
{
char *outputStr = NULL;
if (wtext != NULL) {
@@ -107,7 +107,7 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const wchar_ return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
{
char *outputStr = NULL;
if (text != NULL) {
@@ -118,7 +118,7 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char * return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent)
{
char *outputStr = NULL;
if (text != NULL) {
@@ -129,12 +129,12 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char * return outputStr;
}
-char* HTMLBuilder::getProto(HCONTACT hContact)
+char* HTMLBuilder::getProto(MCONTACT hContact)
{
return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getProto(const char *proto, HCONTACT hContact)
+char* HTMLBuilder::getProto(const char *proto, MCONTACT hContact)
{
if (proto != NULL)
return mir_strdup(proto);
@@ -142,14 +142,14 @@ char* HTMLBuilder::getProto(const char *proto, HCONTACT hContact) return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getRealProto(HCONTACT hContact)
+char* HTMLBuilder::getRealProto(MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
char *szProto = mir_strdup(GetContactProto(hContact));
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL) {
mir_free(szProto);
szProto = mir_strdup(GetContactProto(hContact));
@@ -158,21 +158,21 @@ char* HTMLBuilder::getRealProto(HCONTACT hContact) return szProto;
}
-char *HTMLBuilder::getRealProto(HCONTACT hContact, const char *szProto)
+char *HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto)
{
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL)
return mir_strdup(GetContactProto(hContact));
}
return mir_strdup(szProto);
}
-HCONTACT HTMLBuilder::getRealContact(HCONTACT hContact)
+MCONTACT HTMLBuilder::getRealContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto,"MetaContacts"))
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return hContact;
}
@@ -208,7 +208,7 @@ bool HTMLBuilder::isSameDate(time_t time1, time_t time2) return false;
}
-void HTMLBuilder::getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut)
+void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut)
{
CONTACTINFO ci;
char buf[128];
@@ -250,7 +250,7 @@ void HTMLBuilder::getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut) mir_free(szProto);
}
-wchar_t *HTMLBuilder::getContactName(HCONTACT hContact, const char *szProto)
+wchar_t *HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
{
CONTACTINFO ci = {0};
wchar_t *szName = NULL;
@@ -287,7 +287,7 @@ wchar_t *HTMLBuilder::getContactName(HCONTACT hContact, const char *szProto) return mir_tstrdup(TranslateT("(Unknown Contact)"));
}
-char *HTMLBuilder::getEncodedContactName(HCONTACT hContact, const char* szProto, const char* szSmileyProto)
+char *HTMLBuilder::getEncodedContactName(MCONTACT hContact, const char* szProto, const char* szSmileyProto)
{
char *szName = NULL;
wchar_t *name = getContactName(hContact, szProto);
@@ -432,7 +432,7 @@ ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName) return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(MCONTACT hContact)
{
return getSRMMProtocolSettings( ptrA(getRealProto(hContact)));
}
@@ -446,7 +446,7 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(MCONTACT hContact)
{
if (hContact != NULL)
return getHistoryProtocolSettings( ptrA(getRealProto(hContact)));
@@ -463,7 +463,7 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName) return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getChatProtocolSettings(MCONTACT hContact)
{
return getChatProtocolSettings( ptrA(getRealProto(hContact)));
}
diff --git a/plugins/IEView/src/HTMLBuilder.h b/plugins/IEView/src/HTMLBuilder.h index 4c082c0f47..38152fa163 100644 --- a/plugins/IEView/src/HTMLBuilder.h +++ b/plugins/IEView/src/HTMLBuilder.h @@ -50,19 +50,19 @@ protected: ENF_CHAT_FORMATTING = 256
};
// virtual char *encode(const char *text, const char *proto, bool replaceSmiley);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int flags, bool isSent);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
- virtual wchar_t *encode(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual bool encode(HCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
- virtual char* getProto(HCONTACT hContact);
- virtual char* getProto(const char *proto, HCONTACT hContact);
- virtual char* getRealProto(HCONTACT hContact);
- virtual char* getRealProto(HCONTACT hContact, const char *proto);
- virtual wchar_t *getContactName(HCONTACT hContact, const char* szProto);
- virtual char *getEncodedContactName(HCONTACT hContact, const char *szProto, const char *szSmileyProto);
- virtual void getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut);
- virtual HCONTACT getRealContact(HCONTACT hContact);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
+ virtual wchar_t *encode(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
+ virtual bool encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
+ virtual char* getProto(MCONTACT hContact);
+ virtual char* getProto(const char *proto, MCONTACT hContact);
+ virtual char* getRealProto(MCONTACT hContact);
+ virtual char* getRealProto(MCONTACT hContact, const char *proto);
+ virtual wchar_t *getContactName(MCONTACT hContact, const char* szProto);
+ virtual char *getEncodedContactName(MCONTACT hContact, const char *szProto, const char *szSmileyProto);
+ virtual void getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut);
+ virtual MCONTACT getRealContact(MCONTACT hContact);
virtual DWORD getLastEventTime();
virtual void setLastEventTime(DWORD);
virtual int getLastEventType();
@@ -70,11 +70,11 @@ protected: virtual bool isSameDate(time_t time1, time_t time2);
virtual bool isDbEventShown(DBEVENTINFO * dbei)=0;
virtual ProtocolSettings *getSRMMProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getSRMMProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getSRMMProtocolSettings(MCONTACT hContact);
virtual ProtocolSettings *getHistoryProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getHistoryProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getHistoryProtocolSettings(MCONTACT hContact);
virtual ProtocolSettings *getChatProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getChatProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getChatProtocolSettings(MCONTACT hContact);
void setLastIEViewEvent(IEVIEWEVENT *event);
virtual void buildHead(IEView *, IEVIEWEVENT *event)=0;
public:
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp index 8e2212c6cb..8f340c3ce7 100644 --- a/plugins/IEView/src/IEView.cpp +++ b/plugins/IEView/src/IEView.cpp @@ -1016,7 +1016,7 @@ HWND IEView::getHWND() return hwnd;
}
-void IEView::setContact(HCONTACT hContact)
+void IEView::setContact(MCONTACT hContact)
{
this->hContact = hContact;
isContactSet = true;
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h index 2e869b96e7..1d26ac38c4 100644 --- a/plugins/IEView/src/IEView.h +++ b/plugins/IEView/src/IEView.h @@ -441,7 +441,7 @@ private: bool clearRequired;
BSTR selectedText;
bool isContactSet;
- HCONTACT hContact;
+ MCONTACT hContact;
// IUnknown
STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv);
@@ -551,7 +551,7 @@ public: void navigate(IEVIEWNAVIGATE * nav);
void saveDocument();
- void setContact(HCONTACT hContact);
+ void setContact(MCONTACT hContact);
static IEView* get(HWND);
static void init();
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp index 7ab1ee59af..b58a6beddf 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.cpp +++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp @@ -40,7 +40,7 @@ TemplateHTMLBuilder::~TemplateHTMLBuilder() mir_free(flashAvatars[i]);
}
-char *TemplateHTMLBuilder::getAvatar(HCONTACT hContact, const char* szProto)
+char *TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char* szProto)
{
DBVARIANT dbv;
TCHAR tmpPath[MAX_PATH];
@@ -176,7 +176,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr char *output;
output = NULL;
- HCONTACT hRealContact = getRealContact(event->hContact);
+ MCONTACT hRealContact = getRealContact(event->hContact);
szRealProto = getProto(hRealContact);
szProto = getProto(event->pszProto, event->hContact);
tempBase[0]='\0';
@@ -352,7 +352,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event, if (protoSettings == NULL)
return;
- HCONTACT hRealContact = getRealContact(event->hContact);
+ MCONTACT hRealContact = getRealContact(event->hContact);
szRealProto = getProto(hRealContact);
szProto = getProto(event->pszProto, event->hContact);
tempBase[0]='\0';
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.h b/plugins/IEView/src/TemplateHTMLBuilder.h index 3bde284df3..4063f1f0d6 100644 --- a/plugins/IEView/src/TemplateHTMLBuilder.h +++ b/plugins/IEView/src/TemplateHTMLBuilder.h @@ -36,7 +36,7 @@ protected: time_t flashAvatarsTime[2];
char * flashAvatars[2];
const char *getFlashAvatar(const TCHAR *file, int index);
- char *getAvatar(HCONTACT hContact, const char *szProto);
+ char *getAvatar(MCONTACT hContact, const char *szProto);
void buildHeadTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
void appendEventTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
virtual TemplateMap *getTemplateMap(ProtocolSettings *);
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp index 9c69b927b1..7b27e70614 100644 --- a/plugins/IEView/src/TextToken.cpp +++ b/plugins/IEView/src/TextToken.cpp @@ -425,7 +425,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) { return firstToken;
}
-TextToken* TextToken::tokenizeSmileys(HCONTACT hContact, const char *proto, const wchar_t *text, bool isSent) {
+TextToken* TextToken::tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *text, bool isSent) {
TextToken *firstToken = NULL, *lastToken = NULL;
SMADD_BATCHPARSE2 sp;
SMADD_BATCHPARSERES *spRes;
diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h index 1085fb75f9..e9b2417ca4 100644 --- a/plugins/IEView/src/TextToken.h +++ b/plugins/IEView/src/TextToken.h @@ -82,7 +82,7 @@ public: // UNICODE
wchar_t * htmlEncode(const wchar_t *str);
static TextToken* tokenizeLinks(const wchar_t *wtext);
- static TextToken* tokenizeSmileys(HCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent);
+ static TextToken* tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent);
static TextToken* tokenizeBBCodes(const wchar_t *text);
static TextToken* tokenizeMath(const wchar_t *text);
static TextToken* tokenizeChatFormatting(const wchar_t *text);
diff --git a/plugins/IgnoreState/src/commonheaders.h b/plugins/IgnoreState/src/commonheaders.h index 52fa5d27e2..1701e21a03 100644 --- a/plugins/IgnoreState/src/commonheaders.h +++ b/plugins/IgnoreState/src/commonheaders.h @@ -60,7 +60,7 @@ static byte bUseMirandaSettings; extern HINSTANCE g_hInst;
-void applyExtraImage(HCONTACT hContact);
+void applyExtraImage(MCONTACT hContact);
int onOptInitialise(WPARAM wParam, LPARAM lParam);
BOOL checkState(int type);
diff --git a/plugins/IgnoreState/src/main.cpp b/plugins/IgnoreState/src/main.cpp index 2c18b18563..669c62f3cf 100644 --- a/plugins/IgnoreState/src/main.cpp +++ b/plugins/IgnoreState/src/main.cpp @@ -79,7 +79,7 @@ inline BOOL checkState(int type) return ((currentFilter>>(type-1))&1);
}
-INT_PTR isIgnored(HCONTACT hContact, int type)
+INT_PTR isIgnored(MCONTACT hContact, int type)
{
int all = 0, filtered = 0;
@@ -93,7 +93,7 @@ INT_PTR isIgnored(HCONTACT hContact, int type) return (all+filtered == SIZEOF(ii)-1) ? 1 : (all > 0 ? -1 : 0) ;
}
-void applyExtraImage(HCONTACT hContact)
+void applyExtraImage(MCONTACT hContact)
{
int ignore = isIgnored(hContact, IGNOREEVENT_ALL);
if (ignore == 1)
@@ -141,7 +141,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) hExtraIcon = ExtraIcon_Register("ignore", LPGEN("Ignore State"), "ignore_full");
// Set initial value for all contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
applyExtraImage(hContact);
return 0;
@@ -150,7 +150,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) int onContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if ( !lstrcmpA(cws->szModule, "Ignore") && !lstrcmpA(cws->szSetting, "Mask1"))
applyExtraImage(hContact);
diff --git a/plugins/Import/src/import.cpp b/plugins/Import/src/import.cpp index 5a8b873fb9..bece09a02c 100644 --- a/plugins/Import/src/import.cpp +++ b/plugins/Import/src/import.cpp @@ -65,8 +65,8 @@ static MCONTACT HContactFromNumericID(char *pszProtoName, char *pszSetting, DWOR {
MCONTACT hContact = dstDb->FindFirstContact();
while (hContact != NULL) {
- if ( db_get_dw((HCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) {
- char* szProto = GetContactProto((HCONTACT)hContact);
+ if ( db_get_dw((MCONTACT)hContact, pszProtoName, pszSetting, 0) == dwID) {
+ char* szProto = GetContactProto((MCONTACT)hContact);
if (szProto != NULL && !lstrcmpA(szProto, pszProtoName))
return hContact;
}
@@ -79,9 +79,9 @@ static MCONTACT HContactFromID(char *pszProtoName, char *pszSetting, TCHAR *pwsz {
MCONTACT hContact = dstDb->FindFirstContact();
while (hContact != NULL) {
- char* szProto = GetContactProto((HCONTACT)hContact);
+ char* szProto = GetContactProto((MCONTACT)hContact);
if ( !lstrcmpA(szProto, pszProtoName)) {
- ptrW id(db_get_tsa((HCONTACT)hContact, pszProtoName, pszSetting));
+ ptrW id(db_get_tsa((MCONTACT)hContact, pszProtoName, pszSetting));
if ( !lstrcmp(pwszID, id))
return hContact;
}
@@ -107,7 +107,7 @@ static MCONTACT HistoryImportFindContact(HWND hdlgProgress, char* szModuleName, hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)szModuleName);
- db_set_dw((HCONTACT)hContact, szModuleName, "UIN", uin);
+ db_set_dw((MCONTACT)hContact, szModuleName, "UIN", uin);
AddMessage( LPGENT("Added contact %u (found in history)"), uin );
return hContact;
}
@@ -125,10 +125,10 @@ static MCONTACT AddContact(HWND hdlgProgress, char* szProto, char* pszUniqueSett mySet(hContact, szProto, pszUniqueSetting, id);
- CreateGroup(group, (HCONTACT)hContact);
+ CreateGroup(group, (MCONTACT)hContact);
if (nick && *nick) {
- db_set_ws((HCONTACT)hContact, "CList", "MyHandle", nick);
+ db_set_ws((MCONTACT)hContact, "CList", "MyHandle", nick);
AddMessage(LPGENT("Added %S contact %s, '%s'"), szProto, pszUserID, nick);
}
else AddMessage(LPGENT("Added %S contact %s"), szProto, pszUserID);
@@ -404,7 +404,7 @@ static void ImportHistory(MCONTACT hContact, PROTOACCOUNT **protocol, int protoC if (!skip) {
// Check for duplicate entries
- if (!IsDuplicateEvent((HCONTACT)hDst, dbei)) {
+ if (!IsDuplicateEvent((MCONTACT)hDst, dbei)) {
// Add dbevent
if (!bIsVoidContact)
dbei.flags &= ~DBEF_FIRST;
diff --git a/plugins/Import/src/import.h b/plugins/Import/src/import.h index 02fffe59d6..a4b000ae05 100644 --- a/plugins/Import/src/import.h +++ b/plugins/Import/src/import.h @@ -94,7 +94,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void AddMessage( const TCHAR* fmt, ... );
-void mySet(HCONTACT hContact, const char* module, const char* var, DBVARIANT* dbv );
+void mySet(MCONTACT hContact, const char* module, const char* var, DBVARIANT* dbv );
INT_PTR CALLBACK WizardIntroPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK ProgressPageProc(HWND hdlg,UINT message,WPARAM wParam,LPARAM lParam);
@@ -104,9 +104,9 @@ INT_PTR CALLBACK MirandaAdvOptionsPageProc(HWND hdlg,UINT message,WPARAM wParam, INT_PTR CALLBACK FinishedPageProc(HWND hdlg, UINT message, WPARAM wParam, LPARAM lParam);
BOOL IsProtocolLoaded(char* pszProtocolName);
-BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei);
+BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei);
-int CreateGroup(const TCHAR* name, HCONTACT hContact);
+int CreateGroup(const TCHAR* name, MCONTACT hContact);
extern HINSTANCE hInst;
extern HANDLE hIcoHandle;
diff --git a/plugins/Import/src/utils.cpp b/plugins/Import/src/utils.cpp index 4d3cca3b77..b6946665ab 100644 --- a/plugins/Import/src/utils.cpp +++ b/plugins/Import/src/utils.cpp @@ -35,7 +35,7 @@ BOOL IsProtocolLoaded(char* pszProtocolName) // If contact is specified adds it to group
// ------------------------------------------------
// Returns 1 if successful and 0 when it fails.
-int CreateGroup(const TCHAR* group, HCONTACT hContact)
+int CreateGroup(const TCHAR* group, MCONTACT hContact)
{
if (group == NULL)
return 0;
@@ -75,10 +75,10 @@ int CreateGroup(const TCHAR* group, HCONTACT hContact) }
// Returns TRUE if the event already exist in the database
-BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei)
+BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO dbei)
{
static DWORD dwPreviousTimeStamp = -1;
- static HCONTACT hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ static MCONTACT hPreviousContact = INVALID_CONTACT_ID;
static HANDLE hPreviousDbEvent = NULL;
HANDLE hExistingDbEvent;
@@ -220,6 +220,6 @@ BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO dbei) }
}
// reset last event
- hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ hPreviousContact = INVALID_CONTACT_ID;
return FALSE;
}
diff --git a/plugins/KeyboardNotify/src/ignore.cpp b/plugins/KeyboardNotify/src/ignore.cpp index d32e9af102..b119f4cdc3 100644 --- a/plugins/KeyboardNotify/src/ignore.cpp +++ b/plugins/KeyboardNotify/src/ignore.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, PF1_URLRECV, PF1_FILERECV, 0xFFFFFFFF};
-static DWORD GetMask(HCONTACT hContact)
+static DWORD GetMask(MCONTACT hContact)
{
DWORD mask = db_get_dw(hContact, KEYBDMODULE, "Mask1", (DWORD)(-1));
if(mask == (DWORD)(-1)) {
@@ -156,7 +156,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-static void InitialiseItem(HWND hwndList, HCONTACT hContact, HANDLE hItem, DWORD protoCaps)
+static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD protoCaps)
{
DWORD mask;
int i;
@@ -169,7 +169,7 @@ static void InitialiseItem(HWND hwndList, HCONTACT hContact, HANDLE hItem, DWORD SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX+1, 2));
}
-static void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem, const char *pszSetting)
+static void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem, const char *pszSetting)
{
DWORD mask;
int i, iImage;
@@ -186,7 +186,7 @@ static void SetAllContactIcons(HWND hwndList) {
DWORD protoCaps;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
char *szProto = GetContactProto(hContact);
@@ -310,7 +310,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA {
case PSN_APPLY:
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem)
SaveItemMask(GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
@@ -336,7 +336,7 @@ INT_PTR CALLBACK DlgProcIgnoreOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA return FALSE;
}
-BOOL IsIgnored(HCONTACT hContact, WORD eventType)
+BOOL IsIgnored(MCONTACT hContact, WORD eventType)
{
WORD ignoreID = 0;
DWORD mask = GetMask(hContact);
diff --git a/plugins/KeyboardNotify/src/ignore.h b/plugins/KeyboardNotify/src/ignore.h index 56c738e4da..5fcd0ceebe 100644 --- a/plugins/KeyboardNotify/src/ignore.h +++ b/plugins/KeyboardNotify/src/ignore.h @@ -16,5 +16,5 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
-BOOL IsIgnored(HCONTACT, WORD);
+BOOL IsIgnored(MCONTACT, WORD);
INT_PTR CALLBACK DlgProcIgnoreOptions(HWND, UINT, WPARAM, LPARAM);
diff --git a/plugins/KeyboardNotify/src/main.cpp b/plugins/KeyboardNotify/src/main.cpp index 0ec2edad37..9bff1e4283 100644 --- a/plugins/KeyboardNotify/src/main.cpp +++ b/plugins/KeyboardNotify/src/main.cpp @@ -121,20 +121,20 @@ static LRESULT CALLBACK KeyBoardHookFunction(int, WPARAM, LPARAM); static LRESULT CALLBACK MirandaMouseHookFunction(int, WPARAM, LPARAM);
static LRESULT CALLBACK MirandaKeyBoardHookFunction(int, WPARAM, LPARAM);
static LRESULT CALLBACK MirandaWndProcHookFunction(int, WPARAM, LPARAM);
-BOOL CheckMsgWnd(HCONTACT, BOOL *);
+BOOL CheckMsgWnd(MCONTACT, BOOL *);
-BOOL isMetaContactsSubContact(HCONTACT hMetaContact, HCONTACT hContact)
+BOOL isMetaContactsSubContact(MCONTACT hMetaContact, MCONTACT hContact)
{
char *szProto = GetContactProto(hMetaContact);
if (szProto && !strcmp(szMetaProto, szProto)) { // Safety check
int i = db_get_dw(hContact, szMetaProto, "ContactNumber", -1);
- if (i >= 0 && hContact == (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i))
+ if (i >= 0 && hContact == (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i))
return TRUE;
}
return FALSE;
}
-BOOL checkOpenWindow(HCONTACT hContact)
+BOOL checkOpenWindow(MCONTACT hContact)
{
BOOL found, focus;
@@ -143,7 +143,7 @@ BOOL checkOpenWindow(HCONTACT hContact) found = CheckMsgWnd(hContact, &focus);
if (!found && szMetaProto && bMetaProtoEnabled) {
- HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
+ MCONTACT hMetaContact = (MCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
if (hMetaContact && isMetaContactsSubContact(hMetaContact, hContact))
found = CheckMsgWnd(hMetaContact, &focus);
}
@@ -221,7 +221,7 @@ BOOL checkGlobalXstatus() return protosSupporting == 0;
}
-DBEVENTINFO createMsgEventInfo(HCONTACT hContact)
+DBEVENTINFO createMsgEventInfo(MCONTACT hContact)
{
DBEVENTINFO einfo = { sizeof(einfo) };
einfo.eventType = EVENTTYPE_MESSAGE;
@@ -229,7 +229,7 @@ DBEVENTINFO createMsgEventInfo(HCONTACT hContact) return einfo;
}
-DBEVENTINFO readEventInfo(HANDLE hDbEvent, HCONTACT hContact)
+DBEVENTINFO readEventInfo(HANDLE hDbEvent, MCONTACT hContact)
{
if (hDbEvent == NCONVERS_BLINKID) // we need to handle nconvers' blink event
return createMsgEventInfo(hContact);
@@ -239,7 +239,7 @@ DBEVENTINFO readEventInfo(HANDLE hDbEvent, HCONTACT hContact) return einfo;
}
-BOOL checkIgnore(HCONTACT hContact, WORD eventType)
+BOOL checkIgnore(MCONTACT hContact, WORD eventType)
{
return !IsIgnored(hContact, eventType);
}
@@ -256,12 +256,12 @@ BOOL checkProtocol(char *szProto) return FALSE;
}
-BOOL metaCheckProtocol(char *szProto, HCONTACT hContact, WORD eventType)
+BOOL metaCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
{
- HCONTACT hSubContact=NULL;
+ MCONTACT hSubContact=NULL;
if (szMetaProto && bMetaProtoEnabled && szProto && !strcmp(szMetaProto, szProto))
- if (hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0))
+ if (hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0))
szProto = GetContactProto(hSubContact);
return checkProtocol(szProto) && checkIgnore(hSubContact?hSubContact:hContact, eventType);
@@ -379,10 +379,10 @@ BOOL checkMsgTimestamp(HANDLE hEventCurrent, DWORD timestampCurrent) }
-BOOL contactCheckProtocol(char *szProto, HCONTACT hContact, WORD eventType)
+BOOL contactCheckProtocol(char *szProto, MCONTACT hContact, WORD eventType)
{
if (szMetaProto && bMetaProtoEnabled && hContact) {
- HCONTACT hMetaContact = (HCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
+ MCONTACT hMetaContact = (MCONTACT)db_get_dw(hContact, szMetaProto, "Handle", 0);
if (hMetaContact && isMetaContactsSubContact(hMetaContact, hContact))
return FALSE;
}
@@ -427,7 +427,7 @@ BOOL checkXstatus(char *szProto) // 'Pings' the FlashThread to keep the LEDs flashing.
static int PluginMessageEventHook(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hEvent = (HANDLE)lParam;
//get DBEVENTINFO without pBlob
@@ -986,7 +986,7 @@ static LRESULT CALLBACK MirandaWndProcHookFunction(int code, WPARAM wParam, LPAR return CallNextHookEx(hMirandaWndProcHook, code, wParam, lParam);
}
-BOOL CheckMsgWnd(HCONTACT hContact, BOOL *focus)
+BOOL CheckMsgWnd(MCONTACT hContact, BOOL *focus)
{
if (ServiceExists(MS_MSG_GETWINDOWDATA)) { // use the new message API
MessageWindowData mwd = { sizeof(MessageWindowData) };
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp index 6817b374bd..22dbbdbc55 100644 --- a/plugins/ListeningTo/src/listeningto.cpp +++ b/plugins/ListeningTo/src/listeningto.cpp @@ -67,7 +67,7 @@ INT_PTR GetParsedFormat(WPARAM wParam,LPARAM lParam); INT_PTR GetOverrideContactOption(WPARAM wParam,LPARAM lParam);
INT_PTR GetUnknownText(WPARAM wParam,LPARAM lParam);
INT_PTR SetNewSong(WPARAM wParam,LPARAM lParam);
-void SetExtraIcon(HCONTACT hContact, BOOL set);
+void SetExtraIcon(MCONTACT hContact, BOOL set);
void SetListeningInfos(LISTENINGTOINFO *lti = NULL);
INT_PTR HotkeysEnable(WPARAM wParam,LPARAM lParam);
INT_PTR HotkeysDisable(WPARAM wParam,LPARAM lParam);
@@ -288,7 +288,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) // Extra icon support
hExtraIcon = ExtraIcon_Register(MODULE_NAME, LPGEN("Listening to music"), "listening_to_icon");
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto != NULL) {
DBVARIANT dbv;
@@ -947,14 +947,14 @@ void HasNewListeningInfo() }
-void SetExtraIcon(HCONTACT hContact, BOOL set)
+void SetExtraIcon(MCONTACT hContact, BOOL set)
{
ExtraIcon_SetIcon(hExtraIcon, hContact, set ? "listening_to_icon" : NULL);
}
int SettingChanged(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
if (hContact == NULL)
return 0;
diff --git a/plugins/ListeningTo/src/players/mradio.cpp b/plugins/ListeningTo/src/players/mradio.cpp index c0132d1de5..c3921dc188 100644 --- a/plugins/ListeningTo/src/players/mradio.cpp +++ b/plugins/ListeningTo/src/players/mradio.cpp @@ -34,7 +34,7 @@ void MRadio::EnableDisable() int MRadio::GetData()
{
- for (HCONTACT hContact = db_find_first("mRadio"); hContact; hContact = db_find_next(hContact, "mRadio")) {
+ for (MCONTACT hContact = db_find_first("mRadio"); hContact; hContact = db_find_next(hContact, "mRadio")) {
WORD status = db_get_w(hContact, "mRadio", "Status", ID_STATUS_OFFLINE);
if (status != ID_STATUS_ONLINE)
continue;
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp index 6f9792b6ca..75b6c4e2c5 100644 --- a/plugins/LotusNotify/src/LotusNotify.cpp +++ b/plugins/LotusNotify/src/LotusNotify.cpp @@ -1634,7 +1634,7 @@ extern "C" int __declspec(dllexport) Load(void) CallService(MS_PROTO_REGISTERMODULE, 0, (LPARAM)&pd);
//set all contacts to offline ///TODO: are that contacts exists ?
- for(HCONTACT hContact = db_find_first(PLUGINNAME); hContact; hContact = db_find_next(hContact, PLUGINNAME)){
+ for(MCONTACT hContact = db_find_first(PLUGINNAME); hContact; hContact = db_find_next(hContact, PLUGINNAME)){
db_set_w(hContact, PLUGINNAME, "status", ID_STATUS_OFFLINE);
}
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp index 639e3fa0ac..a9bc2e5c66 100644 --- a/plugins/MenuItemEx/src/main.cpp +++ b/plugins/MenuItemEx/src/main.cpp @@ -99,7 +99,7 @@ typedef struct { struct ModSetLinkLinkItem *last;
} ModuleSettingLL;
-int GetSetting(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+int GetSetting(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
return db_get_s(hContact, szModule, szSetting, dbv, 0);
}
@@ -155,7 +155,7 @@ void FreeModuleSettingLL(ModuleSettingLL* msll) }
}
-void RenameDbProto(HCONTACT hContact, HCONTACT hContactNew, char* oldName, char* newName, int delOld)
+void RenameDbProto(MCONTACT hContact, MCONTACT hContactNew, char* oldName, char* newName, int delOld)
{
DBVARIANT dbv;
ModuleSettingLL settinglist;
@@ -202,7 +202,7 @@ void RenameDbProto(HCONTACT hContact, HCONTACT hContactNew, char* oldName, char* FreeModuleSettingLL(&settinglist);
} // end code from dbe++
-void ShowPopup(char* szText, TCHAR* tszText, HCONTACT hContact)
+void ShowPopup(char* szText, TCHAR* tszText, MCONTACT hContact)
{
POPUPDATAT ppd = {0};
TCHAR* text = 0;
@@ -223,7 +223,7 @@ void ShowPopup(char* szText, TCHAR* tszText, HCONTACT hContact) mir_free(text);
}
-BOOL DirectoryExists(HCONTACT hContact)
+BOOL DirectoryExists(MCONTACT hContact)
{
int attr;
char path[MAX_PATH];
@@ -259,7 +259,7 @@ void CopyToClipboard(HWND hwnd,LPSTR pszMsg, LPTSTR ptszMsg) CloseClipboard();
}
-BOOL isMetaContact(HCONTACT hContact)
+BOOL isMetaContact(MCONTACT hContact)
{
char *proto;
if (bMetaContacts) {
@@ -271,21 +271,21 @@ BOOL isMetaContact(HCONTACT hContact) return FALSE;
}
-HCONTACT getDefaultContact(HCONTACT hContact)
+MCONTACT getDefaultContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
return 0;
}
-HCONTACT getMostOnline(HCONTACT hContact)
+MCONTACT getMostOnline(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return 0;
}
-void GetID(HCONTACT hContact, LPSTR szProto, LPSTR szID)
+void GetID(MCONTACT hContact, LPSTR szProto, LPSTR szID)
{
DBVARIANT dbv_uniqueid;
LPSTR uID = (LPSTR)CallProtoService(szProto, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
@@ -308,7 +308,7 @@ void GetID(HCONTACT hContact, LPSTR szProto, LPSTR szID) }
}
-int StatusMsgExists(HCONTACT hContact)
+int StatusMsgExists(MCONTACT hContact)
{
char par[32];
BOOL ret = 0;
@@ -332,7 +332,7 @@ int StatusMsgExists(HCONTACT hContact) return ret;
}
-BOOL IPExists(HCONTACT hContact)
+BOOL IPExists(MCONTACT hContact)
{
LPSTR szProto;
DWORD mIP,rIP;
@@ -346,7 +346,7 @@ BOOL IPExists(HCONTACT hContact) return (mIP != 0 || rIP != 0);
}
-BOOL MirVerExists(HCONTACT hContact)
+BOOL MirVerExists(MCONTACT hContact)
{
LPSTR szProto, msg;
BOOL ret = 0;
@@ -363,7 +363,7 @@ BOOL MirVerExists(HCONTACT hContact) return ret;
}
-void getIP(HCONTACT hContact,LPSTR szProto,LPSTR szIP)
+void getIP(MCONTACT hContact,LPSTR szProto,LPSTR szIP)
{
char szmIP[64] = {0};
char szrIP[64] = {0};
@@ -377,7 +377,7 @@ void getIP(HCONTACT hContact,LPSTR szProto,LPSTR szIP) strcat(szIP, szmIP);
}
-LPTSTR getMirVer(HCONTACT hContact)
+LPTSTR getMirVer(MCONTACT hContact)
{
LPSTR szProto = GetContactProto(hContact);
if (!szProto) return NULL;
@@ -414,7 +414,7 @@ static LRESULT CALLBACK AuthReqEditSubclassProc(HWND hwnd,UINT msg,WPARAM wParam INT_PTR CALLBACK AuthReqWndProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam)
{
- static HCONTACT hcontact;
+ static MCONTACT hcontact;
switch(msg){
case WM_INITDIALOG:
@@ -422,7 +422,7 @@ INT_PTR CALLBACK AuthReqWndProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) mir_subclassWindow( GetDlgItem(hdlg, IDC_REASON), AuthReqEditSubclassProc);
SendDlgItemMessage(hdlg, IDC_REASON, EM_LIMITTEXT, (WPARAM)255, 0);
SetDlgItemText(hdlg, IDC_REASON, TranslateT("Please authorize me to add you to my contact list."));
- hcontact = (HCONTACT)lparam;
+ hcontact = (MCONTACT)lparam;
break;
case WM_COMMAND:
@@ -458,11 +458,11 @@ BOOL isProtoOnline(char *szProto) INT_PTR onSendAuthRequest(WPARAM wparam,LPARAM lparam)
{
DWORD flags;
- char *szProto = GetContactProto((HCONTACT)wparam);
+ char *szProto = GetContactProto((MCONTACT)wparam);
flags = CallProtoService(szProto,PS_GETCAPS,PFLAGNUM_4,0);
if (flags&PF4_NOCUSTOMAUTH)
- CallContactService((HCONTACT)wparam, PSS_AUTHREQUEST, 0, (LPARAM)"");
+ CallContactService((MCONTACT)wparam, PSS_AUTHREQUEST, 0, (LPARAM)"");
else
CreateDialogParam(hinstance,MAKEINTRESOURCE(IDD_AUTHREQ),(HWND)CallService(MS_CLUI_GETHWND,0,0),AuthReqWndProc,(LPARAM)wparam);
@@ -471,27 +471,27 @@ INT_PTR onSendAuthRequest(WPARAM wparam,LPARAM lparam) INT_PTR onSendAdded(WPARAM wparam,LPARAM lparam)
{
- CallContactService((HCONTACT)wparam, PSS_ADDED, 0, 0);
+ CallContactService((MCONTACT)wparam, PSS_ADDED, 0, 0);
return 0;
}
// set the invisible-flag in db
INT_PTR onSetInvis(WPARAM wparam,LPARAM lparam)
{
- CallContactService((HCONTACT)wparam, PSS_SETAPPARENTMODE, (db_get_w((HCONTACT)wparam, GetContactProto((HCONTACT)wparam), "ApparentMode", 0) == ID_STATUS_OFFLINE) ? 0 : ID_STATUS_OFFLINE, 0);
+ CallContactService((MCONTACT)wparam, PSS_SETAPPARENTMODE, (db_get_w((MCONTACT)wparam, GetContactProto((MCONTACT)wparam), "ApparentMode", 0) == ID_STATUS_OFFLINE) ? 0 : ID_STATUS_OFFLINE, 0);
return 0;
}
// set visible-flag in db
INT_PTR onSetVis(WPARAM wparam,LPARAM lparam)
{
- CallContactService((HCONTACT)wparam, PSS_SETAPPARENTMODE, (db_get_w((HCONTACT)wparam, GetContactProto((HCONTACT)wparam), "ApparentMode", 0) == ID_STATUS_ONLINE) ? 0 : ID_STATUS_ONLINE, 0);
+ CallContactService((MCONTACT)wparam, PSS_SETAPPARENTMODE, (db_get_w((MCONTACT)wparam, GetContactProto((MCONTACT)wparam), "ApparentMode", 0) == ID_STATUS_ONLINE) ? 0 : ID_STATUS_ONLINE, 0);
return 0;
}
INT_PTR onHide(WPARAM wparam,LPARAM lparam)
{
- db_set_b((HCONTACT)wparam, "CList", "Hidden", (BYTE)!db_get_b((HCONTACT)wparam, "CList", "Hidden", 0));
+ db_set_b((MCONTACT)wparam, "CList", "Hidden", (BYTE)!db_get_b((MCONTACT)wparam, "CList", "Hidden", 0));
return 0;
}
@@ -512,13 +512,13 @@ void ModifyInvisSet(int mode, BOOL alpha) Menu_ModifyItem(hmenuOff, &mi);
}
-void ModifyCopyID(HCONTACT hContact, BOOL bShowID, BOOL bTrimID)
+void ModifyCopyID(MCONTACT hContact, BOOL bShowID, BOOL bTrimID)
{
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON | CMIM_NAME | CMIF_UNICODE;
if (isMetaContact(hContact)) {
- HCONTACT hC = getMostOnline(hContact);
+ MCONTACT hC = getMostOnline(hContact);
if (!hContact) hC = getDefaultContact(hContact);
hContact = hC;
}
@@ -555,7 +555,7 @@ void ModifyCopyID(HCONTACT hContact, BOOL bShowID, BOOL bTrimID) DestroyIcon(hIconCID);
}
-void ModifyStatusMsg(HCONTACT hContact)
+void ModifyStatusMsg(MCONTACT hContact)
{
LPSTR szProto = GetContactProto(hContact);
if (!szProto) {
@@ -575,7 +575,7 @@ void ModifyStatusMsg(HCONTACT hContact) DestroyIcon(hIconSMsg);
}
-void ModifyCopyIP(HCONTACT hContact)
+void ModifyCopyIP(MCONTACT hContact)
{
LPSTR szProto = GetContactProto(hContact);
if (!szProto) {
@@ -595,7 +595,7 @@ void ModifyCopyIP(HCONTACT hContact) DestroyIcon(hIconCIP);
}
-void ModifyCopyMirVer(HCONTACT hContact)
+void ModifyCopyMirVer(MCONTACT hContact)
{
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_ICON;
@@ -615,9 +615,9 @@ INT_PTR onCopyID(WPARAM wparam, LPARAM lparam) {
char szID[128] = { 0 }, buffer[256] = { 0 };
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
if (isMetaContact(hContact)) {
- HCONTACT hC = getMostOnline(hContact);
+ MCONTACT hC = getMostOnline(hContact);
if (!hContact)
hC = getDefaultContact(hContact);
hContact = hC;
@@ -654,7 +654,7 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam) int i;
DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
- module = GetContactProto((HCONTACT)wparam);
+ module = GetContactProto((MCONTACT)wparam);
if (!module)
return 0;
@@ -665,7 +665,7 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam) else
strcpy(par, statusMsg[i].name);
- LPTSTR msg = db_get_tsa((HCONTACT)wparam, (statusMsg[i].module) ? statusMsg[i].module : module, par);
+ LPTSTR msg = db_get_tsa((MCONTACT)wparam, (statusMsg[i].module) ? statusMsg[i].module : module, par);
if (msg) {
if (_tcsclen(msg)) {
if (flags & VF_SMNAME) {
@@ -681,32 +681,32 @@ INT_PTR onCopyStatusMsg(WPARAM wparam, LPARAM lparam) CopyToClipboard((HWND)lparam, 0, buffer);
if (CTRL_IS_PRESSED && bPopupService)
- ShowPopup(0, buffer, (HCONTACT)wparam);
+ ShowPopup(0, buffer, (MCONTACT)wparam);
return 0;
}
INT_PTR onCopyIP(WPARAM wparam, LPARAM lparam)
{
- char *szProto = GetContactProto((HCONTACT)wparam);
+ char *szProto = GetContactProto((MCONTACT)wparam);
char szIP[128];
- getIP((HCONTACT)wparam, szProto, (LPSTR)&szIP);
+ getIP((MCONTACT)wparam, szProto, (LPSTR)&szIP);
CopyToClipboard((HWND)lparam, szIP, 0);
if (CTRL_IS_PRESSED && bPopupService)
- ShowPopup(szIP, 0, (HCONTACT)wparam);
+ ShowPopup(szIP, 0, (MCONTACT)wparam);
return 0;
}
INT_PTR onCopyMirVer(WPARAM wparam, LPARAM lparam)
{
- LPTSTR msg = getMirVer((HCONTACT)wparam);
+ LPTSTR msg = getMirVer((MCONTACT)wparam);
if (msg) {
CopyToClipboard((HWND)lparam, _T2A(msg), 0);
if (CTRL_IS_PRESSED && bPopupService)
- ShowPopup(_T2A(msg), 0, (HCONTACT)wparam);
+ ShowPopup(_T2A(msg), 0, (MCONTACT)wparam);
mir_free(msg);
}
@@ -723,7 +723,7 @@ INT_PTR onRecvFiles(WPARAM wparam, LPARAM lparam) INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam)
{
- HCONTACT hContact = (HCONTACT)wparam, hContactNew;
+ MCONTACT hContact = (MCONTACT)wparam, hContactNew;
char* szProto = GetContactProto(hContact);
if (!strcmp(szProto, (char*)lparam))
return 0;
@@ -735,7 +735,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam) CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContactNew, lparam);
}
else {
- hContactNew = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContactNew = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContactNew) {
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContactNew, lparam);
RenameDbProto(hContact, hContactNew, GetContactProto(hContact), (char*)lparam, 0);
@@ -752,7 +752,7 @@ INT_PTR onChangeProto(WPARAM wparam, LPARAM lparam) return 0;
}
-int isIgnored(HCONTACT hContact, int type)
+int isIgnored(MCONTACT hContact, int type)
{
if (type != IGNOREEVENT_ALL)
return CallService(MS_IGNORE_ISIGNORED, (WPARAM)hContact, (LPARAM)type);
@@ -768,9 +768,9 @@ int isIgnored(HCONTACT hContact, int type) INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
{
if (db_get_b(NULL, MODULENAME, "ignorehide", 0) && (lparam == IGNOREEVENT_ALL))
- db_set_b((HCONTACT)wparam, "CList", "Hidden", (isIgnored((HCONTACT)wparam, lparam) ? (byte)0 : (byte)1));
+ db_set_b((MCONTACT)wparam, "CList", "Hidden", (isIgnored((MCONTACT)wparam, lparam) ? (byte)0 : (byte)1));
- CallService(isIgnored((HCONTACT)wparam, lparam) ? MS_IGNORE_UNIGNORE : MS_IGNORE_IGNORE, wparam, lparam);
+ CallService(isIgnored((MCONTACT)wparam, lparam) ? MS_IGNORE_UNIGNORE : MS_IGNORE_IGNORE, wparam, lparam);
return 0;
}
@@ -805,7 +805,7 @@ int BuildMenu(WPARAM wparam, LPARAM lparam) DWORD flags = db_get_dw(NULL, MODULENAME, "flags", vf_default);
int j = 0, all = 0, hide = 0;
BOOL bIsOnline = FALSE, bShowAll = CTRL_IS_PRESSED;
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
char* pszProto = GetContactProto(hContact);
PROTOACCOUNT *pa = ProtoGetAccount(pszProto);
@@ -818,7 +818,7 @@ int BuildMenu(WPARAM wparam, LPARAM lparam) bEnabled = bShowAll || (flags & VF_HFL);
Menu_ShowItem(hmenuHide, bEnabled);
if (bEnabled) {
- BYTE bHidden = db_get_b((HCONTACT)wparam, "CList", "Hidden", 0);
+ BYTE bHidden = db_get_b((MCONTACT)wparam, "CList", "Hidden", 0);
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags |= CMIM_ICON | CMIM_NAME | CMIF_UNICODE;
mi.hIcon = Skin_GetIcon(bHidden ? "miex_showil" : "miex_hidefl");
@@ -954,7 +954,7 @@ static int TabsrmmButtonsInit(WPARAM wParam, LPARAM lParam) return 0;
}
-static void TabsrmmButtonsModify(HCONTACT hContact)
+static void TabsrmmButtonsModify(MCONTACT hContact)
{
if (!DirectoryExists(hContact))
{
diff --git a/plugins/MetaContacts/src/addto.cpp b/plugins/MetaContacts/src/addto.cpp index 40d3c30b86..507c3961e3 100644 --- a/plugins/MetaContacts/src/addto.cpp +++ b/plugins/MetaContacts/src/addto.cpp @@ -56,7 +56,7 @@ int FillList(HWND list, BOOL sort) int i=0;
// The DB is searched through, to get all the metacontacts
- for (HCONTACT hMetaUser = db_find_first(); hMetaUser; hMetaUser = db_find_next(hMetaUser)) {
+ for (MCONTACT hMetaUser = db_find_first(); hMetaUser; hMetaUser = db_find_next(hMetaUser)) {
// if it's not a MetaContact, go to the next
if ( db_get_dw(hMetaUser, META_PROTO, META_ID, (DWORD)-1) == (DWORD)-1)
continue;
@@ -124,7 +124,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP case WM_INITDIALOG:
TranslateDialogDefault( hwndDlg );
- if ( db_get_dw((HCONTACT)lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
+ if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
MessageBox(hwndDlg,
TranslateT("This contact is a MetaContact.\nYou can't add a MetaContact to another MetaContact.\n\nPlease choose another."),
TranslateT("MetaContact Conflict"),MB_ICONERROR);
@@ -132,7 +132,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE;
}
- if ( db_get_dw((HCONTACT)lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) {
+ if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) {
MessageBox(hwndDlg,
TranslateT("This contact is already associated to a MetaContact.\nYou cannot add a contact to multiple MetaContacts."),
TranslateT("Multiple MetaContacts"),MB_ICONERROR);
@@ -155,7 +155,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
else {
// get contact display name from clist
- TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((HCONTACT)lParam, GCDNF_TCHAR);
+ TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR);
if (!ptszCDN)
ptszCDN = TranslateT("a contact");
@@ -178,8 +178,8 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP if (item == -1)
return IDOK == MessageBox(hwndDlg, TranslateT("Please select a MetaContact"), TranslateT("No MetaContact selected"), MB_ICONHAND);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- HCONTACT hMeta = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_METALIST), LB_GETITEMDATA, (WPARAM)item, 0);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hMeta = (MCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_METALIST), LB_GETITEMDATA, (WPARAM)item, 0);
if (!Meta_Assign(hContact, hMeta, FALSE))
MessageBox(hwndDlg, TranslateT("Assignment to the MetaContact failed."), TranslateT("Assignment failure"),MB_ICONERROR);
}
diff --git a/plugins/MetaContacts/src/edit.cpp b/plugins/MetaContacts/src/edit.cpp index 859ad8aafd..b3a8622689 100644 --- a/plugins/MetaContacts/src/edit.cpp +++ b/plugins/MetaContacts/src/edit.cpp @@ -29,13 +29,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //! Holds the differents changes that have to made
typedef struct tag_CHANGES {
- HCONTACT hMeta; //!< \c HANDLE of the MetaContact that is edited.
- HCONTACT hDefaultContact; //!< \c HANDLE of the new default contact
- HCONTACT hOfflineContact;
+ MCONTACT hMeta; //!< \c HANDLE of the MetaContact that is edited.
+ MCONTACT hDefaultContact; //!< \c HANDLE of the new default contact
+ MCONTACT hOfflineContact;
int num_deleted, //!< \c DWORD number of deleted contacts
num_contacts; //!< \c DWORD number of contacts
- HCONTACT hDeletedContacts[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts to be removed from this metacontact
- HCONTACT hContact[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts, in the order they should be in
+ MCONTACT hDeletedContacts[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts to be removed from this metacontact
+ MCONTACT hContact[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts, in the order they should be in
int force_default;
} CHANGES;
@@ -167,7 +167,7 @@ void ApplyChanges(CHANGES *chg) db_set_dw(chg->hMeta, META_PROTO, "OfflineSend", (DWORD)-1);
// fix nick
- HCONTACT most_online = Meta_GetMostOnline(chg->hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(chg->hMeta);
Meta_CopyContactNick(chg->hMeta, most_online);
// fix status
@@ -270,17 +270,17 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UP), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_DOWN), FALSE);
- int nb_contacts = db_get_dw((HCONTACT)lParam, META_PROTO, "NumContacts", 0);
- int default_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
- int offline_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "OfflineSend", (DWORD)-1);
+ int nb_contacts = db_get_dw((MCONTACT)lParam, META_PROTO, "NumContacts", 0);
+ int default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
+ int offline_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "OfflineSend", (DWORD)-1);
- changes.hMeta = (HCONTACT)lParam;
+ changes.hMeta = (MCONTACT)lParam;
changes.num_contacts = nb_contacts;
changes.num_deleted = 0;
- changes.hDefaultContact = Meta_GetContactHandle((HCONTACT)lParam, default_contact_number);
- changes.hOfflineContact = Meta_GetContactHandle((HCONTACT)lParam, offline_contact_number);
+ changes.hDefaultContact = Meta_GetContactHandle((MCONTACT)lParam, default_contact_number);
+ changes.hOfflineContact = Meta_GetContactHandle((MCONTACT)lParam, offline_contact_number);
for (i = 0; i < nb_contacts; i++)
- changes.hContact[i] = Meta_GetContactHandle((HCONTACT)lParam, i);
+ changes.hContact[i] = Meta_GetContactHandle((MCONTACT)lParam, i);
changes.force_default = MetaAPI_GetForceState((WPARAM)lParam, 0);
SendMessage(hwndDlg, WMU_SETTITLE, 0, lParam);
@@ -293,7 +293,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR case WMU_SETTITLE:
{
- TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((HCONTACT)lParam, GCDNF_TCHAR);
+ TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR);
if (ptszCDN == NULL)
ptszCDN = TranslateT("(Unknown Contact)");
@@ -413,7 +413,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS);
sel = ListView_GetNextItem(hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED);
{
- HCONTACT temp = changes.hContact[sel];
+ MCONTACT temp = changes.hContact[sel];
changes.hContact[sel] = changes.hContact[sel - 1];
changes.hContact[sel-1] = temp;
}
@@ -430,7 +430,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS);
sel = ListView_GetNextItem(hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED);
{
- HCONTACT temp = changes.hContact[sel];
+ MCONTACT temp = changes.hContact[sel];
changes.hContact[sel] = changes.hContact[sel + 1];
changes.hContact[sel + 1] = temp;
}
diff --git a/plugins/MetaContacts/src/meta_api.cpp b/plugins/MetaContacts/src/meta_api.cpp index 71cdfeb1ec..6fbad29f5d 100644 --- a/plugins/MetaContacts/src/meta_api.cpp +++ b/plugins/MetaContacts/src/meta_api.cpp @@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //lParam=0
//returns a handle to the parent metacontact, or null if this contact is not a subcontact
INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)(HANDLE)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ return (INT_PTR)(HANDLE)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
}
//gets the handle for the default contact
@@ -40,9 +40,9 @@ INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a handle to the default contact, or null on failure
INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) {
- DWORD default_contact_number = db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ DWORD default_contact_number = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
if (default_contact_number != -1) {
- return (INT_PTR)Meta_GetContactHandle((HCONTACT)wParam, default_contact_number);
+ return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, default_contact_number);
}
return 0;
}
@@ -52,7 +52,7 @@ INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a DWORD contact number, or -1 on failure
INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) {
- return db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ return db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
}
//gets the handle for the 'most online' contact
@@ -60,7 +60,7 @@ INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a handle to the 'most online' contact
INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetMostOnline((HCONTACT)wParam);
+ return (INT_PTR)Meta_GetMostOnline((MCONTACT)wParam);
}
//gets the number of subcontacts for a metacontact
@@ -68,7 +68,7 @@ INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns a DWORD representing the number of subcontacts for the given metacontact
INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
return num_contacts;
}
@@ -77,7 +77,7 @@ INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns a handle to the specified subcontact
INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetContactHandle((HCONTACT)wParam, (DWORD)lParam);
+ return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, (DWORD)lParam);
}
//sets the default contact, using the subcontact's contact number
@@ -85,15 +85,15 @@ INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
if (num_contacts == -1)
return 1;
if ((DWORD)lParam >= num_contacts || (DWORD)lParam < 0)
return 1;
- if (db_set_dw((HCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam))
+ if (db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam))
return 1;
- NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((HCONTACT)wParam, (int)lParam));
+ NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, (int)lParam));
return 0;
}
@@ -102,9 +102,9 @@ INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) {
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)lParam, META_PROTO, "Handle", 0);
- DWORD contact_number = Meta_GetContactNumber((HCONTACT)lParam);
- if (contact_number == -1 || !hMeta || hMeta != (HCONTACT)wParam)
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)lParam, META_PROTO, "Handle", 0);
+ DWORD contact_number = Meta_GetContactNumber((MCONTACT)lParam);
+ if (contact_number == -1 || !hMeta || hMeta != (MCONTACT)wParam)
return 1;
if (db_set_dw(hMeta, META_PROTO, "Default", contact_number))
return 1;
@@ -118,9 +118,9 @@ INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) { //lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, (int)lParam);
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (HCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam);
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -134,9 +134,9 @@ INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) { //lParam=(HANDLE)hSubcontact
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)lParam;
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (HCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -150,10 +150,10 @@ INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) { //lParam=0
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) {
- if (db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0))
+ if (db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0))
return 1;
- db_set_dw((HCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
NotifyEventHooks(hEventUnforceSend, wParam, lParam);
return 0;
@@ -169,7 +169,7 @@ INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) { INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) {
// forward to menu function
Meta_ForceDefault(wParam, lParam);
- return db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ return db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
}
// method to get state of 'force' for a metacontact
@@ -179,15 +179,15 @@ INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) { // 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)
INT_PTR MetaAPI_GetForceState(WPARAM wParam, LPARAM lParam) {
- HCONTACT hMeta = (HCONTACT)wParam;
+ MCONTACT hMeta = (MCONTACT)wParam;
if ( !hMeta) return 0;
if (db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) {
- if (lParam) *(DWORD *)lParam = db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ if (lParam) *(DWORD *)lParam = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
return 1;
}
- HCONTACT hContact = (HCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0);
+ MCONTACT hContact = (MCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0);
if ( !hContact) {
if (lParam) *(DWORD *)lParam = -1;
} else {
@@ -216,7 +216,7 @@ INT_PTR MetaAPI_ConvertToMeta(WPARAM wParam, LPARAM lParam) { // lParam=(HANDLE)hMeta
// add an existing contact to a metacontact
INT_PTR MetaAPI_AddToMeta(WPARAM wParam, LPARAM lParam) {
- return Meta_Assign((HCONTACT)wParam, (HCONTACT)lParam, FALSE);
+ return Meta_Assign((MCONTACT)wParam, (MCONTACT)lParam, FALSE);
}
// added 0.9.5.0 (22/3/05)
diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp index f251c1020d..6f245ff501 100644 --- a/plugins/MetaContacts/src/meta_main.cpp +++ b/plugins/MetaContacts/src/meta_main.cpp @@ -151,7 +151,7 @@ extern "C" __declspec(dllexport) int Load(void) db_set_resident(META_PROTO, "WindowOpen");
//set all contacts to 'offline', and initialize subcontact counter for db consistency check
- for (HCONTACT hContact = db_find_first(META_PROTO); hContact; hContact = db_find_next(hContact, META_PROTO)) {
+ for (MCONTACT hContact = db_find_first(META_PROTO); hContact; hContact = db_find_next(hContact, META_PROTO)) {
db_set_w(hContact, META_PROTO, "Status", ID_STATUS_OFFLINE);
db_set_dw(hContact, META_PROTO, "IdleTS", 0);
db_set_b(hContact, META_PROTO, "ContactCountCheck", 0);
diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp index 7c8ae2d560..30ab1750a6 100644 --- a/plugins/MetaContacts/src/meta_menu.cpp +++ b/plugins/MetaContacts/src/meta_menu.cpp @@ -42,13 +42,13 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) char *group = 0;
// Get some information about the selected contact.
- if ( !db_get_utf((HCONTACT)wParam, "CList", "Group", &dbv)) {
+ if ( !db_get_utf((MCONTACT)wParam, "CList", "Group", &dbv)) {
group = _strdup(dbv.pszVal);
db_free(&dbv);
}
// Create a new metacontact
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
if (hMetaContact) {
db_set_dw(hMetaContact, META_PROTO, META_ID,nextMetaID);
db_set_dw(hMetaContact, META_PROTO, "NumContacts",0);
@@ -61,7 +61,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam) db_set_utf(hMetaContact, "CList", "Group", group);
// Assign the contact to the MetaContact just created (and make default).
- if ( !Meta_Assign((HCONTACT)wParam, hMetaContact, TRUE)) {
+ if ( !Meta_Assign((MCONTACT)wParam, hMetaContact, TRUE)) {
MessageBox(0, TranslateT("There was a problem in assigning the contact to the MetaContact"), TranslateT("Error"), MB_ICONEXCLAMATION);
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMetaContact, 0);
return 0;
@@ -106,7 +106,7 @@ INT_PTR Meta_Edit(WPARAM wParam,LPARAM lParam) return 0;
}
-void Meta_RemoveContactNumber(HCONTACT hMeta, int number)
+void Meta_RemoveContactNumber(MCONTACT hMeta, int number)
{
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", 0);
int default_contact = db_get_dw(hMeta, META_PROTO, "Default", -1);
@@ -114,10 +114,10 @@ void Meta_RemoveContactNumber(HCONTACT hMeta, int number) return;
// get the handle
- HCONTACT hContact = Meta_GetContactHandle(hMeta, number);
+ MCONTACT hContact = Meta_GetContactHandle(hMeta, number);
// make sure this contact thinks it's part of this metacontact
- if ((HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0) == hMeta) {
+ if ((MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0) == hMeta) {
// remove link to meta contact
db_unset(hContact, META_PROTO, "IsSubcontact");
db_unset(hContact, META_PROTO, META_LINK);
@@ -207,7 +207,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) DWORD metaID;
// The wParam is a metacontact
- if ((metaID = db_get_dw((HCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
+ if ((metaID = db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
if ( !lParam) { // check from recursion - see second half of this function
if ( MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0),
TranslateT("This will remove the MetaContact permanently.\n\nProceed Anyway?"),
@@ -215,7 +215,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) return 0;
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// This contact is assigned to the MetaContact that will be deleted, clear the "MetaContacts" information
if ( db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1) == metaID) {
db_unset(hContact, META_PROTO, "IsSubcontact");
@@ -237,7 +237,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) CallService(MS_DB_CONTACT_DELETE,wParam,0);
}
else {
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
DWORD num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", -1);
if (num_contacts == 1) {
@@ -247,7 +247,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) return 0;
}
- Meta_RemoveContactNumber(hMeta, db_get_dw((HCONTACT)wParam, META_PROTO, "ContactNumber", -1));
+ Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1));
}
return 0;
}
@@ -262,11 +262,11 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam) */
INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hMeta;
+ MCONTACT hMeta;
// the wParam is a subcontact
- if ((hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0)) != 0) {
- db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((HCONTACT)wParam));
+ if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0) {
+ db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((MCONTACT)wParam));
NotifyEventHooks(hEventDefaultChanged, (WPARAM)hMeta, (LPARAM)wParam);
}
return 0;
@@ -284,15 +284,15 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam) INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam)
{
// the wParam is a MetaContact
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
- BOOL current = db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
+ BOOL current = db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
current = !current;
- db_set_b((HCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current);
+ db_set_b((MCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current);
- db_set_dw((HCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
if (current)
- NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((HCONTACT)wParam, db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1)));
+ NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1)));
else
NotifyEventHooks(hEventUnforceSend, wParam, 0);
}
@@ -317,7 +317,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) WORD status;
CLISTMENUITEM mi = { sizeof(mi) };
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
// save the mouse pos in case they open a subcontact menu
GetCursorPos(&menuMousePoint);
@@ -333,14 +333,14 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) Menu_ModifyItem(hMenuDelete, &mi);
//show subcontact menu items
- int num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", 0);
+ int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0);
for (int i = 0; i < MAX_CONTACTS; i++) {
if (i >= num_contacts) {
Menu_ShowItem(hMenuContact[i], false);
continue;
}
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, i);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i);
char *szProto = GetContactProto(hContact);
if ( !szProto)
status = ID_STATUS_OFFLINE;
@@ -351,7 +351,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) strcpy(buf, "Login");
strcat(buf, _itoa(i, idStr, 10));
- db_get((HCONTACT)wParam, META_PROTO, buf, &dbv);
+ db_get((MCONTACT)wParam, META_PROTO, buf, &dbv);
switch(dbv.type) {
case DBVT_ASCIIZ:
mir_snprintf(buf,512,"%s",dbv.pszVal);
@@ -391,7 +391,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) // wParam = char *szProto
// lParam = BOOL show
char serviceFunc[256];
- mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((HCONTACT)wParam)), PS_SEND_NUDGE);
+ mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((MCONTACT)wParam)), PS_SEND_NUDGE);
CallService(MS_NUDGE_SHOWMENU, (WPARAM)META_PROTO, (LPARAM)ServiceExists(serviceFunc));
}
else { // This is a simple contact
@@ -403,7 +403,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(hMenuConvert, false);
Menu_ShowItem(hMenuEdit, false);
}
- else if (db_get_dw((HCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
+ else if (db_get_dw((MCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// The contact is affected to a metacontact.
Menu_ShowItem(hMenuDefault, true);
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp index 3851c575e0..f12a2ee768 100755 --- a/plugins/MetaContacts/src/meta_services.cpp +++ b/plugins/MetaContacts/src/meta_services.cpp @@ -191,7 +191,7 @@ INT_PTR Meta_GetStatus(WPARAM wParam,LPARAM lParam) struct TFakeAckParams
{
HANDLE hEvent;
- HCONTACT hContact;
+ MCONTACT hContact;
LONG id;
char msg[512];
};
@@ -222,9 +222,9 @@ static DWORD CALLBACK sttFakeAckFail( LPVOID param ) INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA*)lParam;
- HCONTACT hMeta;
+ MCONTACT hMeta;
- if ((hMeta = (HCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
+ if ((hMeta = (MCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
return CallService(MS_PROTO_CHAINSEND, wParam, lParam); // Can't find the MetaID of the metacontact linked to
// if subcontact sending, add db event to keep metacontact history correct
@@ -261,7 +261,7 @@ INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam) INT_PTR Meta_SendNudge(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hSubContact = Meta_GetMostOnline((HCONTACT)wParam);
+ MCONTACT hSubContact = Meta_GetMostOnline((MCONTACT)wParam);
return ProtoCallService(GetContactProto(hSubContact), PS_SEND_NUDGE, (WPARAM)hSubContact, lParam);
}
@@ -289,7 +289,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam,LPARAM lParam) return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
}
- HCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
+ MCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
if ( !most_online) {
DWORD dwThreadId;
@@ -359,10 +359,10 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam) DBEVENTINFO dbei;
CCSDATA *ccs = (CCSDATA*)lParam;
PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
- HCONTACT hMeta;
+ MCONTACT hMeta;
// Can't find the MetaID of the metacontact linked to this contact, let through the protocol chain
- if ((hMeta = (HCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
+ if ((hMeta = (MCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
return CallService(MS_PROTO_CHAINRECV, wParam, (LPARAM)ccs);
if (options.set_default_on_recv) {
@@ -404,7 +404,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam) // use the subcontact's protocol 'recv' service to add the meta's history (AIMOSCAR removes HTML here!) if possible
char *proto = GetContactProto(ccs->hContact);
if (proto) {
- HCONTACT hSub = ccs->hContact;
+ MCONTACT hSub = ccs->hContact;
DWORD flags = pre->flags;
ccs->hContact = hMeta;
pre->flags |= (db_get_b(hMeta, META_PROTO, "WindowOpen", 0) ? 0 : PREF_CREATEREAD);
@@ -437,7 +437,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam) return CallService(MS_PROTO_CHAINRECV, wParam, (LPARAM)ccs);
}
- HCONTACT hSub = ccs->hContact;
+ MCONTACT hSub = ccs->hContact;
ccs->hContact = hMeta; // Forward to the associated MetaContact.
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)ccs);
ccs->hContact = hSub;
@@ -467,7 +467,7 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam) if (options.use_proto_recv) {
// use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!)
- HCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
+ MCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
if (char *subProto = GetContactProto(most_online))
if ( ProtoCallService(subProto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND)
return 0;
@@ -503,9 +503,9 @@ information about the ACK. int Meta_HandleACK(WPARAM wParam, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*) lParam;
- HCONTACT hUser;
+ MCONTACT hUser;
- if (ack->hContact == 0 || (hUser = (HCONTACT)db_get_dw(ack->hContact, META_PROTO, "Handle",0)) == 0)
+ if (ack->hContact == 0 || (hUser = (MCONTACT)db_get_dw(ack->hContact, META_PROTO, "Handle",0)) == 0)
return 0; // Can't find the MetaID, let through the protocol chain
@@ -527,7 +527,7 @@ int Meta_HandleACK(WPARAM wParam, LPARAM lParam) DBVARIANT dbv;
// change avatar if the most online supporting avatars changes, or if we don't have one
- HCONTACT most_online = Meta_GetMostOnlineSupporting(hUser, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(hUser, PFLAGNUM_4, PF4_AVATARS);
//if (AI.hContact == 0 || AI.hContact != most_online) {
if (ack->hContact == 0 || ack->hContact != most_online) {
return 0;
@@ -571,7 +571,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) DBCONTACTWRITESETTING *dcws = (DBCONTACTWRITESETTING *)lParam;
char buffer[512], szId[40];
int contact_number;
- HCONTACT hMeta, most_online;
+ MCONTACT hMeta, most_online;
// hide metacontacts when groups disabled
if (wParam == 0
@@ -588,7 +588,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) // import process has just been run...call startup routines...
Meta_SetHandles();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int meta_id;
if ((meta_id = db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)) != (DWORD)-1)
Meta_CopyData(hContact);
@@ -601,22 +601,22 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) // from here on, we're just interested in contact settings
if (wParam == 0) return 0;
- if ((hMeta=(HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe
+ if ((hMeta=(MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe
{
// This contact is attached to a MetaContact.
- contact_number = Meta_GetContactNumber((HCONTACT)wParam);
+ contact_number = Meta_GetContactNumber((MCONTACT)wParam);
if (contact_number == -1) return 0; // exit - db corruption
if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Group") &&
- Meta_IsEnabled() && db_get_b((HCONTACT)wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) {
+ Meta_IsEnabled() && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) {
if ((dcws->value.type == DBVT_ASCIIZ || dcws->value.type == DBVT_UTF8) && !Meta_IsHiddenGroup(dcws->value.pszVal)) {
// subcontact group reassigned - copy to saved group
- db_set((HCONTACT)wParam, META_PROTO, "OldCListGroup", &dcws->value);
- db_set_s((HCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
+ db_set((MCONTACT)wParam, META_PROTO, "OldCListGroup", &dcws->value);
+ db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
} else if (dcws->value.type == DBVT_DELETED) {
- db_unset((HCONTACT)wParam, META_PROTO, "OldCListGroup");
- db_set_s((HCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
+ db_unset((MCONTACT)wParam, META_PROTO, "OldCListGroup");
+ db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
}
}
else if ( !strcmp(dcws->szSetting, "IP")) {
@@ -655,7 +655,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) db_set(hMeta, META_PROTO, buffer, &dcws->value);
DBVARIANT dbv;
- if (Mydb_get((HCONTACT)wParam, "CList", "MyHandle", &dbv)) {
+ if (Mydb_get((MCONTACT)wParam, "CList", "MyHandle", &dbv)) {
strcpy(buffer, "CListName");
strcat(buffer, _itoa(contact_number, szId, 10));
db_set(hMeta, META_PROTO, buffer, &dcws->value);
@@ -663,7 +663,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) else db_free(&dbv);
// copy nick to metacontact, if it's the most online
- HCONTACT most_online = Meta_GetMostOnline(hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(hMeta);
Meta_CopyContactNick(hMeta, most_online);
return 0;
@@ -682,12 +682,12 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) }
else if ( !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "MyHandle")) {
if (dcws->value.type == DBVT_DELETED) {
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
strcpy(buffer, "CListName");
strcat(buffer, _itoa(contact_number, szId, 10));
DBVARIANT dbv;
- if (proto && !Mydb_get((HCONTACT)wParam, proto, "Nick", &dbv)) {
+ if (proto && !Mydb_get((MCONTACT)wParam, proto, "Nick", &dbv)) {
db_set(hMeta, META_PROTO, buffer, &dbv);
db_free(&dbv);
} else {
@@ -702,7 +702,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) }
// copy nick to metacontact, if it's the most online
- HCONTACT most_online = Meta_GetMostOnline(hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(hMeta);
Meta_CopyContactNick(hMeta, most_online);
return 0;
@@ -752,11 +752,11 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) Meta_CopyData(hMeta);
}
else if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Hidden")) {
- if ((dcws->value.type == DBVT_DELETED || db_get_b((HCONTACT)wParam, "CList", "Hidden", 0) == 0)
- && db_get_b((HCONTACT)wParam, META_PROTO, "Hidden", 0) == 1)
+ if ((dcws->value.type == DBVT_DELETED || db_get_b((MCONTACT)wParam, "CList", "Hidden", 0) == 0)
+ && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 1)
{
// a subcontact we hid (e.g. jabber) has been unhidden - hide it again :(
- db_set_b((HCONTACT)wParam, "CList", "Hidden", 1);
+ db_set_b((MCONTACT)wParam, "CList", "Hidden", 1);
}
}
}
@@ -767,21 +767,21 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam) int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam)
{
// is a subcontact - update meta contact
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
if (hMeta) {
- Meta_RemoveContactNumber(hMeta, db_get_dw((HCONTACT)wParam, META_PROTO, "ContactNumber", -1));
+ Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1));
NotifyEventHooks(hSubcontactsChanged, (WPARAM)hMeta, 0);
return 0;
}
// not a subcontact - is it a metacontact?
- int num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", 0);
+ int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0);
if (num_contacts)
NotifyEventHooks(hSubcontactsChanged, (WPARAM)wParam, 0);
// remove & restore all subcontacts
for (int i = 0; i < num_contacts; i++) {
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, i);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i);
if (hContact && (HANDLE)db_get_dw(hContact, META_PROTO, "Handle", 0) == (HANDLE)wParam) {
if (db_get_b(hContact, META_PROTO, "IsSubcontact", 0) == 1)
db_unset(hContact, META_PROTO, "IsSubcontact");
@@ -807,13 +807,13 @@ int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam) INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam)
{
// This is a simple contact, let through the stack of protocols
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1)
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1)
return 0;
// forward to sending protocol, if supported
- HCONTACT most_online = Meta_GetMostOnline((HCONTACT)wParam);
- Meta_CopyContactNick((HCONTACT)wParam, most_online);
+ MCONTACT most_online = Meta_GetMostOnline((MCONTACT)wParam);
+ Meta_CopyContactNick((MCONTACT)wParam, most_online);
if ( !most_online)
return 0;
@@ -832,8 +832,8 @@ INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam) */
int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hMeta;
- if ((hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) {
+ MCONTACT hMeta;
+ if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) {
// This contact is attached to a MetaContact.
if ( !options.subcontact_windows) { // we don't want clicking on the clist notification icon to open the metacontact message window
// try to remove any clist events we added for subcontact
@@ -855,12 +855,12 @@ int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam) int Meta_UserInfo(WPARAM wParam, LPARAM lParam)
{
- DWORD default_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
+ DWORD default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
if (default_contact_number == -1) // not a meta contact
return 0;
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle((HCONTACT)lParam, default_contact_number), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle((MCONTACT)lParam, default_contact_number), 0);
return 1;
}
@@ -868,11 +868,11 @@ int Meta_UserInfo(WPARAM wParam, LPARAM lParam) // let received messages through and add db history to metacontact, or vice versa
int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) {
MessageWindowEventData *mwed = (MessageWindowEventData *)lParam;
- HCONTACT hMeta = 0;
+ MCONTACT hMeta = 0;
message_window_api_enabled = TRUE;
- if ((hMeta = (HCONTACT)db_get_dw(mwed->hContact, META_PROTO, "Handle", 0)) != 0
+ if ((hMeta = (MCONTACT)db_get_dw(mwed->hContact, META_PROTO, "Handle", 0)) != 0
|| db_get_dw(mwed->hContact, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1)
{
// contact is subcontact of metacontact, or an actual metacontact - record whether window is open or closed
@@ -907,11 +907,11 @@ int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) { int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam)
{
- if (db_get_dw((HCONTACT)wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1)
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1)
return 0;
// -1 indicates no specific capability but respect 'ForceDefault'
- HCONTACT most_online = Meta_GetMostOnlineSupporting((HCONTACT)wParam, PFLAGNUM_1, -1);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting((MCONTACT)wParam, PFLAGNUM_1, -1);
if ( !most_online)
return 0;
@@ -944,7 +944,7 @@ int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam) INT_PTR Meta_ClistMessageEventClicked(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
+ MCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
return Meta_ClistDoubleClicked((WPARAM)hContact, (LPARAM)((CLISTEVENT *)lParam)->hDbEvent);
}
@@ -1041,7 +1041,7 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam) // loop and copy data from subcontacts
if (options.copydata) {
int meta_id;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if ((meta_id = db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1))!=(DWORD)-1)
Meta_CopyData(hContact);
}
@@ -1093,7 +1093,7 @@ static VOID CALLBACK sttMenuThread( PVOID param ) INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, (int)lParam);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam);
if (options.menu_function == FT_MSG) {
// open message window if protocol supports message sending or chat, else simulate double click
@@ -1112,7 +1112,7 @@ INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam) if ((caps & PF1_IMSEND) || (caps & PF1_CHAT) || (proto && strcmp(proto, "IRC") == 0)) {
// set default contact for sending/status and open message window
- db_set_dw((HCONTACT)wParam, META_PROTO, "Default", (DWORD)(int)lParam);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)(int)lParam);
NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)hContact);
CallService(MS_MSG_SENDMESSAGE, wParam, 0);
} else
@@ -1152,7 +1152,7 @@ INT_PTR Meta_FileSend(WPARAM wParam, LPARAM lParam) }
else
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_FILESEND);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_FILESEND);
if ( !most_online) {
//PUShowMessage("no most online for ft", SM_NOTIFY);
return 0;
@@ -1179,7 +1179,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM wParam, LPARAM lParam) }
else
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_MODEMSGRECV);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_MODEMSGRECV);
if ( !most_online)
return 0;
@@ -1208,8 +1208,8 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) { }
else
{
- HCONTACT hMeta = AI->hContact;
- HCONTACT hSub = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT hMeta = AI->hContact;
+ MCONTACT hSub = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS);
if ( !hSub)
return GAIR_NOAVATAR;
@@ -1236,7 +1236,7 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam) if ((default_contact_number = db_get_dw(ccs->hContact, META_PROTO, "Default",(DWORD)-1)) == (DWORD)-1)
return 0;
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_4, PF4_AVATARS);
if ( !most_online)
return 0;
@@ -1292,16 +1292,16 @@ int Meta_OptInit(WPARAM wParam, LPARAM lParam) int Meta_CallMostOnline(WPARAM wParam, LPARAM lParam)
{
- HCONTACT most_online_im = Meta_GetMostOnline((HCONTACT)wParam);
+ MCONTACT most_online_im = Meta_GetMostOnline((MCONTACT)wParam);
// fix nick
- Meta_CopyContactNick((HCONTACT)wParam, most_online_im);
+ Meta_CopyContactNick((MCONTACT)wParam, most_online_im);
// fix status
- Meta_FixStatus((HCONTACT)wParam);
+ Meta_FixStatus((MCONTACT)wParam);
// copy all other data
- Meta_CopyData((HCONTACT) wParam);
+ Meta_CopyData((MCONTACT) wParam);
return 0;
}
diff --git a/plugins/MetaContacts/src/meta_utils.cpp b/plugins/MetaContacts/src/meta_utils.cpp index cc2b70ce98..4d83038cd3 100644 --- a/plugins/MetaContacts/src/meta_utils.cpp +++ b/plugins/MetaContacts/src/meta_utils.cpp @@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HANDLE invisiGroup;
POINT menuMousePoint;
-INT_PTR Mydb_get(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+INT_PTR Mydb_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
memset(dbv, 0, sizeof(DBVARIANT));
return db_get_s(hContact, szModule, szSetting, dbv, 0);
@@ -86,7 +86,7 @@ int Meta_EqualDBV(DBVARIANT *dbv, DBVARIANT *id) { * @return a \c HANDLE to the specified contact or \c NULL
if no contact has been found.
*/
-HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id)
+MCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id)
{
char *field;
DBVARIANT dbv;
@@ -98,7 +98,7 @@ HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id) field = (char *)CallProtoService(protocol,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// Scan the database and retrieve the field for each contact
if ( !db_get(hContact, protocol, field, &dbv)) {
if (dbv.type == id->type) {
@@ -209,12 +209,12 @@ int Meta_SetNick(char *szProto) *
* @return TRUE on success, FALSE otherwise
*/
-BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default)
+BOOL Meta_Assign(MCONTACT src, MCONTACT dest, BOOL set_as_default)
{
DWORD metaID, num_contacts;
char buffer[512], szId[40];
WORD status;
- HCONTACT most_online;
+ MCONTACT most_online;
if ((metaID = db_get_dw(dest, META_PROTO, META_ID,(DWORD)-1))==-1) {
MessageBox(0, TranslateT("Could not get MetaContact ID"), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
@@ -377,7 +377,7 @@ BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default) * Convenience method - get most online contact supporting messaging
*
*/
-HCONTACT Meta_GetMostOnline(HCONTACT hMeta) {
+MCONTACT Meta_GetMostOnline(MCONTACT hMeta) {
return Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, PF1_IM);
}
/** Get the 'most online' contact for a meta contact (according to above order) which supports the specified
@@ -388,9 +388,9 @@ HCONTACT Meta_GetMostOnline(HCONTACT hMeta) { * @return \c HANDLE to a contact
*/
-HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned long capability) {
+MCONTACT Meta_GetMostOnlineSupporting(MCONTACT hMeta, int pflagnum, unsigned long capability) {
int most_online_status = ID_STATUS_OFFLINE;
- HCONTACT most_online_contact = NULL, hContact;
+ MCONTACT most_online_contact = NULL, hContact;
int i, status, default_contact_number, num_contacts;
unsigned long caps = 0;
char *szProto, *most_online_proto;
@@ -416,7 +416,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon return most_online_contact;
// a subcontact is being temporarily 'forced' to do sending
- if ((most_online_contact = (HCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0))) {
+ if ((most_online_contact = (MCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0))) {
caps = szProto ? CallProtoService(szProto, PS_GETCAPS, (WPARAM)pflagnum, 0) : 0;
if (szProto && strcmp(szProto, "IRC") == 0) caps |= PF1_IM;
if (szProto && (caps & capability) == capability && capability != 0) // capability is 0 when we're working out status
@@ -477,7 +477,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon // no online contacts? if we're trying to message, use 'send offline' contact
if (most_online_status == ID_STATUS_OFFLINE && capability == PF1_IM) {
- HCONTACT hOffline = Meta_GetContactHandle(hMeta, db_get_dw(hMeta, META_PROTO, "OfflineSend", (DWORD)-1));
+ MCONTACT hOffline = Meta_GetContactHandle(hMeta, db_get_dw(hMeta, META_PROTO, "OfflineSend", (DWORD)-1));
if (hOffline)
most_online_contact = hOffline;
}
@@ -485,7 +485,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon return most_online_contact;
}
-int Meta_GetContactNumber(HCONTACT hContact) {
+int Meta_GetContactNumber(MCONTACT hContact) {
return db_get_dw(hContact, META_PROTO, "ContactNumber", -1);
}
@@ -509,12 +509,12 @@ BOOL dbv_same(DBVARIANT *dbv1, DBVARIANT *dbv2) { }
}
- void copy_settings_array(HCONTACT hMeta, char *module, const char *settings[], int num_settings) {
+ void copy_settings_array(MCONTACT hMeta, char *module, const char *settings[], int num_settings) {
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", (DWORD)-1),
default_contact = db_get_dw(hMeta, META_PROTO, "Default", (DWORD)-1),
most_online = Meta_GetContactNumber(Meta_GetMostOnline(hMeta));
- HCONTACT hContact;
+ MCONTACT hContact;
int i, j;
char *used_mod;
@@ -613,12 +613,12 @@ const char *MBirthdaySettings[3] = // szProto:
// clist: "StatusMsg"
-void CopyStatusData(HCONTACT hMeta)
+void CopyStatusData(MCONTACT hMeta)
{
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", (DWORD)-1),
most_online = Meta_GetContactNumber(Meta_GetMostOnline(hMeta));
WORD status = db_get_w(hMeta, META_PROTO, "Status", ID_STATUS_OFFLINE);
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL bDoneStatus = FALSE, bDoneXStatus = FALSE;
for (int i = 0; i < num_contacts; i++) {
@@ -667,7 +667,7 @@ void CopyStatusData(HCONTACT hMeta) }
}
-void Meta_CopyData(HCONTACT hMeta)
+void Meta_CopyData(MCONTACT hMeta)
{
if (options.copydata) {
CopyStatusData(hMeta);
@@ -682,7 +682,7 @@ void Meta_CopyData(HCONTACT hMeta) }
-HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number)
+MCONTACT Meta_GetContactHandle(MCONTACT hMeta, int contact_number)
{
char buffer[512], buffer2[512];
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", 0);
@@ -691,13 +691,13 @@ HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number) strcpy(buffer, "Handle");
strcat(buffer, _itoa(contact_number, buffer2, 10));
- return (HCONTACT)db_get_dw(hMeta, META_PROTO, buffer, 0);
+ return (MCONTACT)db_get_dw(hMeta, META_PROTO, buffer, 0);
}
int Meta_SetHandles(void)
{
DWORD meta_id, num_contacts, contact_number;
- HCONTACT hContact2, hContact = db_find_first(), hNextContact;
+ MCONTACT hContact2, hContact = db_find_first(), hNextContact;
char buffer[512];
TCHAR nick_buffer[128], buffer2[40];
BOOL found;
@@ -875,7 +875,7 @@ int Meta_HideLinkedContacts(void) { char *szProto, *group_name;
int hGroup = 1;
- HCONTACT hContact2, hContact = db_find_first();
+ MCONTACT hContact2, hContact = db_find_first();
// ensure the hidden group does not exist (how this occurs i wonder but there have been reports!)
// (sometimes protocol server side groups are to blame - msn and icq)
@@ -961,7 +961,7 @@ int Meta_HideLinkedContacts(void) { while ( hContact != NULL ) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
// is a meta contact
- HCONTACT hMostOnline = Meta_GetMostOnline(hContact); // set nick
+ MCONTACT hMostOnline = Meta_GetMostOnline(hContact); // set nick
Meta_CopyContactNick(hContact, hMostOnline);
Meta_FixStatus(hContact);
@@ -979,7 +979,7 @@ int Meta_HideLinkedContacts(void) { */
int Meta_UnhideLinkedContacts(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// has a link - unhide it
// restore old group
@@ -996,7 +996,7 @@ int Meta_HideMetaContacts(int hide) if (hide) Meta_SuppressStatus(FALSE);
else Meta_SuppressStatus(options.suppress_status);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
// is a meta contact
if (hide)
@@ -1016,7 +1016,7 @@ int Meta_HideMetaContacts(int hide) return 0;
}
-void Meta_RestoreGroup(HCONTACT hContact) {
+void Meta_RestoreGroup(MCONTACT hContact) {
if (meta_group_hack_disabled) return; // clist has called api function to disable group hack - yay!
@@ -1057,7 +1057,7 @@ void Meta_RestoreGroup(HCONTACT hContact) { else {
// put back into metacontact's group
DBVARIANT dbv;
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
if (hMeta && !Mydb_get(hMeta, "CList", "Group", &dbv)) {
db_set(hContact, "CList", "Group", &dbv);
db_free(&dbv);
@@ -1082,7 +1082,7 @@ void Meta_RestoreGroup(HCONTACT hContact) { db_unset(hContact, "CList", "Hidden");
}
-void Meta_SetGroup(HCONTACT hContact) {
+void Meta_SetGroup(MCONTACT hContact) {
char *szProto, *uid;
if (meta_group_hack_disabled) return; // clist has called api function to disable group hack - yay!
@@ -1118,7 +1118,7 @@ void Meta_SetGroup(HCONTACT hContact) { int Meta_SuppressStatus(BOOL suppress)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// is a subcontact
if (suppress)
@@ -1131,7 +1131,7 @@ int Meta_SuppressStatus(BOOL suppress) return 0;
}
-int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact) {
+int Meta_CopyContactNick(MCONTACT hMeta, MCONTACT hContact) {
DBVARIANT dbv, dbv_proto;
char *szProto;
@@ -1170,9 +1170,9 @@ int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact) { int Meta_SetAllNicks()
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
- HCONTACT most_online = Meta_GetMostOnline(hContact);
+ MCONTACT most_online = Meta_GetMostOnline(hContact);
Meta_CopyContactNick(hContact, most_online);
Meta_FixStatus(hContact);
Meta_CopyData(hContact);
@@ -1190,10 +1190,10 @@ int Meta_IsHiddenGroup(const char *group_name) return 0;
}
-int Meta_SwapContacts(HCONTACT hMeta, DWORD contact_number1, DWORD contact_number2) {
+int Meta_SwapContacts(MCONTACT hMeta, DWORD contact_number1, DWORD contact_number2) {
DBVARIANT dbv1, dbv2;
- HCONTACT hContact1 = Meta_GetContactHandle(hMeta, contact_number1),
+ MCONTACT hContact1 = Meta_GetContactHandle(hMeta, contact_number1),
hContact2 = Meta_GetContactHandle(hMeta, contact_number2);
char buff1[512], buff12[512], buff2[512], buff22[512];
BOOL ok1, ok2;
@@ -1348,7 +1348,7 @@ INT_PTR CALLBACK DlgProcNull(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara }
// function to copy history from one contact to another - courtesy JdGordon (thx)
-void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo)
+void copyHistory(MCONTACT hContactFrom, MCONTACT hContactTo)
{
HANDLE hDbEvent;
DBEVENTINFO dbei;
@@ -1409,9 +1409,9 @@ void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo) //mir_free(id);
}
-void Meta_FixStatus(HCONTACT hMeta)
+void Meta_FixStatus(MCONTACT hMeta)
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, 0);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, 0);
if (most_online) {
char *szProto = GetContactProto(most_online);
if (szProto) {
diff --git a/plugins/MetaContacts/src/metacontacts.h b/plugins/MetaContacts/src/metacontacts.h index 637db357d5..369bdf696c 100644 --- a/plugins/MetaContacts/src/metacontacts.h +++ b/plugins/MetaContacts/src/metacontacts.h @@ -63,7 +63,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // I can't think of a way around this - mental block
-INT_PTR TranslateMenuFunc(HCONTACT hContact, int i);
+INT_PTR TranslateMenuFunc(MCONTACT hContact, int i);
extern HGENMENU hMenuContact[MAX_CONTACTS];
extern HINSTANCE hInstance;
@@ -78,7 +78,7 @@ extern int mcStatus; INT_PTR Meta_Convert(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_AddTo(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_Edit(WPARAM wParam,LPARAM lParam);
-void Meta_RemoveContactNumber(HCONTACT hMeta, int number);
+void Meta_RemoveContactNumber(MCONTACT hMeta, int number);
INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam);
@@ -87,32 +87,32 @@ INT_PTR Meta_IsEnabled(); int Meta_EqualDBV(DBVARIANT *dbv, DBVARIANT *id);
int Meta_ModifyMenu(WPARAM wParam,LPARAM lParam);
-BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default);
-HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id);
+BOOL Meta_Assign(MCONTACT src, MCONTACT dest, BOOL set_as_default);
+MCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id);
int Meta_SetNick(char *proto);
-HCONTACT Meta_GetMostOnline(HCONTACT hMeta);
-HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned long capability);
+MCONTACT Meta_GetMostOnline(MCONTACT hMeta);
+MCONTACT Meta_GetMostOnlineSupporting(MCONTACT hMeta, int pflagnum, unsigned long capability);
int Meta_HideLinkedContacts(void);
int Meta_SetHandles(void);
int Meta_UnhideLinkedContacts(void);
-int Meta_GetContactNumber(HCONTACT hContact);
-HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number);
-void Meta_RestoreGroup(HCONTACT hContact);
-void Meta_SetGroup(HCONTACT hContact);
+int Meta_GetContactNumber(MCONTACT hContact);
+MCONTACT Meta_GetContactHandle(MCONTACT hMeta, int contact_number);
+void Meta_RestoreGroup(MCONTACT hContact);
+void Meta_SetGroup(MCONTACT hContact);
int Meta_HideMetaContacts(int hide);
int Meta_SuppressStatus(int suppress);
-int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact);
-void Meta_CopyData(HCONTACT hMeta);
+int Meta_CopyContactNick(MCONTACT hMeta, MCONTACT hContact);
+void Meta_CopyData(MCONTACT hMeta);
int Meta_SetAllNicks();
int Meta_IsHiddenGroup(const char *group_name);
-int Meta_SwapContacts(HCONTACT hMeta, DWORD contact_number1, DWORD contact_number2);
+int Meta_SwapContacts(MCONTACT hMeta, DWORD contact_number1, DWORD contact_number2);
// function to copy history from one contact to another - courtesy JdGordon with mods (thx)
-void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo);
+void copyHistory(MCONTACT hContactFrom, MCONTACT hContactTo);
// inverse
//void Meta_RemoveHistory(HANDLE hContactRemoveFrom, HANDLE hContactSource);
-void Meta_FixStatus(HCONTACT hMeta);
+void Meta_FixStatus(MCONTACT hMeta);
-char *Meta_GetUniqueIdentifier(HCONTACT hContact, DWORD *pused);
+char *Meta_GetUniqueIdentifier(MCONTACT hContact, DWORD *pused);
INT_PTR Meta_GetCaps(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_GetName(WPARAM wParam,LPARAM lParam);
@@ -187,7 +187,7 @@ INT_PTR MetaAPI_RemoveFromMeta(WPARAM wParam, LPARAM lParam); INT_PTR MetaAPI_DisableHiddenGroup(WPARAM wParam, LPARAM lParam);
// extended db get/write setting functions, that handle unicode
-INT_PTR Mydb_get(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+INT_PTR Mydb_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
// IcoLib support
void InitIcons(void);
diff --git a/plugins/MirFox/src/MirandaOptions.cpp b/plugins/MirFox/src/MirandaOptions.cpp index ec6f20e952..9492ab98a0 100644 --- a/plugins/MirFox/src/MirandaOptions.cpp +++ b/plugins/MirFox/src/MirandaOptions.cpp @@ -169,7 +169,7 @@ static void setListContactIcons(HWND hwndList){ boost::ptr_list<MirandaContact>::iterator mirandaContactsIter;
for (mirandaContactsIter = mirandaContactsPtr->begin(); mirandaContactsIter != mirandaContactsPtr->end(); mirandaContactsIter++){
- HCONTACT hContact = mirandaContactsIter->contactHandle;
+ MCONTACT hContact = mirandaContactsIter->contactHandle;
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem) {
//if icon on 0th extracolumn is not set
@@ -484,7 +484,7 @@ INT_PTR CALLBACK DlgProcOpts_Tab2(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case PSN_APPLY:
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC2_CONTACTS_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if(hItem) {
diff --git a/plugins/MirFox/src/MirandaUtils.cpp b/plugins/MirFox/src/MirandaUtils.cpp index f3491471c7..3681c30251 100644 --- a/plugins/MirFox/src/MirandaUtils.cpp +++ b/plugins/MirFox/src/MirandaUtils.cpp @@ -181,7 +181,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ }
logger->log_p(L"SMTC: mirandaSendModeFlag = [%d] bufSize = [%d]", mirandaSendModeFlag, bufSize);
- HANDLE hProcess = sendMessageMiranda((HCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer);
+ HANDLE hProcess = sendMessageMiranda((MCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer);
logger->log_p(L"SMTC: hProcess = [" SCNuPTR L"]", hProcess);
MIRFOXACKDATA* myMfAck = NULL;
@@ -213,7 +213,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ }
- MirandaContact* mirandaContact = args->mirfoxDataPtr->getMirandaContactPtrByHandle((HCONTACT)args->targetHandle);
+ MirandaContact* mirandaContact = args->mirfoxDataPtr->getMirandaContactPtrByHandle((MCONTACT)args->targetHandle);
const wchar_t* contactNameW = NULL;
TCHAR* tszAccountName = NULL;
if (mirandaContact){
@@ -226,7 +226,7 @@ void MirandaUtils::sendMessage(ActionThreadArgStruct* args, MFENUM_SEND_MESSAGE_ if(myMfAck != NULL && myMfAck->result == ACKRESULT_SUCCESS){
- addMessageToDB((HCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer, bufSize, targetHandleSzProto);
+ addMessageToDB((MCONTACT)args->targetHandle, mirandaSendModeFlag, msgBuffer, bufSize, targetHandleSzProto);
if (mode == MFENUM_SMM_ONLY_SEND){
@@ -346,12 +346,12 @@ int MirandaUtils::getMirandaSendModeFlag(char* targetHandleSzProto) }
-HANDLE MirandaUtils::sendMessageMiranda(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer)
+HANDLE MirandaUtils::sendMessageMiranda(MCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer)
{
return (HANDLE)CallContactService(hContact, PSS_MESSAGE, (WPARAM)mirandaSendModeFlag, (LPARAM)msgBuffer);
}
-void MirandaUtils::addMessageToDB(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto)
+void MirandaUtils::addMessageToDB(MCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -405,12 +405,12 @@ int MirandaUtils::on_hook_OpenMW(WPARAM wParam, LPARAM lParam) MessageWindowData mwd;
mwd.cbSize = sizeof(MessageWindowData);
- mwd.hContact = (HCONTACT)param->targetHandle;
+ mwd.hContact = (MCONTACT)param->targetHandle;
mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
MessageWindowInputData mwid;
mwid.cbSize = sizeof(MessageWindowInputData);
- mwid.hContact = (HCONTACT)param->targetHandle;
+ mwid.hContact = (MCONTACT)param->targetHandle;
mwid.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
delete param;
@@ -580,7 +580,7 @@ void MirandaUtils::translateOldDBNames() { }
//contacts "state"
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
logger->log_p(L"TranslateOldDBNames: found CONTACT: [" SCNuPTR L"]", hContact);
diff --git a/plugins/MirFox/src/MirandaUtils.h b/plugins/MirFox/src/MirandaUtils.h index 2c6e04afcc..08d434a418 100644 --- a/plugins/MirFox/src/MirandaUtils.h +++ b/plugins/MirFox/src/MirandaUtils.h @@ -80,9 +80,9 @@ private: int getMirandaSendModeFlag(char* targetHandleSzProto);
- HANDLE sendMessageMiranda(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer);
+ HANDLE sendMessageMiranda(MCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer);
- void addMessageToDB(HCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto);
+ void addMessageToDB(MCONTACT hContact, int mirandaSendModeFlag, char* msgBuffer, std::size_t bufSize, char* targetHandleSzProto);
void setStatusOnAccount(ActionThreadArgStruct* args);
@@ -100,7 +100,7 @@ private: typedef struct {
const char* szModule;
- HCONTACT hContact;
+ MCONTACT hContact;
int result;
const char* errorDesc;
} MIRFOXACKDATA;
diff --git a/plugins/MirFox/src/MirfoxData.cpp b/plugins/MirFox/src/MirfoxData.cpp index 0f82d638f8..9ed2657ee9 100644 --- a/plugins/MirFox/src/MirfoxData.cpp +++ b/plugins/MirFox/src/MirfoxData.cpp @@ -49,7 +49,7 @@ void MirfoxData::clearMirandaContacts(){ }
int
-MirfoxData::updateMirandaContactState(HCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState)
+MirfoxData::updateMirandaContactState(MCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState)
{
boost::ptr_list<MirandaContact>* mirandaContactsPtr = getMirandaContacts();
@@ -65,7 +65,7 @@ MirfoxData::updateMirandaContactState(HCONTACT contactHandle, MFENUM_MIRANDACONT }
MirandaContact*
-MirfoxData::getMirandaContactPtrByHandle(HCONTACT contactHandle){
+MirfoxData::getMirandaContactPtrByHandle(MCONTACT contactHandle){
MFLogger* logger = MFLogger::getInstance();
@@ -355,7 +355,7 @@ void MirfoxData::initializeMirandaContacts() //get contects from miranda
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)){
//add to list
MirandaContact* mirandaContactItemPtr = new MirandaContact(
hContact //handle to contact in miranda
@@ -574,7 +574,7 @@ MirandaAccount::getObjectPtr() * class functions implementation
*/
-MirandaContact::MirandaContact(HCONTACT contactHandleL)
+MirandaContact::MirandaContact(MCONTACT contactHandleL)
{
contactState = MFENUM_MIRANDACONTACT_STATE_UNKNOWN;
contactHandle = contactHandleL;
diff --git a/plugins/MirFox/src/MirfoxData.h b/plugins/MirFox/src/MirfoxData.h index 8fe5729107..746abb0d82 100644 --- a/plugins/MirFox/src/MirfoxData.h +++ b/plugins/MirFox/src/MirfoxData.h @@ -134,10 +134,10 @@ public: //update MirandaContact's state by id
//return 0 - ok,
- int updateMirandaContactState(HCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState);
+ int updateMirandaContactState(MCONTACT contactHandle, MFENUM_MIRANDACONTACT_STATE & contactState);
//return MirandaContact* by HANDLE
- MirandaContact* getMirandaContactPtrByHandle(HCONTACT contactHandle);
+ MirandaContact* getMirandaContactPtrByHandle(MCONTACT contactHandle);
@@ -256,11 +256,11 @@ class MirandaContact {
public:
- MirandaContact(HCONTACT contactHandleL);
+ MirandaContact(MCONTACT contactHandleL);
~MirandaContact(void);
MirandaContact* getObjectPtr();
- HCONTACT contactHandle; //HANDLE to contact in miranda (unikalne)
+ MCONTACT contactHandle; //HANDLE to contact in miranda (unikalne)
std::wstring contactNameW; //presented name
MFENUM_MIRANDACONTACT_STATE contactState; //state in options
MirandaAccount* mirandaAccountPtr; //account of hContact
diff --git a/plugins/MirOTR/MirOTR/src/dbfilter.cpp b/plugins/MirOTR/MirOTR/src/dbfilter.cpp index b8e6319291..787164e6f0 100644 --- a/plugins/MirOTR/MirOTR/src/dbfilter.cpp +++ b/plugins/MirOTR/MirOTR/src/dbfilter.cpp @@ -7,7 +7,7 @@ static UINT_PTR timerId = 0; struct DeleteEventNode {
DeleteEventNode *next;
time_t timestamp;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
};
struct DeleteEventHead {
@@ -45,7 +45,7 @@ VOID CALLBACK DeleteTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi // add prefix to sent messages
int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) {
if (!options.prefix_messages || !lParam) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
if ((dbei->eventType != EVENTTYPE_MESSAGE) || !(dbei->flags & DBEF_SENT) || (dbei->flags & DBEF_OTR_PREFIXED))
return 0;
@@ -58,7 +58,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) { return 0;
if(g_metaproto && strcmp(proto, g_metaproto) == 0) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hContact) return 0;
proto = contact_get_proto(hContact);
if (!proto ) return 0;
@@ -191,8 +191,8 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) { info.pBlob = (PBYTE)mir_alloc(info.cbBlob);
if (!db_event_get((HANDLE)lParam, &info)) {
if(info.eventType == EVENTTYPE_MESSAGE) {
- HCONTACT hContact = (HCONTACT)wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ MCONTACT hContact = (MCONTACT)wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
@@ -223,7 +223,7 @@ int OnDatabaseEventPreAdd(WPARAM wParam, LPARAM lParam) { return 0;
}
-void FinishSession(HCONTACT hContact) {
+void FinishSession(MCONTACT hContact) {
if (!hContact) return;
ConnContext *context = otrl_context_find_miranda(otr_user_state, hContact);
TrustLevel level = otr_context_get_trust(context);
@@ -247,8 +247,8 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) { if(mwd->uType != MSG_WINDOW_EVT_OPEN) return 0;
- HCONTACT hContact = mwd->hContact, hTemp;
- if(options.bHaveMetaContacts && (hTemp = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ MCONTACT hContact = mwd->hContact, hTemp;
+ if(options.bHaveMetaContacts && (hTemp = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hTemp;
if (!CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME))
@@ -271,14 +271,14 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) { if(status != ID_STATUS_OFFLINE ) return 0;
const char *proto = (char *)lParam;
- HCONTACT hContact;
+ MCONTACT hContact;
lib_cs_lock();
ConnContext *context = otr_user_state->context_root;
while(context) {
if(context->msgstate == OTRL_MSGSTATE_ENCRYPTED && (proto == 0 || strcmp(proto, context->protocol) == 0)) {
- hContact = (HCONTACT)context->app_data;
+ hContact = (MCONTACT)context->app_data;
if(hContact) {
otrl_message_disconnect(otr_user_state, &ops, (void*)hContact, context->accountname, context->protocol, context->username);
@@ -296,7 +296,7 @@ int StatusModeChange(WPARAM wParam, LPARAM lParam) { int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *)lParam;
if (!lParam || strcmp(cws->szSetting, "Status") != 0) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int status=0;
switch (cws->value.type){
case DBVT_WORD:
diff --git a/plugins/MirOTR/MirOTR/src/dialogs.cpp b/plugins/MirOTR/MirOTR/src/dialogs.cpp index b248ec0102..feb94572be 100644 --- a/plugins/MirOTR/MirOTR/src/dialogs.cpp +++ b/plugins/MirOTR/MirOTR/src/dialogs.cpp @@ -33,8 +33,8 @@ INT_PTR CALLBACK DlgSMPUpdateProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM smp_for_contact[context->app_data].responder = data->responder;
mir_free(data);
- TCHAR title[512], *proto = mir_a2t(contact_get_proto((HCONTACT)context->app_data));
- const TCHAR *name =contact_get_nameT((HCONTACT)context->app_data);
+ TCHAR title[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
+ const TCHAR *name =contact_get_nameT((MCONTACT)context->app_data);
mir_sntprintf(title, 512, TranslateT(LANG_SMP_PROGRESS_TITLE), name, proto);
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
mir_sntprintf(title, 512, TranslateT(LANG_SMP_PROGRESS_DESC), name, proto);
@@ -168,15 +168,15 @@ INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA smp_for_contact[context->app_data].oldlevel = data->oldlevel;
smp_for_contact[context->app_data].responder = data->responder;
- TCHAR buff[512], *proto = mir_a2t(contact_get_proto((HCONTACT)context->app_data));
- mir_sntprintf(buff, 512, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((HCONTACT)context->app_data), proto);
+ TCHAR buff[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((MCONTACT)context->app_data), proto);
mir_free(proto);
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)buff);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, buff);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)context);
if (data->question) {
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_RESPOND_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_RESPOND_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -195,7 +195,7 @@ INT_PTR CALLBACK DlgSMPResponseProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA mir_free(data->question);
} else {
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_RESPOND_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_RESPOND_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -315,8 +315,8 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA return FALSE;
}
- TCHAR title[512], *proto = mir_a2t(contact_get_proto((HCONTACT)context->app_data));
- mir_sntprintf(title, 512, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((HCONTACT)context->app_data), proto);
+ TCHAR title[512], *proto = mir_a2t(contact_get_proto((MCONTACT)context->app_data));
+ mir_sntprintf(title, 512, TranslateT(LANG_SMP_VERIFY_TITLE), contact_get_nameT((MCONTACT)context->app_data), proto);
mir_free(proto);
SendMessage(hwndDlg, WM_SETTEXT, 0, (LPARAM)title);
SetDlgItemText(hwndDlg, IDC_STC_SMP_HEAD, title);
@@ -370,9 +370,9 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
TCHAR buff[1024];
if (!fp->trust || fp->trust[0] == '\0')
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT((MCONTACT)context->app_data));
else
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -408,7 +408,7 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA if (_tcsncmp(msg, TranslateT(LANG_SMPTYPE_QUESTION), 255)==0) {
if (smp_for_contact.find(context->app_data) != smp_for_contact.end()) {
TCHAR msg[512];
- mir_sntprintf(msg, 512, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(msg, 512, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT((MCONTACT)context->app_data));
ShowError(msg);
}else {
int len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD1, WM_GETTEXTLENGTH, 0, 0);
@@ -432,7 +432,7 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }else if (_tcsncmp(msg, TranslateT(LANG_SMPTYPE_PASSWORD), 255)==0) {
if (smp_for_contact.find(context->app_data) != smp_for_contact.end()) {
TCHAR msg[512];
- mir_sntprintf(msg, 512, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(msg, 512, TranslateT(LANG_SMP_IN_PROGRESS), contact_get_nameT((MCONTACT)context->app_data));
ShowError(msg);
}else {
int len = SendDlgItemMessage(hwndDlg, IDC_EDT_SMP_FIELD2, WM_GETTEXTLENGTH, 0, 0);
@@ -477,9 +477,9 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA GetDlgItemText(hwndDlg, IDC_CBO_SMP_CHOOSE, buff, 255);
if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_QUESTION), 255)==0) {
if (trusted)
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFIED_DESC), contact_get_nameT((MCONTACT)context->app_data));
else
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPQUESTION_VERIFY_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -497,9 +497,9 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ShowWindow(GetDlgItem(hwndDlg, IDNO), SW_HIDE);
} else if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_PASSWORD), 255)==0) {
if (trusted)
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_VERIFIED_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_VERIFIED_DESC), contact_get_nameT((MCONTACT)context->app_data));
else
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_VERIFY_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_SMPPASSWORD_VERIFY_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -517,9 +517,9 @@ INT_PTR CALLBACK DlgProcSMPInitProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA ShowWindow(GetDlgItem(hwndDlg, IDNO), SW_HIDE);
} else if (_tcsncmp(buff, TranslateT(LANG_SMPTYPE_FINGERPRINT), 255)==0) {
if (trusted)
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT((MCONTACT)context->app_data));
else
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -662,9 +662,9 @@ INT_PTR CALLBACK DlgProcVerifyContext(HWND hwndDlg, UINT msg, WPARAM wParam, LPA }
TCHAR buff[512];
if (!fp->trust || fp->trust[0] == '\0')
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFY_DESC), contact_get_nameT((MCONTACT)context->app_data));
else
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_FPVERIFIED_DESC), contact_get_nameT((MCONTACT)context->app_data));
SetDlgItemText(hwndDlg, IDC_STC_SMP_INFO, buff);
@@ -729,20 +729,20 @@ unsigned int CALLBACK verify_context_thread(void *param) otrl_context_set_trust(context->active_fingerprint, "verified");
otrl_privkey_write_fingerprints(otr_user_state, g_fingerprint_store_filename);
lib_cs_unlock();
- mir_sntprintf(msg, 1024, TranslateT(LANG_FINGERPRINT_VERIFIED), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(msg, 1024, TranslateT(LANG_FINGERPRINT_VERIFIED), contact_get_nameT((MCONTACT)context->app_data));
msg[1023] = '\0';
- ShowMessage((HCONTACT)context->app_data, msg);
- SetEncryptionStatus((HCONTACT)context->app_data, otr_context_get_trust(context));
+ ShowMessage((MCONTACT)context->app_data, msg);
+ SetEncryptionStatus((MCONTACT)context->app_data, otr_context_get_trust(context));
break;
case IDNO:
lib_cs_lock();
otrl_context_set_trust(context->active_fingerprint, NULL);
otrl_privkey_write_fingerprints(otr_user_state, g_fingerprint_store_filename);
lib_cs_unlock();
- mir_sntprintf(msg, 1024, TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(msg, 1024, TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT((MCONTACT)context->app_data));
msg[1023] = '\0';
- ShowMessage((HCONTACT)context->app_data, msg);
- SetEncryptionStatus((HCONTACT)context->app_data, otr_context_get_trust(context));
+ ShowMessage((MCONTACT)context->app_data, msg);
+ SetEncryptionStatus((MCONTACT)context->app_data, otr_context_get_trust(context));
break;
}
}
diff --git a/plugins/MirOTR/MirOTR/src/dllmain.cpp b/plugins/MirOTR/MirOTR/src/dllmain.cpp index 1c275c4e92..22973c7676 100644 --- a/plugins/MirOTR/MirOTR/src/dllmain.cpp +++ b/plugins/MirOTR/MirOTR/src/dllmain.cpp @@ -88,7 +88,7 @@ extern "C" __declspec(dllexport) int Load(void) // remove us as a filter to all contacts - fix filter type problem
if(db_get_b(0, MODULENAME, "FilterOrderFix", 0) != 2) {
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
CallService(MS_PROTO_REMOVEFROMCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME);
db_set_b(0, MODULENAME, "FilterOrderFix", 2);
}
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp index 78fd4bf165..35ecb94435 100644 --- a/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.cpp @@ -49,7 +49,7 @@ static INT_PTR AddMirOTRMenuItem(WPARAM, LPARAM lParam) static INT_PTR BuildMirOTRMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ListParam param = { 0 };
param.MenuObjectHandle = hMirOTRMenuObject;
@@ -87,8 +87,8 @@ INT_PTR MirOTRMenuCheckService(WPARAM wParam,LPARAM) if ( cmep == NULL ) //this is rootsection...build it
return TRUE;
- HCONTACT hContact = (HCONTACT)pcpp->wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ MCONTACT hContact = (MCONTACT)pcpp->wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
TrustLevel level = ( TrustLevel )otr_context_get_trust(otrl_context_find_miranda(otr_user_state, hContact));
@@ -178,7 +178,7 @@ LRESULT CALLBACK PopupMenuWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM return DefWindowProc(hwnd, message, wParam, lParam);
}
-void ShowOTRMenu(HCONTACT hContact, POINT pt){
+void ShowOTRMenu(MCONTACT hContact, POINT pt){
HMENU menu = (HMENU) CallService(MS_MIROTR_MENUBUILDMIROTR, (WPARAM)hContact, 0);
SetWindowLongPtr(hDummyPaintWin, GWLP_USERDATA, (LONG_PTR)hContact);
TrackPopupMenu(menu, 0, pt.x, pt.y, 0, hDummyPaintWin, 0);
diff --git a/plugins/MirOTR/MirOTR/src/mirotrmenu.h b/plugins/MirOTR/MirOTR/src/mirotrmenu.h index c92adab7fb..e57e954745 100644 --- a/plugins/MirOTR/MirOTR/src/mirotrmenu.h +++ b/plugins/MirOTR/MirOTR/src/mirotrmenu.h @@ -42,4 +42,4 @@ typedef struct { void InitMirOTRMenu(void);
void UninitMirOTRMenu(void);
-void ShowOTRMenu(HCONTACT hContact, POINT pt);
+void ShowOTRMenu(MCONTACT hContact, POINT pt);
diff --git a/plugins/MirOTR/MirOTR/src/options.cpp b/plugins/MirOTR/MirOTR/src/options.cpp index a3645f52c7..f090d9b474 100644 --- a/plugins/MirOTR/MirOTR/src/options.cpp +++ b/plugins/MirOTR/MirOTR/src/options.cpp @@ -158,7 +158,7 @@ void SaveOptions() { extern "C" void set_context_contact(void *data, ConnContext *context)
{
- HCONTACT hContact = find_contact(context->username, context->protocol);
+ MCONTACT hContact = find_contact(context->username, context->protocol);
context->app_data = (void*)hContact;
}
@@ -557,7 +557,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM const char *proto;
TCHAR *proto_t;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
proto = contact_get_proto(hContact);
if(proto && db_get_b(hContact, proto, "ChatRoom", 0) == 0 && CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)MODULENAME) // ignore chatrooms
&& (g_metaproto == 0 || strcmp(proto, g_metaproto) != 0)) // and MetaContacts
@@ -586,7 +586,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM switch ( LOWORD( wParam )) {
case IDC_CMB_CONT_POLICY:
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
int iUser = ListView_GetSelectionMark(GetDlgItem(hwndDlg, IDC_LV_CONT_CONTACTS));
if (iUser == -1) break;
int sel = SendDlgItemMessage(hwndDlg, IDC_CMB_CONT_POLICY, CB_GETCURSEL, 0, 0);
@@ -604,7 +604,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM lvi.iSubItem = 0;
ListView_GetItem(GetDlgItem(hwndDlg, IDC_LV_CONT_CONTACTS), &lvi);
ContactPolicyMap* cpm = (ContactPolicyMap*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- hContact = (HCONTACT)lvi.lParam;
+ hContact = (MCONTACT)lvi.lParam;
(*cpm)[hContact].policy = policy;
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
}break;
@@ -650,7 +650,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsContacts(HWND hwndDlg, UINT msg, WPARAM lvi.iSubItem = 0;
SendDlgItemMessage(hwndDlg, IDC_LV_CONT_CONTACTS, LVM_GETITEM, 0, (LPARAM)&lvi);
- HCONTACT hContact = (HCONTACT)lvi.lParam;
+ MCONTACT hContact = (MCONTACT)lvi.lParam;
ContactPolicyMap *cp = (ContactPolicyMap *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
TCHAR buff[50];
ListView_GetItemText(((LPNMHDR)lParam)->hwndFrom, lvi.iItem, 3, buff, 50);
@@ -743,7 +743,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w Fingerprint *fp;
while (context) {
if (context->app_data) {
- user = (TCHAR*)contact_get_nameT((HCONTACT)context->app_data);
+ user = (TCHAR*)contact_get_nameT((MCONTACT)context->app_data);
if (user) {
proto = mir_a2t(context->protocol);
fp = context->fingerprint_root.next;
@@ -819,7 +819,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w if (fp->context->active_fingerprint == fp) {
TCHAR buff[1024], hash[45];
otrl_privkey_hash_to_humanT(hash, fp->fingerprint);
- mir_sntprintf(buff, 1024, TranslateT(LANG_FINGERPRINT_STILL_IN_USE), hash, contact_get_nameT((HCONTACT)fp->context->app_data));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_FINGERPRINT_STILL_IN_USE), hash, contact_get_nameT((MCONTACT)fp->context->app_data));
ShowError(buff);
} else {
FPModifyMap* fpm = (FPModifyMap*) GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -848,7 +848,7 @@ static INT_PTR CALLBACK DlgProcMirOTROptsFinger(HWND hwndDlg, UINT msg, WPARAM w if (it->first->context->active_fingerprint == it->first) {
TCHAR buff[1024], hash[45];
otrl_privkey_hash_to_humanT(hash, it->first->fingerprint);
- mir_sntprintf(buff, 1024, TranslateT(LANG_FINGERPRINT_NOT_DELETED), hash, contact_get_nameT((HCONTACT)it->first->context->app_data));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_FINGERPRINT_NOT_DELETED), hash, contact_get_nameT((MCONTACT)it->first->context->app_data));
ShowError(buff);
} else {
otrl_context_forget_fingerprint(it->first, 1);
diff --git a/plugins/MirOTR/MirOTR/src/options.h b/plugins/MirOTR/MirOTR/src/options.h index a2c39a5e93..ee74c7b9cc 100644 --- a/plugins/MirOTR/MirOTR/src/options.h +++ b/plugins/MirOTR/MirOTR/src/options.h @@ -51,7 +51,7 @@ struct CONTACT_DATA { OtrlPolicy policy;
int htmlconv;
};
-typedef std::map<HCONTACT, CONTACT_DATA> ContactPolicyMap;
+typedef std::map<MCONTACT, CONTACT_DATA> ContactPolicyMap;
typedef enum {FPM_VERIFY, FPM_NOTRUST, FPM_DELETE } FPModify;
typedef std::map<Fingerprint*, FPModify> FPModifyMap;
diff --git a/plugins/MirOTR/MirOTR/src/otr.cpp b/plugins/MirOTR/MirOTR/src/otr.cpp index dfc22f5e70..04c7446636 100644 --- a/plugins/MirOTR/MirOTR/src/otr.cpp +++ b/plugins/MirOTR/MirOTR/src/otr.cpp @@ -76,7 +76,7 @@ extern "C" { /* Return the OTR policy for the given context. */
OtrlPolicy otr_gui_policy(void *opdata, ConnContext *context) {
DEBUGOUT_T("OTR_GUI_POLICY")
- HCONTACT hContact = (HCONTACT)opdata;
+ MCONTACT hContact = (MCONTACT)opdata;
DWORD pol;
if(hContact) {
pol = db_get_dw(hContact, MODULENAME, "Policy", CONTACT_DEFAULT_POLICY);
@@ -110,7 +110,7 @@ extern "C" { //DWORD tid;
//CloseHandle(CreateThread(0, 0, newKeyThread, (VOID *)nkd, 0, &tid));
//QueueUserAPC(newKeyAPC, Global::mainThread, (DWORD)nkd);
- if (opdata) protocol = contact_get_proto((HCONTACT)opdata);
+ if (opdata) protocol = contact_get_proto((MCONTACT)opdata);
if (!protocol) return;
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_GENKEYNOTIFY), 0, GenKeyDlgFunc, (LPARAM)protocol );
@@ -124,7 +124,7 @@ extern "C" { * logged in" errors if you're wrong. */
int otr_gui_is_logged_in(void *opdata, const char *accountname, const char *protocol, const char *recipient) {
DEBUGOUT_T("OTR_GUI_IS_LOGGED_IN")
- HCONTACT hContact = (HCONTACT)opdata;
+ MCONTACT hContact = (MCONTACT)opdata;
if(hContact) {
WORD status = db_get_w(hContact, contact_get_proto(hContact), "Status", ID_STATUS_OFFLINE);
if(status == ID_STATUS_OFFLINE) return 0;
@@ -139,7 +139,7 @@ extern "C" { void otr_gui_inject_message(void *opdata, const char *accountname, const char *protocol, const char *recipient, const char *message) {
DEBUGOUT_T("OTR_GUI_INJECT_MESSAGE")
//MessageBox(0, message, "OTR Inject", MB_OK);
- HCONTACT hContact = (HCONTACT)opdata;
+ MCONTACT hContact = (MCONTACT)opdata;
if(protocol && db_get_w(hContact, protocol, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
CallContactService(hContact, PSS_MESSAGE, PREF_UTF|PREF_BYPASS_OTR, (LPARAM)message);
@@ -149,7 +149,7 @@ extern "C" { * protocol / username conversation. */
void otr_gui_notify(void *opdata, OtrlNotifyLevel level, const char *accountname, const char *protocol, const char *username, const char *title, const char *primary, const char *secondary) {
DEBUGOUT_T("OTR_GUI_NOTIFY")
- const TCHAR* uname = contact_get_nameT((HCONTACT)opdata);
+ const TCHAR* uname = contact_get_nameT((MCONTACT)opdata);
TCHAR* title_t = mir_utf8decodeT(title);
TCHAR *notify = TranslateT(LANG_OTR_NOTIFY);
@@ -180,11 +180,11 @@ extern "C" { int otr_gui_display_otr_message(void *opdata, const char *accountname, const char *protocol, const char *username, const char *msg) {
DEBUGOUT_T("OTR_GUI_DISPLAY_OTR_MESSAGE")
if(options.msg_inline)
- ShowMessageInlineUtf((HCONTACT)opdata, Translate(msg));
+ ShowMessageInlineUtf((MCONTACT)opdata, Translate(msg));
if(options.msg_popup) {
TCHAR buff[512];
TCHAR* proto = mir_a2t(protocol);
- mir_sntprintf(buff, 512, TranslateT(LANG_OTR_USERMESSAGE), contact_get_nameT((HCONTACT)opdata), proto);
+ mir_sntprintf(buff, 512, TranslateT(LANG_OTR_USERMESSAGE), contact_get_nameT((MCONTACT)opdata), proto);
mir_free(proto);
TCHAR *msg_t = mir_utf8decodeT(msg);
ShowPopup(buff, TranslateTS(msg_t), 0);
@@ -237,18 +237,18 @@ extern "C" { DEBUGOUT_T("OTR_GUI_GONE_SECURE")
TrustLevel trusted = otr_context_get_trust(context);
// opdata is hContact
- SetEncryptionStatus((HCONTACT)opdata, trusted);
+ SetEncryptionStatus((MCONTACT)opdata, trusted);
TCHAR buff[1024];
if(trusted == TRUST_PRIVATE) {
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_START_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_START_OTR), contact_get_nameT((MCONTACT)opdata));
} else if (trusted == TRUST_UNVERIFIED) {
if (options.autoshow_verify) SMPInitDialog(context); //VerifyContextDialog(context);
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_START_OTR_VERIFY), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_START_OTR_VERIFY), contact_get_nameT((MCONTACT)opdata));
} else { // should never happen
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((MCONTACT)opdata));
}
// opdata is hContact
- ShowMessage((HCONTACT)opdata, buff);
+ ShowMessage((MCONTACT)opdata, buff);
}
@@ -256,14 +256,14 @@ extern "C" { void otr_gui_gone_insecure(void *opdata, ConnContext *context) {
DEBUGOUT_T("OTR_GUI_GONE_INSECURE")
TCHAR buff[512];
- mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_TERMINATED_BY_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 512, TranslateT(LANG_SESSION_TERMINATED_BY_OTR), contact_get_nameT((MCONTACT)opdata));
//MessageBox(0, buff, Translate("OTR Information"), MB_OK);
if (!Miranda_Terminated()) {
- ShowMessage((HCONTACT)opdata, buff);
+ ShowMessage((MCONTACT)opdata, buff);
}
// opdata is hContact
- SetEncryptionStatus((HCONTACT)opdata, otr_context_get_trust(context));
+ SetEncryptionStatus((MCONTACT)opdata, otr_context_get_trust(context));
}
/* We have completed an authentication, using the D-H keys we
@@ -271,36 +271,36 @@ extern "C" { void otr_gui_still_secure(void *opdata, ConnContext *context, int is_reply) {
DEBUGOUT_T("OTR_GUI_STILL_SECURE")
TrustLevel trusted = otr_context_get_trust(context);
- SetEncryptionStatus((HCONTACT)opdata, trusted);
+ SetEncryptionStatus((MCONTACT)opdata, trusted);
TCHAR buff[1024];
if (!is_reply) {
if(trusted == TRUST_PRIVATE) {
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_CONTINUE_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_CONTINUE_OTR), contact_get_nameT((MCONTACT)opdata));
} else if (trusted == TRUST_UNVERIFIED) {
if (options.autoshow_verify) SMPInitDialog(context); //VerifyContextDialog(context);
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_CONTINUE_OTR_VERIFY), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_CONTINUE_OTR_VERIFY), contact_get_nameT((MCONTACT)opdata));
} else { // should never happen
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((MCONTACT)opdata));
}
// opdata is hContact
- ShowMessage((HCONTACT)opdata, buff);
+ ShowMessage((MCONTACT)opdata, buff);
} else {
if(trusted == TRUST_PRIVATE) {
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_HAS_CONTINUE_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_HAS_CONTINUE_OTR), contact_get_nameT((MCONTACT)opdata));
} else if (trusted == TRUST_UNVERIFIED) {
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_HAS_CONTINUE_OTR_VERIFY), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_HAS_CONTINUE_OTR_VERIFY), contact_get_nameT((MCONTACT)opdata));
} else { // should never happen
- mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((HCONTACT)opdata));
+ mir_sntprintf(buff, 1024, TranslateT(LANG_SESSION_NOT_STARTED_OTR), contact_get_nameT((MCONTACT)opdata));
}
}
- SetEncryptionStatus((HCONTACT)opdata, trusted);
+ SetEncryptionStatus((MCONTACT)opdata, trusted);
}
/* Log a message. The passed message will end in "\n". */
void otr_gui_log_message(void *opdata, const char *message) {
//MessageBox(0, message, Translate("OTR Log Message"), MB_OK);
- //ShowMessageInline((HCONTACT)opdata, message);
+ //ShowMessageInline((MCONTACT)opdata, message);
#ifdef _DEBUG
char* msg = strcpy((char*)mir_alloc(strlen(message)+15), "OTR message: ");
strcat(msg, message);
@@ -314,7 +314,7 @@ extern "C" { if (context && context->protocol)
proto = context->protocol;
else
- proto = contact_get_proto((HCONTACT)opdata);
+ proto = contact_get_proto((MCONTACT)opdata);
// ugly wokaround for ICQ. ICQ protocol reports more than 7k, but in SMP this is too long.
// possibly ICQ doesn't allow single words without spaces to become longer than ~2340?
if (strcmp("ICQ", proto)==0 || strncmp("ICQ_", proto, 4)==0)
diff --git a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp index d764a9664b..12fbb966dc 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_menu.cpp @@ -5,7 +5,7 @@ static HGENMENU hStopItem, hStartItem; ////////////////////////////////
///////// Menu Services ////////
///////////////////////////////
-int StartOTR(HCONTACT hContact) {
+int StartOTR(MCONTACT hContact) {
const char *proto = contact_get_proto(hContact);
if (!proto) return 1; // error
@@ -24,8 +24,8 @@ int StartOTR(HCONTACT hContact) { }
INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
+ MCONTACT hContact = (MCONTACT)wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
hContact = hSub;
}
@@ -47,8 +47,8 @@ INT_PTR SVC_StartOTR(WPARAM wParam, LPARAM lParam) { }
INT_PTR SVC_RefreshOTR(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
+ MCONTACT hContact = (MCONTACT)wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0) {
hContact = hSub;
}
@@ -69,10 +69,10 @@ INT_PTR SVC_RefreshOTR(WPARAM wParam, LPARAM lParam) { return 0;
}
-int otr_disconnect_contact(HCONTACT hContact)
+int otr_disconnect_contact(MCONTACT hContact)
{
- HCONTACT hSub;
- if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ MCONTACT hSub;
+ if(ServiceExists(MS_MC_GETMOSTONLINECONTACT) && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
const char *proto = contact_get_proto(hContact);
@@ -89,7 +89,7 @@ int otr_disconnect_contact(HCONTACT hContact) INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// prevent this filter from acting on injeceted messages for metas, when they are passed though the subcontact's proto send chain
if (otr_disconnect_contact(hContact)) return 0;
@@ -104,11 +104,11 @@ INT_PTR SVC_StopOTR(WPARAM wParam, LPARAM lParam) }
INT_PTR SVC_VerifyOTR(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam, hSub;
- if(options.bHaveMetaContacts && (hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
+ MCONTACT hContact = (MCONTACT)wParam, hSub;
+ if(options.bHaveMetaContacts && (hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0)) != 0)
hContact = hSub;
- ConnContext *context = otrl_context_find_miranda(otr_user_state, (HCONTACT)wParam);
+ ConnContext *context = otrl_context_find_miranda(otr_user_state, (MCONTACT)wParam);
if (!context) return 1;
//VerifyContextDialog(context);
SMPInitDialog(context);
@@ -116,7 +116,7 @@ INT_PTR SVC_VerifyOTR(WPARAM wParam, LPARAM lParam) { }
INT_PTR SVC_ToggleHTMLOTR(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (db_get_b(hContact, MODULENAME, "HTMLConv", 0))
db_set_b(hContact, MODULENAME, "HTMLConv", 0);
else
@@ -154,7 +154,7 @@ void InitMenu() int SVC_PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_TCHAR;
@@ -171,7 +171,7 @@ hide_all: if(proto && g_metaproto && strcmp(proto, g_metaproto) == 0) {
// make menu act as per most online subcontact
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hContact)
goto hide_all;
proto = contact_get_proto(hContact);
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp index 6c8f36e85e..bebbe8ddbc 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.cpp @@ -5,7 +5,7 @@ BBButton OTRButton; int SVC_IconPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if(sicd->cbSize < (int)sizeof(StatusIconClickData))
return 0;
@@ -21,7 +21,7 @@ int SVC_IconPressed(WPARAM wParam, LPARAM lParam) }
// set SRMM icon status, if applicable
-void SetEncryptionStatus(HCONTACT hContact, TrustLevel level)
+void SetEncryptionStatus(MCONTACT hContact, TrustLevel level)
{
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0));
@@ -71,8 +71,8 @@ void SetEncryptionStatus(HCONTACT hContact, TrustLevel level) db_set_dw(hContact, MODULENAME, "TrustLevel", level);
if (!chat_room && options.bHaveMetaContacts) {
- HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
- HCONTACT hMostOnline = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0);
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT hMostOnline = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMeta, 0);
if(hMeta && hContact == hMostOnline)
SetEncryptionStatus(hMeta, level);
else if(hMeta) {
@@ -95,7 +95,7 @@ int SVC_ButtonsBarPressed(WPARAM w, LPARAM l) {
CustomButtonClickData* cbcd = (CustomButtonClickData *)l;
if (cbcd->cbSize == (int)sizeof(CustomButtonClickData) && cbcd->dwButtonId == 0 && strcmp(cbcd->pszModule, MODULENAME)==0) {
- HCONTACT hContact = (HCONTACT)w;
+ MCONTACT hContact = (MCONTACT)w;
char *proto = GetContactProto(hContact);
if(proto && db_get_b(hContact, proto, "ChatRoom", 0))
diff --git a/plugins/MirOTR/MirOTR/src/svcs_srmm.h b/plugins/MirOTR/MirOTR/src/svcs_srmm.h index 7c8842edc3..dc3bbc9672 100644 --- a/plugins/MirOTR/MirOTR/src/svcs_srmm.h +++ b/plugins/MirOTR/MirOTR/src/svcs_srmm.h @@ -2,6 +2,6 @@ int WindowEvent(WPARAM wParam, LPARAM lParam);
int SVC_IconPressed(WPARAM wParam, LPARAM lParam);
-void SetEncryptionStatus(HCONTACT hContact, TrustLevel level);
+void SetEncryptionStatus(MCONTACT hContact, TrustLevel level);
void InitSRMM();
void DeinitSRMM();
\ No newline at end of file diff --git a/plugins/MirOTR/MirOTR/src/utils.cpp b/plugins/MirOTR/MirOTR/src/utils.cpp index 424f4d8886..6ed4c351f9 100644 --- a/plugins/MirOTR/MirOTR/src/utils.cpp +++ b/plugins/MirOTR/MirOTR/src/utils.cpp @@ -22,9 +22,9 @@ void lib_cs_unlock() LeaveCriticalSection(&lib_cs);
}
-HCONTACT find_contact(const char* userid, const char* protocol)
+MCONTACT find_contact(const char* userid, const char* protocol)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
const char *proto = contact_get_proto(hContact);
if(proto && strcmp(proto, protocol) == 0) {
char *name = contact_get_id(hContact);
@@ -44,7 +44,7 @@ HCONTACT find_contact(const char* userid, const char* protocol) * context if one does not currently exist. In that event, call
* add_app_data(data, context) so that app_data and app_data_free can be
* filled in by the application, and set *addedp to 1. */
-ConnContext * otrl_context_find_miranda(OtrlUserState us, HCONTACT hContact)
+ConnContext * otrl_context_find_miranda(OtrlUserState us, MCONTACT hContact)
{
ConnContext ** curp;
if (!hContact) return NULL;
@@ -85,10 +85,10 @@ void VerifyFingerprint(ConnContext *context, bool verify) { void VerifyFingerprintMessage(ConnContext *context, bool verify) {
TCHAR msg[1024];
- mir_sntprintf(msg, 1024, (verify)?TranslateT(LANG_FINGERPRINT_VERIFIED):TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT((HCONTACT)context->app_data));
+ mir_sntprintf(msg, 1024, (verify)?TranslateT(LANG_FINGERPRINT_VERIFIED):TranslateT(LANG_FINGERPRINT_NOT_VERIFIED), contact_get_nameT((MCONTACT)context->app_data));
msg[1023] = '\0';
- ShowMessage((HCONTACT)context->app_data, msg);
- SetEncryptionStatus((HCONTACT)context->app_data, otr_context_get_trust(context));
+ ShowMessage((MCONTACT)context->app_data, msg);
+ SetEncryptionStatus((MCONTACT)context->app_data, otr_context_get_trust(context));
}
/* Convert a 20-byte hash value to a 45-byte human-readable value */
@@ -109,7 +109,7 @@ void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20]) *p = '\0';
}
-char* contact_get_id(HCONTACT hContact, bool bNameOnError) {
+char* contact_get_id(MCONTACT hContact, bool bNameOnError) {
char* pszUniqueID = NULL;
CONTACTINFO ci;
ZeroMemory(&ci, sizeof(ci));
@@ -142,21 +142,21 @@ char* contact_get_id(HCONTACT hContact, bool bNameOnError) { return pszUniqueID;
}
-__inline const TCHAR* contact_get_nameT(HCONTACT hContact) {
+__inline const TCHAR* contact_get_nameT(MCONTACT hContact) {
return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
}
-__inline const char* contact_get_proto(HCONTACT hContact) {
+__inline const char* contact_get_proto(MCONTACT hContact) {
char *uproto = GetContactProto(hContact);
return uproto;
}
-__inline const char* contact_get_account(HCONTACT hContact) {
+__inline const char* contact_get_account(MCONTACT hContact) {
char *uacc = (char *)CallService(MS_PROTO_GETCONTACTBASEACCOUNT, (WPARAM)hContact, 0);
return uacc;
}
-void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const HCONTACT hContact) {
+void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact) {
if(CallService(MS_SYSTEM_TERMINATED, 0, 0)) return;
if ( !options.bHavePopups) {
@@ -298,7 +298,7 @@ void ShowError(TCHAR *msg) { }
-void ShowPopupUtf(const char* line1, const char* line2, int timeout, const HCONTACT hContact) {
+void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact) {
TCHAR* l1 = (line1) ? mir_utf8decodeT(line1) : NULL;
TCHAR* l2 = (line2) ? mir_utf8decodeT(line2) : NULL;
ShowPopup(l1, l2, timeout, hContact);
@@ -317,7 +317,7 @@ void ShowErrorUtf(char* msg) { if (m) mir_free(m);
}
-void ShowMessageInline(const HCONTACT hContact, const TCHAR *msg) {
+void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg) {
TCHAR buff[1024];
mir_sntprintf(buff, 1024, _T("%s%s"), TranslateT(LANG_INLINE_PREFIX), msg);
@@ -331,7 +331,7 @@ void ShowMessageInline(const HCONTACT hContact, const TCHAR *msg) { mir_free(utf);
}
-void ShowMessageInlineUtf(const HCONTACT hContact, const char *msg) {
+void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg) {
char buff[1024];
mir_snprintf(buff, 1024, "%s%s", Translate(LANG_INLINE_PREFIX), msg);
@@ -342,14 +342,14 @@ void ShowMessageInlineUtf(const HCONTACT hContact, const char *msg) { ProtoChainRecvMsg(hContact, &pre);
}
-void ShowMessageUtf(const HCONTACT hContact, const char *msg) {
+void ShowMessageUtf(const MCONTACT hContact, const char *msg) {
if(options.msg_inline)
ShowMessageInlineUtf(hContact, msg);
if(options.msg_popup)
ShowPopupUtf(Translate(LANG_OTR_INFO), msg, 0, hContact);
}
-void ShowMessage(const HCONTACT hContact, const TCHAR *msg) {
+void ShowMessage(const MCONTACT hContact, const TCHAR *msg) {
if(options.msg_inline)
ShowMessageInline(hContact, msg);
if(options.msg_popup)
@@ -358,7 +358,7 @@ void ShowMessage(const HCONTACT hContact, const TCHAR *msg) { /*
-bool GetEncryptionStatus(HCONTACT hContact) {
+bool GetEncryptionStatus(MCONTACT hContact) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0));
diff --git a/plugins/MirOTR/MirOTR/src/utils.h b/plugins/MirOTR/MirOTR/src/utils.h index 1e2a05c9f3..a174e9828e 100644 --- a/plugins/MirOTR/MirOTR/src/utils.h +++ b/plugins/MirOTR/MirOTR/src/utils.h @@ -7,8 +7,8 @@ void lib_cs_lock();
void lib_cs_unlock();
-HCONTACT find_contact(const char* userid, const char* protocol);
-ConnContext * otrl_context_find_miranda(OtrlUserState us, HCONTACT hContact);
+MCONTACT find_contact(const char* userid, const char* protocol);
+ConnContext * otrl_context_find_miranda(OtrlUserState us, MCONTACT hContact);
typedef enum {
TRUST_NOT_PRIVATE,
@@ -22,23 +22,23 @@ void VerifyFingerprintMessage(ConnContext *context, bool verify); void otrl_privkey_hash_to_humanT(TCHAR human[45], const unsigned char hash[20]);
-char* contact_get_id(HCONTACT hContact, bool bNameOnError=true);
-__inline const char* contact_get_proto(HCONTACT hContact);
-__inline const char* contact_get_account(HCONTACT hContact);
-extern __inline const TCHAR* contact_get_nameT(HCONTACT hContact);
+char* contact_get_id(MCONTACT hContact, bool bNameOnError=true);
+__inline const char* contact_get_proto(MCONTACT hContact);
+__inline const char* contact_get_account(MCONTACT hContact);
+extern __inline const TCHAR* contact_get_nameT(MCONTACT hContact);
-void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const HCONTACT hContact = NULL);
+void ShowPopup(const TCHAR* line1, const TCHAR* line2, int timeout, const MCONTACT hContact = NULL);
void ShowWarning(TCHAR* msg);
void ShowError(TCHAR* msg);
-void ShowPopupUtf(const char* line1, const char* line2, int timeout, const HCONTACT hContact = NULL);
+void ShowPopupUtf(const char* line1, const char* line2, int timeout, const MCONTACT hContact = NULL);
void ShowWarningUtf(char* msg);
void ShowErrorUtf(char* msg);
-void ShowMessageInline(const HCONTACT hContact, const TCHAR *msg);
-void ShowMessageInlineUtf(const HCONTACT hContact, const char *msg);
+void ShowMessageInline(const MCONTACT hContact, const TCHAR *msg);
+void ShowMessageInlineUtf(const MCONTACT hContact, const char *msg);
-void ShowMessage(const HCONTACT hContact, const TCHAR *msg);
-void ShowMessageUtf(const HCONTACT hContact, const char *msg);
+void ShowMessage(const MCONTACT hContact, const TCHAR *msg);
+void ShowMessageUtf(const MCONTACT hContact, const char *msg);
void InitUtils();
void DeinitUtils();
diff --git a/plugins/MirandaG15/src/CAppletManager.cpp b/plugins/MirandaG15/src/CAppletManager.cpp index 17399ad465..1da2a47d0c 100644 --- a/plugins/MirandaG15/src/CAppletManager.cpp +++ b/plugins/MirandaG15/src/CAppletManager.cpp @@ -445,7 +445,7 @@ void CAppletManager::ActivateCListScreen() //************************************************************************
// activates the chat screen
//************************************************************************
-bool CAppletManager::ActivateChatScreen(HCONTACT hContact)
+bool CAppletManager::ActivateChatScreen(MCONTACT hContact)
{
if(!m_ChatScreen.SetContact(hContact))
return false;
@@ -461,7 +461,7 @@ bool CAppletManager::ActivateChatScreen(HCONTACT hContact) //************************************************************************
// returns the contacts displayname
//************************************************************************
-tstring CAppletManager::GetContactDisplayname(HCONTACT hContact,bool bShortened)
+tstring CAppletManager::GetContactDisplayname(MCONTACT hContact,bool bShortened)
{
if(!bShortened || !CConfig::GetBoolSetting(NOTIFY_NICKCUTOFF))
return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
@@ -476,7 +476,7 @@ tstring CAppletManager::GetContactDisplayname(HCONTACT hContact,bool bShortened) //************************************************************************
// returns the contacts group
//************************************************************************
-tstring CAppletManager::GetContactGroup(HCONTACT hContact)
+tstring CAppletManager::GetContactGroup(MCONTACT hContact)
{
DBVARIANT dbv;
int res = db_get_ts(hContact, "CList", "Group", &dbv);
@@ -649,7 +649,7 @@ void CAppletManager::HandleEvent(CEvent *pEvent) }
}
-bool CAppletManager::IsUtfSendAvailable(HCONTACT hContact) {
+bool CAppletManager::IsUtfSendAvailable(MCONTACT hContact) {
char* szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if ( szProto == NULL )
return FALSE;
@@ -660,7 +660,7 @@ bool CAppletManager::IsUtfSendAvailable(HCONTACT hContact) { //************************************************************************
// returns the contacts message service name
//************************************************************************
-char *CAppletManager::GetMessageServiceName(HCONTACT hContact,bool bIsUnicode)
+char *CAppletManager::GetMessageServiceName(MCONTACT hContact,bool bIsUnicode)
{
char szServiceName[100];
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
@@ -785,7 +785,7 @@ void CAppletManager::CancelMessageJob(SMessageJob *pJob) //************************************************************************
// returns wether or not a contact is a subcontact
//************************************************************************
-bool CAppletManager::IsSubContact(HCONTACT hContact)
+bool CAppletManager::IsSubContact(MCONTACT hContact)
{
if(!db_get_b(0, "MetaContacts", "Enabled", 1))
return false;
@@ -798,7 +798,7 @@ bool CAppletManager::IsSubContact(HCONTACT hContact) //************************************************************************
// sends typing notifications to the specified contact
//************************************************************************
-void CAppletManager::SendTypingNotification(HCONTACT hContact,bool bEnable)
+void CAppletManager::SendTypingNotification(MCONTACT hContact,bool bEnable)
{
DWORD protoStatus;
DWORD protoCaps;
@@ -841,7 +841,7 @@ void CAppletManager::SendTypingNotification(HCONTACT hContact,bool bEnable) //************************************************************************
// sends a message to the specified contact
//************************************************************************
-HANDLE CAppletManager::SendMessageToContact(HCONTACT hContact,tstring strMessage)
+HANDLE CAppletManager::SendMessageToContact(MCONTACT hContact,tstring strMessage)
{
tstring strAscii = _A2T(toNarrowString(strMessage).c_str());
int bufSize = lstrlen(strAscii.c_str())+1;
@@ -924,7 +924,7 @@ HANDLE CAppletManager::SendMessageToContact(HCONTACT hContact,tstring strMessage //************************************************************************
// check if a contacts message window is opened
//************************************************************************
-bool CAppletManager::IsMessageWindowOpen(HCONTACT hContact)
+bool CAppletManager::IsMessageWindowOpen(MCONTACT hContact)
{
MessageWindowInputData mwid;
mwid.cbSize = sizeof(MessageWindowInputData);
@@ -942,7 +942,7 @@ bool CAppletManager::IsMessageWindowOpen(HCONTACT hContact) //************************************************************************
// marks the given message as read
//************************************************************************
-void CAppletManager::MarkMessageAsRead(HCONTACT hContact,HANDLE hEvent)
+void CAppletManager::MarkMessageAsRead(MCONTACT hContact,HANDLE hEvent)
{
db_event_markRead(hContact, hEvent);
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM)hEvent);
@@ -953,7 +953,7 @@ void CAppletManager::MarkMessageAsRead(HCONTACT hContact,HANDLE hEvent) //************************************************************************
bool CAppletManager::TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hdbevent = (HANDLE)lParam;
@@ -1163,7 +1163,7 @@ CIRCConnection *CAppletManager::CreateIRCConnection(tstring strProtocol) //************************************************************************
// returns the history class for the specified IRC channel
//************************************************************************
-CIRCHistory *CAppletManager::GetIRCHistory(HCONTACT hContact)
+CIRCHistory *CAppletManager::GetIRCHistory(MCONTACT hContact)
{
list<CIRCHistory*>::iterator iter = m_LIRCHistorys.begin();
while(iter != m_LIRCHistorys.end())
@@ -1190,7 +1190,7 @@ CIRCHistory *CAppletManager::GetIRCHistoryByName(tstring strProtocol,tstring str //************************************************************************
// deletes the history class for the specified IRC channel
//************************************************************************
-void CAppletManager::DeleteIRCHistory(HCONTACT hContact)
+void CAppletManager::DeleteIRCHistory(MCONTACT hContact)
{
list<CIRCHistory*>::iterator iter = m_LIRCHistorys.begin();
while(iter != m_LIRCHistorys.end())
@@ -1214,7 +1214,7 @@ void CAppletManager::DeleteIRCHistory(HCONTACT hContact) //************************************************************************
// creates a history class for the specified IRC channel
//************************************************************************
-CIRCHistory *CAppletManager::CreateIRCHistory(HCONTACT hContact,tstring strChannel)
+CIRCHistory *CAppletManager::CreateIRCHistory(MCONTACT hContact,tstring strChannel)
{
char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if(!szProto)
@@ -1582,7 +1582,7 @@ int CAppletManager::HookMessageWindowEvent(WPARAM wParam, LPARAM lParam) //************************************************************************
int CAppletManager::HookContactIsTyping(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int iState = (int)lParam;
CEvent Event;
@@ -1621,7 +1621,7 @@ int CAppletManager::HookStatusChanged(WPARAM wParam, LPARAM lParam) // Prepare message and append to queue
CEvent Event;
- Event.hContact = (HCONTACT)wParam;
+ Event.hContact = (MCONTACT)wParam;
int iStatus = cws->value.wVal;
Event.iValue = iStatus;
@@ -1821,7 +1821,7 @@ int CAppletManager::HookContactAdded(WPARAM wParam, LPARAM lParam) {
CEvent Event;
Event.eType = EVENT_CONTACT_ADDED;
- Event.hContact = (HCONTACT)wParam;
+ Event.hContact = (MCONTACT)wParam;
CAppletManager::GetInstance()->HandleEvent(&Event);
return 0;
@@ -1834,7 +1834,7 @@ int CAppletManager::HookContactDeleted(WPARAM wParam, LPARAM lParam) {
CEvent Event;
Event.eType = EVENT_CONTACT_DELETED;
- Event.hContact = (HCONTACT)wParam;
+ Event.hContact = (MCONTACT)wParam;
Event.bNotification = CConfig::GetBoolSetting(NOTIFY_CONTACTS);
Event.bLog = Event.bNotification;
@@ -1854,7 +1854,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *dbcws = (DBCONTACTWRITESETTING*)lParam;
CEvent Event;
- Event.hContact = (HCONTACT)wParam;
+ Event.hContact = (MCONTACT)wParam;
if(!lstrcmpA(dbcws->szModule,"MetaContacts"))
{
@@ -1865,7 +1865,7 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) if(!lstrcmpA(dbcws->szSetting,"IsSubcontact")) {
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts((HCONTACT)wParam, "CList", "Group", &dbv);
+ int res = db_get_ts((MCONTACT)wParam, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
@@ -1910,13 +1910,13 @@ int CAppletManager::HookSettingChanged(WPARAM wParam,LPARAM lParam) if(!lstrcmpA(dbcws->szSetting,"Hidden"))
{
Event.eType = EVENT_CONTACT_HIDDEN;
- Event.iValue = db_get_b((HCONTACT)wParam,"CList","Hidden",0);
+ Event.iValue = db_get_b((MCONTACT)wParam,"CList","Hidden",0);
}
else if(!lstrcmpA(dbcws->szSetting,"Group"))
{
Event.eType = EVENT_CONTACT_GROUP;
DBVARIANT dbv;
- int res = db_get_ts((HCONTACT)wParam, "CList", "Group", &dbv);
+ int res = db_get_ts((MCONTACT)wParam, "CList", "Group", &dbv);
if(!res)
Event.strValue = dbv.ptszVal;
db_free(&dbv);
diff --git a/plugins/MirandaG15/src/CAppletManager.h b/plugins/MirandaG15/src/CAppletManager.h index f3551b41fe..b84de9bc23 100644 --- a/plugins/MirandaG15/src/CAppletManager.h +++ b/plugins/MirandaG15/src/CAppletManager.h @@ -19,7 +19,7 @@ struct SMessageJob
{
HANDLE hEvent;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwFlags;
char *pcBuffer;
int iBufferSize;
@@ -59,7 +59,7 @@ public: void ActivateCreditsScreen();
void ActivateEventScreen();
void ActivateCListScreen();
- bool ActivateChatScreen(HCONTACT hContact);
+ bool ActivateChatScreen(MCONTACT hContact);
// hook functions
static int HookMessageWindowEvent(WPARAM wParam, LPARAM lParam);
@@ -73,31 +73,31 @@ public: static int HookChatInbound(WPARAM wParam,LPARAM lParam);
// check if a contacts message window is opened
- static bool IsMessageWindowOpen(HCONTACT hContact);
+ static bool IsMessageWindowOpen(MCONTACT hContact);
// marks the given event as read
- static void MarkMessageAsRead(HCONTACT hContact,HANDLE hEvent);
+ static void MarkMessageAsRead(MCONTACT hContact,HANDLE hEvent);
// translates the given database event
static bool TranslateDBEvent(CEvent *pEvent,WPARAM wParam, LPARAM lParam);
// sends a message to the specified contact
- static HANDLE SendMessageToContact(HCONTACT hContact,tstring strMessage);
+ static HANDLE SendMessageToContact(MCONTACT hContact,tstring strMessage);
// sends typing notifications to the specified contact
- static void SendTypingNotification(HCONTACT hContact,bool bEnable);
+ static void SendTypingNotification(MCONTACT hContact,bool bEnable);
// returns the contacts message service name
- static char *GetMessageServiceName(HCONTACT hContact,bool bIsUnicode);
- static bool IsUtfSendAvailable(HCONTACT hContact);
+ static char *GetMessageServiceName(MCONTACT hContact,bool bIsUnicode);
+ static bool IsUtfSendAvailable(MCONTACT hContact);
// returns a formatted timestamp string
static tstring GetFormattedTimestamp(tm *time);
// returns wether or not a contact is a subcontact
- static bool IsSubContact(HCONTACT hContact);
+ static bool IsSubContact(MCONTACT hContact);
// returns the contacts group
- static tstring GetContactGroup(HCONTACT hContact);
+ static tstring GetContactGroup(MCONTACT hContact);
// returns the contacts displayname
- static tstring GetContactDisplayname(HCONTACT hContact,bool bShortened=false);
+ static tstring GetContactDisplayname(MCONTACT hContact,bool bShortened=false);
// returns the history class for the specified IRC channel
- CIRCHistory *GetIRCHistory(HCONTACT hContact);
+ CIRCHistory *GetIRCHistory(MCONTACT hContact);
CIRCHistory *GetIRCHistoryByName(tstring strProtocol,tstring strChannel);
// returns the IRC connection class for the specified protocol
@@ -118,9 +118,9 @@ public: private:
list<CIRCHistory*> m_LIRCHistorys;
// deletes the history class for the specified IRC channel
- void DeleteIRCHistory(HCONTACT hContact);
+ void DeleteIRCHistory(MCONTACT hContact);
// creates a history class for the specified IRC channel
- CIRCHistory *CreateIRCHistory(HCONTACT hContact,tstring strChannel);
+ CIRCHistory *CreateIRCHistory(MCONTACT hContact,tstring strChannel);
CIRCHistory *CreateIRCHistoryByName(tstring strProtocol,tstring strChannel);
// activate a screen
diff --git a/plugins/MirandaG15/src/CChatScreen.cpp b/plugins/MirandaG15/src/CChatScreen.cpp index 6ecc2acf97..4eef6df9b1 100644 --- a/plugins/MirandaG15/src/CChatScreen.cpp +++ b/plugins/MirandaG15/src/CChatScreen.cpp @@ -216,7 +216,7 @@ bool CChatScreen::IsInputActive() //************************************************************************
// returns the chat contact
//************************************************************************
-HCONTACT CChatScreen::GetContact()
+MCONTACT CChatScreen::GetContact()
{
return m_hContact;
}
@@ -224,7 +224,7 @@ HCONTACT CChatScreen::GetContact() //************************************************************************
// sets the screen's chat contact
//************************************************************************
-bool CChatScreen::SetContact(HCONTACT hContact)
+bool CChatScreen::SetContact(MCONTACT hContact)
{
if(hContact == NULL)
{
diff --git a/plugins/MirandaG15/src/CChatScreen.h b/plugins/MirandaG15/src/CChatScreen.h index 5fd9607ecc..0f10a17614 100644 --- a/plugins/MirandaG15/src/CChatScreen.h +++ b/plugins/MirandaG15/src/CChatScreen.h @@ -44,9 +44,9 @@ public: void OnSizeChanged();
// Set's the chat contact
- bool SetContact(HCONTACT hContact);
+ bool SetContact(MCONTACT hContact);
// returns the chat contact
- HCONTACT GetContact();
+ MCONTACT GetContact();
// returns wether the input mode is active
bool IsInputActive();
@@ -92,7 +92,7 @@ protected: DWORD m_dwMaximizedTimer;
DWORD m_dwMaximizedDuration;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
HANDLE m_hMessage;
int m_iStatus;
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp index bf3469ed95..c22859cce5 100644 --- a/plugins/MirandaG15/src/CContactList.cpp +++ b/plugins/MirandaG15/src/CContactList.cpp @@ -78,12 +78,12 @@ CContactListEntry *CContactList::GetContactData(CListEntry<CContactListEntry*,CC //************************************************************************
// returns the contacts group path
//************************************************************************
-tstring CContactList::GetContactGroupPath(HCONTACT hContact)
+tstring CContactList::GetContactGroupPath(MCONTACT hContact)
{
tstring strGroup = _T("");
if(db_get_b(0, "MetaContacts", "Enabled", 1) && CAppletManager::IsSubContact(hContact))
{
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL);
if(CConfig::GetBoolSetting(CLIST_USEGROUPS))
strGroup = CAppletManager::GetContactGroup(hMetaContact);
@@ -98,7 +98,7 @@ tstring CContactList::GetContactGroupPath(HCONTACT hContact) //************************************************************************
// adds a contact to the list
//************************************************************************
-void CContactList::AddContact(HCONTACT hContact)
+void CContactList::AddContact(MCONTACT hContact)
{
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = NULL;
@@ -151,16 +151,16 @@ void CContactList::AddContact(HCONTACT hContact) // check that all subcontacts exist
int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
- HCONTACT hSubContact = NULL;
+ MCONTACT hSubContact = NULL;
for(int i=0;i<numContacts;i++) {
- hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)i);
+ hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)i);
RemoveContact(hSubContact);
AddContact(hSubContact);
}
return;
}
else if(CAppletManager::IsSubContact(hContact)) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
// check that the metacontact exists
if(!FindContact(hMetaContact)) {
AddContact(hMetaContact);
@@ -206,7 +206,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { if(pEntry->iStatus == ID_STATUS_OFFLINE) {
DWORD dwNumContacts = (DWORD)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)pEntry->hHandle,0);
for(DWORD i = 0; i < dwNumContacts; i++) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hSubContact,0);
if(db_get_w(hSubContact,szProto,"Status",ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
return true;
@@ -222,7 +222,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { if(db_get_b(pEntry->hHandle,"CList","Hidden",0))
return false;
else if(CAppletManager::IsSubContact(pEntry->hHandle)) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)pEntry->hHandle, 0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)pEntry->hHandle, 0);
if(db_get_b(hMetaContact,"CList","Hidden",0))
return false;
}
@@ -241,7 +241,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) { //************************************************************************
// removes a contact from the list
//************************************************************************
-void CContactList::RemoveContact(HCONTACT hContact) {
+void CContactList::RemoveContact(MCONTACT hContact) {
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = NULL;
///tstring strGroup = GetContactGroupPath(hContact);
@@ -281,7 +281,7 @@ void CContactList::RemoveContact(HCONTACT hContact) { // Reenumerate all subcontacts (maybe MetaContacts was disabled
int numContacts = CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hContact,0);
for(int i=0;i<numContacts;i++) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)hContact, (LPARAM)i);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)hContact, (LPARAM)i);
if(!FindContact(hSubContact))
AddContact(hSubContact);
}
@@ -366,7 +366,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::AddGroupByS //************************************************************************
// returns the contact's status
//************************************************************************
-int CContactList::GetContactStatus(HCONTACT hContact)
+int CContactList::GetContactStatus(MCONTACT hContact)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -550,7 +550,7 @@ void CContactList::RefreshList() m_bUseMetaContacts = db_get_b(NULL,"MetaContacts","Enabled",1);
CListEntry<CContactListEntry*,CContactListGroup*> *pContactEntry = NULL;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while(hContact != NULL)
{
pContactEntry = FindContact(hContact);
@@ -619,7 +619,7 @@ CListContainer<CContactListEntry*,CContactListGroup*> *CContactList::FindGroupIn //************************************************************************
// returns the entry for the specified handle
//************************************************************************
-CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(HCONTACT hContact)
+CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(MCONTACT hContact)
{
if(hContact == NULL)
return NULL;
@@ -630,7 +630,7 @@ CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContact(HCO //************************************************************************
// returns the entry for the specified handle
//************************************************************************
-CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGroup(HCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup)
+CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGroup(MCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup)
{
if(hContact == NULL)
return NULL;
@@ -666,7 +666,7 @@ CListEntry<CContactListEntry*,CContactListGroup*> *CContactList::FindContactInGr //************************************************************************
// called when a contacts hidden flag has changed
//************************************************************************
-void CContactList::OnContactHiddenChanged(HCONTACT hContact, bool bHidden)
+void CContactList::OnContactHiddenChanged(MCONTACT hContact, bool bHidden)
{
CListEntry<CContactListEntry*,CContactListGroup*> *pContactEntry = FindContact(hContact);
@@ -685,7 +685,7 @@ void CContactList::OnContactHiddenChanged(HCONTACT hContact, bool bHidden) //************************************************************************
// called when a contacts nickname has changed
//************************************************************************
-void CContactList::OnContactNickChanged(HCONTACT hContact, tstring strNick)
+void CContactList::OnContactNickChanged(MCONTACT hContact, tstring strNick)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -711,7 +711,7 @@ void CContactList::OnContactNickChanged(HCONTACT hContact, tstring strNick) //************************************************************************
// called when a contacts status has changed
//************************************************************************
-void CContactList::OnStatusChange(HCONTACT hContact,int iStatus)
+void CContactList::OnStatusChange(MCONTACT hContact,int iStatus)
{
// find the entry in the list
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
@@ -764,7 +764,7 @@ void CContactList::OnStatusChange(HCONTACT hContact,int iStatus) //************************************************************************
// called when the contacts message count has changed
//************************************************************************
-void CContactList::OnMessageCountChanged(HCONTACT hContact)
+void CContactList::OnMessageCountChanged(MCONTACT hContact)
{
CListEntry<CContactListEntry *,CContactListGroup*> *pContactEntry = FindContact(hContact);
if(!pContactEntry)
@@ -784,7 +784,7 @@ void CContactList::OnMessageCountChanged(HCONTACT hContact) //************************************************************************
// called when a contact has been added
//************************************************************************
-void CContactList::OnContactAdded(HCONTACT hContact)
+void CContactList::OnContactAdded(MCONTACT hContact)
{
// Update the list
AddContact(hContact);
@@ -805,7 +805,7 @@ void CContactList::OnContactAdded(HCONTACT hContact) //************************************************************************
// called when a contact has been deleted
//************************************************************************
-void CContactList::OnContactDeleted(HCONTACT hContact)
+void CContactList::OnContactDeleted(MCONTACT hContact)
{
// Update the list
RemoveContact(hContact);
@@ -829,7 +829,7 @@ void CContactList::OnContactDeleted(HCONTACT hContact) //************************************************************************
// called when a contacts group has changed
//************************************************************************
-void CContactList::OnContactGroupChanged(HCONTACT hContact,tstring strGroup)
+void CContactList::OnContactGroupChanged(MCONTACT hContact,tstring strGroup)
{
bool bMetaContact = false;
@@ -1013,7 +1013,7 @@ void CContactList::InitializeGroupObjects() int res = 0;
CContactListGroup *pGroup = NULL;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
HANDLE hMetaContact = NULL;
char *szProto = NULL;
while(hContact != NULL)
diff --git a/plugins/MirandaG15/src/CContactList.h b/plugins/MirandaG15/src/CContactList.h index a86d61852f..52d68be1df 100644 --- a/plugins/MirandaG15/src/CContactList.h +++ b/plugins/MirandaG15/src/CContactList.h @@ -8,7 +8,7 @@ class CContactListEntry public:
int iMessages;
tstring strMessages;
- HCONTACT hHandle;
+ MCONTACT hHandle;
tstring strName;
tstring strProto;
tstring strStatus;
@@ -25,7 +25,7 @@ public: int iOnline;
int iEvents;
- HCONTACT hMetaContact;
+ MCONTACT hMetaContact;
CContactListEntry *pContactListEntry;
};
@@ -43,23 +43,23 @@ public: bool Shutdown();
// called when a contact has been added
- void OnContactAdded(HCONTACT hContact);
+ void OnContactAdded(MCONTACT hContact);
// called when a contact has been deleted
- void OnContactDeleted(HCONTACT hContact);
+ void OnContactDeleted(MCONTACT hContact);
// called when the configuration has changed
void OnConfigChanged();
// called when a contacts group has changed
- void OnContactGroupChanged(HCONTACT hContact,tstring strGroup);
+ void OnContactGroupChanged(MCONTACT hContact,tstring strGroup);
// called when a contacts hidden flag has changed
- void OnContactHiddenChanged(HCONTACT hContact, bool bVisibility);
+ void OnContactHiddenChanged(MCONTACT hContact, bool bVisibility);
// called when a contacts nickname has changed
- void OnContactNickChanged(HCONTACT hContact, tstring strNick);
+ void OnContactNickChanged(MCONTACT hContact, tstring strNick);
// called when a contacts status has changed
- void OnStatusChange(HCONTACT hContact,int iStatus);
+ void OnStatusChange(MCONTACT hContact,int iStatus);
// called when the contacts message count has changed
- void OnMessageCountChanged(HCONTACT hContact);
+ void OnMessageCountChanged(MCONTACT hContact);
// returns the contact's status
- int GetContactStatus(HCONTACT hContact);
+ int GetContactStatus(MCONTACT hContact);
// Called to compare two entrys
static bool CompareEntries(CListEntry<CContactListEntry*,CContactListGroup*> *pLeft,CListEntry<CContactListEntry*,CContactListGroup*> *pRight);
@@ -72,12 +72,12 @@ public: bool SetFont(LOGFONT &lf);
protected:
// returns the contacts group path
- tstring GetContactGroupPath(HCONTACT hContact);
+ tstring GetContactGroupPath(MCONTACT hContact);
// adds a contact to the list
- void AddContact(HCONTACT hContact);
+ void AddContact(MCONTACT hContact);
// removes a contact from the list
- void RemoveContact(HCONTACT hContact);
+ void RemoveContact(MCONTACT hContact);
// uninitializes the group objects
void UninitializeGroupObjects();
@@ -101,7 +101,7 @@ protected: void SortGroup(CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
// tries to find a contact in the specified group
- CListEntry<CContactListEntry*,CContactListGroup*> *FindContactInGroup(HCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
+ CListEntry<CContactListEntry*,CContactListGroup*> *FindContactInGroup(MCONTACT hContact,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
// tries to find a group in the specified group
CListContainer<CContactListEntry*,CContactListGroup*> *FindGroupInGroup(tstring strGroup,CListContainer<CContactListEntry*,CContactListGroup*> *pGroup);
@@ -117,7 +117,7 @@ protected: void RefreshList();
// returns the entry for the specified handle
- CListEntry<CContactListEntry*,CContactListGroup*> *FindContact(HCONTACT hContact);
+ CListEntry<CContactListEntry*,CContactListGroup*> *FindContact(MCONTACT hContact);
// returns the entry for the specified group name
CListContainer<CContactListEntry*,CContactListGroup*> *FindGroup(tstring strGroup);
diff --git a/plugins/MirandaG15/src/CContactlistScreen.cpp b/plugins/MirandaG15/src/CContactlistScreen.cpp index d6e733f651..d5dca3df7a 100644 --- a/plugins/MirandaG15/src/CContactlistScreen.cpp +++ b/plugins/MirandaG15/src/CContactlistScreen.cpp @@ -85,7 +85,7 @@ bool CContactlistScreen::Draw(CLCDGfx *pGfx) //************************************************************************
// returns the online status of the specified contact
//************************************************************************
-int CContactlistScreen::GetContactStatus(HCONTACT hContact)
+int CContactlistScreen::GetContactStatus(MCONTACT hContact)
{
return m_ContactList.GetContactStatus(hContact);
}
@@ -182,7 +182,7 @@ void CContactlistScreen::OnEventReceived(CEvent *pEvent) //************************************************************************
// Called when a chat session was opened
//************************************************************************
-void CContactlistScreen::OnSessionOpened(HCONTACT hContact)
+void CContactlistScreen::OnSessionOpened(MCONTACT hContact)
{
m_ContactList.OnMessageCountChanged(hContact);
}
diff --git a/plugins/MirandaG15/src/CContactlistScreen.h b/plugins/MirandaG15/src/CContactlistScreen.h index f3ce140267..b0f06e265e 100644 --- a/plugins/MirandaG15/src/CContactlistScreen.h +++ b/plugins/MirandaG15/src/CContactlistScreen.h @@ -26,10 +26,10 @@ public: void ResetPosition();
// returns the online status of the specified contact
- int GetContactStatus(HCONTACT hContact);
+ int GetContactStatus(MCONTACT hContact);
// Called when a chat session was opened
- void OnSessionOpened(HCONTACT hContact);
+ void OnSessionOpened(MCONTACT hContact);
// Called when the configuration has changed
void OnConfigChanged();
diff --git a/plugins/MirandaG15/src/CEvent.h b/plugins/MirandaG15/src/CEvent.h index 81d3b40833..d07080b70c 100644 --- a/plugins/MirandaG15/src/CEvent.h +++ b/plugins/MirandaG15/src/CEvent.h @@ -53,7 +53,7 @@ public: enum EventType eType;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
tm Time;
bool bTime;
diff --git a/plugins/MirandaG15/src/CEventLog.h b/plugins/MirandaG15/src/CEventLog.h index e70d3f6a43..6f9efe8996 100644 --- a/plugins/MirandaG15/src/CEventLog.h +++ b/plugins/MirandaG15/src/CEventLog.h @@ -6,7 +6,7 @@ class CEventLogEntry
{
public:
- HCONTACT hContact;
+ MCONTACT hContact;
tstring strValue;
tstring strTimestamp;
tm Time;
diff --git a/plugins/MirandaG15/src/CIRCHistory.h b/plugins/MirandaG15/src/CIRCHistory.h index bba2c40fb4..d4865ddba0 100644 --- a/plugins/MirandaG15/src/CIRCHistory.h +++ b/plugins/MirandaG15/src/CIRCHistory.h @@ -14,7 +14,7 @@ class CIRCHistory public:
tstring strChannel;
tstring strProtocol;
- HCONTACT hContact;
+ MCONTACT hContact;
list<SIRCMessage> LMessages;
list<tstring> LUsers;
};
diff --git a/plugins/MirandaG15/src/CNotificationScreen.h b/plugins/MirandaG15/src/CNotificationScreen.h index 7404832205..98130c8de5 100644 --- a/plugins/MirandaG15/src/CNotificationScreen.h +++ b/plugins/MirandaG15/src/CNotificationScreen.h @@ -14,7 +14,7 @@ public: tm Time;
tstring strText;
tstring strTitle;
- HCONTACT hContact;
+ MCONTACT hContact;
EventType eType;
};
diff --git a/plugins/MirandaG15/src/Miranda.h b/plugins/MirandaG15/src/Miranda.h index f11db5f7b8..f5f8dfecf5 100644 --- a/plugins/MirandaG15/src/Miranda.h +++ b/plugins/MirandaG15/src/Miranda.h @@ -1,3 +1,3 @@ extern HINSTANCE hInstance;
-extern char *MsgServiceName(HCONTACT hContact,bool bIsUnicode);
+extern char *MsgServiceName(MCONTACT hContact,bool bIsUnicode);
diff --git a/plugins/MobileState/src/main.cpp b/plugins/MobileState/src/main.cpp index 745622593a..ef0cd8ddb7 100644 --- a/plugins/MobileState/src/main.cpp +++ b/plugins/MobileState/src/main.cpp @@ -50,7 +50,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfo;
}
-bool hasMobileClient(HCONTACT hContact, LPARAM lParam)
+bool hasMobileClient(MCONTACT hContact, LPARAM lParam)
{
char *proto = GetContactProto(hContact);
@@ -71,10 +71,10 @@ int ExtraIconsApply(WPARAM wParam, LPARAM lParam) if (wParam == NULL)
return 0;
- if (hasMobileClient((HCONTACT)wParam, lParam))
- ExtraIcon_SetIcon(hExtraIcon, (HCONTACT)wParam, "mobile_icon");
+ if (hasMobileClient((MCONTACT)wParam, lParam))
+ ExtraIcon_SetIcon(hExtraIcon, (MCONTACT)wParam, "mobile_icon");
else
- ExtraIcon_Clear(hExtraIcon, (HCONTACT)wParam);
+ ExtraIcon_Clear(hExtraIcon, (MCONTACT)wParam);
return 0;
}
@@ -82,7 +82,7 @@ int ExtraIconsApply(WPARAM wParam, LPARAM lParam) int onContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
if (!proto)
return 0;
@@ -102,7 +102,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) hExtraIcon = ExtraIcon_Register("mobilestate", LPGEN("Mobile State"), "mobile_icon");
// Set initial value for all contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
ExtraIconsApply((WPARAM)hContact, 1);
return 0;
diff --git a/plugins/ModernOpt/src/mopt_ignore.cpp b/plugins/ModernOpt/src/mopt_ignore.cpp index fadd516b7e..77437f1b74 100644 --- a/plugins/ModernOpt/src/mopt_ignore.cpp +++ b/plugins/ModernOpt/src/mopt_ignore.cpp @@ -49,7 +49,7 @@ static void ResetListOptions(HWND hwndList) static void SetAllContactIcons(HWND hwndList, int count)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
DWORD hItem = SendMessage(hwndList,CLM_FINDCONTACT,(WPARAM)hContact,0);
for (int i = 0; i < count; ++i)
SendMessage(hwndList,CLM_SETEXTRAIMAGE,hItem,MAKELPARAM(i, i+1));
diff --git a/plugins/MsgPopup/src/options.cpp b/plugins/MsgPopup/src/options.cpp index 8920eb4bbe..1921fce2f6 100644 --- a/plugins/MsgPopup/src/options.cpp +++ b/plugins/MsgPopup/src/options.cpp @@ -28,7 +28,7 @@ int idOptionControls[4][3] = { IDC_QUESTION_FG,IDC_QUESTION_BG,IDC_TIMEOUT4
};
-static int __inline DBWriteContactSettingDwordDef(HCONTACT hContact,const char *szModule,const char *szSetting,DWORD val, DWORD defValue)
+static int __inline DBWriteContactSettingDwordDef(MCONTACT hContact,const char *szModule,const char *szSetting,DWORD val, DWORD defValue)
{
if(val == db_get_dw(hContact, szModule, szSetting, defValue))
return 0;
diff --git a/plugins/Msg_Export/src/FileViewer.cpp b/plugins/Msg_Export/src/FileViewer.cpp index 4c42c78ba3..21b8396764 100755 --- a/plugins/Msg_Export/src/FileViewer.cpp +++ b/plugins/Msg_Export/src/FileViewer.cpp @@ -103,7 +103,7 @@ class CLHistoryDlg public:
HWND hWnd;
- HCONTACT hContact;
+ MCONTACT hContact;
tstring sPath;
HWND hFindDlg;
@@ -113,7 +113,7 @@ class CLHistoryDlg bool bFirstLoad;
bool bUtf8File;
- CLHistoryDlg( HCONTACT hContact) : hContact( hContact )
+ CLHistoryDlg( MCONTACT hContact) : hContact( hContact )
{
hFindDlg = NULL;
acFindStr[0] = 0;
@@ -489,7 +489,7 @@ void UpdateFileViews( const TCHAR *pszFile ) // Developer : KN
/////////////////////////////////////////////////////////////////////
-bool bOpenExternaly( HCONTACT hContact )
+bool bOpenExternaly( MCONTACT hContact )
{
tstring sPath = GetFilePathFromUser( hContact);
@@ -1232,7 +1232,7 @@ static INT_PTR CALLBACK DlgProcFileViewer(HWND hwndDlg, UINT msg, WPARAM wParam, // Developer : KN
/////////////////////////////////////////////////////////////////////
-bool bShowFileViewer(HCONTACT hContact)
+bool bShowFileViewer(MCONTACT hContact)
{
HWND hInternalWindow = WindowList_Find(hInternalWindowList,hContact);
if(hInternalWindow) {
diff --git a/plugins/Msg_Export/src/FileViewer.h b/plugins/Msg_Export/src/FileViewer.h index fb060a2c50..897047438b 100755 --- a/plugins/Msg_Export/src/FileViewer.h +++ b/plugins/Msg_Export/src/FileViewer.h @@ -24,8 +24,8 @@ void Uninitilize(); void UpdateFileViews( const TCHAR *pszFile);
-bool bOpenExternaly( HCONTACT hContact);
-bool bShowFileViewer( HCONTACT hContact);
+bool bOpenExternaly( MCONTACT hContact);
+bool bShowFileViewer( MCONTACT hContact);
bool bUseInternalViewer( bool bNew);
bool bUseInternalViewer();
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp index 1aafecbf02..8670284b34 100755 --- a/plugins/Msg_Export/src/main.cpp +++ b/plugins/Msg_Export/src/main.cpp @@ -62,10 +62,10 @@ static INT_PTR ShowExportHistory(WPARAM wParam, LPARAM /*lParam*/) {
if (bUseInternalViewer())
{
- bShowFileViewer((HCONTACT)wParam);
+ bShowFileViewer((MCONTACT)wParam);
return 0;
}
- bOpenExternaly((HCONTACT)wParam);
+ bOpenExternaly((MCONTACT)wParam);
return 0;
}
diff --git a/plugins/Msg_Export/src/options.cpp b/plugins/Msg_Export/src/options.cpp index a56473331b..cee3a516be 100755 --- a/plugins/Msg_Export/src/options.cpp +++ b/plugins/Msg_Export/src/options.cpp @@ -56,10 +56,10 @@ class CLDBEvent {
DWORD time;
public:
- HCONTACT hUser;
+ MCONTACT hUser;
HANDLE hDbEvent;
- CLDBEvent(HCONTACT hU, HANDLE hDBE )
+ CLDBEvent(MCONTACT hU, HANDLE hDBE )
{
hUser = hU;
hDbEvent = hDBE;
@@ -92,15 +92,15 @@ public: int CALLBACK CompareFunc(LPARAM lParam1, LPARAM lParam2, LPARAM lParamSort)
{
if (lParamSort == 1 )
- return _tcsicmp( NickFromHandle((HCONTACT)lParam1), NickFromHandle((HCONTACT)lParam2));
+ return _tcsicmp( NickFromHandle((MCONTACT)lParam1), NickFromHandle((MCONTACT)lParam2));
if (lParamSort == 2 )
- return _DBGetString((HCONTACT)lParam1, "Protocol", "p", _T("")).compare(_DBGetString((HCONTACT)lParam2, "Protocol", "p", _T("")));
+ return _DBGetString((MCONTACT)lParam1, "Protocol", "p", _T("")).compare(_DBGetString((MCONTACT)lParam2, "Protocol", "p", _T("")));
if (lParamSort == 3 )
{
- DWORD dwUin1 = db_get_dw((HCONTACT)lParam1, _DBGetStringA((HCONTACT)lParam1, "Protocol", "p", "" ).c_str(), "UIN", 0);
- DWORD dwUin2 = db_get_dw((HCONTACT)lParam2, _DBGetStringA((HCONTACT)lParam2, "Protocol", "p", "" ).c_str(), "UIN", 0);
+ DWORD dwUin1 = db_get_dw((MCONTACT)lParam1, _DBGetStringA((MCONTACT)lParam1, "Protocol", "p", "" ).c_str(), "UIN", 0);
+ DWORD dwUin2 = db_get_dw((MCONTACT)lParam2, _DBGetStringA((MCONTACT)lParam2, "Protocol", "p", "" ).c_str(), "UIN", 0);
if (dwUin1 == dwUin2 )
return 0;
if (dwUin1 > dwUin2 )
@@ -221,7 +221,7 @@ int nExportCompleatList(HWND hParent, bool bOnlySelected ) continue;
}
- HCONTACT hContact = (HCONTACT)sItem.lParam;
+ MCONTACT hContact = (MCONTACT)sItem.lParam;
list< CLDBEvent > & rclCurList = AllEvents[ GetFilePathFromUser( hContact) ];
@@ -315,7 +315,7 @@ void SetToDefault( HWND hParent ) continue;
tstring sFileName = szTemp;
- ReplaceDefines((HCONTACT)sItem.lParam, sFileName);
+ ReplaceDefines((MCONTACT)sItem.lParam, sFileName);
ReplaceTimeVariables( sFileName);
sItem.mask = LVIF_TEXT;
@@ -400,7 +400,7 @@ BOOL bApplyChanges( HWND hwndDlg ) if (ListView_GetItem( hMapUser, &sItem))
{
- HCONTACT hUser = (HCONTACT)sItem.lParam;
+ MCONTACT hUser = (MCONTACT)sItem.lParam;
if (_tcslen( szTemp) > 0 )
db_set_ts(hUser, MODULE, "FileName", szTemp);
else
@@ -493,7 +493,7 @@ void AutoFindeFileNames(HWND hwndDlg) }
int nShortestMatch = 0xFFFF;
- HCONTACT hStortest = 0;
+ MCONTACT hStortest = 0;
int nStortestIndex = -1;
for (int nSubCur = 0 ; nSubCur < nCount ; nSubCur++ )
{
@@ -514,7 +514,7 @@ void AutoFindeFileNames(HWND hwndDlg) {
nShortestMatch = (int)nLen;
nStortestIndex = nSubCur;
- hStortest = (HCONTACT)sItem.lParam;
+ hStortest = (MCONTACT)sItem.lParam;
}
}
}
@@ -678,7 +678,7 @@ static INT_PTR CALLBACK DlgProcMsgExportOpts(HWND hwndDlg, UINT msg, WPARAM wPar {
tstring sTmp;
LVITEM sItem = { 0 };
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
for (int nUser = 0; /*hContact*/ ; nUser++ )
{
sItem.mask = LVIF_TEXT | LVIF_PARAM | LVIF_IMAGE;
diff --git a/plugins/Msg_Export/src/utils.cpp b/plugins/Msg_Export/src/utils.cpp index c7b03b5e3b..cfe4c7d70b 100755 --- a/plugins/Msg_Export/src/utils.cpp +++ b/plugins/Msg_Export/src/utils.cpp @@ -255,7 +255,7 @@ void DisplayLastError(const TCHAR *pszError) // Developer : KN
/////////////////////////////////////////////////////////////////////
-const TCHAR* NickFromHandle(HCONTACT hContact)
+const TCHAR* NickFromHandle(MCONTACT hContact)
{
const TCHAR *psz = (const TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
if (psz )
@@ -279,7 +279,7 @@ const TCHAR* NickFromHandle(HCONTACT hContact) // Developer : KN
/////////////////////////////////////////////////////////////////////
-tstring _DBGetStringW(HCONTACT hContact,const char *szModule,const char *szSetting, const TCHAR *pszError )
+tstring _DBGetStringW(MCONTACT hContact,const char *szModule,const char *szSetting, const TCHAR *pszError )
{
tstring ret;
DBVARIANT dbv = {0};
@@ -302,7 +302,7 @@ tstring _DBGetStringW(HCONTACT hContact,const char *szModule,const char *szSetti return ret;
}
-string _DBGetStringA(HCONTACT hContact,const char *szModule,const char *szSetting, const char *pszError )
+string _DBGetStringA(MCONTACT hContact,const char *szModule,const char *szSetting, const char *pszError )
{
string ret;
DBVARIANT dbv = {0};
@@ -596,7 +596,7 @@ void ReplaceDBPath( tstring &sRet ) // Developer : KN
/////////////////////////////////////////////////////////////////////
-tstring GetFilePathFromUser( HCONTACT hContact )
+tstring GetFilePathFromUser( MCONTACT hContact )
{
tstring sFilePath = sExportDir + _DBGetString( hContact, MODULE, "FileName", sDefaultFile.c_str());
@@ -707,7 +707,7 @@ tstring GetFilePathFromUser( HCONTACT hContact ) // Developer : KN
/////////////////////////////////////////////////////////////////////
-tstring FileNickFromHandle( HCONTACT hContact)
+tstring FileNickFromHandle( MCONTACT hContact)
{
tstring ret = NickFromHandle( hContact);
string::size_type nCur = 0;
@@ -754,7 +754,7 @@ void ReplaceAllNoColon( tstring &sSrc, const TCHAR *pszReplace, tstring &sNew) // Developer : KN
/////////////////////////////////////////////////////////////////////
-void ReplaceDefines( HCONTACT hContact, tstring & sTarget )
+void ReplaceDefines( MCONTACT hContact, tstring & sTarget )
{
if (sTarget.find( _T("%nick%")) != string::npos )
{
@@ -899,7 +899,7 @@ void UpdateFileToColWidth() {
clFileTo1ColWidth.clear();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
tstring sNick = NickFromHandle( hContact);
string::size_type &rnValue = clFileTo1ColWidth[ GetFilePathFromUser( hContact) ];
if (rnValue < sNick.size())
@@ -997,7 +997,7 @@ void DisplayErrorDialog( const TCHAR *pszError, tstring& sFilePath, DBEVENTINFO // Developer : KN
/////////////////////////////////////////////////////////////////////
-void ExportDBEventInfo(HCONTACT hContact, DBEVENTINFO &dbei )
+void ExportDBEventInfo(MCONTACT hContact, DBEVENTINFO &dbei )
{
TCHAR szTemp[500];
tstring sFilePath = GetFilePathFromUser( hContact);
@@ -1410,7 +1410,7 @@ void ExportDBEventInfo(HCONTACT hContact, DBEVENTINFO &dbei ) int nExportEvent(WPARAM wparam,LPARAM lparam)
{
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
HANDLE hDbEvent = (HANDLE)lparam;
if ( !db_get_b(hContact,MODULE,"EnableLog",1))
return 0;
@@ -1583,7 +1583,7 @@ SuperBreak: int nContactDeleted(WPARAM wparam,LPARAM /*lparam*/)
{
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
HWND hInternalWindow = WindowList_Find(hInternalWindowList,hContact);
if(hInternalWindow)
@@ -1595,7 +1595,7 @@ int nContactDeleted(WPARAM wparam,LPARAM /*lparam*/) tstring sFilePath = GetFilePathFromUser( hContact);
// Test if there is another user using this file
- for(HCONTACT hOtherContact = db_find_first();hOtherContact;hOtherContact = db_find_next(hOtherContact))
+ for(MCONTACT hOtherContact = db_find_first();hOtherContact;hOtherContact = db_find_next(hOtherContact))
if (hContact != hOtherContact && sFilePath == GetFilePathFromUser( hOtherContact))
return 0; // we found another contact abort mission :-)
diff --git a/plugins/Msg_Export/src/utils.h b/plugins/Msg_Export/src/utils.h index 023e32cce4..2b2a11768e 100755 --- a/plugins/Msg_Export/src/utils.h +++ b/plugins/Msg_Export/src/utils.h @@ -57,10 +57,10 @@ void ShowDebugInfo(); int nExportEvent(WPARAM wparam,LPARAM lparam);
int nContactDeleted(WPARAM wparam,LPARAM lparam);
-const TCHAR *NickFromHandle(HCONTACT hContact);
+const TCHAR *NickFromHandle(MCONTACT hContact);
-tstring __inline _DBGetStringW(HCONTACT hContact,const char *szModule,const char *szSetting, const TCHAR *pszError);
-string __inline _DBGetStringA(HCONTACT hContact,const char *szModule,const char *szSetting, const char *pszError);
+tstring __inline _DBGetStringW(MCONTACT hContact,const char *szModule,const char *szSetting, const TCHAR *pszError);
+string __inline _DBGetStringA(MCONTACT hContact,const char *szModule,const char *szSetting, const char *pszError);
void ReplaceAll( tstring &sSrc, const TCHAR *pszReplace, const tstring &sNew);
void ReplaceAll( tstring &sSrc, const TCHAR *pszReplace, const TCHAR *pszNew);
@@ -68,9 +68,9 @@ void ReplaceAll( tstring &sSrc, const TCHAR *pszReplace, const TCHAR *pszNew); void UpdateFileToColWidth();
bool bReadMirandaDirAndPath();
-tstring GetFilePathFromUser( HCONTACT hContact);
+tstring GetFilePathFromUser( MCONTACT hContact);
-void ReplaceDefines( HCONTACT hContact, tstring & sTarget);
+void ReplaceDefines( MCONTACT hContact, tstring & sTarget);
void ReplaceTimeVariables( tstring &sRet);
bool bCreatePathToFile( tstring sFilePath);
diff --git a/plugins/NewEventNotify/src/main.cpp b/plugins/NewEventNotify/src/main.cpp index c1d12aee4e..3c559d4321 100644 --- a/plugins/NewEventNotify/src/main.cpp +++ b/plugins/NewEventNotify/src/main.cpp @@ -62,7 +62,7 @@ HANDLE hHookedDeletedEvent; int HookedNewEvent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
PLUGIN_DATA* pdata;
//are popups currently enabled?
@@ -181,7 +181,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) // 1 - Split-mode window found
// 2 - Single-mode window found
-int CheckMsgWnd(HCONTACT hContact)
+int CheckMsgWnd(MCONTACT hContact)
{
if (g_IsSrmmWindowAPI) {
MessageWindowData mwd;
diff --git a/plugins/NewEventNotify/src/neweventnotify.h b/plugins/NewEventNotify/src/neweventnotify.h index 1cc9baf2e3..521ff9083a 100644 --- a/plugins/NewEventNotify/src/neweventnotify.h +++ b/plugins/NewEventNotify/src/neweventnotify.h @@ -193,7 +193,7 @@ struct EVENT_DATA_EX struct PLUGIN_DATA
{
UINT eventType;
- HCONTACT hContact;
+ MCONTACT hContact;
PLUGIN_OPTIONS* pluginOptions;
HWND hWnd;
struct EVENT_DATA_EX* firstEventData;
@@ -207,8 +207,8 @@ struct PLUGIN_DATA //---------------------------
//---External Procedure Definitions
-int PopupShow(PLUGIN_OPTIONS* pluginOptions, HCONTACT hContact, HANDLE hEvent, UINT eventType);
-int PopupUpdate(HCONTACT hContact, HANDLE hEvent);
+int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType);
+int PopupUpdate(MCONTACT hContact, HANDLE hEvent);
int PopupPreview(PLUGIN_OPTIONS* pluginOptions);
int PopupAct(HWND hWnd, UINT mask, PLUGIN_DATA* pdata);
int OptionsInit(PLUGIN_OPTIONS* pluginOptions);
@@ -216,7 +216,7 @@ int OptionsAdd(HINSTANCE hInst, WPARAM addInfo); int Opt_DisableNEN(BOOL Status);
int MenuitemInit(BOOL bStatus);
int MenuitemUpdate(BOOL bStatus);
-int NumberPopupData(HCONTACT hContact, int eventType);
-int CheckMsgWnd(HCONTACT hContact);
+int NumberPopupData(MCONTACT hContact, int eventType);
+int CheckMsgWnd(MCONTACT hContact);
extern HINSTANCE hInst;
diff --git a/plugins/NewEventNotify/src/popup.cpp b/plugins/NewEventNotify/src/popup.cpp index 7ab6e944ee..b12587f750 100644 --- a/plugins/NewEventNotify/src/popup.cpp +++ b/plugins/NewEventNotify/src/popup.cpp @@ -30,7 +30,7 @@ static int PopupCount = 0; PLUGIN_DATA* PopupList[MAX_POPUPS];
-int NumberPopupData(HCONTACT hContact, int eventType)
+int NumberPopupData(MCONTACT hContact, int eventType)
{
for (int n=0; n < MAX_POPUPS; n++) {
if (!PopupList[n] && !hContact && eventType == -1)
@@ -369,7 +369,7 @@ static TCHAR* GetEventPreview(DBEVENTINFO *dbei) return TranslateTS( mir_a2t(commentFix));
}
-int PopupShow(PLUGIN_OPTIONS* pluginOptions, HCONTACT hContact, HANDLE hEvent, UINT eventType)
+int PopupShow(PLUGIN_OPTIONS* pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType)
{
TCHAR* sampleEvent;
long iSeconds;
@@ -486,7 +486,7 @@ int PopupShow(PLUGIN_OPTIONS* pluginOptions, HCONTACT hContact, HANDLE hEvent, U }
-int PopupUpdate(HCONTACT hContact, HANDLE hEvent)
+int PopupUpdate(MCONTACT hContact, HANDLE hEvent)
{
// merge only message popups
PLUGIN_DATA *pdata = (PLUGIN_DATA*)PopupList[NumberPopupData(hContact, EVENTTYPE_MESSAGE)];
diff --git a/plugins/NewXstatusNotify/src/common.h b/plugins/NewXstatusNotify/src/common.h index 3e56ed0fb0..53ab39ce15 100644 --- a/plugins/NewXstatusNotify/src/common.h +++ b/plugins/NewXstatusNotify/src/common.h @@ -122,7 +122,7 @@ typedef struct tagPLUGINDATA } PLUGINDATA;
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *cust;
TCHAR *oldstatusmsg;
TCHAR *newstatusmsg;
@@ -131,7 +131,7 @@ typedef struct { } STATUSMSGINFO;
/*
-HCONTACT hContact = (HCONTACT)wParam;
+MCONTACT hContact = (MCONTACT)wParam;
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
oldStatus is the status the contact was before the change.
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index c21bb6f940..19ecaa0d90 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -107,14 +107,14 @@ HIMAGELIST GetStatusIconsImgList(char *szProto) INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hContact = NULL;
+ static MCONTACT hContact = NULL;
HWND hList = GetDlgItem(hwndDlg, IDC_INDSNDLIST);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
char *szProto = GetContactProto(hContact);
ListView_SetImageList(hList, GetStatusIconsImgList(szProto), LVSIL_SMALL);
@@ -331,7 +331,7 @@ void SetAllContactsIcons(HWND hwndList) {
BYTE EnableSounds, EnablePopups, EnableXStatus, EnableLogging;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
char *szProto = GetContactProto(hContact);
@@ -570,7 +570,7 @@ INT_PTR CALLBACK DlgProcFiltering(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
if (GetExtraImage(hList, hItem, EXTRA_IMAGE_SOUND) == EXTRA_IMAGE_SOUND)
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 42a831073a..39b9d5a9cb 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -60,7 +60,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_USERONLINE, MIID_LAST};
-BYTE GetGender(HCONTACT hContact)
+BYTE GetGender(MCONTACT hContact)
{
char *szProto =GetContactProto(hContact);
if (szProto) {
@@ -84,7 +84,7 @@ HANDLE GetIconHandle(char *szIcon) return Skin_GetIconHandle(szSettingName);
}
-bool IsNewExtraStatus(HCONTACT hContact, char *szSetting, TCHAR *newStatusTitle)
+bool IsNewExtraStatus(MCONTACT hContact, char *szSetting, TCHAR *newStatusTitle)
{
DBVARIANT dbv;
bool result = true;
@@ -97,7 +97,7 @@ bool IsNewExtraStatus(HCONTACT hContact, char *szSetting, TCHAR *newStatusTitle) return result;
}
-int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+int ProcessExtraStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
XSTATUSCHANGE *xsc;
char *szProto = GetContactProto(hContact);
@@ -408,12 +408,12 @@ TCHAR* GetStr(STATUSMSGINFO *n, const TCHAR *tmplt) return str;
}
-bool SkipHiddenContact(HCONTACT hContact)
+bool SkipHiddenContact(MCONTACT hContact)
{
return (!opt.HiddenContactsToo && (db_get_b(hContact, "CList", "Hidden", 0) == 1));
}
-int ProcessStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+int ProcessStatus(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
if ( !strcmp(cws->szSetting, "Status")) {
WORD newStatus = cws->value.wVal;
@@ -543,7 +543,7 @@ int ProcessStatus(DBCONTACTWRITESETTING *cws, HCONTACT hContact) int ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -612,7 +612,7 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-void ShowStatusChangePopup(HCONTACT hContact, char *szProto, WORD oldStatus, WORD newStatus)
+void ShowStatusChangePopup(MCONTACT hContact, char *szProto, WORD oldStatus, WORD newStatus)
{
TCHAR stzStatusText[MAX_SECONDLINE] = {0};
WORD myStatus = (WORD)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
@@ -686,7 +686,7 @@ void ShowStatusChangePopup(HCONTACT hContact, char *szProto, WORD oldStatus, WOR PUAddPopupT(&ppd);
}
-void BlinkIcon(HCONTACT hContact, char* szProto, WORD status)
+void BlinkIcon(MCONTACT hContact, char* szProto, WORD status)
{
CLISTEVENT cle = {0};
TCHAR stzTooltip[256];
@@ -704,7 +704,7 @@ void BlinkIcon(HCONTACT hContact, char* szProto, WORD status) CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
}
-void PlayChangeSound(HCONTACT hContact, WORD oldStatus, WORD newStatus)
+void PlayChangeSound(MCONTACT hContact, WORD oldStatus, WORD newStatus)
{
DBVARIANT dbv;
if (opt.UseIndSnd) {
@@ -751,7 +751,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) {
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
bool bEnablePopup = true, bEnableSound = true;
char *hlpProto = GetContactProto(hContact);
@@ -777,7 +777,7 @@ int ContactStatusChanged(WPARAM wParam, LPARAM lParam) }
if (strcmp(szProto, szMetaModuleName) == 0) { //this contact is Meta
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
hlpProto = GetContactProto(hSubContact);
if (hlpProto == NULL)
return 0;
diff --git a/plugins/NewXstatusNotify/src/popup.cpp b/plugins/NewXstatusNotify/src/popup.cpp index 7aba8a569e..8d36c769ab 100644 --- a/plugins/NewXstatusNotify/src/popup.cpp +++ b/plugins/NewXstatusNotify/src/popup.cpp @@ -38,7 +38,7 @@ static int AwayMsgHook(WPARAM wParam, LPARAM lParam, LPARAM pObj) if (ack->result != ACKRESULT_SUCCESS)
return 0;
- HCONTACT hContact = PUGetContact(pdp->hWnd);
+ MCONTACT hContact = PUGetContact(pdp->hWnd);
ptrT pstzLast( db_get_tsa(hContact, MODULE, "LastPopupText"));
TCHAR *tszStatus = (TCHAR*)ack->lParam;
@@ -58,7 +58,7 @@ static int AwayMsgHook(WPARAM wParam, LPARAM lParam, LPARAM pObj) void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp)
{
- HCONTACT hContact = PUGetContact(hWnd);
+ MCONTACT hContact = PUGetContact(hWnd);
char *szProto = GetContactProto(hContact);
if (szProto)
{
@@ -76,8 +76,8 @@ void QueryAwayMessage(HWND hWnd, PLUGINDATA *pdp) void PopupAction(HWND hWnd, BYTE action)
{
- HCONTACT hContact = PUGetContact(hWnd);
- if (hContact && hContact != (HCONTACT)INVALID_HANDLE_VALUE) {
+ MCONTACT hContact = PUGetContact(hWnd);
+ if (hContact && hContact != INVALID_CONTACT_ID) {
switch (action) {
case PCA_OPENMESSAGEWND:
CallServiceSync(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
diff --git a/plugins/NewXstatusNotify/src/utils.cpp b/plugins/NewXstatusNotify/src/utils.cpp index 7e1f988ab1..a86f7e80bc 100644 --- a/plugins/NewXstatusNotify/src/utils.cpp +++ b/plugins/NewXstatusNotify/src/utils.cpp @@ -39,7 +39,7 @@ TCHAR *db2t(DBVARIANT *dbv) return buff;
}
-int DBGetStringDefault(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
+int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue)
{
DBVARIANT dbv;
if ( !db_get_ts(hContact, szModule, szSetting, &dbv)) {
diff --git a/plugins/NewXstatusNotify/src/utils.h b/plugins/NewXstatusNotify/src/utils.h index 55e97a0ddc..e1a33b8de6 100644 --- a/plugins/NewXstatusNotify/src/utils.h +++ b/plugins/NewXstatusNotify/src/utils.h @@ -23,7 +23,7 @@ #define UTILS_H
TCHAR *db2t(DBVARIANT *dbv);
-int DBGetStringDefault(HCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue);
+int DBGetStringDefault(MCONTACT hContact, const char *szModule, const char *szSetting, TCHAR *setting, int size, const TCHAR *defaultValue);
void HigherLower(int maxValue, int minValue);
void ShowLog(TCHAR *file);
BOOL StatusHasAwayMessage(char *szProto, int status);
diff --git a/plugins/NewXstatusNotify/src/xstatus.cpp b/plugins/NewXstatusNotify/src/xstatus.cpp index ed150f927a..4930aaac08 100644 --- a/plugins/NewXstatusNotify/src/xstatus.cpp +++ b/plugins/NewXstatusNotify/src/xstatus.cpp @@ -19,7 +19,7 @@ #include "common.h"
-XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText)
+XSTATUSCHANGE *NewXSC(MCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText)
{
XSTATUSCHANGE *xsc = (XSTATUSCHANGE *)mir_alloc(sizeof(XSTATUSCHANGE));
xsc->hContact = hContact;
@@ -41,7 +41,7 @@ void FreeXSC(XSTATUSCHANGE *xsc) }
}
-void RemoveLoggedEvents(HCONTACT hContact)
+void RemoveLoggedEvents(MCONTACT hContact)
{
for (int i = eventList.getCount()-1; i >= 0; i--) {
DBEVENT *dbevent = eventList[i];
@@ -351,7 +351,7 @@ TCHAR *GetDefaultXstatusName(int statusID, char *szProto, TCHAR *buff, int buffl return buff;
}
-TCHAR *GetIcqXStatus(HCONTACT hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetIcqXStatus(MCONTACT hContact, char *szProto, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -372,7 +372,7 @@ TCHAR *GetIcqXStatus(HCONTACT hContact, char *szProto, char *szValue, TCHAR *buf return buff;
}
-TCHAR *GetJabberAdvStatusText(HCONTACT hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
+TCHAR *GetJabberAdvStatusText(MCONTACT hContact, char *szProto, char *szSlot, char *szValue, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSetting[128];
@@ -388,7 +388,7 @@ TCHAR *GetJabberAdvStatusText(HCONTACT hContact, char *szProto, char *szSlot, ch return buff;
}
-void LogXstatusChange(HCONTACT hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
+void LogXstatusChange(MCONTACT hContact, char *szProto, int xstatusType, TCHAR *stzTitle, TCHAR *stzText)
{
XSTATUSCHANGE *xsc =
NewXSC(
@@ -406,7 +406,7 @@ void LogXstatusChange(HCONTACT hContact, char *szProto, int xstatusType, TCHAR * void AddEventThread(void *arg)
{
- HCONTACT hContact = (HCONTACT)arg;
+ MCONTACT hContact = (MCONTACT)arg;
TCHAR stzTitle[MAX_TITLE_LEN], stzText[MAX_TEXT_LEN];
char *szProto = GetContactProto(hContact);
diff --git a/plugins/NewXstatusNotify/src/xstatus.h b/plugins/NewXstatusNotify/src/xstatus.h index b5ba28e71f..c2d4d46113 100644 --- a/plugins/NewXstatusNotify/src/xstatus.h +++ b/plugins/NewXstatusNotify/src/xstatus.h @@ -75,7 +75,7 @@ typedef struct tagXSTATUSCHANGE
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
int type;
int action;
@@ -85,7 +85,7 @@ typedef struct tagXSTATUSCHANGE typedef struct tagDBEVENT
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDBEvent;
} DBEVENT;
@@ -96,7 +96,7 @@ typedef struct tagPROTOTEMPLATE } PROTOTEMPLATE;
TCHAR *GetDefaultXstatusName(int statusID, char *szProto, TCHAR *buff, int bufflen);
-XSTATUSCHANGE *NewXSC(HCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText);
+XSTATUSCHANGE *NewXSC(MCONTACT hContact, char *szProto, int xstatusType, int action, TCHAR *stzTitle, TCHAR *stzText);
void ExtraStatusChanged(XSTATUSCHANGE *xsc);
void FreeXSC(XSTATUSCHANGE *xsc);
int OnWindowEvent(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/New_GPG/src/clist.cpp b/plugins/New_GPG/src/clist.cpp index 9a2322023d..1cd6088b9c 100644 --- a/plugins/New_GPG/src/clist.cpp +++ b/plugins/New_GPG/src/clist.cpp @@ -26,6 +26,6 @@ int onExtraImageListRebuilding(WPARAM, LPARAM) int onExtraImageApplying(WPARAM wParam, LPARAM)
{
- setClistIcon((HCONTACT)wParam);
+ setClistIcon((MCONTACT)wParam);
return 0;
}
diff --git a/plugins/New_GPG/src/globals.h b/plugins/New_GPG/src/globals.h index 744bcad389..a895bfd977 100644 --- a/plugins/New_GPG/src/globals.h +++ b/plugins/New_GPG/src/globals.h @@ -20,11 +20,11 @@ extern bool bAppendTags, bPresenceSigning, bStripTags, gpg_valid, gpg_keyexist, extern TCHAR *inopentag, *inclosetag, *outopentag, *outclosetag;
extern logtofile debuglog;
-extern map<int, HCONTACT> user_data; -extern int item_num; +extern map<int, MCONTACT> user_data;
+extern int item_num;
extern bool _terminate;
extern wstring new_key;
-extern HCONTACT new_key_hcnt;
+extern MCONTACT new_key_hcnt;
extern boost::mutex new_key_hcnt_mutex;
#endif
diff --git a/plugins/New_GPG/src/icons.cpp b/plugins/New_GPG/src/icons.cpp index 65ddc26b0a..ac41cb8788 100644 --- a/plugins/New_GPG/src/icons.cpp +++ b/plugins/New_GPG/src/icons.cpp @@ -44,11 +44,11 @@ HANDLE IconLibHookIconsChanged(MIRANDAHOOK hook) return HookEvent(ME_SKIN2_ICONSCHANGED, hook);
}
-void setClistIcon(HCONTACT hContact)
+void setClistIcon(MCONTACT hContact)
{
bool enabled = isContactSecured(hContact);
extern HANDLE g_hCLIcon;
- HCONTACT hMC = hContact;
+ MCONTACT hMC = hContact;
if(metaIsSubcontact(hContact))
hMC = metaGetContact(hContact);
else if(metaIsProtoMetaContacts(hContact))
@@ -59,11 +59,11 @@ void setClistIcon(HCONTACT hContact) ExtraIcon_SetIcon(g_hCLIcon, hMC, szIconId);
}
-void setSrmmIcon(HCONTACT h)
+void setSrmmIcon(MCONTACT h)
{
- HCONTACT hContact = metaIsProtoMetaContacts(h) ? metaGetMostOnline(h) : h;
+ MCONTACT hContact = metaIsProtoMetaContacts(h) ? metaGetMostOnline(h) : h;
bool enabled = isContactSecured(hContact);
- HCONTACT hMC = NULL;
+ MCONTACT hMC = NULL;
if(metaIsSubcontact(hContact))
hMC = metaGetContact(hContact);
else if(metaIsProtoMetaContacts(hContact))
@@ -91,7 +91,7 @@ void RefreshContactListIcons() {
CallService(MS_CLUI_LISTBEGINREBUILD,0,0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
setClistIcon(hContact);
CallService(MS_CLUI_LISTENDREBUILD,0,0);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index fd21bdaf2f..185cb0d774 100644 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -31,7 +31,7 @@ XML_API xi = {0}; int hLangpack = 0;
logtofile debuglog;
bool gpg_valid = false, gpg_keyexist = false;
-std::map<HCONTACT, contact_data> hcontact_data;
+std::map<MCONTACT, contact_data> hcontact_data;
PLUGININFOEX pluginInfo={
sizeof(PLUGININFOEX),
diff --git a/plugins/New_GPG/src/main.cpp b/plugins/New_GPG/src/main.cpp index 2230a26ebd..c145fb41b0 100755 --- a/plugins/New_GPG/src/main.cpp +++ b/plugins/New_GPG/src/main.cpp @@ -1281,7 +1281,7 @@ static INT_PTR CALLBACK DlgProcGpgBinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, static INT_PTR CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - static HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE; + static MCONTACT hContact = INVALID_CONTACT_ID; void ImportKey(); TCHAR *tmp = NULL; switch (msg) @@ -1314,8 +1314,8 @@ static INT_PTR CALLBACK DlgProcNewKeyDialog(HWND hwndDlg, UINT msg, WPARAM wPara case IDC_IMPORT_AND_USE: ImportKey(); db_set_b(hContact, szGPGModuleName, "GPGEncryption", 1); - void setSrmmIcon(HCONTACT hContact); - void setClistIcon(HCONTACT hContact); + void setSrmmIcon(MCONTACT hContact); + void setClistIcon(MCONTACT hContact); setSrmmIcon(hContact); setClistIcon(hContact); DestroyWindow(hwndDlg); @@ -1899,7 +1899,7 @@ static INT_PTR CALLBACK DlgProcLoadExistingKey(HWND hwndDlg,UINT msg,WPARAM wPar static INT_PTR CALLBACK DlgProcImportKeyDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { - HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE; + MCONTACT hContact = INVALID_CONTACT_ID; switch (msg) { case WM_INITDIALOG: @@ -2274,7 +2274,7 @@ void InitCheck() void ImportKey() { - HCONTACT hContact = new_key_hcnt; + MCONTACT hContact = new_key_hcnt; new_key_hcnt_mutex.unlock(); bool for_all_sub = false; if(metaIsProtoMetaContacts(hContact)) @@ -2287,7 +2287,7 @@ void ImportKey() int count = metaGetContactsNum(hContact); for(int i = 0; i < count; i++) { - HCONTACT hcnt = metaGetSubcontact(hContact, i); + MCONTACT hcnt = metaGetSubcontact(hContact, i); if(hcnt) db_set_ts(hcnt, szGPGModuleName, "GPGPubKey", new_key.c_str()); } @@ -2341,7 +2341,7 @@ void ImportKey() int count = metaGetContactsNum(hContact); for(int i = 0; i < count; i++) { - HCONTACT hcnt = metaGetSubcontact(hContact, i); + MCONTACT hcnt = metaGetSubcontact(hContact, i); if(hcnt) { char *tmp = NULL; diff --git a/plugins/New_GPG/src/main.h b/plugins/New_GPG/src/main.h index 36a7bafb0f..309d0a5857 100644 --- a/plugins/New_GPG/src/main.h +++ b/plugins/New_GPG/src/main.h @@ -22,7 +22,7 @@ struct contact_data string key_in_prescense;
};
-extern std::map<HCONTACT, contact_data> hcontact_data;
+extern std::map<MCONTACT, contact_data> hcontact_data;
extern bool bAutoExchange;
extern RECT key_from_keyserver_rect, firstrun_rect, new_key_rect, key_gen_rect, load_key_rect, import_key_rect, key_password_rect, load_existing_key_rect;
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 5638a297c4..70ce62ddf5 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -18,14 +18,14 @@ wstring new_key; -HCONTACT new_key_hcnt = NULL; +MCONTACT new_key_hcnt = NULL; boost::mutex new_key_hcnt_mutex; bool _terminate = false; -int returnNoError(HCONTACT hContact); +int returnNoError(MCONTACT hContact); std::list<HANDLE> sent_msgs; -void RecvMsgSvc_func(HCONTACT hContact, std::wstring str, char *msg, DWORD flags, DWORD timestamp) +void RecvMsgSvc_func(MCONTACT hContact, std::wstring str, char *msg, DWORD flags, DWORD timestamp) { DWORD dbflags = DBEF_UTF; { //check for gpg related data @@ -598,7 +598,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) return 0; } -void SendMsgSvc_func(HCONTACT hContact, char *msg, DWORD flags) +void SendMsgSvc_func(MCONTACT hContact, char *msg, DWORD flags) { bool isansi = false; DWORD dbflags = 0; @@ -838,7 +838,7 @@ int HookSendMsg(WPARAM w, LPARAM l) DBEVENTINFO * dbei = (DBEVENTINFO*)l; if(dbei->eventType != EVENTTYPE_MESSAGE) return 0; - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; if(dbei->flags & DBEF_SENT) { if(isContactSecured(hContact) && strstr((char*)dbei->pBlob, "-----BEGIN PGP MESSAGE-----")) //our service data, can be double added by metacontacts e.t.c. @@ -986,7 +986,7 @@ int HookSendMsg(WPARAM w, LPARAM l) debuglog<<std::string(time_str()+": event message: \""+(char*)dbei->pBlob+"\" passed event filter, contact "+toUTF8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR))+" is unsecured"); return 0; } - if(!(dbei->flags & DBEF_SENT) && metaIsProtoMetaContacts((HCONTACT)w)) + if(!(dbei->flags & DBEF_SENT) && metaIsProtoMetaContacts((MCONTACT)w)) { char tmp[29]; strncpy(tmp, (char*)dbei->pBlob, 27); diff --git a/plugins/New_GPG/src/metacontacts.cpp b/plugins/New_GPG/src/metacontacts.cpp index 27c6963213..31b320737c 100644 --- a/plugins/New_GPG/src/metacontacts.cpp +++ b/plugins/New_GPG/src/metacontacts.cpp @@ -18,7 +18,7 @@ extern bool bMetaContacts;
-bool metaIsProtoMetaContacts(HCONTACT hContact)
+bool metaIsProtoMetaContacts(MCONTACT hContact)
{
if(bMetaContacts) {
LPSTR proto = GetContactProto(hContact);
@@ -29,54 +29,54 @@ bool metaIsProtoMetaContacts(HCONTACT hContact) return false;
}
-bool metaIsDefaultSubContact(HCONTACT hContact)
+bool metaIsDefaultSubContact(MCONTACT hContact)
{
if(bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0)==hContact;
return false;
}
-HCONTACT metaGetContact(HCONTACT hContact)
+MCONTACT metaGetContact(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsSubcontact(hContact))
- return (HCONTACT)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0);
return NULL;
}
-bool metaIsSubcontact(HCONTACT hContact)
+bool metaIsSubcontact(MCONTACT hContact)
{
if(bMetaContacts)
return CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0) != 0;
return false;
}
-HCONTACT metaGetMostOnline(HCONTACT hContact)
+MCONTACT metaGetMostOnline(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsProtoMetaContacts(hContact))
- return (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT,(WPARAM)hContact,0);
return NULL;
}
-HCONTACT metaGetDefault(HCONTACT hContact)
+MCONTACT metaGetDefault(MCONTACT hContact)
{
if(bMetaContacts)
if(metaIsProtoMetaContacts(hContact))
- return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)hContact,0);
return NULL;
}
-DWORD metaGetContactsNum(HCONTACT hContact)
+DWORD metaGetContactsNum(MCONTACT hContact)
{
if(bMetaContacts)
return CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
return 0;
}
-HCONTACT metaGetSubcontact(HCONTACT hContact, int num)
+MCONTACT metaGetSubcontact(MCONTACT hContact, int num)
{
if(bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)num);
+ return (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, (LPARAM)num);
return 0;
}
diff --git a/plugins/New_GPG/src/metacontacts.h b/plugins/New_GPG/src/metacontacts.h index 9dba2943c0..396c3bcb43 100644 --- a/plugins/New_GPG/src/metacontacts.h +++ b/plugins/New_GPG/src/metacontacts.h @@ -14,11 +14,11 @@ // along with this program; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-bool metaIsProtoMetaContacts(HCONTACT hContact);
-bool metaIsDefaultSubContact(HCONTACT hContact) ;
-HCONTACT metaGetContact(HCONTACT hContact);
-bool metaIsSubcontact(HCONTACT hContact);
-HCONTACT metaGetMostOnline(HCONTACT hContact);
-HCONTACT metaGetDefault(HCONTACT hContact);
-DWORD metaGetContactsNum(HCONTACT hContact);
-HCONTACT metaGetSubcontact(HCONTACT hContact, int num);
+bool metaIsProtoMetaContacts(MCONTACT hContact);
+bool metaIsDefaultSubContact(MCONTACT hContact) ;
+MCONTACT metaGetContact(MCONTACT hContact);
+bool metaIsSubcontact(MCONTACT hContact);
+MCONTACT metaGetMostOnline(MCONTACT hContact);
+MCONTACT metaGetDefault(MCONTACT hContact);
+DWORD metaGetContactsNum(MCONTACT hContact);
+MCONTACT metaGetSubcontact(MCONTACT hContact, int num);
diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 3f43a4e9fd..019036e6ce 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -66,7 +66,7 @@ int GpgOptInit(WPARAM wParam,LPARAM lParam) return 0;
}
-map<int, HCONTACT> user_data;
+map<int, MCONTACT> user_data;
int item_num = 0;
HWND hwndList_p = NULL;
@@ -120,7 +120,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP ListView_InsertColumn(hwndList, 4, &col);
ListView_SetExtendedListViewStyleEx(hwndList, 0, LVS_EX_CHECKBOXES | LVS_EX_FULLROWSELECT);
int i = 1, iRow = 0;
- for(HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for(MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if(isContactHaveKey(hContact)) {
TCHAR *name = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
item.mask = LVIF_TEXT;
@@ -192,16 +192,16 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (LOWORD(wParam))
{
case IDC_DELETE_KEY_BUTTON:
- void setClistIcon(HCONTACT hContact);
- void setSrmmIcon(HCONTACT hContact);
+ void setClistIcon(MCONTACT hContact);
+ void setSrmmIcon(MCONTACT hContact);
{ //gpg execute block
TCHAR tmp2[MAX_PATH] = {0};
TCHAR *ptmp;
char *tmp;
bool keep = false;
bool ismetacontact = false;
- HCONTACT meta = NULL;
- HCONTACT hContact = user_data[item_num+1];
+ MCONTACT meta = NULL;
+ MCONTACT hContact = user_data[item_num+1];
if(metaIsProtoMetaContacts(hContact))
{
meta = hContact;
@@ -214,7 +214,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP ismetacontact = true;
}
tmp = UniGetContactSettingUtf(hContact, szGPGModuleName, "KeyID", "");
- for(HCONTACT hcnttmp = db_find_first(); hcnttmp != NULL; hcnttmp = db_find_next(hcnttmp)) {
+ for(MCONTACT hcnttmp = db_find_first(); hcnttmp != NULL; hcnttmp = db_find_next(hcnttmp)) {
if(hcnttmp != hContact) {
char *tmp2 = UniGetContactSettingUtf(hcnttmp, szGPGModuleName, "KeyID", "");
if(!strcmp(tmp, tmp2)) {
@@ -262,7 +262,7 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
if(MessageBox(0, TranslateT("Do you want to remove key from entire metacontact (all subcontacts)?"), TranslateT("Metacontact detected"), MB_YESNO) == IDYES)
{
- HCONTACT hcnt = NULL;
+ MCONTACT hcnt = NULL;
int count = metaGetContactsNum(meta);
for(int i = 0; i < count; i++)
{
@@ -407,8 +407,8 @@ static INT_PTR CALLBACK DlgProcGpgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
else if(hdr->hdr.code == LVN_ITEMCHANGED)
{
- void setClistIcon(HCONTACT hContact);
- void setSrmmIcon(HCONTACT hContact);
+ void setClistIcon(MCONTACT hContact);
+ void setSrmmIcon(MCONTACT hContact);
if(ListView_GetCheckState(hwndList, item_num))
db_set_b(user_data[item_num+1], szGPGModuleName, "GPGEncryption", 1);
else
@@ -719,7 +719,7 @@ static LRESULT CALLBACK editctrl_ctrl_a(HWND hwndDlg,UINT msg,WPARAM wParam,LPAR static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
- static HCONTACT hContact;
+ static MCONTACT hContact;
TCHAR *tmp = NULL;
wstring key_buf;
wstring::size_type ws1 = 0, ws2 = 0;
@@ -729,7 +729,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam hContact = user_data[1];
SetWindowPos(hwndDlg, 0, load_key_rect.left, load_key_rect.top, 0, 0, SWP_NOSIZE|SWP_SHOWWINDOW);
mir_subclassWindow(GetDlgItem(hwndDlg, IDC_PUBLIC_KEY_EDIT), editctrl_ctrl_a);
- HCONTACT hcnt = hContact;
+ MCONTACT hcnt = hContact;
if(metaIsProtoMetaContacts(hcnt))
hcnt = metaGetMostOnline(hcnt);
TranslateDialogDefault(hwndDlg);
@@ -883,7 +883,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_ts(hcnt, szGPGModuleName, "GPGPubKey", key_buf.substr(ws1,ws2-ws1).c_str());
}
@@ -903,7 +903,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam string output;
DWORD exitcode;
{
- HCONTACT hcnt = hContact;
+ MCONTACT hcnt = hContact;
if(metaIsProtoMetaContacts(hcnt))
hcnt = metaGetMostOnline(hcnt);
ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T(""));
@@ -947,7 +947,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_unset(hcnt, szGPGModuleName, "bAlwatsTrust");
}
@@ -978,7 +978,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_s(hcnt, szGPGModuleName, "KeyID", tmp2);
}
@@ -1027,7 +1027,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_s(hcnt, szGPGModuleName, "KeyMainName", output.substr(s,s2-s-1).c_str());
}
@@ -1064,7 +1064,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_s(hcnt, szGPGModuleName, "KeyComment", output.substr(s2,s-s2).c_str());
}
@@ -1090,7 +1090,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_s(hcnt, szGPGModuleName, "KeyMainEmail", output.substr(s,s2-s).c_str());
}
@@ -1119,7 +1119,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
db_set_s(hcnt, szGPGModuleName, "KeyMainEmail", output.substr(s2,s-s2).c_str());
}
@@ -1190,7 +1190,7 @@ static INT_PTR CALLBACK DlgProcLoadPublicKey(HWND hwndDlg,UINT msg,WPARAM wParam int count = metaGetContactsNum(hContact);
for(int i = 0; i < count; i++)
{
- HCONTACT hcnt = metaGetSubcontact(hContact, i);
+ MCONTACT hcnt = metaGetSubcontact(hContact, i);
if(hcnt)
{
if(!isContactSecured(hcnt))
diff --git a/plugins/New_GPG/src/srmm.cpp b/plugins/New_GPG/src/srmm.cpp index 542312213d..154ff32c3d 100644 --- a/plugins/New_GPG/src/srmm.cpp +++ b/plugins/New_GPG/src/srmm.cpp @@ -18,8 +18,8 @@ #include "commonheaders.h"
-void ShowStatusIcon(HCONTACT hContact);
-void setSrmmIcon(HCONTACT hContact);
+void ShowStatusIcon(MCONTACT hContact);
+void setSrmmIcon(MCONTACT hContact);
int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) {
@@ -34,8 +34,8 @@ int __cdecl onWindowEvent(WPARAM wParam, LPARAM lParam) { int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
- HCONTACT hMeta = NULL;
+ MCONTACT hContact = (MCONTACT)wParam;
+ MCONTACT hMeta = NULL;
if(metaIsProtoMetaContacts(hContact))
{
hMeta = hContact;
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index 1170542944..c2d1be1b0f 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -18,7 +18,7 @@ #include "commonheaders.h" -TCHAR* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef) +TCHAR* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef) { DBVARIANT dbv = {DBVT_DELETED}; TCHAR* szRes = NULL; @@ -33,7 +33,7 @@ TCHAR* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule return szRes; } -char* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, char* szDef) +char* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, char* szDef) { DBVARIANT dbv = {DBVT_DELETED}; char* szRes = NULL; @@ -138,14 +138,14 @@ void GetFolderPath(TCHAR *WindowTittle, char *szSetting) INT_PTR LoadKey(WPARAM w, LPARAM l) { void ShowLoadPublicKeyDialog(); - user_data[1] = (HCONTACT)w; + user_data[1] = (MCONTACT)w; ShowLoadPublicKeyDialog(); return 0; } INT_PTR SendKey(WPARAM w, LPARAM l) { - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; if(metaIsProtoMetaContacts(hContact)) hContact = metaGetMostOnline(hContact); char *szMessage; @@ -201,7 +201,7 @@ extern HGENMENU hToggleEncryption, hSendKey; INT_PTR ToggleEncryption(WPARAM w, LPARAM l) { - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; BYTE enc = 0; if(metaIsProtoMetaContacts(hContact)) enc = db_get_b(metaGetMostOnline(hContact), szGPGModuleName, "GPGEncryption", 0); @@ -214,7 +214,7 @@ INT_PTR ToggleEncryption(WPARAM w, LPARAM l) int count = metaGetContactsNum(hContact); for(int i = 0; i < count; i++) { - HCONTACT hcnt = metaGetSubcontact(hContact, i); + MCONTACT hcnt = metaGetSubcontact(hContact, i); if(hcnt) db_set_b(hcnt, szGPGModuleName, "GPGEncryption", enc?0:1); } @@ -223,8 +223,8 @@ INT_PTR ToggleEncryption(WPARAM w, LPARAM l) } else db_set_b(hContact, szGPGModuleName, "GPGEncryption", enc?0:1); - void setSrmmIcon(HCONTACT hContact); - void setClistIcon(HCONTACT hContact); + void setSrmmIcon(MCONTACT hContact); + void setClistIcon(MCONTACT hContact); setSrmmIcon(hContact); setClistIcon(hContact); enc = enc?0:1; @@ -237,7 +237,7 @@ INT_PTR ToggleEncryption(WPARAM w, LPARAM l) int OnPreBuildContactMenu(WPARAM w, LPARAM l) { - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; if(metaIsProtoMetaContacts(hContact)) hContact = metaGetMostOnline(hContact); @@ -473,12 +473,12 @@ int onProtoAck(WPARAM w, LPARAM l) return 0; } -std::wstring encrypt_file(HCONTACT hContact, TCHAR *filename) +std::wstring encrypt_file(MCONTACT hContact, TCHAR *filename) { string out; DWORD code; pxResult result; - HCONTACT hcnt = metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact; + MCONTACT hcnt = metaIsProtoMetaContacts(hContact)?metaGetMostOnline(hContact):hContact; std::vector<wstring> cmd; cmd.push_back(L"--batch"); cmd.push_back(L"--tes"); @@ -638,7 +638,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) } -void HistoryLog(HCONTACT hContact, db_event evt) +void HistoryLog(MCONTACT hContact, db_event evt) { DBEVENTINFO Event = { sizeof(Event) }; Event.szModule = szGPGModuleName; @@ -719,7 +719,7 @@ static JABBER_HANDLER_FUNC SendHandler(IJabberInterface *ji, HXML node, void *pU LPCTSTR attr = xi.getAttrValue(local_node, _T("to")); if(attr) { - HCONTACT hContact = ji->ContactFromJID(attr); + MCONTACT hContact = ji->ContactFromJID(attr); if(hContact) if(!isContactSecured(hContact)) return FALSE; @@ -1009,7 +1009,7 @@ static JABBER_HANDLER_FUNC PrescenseHandler(IJabberInterface *ji, HXML node, voi string::size_type p2 = out.find("\n", p1); if(p1 != string::npos && p2 != string::npos) { - HCONTACT hContact = NULL; + MCONTACT hContact = NULL; { extern list <JabberAccount*> Accounts; list <JabberAccount*>::iterator p = Accounts.begin(); @@ -1070,7 +1070,7 @@ void AddHandlers() } } -bool isContactSecured(HCONTACT hContact) +bool isContactSecured(MCONTACT hContact) { BYTE gpg_enc = db_get_b(hContact, szGPGModuleName, "GPGEncryption", 0); if(!gpg_enc) @@ -1096,7 +1096,7 @@ bool isContactSecured(HCONTACT hContact) return true; } -bool isContactHaveKey(HCONTACT hContact) +bool isContactHaveKey(MCONTACT hContact) { TCHAR *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", _T("")); if(_tcslen(key) > 0) @@ -1215,7 +1215,7 @@ const bool StriStr(const char *str, const char *substr) return i; } -bool IsOnline(HCONTACT hContact) +bool IsOnline(MCONTACT hContact) { if(db_get_b(hContact, szGPGModuleName, "Status", 0) == ID_STATUS_OFFLINE) return false; @@ -1226,7 +1226,7 @@ bool IsOnline(HCONTACT hContact) #include <process.h> struct TFakeAckParams { - inline TFakeAckParams( HANDLE p1, HCONTACT p2, LONG p3, LPCSTR p4 ) : + inline TFakeAckParams( HANDLE p1, MCONTACT p2, LONG p3, LPCSTR p4 ) : hEvent( p1 ), hContact( p2 ), id( p3 ), @@ -1234,12 +1234,12 @@ struct TFakeAckParams { {} HANDLE hEvent; - HCONTACT hContact; + MCONTACT hContact; LONG id; LPCSTR msg; }; -__forceinline int SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam) +__forceinline int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam) { return ProtoBroadcastAck( GetContactProto(hContact), hContact, type, result, hProcess, lParam); } @@ -1262,7 +1262,7 @@ unsigned __stdcall sttFakeAck( LPVOID param ) } -int returnNoError(HCONTACT hContact) { +int returnNoError(MCONTACT hContact) { HANDLE hEvent = CreateEvent( NULL, TRUE, FALSE, NULL ); unsigned int tID; CloseHandle( (HANDLE) _beginthreadex(NULL, 0, sttFakeAck, new TFakeAckParams(hEvent,hContact,777,0), 0, &tID) ); @@ -1320,7 +1320,7 @@ string get_random(int length) void send_encrypted_msgs_thread(void *param) { - HCONTACT hContact = (HCONTACT)param; + MCONTACT hContact = (MCONTACT)param; while(true) { //char *key = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", ""); @@ -1394,7 +1394,7 @@ void ExportGpGKeysFunc(int type) if(!file.is_open()) return; //TODO: handle error if(!type || type == 2) { - for(HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + for(MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { char *k = UniGetContactSettingUtf(hContact, szGPGModuleName, "GPGPubKey", ""); std::string key; if(!k[0]) @@ -1681,7 +1681,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l) if(acc.length()) { const char * uid = (const char*)CallProtoService(acc.c_str(), PS_GETCAPS, (WPARAM)PFLAG_UNIQUEIDSETTING, 0); - for(HCONTACT hContact = db_find_first(acc.c_str()); hContact; hContact = db_find_next(hContact, acc.c_str())) { + for(MCONTACT hContact = db_find_first(acc.c_str()); hContact; hContact = db_find_next(hContact, acc.c_str())) { DBVARIANT dbv = {0}; db_get(hContact, acc.c_str(), uid, &dbv); std::string id; @@ -1754,7 +1754,7 @@ INT_PTR ImportGpGKeys(WPARAM w, LPARAM l) string output; DWORD exitcode; { - HCONTACT hcnt = hContact; + MCONTACT hcnt = hContact; ptmp = UniGetContactSettingUtf(NULL, szGPGModuleName, "szHomePath", _T("")); path = ptmp; mir_free(ptmp); diff --git a/plugins/New_GPG/src/utilities.h b/plugins/New_GPG/src/utilities.h index 3b884a3846..32a99ea716 100644 --- a/plugins/New_GPG/src/utilities.h +++ b/plugins/New_GPG/src/utilities.h @@ -16,22 +16,22 @@ #ifndef UTILITIES_H
#define UTILITIES_H
-TCHAR* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef);
-char* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, char* szDef);
+TCHAR* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef);
+char* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, char* szDef);
void GetFilePath(TCHAR *WindowTittle, char *szSetting, TCHAR *szExt, TCHAR *szExtDesc);
TCHAR *GetFilePath(TCHAR *WindowTittle, TCHAR *szExt, TCHAR *szExtDesc, bool save_file = false);
void GetFolderPath(TCHAR *WindowTittle, char *szSetting);
void storeOutput(HANDLE ahandle, string *output);
-void setSrmmIcon(HCONTACT);
-void setClistIcon(HCONTACT);
+void setSrmmIcon(MCONTACT);
+void setClistIcon(MCONTACT);
-void send_encrypted_msgs_thread(void*); +void send_encrypted_msgs_thread(void*);
int ComboBoxAddStringUtf(HWND hCombo, const TCHAR *szString, DWORD data);
-bool isContactSecured(HCONTACT hContact);
-bool isContactHaveKey(HCONTACT hContact);
+bool isContactSecured(MCONTACT hContact);
+bool isContactHaveKey(MCONTACT hContact);
bool isTabsrmmUsed();
bool isGPGKeyExist();
bool isGPGValid();
@@ -104,7 +104,7 @@ public: cbSize = 0;
}
};
-void HistoryLog(HCONTACT, db_event);
+void HistoryLog(MCONTACT, db_event);
void fix_line_term(std::string &s);
void fix_line_term(std::wstring &s);
void strip_line_term(std::wstring &s);
diff --git a/plugins/NewsAggregator/Src/Authentication.cpp b/plugins/NewsAggregator/Src/Authentication.cpp index baacf5ac69..2ff61ebaef 100644 --- a/plugins/NewsAggregator/Src/Authentication.cpp +++ b/plugins/NewsAggregator/Src/Authentication.cpp @@ -19,7 +19,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
-void CreateAuthString(char *auth, HCONTACT hContact, HWND hwndDlg)
+void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg)
{
DBVARIANT dbv;
char *user = NULL, *pass = NULL;
diff --git a/plugins/NewsAggregator/Src/CheckFeed.cpp b/plugins/NewsAggregator/Src/CheckFeed.cpp index 18a42881ef..d58176e3f7 100644 --- a/plugins/NewsAggregator/Src/CheckFeed.cpp +++ b/plugins/NewsAggregator/Src/CheckFeed.cpp @@ -77,7 +77,7 @@ TCHAR * CheckFeed(TCHAR *tszURL, HWND hwndDlg) return NULL;
}
-VOID CheckCurrentFeed(HCONTACT hContact)
+VOID CheckCurrentFeed(MCONTACT hContact)
{
char *szData = NULL;
DBVARIANT dbURL = {0};
@@ -599,7 +599,7 @@ VOID CheckCurrentFeed(HCONTACT hContact) }
}
-VOID CheckCurrentFeedAvatar(HCONTACT hContact)
+VOID CheckCurrentFeedAvatar(MCONTACT hContact)
{
char *szData = NULL;
DBVARIANT dbURL = {0};
diff --git a/plugins/NewsAggregator/Src/Common.h b/plugins/NewsAggregator/Src/Common.h index 50241d3234..48371e702f 100644 --- a/plugins/NewsAggregator/Src/Common.h +++ b/plugins/NewsAggregator/Src/Common.h @@ -62,7 +62,7 @@ extern TCHAR tszRoot[MAX_PATH]; struct ItemInfo
{
HWND hwndList;
- HCONTACT hContact;
+ MCONTACT hContact;
int SelNumber;
TCHAR nick[MAX_PATH];
TCHAR url[MAX_PATH];
@@ -71,7 +71,7 @@ struct ItemInfo //============ STRUCT USED TO MAKE AN UPDATE LIST ============
struct NEWSCONTACTLIST {
- HCONTACT hContact;
+ MCONTACT hContact;
struct NEWSCONTACTLIST *next;
};
@@ -80,7 +80,7 @@ typedef struct NEWSCONTACTLIST UPDATELIST; extern UPDATELIST *UpdateListHead;
extern UPDATELIST *UpdateListTail;
-void UpdateListAdd(HCONTACT hContact);
+void UpdateListAdd(MCONTACT hContact);
void UpdateThreadProc(LPVOID AvatarCheck);
void DestroyUpdateList(void);
@@ -119,26 +119,26 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
-BOOL IsMyContact(HCONTACT hContact);
-VOID GetNewsData(TCHAR *szUrl, char** szData, HCONTACT hContact, HWND hwndDlg);
+BOOL IsMyContact(MCONTACT hContact);
+VOID GetNewsData(TCHAR *szUrl, char** szData, MCONTACT hContact, HWND hwndDlg);
VOID CreateList(HWND hwndList);
VOID UpdateList(HWND hwndList);
VOID DeleteAllItems(HWND hwndList);
time_t __stdcall DateToUnixTime(TCHAR *stamp, BOOL FeedType);
-VOID CheckCurrentFeed(HCONTACT hContact);
-VOID CheckCurrentFeedAvatar(HCONTACT hContact);
+VOID CheckCurrentFeed(MCONTACT hContact);
+VOID CheckCurrentFeedAvatar(MCONTACT hContact);
TCHAR* CheckFeed(TCHAR* tszURL, HWND hwndDlg);
void UpdateMenu(BOOL State);
int ImportFeedsDialog();
VOID ClearText(TCHAR *&message);
BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal);
int StrReplace(TCHAR *lpszOld, TCHAR *lpszNew, TCHAR *&lpszStr);
-void CreateAuthString(char *auth, HCONTACT hContact, HWND hwndDlg);
+void CreateAuthString(char *auth, MCONTACT hContact, HWND hwndDlg);
INT_PTR CALLBACK AuthenticationProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-HCONTACT GetContactByNick(const TCHAR *nick);
-HCONTACT GetContactByURL(const TCHAR *url);
+MCONTACT GetContactByNick(const TCHAR *nick);
+MCONTACT GetContactByURL(const TCHAR *url);
// =============== NewsAggregator SERVICES ================
// Check all Feeds info
diff --git a/plugins/NewsAggregator/Src/ExportImport.cpp b/plugins/NewsAggregator/Src/ExportImport.cpp index 02c84365e0..3dc225ec06 100644 --- a/plugins/NewsAggregator/Src/ExportImport.cpp +++ b/plugins/NewsAggregator/Src/ExportImport.cpp @@ -148,7 +148,7 @@ INT_PTR CALLBACK DlgProcImportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM isGroupUTF = 1;
}
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
db_set_ts(hContact, MODULE, "Nick", title);
db_set_ts(hContact, MODULE, "URL", url);
@@ -468,7 +468,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
Utils_RestoreWindowPositionNoSize(hwndDlg, NULL, MODULE, "ExportDlg");
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
DBVARIANT dbVar = {0};
if (!db_get_ts(hContact, MODULE, "Nick", &dbVar)) {
SendMessage(FeedsList, LB_ADDSTRING, 0, (LPARAM)dbVar.ptszVal);
@@ -516,7 +516,7 @@ INT_PTR CALLBACK DlgProcExportOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM for (int i = 0; i < count; i++) {
TCHAR item[MAX_PATH];
SendMessage(FeedsExportList, LB_GETTEXT, i, (LPARAM)item);
- HCONTACT hContact = GetContactByNick(item);
+ MCONTACT hContact = GetContactByNick(item);
TCHAR *title = NULL, *url = NULL, *siteurl = NULL, *group = NULL;
DBVARIANT dbv = {0};
if (!db_get_ts(hContact, MODULE, "Nick", &dbv)) {
diff --git a/plugins/NewsAggregator/Src/Options.cpp b/plugins/NewsAggregator/Src/Options.cpp index 52dc11f066..b7c104b65a 100644 --- a/plugins/NewsAggregator/Src/Options.cpp +++ b/plugins/NewsAggregator/Src/Options.cpp @@ -57,7 +57,7 @@ INT_PTR CALLBACK DlgProcAddFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break;
}
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)MODULE);
GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str));
db_set_ts(hContact, MODULE, "Nick", str);
@@ -154,7 +154,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, EM_LIMITTEXT, 3, 0);
SendDlgItemMessage(hwndDlg, IDC_TIMEOUT_VALUE_SPIN, UDM_SETRANGE32, 0, 999);
- HCONTACT hContact;
+ MCONTACT hContact;
for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrT dbNick( db_get_tsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
@@ -305,7 +305,7 @@ INT_PTR CALLBACK DlgProcChangeFeedOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_DESTROY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
Utils_SaveWindowPosition(hwndDlg, hContact, MODULE, "ChangeDlg");
WindowList_Remove(hChangeFeedDlgList, hwndDlg);
ItemInfo *SelItem = (ItemInfo *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
@@ -325,7 +325,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetWindowText(hwndDlg, TranslateT("Change Feed"));
SendDlgItemMessage(hwndDlg, IDC_CHECKTIME, UDM_SETRANGE32, 0, 999);
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
WindowList_Add(hChangeFeedDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, MODULE, "ChangeDlg");
DBVARIANT dbv;
@@ -361,7 +361,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (LOWORD(wParam)) {
case IDOK:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
TCHAR str[MAX_PATH];
char passw[MAX_PATH];
if (!GetDlgItemText(hwndDlg, IDC_FEEDTITLE, str, SIZEOF(str))) {
@@ -460,7 +460,7 @@ INT_PTR CALLBACK DlgProcChangeFeedMenu(HWND hwndDlg, UINT msg, WPARAM wParam, LP break;
case WM_DESTROY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
Utils_SaveWindowPosition(hwndDlg, hContact, MODULE, "ChangeDlg");
WindowList_Remove(hChangeFeedDlgList, hwndDlg);
}
@@ -505,7 +505,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA ListView_GetItemText(hwndList, sel, 0, nick, MAX_PATH);
ListView_GetItemText(hwndList, sel, 1, url, MAX_PATH);
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrT dbNick( db_get_tsa(hContact, MODULE, "Nick"));
if (dbNick == NULL)
break;
@@ -547,7 +547,7 @@ INT_PTR CALLBACK UpdateNotifyOptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA {
db_set_b(NULL, MODULE, "StartupRetrieve", IsDlgButtonChecked(hwndDlg, IDC_STARTUPRETRIEVE));
int i = 0;
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
db_set_b(hContact, MODULE, "CheckState", ListView_GetCheckState(hwndList, i));
if (!ListView_GetCheckState(hwndList, i))
db_set_b(hContact, "CList", "Hidden", 1);
diff --git a/plugins/NewsAggregator/Src/Services.cpp b/plugins/NewsAggregator/Src/Services.cpp index 8f508afdc0..5ee8862342 100644 --- a/plugins/NewsAggregator/Src/Services.cpp +++ b/plugins/NewsAggregator/Src/Services.cpp @@ -23,7 +23,7 @@ int g_nStatus = ID_STATUS_ONLINE; UINT_PTR timerId = 0;
HANDLE hTBButton = NULL, hNewsAggregatorFolder = NULL;
-void SetContactStatus(HCONTACT hContact, int nNewStatus)
+void SetContactStatus(MCONTACT hContact, int nNewStatus)
{
if(db_get_w(hContact, MODULE, "Status", ID_STATUS_ONLINE) != nNewStatus)
db_set_w(hContact, MODULE, "Status", nNewStatus);
@@ -33,7 +33,7 @@ static void __cdecl WorkingThread(void* param) {
int nStatus = (int)param;
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE))
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE))
SetContactStatus(hContact, nStatus);
}
@@ -51,7 +51,7 @@ int NewsAggrInit(WPARAM wParam, LPARAM lParam) else
lstrcpyn(tszRoot, VARST( _T("%miranda_userdata%\\Avatars\\"_T(DEFAULT_AVATARS_FOLDER))), SIZEOF(tszRoot));
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (!db_get_b(NULL, MODULE, "StartupRetrieve", 1))
db_set_dw(hContact, MODULE, "LastCheck", time(NULL));
SetContactStatus(hContact, ID_STATUS_ONLINE);
@@ -139,7 +139,7 @@ INT_PTR NewsAggrLoadIcon(WPARAM wParam, LPARAM lParam) static void __cdecl AckThreadProc(void *param)
{
Sleep(100);
- ProtoBroadcastAck(MODULE, (HCONTACT)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(MODULE, (MCONTACT)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam)
@@ -151,7 +151,7 @@ INT_PTR NewsAggrGetInfo(WPARAM wParam, LPARAM lParam) INT_PTR CheckAllFeeds(WPARAM wParam, LPARAM lParam)
{
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (lParam && db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME))
UpdateListAdd(hContact);
else if (!lParam)
@@ -172,7 +172,7 @@ INT_PTR AddFeed(WPARAM wParam, LPARAM lParam) INT_PTR ChangeFeed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hChangeFeedDlg = WindowList_Find(hChangeFeedDlgList, hContact);
if (!hChangeFeedDlg) {
hChangeFeedDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_ADDFEED), NULL, DlgProcChangeFeedMenu, (LPARAM)hContact);
@@ -198,7 +198,7 @@ INT_PTR ExportFeeds(WPARAM wParam, LPARAM lParam) INT_PTR CheckFeed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if(IsMyContact(hContact))
UpdateListAdd(hContact);
if ( !ThreadRunning)
diff --git a/plugins/NewsAggregator/Src/Update.cpp b/plugins/NewsAggregator/Src/Update.cpp index be1d71be92..cbcc2efd0f 100644 --- a/plugins/NewsAggregator/Src/Update.cpp +++ b/plugins/NewsAggregator/Src/Update.cpp @@ -30,7 +30,7 @@ VOID CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) // only run if it is not current updating and the auto update option is enabled
if (!ThreadRunning && !Miranda_Terminated()) {
BOOL HaveUpdates = FALSE;
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
if (db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME)) {
double diff = difftime(time(NULL), db_get_dw(hContact, MODULE, "LastCheck", 0));
if (db_get_b(NULL, MODULE, "AutoUpdate", 1) != 0 && diff >= db_get_dw(hContact, MODULE, "UpdateTime", DEFAULT_UPDATE_TIME) * 60) {
@@ -58,7 +58,7 @@ VOID CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) }
}
-void UpdateListAdd(HCONTACT hContact)
+void UpdateListAdd(MCONTACT hContact)
{
UPDATELIST *newItem = (UPDATELIST*)mir_alloc(sizeof(UPDATELIST));
newItem->hContact = hContact;
@@ -74,9 +74,9 @@ void UpdateListAdd(HCONTACT hContact) ReleaseMutex(hUpdateMutex);
}
-HCONTACT UpdateGetFirst()
+MCONTACT UpdateGetFirst()
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
WaitForSingleObject(hUpdateMutex, INFINITE);
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index c361b08485..3ac7545883 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -22,7 +22,7 @@ Boston, MA 02111-1307, USA. HANDLE hNetlibUser = NULL, hNetlibHttp;
BOOL UpdateListFlag = FALSE;
-BOOL IsMyContact(HCONTACT hContact)
+BOOL IsMyContact(MCONTACT hContact)
{
const char *szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(MODULE, szProto) == 0;
@@ -58,7 +58,7 @@ static void arrayToHex(BYTE *data, size_t datasz, char *res) *resptr = '\0';
}
-VOID GetNewsData(TCHAR *tszUrl, char **szData, HCONTACT hContact, HWND hwndDlg)
+VOID GetNewsData(TCHAR *tszUrl, char **szData, MCONTACT hContact, HWND hwndDlg)
{
NETLIBHTTPREQUEST nlhr = {0};
@@ -155,7 +155,7 @@ VOID UpdateList(HWND hwndList) // Initialize LVITEM members that are common to all
// items.
int i = 0;
- for (HCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
+ for (MCONTACT hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
UpdateListFlag = TRUE;
lvI.mask = LVIF_TEXT;
lvI.iSubItem = 0;
@@ -562,9 +562,9 @@ VOID ClearText(TCHAR *&message) CoUninitialize();
}
-HCONTACT GetContactByNick(const TCHAR *nick)
+MCONTACT GetContactByNick(const TCHAR *nick)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactNick(::db_get_wsa(hContact, MODULE, "Nick"));
@@ -574,9 +574,9 @@ HCONTACT GetContactByNick(const TCHAR *nick) return hContact;
}
-HCONTACT GetContactByURL(const TCHAR *url)
+MCONTACT GetContactByURL(const TCHAR *url)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
for (hContact = db_find_first(MODULE); hContact; hContact = db_find_next(hContact, MODULE)) {
ptrW contactURL(::db_get_wsa(hContact, MODULE, "URL"));
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp index 49c30e0f5a..f9404d1a3c 100644 --- a/plugins/NoHistory/src/dllmain.cpp +++ b/plugins/NoHistory/src/dllmain.cpp @@ -4,7 +4,7 @@ HINSTANCE hInst; int hLangpack = 0;
// add icon to srmm status icons
-static void SrmmMenu_UpdateIcon(HCONTACT hContact);
+static void SrmmMenu_UpdateIcon(MCONTACT hContact);
static int SrmmMenu_ProcessEvent(WPARAM wParam, LPARAM lParam);
static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam);
@@ -20,7 +20,7 @@ CRITICAL_SECTION list_cs; // a list of db events - we'll check them for the 'read' flag periodically and delete them whwen marked as read
struct EventListNode {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDBEvent;
EventListNode *next;
};
@@ -54,7 +54,7 @@ extern "C" __declspec (dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirand return &pluginInfo;
}
-void RemoveReadEvents(HCONTACT hContact = 0)
+void RemoveReadEvents(MCONTACT hContact = 0)
{
DBEVENTINFO info = { sizeof(info) };
bool remove;
@@ -97,7 +97,7 @@ void RemoveReadEvents(HCONTACT hContact = 0) LeaveCriticalSection(&list_cs);
}
-void RemoveAllEvents(HCONTACT hContact)
+void RemoveAllEvents(MCONTACT hContact)
{
HANDLE hDBEvent = db_event_first(hContact);
while(hDBEvent) {
@@ -114,7 +114,7 @@ void CALLBACK TimerProc(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDBEvent = (HANDLE)lParam;
// history not disabled for this contact
@@ -141,7 +141,7 @@ int OnDatabaseEventAdd(WPARAM wParam, LPARAM lParam) INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam)
{
if (MessageBox(0, TranslateT("This operation will PERMANENTLY REMOVE all history for this contact.\nAre you sure you want to do this?"), TranslateT("Clear History"), MB_YESNO | MB_ICONWARNING) == IDYES) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
RemoveAllEvents(hContact);
}
@@ -150,7 +150,7 @@ INT_PTR ServiceClear(WPARAM wParam, LPARAM lParam) int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
bool remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
char *proto = GetContactProto(hContact);
@@ -172,7 +172,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int remove = db_get_b(hContact, MODULE, DBSETTING_REMOVE, 0) != 0;
remove = !remove;
@@ -192,7 +192,7 @@ INT_PTR ServiceToggle(WPARAM wParam, LPARAM lParam) int WindowEvent(WPARAM wParam, LPARAM lParam)
{
MessageWindowEventData *mwd = (MessageWindowEventData *)lParam;
- HCONTACT hContact = mwd->hContact;
+ MCONTACT hContact = mwd->hContact;
switch(mwd->uType) {
case MSG_WINDOW_EVT_CLOSE:
@@ -218,7 +218,7 @@ int WindowEvent(WPARAM wParam, LPARAM lParam) int IconPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
StatusIconClickData *sicd = (StatusIconClickData *)lParam;
if (sicd->cbSize < (int)sizeof(StatusIconClickData))
return 0;
diff --git a/plugins/NoHistory/src/options.cpp b/plugins/NoHistory/src/options.cpp index 14fa6d0d10..a963e796a0 100644 --- a/plugins/NoHistory/src/options.cpp +++ b/plugins/NoHistory/src/options.cpp @@ -84,7 +84,7 @@ static void ResetListOptions(HWND hwndList) static void SetAllContactIcons(HWND hwndList)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
@@ -198,7 +198,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
bool chat_room = (proto && db_get_b(hContact, proto, "ChatRoom", 0) != 0);
diff --git a/plugins/Non-IM Contact/src/commonheaders.h b/plugins/Non-IM Contact/src/commonheaders.h index f40bdb8649..d7205aa895 100644 --- a/plugins/Non-IM Contact/src/commonheaders.h +++ b/plugins/Non-IM Contact/src/commonheaders.h @@ -101,13 +101,13 @@ INT_PTR exportContacts(WPARAM wParam,LPARAM lParam) ; INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
-void ExportContact(HCONTACT hContact);
+void ExportContact(MCONTACT hContact);
INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam);
// stringreplacer.c
-int stringReplacer(const char* oldString, char* newString, HCONTACT hContact);
-void replaceAllStrings(HCONTACT hContact);
-void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* module12, char* setting2);
+int stringReplacer(const char* oldString, char* newString, MCONTACT hContact);
+void replaceAllStrings(MCONTACT hContact);
+void WriteSetting(MCONTACT hContact, char* module1, char* setting1 , char* module12, char* setting2);
//timer.c
extern UINT_PTR timerId;
@@ -122,7 +122,7 @@ extern char *szInfo; extern char *szData;
extern HANDLE hNetlibUser;
-int db_get_static(HCONTACT hContact, const char *moduleName, const char *fn, char *buf);
+int db_get_static(MCONTACT hContact, const char *moduleName, const char *fn, char *buf);
#endif
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index 19f58a58d6..2daea133e2 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -5,7 +5,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
char name[2048];
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)(HANDLE)hContact);
@@ -26,7 +26,7 @@ INT_PTR CALLBACK DlgProcContactInfo(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_DISPLAY_NAME))) {
char text[512];
GetDlgItemTextA(hwnd,IDC_DISPLAY_NAME,text,sizeof(text));
@@ -112,7 +112,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
if (!hContact)
@@ -180,7 +180,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP switch(LOWORD(wParam)) {
case IDC_ALWAYS_VISIBLE:
if (IsDlgButtonChecked(hwnd, IDC_ALWAYS_VISIBLE)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwnd, IDC_VISIBLE_UNLESS_OFFLINE),1);
CheckDlgButton(hwnd, IDC_VISIBLE_UNLESS_OFFLINE, db_get_b(hContact, MODNAME ,"VisibleUnlessOffline", 1));
}
@@ -189,7 +189,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP case CHK_USE_TIMER:
if (IsDlgButtonChecked(hwnd, CHK_USE_TIMER)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
char string[4];
EnableWindow(GetDlgItem(hwnd, IDC_TIMER), 1);
SetDlgItemTextA(hwnd, IDC_TIMER, _itoa(db_get_w(hContact, MODNAME ,"Timer", 15), string, 10));
@@ -223,7 +223,7 @@ INT_PTR CALLBACK DlgProcOtherStuff(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
int status = GetLCStatus(0,0);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (GetWindowTextLength(GetDlgItem(hwnd,IDC_LINK))) {
char text[512];
@@ -304,7 +304,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) switch(msg) {
case WM_INITDIALOG:
{
- HCONTACT hContact = (HCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((PROPSHEETPAGE*)lParam)->lParam;
TranslateDialogDefault(hwnd);
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LPARAM)hContact);
}
@@ -314,7 +314,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
switch(LOWORD(wParam)) {
case IDC_EXPORT:
- ExportContact((HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA));
+ ExportContact((MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA));
break;
case IDC_DOIT:
@@ -324,7 +324,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) char dbVar1[2000], dbVar2[2000];
int i=0,j=0, k=0;
char *string = oldString[k];
- HCONTACT hContact1 = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ MCONTACT hContact1 = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
GetDlgItemTextA(hwnd, IDC_STRING_REPLACE, replace, GetWindowTextLength(GetDlgItem(hwnd, IDC_STRING_REPLACE)) +1);
if (db_get_static(hContact1, MODNAME, "Name", dbVar1)) {
// get the list of replace strings
@@ -347,7 +347,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) }
i++;
}
- hContact2 =(HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact2 =(MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact2,(LPARAM)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact2, IGNOREEVENT_USERONLINE);
db_set_s(hContact2, MODNAME, "Nick", Translate("New Non-IM Contact"));
@@ -401,9 +401,9 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) }
else {
char dbVar1[2000];
- HCONTACT hContact1 = (HCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
+ MCONTACT hContact1 = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA), hContact2;
if (db_get_static(hContact1, MODNAME, "Name", dbVar1)) {
- if (!(hContact2 = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact2 = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0))) {
msg("contact did not get created","");
return 0;
}
@@ -452,7 +452,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) return FALSE;
}
-void ExportContact(HCONTACT hContact)
+void ExportContact(MCONTACT hContact)
{
char szFileName[MAX_PATH];
char DBVar[1024];
@@ -495,7 +495,7 @@ void ExportContact(HCONTACT hContact) INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char name[256] = "", program[256] = "", programparam[256] = "", group[256] = "", tooltip[3000] = "", line[2001] = "";
int icon = 40072, usetimer = 0, minutes = 1, timer = 0;
char fn[MAX_PATH];
@@ -631,7 +631,7 @@ INT_PTR ImportContacts(WPARAM wParam, LPARAM lParam) }
if (MessageBoxA(0,msg,modFullname,MB_YESNO) == IDYES) {
- if (!(hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0))) {
msg("contact did get created","");
continue;
}
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index 6e12327403..8e7e7d2c04 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -239,7 +239,7 @@ static int CALLBACK PropSheetProc(HWND hwnd, UINT uMsg, LPARAM lParam) return 0;
}
-void DoPropertySheet(HCONTACT hContact, HINSTANCE hInst)
+void DoPropertySheet(MCONTACT hContact, HINSTANCE hInst)
{
char title[256], nick[256];
PROPSHEETPAGEA psp[4] = { 0 };
@@ -307,7 +307,7 @@ void DoPropertySheet(HCONTACT hContact, HINSTANCE hInst) INT_PTR addContact(WPARAM wParam,LPARAM lParam)
{
char tmp[256];
- HCONTACT hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
db_set_ts(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
@@ -320,10 +320,10 @@ INT_PTR addContact(WPARAM wParam,LPARAM lParam) INT_PTR editContact(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char tmp[256];
if (!hContact) {
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
db_set_s(hContact, MODNAME, "Nick", Translate("New Non-IM Contact"));
diff --git a/plugins/Non-IM Contact/src/files.cpp b/plugins/Non-IM Contact/src/files.cpp index 81f4dc3ca6..f5202e5b6d 100644 --- a/plugins/Non-IM Contact/src/files.cpp +++ b/plugins/Non-IM Contact/src/files.cpp @@ -14,7 +14,7 @@ INT_PTR exportContacts(WPARAM wParam,LPARAM lParam) if (!file)
return 0;
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
int tmp;
char DBVar[1024];
if (db_get_static(hContact, MODNAME, "Name", DBVar)) {
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp index 3aecdbb073..1d8b9cf623 100644 --- a/plugins/Non-IM Contact/src/main.cpp +++ b/plugins/Non-IM Contact/src/main.cpp @@ -28,13 +28,13 @@ INT_PTR doubleClick(WPARAM wParam,LPARAM lParam) {
char program[MAX_PATH], params[MAX_PATH];
int shellEXEerror = 0;
- char* proto = GetContactProto((HCONTACT)wParam);
+ char* proto = GetContactProto((MCONTACT)wParam);
if (proto && !strcmp(proto, MODNAME)) {
if (GetKeyState(VK_CONTROL)&0x8000) // ctrl is pressed
editContact((WPARAM)(HANDLE)wParam, (LPARAM)NULL); // for later when i add a second double click setting
- else if (db_get_static((HCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, ""))
+ else if (db_get_static((MCONTACT)wParam, MODNAME, "Program", program) && strcmp(program, ""))
{
- if (!db_get_static((HCONTACT)wParam, MODNAME, "ProgramParams", params) )
+ if (!db_get_static((MCONTACT)wParam, MODNAME, "ProgramParams", params) )
strcpy(params, "");
if (strstr(program, "http://") || strstr(program, "https://"))
CallService(MS_UTILS_OPENURL,1,(LPARAM)program);
diff --git a/plugins/Non-IM Contact/src/namereplacing.cpp b/plugins/Non-IM Contact/src/namereplacing.cpp index 428e4a912b..d8706731d9 100644 --- a/plugins/Non-IM Contact/src/namereplacing.cpp +++ b/plugins/Non-IM Contact/src/namereplacing.cpp @@ -232,7 +232,7 @@ void checkStringForcompare(char *str) }
// do save("A","B") A is DBVar name, B is value
-void checkStringForSave(HCONTACT hContact, char* str)
+void checkStringForSave(MCONTACT hContact, char* str)
{
char *A,*B,*newStr = (char*)malloc(strlen(str)),*copyOfStr = _strdup(str);
unsigned int i, j=0, s = (int)strlen(str);
@@ -258,7 +258,7 @@ void checkStringForSave(HCONTACT hContact, char* str) }
// do load("A") A is DBVar name
-void checkStringForLoad(HCONTACT hContact, char* str)
+void checkStringForLoad(MCONTACT hContact, char* str)
{
char *A,*newStr = (char*)malloc(strlen(str)),*copyOfStr = _strdup(str);
unsigned int i, j=0, s = (int)strlen(str);
@@ -432,7 +432,7 @@ int lastChecked(char *newStr, const char *str) // do icon(x) 0=offline, 1=online, 10=lunch
-void checkIcon(HCONTACT hContact, char* string)
+void checkIcon(MCONTACT hContact, char* string)
{
char* str = strstr(string,"icon(");
if (str) {
@@ -442,7 +442,7 @@ void checkIcon(HCONTACT hContact, char* string) }
}
-int stringReplacer(const char* oldString, char* newString, HCONTACT hContact)
+int stringReplacer(const char* oldString, char* newString, MCONTACT hContact)
{
char var_file[8];
int tempInt;
@@ -602,7 +602,7 @@ void stripWhiteSpace(char* string) i++;
}
}
-void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* module2, char* setting2)
+void WriteSetting(MCONTACT hContact, char* module1, char* setting1 , char* module2, char* setting2)
{
char text[MAX_STRING_LENGTH], newString[MAX_STRING_LENGTH];
int error = 0, status = GetLCStatus(0,0);
@@ -641,7 +641,7 @@ void WriteSetting(HCONTACT hContact, char* module1, char* setting1 , char* modul else db_set_w(hContact, MODNAME, "Status", ID_STATUS_OFFLINE);
}
-void replaceAllStrings(HCONTACT hContact)
+void replaceAllStrings(MCONTACT hContact)
{
char tmp1[256], tmp2[256], tmp3[256];
WriteSetting(hContact, MODNAME, "Name", MODNAME, "Nick");
diff --git a/plugins/Non-IM Contact/src/services.cpp b/plugins/Non-IM Contact/src/services.cpp index 4cfb8138df..8b2348f9c9 100644 --- a/plugins/Non-IM Contact/src/services.cpp +++ b/plugins/Non-IM Contact/src/services.cpp @@ -3,7 +3,7 @@ //=======================================================
//db_get_static
//=======================================================
-int db_get_static(HCONTACT hContact, const char *szModule, const char *szSetting, char *value)
+int db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *value)
{
DBVARIANT dbv;
if (!db_get(hContact, szModule, szSetting, &dbv))
@@ -79,7 +79,7 @@ int SetLCStatus(WPARAM wParam,LPARAM lParam) else if (db_get_w(NULL, MODNAME, "Timer",1))
startTimer(TIMER);
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
if (proto == NULL || strcmp(proto, MODNAME))
continue;
diff --git a/plugins/Non-IM Contact/src/timer.cpp b/plugins/Non-IM Contact/src/timer.cpp index 5b2af5798b..be73097219 100644 --- a/plugins/Non-IM Contact/src/timer.cpp +++ b/plugins/Non-IM Contact/src/timer.cpp @@ -40,7 +40,7 @@ void timerFunc(LPVOID di) }
/* update all the contacts */
- for (HCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
+ for (MCONTACT hContact = db_find_first(MODNAME); hContact; hContact = db_find_next(hContact, MODNAME)) {
int timer = db_get_w(hContact, MODNAME, "Timer", 15);
if (timer && !(timerCount % timer))
if (db_get_static(hContact, MODNAME, "Name", text))
diff --git a/plugins/NotesAndReminders/src/miscutils.cpp b/plugins/NotesAndReminders/src/miscutils.cpp index 3212495f2f..1ebc3fab85 100644 --- a/plugins/NotesAndReminders/src/miscutils.cpp +++ b/plugins/NotesAndReminders/src/miscutils.cpp @@ -27,7 +27,7 @@ void FreeSettingBlob(WORD pSize,void *pbBlob) db_free(&dbv);
}
-void ReadSettingBlob(HCONTACT hContact, char *ModuleName, char *SettingName, WORD *pSize, void **pbBlob)
+void ReadSettingBlob(MCONTACT hContact, char *ModuleName, char *SettingName, WORD *pSize, void **pbBlob)
{
DBVARIANT dbv = {0};
dbv.type = DBVT_BLOB;
@@ -41,12 +41,12 @@ void ReadSettingBlob(HCONTACT hContact, char *ModuleName, char *SettingName, WOR }
}
-void WriteSettingIntArray(HCONTACT hContact,char *ModuleName,char *SettingName,const int *Value, int Size)
+void WriteSettingIntArray(MCONTACT hContact,char *ModuleName,char *SettingName,const int *Value, int Size)
{
db_set_blob(hContact, ModuleName, SettingName, (void*)Value, sizeof(int)*Size);
}
-bool ReadSettingIntArray(HCONTACT hContact,char *ModuleName,char *SettingName,int *Value, int Size)
+bool ReadSettingIntArray(MCONTACT hContact,char *ModuleName,char *SettingName,int *Value, int Size)
{
WORD sz = 4096;
int *pData;
diff --git a/plugins/NotesAndReminders/src/miscutils.h b/plugins/NotesAndReminders/src/miscutils.h index e1fb803c0e..4e4df46115 100644 --- a/plugins/NotesAndReminders/src/miscutils.h +++ b/plugins/NotesAndReminders/src/miscutils.h @@ -1,13 +1,13 @@ -void ReadSettingBlob(HCONTACT hContact, char *ModuleName,
+void ReadSettingBlob(MCONTACT hContact, char *ModuleName,
char *SettingName, WORD *pSize, void **pbBlob);
void FreeSettingBlob(WORD pSize,void * pbBlob);
-BOOL ReadSettingBool(HCONTACT hContact,char *ModuleName,
+BOOL ReadSettingBool(MCONTACT hContact,char *ModuleName,
char *SettingName,BOOL Default);
-void WriteSettingBool(HCONTACT hContact,char *ModuleName,
+void WriteSettingBool(MCONTACT hContact,char *ModuleName,
char *SettingName,BOOL Value);
-void WriteSettingIntArray(HCONTACT hContact,char *ModuleName,
+void WriteSettingIntArray(MCONTACT hContact,char *ModuleName,
char *SettingName,const int *Value, int Size);
-bool ReadSettingIntArray(HCONTACT hContact,char *ModuleName,
+bool ReadSettingIntArray(MCONTACT hContact,char *ModuleName,
char *SettingName,int *Value, int Size);
WORD ConvertHotKeyToControl(WORD HK);
diff --git a/plugins/Nudge/src/headers.h b/plugins/Nudge/src/headers.h index a481e613b4..919d8fdb22 100644 --- a/plugins/Nudge/src/headers.h +++ b/plugins/Nudge/src/headers.h @@ -66,22 +66,22 @@ int Preview(); /*
*
****************************/
-HCONTACT Nudge_GethContact(HCONTACT);
+MCONTACT Nudge_GethContact(MCONTACT);
/*
*
****************************/
-void Nudge_ShowPopup(CNudgeElement, HCONTACT, TCHAR *);
+void Nudge_ShowPopup(CNudgeElement, MCONTACT, TCHAR *);
/*
*
****************************/
-void Nudge_ShowStatus(CNudgeElement, HCONTACT, DWORD timestamp);
+void Nudge_ShowStatus(CNudgeElement, MCONTACT, DWORD timestamp);
/*
*
****************************/
-void Nudge_SentStatus(CNudgeElement, HCONTACT);
+void Nudge_SentStatus(CNudgeElement, MCONTACT);
/*
*
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 2dffab3d52..3a0f14438f 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -41,7 +41,7 @@ INT_PTR NudgeShowMenu(WPARAM wParam,LPARAM lParam) INT_PTR NudgeSend(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *protoName = GetContactProto(hContact);
int diff = time(NULL) - db_get_dw(hContact, "Nudge", "LastSent", time(NULL) - 30);
if (diff < GlobalNudge.sendTimeSec) {
@@ -81,7 +81,7 @@ void OpenContactList() int NudgeReceived(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *protoName = GetContactProto(hContact);
DWORD currentTimestamp = time(NULL);
@@ -253,7 +253,7 @@ static int TabsrmmButtonInit(WPARAM wParam, LPARAM lParam) return 0;
}
-void HideNudgeButton(HCONTACT hContact)
+void HideNudgeButton(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (!ProtoServiceExists(szProto, PS_SEND_NUDGE)) {
@@ -379,7 +379,7 @@ void LoadPopupClass() int Preview()
{
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
if (GlobalNudge.useByProtocol) {
for (NudgeElementList *n = NudgeList; n != NULL; n = n->next) {
if (n->item.enabled) {
@@ -415,7 +415,7 @@ int Preview() return 0;
}
-void Nudge_ShowPopup(CNudgeElement n, HCONTACT hContact, TCHAR * Message)
+void Nudge_ShowPopup(CNudgeElement n, MCONTACT hContact, TCHAR * Message)
{
hContact = Nudge_GethContact(hContact);
TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
@@ -449,7 +449,7 @@ void Nudge_ShowPopup(CNudgeElement n, HCONTACT hContact, TCHAR * Message) else MessageBox(NULL, Message, lpzContactName, 0);
}
-void Nudge_SentStatus(CNudgeElement n, HCONTACT hContact)
+void Nudge_SentStatus(CNudgeElement n, MCONTACT hContact)
{
char *buff = mir_utf8encodeT(n.senText);
@@ -463,7 +463,7 @@ void Nudge_SentStatus(CNudgeElement n, HCONTACT hContact) INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0); //try to retrieve the metacontact if some
if (res != CALLSERVICE_NOTFOUND) {
- HCONTACT hMetaContact = (HCONTACT)res;
+ MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL) // metacontact
db_event_add(hMetaContact, &dbei);
}
@@ -472,7 +472,7 @@ void Nudge_SentStatus(CNudgeElement n, HCONTACT hContact) mir_free(buff);
}
-void Nudge_ShowStatus(CNudgeElement n, HCONTACT hContact, DWORD timestamp)
+void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp)
{
char *buff = mir_utf8encodeT(n.recText);
@@ -486,7 +486,7 @@ void Nudge_ShowStatus(CNudgeElement n, HCONTACT hContact, DWORD timestamp) INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0); //try to retrieve the metacontact if some
if (res != CALLSERVICE_NOTFOUND) {
- HCONTACT hMetaContact = (HCONTACT)res;
+ MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL) { //metacontact
db_event_add(hMetaContact, &dbei);
dbei.flags |= DBEF_READ;
@@ -497,11 +497,11 @@ void Nudge_ShowStatus(CNudgeElement n, HCONTACT hContact, DWORD timestamp) mir_free(buff);
}
-HCONTACT Nudge_GethContact(HCONTACT hContact)
+MCONTACT Nudge_GethContact(MCONTACT hContact)
{
INT_PTR res = CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
if (res != CALLSERVICE_NOTFOUND) {
- HCONTACT hMetaContact = (HCONTACT)res;
+ MCONTACT hMetaContact = (MCONTACT)res;
if (hMetaContact != NULL)
return hMetaContact;
}
diff --git a/plugins/Nudge/src/shake.cpp b/plugins/Nudge/src/shake.cpp index f42d028aba..3f6ff396bc 100644 --- a/plugins/Nudge/src/shake.cpp +++ b/plugins/Nudge/src/shake.cpp @@ -50,7 +50,7 @@ INT_PTR ShakeChat(WPARAM wParam, LPARAM lParam) MessageWindowInputData mwid;
mwd.cbSize = sizeof(MessageWindowData);
- mwd.hContact = Nudge_GethContact((HCONTACT)wParam);
+ mwd.hContact = Nudge_GethContact((MCONTACT)wParam);
mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH;
mwid.cbSize = sizeof(MessageWindowInputData);
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp index 1f85553a95..23f1a8359b 100644 --- a/plugins/PasteIt/src/PasteIt.cpp +++ b/plugins/PasteIt/src/PasteIt.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "stdafx.h"
PasteToWeb* pasteToWebs[PasteToWeb::pages];
-std::map<HCONTACT, HWND>* contactWindows;
+std::map<MCONTACT, HWND>* contactWindows;
DWORD gMirandaVersion;
HANDLE hModulesLoaded, hTabsrmmButtonPressed;
@@ -94,7 +94,7 @@ std::wstring GetFile() return L"";
}
-void PasteIt(HCONTACT hContact, int mode)
+void PasteIt(MCONTACT hContact, int mode)
{
PasteToWeb* pasteToWeb = pasteToWebs[Options::instance->defWeb];
if(mode == FROM_CLIPBOARD)
@@ -184,7 +184,7 @@ void PasteIt(HCONTACT hContact, int mode) // contactWindows map contains all opened hContact
// with assaigned to them chat windows.
// This map is prepared in ME_MSG_WINDOWEVENT event.
- std::map<HCONTACT, HWND>::iterator it = contactWindows->find(hContact);
+ std::map<MCONTACT, HWND>::iterator it = contactWindows->find(hContact);
if(it != contactWindows->end())
{
// it->second is imput window, so now I can send to them
@@ -212,7 +212,7 @@ void PasteIt(HCONTACT hContact, int mode) int TabsrmmButtonPressed(WPARAM wParam, LPARAM lParam)
{
CustomButtonClickData *cbc = (CustomButtonClickData *)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!strcmp(cbc->pszModule, MODULE) && cbc->dwButtonId == 1 && hContact)
{
@@ -274,7 +274,7 @@ int PrebuildContactMenu(WPARAM wParam, LPARAM lParam) {
bool bIsContact = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto && (INT_PTR)szProto != CALLSERVICE_NOTFOUND)
bIsContact = (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IM) != 0;
@@ -287,7 +287,7 @@ INT_PTR ContactMenuService(WPARAM wParam, LPARAM lParam) if(lParam >= DEF_PAGES_START)
Options::instance->SetDefWeb(lParam - DEF_PAGES_START);
else {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
PasteIt(hContact, lParam);
}
return 0;
@@ -384,7 +384,7 @@ int WindowEvent(WPARAM wParam, MessageWindowEventData* lParam) }
else if(lParam->uType == MSG_WINDOW_EVT_CLOSE)
{
- std::map<HCONTACT, HWND>::iterator it = contactWindows->find(lParam->hContact);
+ std::map<MCONTACT, HWND>::iterator it = contactWindows->find(lParam->hContact);
if(it != contactWindows->end())
{
contactWindows->erase(it);
@@ -429,7 +429,7 @@ extern "C" int __declspec(dllexport) Load(void) hOptionsInit = HookEvent(ME_OPT_INITIALISE, Options::InitOptions);
hTabsrmmButtonPressed = NULL;
hServiceContactMenu = CreateServiceFunction(MS_PASTEIT_CONTACTMENU, ContactMenuService);
- contactWindows = new std::map<HCONTACT, HWND>();
+ contactWindows = new std::map<MCONTACT, HWND>();
return 0;
}
diff --git a/plugins/Popup/src/avatars.cpp b/plugins/Popup/src/avatars.cpp index e40c13eb04..2130268d52 100644 --- a/plugins/Popup/src/avatars.cpp +++ b/plugins/Popup/src/avatars.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h"
-PopupAvatar *PopupAvatar::create(HCONTACT hContact)
+PopupAvatar *PopupAvatar::create(MCONTACT hContact)
{
if (hContact)
{
diff --git a/plugins/Popup/src/avatars.h b/plugins/Popup/src/avatars.h index 369940611f..9621bd13e9 100644 --- a/plugins/Popup/src/avatars.h +++ b/plugins/Popup/src/avatars.h @@ -42,7 +42,7 @@ public: inline int getWidth() { return width; }
inline int getHeight() { return height; }
- static PopupAvatar *create(HCONTACT hContact);
+ static PopupAvatar *create(MCONTACT hContact);
};
#endif // __avatars_h__
diff --git a/plugins/Popup/src/avatars_flash.h b/plugins/Popup/src/avatars_flash.h index a01919f242..351491f65a 100644 --- a/plugins/Popup/src/avatars_flash.h +++ b/plugins/Popup/src/avatars_flash.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class FlashAvatar: public PopupAvatar
{
public:
- FlashAvatar(HCONTACT hContact);
+ FlashAvatar(MCONTACT hContact);
virtual ~FlashAvatar();
virtual int activeFrameDelay() = 0;
virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options) = 0;
diff --git a/plugins/Popup/src/avatars_gif.cpp b/plugins/Popup/src/avatars_gif.cpp index 2297a3b5a9..c672f235b5 100644 --- a/plugins/Popup/src/avatars_gif.cpp +++ b/plugins/Popup/src/avatars_gif.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "headers.h"
-GifAvatar::GifAvatar(HCONTACT hContact): PopupAvatar((HANDLE)hContact)
+GifAvatar::GifAvatar(MCONTACT hContact): PopupAvatar((HANDLE)hContact)
{
av = (avatarCacheEntry *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
bIsAnimated = true;
diff --git a/plugins/Popup/src/avatars_gif.h b/plugins/Popup/src/avatars_gif.h index 51d6a6a7a0..e05a89c504 100644 --- a/plugins/Popup/src/avatars_gif.h +++ b/plugins/Popup/src/avatars_gif.h @@ -37,7 +37,7 @@ protected: SIZE frameSize;
public:
- GifAvatar(HCONTACT hContact);
+ GifAvatar(MCONTACT hContact);
virtual ~GifAvatar();
virtual int activeFrameDelay();
virtual void draw(MyBitmap *bmp, int x, int y, int w, int h, POPUPOPTIONS *options);
diff --git a/plugins/Popup/src/common.h b/plugins/Popup/src/common.h index 11bf939fd4..402f9ec4b0 100644 --- a/plugins/Popup/src/common.h +++ b/plugins/Popup/src/common.h @@ -51,7 +51,7 @@ inline int Byte2Percentile(int vByte) { return (vByte*100)/255; } inline int Percentile2Byte(int vPerc) { return (vPerc*255)/100; }
//===== Strings & MirandaDB ==================
-inline char *db_get_s(HCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default)
+inline char *db_get_s(MCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default)
{
DBVARIANT dbv;
db_get(hContact, ModuleName, SettingName, &dbv);
@@ -66,7 +66,7 @@ inline char *db_get_s(HCONTACT hContact, const char *ModuleName, const char *Set return result;
}
-inline INT_PTR DBGetContactSettingStringX(HCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default, const int retType)
+inline INT_PTR DBGetContactSettingStringX(MCONTACT hContact, const char *ModuleName, const char *SettingName, const char *Default, const int retType)
{
INT_PTR ret = NULL;
diff --git a/plugins/Popup/src/opt_contacts.cpp b/plugins/Popup/src/opt_contacts.cpp index 5e7f3494e7..1e0fd7a01d 100644 --- a/plugins/Popup/src/opt_contacts.cpp +++ b/plugins/Popup/src/opt_contacts.cpp @@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcContactOpts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM l switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
HWND hwndList = GetDlgItem(hwnd, IDC_LIST);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i) {
if (SendMessage(hwndList,CLM_GETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0))) {
@@ -117,7 +117,7 @@ static void sttResetListOptions(HWND hwndList) static void sttSetAllContactIcons(HWND hwndList)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
DWORD dwMode = db_get_b(hContact, MODULNAME, "ShowMode", 0);
for (int i=0; i < 4 /*SIZEOF(sttIcons)*/; ++i)
diff --git a/plugins/Popup/src/popup_wnd2.cpp b/plugins/Popup/src/popup_wnd2.cpp index 0a04b15a54..6a9a5a9b8b 100644 --- a/plugins/Popup/src/popup_wnd2.cpp +++ b/plugins/Popup/src/popup_wnd2.cpp @@ -933,17 +933,17 @@ LRESULT CALLBACK NullWindowProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM l struct ReplyEditData
{
HWND hwndPopup;
- HCONTACT hContact;
+ MCONTACT hContact;
WNDPROC oldWndProc;
};
-BOOL IsUtfSendAvailable(HCONTACT hContact)
+BOOL IsUtfSendAvailable(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL) return FALSE;
//check for MetaContact and get szProto from subcontact
if (strcmp(szProto, gszMetaProto)==0) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
if (!hSubContact)
return FALSE;
szProto = GetContactProto(hSubContact);
@@ -951,7 +951,7 @@ BOOL IsUtfSendAvailable(HCONTACT hContact) return(CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_IMSENDUTF) ? TRUE : FALSE;
}
-void AddMessageToDB(HCONTACT hContact, char *msg, int flag/*bool utf*/)
+void AddMessageToDB(MCONTACT hContact, char *msg, int flag/*bool utf*/)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -1078,7 +1078,7 @@ LRESULT CALLBACK PopupWnd2::WindowProc(UINT message, WPARAM wParam, LPARAM lPara break;
case UM_AVATARCHANGED:
- if ((HCONTACT)wParam == m_hContact)
+ if ((MCONTACT)wParam == m_hContact)
{
m_avatar->invalidate();
update();
@@ -1492,13 +1492,13 @@ void WindowThread(void *arg) // Menu Host
LRESULT CALLBACK MenuHostWndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- static HCONTACT hContact = NULL;
+ static MCONTACT hContact = NULL;
switch (message)
{
case UM_SHOWMENU:
{
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
POINT pt = {0};
HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT,(WPARAM)hContact,0);
GetCursorPos(&pt);
diff --git a/plugins/Popup/src/popup_wnd2.h b/plugins/Popup/src/popup_wnd2.h index 268bf9d372..870c00306e 100644 --- a/plugins/Popup/src/popup_wnd2.h +++ b/plugins/Popup/src/popup_wnd2.h @@ -68,7 +68,7 @@ private: // other data
Formula::Args m_args;
- HCONTACT m_hContact, m_hContactPassed;
+ MCONTACT m_hContact, m_hContactPassed;
WNDPROC m_PluginWindowProc;
void *m_PluginData;
@@ -162,8 +162,8 @@ public: char *getTime() { return m_time; }
HICON getIcon() { return m_hIcon; }
- HCONTACT getContact() { return m_hContact; }
- HCONTACT getContactPassed() { return m_hContactPassed; }
+ MCONTACT getContact() { return m_hContact; }
+ MCONTACT getContactPassed() { return m_hContactPassed; }
int getTimeout() { return m_iTimeout; }
HWND getHwnd() { return m_hwnd; }
void *getData() { return m_PluginData; }
diff --git a/plugins/Popup/src/srmm_menu.cpp b/plugins/Popup/src/srmm_menu.cpp index 655ab46604..5daf4ce463 100644 --- a/plugins/Popup/src/srmm_menu.cpp +++ b/plugins/Popup/src/srmm_menu.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. static HANDLE hDialogsList = NULL;
-static void SrmmMenu_UpdateIcon(HCONTACT hContact)
+static void SrmmMenu_UpdateIcon(MCONTACT hContact)
{
if (!hContact)
return;
@@ -73,7 +73,7 @@ static int SrmmMenu_ProcessIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, MODULNAME))
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp index fd52f59a93..32e17cb3a7 100644 --- a/plugins/QuickContacts/src/quickcontacts.cpp +++ b/plugins/QuickContacts/src/quickcontacts.cpp @@ -238,7 +238,7 @@ int EventAdded(WPARAM wparam, LPARAM lparam) struct c_struct {
TCHAR szname[120];
TCHAR szgroup[50];
- HCONTACT hcontact;
+ MCONTACT hcontact;
TCHAR proto[20];
c_struct()
@@ -321,7 +321,7 @@ void SortArray(void) }
-int GetStatus(HCONTACT hContact, char *proto = NULL)
+int GetStatus(MCONTACT hContact, char *proto = NULL)
{
if (proto == NULL)
proto = GetContactProto(hContact);
@@ -356,17 +356,17 @@ void LoadContacts(HWND hwndDlg, BOOL show_all) // item data of listbox-strings is the array position
FreeContacts();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *pszProto = GetContactProto(hContact);
if(pszProto == NULL)
continue;
// Get meta
- HCONTACT hMeta = NULL;
+ MCONTACT hMeta = NULL;
if (metacontactsEnabled)
{
if ((!show_all && opts.hide_subcontacts) || opts.group_append)
- hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
}
else
{
@@ -457,7 +457,7 @@ void LoadContacts(HWND hwndDlg, BOOL show_all) // Enable buttons for the selected contact
-void EnableButtons(HWND hwndDlg, HCONTACT hContact)
+void EnableButtons(HWND hwndDlg, MCONTACT hContact)
{
if (hContact == NULL)
{
@@ -476,7 +476,7 @@ void EnableButtons(HWND hwndDlg, HCONTACT hContact) // Is a meta?
if (ServiceExists(MS_MC_GETMOSTONLINECONTACT))
{
- HCONTACT hSub = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
+ MCONTACT hSub = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
if (hSub != NULL)
hContact = hSub;
}
@@ -544,7 +544,7 @@ int CheckText(HWND hdlg, TCHAR *sztext, BOOL only_enable = FALSE) return 0;
}
-HCONTACT GetSelectedContact(HWND hwndDlg)
+MCONTACT GetSelectedContact(HWND hwndDlg)
{
// First try selection
int sel = SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_GETCURSEL, 0, 0);
@@ -571,7 +571,7 @@ HCONTACT GetSelectedContact(HWND hwndDlg) }
// get array position from handle
-int GetItemPos(HCONTACT hcontact)
+int GetItemPos(MCONTACT hcontact)
{
for(int loop=0; loop < contacts.getCount(); loop++)
if(hcontact == contacts[loop]->hcontact)
@@ -817,7 +817,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA EnableButtons(hwndDlg, NULL);
if (db_get_b(NULL, MODULE_NAME, "EnableLastSentTo", 0)) {
- int pos = GetItemPos((HCONTACT)db_get_dw(NULL, MODULE_NAME, "LastSentTo", -1));
+ int pos = GetItemPos((MCONTACT)db_get_dw(NULL, MODULE_NAME, "LastSentTo", -1));
if (pos != -1) {
SendDlgItemMessage(hwndDlg, IDC_USERNAME, CB_SETCURSEL, (WPARAM) pos, 0);
EnableButtons(hwndDlg, contacts[pos]->hcontact);
@@ -840,7 +840,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_ENTER:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
break;
@@ -852,7 +852,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA break;
case IDC_MESSAGE:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -873,7 +873,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_VOICE:
case IDC_VOICE:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -897,7 +897,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_FILE:
case IDC_FILE:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -918,7 +918,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_URL:
case IDC_URL:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -939,7 +939,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_INFO:
case IDC_USERINFO:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -960,7 +960,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_HISTORY:
case IDC_HISTORY:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
@@ -981,7 +981,7 @@ static INT_PTR CALLBACK MainDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case HOTKEY_MENU:
case IDC_MENU:
{
- HCONTACT hContact = GetSelectedContact(hwndDlg);
+ MCONTACT hContact = GetSelectedContact(hwndDlg);
if (hContact == NULL)
{
SetDlgItemText(hwndDlg, IDC_USERNAME, _T(""));
diff --git a/plugins/QuickMessages/src/Utils.cpp b/plugins/QuickMessages/src/Utils.cpp index 66c4af7657..2612d16950 100644 --- a/plugins/QuickMessages/src/Utils.cpp +++ b/plugins/QuickMessages/src/Utils.cpp @@ -396,7 +396,7 @@ int RegisterCustomButton(WPARAM wParam,LPARAM lParam) return 0;
}
-TCHAR* ParseString(HCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptszClip,int QVSize,int TextSize ,int ClipSize)
+TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValIn,TCHAR* ptszText,TCHAR* ptszClip,int QVSize,int TextSize ,int ClipSize)
{
int i=0,iOffset=0,iCount=0;
TCHAR* tempPointer=NULL;
diff --git a/plugins/QuickMessages/src/Utils.h b/plugins/QuickMessages/src/Utils.h index 61faf79b31..3f4d11770c 100644 --- a/plugins/QuickMessages/src/Utils.h +++ b/plugins/QuickMessages/src/Utils.h @@ -75,4 +75,4 @@ void DestroyButton(int listnum); void SaveModuleSettings(int buttonnum,ButtonData* bd);
void CleanSettings(int buttonnum,int from);
DWORD BalanceButtons(int buttonsWas,int buttonsNow);
-TCHAR* ParseString(HCONTACT hContact,TCHAR* ptszQValueIn,TCHAR* ptszText,TCHAR* ptszClip,int QVSize,int TextSize ,int ClipSize);
+TCHAR* ParseString(MCONTACT hContact,TCHAR* ptszQValueIn,TCHAR* ptszText,TCHAR* ptszClip,int QVSize,int TextSize ,int ClipSize);
diff --git a/plugins/QuickReplies/src/events.cpp b/plugins/QuickReplies/src/events.cpp index a98de39b1e..e697f861e5 100644 --- a/plugins/QuickReplies/src/events.cpp +++ b/plugins/QuickReplies/src/events.cpp @@ -117,7 +117,7 @@ int OnButtonPressed(WPARAM wParam, LPARAM lParam) if (dbv.ptszVal == NULL)
replyList.push_back(_T(""));
else
- replyList.push_back((TCHAR*)variables_parsedup(dbv.ptszVal, 0, (HCONTACT)wParam));
+ replyList.push_back((TCHAR*)variables_parsedup(dbv.ptszVal, 0, (MCONTACT)wParam));
if (_tcscmp(dbv.ptszVal, _T("---")))
AppendMenu((HMENU)hMenu, MF_STRING, i + 1, replyList[i].c_str());
diff --git a/plugins/Quotes/src/DBUtils.cpp b/plugins/Quotes/src/DBUtils.cpp index 3fe5690273..1636419ac9 100644 --- a/plugins/Quotes/src/DBUtils.cpp +++ b/plugins/Quotes/src/DBUtils.cpp @@ -1,6 +1,6 @@ #include "StdAfx.h"
-std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/)
+std::string Quotes_DBGetStringA(MCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue /*= NULL*/)
{
std::string sResult;
char* pszSymbol = db_get_sa(hContact,szModule,szSetting);
@@ -17,7 +17,7 @@ std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const cha return sResult;
}
-std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/)
+std::wstring Quotes_DBGetStringW(MCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue/* = NULL*/)
{
std::wstring sResult;
wchar_t* pszSymbol = db_get_wsa(hContact,szModule,szSetting);
@@ -34,12 +34,12 @@ std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const ch return sResult;
}
-bool Quotes_DBWriteDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double dValue)
+bool Quotes_DBWriteDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double dValue)
{
return 0 == db_set_blob(hContact, szModule, szSetting, &dValue, sizeof(dValue));
}
-bool Quotes_DBReadDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue)
+bool Quotes_DBReadDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue)
{
DBVARIANT dbv = {0};
dbv.type = DBVT_BLOB;
diff --git a/plugins/Quotes/src/DBUtils.h b/plugins/Quotes/src/DBUtils.h index 330b953d27..8441bd61d6 100644 --- a/plugins/Quotes/src/DBUtils.h +++ b/plugins/Quotes/src/DBUtils.h @@ -1,13 +1,13 @@ #ifndef __54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
#define __54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
-std::string Quotes_DBGetStringA(HCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
-std::wstring Quotes_DBGetStringW(HCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
+std::string Quotes_DBGetStringA(MCONTACT hContact,const char* szModule,const char* szSetting,const char* pszDefValue = NULL);
+std::wstring Quotes_DBGetStringW(MCONTACT hContact,const char* szModule,const char* szSetting,const wchar_t* pszDefValue = NULL);
#define Quotes_DBGetStringT Quotes_DBGetStringW
-bool Quotes_DBWriteDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double dValue);
-bool Quotes_DBReadDouble(HCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue);
+bool Quotes_DBWriteDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double dValue);
+bool Quotes_DBReadDouble(MCONTACT hContact,const char* szModule,const char* szSetting,double& rdValue);
#endif //__54294385_3fdd_4f0c_98c3_c583a96e7fb4_DBUtils_h__
diff --git a/plugins/Quotes/src/ExtraImages.cpp b/plugins/Quotes/src/ExtraImages.cpp index 99350fab93..4d061a0651 100644 --- a/plugins/Quotes/src/ExtraImages.cpp +++ b/plugins/Quotes/src/ExtraImages.cpp @@ -23,7 +23,7 @@ void CExtraImages::RebuildExtraImages() {
}
-bool CExtraImages::SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)const
+bool CExtraImages::SetContactExtraImage(MCONTACT hContact,EImageIndex nIndex)const
{
if (!m_hExtraIcons)
return false;
@@ -47,7 +47,7 @@ bool CExtraImages::SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)con int QuotesEventFunc_onExtraImageApply(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
diff --git a/plugins/Quotes/src/ExtraImages.h b/plugins/Quotes/src/ExtraImages.h index f02bfbacf9..6099ee5f94 100644 --- a/plugins/Quotes/src/ExtraImages.h +++ b/plugins/Quotes/src/ExtraImages.h @@ -21,7 +21,7 @@ public: static CExtraImages& GetInstance();
void RebuildExtraImages();
- bool SetContactExtraImage(HCONTACT hContact,EImageIndex nIndex)const;
+ bool SetContactExtraImage(MCONTACT hContact,EImageIndex nIndex)const;
private:
mutable CLightMutex m_lmExtraImages;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp index 03a8565806..e148794ee1 100644 --- a/plugins/Quotes/src/Forex.cpp +++ b/plugins/Quotes/src/Forex.cpp @@ -191,7 +191,7 @@ namespace int QuotesEventFunc_OnContactDeleted(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
const CModuleInfo::TQuotesProvidersPtr& pProviders = CModuleInfo::GetQuoteProvidersPtr();
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
diff --git a/plugins/Quotes/src/IQuotesProvider.h b/plugins/Quotes/src/IQuotesProvider.h index a6359097b7..f72a68f3a0 100644 --- a/plugins/Quotes/src/IQuotesProvider.h +++ b/plugins/Quotes/src/IQuotesProvider.h @@ -22,13 +22,13 @@ public: virtual bool Init() = 0;
virtual const CProviderInfo& GetInfo()const = 0;
- virtual void AddContact(HCONTACT hContact) = 0;
- virtual void DeleteContact(HCONTACT hContact) = 0;
+ virtual void AddContact(MCONTACT hContact) = 0;
+ virtual void DeleteContact(MCONTACT hContact) = 0;
virtual void ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp) = 0;
virtual void RefreshAll() = 0;
- virtual void RefreshContact(HCONTACT hContact) = 0;
- virtual void SetContactExtraIcon(HCONTACT hContact)const = 0;
+ virtual void RefreshContact(MCONTACT hContact) = 0;
+ virtual void SetContactExtraIcon(MCONTACT hContact)const = 0;
virtual void Run() = 0;
diff --git a/plugins/Quotes/src/ImportExport.cpp b/plugins/Quotes/src/ImportExport.cpp index 6bf10e2de3..b41451ce8c 100644 --- a/plugins/Quotes/src/ImportExport.cpp +++ b/plugins/Quotes/src/ImportExport.cpp @@ -21,7 +21,7 @@ namespace {
CModuleInfo::TXMLEnginePtr m_pXmlEngine;
IXMLNode::TXMLNodePtr m_pNode;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
LPCSTR m_pszModule;
};
@@ -151,7 +151,7 @@ namespace return 0;
}
- IXMLNode::TXMLNodePtr export_contact(HCONTACT hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
+ IXMLNode::TXMLNodePtr export_contact(MCONTACT hContact,const CModuleInfo::TXMLEnginePtr& pXmlEngine)
{
IXMLNode::TXMLNodePtr pNode = pXmlEngine->CreateNode(g_pszXmlContact,tstring());
if(pNode)
@@ -271,7 +271,7 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp) CModuleInfo::TXMLEnginePtr pXmlEngine = CModuleInfo::GetInstance().GetXMLEnginePtr();
CModuleInfo::TQuotesProvidersPtr pProviders = CModuleInfo::GetInstance().GetQuoteProvidersPtr();
IXMLNode::TXMLNodePtr pRoot = pXmlEngine->CreateNode(g_pszXmlContacts,tstring());
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = pProviders->GetContactProviderPtr(hContact);
@@ -305,13 +305,13 @@ INT_PTR Quotes_Export(WPARAM wp,LPARAM lp) namespace
{
- bool set_contact_settings(HCONTACT hContact, DBCONTACTWRITESETTING& dbs)
+ bool set_contact_settings(MCONTACT hContact, DBCONTACTWRITESETTING& dbs)
{
assert(DBVT_DELETED != dbs.value.type);
return (0 == db_set(hContact, dbs.szModule, dbs.szSetting, &dbs.value));
}
- bool handle_module(HCONTACT hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
+ bool handle_module(MCONTACT hContact,const IXMLNode::TXMLNodePtr& pXmlModule,UINT nFlags)
{
size_t cCreatedRecords = 0;
tstring sModuleName = pXmlModule->GetText();
@@ -486,7 +486,7 @@ namespace struct CContactState
{
CContactState() : m_hContact(NULL),m_bNewContact(false){}
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
CQuotesProviders::TQuotesProviderPtr m_pProvider;
bool m_bNewContact;
};
@@ -566,7 +566,7 @@ namespace visitor(const IXMLNode::TXMLNodePtr& pXmlQuotes)
: m_hContact(NULL),m_pXmlQuotes(pXmlQuotes){}
- HCONTACT GetContact()const{return m_hContact;}
+ MCONTACT GetContact()const{return m_hContact;}
private:
virtual void Visit(const CQuotesProviderDukasCopy& rProvider)
@@ -644,7 +644,7 @@ namespace }
private:
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
IXMLNode::TXMLNodePtr m_pXmlQuotes;
};
@@ -674,7 +674,7 @@ namespace {
if(NULL == cst.m_hContact)
{
- cst.m_hContact = HCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
+ cst.m_hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
cst.m_bNewContact = true;
}
else if(impctx.m_nFlags"ES_IMPORT_SKIP_EXISTING_CONTACTS)
diff --git a/plugins/Quotes/src/QuoteChart.cpp b/plugins/Quotes/src/QuoteChart.cpp index 82c4eefe0d..17e304f4dc 100644 --- a/plugins/Quotes/src/QuoteChart.cpp +++ b/plugins/Quotes/src/QuoteChart.cpp @@ -31,7 +31,7 @@ namespace return pChart;
}
- bool read_log_file(HCONTACT hContact,TChart& rChart)
+ bool read_log_file(MCONTACT hContact,TChart& rChart)
{
tstring sLogFileName = GetContactLogFileName(hContact);
if(false == sLogFileName.empty())
@@ -90,7 +90,7 @@ namespace case WM_CREATE:
{
CREATESTRUCT* pCS = reinterpret_cast<CREATESTRUCT*>(lp);
- HCONTACT hContact = reinterpret_cast<HANDLE>(pCS->lpCreateParams);
+ MCONTACT hContact = reinterpret_cast<HANDLE>(pCS->lpCreateParams);
TChart* pChart = new TChart;
read_log_file(hContact,*pChart);
@@ -184,7 +184,7 @@ namespace inline HANDLE get_contact(HWND hWnd)
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ MCONTACT hContact = reinterpret_cast<HANDLE>(GetWindowLongPtr(hWnd,GWLP_USERDATA));
return hContact;
}
@@ -202,7 +202,7 @@ namespace {
case WM_INITDIALOG:
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(lp);
+ MCONTACT hContact = reinterpret_cast<HANDLE>(lp);
TranslateDialogDefault(hDlg);
@@ -260,7 +260,7 @@ namespace return (TRUE);
case WM_CLOSE:
{
- HCONTACT hContact = get_contact(hDlg);
+ MCONTACT hContact = get_contact(hDlg);
SetWindowLongPtr(hDlg,GWLP_USERDATA,0);
// save_options(hDlg,hContact);
@@ -370,7 +370,7 @@ namespace INT_PTR QuotesMenu_Chart(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = reinterpret_cast<HANDLE>(wp);
+ MCONTACT hContact = reinterpret_cast<HANDLE>(wp);
if(NULL == hContact)
{
return 0;
diff --git a/plugins/Quotes/src/QuoteInfoDlg.cpp b/plugins/Quotes/src/QuoteInfoDlg.cpp index a5be52dd9d..059ff40ae8 100644 --- a/plugins/Quotes/src/QuoteInfoDlg.cpp +++ b/plugins/Quotes/src/QuoteInfoDlg.cpp @@ -14,21 +14,21 @@ extern HGENMENU g_hMenuRefresh; namespace
{
- HCONTACT g_hContact;
+ MCONTACT g_hContact;
- inline bool IsMyContact(HCONTACT hContact)
+ inline bool IsMyContact(MCONTACT hContact)
{
CQuotesProviders::TQuotesProviderPtr pProvider = CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact);
return (NULL != pProvider);
}
- inline HCONTACT get_contact(HWND hWnd)
+ inline MCONTACT get_contact(HWND hWnd)
{
- return HCONTACT(GetWindowLongPtr(hWnd,GWLP_USERDATA));
+ return MCONTACT(GetWindowLongPtr(hWnd,GWLP_USERDATA));
}
- bool get_fetch_time(time_t& rTime,HCONTACT hContact)
+ bool get_fetch_time(time_t& rTime,MCONTACT hContact)
{
DBVARIANT dbv;
if (db_get(hContact, QUOTES_PROTOCOL_NAME, DB_STR_QUOTE_FETCH_TIME, &dbv) || (DBVT_DWORD != dbv.type))
@@ -38,7 +38,7 @@ namespace return true;
}
- INT_PTR CALLBACK QuoteInfoDlgProcImpl(HCONTACT hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
+ INT_PTR CALLBACK QuoteInfoDlgProcImpl(MCONTACT hContact,HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
switch(msg)
{
@@ -118,7 +118,7 @@ namespace int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(lp);
+ MCONTACT hContact = MCONTACT(lp);
if(NULL == hContact)
return 0;
@@ -141,7 +141,7 @@ int QuotesEventFunc_OnUserInfoInit(WPARAM wp,LPARAM lp) INT_PTR QuotesMenu_EditSettings(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
@@ -154,7 +154,7 @@ INT_PTR QuotesMenu_EditSettings(WPARAM wp,LPARAM lp) namespace
{
- bool get_log_file(HCONTACT hContact,tstring& rsLogfile)
+ bool get_log_file(MCONTACT hContact,tstring& rsLogfile)
{
rsLogfile = GetContactLogFileName(hContact);
return ((rsLogfile.empty()) ? false : true);
@@ -163,7 +163,7 @@ namespace INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
@@ -180,7 +180,7 @@ INT_PTR QuotesMenu_OpenLogFile(WPARAM wp,LPARAM lp) INT_PTR QuotesMenu_RefreshContact(WPARAM wp,LPARAM lp)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
@@ -201,11 +201,11 @@ namespace {
INT_PTR CALLBACK QuoteInfoDlgProc1(HWND hdlg,UINT msg,WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
switch(msg) {
case WM_INITDIALOG:
{
- hContact = HCONTACT(lParam);
+ hContact = MCONTACT(lParam);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,false);
assert(hWL);
WindowList_Add(hWL,hdlg,hContact);
@@ -220,7 +220,7 @@ namespace return FALSE;
case WM_DESTROY:
{
- HCONTACT hContact = get_contact(hdlg);
+ MCONTACT hContact = get_contact(hdlg);
if(hContact)
{
SetWindowLongPtr(hdlg,GWLP_USERDATA,0);
@@ -250,7 +250,7 @@ namespace int Quotes_OnContactDoubleClick(WPARAM wp,LPARAM/* lp*/)
{
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(CModuleInfo::GetQuoteProvidersPtr()->GetContactProviderPtr(hContact))
{
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_INFO,true);
@@ -291,7 +291,7 @@ int Quotes_PrebuildContactMenu(WPARAM wp,LPARAM lp) #endif
enable_menu(g_hMenuRefresh,false);
- HCONTACT hContact = HCONTACT(wp);
+ MCONTACT hContact = MCONTACT(wp);
if(NULL == hContact)
{
return 0;
diff --git a/plugins/Quotes/src/QuotesProviderBase.cpp b/plugins/Quotes/src/QuotesProviderBase.cpp index 462154c478..92b5099f70 100644 --- a/plugins/Quotes/src/QuotesProviderBase.cpp +++ b/plugins/Quotes/src/QuotesProviderBase.cpp @@ -238,7 +238,7 @@ bool CQuotesProviderBase::IsOnline() return ID_STATUS_ONLINE == g_nStatus;
}
-void CQuotesProviderBase::AddContact(HCONTACT hContact)
+void CQuotesProviderBase::AddContact(MCONTACT hContact)
{
// CCritSection cs(m_cs);
assert(m_aContacts.end() == std::find(m_aContacts.begin(),m_aContacts.end(),hContact));
@@ -246,7 +246,7 @@ void CQuotesProviderBase::AddContact(HCONTACT hContact) m_aContacts.push_back(hContact);
}
-void CQuotesProviderBase::DeleteContact(HCONTACT hContact)
+void CQuotesProviderBase::DeleteContact(MCONTACT hContact)
{
CGuard<CLightMutex> cs(m_cs);
@@ -257,7 +257,7 @@ void CQuotesProviderBase::DeleteContact(HCONTACT hContact) }
}
-void CQuotesProviderBase::SetContactStatus(HCONTACT hContact,int nNewStatus)
+void CQuotesProviderBase::SetContactStatus(MCONTACT hContact,int nNewStatus)
{
int nStatus = db_get_w(hContact,QUOTES_PROTOCOL_NAME,DB_STR_STATUS,ID_STATUS_OFFLINE);
if(nNewStatus != nStatus)
@@ -304,7 +304,7 @@ namespace public:
CTendency() : m_nComparison(NonValid){}
- bool Parse(const IQuotesProvider* pProvider,const tstring& rsFrmt,HCONTACT hContact)
+ bool Parse(const IQuotesProvider* pProvider,const tstring& rsFrmt,MCONTACT hContact)
{
m_abValueFlags[0] = false;
m_abValueFlags[1] = false;
@@ -460,7 +460,7 @@ namespace };
tstring format_rate(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
const tstring& rsFrmt,
double dRate)
{
@@ -535,7 +535,7 @@ namespace }
void log_to_file(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
double dRate,
const tstring& rsLogFileName,
const tstring& rsFormat)
@@ -563,7 +563,7 @@ namespace }
void log_to_history(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
double dRate,
time_t nTime,
const tstring& rsFormat)
@@ -581,7 +581,7 @@ namespace db_event_add(hContact, &dbei);
}
- bool do_set_contact_extra_icon(HCONTACT hContact,const CTendency& tendency)
+ bool do_set_contact_extra_icon(MCONTACT hContact,const CTendency& tendency)
{
bool bResult = false;
CTendency::EResult nComparison = tendency.Compare();
@@ -604,7 +604,7 @@ namespace }
bool show_popup(const IQuotesProvider* pProvider,
- HCONTACT hContact,
+ MCONTACT hContact,
double dRate,
// double dPrevRate,
// bool bValidPrevRate,
@@ -685,7 +685,7 @@ namespace }
}
-void CQuotesProviderBase::WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol/* = ""*/)
+void CQuotesProviderBase::WriteContactRate(MCONTACT hContact,double dRate,const tstring& rsSymbol/* = ""*/)
{
time_t nTime = ::time(NULL);
@@ -825,9 +825,9 @@ void CQuotesProviderBase::WriteContactRate(HCONTACT hContact,double dRate,const }
}
-HCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
+MCONTACT CQuotesProviderBase::CreateNewContact(const tstring& rsName)
{
- HCONTACT hContact = HCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
+ MCONTACT hContact = MCONTACT(CallService(MS_DB_CONTACT_ADD,0,0));
if(hContact) {
if(0 == CallService(MS_PROTO_ADDTOCONTACT, WPARAM(hContact), (LPARAM)QUOTES_PROTOCOL_NAME)) {
tstring sProvName = GetInfo().m_sName;
@@ -1020,7 +1020,7 @@ void CQuotesProviderBase::RefreshAll() assert(b && "Failed to set event");
}
-void CQuotesProviderBase::RefreshContact(HCONTACT hContact)
+void CQuotesProviderBase::RefreshContact(MCONTACT hContact)
{
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
@@ -1031,7 +1031,7 @@ void CQuotesProviderBase::RefreshContact(HCONTACT hContact) assert(b && "Failed to set event");
}
-void CQuotesProviderBase::SetContactExtraIcon(HCONTACT hContact)const
+void CQuotesProviderBase::SetContactExtraIcon(MCONTACT hContact)const
{
// tstring s = DBGetStringT(hContact,LIST_MODULE_NAME,CONTACT_LIST_NAME);
// tostringstream o;
diff --git a/plugins/Quotes/src/QuotesProviderBase.h b/plugins/Quotes/src/QuotesProviderBase.h index d468b38a68..2be1658c1d 100644 --- a/plugins/Quotes/src/QuotesProviderBase.h +++ b/plugins/Quotes/src/QuotesProviderBase.h @@ -50,7 +50,7 @@ public: };
protected:
- typedef std::vector<HCONTACT> TContracts;
+ typedef std::vector<MCONTACT> TContracts;
public:
struct CXMLFileInfo;
@@ -65,20 +65,20 @@ public: virtual bool Init();
virtual const CProviderInfo& GetInfo()const;
- virtual void AddContact(HCONTACT hContact);
- virtual void DeleteContact(HCONTACT hContact);
+ virtual void AddContact(MCONTACT hContact);
+ virtual void DeleteContact(MCONTACT hContact);
virtual void Run();
virtual void Accept(CQuotesProviderVisitor& visitor)const;
virtual void RefreshAll();
- virtual void RefreshContact(HCONTACT hContact);
- virtual void SetContactExtraIcon(HCONTACT hContact)const;
+ virtual void RefreshContact(MCONTACT hContact);
+ virtual void SetContactExtraIcon(MCONTACT hContact)const;
protected:
const tstring& GetURL()const;
- HCONTACT CreateNewContact(const tstring& rsName);
+ MCONTACT CreateNewContact(const tstring& rsName);
static bool IsOnline();
- static void SetContactStatus(HCONTACT hContact,int nNewStatus);
- void WriteContactRate(HCONTACT hContact,double dRate,const tstring& rsSymbol = _T(""));
+ static void SetContactStatus(MCONTACT hContact,int nNewStatus);
+ void WriteContactRate(MCONTACT hContact,double dRate,const tstring& rsSymbol = _T(""));
private:
virtual void RefreshQuotes(TContracts& anContacts) = 0;
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp index 8fd913fa25..afdc79c6f5 100644 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.cpp +++ b/plugins/Quotes/src/QuotesProviderDukasCopy.cpp @@ -10,12 +10,12 @@ CQuotesProviderDukasCopy::~CQuotesProviderDukasCopy() namespace
{
- inline tstring get_quote_id(HCONTACT hContact)
+ inline tstring get_quote_id(MCONTACT hContact)
{
return Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
}
- inline bool is_quote_id_equal(HCONTACT hContact,const tstring& sID)
+ inline bool is_quote_id_equal(MCONTACT hContact,const tstring& sID)
{
return sID == get_quote_id(hContact);
}
@@ -36,7 +36,7 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote,bool bWatch) if((false == bWatch) && (i != m_aContacts.end()))
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
m_aContacts.erase(i);
@@ -47,7 +47,7 @@ bool CQuotesProviderDukasCopy::WatchForQuote(const CQuote& rQuote,bool bWatch) }
else if((true == bWatch) && (i == m_aContacts.end()))
{
- HCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
+ MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
if(hContact)
{
db_set_ts(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_ID,sQuoteID.c_str());
@@ -72,7 +72,7 @@ tstring CQuotesProviderDukasCopy::BuildHTTPURL()const CGuard<CLightMutex> cs(m_cs);
for(TContracts::const_iterator i = m_aContacts.begin();i != m_aContacts.end();++i)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
tstring sID = get_quote_id(hContact);
if(false == sID.empty())
{
@@ -243,7 +243,7 @@ void CQuotesProviderDukasCopy::RefreshQuotes(TContracts& anContacts) boost::bind(is_quote_id_equal,_1,ri.m_sID));
if(i != anContacts.end() && (true == IsOnline()))
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
anContacts.erase(i);
WriteContactRate(hContact,ri.m_dCurRate,ri.m_sName);
@@ -270,7 +270,7 @@ void CQuotesProviderDukasCopy::Accept(CQuotesProviderVisitor& visitor)const visitor.Visit(*this);
}
-HCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
+MCONTACT CQuotesProviderDukasCopy::GetContactByQuoteID(const tstring& rsQuoteID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderDukasCopy.h b/plugins/Quotes/src/QuotesProviderDukasCopy.h index 117788c044..1c53f53dd4 100644 --- a/plugins/Quotes/src/QuotesProviderDukasCopy.h +++ b/plugins/Quotes/src/QuotesProviderDukasCopy.h @@ -16,9 +16,9 @@ public: bool WatchForQuote(const CQuote& rQuote,bool bWatch);
bool IsQuoteWatched(const CQuote& rQuote)const;
- HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
+ MCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
// #ifdef CHART_IMPLEMENT
-// bool Chart(HCONTACT hContact,const tstring& url)const;
+// bool Chart(MCONTACT hContact,const tstring& url)const;
// #endif
private:
diff --git a/plugins/Quotes/src/QuotesProviderFinance.cpp b/plugins/Quotes/src/QuotesProviderFinance.cpp index 49d2c5bf23..b0912dddb5 100644 --- a/plugins/Quotes/src/QuotesProviderFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderFinance.cpp @@ -3,7 +3,7 @@ void CQuotesProviderFinance::GetWatchedQuotes(TQuotes& raQuotes)const
{
raQuotes.clear();
- BOOST_FOREACH(HCONTACT hContact,m_aContacts)
+ BOOST_FOREACH(MCONTACT hContact,m_aContacts)
{
tstring sID = Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
tstring sSymbol = Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_SYMBOL,sID.c_str());
@@ -16,12 +16,12 @@ void CQuotesProviderFinance::GetWatchedQuotes(TQuotes& raQuotes)const namespace
{
- inline tstring get_quote_id(HCONTACT hContact)
+ inline tstring get_quote_id(MCONTACT hContact)
{
return Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
}
- inline bool is_quote_id_equal(HCONTACT hContact,const tstring& sID)
+ inline bool is_quote_id_equal(MCONTACT hContact,const tstring& sID)
{
return sID == get_quote_id(hContact);
}
@@ -35,7 +35,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch) if ((false == bWatch) && (i != m_aContacts.end()))
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
m_aContacts.erase(i);
@@ -46,7 +46,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch) }
else if ((true == bWatch) && (i == m_aContacts.end()))
{
- HCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
+ MCONTACT hContact = CreateNewContact(rQuote.GetSymbol());
if(hContact)
{
db_set_ts(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_ID,sQuoteID.c_str());
@@ -62,7 +62,7 @@ bool CQuotesProviderFinance::WatchForQuote(const CQuote& rQuote,bool bWatch) return false;
}
-HCONTACT CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
+MCONTACT CQuotesProviderFinance::GetContactByQuoteID(const tstring& rsQuoteID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderFinance.h b/plugins/Quotes/src/QuotesProviderFinance.h index df71a70a90..67e4e3febc 100644 --- a/plugins/Quotes/src/QuotesProviderFinance.h +++ b/plugins/Quotes/src/QuotesProviderFinance.h @@ -9,7 +9,7 @@ public: public:
void GetWatchedQuotes(TQuotes& raQuotes)const;
bool WatchForQuote(const CQuote& rQuote,bool bWatch);
- HCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
+ MCONTACT GetContactByQuoteID(const tstring& rsQuoteID)const;
protected:
virtual void ShowPropertyPage(WPARAM wp,OPTIONSDIALOGPAGE& odp);
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.cpp b/plugins/Quotes/src/QuotesProviderGoogle.cpp index fb64f3b730..907639ff47 100644 --- a/plugins/Quotes/src/QuotesProviderGoogle.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogle.cpp @@ -17,7 +17,7 @@ namespace return o.str();
}
- inline bool is_rate_watched(HCONTACT hContact,
+ inline bool is_rate_watched(MCONTACT hContact,
const CQuotesProviderBase::CQuote& from,
const CQuotesProviderBase::CQuote& to)
{
@@ -36,7 +36,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri, if ((true == bWatch) && (i == m_aContacts.end()))
{
tstring sName = make_contact_name(ri.m_from.GetSymbol(),ri.m_to.GetSymbol());
- HCONTACT hContact = CreateNewContact(sName);
+ MCONTACT hContact = CreateNewContact(sName);
if(hContact)
{
db_set_ts(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID,ri.m_from.GetID().c_str());
@@ -55,7 +55,7 @@ bool CQuotesProviderGoogle::WatchForRate(const CRateInfo& ri, }
else if ((false == bWatch) && (i != m_aContacts.end()))
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
{// for CCritSection
CGuard<CLightMutex> cs(m_cs);
m_aContacts.erase(i);
@@ -77,7 +77,7 @@ bool CQuotesProviderGoogle::GetWatchedRateInfo(size_t nIndex,CRateInfo& rRateInf {
if(nIndex < m_aContacts.size())
{
- HCONTACT hContact = m_aContacts[nIndex];
+ MCONTACT hContact = m_aContacts[nIndex];
tstring sSymbolFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sSymbolTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
tstring sDescFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_DESCRIPTION);
@@ -101,7 +101,7 @@ namespace o << rsURL << _T("?a=") << std::fixed << dAmount << _T("&from=") << from << _T("&to=") << to;
return o.str();
}
- tstring build_url(HCONTACT hContact,const tstring& rsURL,double dAmount = 1.0)
+ tstring build_url(MCONTACT hContact,const tstring& rsURL,double dAmount = 1.0)
{
tstring sFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
@@ -168,7 +168,7 @@ void CQuotesProviderGoogle::RefreshQuotes(TContracts& anContacts) for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
if(bUseExtendedStatus)
{
@@ -497,7 +497,7 @@ double CQuotesProviderGoogle::Convert(double dAmount,const CQuote& from,const CQ namespace
{
- bool is_equal_ids(HCONTACT hContact,const tstring& rsFromID,const tstring& rsToID)
+ bool is_equal_ids(MCONTACT hContact,const tstring& rsFromID,const tstring& rsToID)
{
tstring sFrom = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_FROM_ID);
tstring sTo = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_TO_ID);
@@ -506,7 +506,7 @@ namespace }
}
-HCONTACT CQuotesProviderGoogle::GetContactByID(const tstring& rsFromID,const tstring& rsToID)const
+MCONTACT CQuotesProviderGoogle::GetContactByID(const tstring& rsFromID,const tstring& rsToID)const
{
CGuard<CLightMutex> cs(m_cs);
diff --git a/plugins/Quotes/src/QuotesProviderGoogle.h b/plugins/Quotes/src/QuotesProviderGoogle.h index 59cb3273b0..ec2a6c4d85 100644 --- a/plugins/Quotes/src/QuotesProviderGoogle.h +++ b/plugins/Quotes/src/QuotesProviderGoogle.h @@ -27,7 +27,7 @@ public: size_t GetWatchedRateCount()const;
bool GetWatchedRateInfo(size_t nIndex,CRateInfo& rRateInfo);
- HCONTACT GetContactByID(const tstring& rsFromID,const tstring& rsToID)const;
+ MCONTACT GetContactByID(const tstring& rsFromID,const tstring& rsToID)const;
double Convert(double dAmount,const CQuote& from,const CQuote& to)const;
diff --git a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp index be34fcb29e..a37829421e 100644 --- a/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp +++ b/plugins/Quotes/src/QuotesProviderGoogleFinance.cpp @@ -10,7 +10,7 @@ CQuotesProviderGoogleFinance::~CQuotesProviderGoogleFinance() namespace
{
- tstring build_url(HCONTACT hContact,const tstring& rsURL)
+ tstring build_url(MCONTACT hContact,const tstring& rsURL)
{
tostringstream o;
o << rsURL << _T("?q=") << Quotes_DBGetStringT(hContact,QUOTES_MODULE_NAME,DB_STR_QUOTE_ID);
@@ -292,7 +292,7 @@ void CQuotesProviderGoogleFinance::RefreshQuotes(TContracts& anContacts) for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
if(bUseExtendedStatus)
{
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp index a78096d052..e9bef2e8a6 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.cpp @@ -1,6 +1,6 @@ #include "StdAfx.h"
-CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth)
+CQuotesProviderVisitorFormater::CQuotesProviderVisitorFormater(MCONTACT hContact,TCHAR chr,int nWidth)
: m_hContact(hContact),
m_chr(chr),
m_nWidth(nWidth)
@@ -45,7 +45,7 @@ void CQuotesProviderVisitorFormater::Visit(const CQuotesProviderGoogle& rProvide namespace
{
- bool get_fetch_time(HCONTACT hContact,time_t& rTime)
+ bool get_fetch_time(MCONTACT hContact,time_t& rTime)
{
DBVARIANT dbv;
if (db_get(hContact, QUOTES_MODULE_NAME, DB_STR_QUOTE_FETCH_TIME, &dbv) || (DBVT_DWORD != dbv.type))
@@ -55,7 +55,7 @@ namespace return true;
}
- tstring format_fetch_time(const CQuotesProviderBase& rProvider,HCONTACT hContact,const tstring& rsFormat)
+ tstring format_fetch_time(const CQuotesProviderBase& rProvider,MCONTACT hContact,const tstring& rsFormat)
{
time_t nTime;
if(true == get_fetch_time(hContact,nTime))
diff --git a/plugins/Quotes/src/QuotesProviderVisitorFormater.h b/plugins/Quotes/src/QuotesProviderVisitorFormater.h index 605c919725..e2360fb538 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorFormater.h +++ b/plugins/Quotes/src/QuotesProviderVisitorFormater.h @@ -4,7 +4,7 @@ class CQuotesProviderVisitorFormater : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorFormater(HCONTACT hContact,TCHAR chr,int nWidth);
+ CQuotesProviderVisitorFormater(MCONTACT hContact,TCHAR chr,int nWidth);
~CQuotesProviderVisitorFormater();
const tstring& GetResult()const;
@@ -21,7 +21,7 @@ private: // void FormatChangeValueHelper(bool bPercentage);
private:
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
TCHAR m_chr;
tstring m_sResult;
int m_nWidth;
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp index 0f53784953..d5495abc16 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.cpp @@ -1,6 +1,6 @@ #include "stdafx.h"
-CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr)
+CQuotesProviderVisitorTendency::CQuotesProviderVisitorTendency(MCONTACT hContact,TCHAR chr)
: m_hContact(hContact),m_chr(chr),m_bValid(false),m_dResult(0.0)
{
}
diff --git a/plugins/Quotes/src/QuotesProviderVisitorTendency.h b/plugins/Quotes/src/QuotesProviderVisitorTendency.h index 48411d6a4b..d3d1b34b1c 100644 --- a/plugins/Quotes/src/QuotesProviderVisitorTendency.h +++ b/plugins/Quotes/src/QuotesProviderVisitorTendency.h @@ -4,7 +4,7 @@ class CQuotesProviderVisitorTendency : public CQuotesProviderVisitor
{
public:
- CQuotesProviderVisitorTendency(HCONTACT hContact,TCHAR chr);
+ CQuotesProviderVisitorTendency(MCONTACT hContact,TCHAR chr);
bool IsValid()const{return m_bValid;}
double GetResult()const{return m_dResult;}
@@ -18,7 +18,7 @@ private: void GetValue(LPCSTR pszDbKeyName);
private:
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
TCHAR m_chr;
bool m_bValid;
double m_dResult;
diff --git a/plugins/Quotes/src/QuotesProviderYahoo.cpp b/plugins/Quotes/src/QuotesProviderYahoo.cpp index 20581b0d89..d7196b7466 100644 --- a/plugins/Quotes/src/QuotesProviderYahoo.cpp +++ b/plugins/Quotes/src/QuotesProviderYahoo.cpp @@ -50,7 +50,7 @@ namespace typedef std::vector<tstring> TStrings;
- bool get_double_from_parsed_line(HCONTACT hContact,const TStrings& rasParsedLine,size_t nIndex,const char* pszDbName)
+ bool get_double_from_parsed_line(MCONTACT hContact,const TStrings& rasParsedLine,size_t nIndex,const char* pszDbName)
{
if(rasParsedLine.size() > nIndex)
{
@@ -71,13 +71,13 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts) tstring sURL = GetURL();
bool bUseExtendedStatus = CModuleInfo::GetInstance().GetExtendedStatusFlag();
- typedef std::map<tstring,HCONTACT> TQuoteID2ContractHandles;
+ typedef std::map<tstring,MCONTACT> TQuoteID2ContractHandles;
TQuoteID2ContractHandles aQuoteID2Handles;
tostringstream oURL;
oURL << sURL << _T("dioksin.txt?s=");
for(TContracts::const_iterator i = anContacts.begin();i != anContacts.end() && IsOnline();++i)
{
- HCONTACT hContact = *i;
+ MCONTACT hContact = *i;
if(bUseExtendedStatus)
{
SetContactStatus(hContact,ID_STATUS_OCCUPIED);
@@ -151,7 +151,7 @@ void CQuotesProviderYahoo::RefreshQuotes(TContracts& anContacts) auto it3 = aQuoteID2Handles.find(asStrings[indexSymbol]);
if(it3 != aQuoteID2Handles.end())
{
- HCONTACT hContact = it3->second;
+ MCONTACT hContact = it3->second;
double dRate = 0.0;
if(true == t2d(asStrings[indexLastTrade],dRate))
{
diff --git a/plugins/Quotes/src/QuotesProviders.cpp b/plugins/Quotes/src/QuotesProviders.cpp index 1acf732f6f..b8194f3cea 100644 --- a/plugins/Quotes/src/QuotesProviders.cpp +++ b/plugins/Quotes/src/QuotesProviders.cpp @@ -44,7 +44,7 @@ void CQuotesProviders::ClearProviders() namespace
{
- void convert_contact_settings(HCONTACT hContact)
+ void convert_contact_settings(MCONTACT hContact)
{
WORD dwLogMode = db_get_w(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_LOG,static_cast<WORD>(lmDisabled));
if ((dwLogMode&lmInternalHistory) || (dwLogMode&lmExternalFile))
@@ -60,7 +60,7 @@ void CQuotesProviders::InitProviders() const WORD nCurrentVersion = 17;
WORD nVersion = db_get_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,1);
- for(HCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
+ for(MCONTACT hContact = db_find_first(QUOTES_MODULE_NAME); hContact; hContact = db_find_next(hContact, QUOTES_MODULE_NAME))
{
TQuotesProviderPtr pProvider = GetContactProviderPtr(hContact);
if(pProvider)
@@ -76,7 +76,7 @@ void CQuotesProviders::InitProviders() db_set_w(NULL,QUOTES_MODULE_NAME,LAST_RUN_VERSION,nCurrentVersion);
}
-CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(HCONTACT hContact)const
+CQuotesProviders::TQuotesProviderPtr CQuotesProviders::GetContactProviderPtr(MCONTACT hContact)const
{
char* szProto = GetContactProto(hContact);
if(NULL == szProto || 0 != ::_stricmp(szProto, QUOTES_PROTOCOL_NAME))
diff --git a/plugins/Quotes/src/QuotesProviders.h b/plugins/Quotes/src/QuotesProviders.h index 50394923cb..68628faa2a 100644 --- a/plugins/Quotes/src/QuotesProviders.h +++ b/plugins/Quotes/src/QuotesProviders.h @@ -14,7 +14,7 @@ public: ~CQuotesProviders();
TQuotesProviderPtr FindProvider(const tstring& rsName)const;
- TQuotesProviderPtr GetContactProviderPtr(HCONTACT hContact)const;
+ TQuotesProviderPtr GetContactProviderPtr(MCONTACT hContact)const;
const TQuotesProviders& GetProviders()const;
private:
diff --git a/plugins/Quotes/src/SettingsDlg.cpp b/plugins/Quotes/src/SettingsDlg.cpp index e52be731bd..e100401ece 100644 --- a/plugins/Quotes/src/SettingsDlg.cpp +++ b/plugins/Quotes/src/SettingsDlg.cpp @@ -126,10 +126,10 @@ namespace struct CSettingWindowParam
{
- CSettingWindowParam(HCONTACT hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
+ CSettingWindowParam(MCONTACT hContact) : m_hContact(hContact),m_pPopupSettings(NULL){}
~CSettingWindowParam(){delete m_pPopupSettings;}
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
CPopupSettings* m_pPopupSettings;
};
@@ -268,7 +268,7 @@ namespace {
case WM_INITDIALOG:
{
- HCONTACT hContact = HCONTACT(lp);
+ MCONTACT hContact = MCONTACT(lp);
TranslateDialogDefault(hWnd);
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS,false);
@@ -393,7 +393,7 @@ namespace case IDOK:
{
CSettingWindowParam* pParam = get_param(hWnd);
- HCONTACT hContact = pParam->m_hContact;
+ MCONTACT hContact = pParam->m_hContact;
bool bUseContactSpec = 1 == ::IsDlgButtonChecked(hWnd,IDC_CHECK_CONTACT_SPECIFIC);
@@ -507,7 +507,7 @@ namespace }
-void ShowSettingsDlg(HCONTACT hContact)
+void ShowSettingsDlg(MCONTACT hContact)
{
HANDLE hWL = CModuleInfo::GetInstance().GetWindowList(WINDOW_PREFIX_SETTINGS,true);
assert(hWL);
@@ -933,7 +933,7 @@ COLORREF CPopupSettings::GetDefColourText() return ::GetSysColor(COLOR_BTNTEXT);
}
-void CPopupSettings::InitForContact(HCONTACT hContact)
+void CPopupSettings::InitForContact(MCONTACT hContact)
{
BYTE m = db_get_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_MODE,static_cast<BYTE>(m_modeColour));
if(m >= CPopupSettings::colourDefault && m <= CPopupSettings::colourUserDefined)
@@ -953,7 +953,7 @@ void CPopupSettings::InitForContact(HCONTACT hContact) m_bUseHistory = 1 == db_get_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_HISTORY_FLAG,m_bUseHistory);
}
-void CPopupSettings::SaveForContact(HCONTACT hContact)const
+void CPopupSettings::SaveForContact(MCONTACT hContact)const
{
db_set_b(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_MODE,static_cast<BYTE>(m_modeColour));
db_set_dw(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_POPUP_COLOUR_BK,m_rgbBkg);
@@ -1088,7 +1088,7 @@ tstring GenerateLogFileName(const tstring& rsLogFilePattern, return sPath;
}
-tstring GetContactLogFileName(HCONTACT hContact)
+tstring GetContactLogFileName(MCONTACT hContact)
{
tstring result;
@@ -1113,7 +1113,7 @@ tstring GetContactLogFileName(HCONTACT hContact) return result;
}
-tstring GetContactName(HCONTACT hContact)
+tstring GetContactName(MCONTACT hContact)
{
tstring sDescription = Quotes_DBGetStringT(hContact,QUOTES_PROTOCOL_NAME,DB_STR_QUOTE_DESCRIPTION);
if(sDescription.empty())
diff --git a/plugins/Quotes/src/SettingsDlg.h b/plugins/Quotes/src/SettingsDlg.h index 355f7bd216..3c17d7038d 100644 --- a/plugins/Quotes/src/SettingsDlg.h +++ b/plugins/Quotes/src/SettingsDlg.h @@ -25,8 +25,8 @@ public: static COLORREF GetDefColourBk();
static COLORREF GetDefColourText();
- void InitForContact(HCONTACT hContact);
- void SaveForContact(HCONTACT hContact)const;
+ void InitForContact(MCONTACT hContact);
+ void SaveForContact(MCONTACT hContact)const;
EColourMode GetColourMode()const;
void SetColourMode(EColourMode nMode);
@@ -101,7 +101,7 @@ private: mutable CPopupSettings* m_pPopupSettings;
};
-void ShowSettingsDlg(HCONTACT hContact);
+void ShowSettingsDlg(MCONTACT hContact);
bool ShowSettingsDlg(HWND hWndParent,CAdvProviderSettings* pAdvSettings);
enum
@@ -111,8 +111,8 @@ enum glfnResolveAll = glfnResolveQuoteName|glfnResolveUserProfile,
};
tstring GenerateLogFileName(const tstring& rsLogFilePattern,const tstring& rsQuoteSymbol,int nFlags = glfnResolveAll);
-tstring GetContactLogFileName(HCONTACT hContact);
-tstring GetContactName(HCONTACT hContact);
+tstring GetContactLogFileName(MCONTACT hContact);
+tstring GetContactName(MCONTACT hContact);
#endif //__E211E4D9_383C_43BE_A787_7EF1D585B90D_SettingsDlg_h__
diff --git a/plugins/Rate/src/main.cpp b/plugins/Rate/src/main.cpp index b875ae23c6..ad5b33bb17 100644 --- a/plugins/Rate/src/main.cpp +++ b/plugins/Rate/src/main.cpp @@ -69,7 +69,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda ///////////////////////////////////////////////////////////////////////////////
-static void setExtraIcon(HCONTACT hContact, int bRate = -1, BOOL clear = TRUE)
+static void setExtraIcon(MCONTACT hContact, int bRate = -1, BOOL clear = TRUE)
{
if (hContact == NULL)
return;
@@ -106,7 +106,7 @@ int onModulesLoaded(WPARAM wParam,LPARAM lParam) hExtraIcon = ExtraIcon_Register("contact_rate", LPGEN("Contact rate"), "rate_high");
// Set initial value for all contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
setExtraIcon(hContact, -1, FALSE);
return 0;
@@ -117,7 +117,7 @@ int onContactSettingChanged(WPARAM wParam,LPARAM lParam) DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
if (wParam != NULL && !lstrcmpA(cws->szModule,"CList") && !lstrcmpA(cws->szSetting,"Rate"))
- setExtraIcon((HCONTACT)wParam, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal);
+ setExtraIcon((MCONTACT)wParam, cws->value.type == DBVT_DELETED ? 0 : cws->value.bVal);
return 0;
}
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp index 335e4baf56..ed51d25a20 100644 --- a/plugins/RecentContacts/src/RecentContacts.cpp +++ b/plugins/RecentContacts/src/RecentContacts.cpp @@ -130,7 +130,7 @@ BOOL ShowListMainDlgProc_OpenContactMenu(HWND hDlg, HWND hList, int item, LASTUC if (hCMenu != NULL) {
POINT p;
GetCursorPos(&p);
- DlgDat->hContact = (HCONTACT) lvi.lParam;
+ DlgDat->hContact = (MCONTACT) lvi.lParam;
BOOL ret = TrackPopupMenu(hCMenu, 0, p.x, p.y, 0, hDlg, NULL);
DestroyMenu(hCMenu);
if (ret)
@@ -380,7 +380,7 @@ INT_PTR OnMenuCommandShowList(WPARAM wParam, LPARAM lParam) dbe.pBlob = buf;
HANDLE curEvent;
- for (HCONTACT curContact = db_find_first(); curContact != NULL; curContact = db_find_next(curContact)) {
+ for (MCONTACT curContact = db_find_first(); curContact != NULL; curContact = db_find_next(curContact)) {
curTime = ((__time64_t)db_get_dw(curContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeLo, -1)) |
(((__time64_t)db_get_dw(curContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeHi, -1)) << 32);
@@ -454,7 +454,7 @@ int Create_MenuitemShowList(void) return 0;
}
-BOOL SaveLastUsedTimeStamp(HCONTACT hContact)
+BOOL SaveLastUsedTimeStamp(MCONTACT hContact)
{
__time64_t ct = _time64(NULL);
db_set_dw(hContact, dbLastUC_ModuleName, dbLastUC_LastUsedTimeLo, (DWORD)ct);
@@ -484,7 +484,7 @@ static int OnPrebuildContactMenu (WPARAM wParam, LPARAM lParam) CLISTMENUITEM clmi = { sizeof(clmi) };
clmi.flags = CMIM_NAME | CMIF_TCHAR;
- if ( db_get_b((HCONTACT)wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
+ if ( db_get_b((MCONTACT)wParam, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0)
clmi.ptszName = TranslateT("Ignore Contact");
else
clmi.ptszName = TranslateT("Show Contact");
@@ -515,7 +515,7 @@ int OnModulesLoaded(WPARAM wParam, LPARAM lParam) INT_PTR ToggleIgnore (WPARAM wParam, LPARAM lParam)
{
if (wParam != NULL) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int state = db_get_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, 0) == 0 ? 1 : 0 ;
db_set_b(hContact, dbLastUC_ModuleName, dbLastUC_IgnoreContact, state);
return state;
diff --git a/plugins/RecentContacts/src/RecentContacts.h b/plugins/RecentContacts/src/RecentContacts.h index 474fce2d97..4cd9209dd5 100644 --- a/plugins/RecentContacts/src/RecentContacts.h +++ b/plugins/RecentContacts/src/RecentContacts.h @@ -71,13 +71,13 @@ struct TABSRMM_SessionInfo { };
-typedef std::multimap <__time64_t, HCONTACT, std::greater<__time64_t> > cmultimap;
-typedef std::pair <__time64_t, HCONTACT> cpair;
+typedef std::multimap <__time64_t, MCONTACT, std::greater<__time64_t> > cmultimap;
+typedef std::pair <__time64_t, MCONTACT> cpair;
typedef struct LASTUC_DLG_DATA
{
cmultimap *Contacts;
SIZE WindowMinSize;
RECT ListUCRect;
- HCONTACT hContact;
+ MCONTACT hContact;
} LASTUC_DLG_DATA;
\ No newline at end of file diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp index 0583087e57..449747b22d 100644 --- a/plugins/RemovePersonalSettings/src/rps.cpp +++ b/plugins/RemovePersonalSettings/src/rps.cpp @@ -97,7 +97,7 @@ BOOL GetSettings(const char *section, char *buffer, size_t bufferSize); void DeleteFileOrFolder(const char *name);
void DeleteSetting(const char *setting);
void DeleteSettingEx(const char *szModule, const char *szSetting);
-BOOL isMetaContact(HCONTACT hContact);
+BOOL isMetaContact(MCONTACT hContact);
@@ -222,7 +222,7 @@ void SetProtocolsOffline() void RemoveUsers()
{
if ( GetSettingBool("GlobalSettings", "RemoveAllUsers", TRUE) ) {
- HCONTACT hContact, hContactOld;
+ MCONTACT hContact, hContactOld;
HANDLE hDbEvent;
// To be faster, remove first all metacontacts (because it syncs histories)
@@ -613,7 +613,7 @@ void DeleteFileOrFolder(const char *name) }
-BOOL isMetaContact(HCONTACT hContact)
+BOOL isMetaContact(MCONTACT hContact)
{
return lstrcmpA(GetContactProto(hContact), METACONTACTS_PROTOCOL_NAME) == 0;
}
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp index 549d959a92..6c9951e3ff 100644 --- a/plugins/SMS/src/SMS_svc.cpp +++ b/plugins/SMS/src/SMS_svc.cpp @@ -54,7 +54,7 @@ int LoadModules(void) int SmsRebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- Menu_ShowItem(ssSMSSettings.hContactMenuItems[0], GetContactPhonesCount((HCONTACT)wParam));
+ Menu_ShowItem(ssSMSSettings.hContactMenuItems[0], GetContactPhonesCount((MCONTACT)wParam));
return 0;
}
@@ -65,11 +65,11 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam) // user clicked on the "SMS Message" on one of the users
if (wParam) {
- hwndSendSms = SendSMSWindowIsOtherInstanceHContact((HCONTACT)wParam);
+ hwndSendSms = SendSMSWindowIsOtherInstanceHContact((MCONTACT)wParam);
if (hwndSendSms)
SetFocus(hwndSendSms);
else
- hwndSendSms = SendSMSWindowAdd((HCONTACT)wParam);
+ hwndSendSms = SendSMSWindowAdd((MCONTACT)wParam);
}
// user clicked on the "SMS Send" in the Main Menu
else{
@@ -77,7 +77,7 @@ int SendSMSMenuCommand(WPARAM wParam,LPARAM lParam) EnableWindow(GetDlgItem(hwndSendSms,IDC_NAME),TRUE);
EnableWindow(GetDlgItem(hwndSendSms,IDC_SAVENUMBER),FALSE);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (GetContactPhonesCount(hContact)) {
SendDlgItemMessage(hwndSendSms,IDC_NAME,CB_ADDSTRING,0,(LPARAM)GetContactNameW(hContact));
SendSMSWindowSMSContactAdd(hwndSendSms,hContact);
@@ -134,7 +134,7 @@ void RestoreUnreadMessageAlerts(void) {
DBEVENTINFO dbei = { sizeof(dbei) };
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
for (HANDLE hDbEvent = db_event_firstUnread(hContact); hDbEvent; hDbEvent = db_event_next(hDbEvent)) {
dbei.cbBlob = 0;
if (db_event_get(hDbEvent, &dbei) == 0)
diff --git a/plugins/SMS/src/common.h b/plugins/SMS/src/common.h index ae468ebcc6..9256139ea4 100644 --- a/plugins/SMS/src/common.h +++ b/plugins/SMS/src/common.h @@ -92,25 +92,25 @@ extern SMS_SETTINGS ssSMSSettings; #define DB_SMS_SetWord(Contact,valueName,parValue) db_set_w(Contact,PROTOCOL_NAMEA,valueName,parValue)
#define DB_SMS_GetByte(Contact,valueName,parDefltValue) db_get_b(Contact,PROTOCOL_NAMEA,valueName,parDefltValue)
#define DB_SMS_SetByte(Contact,valueName,parValue) db_set_b(Contact,PROTOCOL_NAMEA,valueName,parValue)
-BOOL DB_GetStaticStringW(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpszRetBuff,SIZE_T dwRetBuffSize,SIZE_T *pdwRetBuffSize);
+BOOL DB_GetStaticStringW(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpszRetBuff,SIZE_T dwRetBuffSize,SIZE_T *pdwRetBuffSize);
#define DB_SMS_GetStaticStringW(Contact,ValueName,Ret,RetBuffSize,pRetBuffSize) DB_GetStaticStringW(Contact,PROTOCOL_NAMEA,ValueName,Ret,RetBuffSize,pRetBuffSize)
#define DB_SetStringW(Contact,Module,valueName,parValue) db_set_ws(Contact,Module,valueName,parValue)
#define DB_SMS_SetStringW(Contact,valueName,parValue) db_set_ws(Contact,PROTOCOL_NAMEA,valueName,parValue)
LRESULT CALLBACK MessageSubclassProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam);
-LPSTR GetModuleName(HCONTACT hContact);
+LPSTR GetModuleName(MCONTACT hContact);
void EnableControlsArray(HWND hWndDlg,WORD *pwControlsList,SIZE_T dwControlsListCount,BOOL bEnabled);
// Declaration of function that returns received string with only numbers
SIZE_T CopyNumberA(LPSTR lpszOutBuff,LPSTR lpszBuff,SIZE_T dwLen);
SIZE_T CopyNumberW(LPWSTR lpcOutBuff,LPWSTR lpcBuff,SIZE_T dwLen);
bool IsPhoneW(LPWSTR lpwszString,SIZE_T dwStringLen);
-DWORD GetContactPhonesCount(HCONTACT hContact);
-BOOL IsContactPhone(HCONTACT hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize);
+DWORD GetContactPhonesCount(MCONTACT hContact);
+BOOL IsContactPhone(MCONTACT hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize);
// Declaration of function that returns HANDLE of contact by his cellular number
-HCONTACT HContactFromPhone(LPWSTR lpwszPhone,SIZE_T dwPhoneSize);
+MCONTACT HContactFromPhone(LPWSTR lpwszPhone,SIZE_T dwPhoneSize);
BOOL GetDataFromMessage(LPSTR lpszMessage,SIZE_T dwMessageSize,DWORD *pdwEventType,LPWSTR lpwszPhone,SIZE_T dwPhoneSize,SIZE_T *pdwPhoneSizeRet,UINT *piIcon);
// Declaration of function that gets a XML string and return the asked tag.
diff --git a/plugins/SMS/src/functions.cpp b/plugins/SMS/src/functions.cpp index d560ad733c..48c7abc01f 100644 --- a/plugins/SMS/src/functions.cpp +++ b/plugins/SMS/src/functions.cpp @@ -1,6 +1,6 @@ #include "common.h"
-BOOL DB_GetStaticStringW(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszRetBuff,SIZE_T dwRetBuffSize,SIZE_T *pdwRetBuffSize)
+BOOL DB_GetStaticStringW(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszRetBuff,SIZE_T dwRetBuffSize,SIZE_T *pdwRetBuffSize)
{// sizes in wchars
BOOL bRet=FALSE;
SIZE_T dwReadedStringLen;
@@ -26,7 +26,7 @@ BOOL DB_GetStaticStringW(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName, return(bRet);
}
-LPSTR GetModuleName(HCONTACT hContact)
+LPSTR GetModuleName(MCONTACT hContact)
{
LPSTR lpszRet;
@@ -92,7 +92,7 @@ bool IsPhoneW(LPWSTR lpwszString,SIZE_T dwStringLen) }
-DWORD GetContactPhonesCountParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName)
+DWORD GetContactPhonesCountParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName)
{
DWORD dwRet=0;
char szBuff[MAX_PATH];
@@ -113,7 +113,7 @@ DWORD GetContactPhonesCountParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszVa }
-DWORD GetContactPhonesCount(HCONTACT hContact)
+DWORD GetContactPhonesCount(MCONTACT hContact)
{
DWORD dwRet = 0;
LPSTR lpszProto = GetContactProto(hContact);
@@ -130,7 +130,7 @@ DWORD GetContactPhonesCount(HCONTACT hContact) }
-BOOL IsContactPhoneParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
+BOOL IsContactPhoneParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
{
char szBuff[MAX_PATH];
WCHAR wszPhoneLocal[MAX_PHONE_LEN];
@@ -157,7 +157,7 @@ BOOL IsContactPhoneParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName, }
-BOOL IsContactPhone(HCONTACT hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
+BOOL IsContactPhone(MCONTACT hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
{
BOOL bRet=FALSE;
WCHAR wszPhoneLocal[MAX_PHONE_LEN];
@@ -181,11 +181,11 @@ BOOL IsContactPhone(HCONTACT hContact,LPWSTR lpwszPhone,SIZE_T dwPhoneSize) //This function get a string cellular number and return the HANDLE of the contact that has this
//number in the miranda phonebook (and marked as an SMS able) at the User Details.
//If no one has this number function returns NULL.
-HCONTACT HContactFromPhone(LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
+MCONTACT HContactFromPhone(LPWSTR lpwszPhone,SIZE_T dwPhoneSize)
{
if (lpwszPhone && dwPhoneSize) {
//check not already on list
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
if (IsContactPhone(hContact,lpwszPhone,dwPhoneSize))
return hContact;
}
diff --git a/plugins/SMS/src/receive.cpp b/plugins/SMS/src/receive.cpp index e6f647adc6..0e619ea6c2 100644 --- a/plugins/SMS/src/receive.cpp +++ b/plugins/SMS/src/receive.cpp @@ -60,7 +60,7 @@ int handleAckSMS(WPARAM wParam,LPARAM lParam) dwPhoneSize=CopyNumberA(szPhone,lpszPhone,dwPhoneSize);
dwPhoneSize=MultiByteToWideChar(CP_UTF8,0,szPhone,dwPhoneSize,tszPhone,MAX_PHONE_LEN);
- HCONTACT hContact=HContactFromPhone(tszPhone,dwPhoneSize);
+ MCONTACT hContact=HContactFromPhone(tszPhone,dwPhoneSize);
dbei.szModule=GetModuleName(hContact);
dbei.timestamp=time(NULL);
@@ -88,7 +88,7 @@ int handleAckSMS(WPARAM wParam,LPARAM lParam) {
dwPhoneSize=CopyNumberA(szPhone,lpszPhone,dwPhoneSize);
dwPhoneSize=MultiByteToWideChar(CP_UTF8,0,szPhone,dwPhoneSize,tszPhone,MAX_PHONE_LEN);
- HCONTACT hContact=HContactFromPhone(tszPhone,dwPhoneSize);
+ MCONTACT hContact=HContactFromPhone(tszPhone,dwPhoneSize);
DBEVENTINFO dbei={0};
dbei.cbSize=sizeof(dbei);
@@ -211,7 +211,7 @@ int handleNewMessage(WPARAM wParam, LPARAM lParam) {
char szServiceFunction[MAX_PATH], *pszServiceFunctionName;
TCHAR szToolTip[MAX_PATH];
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
diff --git a/plugins/SMS/src/recvdlg.cpp b/plugins/SMS/src/recvdlg.cpp index eea5b7ca60..db1cdf4093 100644 --- a/plugins/SMS/src/recvdlg.cpp +++ b/plugins/SMS/src/recvdlg.cpp @@ -33,7 +33,7 @@ typedef struct LIST_MT_ITEM lmtListMTItem;
HWND hWnd;
HBRUSH hBkgBrush;
- HCONTACT hContact;
+ MCONTACT hContact;
} RECV_SMS_WINDOW_DATA;
INT_PTR CALLBACK RecvSmsDlgProc (HWND hWndDlg,UINT message,WPARAM wParam,LPARAM lParam);
@@ -134,7 +134,7 @@ INT_PTR CALLBACK RecvSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l {
WCHAR wszPhone[MAX_PHONE_LEN];
HWND hwndSendSms;
- HCONTACT hContact;
+ MCONTACT hContact;
hContact=HContactFromPhone(wszPhone,GetDlgItemText(hWndDlg,IDC_NUMBER,wszPhone,SIZEOF(wszPhone)));
hwndSendSms=SendSMSWindowIsOtherInstanceHContact(hContact);
@@ -164,7 +164,7 @@ INT_PTR CALLBACK RecvSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l //This function create a new SMS receive window, and insert it to the list.
//The function gets void and return the window HWND
-HWND RecvSMSWindowAdd(HCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,SIZE_T dwPhoneSize,LPSTR lpszMessage,SIZE_T dwMessageSize)
+HWND RecvSMSWindowAdd(MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,SIZE_T dwPhoneSize,LPSTR lpszMessage,SIZE_T dwMessageSize)
{
HWND hRet=NULL;
diff --git a/plugins/SMS/src/recvdlg.h b/plugins/SMS/src/recvdlg.h index 47363466fe..257fbf7049 100644 --- a/plugins/SMS/src/recvdlg.h +++ b/plugins/SMS/src/recvdlg.h @@ -3,7 +3,7 @@ DWORD RecvSMSWindowInitialize ();
void RecvSMSWindowDestroy ();
-HWND RecvSMSWindowAdd (HCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,SIZE_T dwPhoneSize,LPSTR lpszMessage,SIZE_T dwMessageSize);
+HWND RecvSMSWindowAdd (MCONTACT hContact,DWORD dwEventType,LPWSTR lpwszPhone,SIZE_T dwPhoneSize,LPSTR lpszMessage,SIZE_T dwMessageSize);
void RecvSMSWindowRemove (HWND hWndDlg);
diff --git a/plugins/SMS/src/senddlg.cpp b/plugins/SMS/src/senddlg.cpp index e8c32565e7..b5a6285382 100644 --- a/plugins/SMS/src/senddlg.cpp +++ b/plugins/SMS/src/senddlg.cpp @@ -40,16 +40,16 @@ typedef struct HWND hWnd;
HBRUSH hBkgBrush;
HANDLE hProcess;
- HCONTACT hContact;
- HCONTACT hMyContact;
+ MCONTACT hContact;
+ MCONTACT hMyContact;
HTREEITEM hItemSend;
BOOL bMultiple;
SIZE_T dwContactsListCount;
- HCONTACT *phContactsList;
+ MCONTACT *phContactsList;
DBEVENTINFO *pdbei;
} SEND_SMS_WINDOW_DATA;
-void AddContactPhonesToCombo (HWND hWnd,HCONTACT hContact);
+void AddContactPhonesToCombo (HWND hWnd,MCONTACT hContact);
void SendSMSWindowFillTreeView (HWND hWnd);
SIZE_T GetSMSMessageLenMax (HWND hWndDlg);
@@ -427,7 +427,7 @@ INT_PTR CALLBACK SendSmsDlgProc(HWND hWndDlg,UINT message,WPARAM wParam,LPARAM l SendDlgItemMessage(hWndDlg,IDC_ADDRESS,CB_RESETCONTENT,0,0);
if (SendDlgItemMessage(hWndDlg,IDC_NAME,CB_GETCURSEL,0,0))
{
- HCONTACT hContact = SendSMSWindowSMSContactGet(hWndDlg,(SendDlgItemMessage(hWndDlg,IDC_NAME,CB_GETCURSEL,0,0)-1));
+ MCONTACT hContact = SendSMSWindowSMSContactGet(hWndDlg,(SendDlgItemMessage(hWndDlg,IDC_NAME,CB_GETCURSEL,0,0)-1));
if (hContact) AddContactPhonesToCombo(hWndDlg,hContact);
}
}
@@ -557,7 +557,7 @@ INT_PTR CALLBACK SMSAcceptedDlgProc(HWND hWndDlg,UINT msg,WPARAM wParam,LPARAM l //This function create a new SMS send window, and insert it to the list.
//The function gets void and return the window HWND
-HWND SendSMSWindowAdd(HCONTACT hContact)
+HWND SendSMSWindowAdd(MCONTACT hContact)
{
HWND hRet=NULL;
SEND_SMS_WINDOW_DATA *psswdWindowData=(SEND_SMS_WINDOW_DATA*)MEMALLOC(sizeof(SEND_SMS_WINDOW_DATA));
@@ -608,9 +608,9 @@ void SendSMSWindowRemove(HWND hWndDlg) //This function return the contact HANDLE for the given to the SMS send window.
//The function gets the HWND of the window and return the HANDLE of the contact.
-HCONTACT SendSMSWindowHContactGet(HWND hWndDlg)
+MCONTACT SendSMSWindowHContactGet(HWND hWndDlg)
{
- HCONTACT hRet=NULL;
+ MCONTACT hRet=NULL;
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
if (psswdWindowData) hRet=psswdWindowData->hMyContact;
@@ -619,7 +619,7 @@ HCONTACT SendSMSWindowHContactGet(HWND hWndDlg) //This function set the contact info of the person we send him the in the given to the SMS send window.
//The function gets the HWND of the window and the HANDLE of the contact and return void
-void SendSMSWindowHContactSet(HWND hWndDlg,HCONTACT hContact)
+void SendSMSWindowHContactSet(HWND hWndDlg,MCONTACT hContact)
{
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
if (psswdWindowData) psswdWindowData->hMyContact=hContact;
@@ -837,7 +837,7 @@ return(NULL); //This function get the HANDLE of an user. if there is already a SMS send window for this contact
//it return its HWND else the function return NULL.
//The function gets the HANDLE of a contact and return HWND
-HWND SendSMSWindowIsOtherInstanceHContact(HCONTACT hContact)
+HWND SendSMSWindowIsOtherInstanceHContact(MCONTACT hContact)
{
HWND hRet=NULL;
SEND_SMS_WINDOW_DATA *psswdWindowData;
@@ -893,23 +893,23 @@ void SendSMSWindowNext(HWND hWndDlg) //////////////////////////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////////////////////////
//This function gets a HANDLE of a contact and add it to a list.
-void SendSMSWindowSMSContactAdd(HWND hWndDlg,HCONTACT hContact)
+void SendSMSWindowSMSContactAdd(HWND hWndDlg,MCONTACT hContact)
{
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
if (psswdWindowData) {
psswdWindowData->dwContactsListCount++;
if (psswdWindowData->phContactsList)
- psswdWindowData->phContactsList = (HCONTACT*)MEMREALLOC(psswdWindowData->phContactsList,(sizeof(HANDLE)*psswdWindowData->dwContactsListCount));
+ psswdWindowData->phContactsList = (MCONTACT*)MEMREALLOC(psswdWindowData->phContactsList,(sizeof(HANDLE)*psswdWindowData->dwContactsListCount));
else
- psswdWindowData->phContactsList = (HCONTACT*)MEMALLOC((sizeof(HANDLE)*psswdWindowData->dwContactsListCount));
+ psswdWindowData->phContactsList = (MCONTACT*)MEMALLOC((sizeof(HANDLE)*psswdWindowData->dwContactsListCount));
*(psswdWindowData->phContactsList+psswdWindowData->dwContactsListCount-1)=hContact;
}
}
//This function gets the number of the given contact in the combo list and return its contact.
-HCONTACT SendSMSWindowSMSContactGet(HWND hWndDlg,SIZE_T iNum)
+MCONTACT SendSMSWindowSMSContactGet(HWND hWndDlg,SIZE_T iNum)
{
SEND_SMS_WINDOW_DATA *psswdWindowData=GET_WINDOW_DATA(hWndDlg);
@@ -974,7 +974,7 @@ void SendSMSWindowsUpdateAllAccountLists() -void AddContactPhonesToComboToListParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,HWND hWndList)
+void AddContactPhonesToComboToListParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,HWND hWndList)
{
char szBuff[MAX_PATH];
TCHAR tszPhone[MAX_PHONE_LEN],tszPhoneRaw[MAX_PHONE_LEN];
@@ -1008,7 +1008,7 @@ void AddContactPhonesToComboToListParam(HCONTACT hContact,LPSTR lpszModule,LPSTR }
-void AddContactPhonesToCombo(HWND hWnd,HCONTACT hContact)
+void AddContactPhonesToCombo(HWND hWnd,MCONTACT hContact)
{
HWND hWndList = GetDlgItem(hWnd,IDC_ADDRESS);
SendDlgItemMessage(hWnd,IDC_ADDRESS,CB_RESETCONTENT,0,0);
@@ -1029,7 +1029,7 @@ void AddContactPhonesToCombo(HWND hWnd,HCONTACT hContact) -void AddContactPhonesToTreeViewParam(HCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,HWND hWndList,HTREEITEM *phParent)
+void AddContactPhonesToTreeViewParam(MCONTACT hContact,LPSTR lpszModule,LPSTR lpszValueName,HWND hWndList,HTREEITEM *phParent)
{
char szBuff[MAX_PATH];
TCHAR tszPhone[MAX_PHONE_LEN],tszPhoneRaw[MAX_PHONE_LEN];
@@ -1087,7 +1087,7 @@ void SendSMSWindowFillTreeView(HWND hWnd) HWND hWndTreeView=GetDlgItem(hWnd,IDC_NUMBERSLIST);
TreeView_DeleteAllItems(hWndTreeView);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HTREEITEM hParent = NULL;
LPSTR lpszProto = GetContactProto(hContact);
if (lpszProto) {
diff --git a/plugins/SMS/src/senddlg.h b/plugins/SMS/src/senddlg.h index 81c7acf2dc..9276ef9c62 100644 --- a/plugins/SMS/src/senddlg.h +++ b/plugins/SMS/src/senddlg.h @@ -11,10 +11,10 @@ INT_PTR CALLBACK SMSTimedOutDlgProc(HWND hWndDlg,UINT msg,WPARAM wParam,LPARAM l HTREEITEM SendSMSWindowHItemSendGet(HWND hWndDlg);
HTREEITEM SendSMSWindowNextHItemGet(HWND hWndDlg,HTREEITEM hItem);
-HWND SendSMSWindowAdd(HCONTACT hContact);
+HWND SendSMSWindowAdd(MCONTACT hContact);
void SendSMSWindowRemove(HWND hWndDlg);
-HCONTACT SendSMSWindowHContactGet(HWND hWndDlg);
-void SendSMSWindowHContactSet(HWND hWndDlg,HCONTACT hContact);
+MCONTACT SendSMSWindowHContactGet(HWND hWndDlg);
+void SendSMSWindowHContactSet(HWND hWndDlg,MCONTACT hContact);
HWND SendSMSWindowHwndByHProcessGet(HANDLE hProcess);
void SendSMSWindowHProcessSet(HWND hWndDlg,HANDLE hProcess);
BOOL SendSMSWindowMultipleGet(HWND hWndDlg);
@@ -24,11 +24,11 @@ void SendSMSWindowAsSentSet(HWND hWndDlg); void SendSMSWindowDbeiSet(HWND hWndDlg,DBEVENTINFO *pdbei);
void SendSMSWindowDBAdd(HWND hWndDlg);
void SendSMSWindowHItemSendSet(HWND hWndDlg,HTREEITEM hItemSend);
-HWND SendSMSWindowIsOtherInstanceHContact(HCONTACT hContact);
+HWND SendSMSWindowIsOtherInstanceHContact(MCONTACT hContact);
void SendSMSWindowNext(HWND hWndDlg);
-void SendSMSWindowSMSContactAdd(HWND hWndDlg,HCONTACT hContact);
-HCONTACT SendSMSWindowSMSContactGet(HWND hWndDlg,SIZE_T iNum);
+void SendSMSWindowSMSContactAdd(HWND hWndDlg,MCONTACT hContact);
+MCONTACT SendSMSWindowSMSContactGet(HWND hWndDlg,SIZE_T iNum);
void SendSMSWindowSMSContactsRemove(HWND hWndDlg);
void SendSMSWindowUpdateAccountList(HWND hWndDlg);
void SendSMSWindowsUpdateAllAccountLists();
diff --git a/plugins/Scriver/src/chat/chat.h b/plugins/Scriver/src/chat/chat.h index 4481f69b4e..7b8bb4d3d7 100644 --- a/plugins/Scriver/src/chat/chat.h +++ b/plugins/Scriver/src/chat/chat.h @@ -93,7 +93,7 @@ INT_PTR CALLBACK DlgProcColorToolWindow(HWND hwndDlg, UINT msg, WPARAM wParam, L void Log_StreamInEvent(HWND hwndDlg, LOGINFO* lin, SESSION_INFO *si, BOOL bRedraw);
void LoadMsgLogBitmaps(void);
void FreeMsgLogBitmaps(void);
-TCHAR* GetChatLogsFilename(HCONTACT hContact, time_t tTime);
+TCHAR* GetChatLogsFilename(MCONTACT hContact, time_t tTime);
// window.c
int GetTextPixelSize( TCHAR* pszText, HFONT hFont, BOOL bWidth);
@@ -105,7 +105,7 @@ int OptionsInit(void); void ShowRoom(SESSION_INFO *si, WPARAM wp, BOOL bSetForeground);
// manager.c
-HWND SM_FindWindowByContact(HCONTACT hContact);
+HWND SM_FindWindowByContact(MCONTACT hContact);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
char SM_GetStatusIndicator(SESSION_INFO *si, USERINFO *ui);
diff --git a/plugins/Scriver/src/chat/manager.cpp b/plugins/Scriver/src/chat/manager.cpp index 51b1b7b4e0..63a2a0309d 100644 --- a/plugins/Scriver/src/chat/manager.cpp +++ b/plugins/Scriver/src/chat/manager.cpp @@ -21,7 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "../commonheaders.h"
-HWND SM_FindWindowByContact(HCONTACT hContact)
+HWND SM_FindWindowByContact(MCONTACT hContact)
{
SESSION_INFO *pTemp = pci->wndList;
diff --git a/plugins/Scriver/src/chat/tools.cpp b/plugins/Scriver/src/chat/tools.cpp index 196d868a7f..6ae7991e30 100644 --- a/plugins/Scriver/src/chat/tools.cpp +++ b/plugins/Scriver/src/chat/tools.cpp @@ -152,7 +152,7 @@ BOOL DoEventHookAsync(HWND hwnd, const TCHAR *pszID, const char* pszModule, int return TRUE;
}
-TCHAR* GetChatLogsFilename(HCONTACT hContact, time_t tTime)
+TCHAR* GetChatLogsFilename(MCONTACT hContact, time_t tTime)
{
REPLACEVARSARRAY rva[11];
TCHAR *p = { 0 }, *tszParsedName = { 0 };
diff --git a/plugins/Scriver/src/cmdlist.cpp b/plugins/Scriver/src/cmdlist.cpp index 1c6669877b..7cbdd96b4f 100644 --- a/plugins/Scriver/src/cmdlist.cpp +++ b/plugins/Scriver/src/cmdlist.cpp @@ -71,7 +71,7 @@ TCmdList *tcmdlist_remove(TCmdList *list, TCmdList *n) return list;
}
-TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data)
+TCmdList *tcmdlist_append2(TCmdList *list, MCONTACT hContact, const char *data)
{
TCmdList *new_list = (TCmdList *)mir_alloc(sizeof(TCmdList));
TCmdList *attach_to = NULL;
@@ -98,7 +98,7 @@ TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data) return list;
}
-TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact)
+TCmdList *tcmdlist_remove2(TCmdList *list, MCONTACT hContact)
{
for (TCmdList *n = list; n != NULL; n = n->next) {
if (n->hContact == hContact) {
@@ -113,7 +113,7 @@ TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact) return list;
}
-TCmdList *tcmdlist_get2(TCmdList *list, HCONTACT hContact)
+TCmdList *tcmdlist_get2(TCmdList *list, MCONTACT hContact)
{
for (TCmdList *n = list; n != NULL; n = n->next)
if (n->hContact == hContact)
diff --git a/plugins/Scriver/src/cmdlist.h b/plugins/Scriver/src/cmdlist.h index 1c2509ad31..7198be8437 100644 --- a/plugins/Scriver/src/cmdlist.h +++ b/plugins/Scriver/src/cmdlist.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct _TCmdList {
struct _TCmdList *next;
struct _TCmdList *prev;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szCmd;
BOOL temporary;
} TCmdList;
@@ -32,9 +32,9 @@ typedef struct _TCmdList { TCmdList *tcmdlist_append(TCmdList *list, const char *data, int maxSize, BOOL temporary);
TCmdList *tcmdlist_remove(TCmdList *list, TCmdList *n);
TCmdList *tcmdlist_remove_first(TCmdList *list);
-TCmdList *tcmdlist_append2(TCmdList *list, HCONTACT hContact, const char *data);
-TCmdList *tcmdlist_remove2(TCmdList *list, HCONTACT hContact);
-TCmdList *tcmdlist_get2(TCmdList *list, HCONTACT hContact);
+TCmdList *tcmdlist_append2(TCmdList *list, MCONTACT hContact, const char *data);
+TCmdList *tcmdlist_remove2(TCmdList *list, MCONTACT hContact);
+TCmdList *tcmdlist_get2(TCmdList *list, MCONTACT hContact);
int tcmdlist_len(TCmdList *list);
TCmdList *tcmdlist_last(TCmdList *list);
void tcmdlist_free(TCmdList * list);
diff --git a/plugins/Scriver/src/commonheaders.h b/plugins/Scriver/src/commonheaders.h index 9061830df1..198b661de9 100644 --- a/plugins/Scriver/src/commonheaders.h +++ b/plugins/Scriver/src/commonheaders.h @@ -102,7 +102,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define CFM_WEIGHT 0x00400000
#endif
-extern HWND SM_FindWindowByContact(HCONTACT hContact);
+extern HWND SM_FindWindowByContact(MCONTACT hContact);
extern HINSTANCE g_hInst;
extern CREOleCallback reOleCallback;
extern void ChangeStatusIcons();
diff --git a/plugins/Scriver/src/globals.h b/plugins/Scriver/src/globals.h index 65ae3b8706..9fce7a273c 100644 --- a/plugins/Scriver/src/globals.h +++ b/plugins/Scriver/src/globals.h @@ -129,7 +129,7 @@ void ReleaseIcons(); void LoadGlobalIcons();
HICON GetCachedIcon(const char *name);
void RegisterFontServiceFonts();
-int ScriverRestoreWindowPosition(HWND hwnd,HCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);
+int ScriverRestoreWindowPosition(HWND hwnd,MCONTACT hContact,const char *szModule,const char *szNamePrefix, int flags, int showCmd);
int ImageList_AddIcon_Ex(HIMAGELIST hIml, int id);
int ImageList_AddIcon_Ex2(HIMAGELIST hIml, HICON hIcon);
diff --git a/plugins/Scriver/src/input.cpp b/plugins/Scriver/src/input.cpp index 01d286fd0a..aeaf2482df 100644 --- a/plugins/Scriver/src/input.cpp +++ b/plugins/Scriver/src/input.cpp @@ -29,7 +29,7 @@ enum KB_ACTIONS {KB_PREV_TAB = 1, KB_NEXT_TAB, KB_SWITCHTOOLBAR, KB_SWITCHSTATUSBAR, KB_SWITCHTITLEBAR, KB_SWITCHINFOBAR, KB_MINIMIZE, KB_CLOSE, KB_CLEAR_LOG,
KB_TAB1, KB_TAB2, KB_TAB3, KB_TAB4, KB_TAB5, KB_TAB6, KB_TAB7, KB_TAB8, KB_TAB9, KB_SEND_ALL, KB_PASTESEND, KB_QUOTE};
-void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, HCONTACT hContact)
+void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, MCONTACT hContact)
{
POINT pt;
CHARRANGE sel, all = { 0, -1 };
diff --git a/plugins/Scriver/src/input.h b/plugins/Scriver/src/input.h index a36c5b02e0..874b58ce9e 100644 --- a/plugins/Scriver/src/input.h +++ b/plugins/Scriver/src/input.h @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef INPUT_H
#define INPUT_H
-extern void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, HCONTACT hContact);
+extern void InputAreaContextMenu(HWND hwnd, WPARAM wParam, LPARAM lParam, MCONTACT hContact);
extern void RegisterKeyBindings();
extern int InputAreaShortcuts(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam, CommonWindowData *windowData);
BOOL HandleLinkClick(HINSTANCE hInstance, HWND hwndDlg, HWND hwndFocus, ENLINK *lParam);
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp index 8d7856eb8b..2c7755f21c 100644 --- a/plugins/Scriver/src/msgdialog.cpp +++ b/plugins/Scriver/src/msgdialog.cpp @@ -131,7 +131,7 @@ static TCHAR *GetQuotedTextW(TCHAR * text) return out;
}
-static void saveDraftMessage(HWND hwnd, HCONTACT hContact, int codepage)
+static void saveDraftMessage(HWND hwnd, MCONTACT hContact, int codepage)
{
char *textBuffer = GetRichTextEncoded(hwnd, codepage);
if (textBuffer != NULL) {
@@ -141,7 +141,7 @@ static void saveDraftMessage(HWND hwnd, HCONTACT hContact, int codepage) else g_dat.draftList = tcmdlist_remove2(g_dat.draftList, hContact);
}
-void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact == NULL || hwnd == NULL)
return;
@@ -158,7 +158,7 @@ void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type) NotifyEventHooks(hHookWinEvt, 0, (LPARAM)&mwe);
}
-static BOOL IsUtfSendAvailable(HCONTACT hContact)
+static BOOL IsUtfSendAvailable(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if ( szProto == NULL )
@@ -255,12 +255,12 @@ void SetStatusIcon(struct SrmmWindowData *dat) return;
char *szProto = dat->szProto;
- HCONTACT hContact = dat->windowData.hContact;
+ MCONTACT hContact = dat->windowData.hContact;
char* szMetaProto = (char*)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
if ((INT_PTR)szMetaProto != CALLSERVICE_NOTFOUND && strcmp(dat->szProto, szMetaProto) == 0 &&
db_get_b(NULL,"CLC","Meta",0) == 0) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact != NULL)
szProto = GetContactProto(hContact);
else
@@ -1093,7 +1093,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
case DM_CLISTSETTINGSCHANGED:
- if ((HCONTACT)wParam == dat->windowData.hContact) {
+ if ((MCONTACT)wParam == dat->windowData.hContact) {
if (dat->windowData.hContact && dat->szProto) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
char idbuf[128];
@@ -1353,7 +1353,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_REMAKELOG:
dat->lastEventType = -1;
- if (wParam == 0 || (HCONTACT)wParam == dat->windowData.hContact)
+ if (wParam == 0 || (MCONTACT)wParam == dat->windowData.hContact)
StreamInEvents(hwndDlg, dat->hDbEventFirst, -1, 0);
InvalidateRect(GetDlgItem(hwndDlg, IDC_LOG), NULL, FALSE);
@@ -1390,7 +1390,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
case HM_DBEVENTADDED:
- if ((HCONTACT)wParam == dat->windowData.hContact) {
+ if ((MCONTACT)wParam == dat->windowData.hContact) {
HANDLE hDbEvent = (HANDLE)lParam;
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
@@ -1773,7 +1773,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP smaddInfo.targetWParam = TRUE;
smaddInfo.Protocolname = dat->szProto;
if (dat->szProto!=NULL && strcmp(dat->szProto,"MetaContacts") == 0) {
- HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact!=NULL) {
smaddInfo.Protocolname = GetContactProto(hContact);
}
diff --git a/plugins/Scriver/src/msglog.cpp b/plugins/Scriver/src/msglog.cpp index 0a14b4575f..cb59b9b61b 100644 --- a/plugins/Scriver/src/msglog.cpp +++ b/plugins/Scriver/src/msglog.cpp @@ -74,7 +74,7 @@ struct EventData struct LogStreamData
{
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -85,7 +85,7 @@ struct LogStreamData EventData *events;
};
-TCHAR *GetNickname(HCONTACT hContact, const char* szProto)
+TCHAR *GetNickname(MCONTACT hContact, const char* szProto)
{
CONTACTINFO ci = { sizeof(ci) };
ci.hContact = hContact;
@@ -151,7 +151,7 @@ int DbEventIsShown(DBEVENTINFO * dbei, struct SrmmWindowData *dat) return DbEventIsCustomForMsgWindow(dbei);
}
-EventData* getEventFromDB(struct SrmmWindowData *dat, HCONTACT hContact, HANDLE hDbEvent)
+EventData* getEventFromDB(struct SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.cbBlob = db_event_getBlobSize(hDbEvent);
@@ -922,7 +922,7 @@ void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend) smre.hwndRichEditControl = GetDlgItem(hwndDlg, IDC_LOG);
smre.Protocolname = dat->szProto;
if (dat->szProto != NULL && strcmp(dat->szProto, "MetaContacts") == 0) {
- HCONTACT hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->windowData.hContact, 0);
if (hContact != NULL)
smre.Protocolname = GetContactProto(hContact);
}
diff --git a/plugins/Scriver/src/msgoptions.cpp b/plugins/Scriver/src/msgoptions.cpp index 962ae1dfc2..d7413db3f1 100644 --- a/plugins/Scriver/src/msgoptions.cpp +++ b/plugins/Scriver/src/msgoptions.cpp @@ -845,7 +845,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown && db_get_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, SRMMMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -860,7 +860,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown)
db_set_b(NULL, SRMMMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
db_set_b(hContact, SRMMMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp index f4f9133162..ffc1f0c14a 100644 --- a/plugins/Scriver/src/msgs.cpp +++ b/plugins/Scriver/src/msgs.cpp @@ -27,7 +27,7 @@ HCURSOR hCurSplitNS, hCurSplitWE, hCurHyperlinkHand, hDragCursor; HANDLE hHookWinEvt, hHookWinPopup, hHookWinWrite;
HGENMENU hMsgMenuItem;
-extern HWND GetParentWindow(HCONTACT hContact, BOOL bChat);
+extern HWND GetParentWindow(MCONTACT hContact, BOOL bChat);
#define EVENTTYPE_SCRIVER 2010
#define SCRIVER_DB_GETEVENTTEXT "Scriver/GetText"
@@ -59,11 +59,11 @@ static int SRMMStatusToPf2(int status) return 0;
}
-int IsAutoPopup(HCONTACT hContact) {
+int IsAutoPopup(MCONTACT hContact) {
if (g_dat.flags & SMF_AUTOPOPUP) {
char *szProto = GetContactProto(hContact);
if (strcmp(szProto, "MetaContacts") == 0 ) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL)
szProto = GetContactProto(hContact);
}
@@ -96,7 +96,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (dbei.eventType == EVENTTYPE_MESSAGE && (dbei.flags & DBEF_READ))
return 0;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd)
SendMessage(hwnd, HM_DBEVENTADDED, wParam, lParam);
@@ -108,9 +108,9 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) if (hwnd == NULL) {
/* new message */
SkinPlaySound("AlertMsg");
- if (IsAutoPopup((HCONTACT)wParam)) {
+ if (IsAutoPopup((MCONTACT)wParam)) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
newData.flags = NMWLP_INCOMING;
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)&newData);
@@ -123,7 +123,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -136,15 +136,15 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam)
{
- /* does the HCONTACT's protocol support IM messages? */
- char *szProto = GetContactProto((HCONTACT)wParam);
+ /* does the MCONTACT's protocol support IM messages? */
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
return 1; /* unknown contact */
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -155,7 +155,7 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) }
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.szInitialText = (const char *) lParam;
newData.isWchar = 1;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
@@ -166,17 +166,17 @@ static INT_PTR SendMessageCommandW(WPARAM wParam, LPARAM lParam) static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
//logInfo("Show message window for: %s (%s)", CallService(MS_CLIST_GETCONTACTDISPLAYNAME, wParam, 0), szProto);
if (szProto) {
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
return 1;
}
else /* unknown contact */
return 1;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd != NULL) {
if (lParam) {
HWND hEdit = GetDlgItem(hwnd, IDC_MESSAGE);
@@ -187,7 +187,7 @@ static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) }
else {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.szInitialText = (const char *)lParam;
HWND hParent = GetParentWindow(newData.hContact, FALSE);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), hParent, DlgProcMessage, (LPARAM)& newData);
@@ -210,7 +210,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) SkinPlaySound((lParam) ? "TNStart" : "TNStop");
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd)
SendMessage(hwnd, DM_TYPING, 0, lParam);
else if (lParam && (g_dat.flags2 & SMF2_SHOWTYPINGTRAY)) {
@@ -231,7 +231,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) CLISTEVENT cle = {0};
cle.cbSize = sizeof(cle);
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = GetCachedIcon("scriver_TYPING");
@@ -247,7 +247,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (lstrcmpA(cws->szModule, "CList") && (szProto == NULL || lstrcmpA(cws->szModule, szProto)))
return 0;
WindowList_Broadcast(g_dat.hMessageWindowList, DM_CLISTSETTINGSCHANGED, wParam, lParam);
@@ -257,7 +257,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) static int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
HWND hwnd;
- if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam)))
+ if ((hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam)))
SendMessage(hwnd, WM_CLOSE, 0, 0);
return 0;
}
@@ -274,7 +274,7 @@ static void RestoreUnreadMessageAlerts(void) cle.flags = CLEF_TCHAR;
cle.ptszTooltip = toolTip;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
dbei.cbBlob = 0;
@@ -338,9 +338,9 @@ static INT_PTR GetWindowData(WPARAM wParam, LPARAM lParam) static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam)
{
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd == NULL)
- hwnd = SM_FindWindowByContact((HCONTACT)wParam);
+ hwnd = SM_FindWindowByContact((MCONTACT)wParam);
if (hwnd == NULL)
return 1;
@@ -354,7 +354,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == 0)
return 0;
@@ -376,7 +376,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if (wParam == 0) // protocol picture has changed...
WindowList_Broadcast(g_dat.hMessageWindowList, DM_AVATARCHANGED, wParam, lParam);
else {
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
SendMessage(hwnd, DM_AVATARCHANGED, wParam, lParam);
}
return 0;
@@ -407,9 +407,9 @@ void ChangeStatusIcons() int StatusIconPressed(WPARAM wParam, LPARAM lParam)
{
StatusIconClickData *sicd = (StatusIconClickData *) lParam;
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd == NULL)
- hwnd = SM_FindWindowByContact((HCONTACT)wParam);
+ hwnd = SM_FindWindowByContact((MCONTACT)wParam);
if (hwnd != NULL) {
if (!strcmp(SRMMMOD, sicd->szModule)) {
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h index 9272e3638b..055d65b742 100644 --- a/plugins/Scriver/src/msgs.h +++ b/plugins/Scriver/src/msgs.h @@ -61,7 +61,7 @@ struct TabCtrlData struct ParentWindowData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
int childrenCount;
HWND hwndActive;
HWND hwndStatus;
@@ -84,7 +84,7 @@ struct ParentWindowData struct MessageWindowTabData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
ParentWindowData *parent;
HICON hIcon;
@@ -94,7 +94,7 @@ struct MessageWindowTabData struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL isChat;
int isWchar;
LPCSTR szInitialText;
@@ -105,7 +105,7 @@ struct NewMessageWindowLParam struct CommonWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
int codePage;
DWORD flags;
HWND hwndLog;
@@ -230,8 +230,8 @@ int safe_wcslen(wchar_t *msg, int maxLen); void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
-TCHAR *GetNickname(HCONTACT hContact, const char* szProto);
-int IsAutoPopup(HCONTACT hContact);
+TCHAR *GetNickname(MCONTACT hContact, const char* szProto);
+int IsAutoPopup(MCONTACT hContact);
#define MSGFONTID_MYMSG 0
#define MSGFONTID_YOURMSG 1
diff --git a/plugins/Scriver/src/msgwindow.cpp b/plugins/Scriver/src/msgwindow.cpp index ffa0b80403..e079d7e7af 100644 --- a/plugins/Scriver/src/msgwindow.cpp +++ b/plugins/Scriver/src/msgwindow.cpp @@ -33,11 +33,11 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPa /////////////////////////////////////////////////////////////////////////////////////////
-extern TCHAR *GetNickname(HCONTACT hContact, const char* szProto);
+extern TCHAR *GetNickname(MCONTACT hContact, const char* szProto);
static const TCHAR *titleTokenNames[] = {_T("%name%"), _T("%status%"), _T("%statusmsg%"), _T("%account%")};
-TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto)
+TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto)
{
int isTemplate;
int i, j, len;
@@ -135,7 +135,7 @@ TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto) return title;
}
-TCHAR* GetTabName(HCONTACT hContact)
+TCHAR* GetTabName(MCONTACT hContact)
{
if (hContact)
return GetNickname(hContact, NULL);
@@ -317,7 +317,7 @@ static void ActivateChild(ParentWindowData *dat, HWND child) SendMessage(dat->hwndActive, DM_ACTIVATE, WA_ACTIVE, 0);
}
-static void AddChild(ParentWindowData *dat, HWND hwnd, HCONTACT hContact)
+static void AddChild(ParentWindowData *dat, HWND hwnd, MCONTACT hContact)
{
MessageWindowTabData *mwtd = (MessageWindowTabData *)mir_alloc(sizeof(MessageWindowTabData));
mwtd->hwnd = hwnd;
@@ -549,13 +549,13 @@ LRESULT CALLBACK TabCtrlProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) MessageWindowTabData *mwtd = (MessageWindowTabData *)tci.lParam;
if (mwtd != NULL) {
HWND hChild = mwtd->hwnd;
- HCONTACT hContact = mwtd->hContact;
+ MCONTACT hContact = mwtd->hContact;
GetCursorPos(&pt);
HWND hParent = WindowFromPoint(pt);
while (GetParent(hParent) != NULL)
hParent = GetParent(hParent);
- hParent = WindowList_Find(g_dat.hParentWindowList, (HCONTACT)hParent);
+ hParent = WindowList_Find(g_dat.hParentWindowList, (MCONTACT)hParent);
if ((hParent != NULL && hParent != GetParent(hwnd)) || (hParent == NULL && mwtd->parent->childrenCount > 1 && (GetKeyState(VK_CONTROL) & 0x8000))) {
if (hParent == NULL) {
RECT rc, rcDesktop;
@@ -774,12 +774,12 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR if (dat->prev != NULL)
dat->prev->next = dat;
- WindowList_Add(g_dat.hParentWindowList, hwndDlg, (HCONTACT)hwndDlg);
+ WindowList_Add(g_dat.hParentWindowList, hwndDlg, (MCONTACT)hwndDlg);
SubclassTabCtrl(dat->hwndTabs);
SetContainerWindowStyle(dat);
- HCONTACT hSContact = savePerContact ? dat->hContact : NULL;
+ MCONTACT hSContact = savePerContact ? dat->hContact : NULL;
dat->bTopmost = db_get_b(hSContact, SRMMMOD, SRMSGSET_TOPMOST, SRMSGDEFSET_TOPMOST);
if (ScriverRestoreWindowPosition(hwndDlg, hSContact, SRMMMOD, (newData->isChat && !savePerContact) ? "chat" : "", 0, SW_HIDE))
SetWindowPos(hwndDlg, 0, 0, 0, 450, 300, SWP_NOZORDER | SWP_NOMOVE | SWP_HIDEWINDOW);
@@ -1128,7 +1128,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR WindowList_Remove(g_dat.hParentWindowList, hwndDlg);
int savePerContact = db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT);
- HCONTACT hContact = (savePerContact) ? dat->hContact : NULL;
+ MCONTACT hContact = (savePerContact) ? dat->hContact : NULL;
WINDOWPLACEMENT wp = { sizeof(wp) };
GetWindowPlacement(hwndDlg, &wp);
@@ -1207,7 +1207,7 @@ INT_PTR CALLBACK DlgProcParentWindow(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return TRUE;
case CM_ADDCHILD:
- AddChild(dat, (HWND)wParam, (HCONTACT)lParam);
+ AddChild(dat, (HWND)wParam, (MCONTACT)lParam);
return TRUE;
case CM_ACTIVATECHILD:
@@ -1506,7 +1506,7 @@ static void DrawTab(ParentWindowData *dat, HWND hwnd, WPARAM wParam, LPARAM lPar }
}
-int ScriverRestoreWindowPosition(HWND hwnd, HCONTACT hContact, const char *szModule,const char *szNamePrefix, int flags, int showCmd)
+int ScriverRestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szModule,const char *szNamePrefix, int flags, int showCmd)
{
WINDOWPLACEMENT wp;
wp.length = sizeof(wp);
@@ -1544,7 +1544,7 @@ int ScriverRestoreWindowPosition(HWND hwnd, HCONTACT hContact, const char *szMod return 0;
}
-HWND GetParentWindow(HCONTACT hContact, BOOL bChat)
+HWND GetParentWindow(MCONTACT hContact, BOOL bChat)
{
NewMessageWindowLParam newData = { 0 };
newData.hContact = hContact;
diff --git a/plugins/Scriver/src/msgwindow.h b/plugins/Scriver/src/msgwindow.h index c1977b23bd..500e671cf3 100644 --- a/plugins/Scriver/src/msgwindow.h +++ b/plugins/Scriver/src/msgwindow.h @@ -88,9 +88,9 @@ struct TabControlData HICON hIcon;
};
-TCHAR* GetWindowTitle(HCONTACT hContact, const char *szProto);
-TCHAR* GetTabName(HCONTACT hContact);
-HWND GetParentWindow(HCONTACT hContact, BOOL bChat);
-void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type);
+TCHAR* GetWindowTitle(MCONTACT hContact, const char *szProto);
+TCHAR* GetTabName(MCONTACT hContact);
+HWND GetParentWindow(MCONTACT hContact, BOOL bChat);
+void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type);
#endif
diff --git a/plugins/Scriver/src/sendqueue.cpp b/plugins/Scriver/src/sendqueue.cpp index 0328efb80a..6175c87d22 100644 --- a/plugins/Scriver/src/sendqueue.cpp +++ b/plugins/Scriver/src/sendqueue.cpp @@ -66,7 +66,7 @@ MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender) return item;
}
-MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT hContact)
+MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, MCONTACT hContact)
{
MessageSendQueueItem *item, *found = NULL;
EnterCriticalSection(&queueMutex);
@@ -79,7 +79,7 @@ MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT h return found;
}
-MessageSendQueueItem* FindSendQueueItem(HCONTACT hContact, HANDLE hSendId)
+MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId)
{
mir_cslock lock(queueMutex);
for (MessageSendQueueItem *item = global_sendQueue; item != NULL; item = item->next)
@@ -159,7 +159,7 @@ void ReleaseSendQueueItems(HWND hwndSender) }
}
-int ReattachSendQueueItems(HWND hwndSender, HCONTACT hContact)
+int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact)
{
int count = 0;
diff --git a/plugins/Scriver/src/sendqueue.h b/plugins/Scriver/src/sendqueue.h index 204deec72a..688c7bd629 100644 --- a/plugins/Scriver/src/sendqueue.h +++ b/plugins/Scriver/src/sendqueue.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct MessageSendQueueItem
{
HWND hwndSender;
- HCONTACT hContact;
+ MCONTACT hContact;
char *proto;
HANDLE hSendId;
int timeout;
@@ -44,12 +44,12 @@ void InitSendQueue(); void DestroySendQueue();
MessageSendQueueItem* CreateSendQueueItem(HWND hwndSender);
TCHAR * GetSendBufferMsg(MessageSendQueueItem *item);
-MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, HCONTACT hContact);
-MessageSendQueueItem* FindSendQueueItem(HCONTACT hContact, HANDLE hSendId);
+MessageSendQueueItem* FindOldestPendingSendQueueItem(HWND hwndSender, MCONTACT hContact);
+MessageSendQueueItem* FindSendQueueItem(MCONTACT hContact, HANDLE hSendId);
BOOL RemoveSendQueueItem(MessageSendQueueItem* item);
void ReportSendQueueTimeouts(HWND hwndSender);
void ReleaseSendQueueItems(HWND hwndSender);
-int ReattachSendQueueItems(HWND hwndSender, HCONTACT hContact);
+int ReattachSendQueueItems(HWND hwndSender, MCONTACT hContact);
void RemoveAllSendQueueItems();
void SendSendQueueItem(MessageSendQueueItem* item);
diff --git a/plugins/Scriver/src/statusicon.cpp b/plugins/Scriver/src/statusicon.cpp index 28b26064f6..65af9ce66e 100644 --- a/plugins/Scriver/src/statusicon.cpp +++ b/plugins/Scriver/src/statusicon.cpp @@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. HANDLE hHookIconPressedEvt;
-void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap)
+void DrawStatusIcons(MCONTACT hContact, HDC hDC, RECT r, int gap)
{
HICON hIcon;
int x = r.left;
@@ -42,7 +42,7 @@ void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap) }
}
-void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
+void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
{
unsigned int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap);
StatusIconData *si = Srmm_GetNthIcon(hContact, iconNum);
@@ -61,7 +61,7 @@ void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, in static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hParentWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
@@ -88,7 +88,7 @@ int DeinitStatusIcons() return 0;
}
-int GetStatusIconsCount(HCONTACT hContact)
+int GetStatusIconsCount(MCONTACT hContact)
{
int nIcon = 0;
while ( Srmm_GetNthIcon(hContact, nIcon) != NULL)
diff --git a/plugins/Scriver/src/statusicon.h b/plugins/Scriver/src/statusicon.h index 5d86eb7e22..232bb06c47 100644 --- a/plugins/Scriver/src/statusicon.h +++ b/plugins/Scriver/src/statusicon.h @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. int InitStatusIcons();
int DeinitStatusIcons();
-int GetStatusIconsCount(HCONTACT hContact);
-void DrawStatusIcons(HCONTACT hContact, HDC hdc, RECT r, int gap);
-void CheckStatusIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT rc, int gap, int flags);
+int GetStatusIconsCount(MCONTACT hContact);
+void DrawStatusIcons(MCONTACT hContact, HDC hdc, RECT r, int gap);
+void CheckStatusIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT rc, int gap, int flags);
#endif
diff --git a/plugins/SecureIM/src/commonheaders.cpp b/plugins/SecureIM/src/commonheaders.cpp index 6dccfe53bc..db6ee76cd3 100644 --- a/plugins/SecureIM/src/commonheaders.cpp +++ b/plugins/SecureIM/src/commonheaders.cpp @@ -37,7 +37,7 @@ PLUGININFOEX pluginInfoEx = { {0x1B2A39E5, 0xE2F6, 0x494D, {0x95, 0x8D, 0x18, 0x08, 0xFD, 0x11, 0x0D, 0xD5}}
};
-LPSTR myDBGetStringDecode(HCONTACT hContact,const char *szModule,const char *szSetting)
+LPSTR myDBGetStringDecode(MCONTACT hContact,const char *szModule,const char *szSetting)
{
char *val = db_get_sa(hContact,szModule,szSetting);
if (!val) return NULL;
@@ -47,7 +47,7 @@ LPSTR myDBGetStringDecode(HCONTACT hContact,const char *szModule,const char *szS return buf;
}
-int myDBWriteStringEncode(HCONTACT hContact,const char *szModule,const char *szSetting,const char *val)
+int myDBWriteStringEncode(MCONTACT hContact,const char *szModule,const char *szSetting,const char *val)
{
int len = (int)strlen(val)+64;
char *buf = (LPSTR)alloca(len);
diff --git a/plugins/SecureIM/src/commonheaders.h b/plugins/SecureIM/src/commonheaders.h index 69305e6d4d..6fe89b1c81 100644 --- a/plugins/SecureIM/src/commonheaders.h +++ b/plugins/SecureIM/src/commonheaders.h @@ -102,7 +102,7 @@ int onModulesLoaded(WPARAM, LPARAM); int onShutdown(WPARAM, LPARAM);
int ModuleLoad(WPARAM wParam, LPARAM lParam);
-__forceinline int SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+__forceinline int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
return ProtoBroadcastAck( GetContactProto(hContact), hContact, type, result, hProcess, lParam);
}
diff --git a/plugins/SecureIM/src/crypt.h b/plugins/SecureIM/src/crypt.h index 9da46e8be9..e7e9398f69 100644 --- a/plugins/SecureIM/src/crypt.h +++ b/plugins/SecureIM/src/crypt.h @@ -39,7 +39,7 @@ typedef partitionMessage* pPM; // memory struct for keys
struct UinKey
{
- HCONTACT hContact; // handle of contact
+ MCONTACT hContact; // handle of contact
u_int header; // HEADER
pSupPro proto; // proto struct
BYTE mode,tmode; // mode: Native,PGP,GPG,RSA/AES,RSA [0..4]
@@ -70,13 +70,13 @@ typedef UinKey* pUinKey; struct TFakeAckParams
{
- __forceinline TFakeAckParams(HCONTACT p1, LONG p2, LPCSTR p3) :
+ __forceinline TFakeAckParams(MCONTACT p1, LONG p2, LPCSTR p3) :
hContact(p1),
id(p2),
msg(p3)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
LONG id;
LPCSTR msg;
};
@@ -90,71 +90,71 @@ extern LIST<UinKey> arClist; // crypt_lists.cpp
void loadContactList();
void freeContactList();
-pUinKey addContact(HCONTACT hContact);
-void delContact(HCONTACT hContact);
-pSupPro getSupPro(HCONTACT);
-pUinKey findUinKey(HCONTACT hContact);
-pUinKey getUinKey(HCONTACT hContact);
+pUinKey addContact(MCONTACT hContact);
+void delContact(MCONTACT hContact);
+pSupPro getSupPro(MCONTACT);
+pUinKey findUinKey(MCONTACT hContact);
+pUinKey getUinKey(MCONTACT hContact);
pUinKey getUinCtx(HANDLE);
void addMsg2Queue(pUinKey,WPARAM,LPSTR);
-void getContactName(HCONTACT hContact, LPSTR szName);
-void getContactNameA(HCONTACT hContact, LPSTR szName);
-void getContactUin(HCONTACT hContact, LPSTR szUIN);
-void getContactUinA(HCONTACT hContact, LPSTR szUIN);
+void getContactName(MCONTACT hContact, LPSTR szName);
+void getContactNameA(MCONTACT hContact, LPSTR szName);
+void getContactUin(MCONTACT hContact, LPSTR szUIN);
+void getContactUinA(MCONTACT hContact, LPSTR szUIN);
// crypt_check.cpp
-int getContactStatus(HCONTACT);
+int getContactStatus(MCONTACT);
-bool isSecureProtocol(HCONTACT hContact);
-BYTE isContactSecured(HCONTACT hContact);
+bool isSecureProtocol(MCONTACT hContact);
+BYTE isContactSecured(MCONTACT hContact);
bool isClientMiranda(pUinKey ptr, BOOL emptyMirverAsMiranda=FALSE);
-bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda=FALSE);
-bool isProtoSmallPackets(HCONTACT);
-bool isContactInvisible(HCONTACT);
-bool isNotOnList(HCONTACT);
-bool isContactNewPG(HCONTACT);
-bool isContactPGP(HCONTACT);
-bool isContactGPG(HCONTACT);
-bool isContactRSAAES(HCONTACT);
-bool isContactRSA(HCONTACT);
-bool isChatRoom(HCONTACT);
+bool isClientMiranda(MCONTACT hContact, BOOL emptyMirverAsMiranda=FALSE);
+bool isProtoSmallPackets(MCONTACT);
+bool isContactInvisible(MCONTACT);
+bool isNotOnList(MCONTACT);
+bool isContactNewPG(MCONTACT);
+bool isContactPGP(MCONTACT);
+bool isContactGPG(MCONTACT);
+bool isContactRSAAES(MCONTACT);
+bool isContactRSA(MCONTACT);
+bool isChatRoom(MCONTACT);
bool isFileExist(LPCSTR);
bool isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM=FALSE);
-bool isSecureIM(HCONTACT hContact, BOOL emptyMirverAsSecureIM=FALSE);
+bool isSecureIM(MCONTACT hContact, BOOL emptyMirverAsSecureIM=FALSE);
// crypt_icons.cpp
HICON mode2icon(int,int);
HANDLE mode2clicon(int mode, int type);
void RefreshContactListIcons(void);
-void ShowStatusIcon(HCONTACT, UINT);
-void ShowStatusIcon(HCONTACT);
-void ShowStatusIconNotify(HCONTACT);
+void ShowStatusIcon(MCONTACT, UINT);
+void ShowStatusIcon(MCONTACT);
+void ShowStatusIconNotify(MCONTACT);
// crypt_popups.cpp
//static int CALLBACK PopupDlgProc(HWND,UINT,WPARAM,LPARAM);
-void showPopup(LPCSTR, HCONTACT, HICON, UINT);
-void showPopupEC(HCONTACT);
-void showPopupDCmsg(HCONTACT, LPCSTR);
-void showPopupDC(HCONTACT);
-void showPopupKS(HCONTACT);
-void showPopupKRmsg(HCONTACT, LPCSTR);
-void showPopupKR(HCONTACT);
-void showPopupSM(HCONTACT);
-void showPopupRM(HCONTACT);
+void showPopup(LPCSTR, MCONTACT, HICON, UINT);
+void showPopupEC(MCONTACT);
+void showPopupDCmsg(MCONTACT, LPCSTR);
+void showPopupDC(MCONTACT);
+void showPopupKS(MCONTACT);
+void showPopupKRmsg(MCONTACT, LPCSTR);
+void showPopupKR(MCONTACT);
+void showPopupSM(MCONTACT);
+void showPopupRM(MCONTACT);
// crypt_meta.cpp
-BOOL isProtoMetaContacts(HCONTACT);
-BOOL isDefaultSubContact(HCONTACT);
-HCONTACT getMetaContact(HCONTACT);
-HCONTACT getMostOnline(HCONTACT);
-void DeinitMetaContact(HCONTACT);
+BOOL isProtoMetaContacts(MCONTACT);
+BOOL isDefaultSubContact(MCONTACT);
+MCONTACT getMetaContact(MCONTACT);
+MCONTACT getMostOnline(MCONTACT);
+void DeinitMetaContact(MCONTACT);
// crypt_dll.cpp
LPSTR InitKeyA(pUinKey, int);
int InitKeyB(pUinKey, LPCSTR);
void InitKeyX(pUinKey, BYTE*);
-BOOL CalculateKeyX(pUinKey, HCONTACT);
+BOOL CalculateKeyX(pUinKey, MCONTACT);
LPSTR encodeMsg(pUinKey, LPARAM);
LPSTR decodeMsg(pUinKey, LPARAM, LPSTR);
BOOL LoadKeyPGP(pUinKey);
diff --git a/plugins/SecureIM/src/crypt_check.cpp b/plugins/SecureIM/src/crypt_check.cpp index 44c6c8183a..2359af5240 100644 --- a/plugins/SecureIM/src/crypt_check.cpp +++ b/plugins/SecureIM/src/crypt_check.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-int getContactStatus(HCONTACT hContact)
+int getContactStatus(MCONTACT hContact)
{
pSupPro ptr = getSupPro(hContact);
if (ptr)
@@ -9,7 +9,7 @@ int getContactStatus(HCONTACT hContact) return -1;
}
-bool isSecureProtocol(HCONTACT hContact)
+bool isSecureProtocol(MCONTACT hContact)
{
pSupPro ptr = getSupPro(hContact);
if (!ptr)
@@ -18,7 +18,7 @@ bool isSecureProtocol(HCONTACT hContact) return ptr->inspecting != 0;
}
-BYTE isContactSecured(HCONTACT hContact)
+BYTE isContactSecured(MCONTACT hContact)
{
// íóæíà ïðîâåðêà íà Offline è â ýòîì ñëó÷àå äðóãèå ñòàòóñû
if (!arClist.getCount()) return 0;
@@ -76,7 +76,7 @@ bool isClientMiranda(pUinKey ptr, BOOL emptyMirverAsMiranda) return isMiranda;
}
-bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda)
+bool isClientMiranda(MCONTACT hContact, BOOL emptyMirverAsMiranda)
{
if (!bMCD) return true;
if (!arClist.getCount()) return false;
@@ -85,7 +85,7 @@ bool isClientMiranda(HCONTACT hContact, BOOL emptyMirverAsMiranda) return (p) ? isClientMiranda(p, emptyMirverAsMiranda) : false;
}
-bool isProtoSmallPackets(HCONTACT hContact)
+bool isProtoSmallPackets(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -94,7 +94,7 @@ bool isProtoSmallPackets(HCONTACT hContact) return strstr(p->proto->name,"IRC") != NULL || strstr(p->proto->name,"WinPopup") != NULL || strstr(p->proto->name,"VyChat") != NULL;
}
-bool isContactInvisible(HCONTACT hContact)
+bool isContactInvisible(MCONTACT hContact)
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return true;
@@ -114,12 +114,12 @@ bool isContactInvisible(HCONTACT hContact) return false;
}
-bool isNotOnList(HCONTACT hContact)
+bool isNotOnList(MCONTACT hContact)
{
return db_get_b(hContact, "CList", "NotOnList", 0) != 0;
}
-bool isContactNewPG(HCONTACT hContact)
+bool isContactNewPG(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting || !p->cntx)
@@ -128,7 +128,7 @@ bool isContactNewPG(HCONTACT hContact) return (p->features & CPP_FEATURES_NEWPG) != 0;
}
-bool isContactPGP(HCONTACT hContact)
+bool isContactPGP(MCONTACT hContact)
{
if (!bPGPloaded || (!bPGPkeyrings && !bPGPprivkey)) return false;
@@ -142,7 +142,7 @@ bool isContactPGP(HCONTACT hContact) return true;
}
-bool isContactGPG(HCONTACT hContact)
+bool isContactGPG(MCONTACT hContact)
{
if (!bGPGloaded || !bGPGkeyrings) return false;
@@ -156,7 +156,7 @@ bool isContactGPG(HCONTACT hContact) return true;
}
-bool isContactRSAAES(HCONTACT hContact)
+bool isContactRSAAES(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -165,7 +165,7 @@ bool isContactRSAAES(HCONTACT hContact) return p->mode == MODE_RSAAES;
}
-bool isContactRSA(HCONTACT hContact)
+bool isContactRSA(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -174,7 +174,7 @@ bool isContactRSA(HCONTACT hContact) return p->mode == MODE_RSA;
}
-bool isChatRoom(HCONTACT hContact)
+bool isChatRoom(MCONTACT hContact)
{
pUinKey p = findUinKey(hContact);
if (!p || !p->proto || !p->proto->inspecting)
@@ -205,7 +205,7 @@ bool isSecureIM(pUinKey ptr, BOOL emptyMirverAsSecureIM) return isSecureIM;
}
-bool isSecureIM(HCONTACT hContact, BOOL emptyMirverAsSecureIM)
+bool isSecureIM(MCONTACT hContact, BOOL emptyMirverAsSecureIM)
{
if (!bAIP) return false;
diff --git a/plugins/SecureIM/src/crypt_dll.cpp b/plugins/SecureIM/src/crypt_dll.cpp index 59c5698384..67a03a609c 100644 --- a/plugins/SecureIM/src/crypt_dll.cpp +++ b/plugins/SecureIM/src/crypt_dll.cpp @@ -73,7 +73,7 @@ void InitKeyX(pUinKey ptr,BYTE *key) // calculate secret key
-BOOL CalculateKeyX(pUinKey ptr,HCONTACT hContact)
+BOOL CalculateKeyX(pUinKey ptr,MCONTACT hContact)
{
int agr = cpp_calc_keyx(ptr->cntx);
if (agr) {
diff --git a/plugins/SecureIM/src/crypt_icons.cpp b/plugins/SecureIM/src/crypt_icons.cpp index dfb0d0771d..f4eb6b75c2 100644 --- a/plugins/SecureIM/src/crypt_icons.cpp +++ b/plugins/SecureIM/src/crypt_icons.cpp @@ -62,9 +62,9 @@ HANDLE mode2clicon(int mode, int type) }
// îáíîâëÿåò èêîíêè â clist è â messagew
-void ShowStatusIcon(HCONTACT hContact, int mode)
+void ShowStatusIcon(MCONTACT hContact, int mode)
{
- HCONTACT hMC = getMetaContact(hContact);
+ MCONTACT hMC = getMetaContact(hContact);
// îáíîâèòü èêîíêè â clist
if (mode != -1) {
@@ -92,12 +92,12 @@ void ShowStatusIcon(HCONTACT hContact, int mode) }
}
-void ShowStatusIcon(HCONTACT hContact)
+void ShowStatusIcon(MCONTACT hContact)
{
ShowStatusIcon(hContact, isContactSecured(hContact));
}
-void ShowStatusIconNotify(HCONTACT hContact)
+void ShowStatusIconNotify(MCONTACT hContact)
{
BYTE mode = isContactSecured(hContact);
NotifyEventHooks(g_hEvent[(mode&SECURED) != 0], (WPARAM)hContact, 0);
@@ -109,7 +109,7 @@ void RefreshContactListIcons(void) for (int i=0; i < arIcoList.getCount(); i++)
arIcoList[i].hCLIcon = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (isSecureProtocol(hContact))
ShowStatusIcon(hContact);
}
diff --git a/plugins/SecureIM/src/crypt_lists.cpp b/plugins/SecureIM/src/crypt_lists.cpp index 9ec49d9705..3c3a5808e9 100644 --- a/plugins/SecureIM/src/crypt_lists.cpp +++ b/plugins/SecureIM/src/crypt_lists.cpp @@ -62,7 +62,7 @@ void freeSupportedProtocols() arProto.destroy();
}
-pSupPro getSupPro(HCONTACT hContact)
+pSupPro getSupPro(MCONTACT hContact)
{
for (int j=0; j < arProto.getCount(); j++)
if (CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)arProto[j]->name))
@@ -72,7 +72,7 @@ pSupPro getSupPro(HCONTACT hContact) }
// add contact in the list of secureIM users
-pUinKey addContact(HCONTACT hContact)
+pUinKey addContact(MCONTACT hContact)
{
if (hContact == NULL) return NULL;
@@ -99,7 +99,7 @@ pUinKey addContact(HCONTACT hContact) }
// delete contact from the list of secureIM users
-void delContact(HCONTACT hContact)
+void delContact(MCONTACT hContact)
{
pUinKey p = arClist.find((pUinKey)&hContact);
if (p) {
@@ -118,7 +118,7 @@ void loadContactList() freeContactList();
loadSupportedProtocols();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
addContact(hContact);
}
@@ -138,12 +138,12 @@ void freeContactList() }
// find user in the list of secureIM users and add him, if unknow
-pUinKey findUinKey(HCONTACT hContact)
+pUinKey findUinKey(MCONTACT hContact)
{
return arClist.find((pUinKey)&hContact);
}
-pUinKey getUinKey(HCONTACT hContact)
+pUinKey getUinKey(MCONTACT hContact)
{
pUinKey p = arClist.find((pUinKey)&hContact);
return (p) ? p : addContact(hContact);
@@ -198,16 +198,16 @@ void addMsg2Queue(pUinKey ptr,WPARAM wParam,LPSTR szMsg) LeaveCriticalSection(&localQueueMutex);
}
-void getContactNameA(HCONTACT hContact, LPSTR szName) {
+void getContactNameA(MCONTACT hContact, LPSTR szName) {
strcpy(szName,(LPCSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,0));
}
-void getContactName(HCONTACT hContact, LPSTR szName)
+void getContactName(MCONTACT hContact, LPSTR szName)
{
wcscpy((LPWSTR)szName, (LPWSTR)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GSMDF_UNICODE));
}
-void getContactUinA(HCONTACT hContact, LPSTR szUIN)
+void getContactUinA(MCONTACT hContact, LPSTR szUIN)
{
*szUIN = 0;
@@ -233,7 +233,7 @@ void getContactUinA(HCONTACT hContact, LPSTR szUIN) db_free(&dbv_uniqueid);
}
-void getContactUin(HCONTACT hContact, LPSTR szUIN)
+void getContactUin(MCONTACT hContact, LPSTR szUIN)
{
getContactUinA(hContact, szUIN);
if (*szUIN) {
diff --git a/plugins/SecureIM/src/crypt_metacontacts.cpp b/plugins/SecureIM/src/crypt_metacontacts.cpp index 113bf22abc..16304cffac 100644 --- a/plugins/SecureIM/src/crypt_metacontacts.cpp +++ b/plugins/SecureIM/src/crypt_metacontacts.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-BOOL isProtoMetaContacts(HCONTACT hContact)
+BOOL isProtoMetaContacts(MCONTACT hContact)
{
if (bMetaContacts) {
LPSTR proto = GetContactProto(hContact);
@@ -10,37 +10,37 @@ BOOL isProtoMetaContacts(HCONTACT hContact) return false;
}
-BOOL isDefaultSubContact(HCONTACT hContact)
+BOOL isDefaultSubContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0) == hContact;
+ return (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT,(WPARAM)CallService(MS_MC_GETMETACONTACT,(WPARAM)hContact,0),0) == hContact;
return false;
}
-HCONTACT getMetaContact(HCONTACT hContact)
+MCONTACT getMetaContact(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
return 0;
}
-HCONTACT getMostOnline(HCONTACT hContact)
+MCONTACT getMostOnline(MCONTACT hContact)
{
if (bMetaContacts)
- return (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ return (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return 0;
}
// remove all secureim connections on subcontacts
-void DeinitMetaContact(HCONTACT hContact)
+void DeinitMetaContact(MCONTACT hContact)
{
- HCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : getMetaContact(hContact);
+ MCONTACT hMetaContact = isProtoMetaContacts(hContact) ? hContact : getMetaContact(hContact);
if (hMetaContact) {
for (int i=0; i < CallService(MS_MC_GETNUMCONTACTS,(WPARAM)hMetaContact,0); i++) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hMetaContact, i);
if (hSubContact && (isContactSecured(hSubContact)&SECURED))
CallContactService(hSubContact,PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
}
diff --git a/plugins/SecureIM/src/crypt_misc.cpp b/plugins/SecureIM/src/crypt_misc.cpp index ec7d6d1088..4a6b774adb 100644 --- a/plugins/SecureIM/src/crypt_misc.cpp +++ b/plugins/SecureIM/src/crypt_misc.cpp @@ -2,7 +2,7 @@ static void sttWaitForExchange(LPVOID param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
pUinKey ptr = getUinKey(hContact);
if (!ptr)
return;
diff --git a/plugins/SecureIM/src/crypt_popups.cpp b/plugins/SecureIM/src/crypt_popups.cpp index 9b085bdb3e..39bca4ac55 100644 --- a/plugins/SecureIM/src/crypt_popups.cpp +++ b/plugins/SecureIM/src/crypt_popups.cpp @@ -1,6 +1,6 @@ #include "commonheaders.h"
-void showPopup(LPCSTR lpzText,HCONTACT hContact,HICON hIcon, UINT type)
+void showPopup(LPCSTR lpzText,MCONTACT hContact,HICON hIcon, UINT type)
{
//type=0 key colors
//type=1 session colors
@@ -52,50 +52,50 @@ void showPopup(LPCSTR lpzText,HCONTACT hContact,HICON hIcon, UINT type) PUAddPopupW(&ppd);
}
-void showPopupDCmsg(HCONTACT hContact,LPCSTR msg)
+void showPopupDCmsg(MCONTACT hContact,LPCSTR msg)
{
if (db_get_b(0, MODULENAME, "dc", 1))
showPopup(msg, hContact, g_hPOP[POP_PU_DIS], 1);
}
-void showPopupDC(HCONTACT hContact)
+void showPopupDC(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "dc", 1))
showPopup(sim006, hContact, g_hPOP[POP_PU_DIS], 1);
}
-void showPopupEC(HCONTACT hContact)
+void showPopupEC(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ec", 1))
showPopup(sim001, hContact, g_hPOP[POP_PU_EST], 1);
}
-void showPopupKS(HCONTACT hContact)
+void showPopupKS(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ks",1))
showPopup(sim007, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupKRmsg(HCONTACT hContact,LPCSTR msg)
+void showPopupKRmsg(MCONTACT hContact,LPCSTR msg)
{
if (db_get_b(0, MODULENAME, "kr", 1))
showPopup(msg, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupKR(HCONTACT hContact)
+void showPopupKR(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "kr", 1))
showPopup(sim008, hContact, g_hPOP[POP_PU_PRC], 0);
}
-void showPopupSM(HCONTACT hContact)
+void showPopupSM(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "ss", 0))
showPopup(sim009, hContact, g_hPOP[POP_PU_MSS], 2);
SkinPlaySound("OutgoingSecureMessage");
}
-void showPopupRM(HCONTACT hContact)
+void showPopupRM(MCONTACT hContact)
{
if (db_get_b(0, MODULENAME, "sr", 0))
showPopup(sim010, hContact, g_hPOP[POP_PU_MSR], 2);
diff --git a/plugins/SecureIM/src/dbevent.cpp b/plugins/SecureIM/src/dbevent.cpp index 7d3d0afaf7..5e38811d98 100644 --- a/plugins/SecureIM/src/dbevent.cpp +++ b/plugins/SecureIM/src/dbevent.cpp @@ -1,7 +1,7 @@ #include "commonheaders.h"
-void HistoryLog(HCONTACT hContact, LPCSTR szText)
+void HistoryLog(MCONTACT hContact, LPCSTR szText)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = GetContactProto(hContact);
diff --git a/plugins/SecureIM/src/dbevent.h b/plugins/SecureIM/src/dbevent.h index 4eb5251eb1..e03ef9abbc 100644 --- a/plugins/SecureIM/src/dbevent.h +++ b/plugins/SecureIM/src/dbevent.h @@ -1,6 +1,6 @@ #ifndef __DBEVENT_H__
#define __DBEVENT_H__
-void HistoryLog(HCONTACT, LPCSTR);
+void HistoryLog(MCONTACT, LPCSTR);
#endif
diff --git a/plugins/SecureIM/src/options.cpp b/plugins/SecureIM/src/options.cpp index 31d5159a9b..732b3466a3 100644 --- a/plugins/SecureIM/src/options.cpp +++ b/plugins/SecureIM/src/options.cpp @@ -977,7 +977,7 @@ void RefreshGeneralDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && isSecureProtocol(hContact) && !isChatRoom(hContact)) {
if (iInit) {
@@ -1063,7 +1063,7 @@ void RefreshPGPDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_PGP && isSecureProtocol(hContact) /*&& !getMetaContact(hContact)*/ && !isChatRoom(hContact)) {
LPSTR szKeyID = db_get_sa(hContact,MODULENAME,"pgp_abbr");
@@ -1123,7 +1123,7 @@ void RefreshGPGDlg(HWND hDlg, BOOL iInit) char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
pUinKey ptr = getUinKey(hContact);
if (ptr && ptr->mode == MODE_GPG && isSecureProtocol(hContact) /*&& !getMetaContact(hContact)*/ && !isChatRoom(hContact)) {
if (iInit )
@@ -1176,7 +1176,7 @@ void ResetGeneralDlg(HWND hDlg) lvi.mask = LVIF_TEXT | LVIF_IMAGE | LVIF_PARAM;
char tmp[NAMSIZE];
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (!isSecureProtocol(hContact) || isChatRoom(hContact))
continue;
diff --git a/plugins/SecureIM/src/svcs_clist.cpp b/plugins/SecureIM/src/svcs_clist.cpp index 24efb7785b..e7640d2477 100644 --- a/plugins/SecureIM/src/svcs_clist.cpp +++ b/plugins/SecureIM/src/svcs_clist.cpp @@ -3,7 +3,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
if (!hContact || strcmp(cws->szSetting,"Status")) return 0;
@@ -37,7 +37,7 @@ int __cdecl onContactSettingChanged(WPARAM wParam,LPARAM lParam) { // lParam=0
int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam)
{
- addContact((HCONTACT)wParam);
+ addContact((MCONTACT)wParam);
return 0;
}
@@ -46,7 +46,7 @@ int __cdecl onContactAdded(WPARAM wParam,LPARAM lParam) // lParam=0
int __cdecl onContactDeleted(WPARAM wParam,LPARAM lParam)
{
- delContact((HCONTACT)wParam);
+ delContact((MCONTACT)wParam);
return 0;
}
@@ -59,15 +59,15 @@ int __cdecl onExtraImageListRebuilding(WPARAM, LPARAM) int __cdecl onExtraImageApplying(WPARAM wParam, LPARAM)
{
- if (isSecureProtocol((HCONTACT)wParam))
- ExtraIcon_SetIcon(g_hCLIcon, (HCONTACT)wParam, mode2clicon(isContactSecured((HCONTACT)wParam), 1));
+ if (isSecureProtocol((MCONTACT)wParam))
+ ExtraIcon_SetIcon(g_hCLIcon, (MCONTACT)wParam, mode2clicon(isContactSecured((MCONTACT)wParam), 1));
return 0;
}
int __cdecl onRebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BOOL bMC = isProtoMetaContacts(hContact);
if (bMC ) hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
pUinKey ptr = getUinKey(hContact);
diff --git a/plugins/SecureIM/src/svcs_menu.cpp b/plugins/SecureIM/src/svcs_menu.cpp index f099757b0d..c50c7c7f09 100644 --- a/plugins/SecureIM/src/svcs_menu.cpp +++ b/plugins/SecureIM/src/svcs_menu.cpp @@ -3,19 +3,19 @@ INT_PTR __cdecl Service_IsContactSecured(WPARAM wParam, LPARAM lParam)
{
- return (isContactSecured((HCONTACT)wParam)&SECURED) || isContactPGP((HCONTACT)wParam) || isContactGPG((HCONTACT)wParam);
+ return (isContactSecured((MCONTACT)wParam)&SECURED) || isContactPGP((MCONTACT)wParam) || isContactGPG((MCONTACT)wParam);
}
INT_PTR __cdecl Service_CreateIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((HCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
+ CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_INIT);
return 1;
}
INT_PTR __cdecl Service_DisableIM(WPARAM wParam,LPARAM lParam)
{
- CallContactService((HCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
+ CallContactService((MCONTACT)wParam, PSS_MESSAGE, PREF_METANODB, (LPARAM)SIG_DEIN);
return 1;
}
@@ -25,7 +25,7 @@ INT_PTR __cdecl Service_Status(WPARAM wParam, LPARAM lParam) case STATUS_DISABLED:
case STATUS_ENABLED:
case STATUS_ALWAYSTRY:
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
if (ptr) {
ptr->status=ptr->tstatus=(BYTE)lParam;
if (ptr->status == STATUS_ENABLED) db_unset(ptr->hContact, MODULENAME, "StatusID");
@@ -55,15 +55,15 @@ INT_PTR __cdecl Service_StatusTry(WPARAM wParam, LPARAM lParam) INT_PTR __cdecl Service_PGPdelKey(WPARAM wParam, LPARAM lParam)
{
if (bPGPloaded) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_unset((HCONTACT)wParam, MODULENAME, "pgp_mode");
- db_unset((HCONTACT)wParam, MODULENAME, "pgp_abbr");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp_mode");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp_abbr");
}
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
@@ -75,10 +75,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
PVOID KeyID = pgp_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_set_blob((HCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
- db_set_b((HCONTACT)wParam, MODULENAME, "pgp_mode", 0);
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID);
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_set_blob((MCONTACT)wParam, MODULENAME, "pgp", KeyID, pgp_size_keyid());
+ db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 0);
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", szKeyID);
del = false;
}
}
@@ -87,10 +87,10 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (ShowSelectKeyDlg(0,KeyPath)) {
char *publ = LoadKeys(KeyPath,false);
if (publ) {
- db_unset((HCONTACT)wParam, MODULENAME, "pgp");
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp", publ);
- db_set_b((HCONTACT)wParam, MODULENAME, "pgp_mode", 1);
- db_set_s((HCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)");
+ db_unset((MCONTACT)wParam, MODULENAME, "pgp");
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp", publ);
+ db_set_b((MCONTACT)wParam, MODULENAME, "pgp_mode", 1);
+ db_set_s((MCONTACT)wParam, MODULENAME, "pgp_abbr", "(binary)");
mir_free(publ);
del = false;
}
@@ -101,22 +101,22 @@ INT_PTR __cdecl Service_PGPsetKey(WPARAM wParam, LPARAM lParam) if (del)
Service_PGPdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
INT_PTR __cdecl Service_GPGdelKey(WPARAM wParam, LPARAM lParam)
{
if (bGPGloaded)
- db_unset((HCONTACT)wParam, MODULENAME, "gpg");
+ db_unset((MCONTACT)wParam, MODULENAME, "gpg");
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
@@ -127,28 +127,28 @@ INT_PTR __cdecl Service_GPGsetKey(WPARAM wParam, LPARAM lParam) char szKeyID[128]; szKeyID[0]='\0';
gpg_select_keyid(GetForegroundWindow(),szKeyID);
if (szKeyID[0]) {
- db_set_s((HCONTACT)wParam, MODULENAME, "gpg", szKeyID);
+ db_set_s((MCONTACT)wParam, MODULENAME, "gpg", szKeyID);
del = false;
}
}
if (del) Service_GPGdelKey(wParam,lParam);
else {
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
cpp_delete_context(ptr->cntx); ptr->cntx=0;
}
- ShowStatusIconNotify((HCONTACT)wParam);
+ ShowStatusIconNotify((MCONTACT)wParam);
return 1;
}
INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam)
{
- pUinKey ptr = getUinKey((HCONTACT)wParam);
+ pUinKey ptr = getUinKey((MCONTACT)wParam);
switch(--lParam) {
case MODE_NATIVE:
case MODE_RSAAES:
- if (isContactSecured((HCONTACT)wParam)&SECURED) {
+ if (isContactSecured((MCONTACT)wParam)&SECURED) {
msgbox(NULL, sim111, MODULENAME, MB_OK);
return 0;
}
@@ -165,9 +165,9 @@ INT_PTR __cdecl Service_Mode(WPARAM wParam, LPARAM lParam) ptr->keyLoaded = 0;
}
ptr->mode=(BYTE)lParam;
- db_set_b((HCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam);
+ db_set_b((MCONTACT)wParam, MODULENAME, "mode", (BYTE)lParam);
}
- ShowStatusIcon((HCONTACT)wParam);
+ ShowStatusIcon((MCONTACT)wParam);
break;
}
diff --git a/plugins/SecureIM/src/svcs_proto.cpp b/plugins/SecureIM/src/svcs_proto.cpp index 7a0c20fe3c..a9ec7f2f92 100644 --- a/plugins/SecureIM/src/svcs_proto.cpp +++ b/plugins/SecureIM/src/svcs_proto.cpp @@ -31,13 +31,13 @@ static void sttFakeAck(LPVOID param) delete tParam;
}
-int returnNoError(HCONTACT hContact)
+int returnNoError(MCONTACT hContact)
{
mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 777, 0));
return 777;
}
-int returnError(HCONTACT hContact, LPCSTR err)
+int returnError(MCONTACT hContact, LPCSTR err)
{
mir_forkthread(sttFakeAck, new TFakeAckParams(hContact, 666, err));
return 666;
diff --git a/plugins/SecureIM/src/svcs_srmm.cpp b/plugins/SecureIM/src/svcs_srmm.cpp index 59791ee43c..9c2aa2c7f5 100644 --- a/plugins/SecureIM/src/svcs_srmm.cpp +++ b/plugins/SecureIM/src/svcs_srmm.cpp @@ -11,7 +11,7 @@ int __cdecl onWindowEvent(WPARAM, LPARAM lParam) int __cdecl onIconPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (isProtoMetaContacts(hContact))
hContact = getMostOnline(hContact); // âîçüìåì òîò, ÷åðåç êîòîðûé ïîéäåò ñîîáùåíèå
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp index d049fda7d3..e6ce08c2ac 100644 --- a/plugins/SeenPlugin/src/file.cpp +++ b/plugins/SeenPlugin/src/file.cpp @@ -59,7 +59,7 @@ int InitFileOutput(void) /*
Writes a line into the log.
*/
-void FileWrite(HCONTACT hcontact)
+void FileWrite(MCONTACT hcontact)
{
TCHAR szout[1024];
diff --git a/plugins/SeenPlugin/src/history.cpp b/plugins/SeenPlugin/src/history.cpp index 1d935e4d7b..e6faeb5ccb 100644 --- a/plugins/SeenPlugin/src/history.cpp +++ b/plugins/SeenPlugin/src/history.cpp @@ -31,7 +31,7 @@ char* BuildSetting(int historyLast) { return setting;
}
-void HistoryWrite(HCONTACT hContact)
+void HistoryWrite(MCONTACT hContact)
{
int historyMax = db_get_w(NULL, S_MOD, "HistoryMax", 10);
if (historyMax < 0)
@@ -64,7 +64,7 @@ void HistoryWrite(HCONTACT hContact) db_set_w(hContact, S_MOD, "HistoryFirst", (historyFirst+1) % historyMax);
}
-void LoadHistoryList(HCONTACT hContact, HWND hwnd, int nList)
+void LoadHistoryList(MCONTACT hContact, HWND hwnd, int nList)
{
SendDlgItemMessage(hwnd, nList, LB_RESETCONTENT, 0, 0);
int historyMax = db_get_w(NULL,S_MOD,"HistoryMax",10);
@@ -161,13 +161,13 @@ void MyResizeGetOffset (HWND hwndDlg, HWND hwndControl, int nWidth, int nHeight, INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARAM lparam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR sztemp[1024];
switch(Message) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT)lparam;
+ hContact = (MCONTACT)lparam;
SetWindowLongPtr(hwndDlg,GWLP_USERDATA,lparam);
mir_sntprintf(sztemp, SIZEOF(sztemp), _T("%s: %s"),
CallService(MS_CLIST_GETCONTACTDISPLAYNAME,(WPARAM)hContact,GCDNF_TCHAR),
@@ -199,7 +199,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA return CallService(MS_CLIST_MENUDRAWITEM,wparam,lparam);
case WM_COMMAND:
- hContact=(HCONTACT)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
+ hContact=(MCONTACT)GetWindowLongPtr(hwndDlg,GWLP_USERDATA);
if (CallService(MS_CLIST_MENUPROCESSCOMMAND,MAKEWPARAM(LOWORD(wparam),MPCF_CONTACTMENU),(LPARAM)hContact))
break;
@@ -278,7 +278,7 @@ INT_PTR CALLBACK HistoryDlgProc(HWND hwndDlg, UINT Message, WPARAM wparam, LPARA return FALSE;
}
-void ShowHistory(HCONTACT hContact, BYTE isAlert)
+void ShowHistory(MCONTACT hContact, BYTE isAlert)
{
HWND hHistoryDlg = WindowList_Find(hWindowList,hContact);
if (hHistoryDlg == NULL) {
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp index 849c271dc6..575b232a43 100644 --- a/plugins/SeenPlugin/src/menu.cpp +++ b/plugins/SeenPlugin/src/menu.cpp @@ -30,14 +30,14 @@ Handles the messages sent by clicking the contact's menu item */
INT_PTR MenuitemClicked(WPARAM wparam,LPARAM)
{
- ShowHistory((HCONTACT)wparam, 0);
+ ShowHistory((MCONTACT)wparam, 0);
return 0;
}
int BuildContactMenu(WPARAM wparam,LPARAM)
{
int id = -1, isetting;
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
char *szProto = GetContactProto(hContact);
CLISTMENUITEM cmi = { sizeof(cmi) };
@@ -49,10 +49,10 @@ int BuildContactMenu(WPARAM wparam,LPARAM) DBVARIANT dbv;
if ( !db_get_ts(NULL, S_MOD, "MenuStamp", &dbv)) {
- cmi.ptszName = ParseString(dbv.ptszVal, (HCONTACT)wparam, 0);
+ cmi.ptszName = ParseString(dbv.ptszVal, (MCONTACT)wparam, 0);
db_free(&dbv);
}
- else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (HCONTACT)wparam, 0);
+ else cmi.ptszName = ParseString(DEFAULT_MENUSTAMP, (MCONTACT)wparam, 0);
if ( !_tcscmp(cmi.ptszName, TranslateT("<unknown>"))) {
if ( IsWatchedProtocol(szProto))
diff --git a/plugins/SeenPlugin/src/missed.cpp b/plugins/SeenPlugin/src/missed.cpp index 5746d0b647..6c32da815f 100644 --- a/plugins/SeenPlugin/src/missed.cpp +++ b/plugins/SeenPlugin/src/missed.cpp @@ -42,7 +42,7 @@ int RemoveUser(int pos) int ResetMissed(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_b(hContact, S_MOD, "Missed", 0);
ZeroMemory(&mcs,sizeof(mcs));
@@ -51,7 +51,7 @@ int ResetMissed(void) int CheckIfOnline(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if ( CallService(MS_CLIST_GETCONTACTICON, (WPARAM)hContact, 0) != ICON_OFFLINE)
db_set_b(hContact, S_MOD, "Missed", 2);
@@ -128,12 +128,12 @@ int Test(WPARAM wparam,LPARAM lparam) if (CallService(MS_IGNORE_ISIGNORED,wparam,IGNOREEVENT_USERONLINE))
return 0;
- if ( db_get_b((HCONTACT)wparam,S_MOD,"Missed",0)==2)
+ if ( db_get_b((MCONTACT)wparam,S_MOD,"Missed",0)==2)
return 0;
switch(lparam) {
case ICON_OFFLINE:
- if ( db_get_b((HCONTACT)wparam,S_MOD,"Missed",0) == 1) {
+ if ( db_get_b((MCONTACT)wparam,S_MOD,"Missed",0) == 1) {
WORD missed = IsUserMissed(wparam);
if (!LOWORD(missed)) {
mcs.times[mcs.count]=1;
@@ -141,7 +141,7 @@ int Test(WPARAM wparam,LPARAM lparam) }
else mcs.times[HIWORD(missed)]++;
- db_set_b((HCONTACT)wparam,S_MOD,"Missed",0);
+ db_set_b((MCONTACT)wparam,S_MOD,"Missed",0);
}
break;
@@ -152,7 +152,7 @@ int Test(WPARAM wparam,LPARAM lparam) case ICON_DND:
case ICON_FREE:
case ICON_INVIS:
- db_set_b((HCONTACT)wparam,S_MOD,"Missed",1);
+ db_set_b((MCONTACT)wparam,S_MOD,"Missed",1);
break;
}
diff --git a/plugins/SeenPlugin/src/seen.h b/plugins/SeenPlugin/src/seen.h index 15b357ac1f..fb548780f9 100644 --- a/plugins/SeenPlugin/src/seen.h +++ b/plugins/SeenPlugin/src/seen.h @@ -52,8 +52,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "resource.h"
#include "version.h"
-WCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
-WCHAR *any_to_Idle(HCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
+WCHAR *any_to_IdleNotidleUnknown(MCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
+WCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setting_name, WCHAR *buff, int bufflen);
#define NUM100NANOSEC 116444736000000000
@@ -94,7 +94,7 @@ typedef struct{ } MISSEDCONTACTS;
int IsWatchedProtocol(const char* szProto);
-TCHAR *ParseString(TCHAR*, HCONTACT, BYTE);
+TCHAR *ParseString(TCHAR*, MCONTACT, BYTE);
void GetColorsFromDWord(LPCOLORREF First, LPCOLORREF Second, DWORD colDword);
DWORD GetDWordFromColors(COLORREF First, COLORREF Second);
int OptionsInit(WPARAM,LPARAM);
@@ -106,11 +106,11 @@ int ModeChange(WPARAM,LPARAM); void SetOffline(void);
int ModeChange_mo(WPARAM,LPARAM);
int CheckIfOnline(void);
-void ShowHistory(HCONTACT hContact, BYTE isAlert);
+void ShowHistory(MCONTACT hContact, BYTE isAlert);
struct logthread_info
{
- HCONTACT hContact;
+ MCONTACT hContact;
char sProtoName[MAXMODULELABELLENGTH];
WORD currStatus;
};
diff --git a/plugins/SeenPlugin/src/userinfo.cpp b/plugins/SeenPlugin/src/userinfo.cpp index ddab491d6a..0f8ea6cc91 100644 --- a/plugins/SeenPlugin/src/userinfo.cpp +++ b/plugins/SeenPlugin/src/userinfo.cpp @@ -40,10 +40,10 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) {
TCHAR *szout;
if ( !db_get_ts(NULL, S_MOD, "UserStamp", &dbv)) {
- szout = ParseString(dbv.ptszVal, (HCONTACT)lparam, 0);
+ szout = ParseString(dbv.ptszVal, (MCONTACT)lparam, 0);
db_free(&dbv);
}
- else szout = ParseString(DEFAULT_USERSTAMP, (HCONTACT)lparam, 0);
+ else szout = ParseString(DEFAULT_USERSTAMP, (MCONTACT)lparam, 0);
SetDlgItemText(hdlg, IDC_INFOTEXT, szout);
if ( !lstrcmp(szout, TranslateT("<unknown>")))
@@ -62,7 +62,7 @@ INT_PTR CALLBACK UserinfoDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) int UserinfoInit(WPARAM wparam,LPARAM lparam)
{
- char *proto = GetContactProto((HCONTACT)lparam);
+ char *proto = GetContactProto((MCONTACT)lparam);
if ( IsWatchedProtocol(proto)) {
OPTIONSDIALOGPAGE uip = { sizeof(uip) };
uip.hInstance = hInstance;
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp index 34c839d0d6..6b568cab30 100644 --- a/plugins/SeenPlugin/src/utils.cpp +++ b/plugins/SeenPlugin/src/utils.cpp @@ -20,8 +20,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "seen.h"
-void FileWrite(HCONTACT);
-void HistoryWrite(HCONTACT hcontact);
+void FileWrite(MCONTACT);
+void HistoryWrite(MCONTACT hcontact);
extern HANDLE g_hShutdownEvent;
char * courProtoName = 0;
@@ -96,7 +96,7 @@ BOOL isMSN(char *protoname) return FALSE;
}
-DWORD isSeen(HCONTACT hcontact, SYSTEMTIME *st)
+DWORD isSeen(MCONTACT hcontact, SYSTEMTIME *st)
{
FILETIME ft;
ULONGLONG ll;
@@ -142,7 +142,7 @@ TCHAR *wdays_short[] = { LPGENT("Sun."), LPGENT("Mon."), LPGENT("Tue."), LPGENT( TCHAR *monthnames[] = { LPGENT("January"), LPGENT("February"), LPGENT("March"), LPGENT("April"), LPGENT("May"), LPGENT("June"), LPGENT("July"), LPGENT("August"), LPGENT("September"), LPGENT("October"), LPGENT("November"), LPGENT("December") };
TCHAR *mnames_short[] = { LPGENT("Jan."), LPGENT("Feb."), LPGENT("Mar."), LPGENT("Apr."), LPGENT("May"), LPGENT("Jun."), LPGENT("Jul."), LPGENT("Aug."), LPGENT("Sep."), LPGENT("Oct."), LPGENT("Nov."), LPGENT("Dec.") };
-TCHAR *ParseString(TCHAR *szstring, HCONTACT hcontact, BYTE isfile)
+TCHAR *ParseString(TCHAR *szstring, MCONTACT hcontact, BYTE isfile)
{
#define MAXSIZE 1024
static TCHAR sztemp[MAXSIZE+1];
@@ -386,7 +386,7 @@ LBL_charPtr: return sztemp;
}
-void _DBWriteTime(SYSTEMTIME *st, HCONTACT hcontact)
+void _DBWriteTime(SYSTEMTIME *st, MCONTACT hcontact)
{
db_set_w(hcontact,S_MOD,"Day",st->wDay);
db_set_w(hcontact,S_MOD,"Month",st->wMonth);
@@ -398,7 +398,7 @@ void _DBWriteTime(SYSTEMTIME *st, HCONTACT hcontact) }
-void DBWriteTimeTS(DWORD t, HCONTACT hcontact){
+void DBWriteTimeTS(DWORD t, MCONTACT hcontact){
SYSTEMTIME st;
FILETIME ft;
ULONGLONG ll = UInt32x32To64(CallService(MS_DB_TIME_TIMESTAMPTOLOCAL,t,0), 10000000) + NUM100NANOSEC;
@@ -454,7 +454,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa switch(message) {
case WM_COMMAND:
if (HIWORD(wParam) == STN_CLICKED){
- HCONTACT hContact = PUGetContact(hwnd);
+ MCONTACT hContact = PUGetContact(hwnd);
if (hContact > 0) CallService(MS_MSG_SENDMESSAGE,(WPARAM)hContact,0);
}
case WM_CONTEXTMENU:
@@ -465,7 +465,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa return DefWindowProc(hwnd, message, wParam, lParam);
};
-void ShowPopup(HCONTACT hcontact, const char * lpzProto, int newStatus)
+void ShowPopup(MCONTACT hcontact, const char * lpzProto, int newStatus)
{
if ( CallService(MS_IGNORE_ISIGNORED, (WPARAM)hcontact, IGNOREEVENT_USERONLINE))
return;
@@ -502,7 +502,7 @@ void ShowPopup(HCONTACT hcontact, const char * lpzProto, int newStatus) PUAddPopupT(&ppd);
}
-void myPlaySound(HCONTACT hcontact, WORD newStatus, WORD oldStatus)
+void myPlaySound(MCONTACT hcontact, WORD newStatus, WORD oldStatus)
{
if (CallService(MS_IGNORE_ISIGNORED,(WPARAM)hcontact,IGNOREEVENT_USERONLINE)) return;
//oldStatus and hcontact are not used yet
@@ -548,7 +548,7 @@ int UpdateValues(WPARAM wparam,LPARAM lparam) // to make this code faster
if (!wparam) return 0;
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING *)lparam;
//if (CallService(MS_IGNORE_ISIGNORED,(WPARAM)hContact,IGNOREEVENT_USERONLINE)) return 0;
BOOL isIdleEvent = includeIdle?(strcmp(cws->szSetting,"IdleTS")==0):0;
@@ -642,7 +642,7 @@ static void cleanThread(void *param) // I hope in 10 secons all logged-in contacts will be listed
if ( WaitForSingleObject(g_hShutdownEvent, 10000) == WAIT_TIMEOUT) {
- for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
+ for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
WORD oldStatus = db_get_w(hContact,S_MOD,"StatusTriger",ID_STATUS_OFFLINE) | 0x8000;
if (oldStatus > ID_STATUS_OFFLINE) {
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)==ID_STATUS_OFFLINE){
@@ -711,7 +711,7 @@ int ModeChange(WPARAM wparam,LPARAM lparam) return 0;
}
-short int isDbZero(HCONTACT hContact, const char *module_name, const char *setting_name)
+short int isDbZero(MCONTACT hContact, const char *module_name, const char *setting_name)
{
DBVARIANT dbv;
if ( !db_get(hContact, module_name, setting_name, &dbv)) {
@@ -729,7 +729,7 @@ short int isDbZero(HCONTACT hContact, const char *module_name, const char *setti return -1;
}
-TCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
+TCHAR *any_to_IdleNotidleUnknown(MCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
short int r = isDbZero(hContact, module_name, setting_name);
if (r==-1){
_tcsncpy(buff, TranslateT("Unknown"), bufflen);
@@ -740,7 +740,7 @@ TCHAR *any_to_IdleNotidleUnknown(HCONTACT hContact, const char *module_name, con return buff;
}
-TCHAR *any_to_Idle(HCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
+TCHAR *any_to_Idle(MCONTACT hContact, const char *module_name, const char *setting_name, TCHAR *buff, int bufflen) {
if (isDbZero(hContact, module_name, setting_name)==0) { //DB setting is NOT zero and exists
buff[0] = L'/';
_tcsncpy(&buff[1], TranslateT("Idle"), bufflen-1);
diff --git a/plugins/SendScreenshotPlus/src/CSend.cpp b/plugins/SendScreenshotPlus/src/CSend.cpp index 4158368e9f..793a9ecca7 100644 --- a/plugins/SendScreenshotPlus/src/CSend.cpp +++ b/plugins/SendScreenshotPlus/src/CSend.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "global.h" //--------------------------------------------------------------------------- -CSend::CSend(HWND Owner, HCONTACT hContact, bool bFreeOnExit) { +CSend::CSend(HWND Owner, MCONTACT hContact, bool bFreeOnExit) { m_hWndO = Owner; m_bFreeOnExit = bFreeOnExit; m_pszFile = NULL; @@ -59,7 +59,7 @@ CSend::~CSend(){ } //--------------------------------------------------------------------------- -void CSend::SetContact(HCONTACT hContact) { +void CSend::SetContact(MCONTACT hContact) { m_hContact = hContact; m_pszProto = GetContactProto(hContact); m_ChatRoom = db_get_b(hContact, m_pszProto, "ChatRoom", 0); diff --git a/plugins/SendScreenshotPlus/src/CSend.h b/plugins/SendScreenshotPlus/src/CSend.h index cdd12a5393..9026f72fe7 100644 --- a/plugins/SendScreenshotPlus/src/CSend.h +++ b/plugins/SendScreenshotPlus/src/CSend.h @@ -48,13 +48,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //--------------------------------------------------------------------------- class CSend { public: - CSend(HWND Owner, HCONTACT hContact, bool bFreeOnExit); // oder (TfrmMain & Owner) + CSend(HWND Owner, MCONTACT hContact, bool bFreeOnExit); // oder (TfrmMain & Owner) virtual ~CSend(); virtual void Send() = 0; // void SendSync(bool Sync) {m_SendSync = Sync;}; bool m_bFreeOnExit; // need to "delete object;" on exit ? - void SetContact(HCONTACT hContact); + void SetContact(MCONTACT hContact); BYTE GetEnableItem() {return m_EnableItem;}; LPTSTR GetErrorMsg() {return m_ErrorMsg;}; @@ -68,7 +68,7 @@ class CSend { protected: LPTSTR m_pszSendTyp; //hold string for error mess HWND m_hWndO; //window handle of caller - HCONTACT m_hContact; //Contact handle + MCONTACT m_hContact; //Contact handle char *m_pszProto; //Contact Proto Modul BYTE m_EnableItem; //hold flag for send type BYTE m_ChatRoom; //is Contact chatroom diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.cpp b/plugins/SendScreenshotPlus/src/CSendEmail.cpp index 778c28390c..9b6498ecb8 100644 --- a/plugins/SendScreenshotPlus/src/CSendEmail.cpp +++ b/plugins/SendScreenshotPlus/src/CSendEmail.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "global.h" //--------------------------------------------------------------------------- -CSendEmail::CSendEmail(HWND Owner, HCONTACT hContact, bool bFreeOnExit) +CSendEmail::CSendEmail(HWND Owner, MCONTACT hContact, bool bFreeOnExit) : CSend(Owner, hContact, bFreeOnExit){ m_EnableItem = SS_DLG_DELETEAFTERSSEND | SS_DLG_DESCRIPTION; // SS_DLG_AUTOSEND | ; m_pszSendTyp = _T("Email transfer"); diff --git a/plugins/SendScreenshotPlus/src/CSendEmail.h b/plugins/SendScreenshotPlus/src/CSendEmail.h index bfd51da9ce..5406ad08d4 100644 --- a/plugins/SendScreenshotPlus/src/CSendEmail.h +++ b/plugins/SendScreenshotPlus/src/CSendEmail.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSendEmail : public CSend {
public:
// Deklaration Standardkonstruktor/Standarddestructor
- CSendEmail(HWND Owner, HCONTACT hContact, bool bFreeOnExit);
+ CSendEmail(HWND Owner, MCONTACT hContact, bool bFreeOnExit);
~CSendEmail();
void Send();
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp index f7a4661261..ac2d7cef02 100644 --- a/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp +++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.cpp @@ -31,7 +31,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //---------------------------------------------------------------------------
-CSendFTPFile::CSendFTPFile(HWND Owner, HCONTACT hContact, bool bFreeOnExit)
+CSendFTPFile::CSendFTPFile(HWND Owner, MCONTACT hContact, bool bFreeOnExit)
: CSend(Owner, hContact, bFreeOnExit){
m_EnableItem = NULL ; //SS_DLG_DESCRIPTION| SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND;
m_pszSendTyp = LPGENT("FTPFile transfer");
diff --git a/plugins/SendScreenshotPlus/src/CSendFTPFile.h b/plugins/SendScreenshotPlus/src/CSendFTPFile.h index 11eaabb3e0..99901a862b 100644 --- a/plugins/SendScreenshotPlus/src/CSendFTPFile.h +++ b/plugins/SendScreenshotPlus/src/CSendFTPFile.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSendFTPFile : public CSend {
public:
// Deklaration Standardkonstruktor/Standarddestructor
- CSendFTPFile(HWND Owner, HCONTACT hContact, bool bFreeOnExit);
+ CSendFTPFile(HWND Owner, MCONTACT hContact, bool bFreeOnExit);
~CSendFTPFile();
void Send();
diff --git a/plugins/SendScreenshotPlus/src/CSendFile.cpp b/plugins/SendScreenshotPlus/src/CSendFile.cpp index 0453d581c0..4fce2dc7bf 100644 --- a/plugins/SendScreenshotPlus/src/CSendFile.cpp +++ b/plugins/SendScreenshotPlus/src/CSendFile.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "global.h"
//---------------------------------------------------------------------------
-CSendFile::CSendFile(HWND Owner, HCONTACT hContact, bool bFreeOnExit)
+CSendFile::CSendFile(HWND Owner, MCONTACT hContact, bool bFreeOnExit)
: CSend(Owner, hContact, bFreeOnExit){
m_EnableItem = SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND | SS_DLG_DESCRIPTION;
m_pszSendTyp = _T("File transfer");
diff --git a/plugins/SendScreenshotPlus/src/CSendFile.h b/plugins/SendScreenshotPlus/src/CSendFile.h index 07877cdac8..5e484c6973 100644 --- a/plugins/SendScreenshotPlus/src/CSendFile.h +++ b/plugins/SendScreenshotPlus/src/CSendFile.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSendFile : public CSend {
public:
// Deklaration Standardkonstruktor/Standarddestructor
- CSendFile(HWND Owner, HCONTACT hContact, bool bFreeOnExit);
+ CSendFile(HWND Owner, MCONTACT hContact, bool bFreeOnExit);
~CSendFile();
void Send();
diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp index cdc146b0e9..155ad79393 100644 --- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp +++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.cpp @@ -34,7 +34,7 @@ INT_PTR (*g_MirCallService)(const char *, WPARAM, LPARAM)=NULL; //--------------------------------------------------------------------------- -CSendHTTPServer::CSendHTTPServer(HWND Owner, HCONTACT hContact, bool bFreeOnExit) +CSendHTTPServer::CSendHTTPServer(HWND Owner, MCONTACT hContact, bool bFreeOnExit) : CSend(Owner, hContact, bFreeOnExit){ m_EnableItem = SS_DLG_DESCRIPTION ; //| SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND; m_pszSendTyp = _T("HTTPServer transfer"); diff --git a/plugins/SendScreenshotPlus/src/CSendHTTPServer.h b/plugins/SendScreenshotPlus/src/CSendHTTPServer.h index 740be3edf6..85ad17c8d6 100644 --- a/plugins/SendScreenshotPlus/src/CSendHTTPServer.h +++ b/plugins/SendScreenshotPlus/src/CSendHTTPServer.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSendHTTPServer : public CSend { public: // Deklaration Standardkonstruktor/Standarddestructor - CSendHTTPServer(HWND Owner, HCONTACT hContact, bool bFreeOnExit); + CSendHTTPServer(HWND Owner, MCONTACT hContact, bool bFreeOnExit); ~CSendHTTPServer(); void Send(); diff --git a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp index 68f91bbdc1..2af40a8740 100644 --- a/plugins/SendScreenshotPlus/src/CSendImageShack.cpp +++ b/plugins/SendScreenshotPlus/src/CSendImageShack.cpp @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "global.h" //--------------------------------------------------------------------------- -CSendImageShack::CSendImageShack(HWND Owner, HCONTACT hContact, bool bFreeOnExit) +CSendImageShack::CSendImageShack(HWND Owner, MCONTACT hContact, bool bFreeOnExit) : CSend(Owner, hContact, bFreeOnExit) { m_EnableItem = SS_DLG_AUTOSEND | SS_DLG_DELETEAFTERSSEND | SS_DLG_DESCRIPTION; m_pszSendTyp = _T("Image upload"); diff --git a/plugins/SendScreenshotPlus/src/CSendImageShack.h b/plugins/SendScreenshotPlus/src/CSendImageShack.h index 6ab5670c7c..b8f3623d61 100644 --- a/plugins/SendScreenshotPlus/src/CSendImageShack.h +++ b/plugins/SendScreenshotPlus/src/CSendImageShack.h @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. class CSendImageShack : public CSend { public: // Deklaration Standardkonstruktor/Standarddestructor - CSendImageShack(HWND Owner, HCONTACT hContact, bool bFreeOnExit); + CSendImageShack(HWND Owner, MCONTACT hContact, bool bFreeOnExit); ~CSendImageShack(); void Send(); diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 9ad59587ef..2801e4ae5d 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -210,7 +210,7 @@ INT_PTR service_CaptureAndSendDesktop(WPARAM wParam, LPARAM lParam) { delete frmMain; return -1; } - HCONTACT hContact = (HCONTACT) wParam; + MCONTACT hContact = (MCONTACT) wParam; LPSTR pszProto = GetContactProto(hContact); bool bChatRoom = db_get_b(hContact, pszProto, "ChatRoom", 0) != 0; frmMain->m_opt_chkTimed = false; @@ -239,7 +239,7 @@ INT_PTR service_OpenCaptureDialog(WPARAM wParam, LPARAM lParam){ delete frmMain; return -1; } - frmMain->Init(pszPath, (HCONTACT)wParam); + frmMain->Init(pszPath, (MCONTACT)wParam); mir_free(pszPath); if(lParam==0xFFFF){ frmMain->SetTargetWindow(NULL); @@ -276,7 +276,7 @@ INT_PTR service_EditBitmap(WPARAM wParam, LPARAM lParam) { // lParam = (HANDLE)contact (can be null) INT_PTR service_Send2ImageShack(WPARAM wParam, LPARAM lParam) { LPSTR result = NULL; - CSendImageShack* cSend = new CSendImageShack(NULL, (HCONTACT)lParam, false); + CSendImageShack* cSend = new CSendImageShack(NULL, (MCONTACT)lParam, false); cSend->m_pszFile = mir_a2t((char*)wParam); cSend->m_bDeleteAfterSend = FALSE; if (lParam != NULL) { diff --git a/plugins/SendScreenshotPlus/src/UMainForm.cpp b/plugins/SendScreenshotPlus/src/UMainForm.cpp index 4be9eabbaa..0ee9533ce9 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.cpp +++ b/plugins/SendScreenshotPlus/src/UMainForm.cpp @@ -764,7 +764,7 @@ void TfrmMain::SaveOptions(void) { } //--------------------------------------------------------------------------- -void TfrmMain::Init(LPTSTR DestFolder, HCONTACT Contact) { +void TfrmMain::Init(LPTSTR DestFolder, MCONTACT Contact) { m_FDestFolder = mir_tstrdup(DestFolder); m_hContact = Contact; if(!m_hContact) m_opt_cboxSendBy = SS_JUSTSAVE; diff --git a/plugins/SendScreenshotPlus/src/UMainForm.h b/plugins/SendScreenshotPlus/src/UMainForm.h index 7e5029aa15..934340ace0 100644 --- a/plugins/SendScreenshotPlus/src/UMainForm.h +++ b/plugins/SendScreenshotPlus/src/UMainForm.h @@ -69,7 +69,7 @@ class TfrmMain{ bool m_bOnExitSave; static void Unload(); - void Init(LPTSTR DestFolder, HCONTACT Contact); + void Init(LPTSTR DestFolder, MCONTACT Contact); void Close(){SendMessage(m_hWnd,WM_CLOSE,0,0);} void Show(){ShowWindow(m_hWnd,SW_SHOW);} void Hide(){ShowWindow(m_hWnd,SW_HIDE);} @@ -79,7 +79,7 @@ class TfrmMain{ private: HWND m_hWnd; - HCONTACT m_hContact; + MCONTACT m_hContact; bool m_bDeleteAfterSend; bool m_bFormAbout, m_bFormEdit; HWND m_hTargetWindow, m_hLastWin; diff --git a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp index e32f22d332..393772ca5e 100644 --- a/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp +++ b/plugins/SendScreenshotPlus/src/dlg_msgbox.cpp @@ -691,7 +691,7 @@ LRESULT CALLBACK PopupProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) /**
* This is the service function for external plugins to use the nice messagebox
*
- * @param wParam - HCONTACT hContact which can display an avatar for popups
+ * @param wParam - MCONTACT hContact which can display an avatar for popups
* @param lParam - MSGBOX structure holding parameters
*
* @return The function returns the ID of the clicked button (IDOK, IDCANCEL, ...)
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp index 6e50caec00..41598e615b 100644 --- a/plugins/Sessions/Src/Main.cpp +++ b/plugins/Sessions/Src/Main.cpp @@ -44,9 +44,9 @@ HWND g_hSDlg; BOOL DONT = FALSE;
BOOL StartUp, isLastTRUE = FALSE, g_mode,bSC = FALSE;
-HCONTACT session_list[255] = { 0 };
-HCONTACT user_session_list[255] = { 0 };
-HCONTACT session_list_recovered[255];
+MCONTACT session_list[255] = { 0 };
+MCONTACT user_session_list[255] = { 0 };
+MCONTACT session_list_recovered[255];
int count = 0;
unsigned int ses_count = 0;
@@ -227,7 +227,7 @@ INT_PTR CALLBACK SaveSessionDlgProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lpar GetWindowText(GetDlgItem(hdlg, IDC_LIST), szUserSessionName, SIZEOF(szUserSessionName));
szUserSessionName[lenght+1]='\0';
if (IsDlgButtonChecked(hdlg,IDC_SELCONTACTS)&&bSC) {
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE res =(BYTE)SendMessage(hClistControl, CLM_GETCHECKMARK, SendMessage(hClistControl, CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (res) {
user_session_list[i] = hContact;
@@ -468,7 +468,7 @@ int SaveSessionHandles(WPARAM wparam,LPARAM lparam) return 1;
int k=0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if ((k=CheckForDuplicate(session_list,hContact)) != -1 && !(g_bExclHidden && !CheckContactVisibility(hContact))) {
AddSessionMark(hContact,lparam,'1');
AddInSessionOrder(hContact,lparam,k,1);
@@ -597,8 +597,8 @@ int LoadSession(WPARAM wparam,LPARAM lparam) {
int dup=0;
int hidden[255]={'0'};
- HCONTACT hContact;
- HCONTACT session_list_t[255] = { 0 };
+ MCONTACT hContact;
+ MCONTACT session_list_t[255] = { 0 };
int mode=0;
int i=0,j=0;
if ((UINT)lparam>=ses_limit&&lparam!=256)
@@ -672,7 +672,7 @@ int LoadSession(WPARAM wparam,LPARAM lparam) int DelUserDefSession(int ses_count)
{
int i=0;
- HCONTACT hContact;
+ MCONTACT hContact;
char szSessionName[256]={0};
TCHAR *szSessionNameBuf=NULL;
@@ -713,7 +713,7 @@ int DelUserDefSession(int ses_count) int DeleteAutoSession(int ses_count)
{
int i=0;
- HCONTACT hContact;
+ MCONTACT hContact;
char szSessionName[256]={0};
TCHAR *szSessionNameBuf=NULL;
@@ -964,7 +964,7 @@ extern "C" __declspec(dllexport) int Load(void) int i=0;
ZeroMemory(session_list_recovered, sizeof(session_list_recovered));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if (db_get_b(hContact, MODNAME, "wasInLastSession", 0))
session_list_recovered[i++] = hContact;
}
diff --git a/plugins/Sessions/Src/Options.cpp b/plugins/Sessions/Src/Options.cpp index 9a6853f29d..943a92ed6a 100644 --- a/plugins/Sessions/Src/Options.cpp +++ b/plugins/Sessions/Src/Options.cpp @@ -31,7 +31,7 @@ static BOOL bOptionsInit; int opses_count;
BOOL bSesssionNameChanged=0;
-HCONTACT session_list_t[255]={0};
+MCONTACT session_list_t[255]={0};
HWND g_opHdlg;
@@ -46,7 +46,7 @@ int OpLoadSessionContacts(WPARAM wparam,LPARAM lparam) {
ZeroMemory(session_list_t, sizeof(session_list_t));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (LoadContactsFromMask(hContact,1,lparam)) {
int i = GetInSessionOrder(hContact,1, lparam);
session_list_t[i] = hContact;
@@ -277,7 +277,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (((LPNMHDR)lparam)->idFrom == IDC_EMCLIST)
{
int iSelection = (int)((NMCLISTCONTROL *)lparam)->hItem;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
for ( ; hContact; hContact = db_find_next(hContact))
if (SendDlgItemMessage(hdlg, IDC_EMCLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0) == iSelection)
break;
@@ -319,11 +319,11 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) if (!hOpClistControl)
EnableWindow(GetDlgItem(hdlg,IDC_DEL),TRUE);
else {
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact,0);
for (int i=0 ; session_list_t[i] > 0; i++) {
- HCONTACT hContact = (HCONTACT)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
+ MCONTACT hContact = (MCONTACT)SendMessage(hOpClistControl, CLM_FINDCONTACT, (WPARAM)session_list_t[i], 0);
SendMessage(hOpClistControl, CLM_SETCHECKMARK, (WPARAM)hContact, 1);
}
EnableWindow(GetDlgItem(hdlg,IDC_SAVE),FALSE);
@@ -366,7 +366,7 @@ INT_PTR CALLBACK OptionsProc(HWND hdlg,UINT msg,WPARAM wparam,LPARAM lparam) case IDC_SAVE:
{
int i=0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
BYTE res =(BYTE)SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_GETCHECKMARK,
SendMessage(GetDlgItem(hdlg,IDC_EMCLIST), CLM_FINDCONTACT, (WPARAM)hContact, 0), 0);
if (res) {
diff --git a/plugins/Sessions/Src/Sessions.h b/plugins/Sessions/Src/Sessions.h index 727918e007..5cbfd65a4b 100644 --- a/plugins/Sessions/Src/Sessions.h +++ b/plugins/Sessions/Src/Sessions.h @@ -58,8 +58,8 @@ INT_PTR CloseCurrentSession(WPARAM ,LPARAM ); int SaveSessionDate();
extern HINSTANCE hinstance;
-extern HCONTACT session_list_recovered[255];
-extern HCONTACT session_list[255];
+extern MCONTACT session_list_recovered[255];
+extern MCONTACT session_list[255];
extern unsigned int ses_limit;
extern unsigned int g_ses_count;
extern BOOL g_bExclHidden;
diff --git a/plugins/Sessions/Src/Utils.cpp b/plugins/Sessions/Src/Utils.cpp index 0ac06a0e1c..fd84a86f8b 100644 --- a/plugins/Sessions/Src/Utils.cpp +++ b/plugins/Sessions/Src/Utils.cpp @@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "sessions.h"
-void AddSessionMark(HCONTACT hContact, int mode, char bit)
+void AddSessionMark(MCONTACT hContact, int mode, char bit)
{
DBVARIANT dbv;
unsigned int i;
@@ -70,7 +70,7 @@ void AddSessionMark(HCONTACT hContact, int mode, char bit) }
}
-void RemoveSessionMark(HCONTACT hContact,int mode,int marknum)
+void RemoveSessionMark(MCONTACT hContact,int mode,int marknum)
{
unsigned int i=1;
char temp_1[1]={'\0'},temp_2[1]={'\0'};
@@ -100,7 +100,7 @@ void RemoveSessionMark(HCONTACT hContact,int mode,int marknum) }
}
-void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum)
+void SetSessionMark(MCONTACT hContact,int mode,char bit,unsigned int marknum)
{
DBVARIANT dbv;
char* pszBuffer=NULL;
@@ -124,7 +124,7 @@ void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum) }
}
-BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count)
+BOOL LoadContactsFromMask(MCONTACT hContact,int mode,int count)
{
DBVARIANT dbv;
if (mode == 0) {
@@ -142,7 +142,7 @@ BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count) return res;
}
-void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode)
+void AddInSessionOrder(MCONTACT hContact,int mode,int ordernum,int writemode)
{
int i;
char temp_1[2]={'\0'},temp_2[2]={'\0'};
@@ -233,7 +233,7 @@ void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode) }
}
-int GetInSessionOrder(HCONTACT hContact,int mode,int count)
+int GetInSessionOrder(MCONTACT hContact,int mode,int count)
{
int iOrder = 0;
char szTemp[3]={'\0'};
@@ -258,7 +258,7 @@ int GetInSessionOrder(HCONTACT hContact,int mode,int count) return iOrder;
}
-void SetInSessionOrder(HCONTACT hContact,int mode,int count,unsigned int ordernum)
+void SetInSessionOrder(MCONTACT hContact,int mode,int count,unsigned int ordernum)
{
int iOrder=0;
char szTemp[3]={'\0'};
@@ -319,7 +319,7 @@ BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* szBuffer) return 1;
}
-int AddToCurSession(HCONTACT wparam, LPARAM lparam)
+int AddToCurSession(MCONTACT wparam, LPARAM lparam)
{
if (CheckForDuplicate(session_list, wparam) == -1) {
for (int i = 0;; i++) {
@@ -332,7 +332,7 @@ int AddToCurSession(HCONTACT wparam, LPARAM lparam) return 0;
}
-int DelFromCurSession(HCONTACT wparam,LPARAM lparam)
+int DelFromCurSession(MCONTACT wparam,LPARAM lparam)
{
for (int i=0; session_list[i] != 0; i++) {
if (session_list[i] == wparam) {
@@ -346,10 +346,10 @@ int DelFromCurSession(HCONTACT wparam,LPARAM lparam) return 0;
}
-int CheckForDuplicate(HCONTACT contact_list[], HCONTACT lparam)
+int CheckForDuplicate(MCONTACT contact_list[], MCONTACT lparam)
{
int i=0;
- HCONTACT s_list[255] = {0};
+ MCONTACT s_list[255] = {0};
memcpy(s_list, contact_list, SIZEOF(s_list));
for (i=0;;i++) {
if (s_list[i] == lparam)
@@ -425,7 +425,7 @@ void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy) SetWindowPos(hwnd, NULL, rc.left, rc.top,0, 0, SWP_NOZORDER |SWP_NOSIZE);
}
-int CheckContactVisibility(HCONTACT hContact)
+int CheckContactVisibility(MCONTACT hContact)
{
if (db_get_b(hContact, "CList", "Hidden", 0))
return 0;
diff --git a/plugins/Sessions/Src/Utils.h b/plugins/Sessions/Src/Utils.h index 19d81dad37..72de9d3c54 100644 --- a/plugins/Sessions/Src/Utils.h +++ b/plugins/Sessions/Src/Utils.h @@ -20,16 +20,16 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef __UTILS_H__
# define __UTILS_H__
-void SetInSessionOrder(HCONTACT hContact,int mode,int count,unsigned int ordernum);
-void AddInSessionOrder(HCONTACT hContact,int mode,int ordernum,int writemode);
-int GetInSessionOrder(HCONTACT hContact,int mode,int count);
-void AddSessionMark(HCONTACT hContact,int mode,char bit);
-void RemoveSessionMark(HCONTACT hContact,int mode,int marknum);
-void SetSessionMark(HCONTACT hContact,int mode,char bit,unsigned int marknum);
-BOOL LoadContactsFromMask(HCONTACT hContact,int mode,int count);
-int AddToCurSession(HCONTACT hContact, LPARAM lparam);
-int DelFromCurSession(HCONTACT hContact,LPARAM lparam);
-int CheckForDuplicate(HCONTACT contact_list[], HCONTACT lparam);
+void SetInSessionOrder(MCONTACT hContact,int mode,int count,unsigned int ordernum);
+void AddInSessionOrder(MCONTACT hContact,int mode,int ordernum,int writemode);
+int GetInSessionOrder(MCONTACT hContact,int mode,int count);
+void AddSessionMark(MCONTACT hContact,int mode,char bit);
+void RemoveSessionMark(MCONTACT hContact,int mode,int marknum);
+void SetSessionMark(MCONTACT hContact,int mode,char bit,unsigned int marknum);
+BOOL LoadContactsFromMask(MCONTACT hContact,int mode,int count);
+int AddToCurSession(MCONTACT hContact, LPARAM lparam);
+int DelFromCurSession(MCONTACT hContact,LPARAM lparam);
+int CheckForDuplicate(MCONTACT contact_list[], MCONTACT lparam);
BOOL ResaveSettings(char* szName,int iFirst,int iLimit,TCHAR* pszPrevSetting);
void OffsetWindow(HWND parent, HWND hwnd, int dx, int dy);
int LoadSessionToCombobox (HWND hdlg,BOOL mode,int iLimit,char* pszSetting,int iFirstNum);
@@ -37,7 +37,7 @@ int MarkUserDefSession(int ses_count,BYTE bCheck); BYTE IsMarkedUserDefSession(int ses_count);
void SavePosition(HWND hWnd, char *wndName);
void LoadPosition(HWND hWnd, char *wndName);
-int CheckContactVisibility(HCONTACT hContact);
+int CheckContactVisibility(MCONTACT hContact);
void RenameUserDefSession(int ses_count,TCHAR* ptszNewName);
int FillFavoritesMenu (HMENU hMenu,int iLimit);
diff --git a/plugins/ShellExt/src/shlcom.cpp b/plugins/ShellExt/src/shlcom.cpp index 6de7acdb6c..a01b05cb0d 100644 --- a/plugins/ShellExt/src/shlcom.cpp +++ b/plugins/ShellExt/src/shlcom.cpp @@ -62,7 +62,7 @@ struct TAddArgList int cch; // it's length (with space for NULL char)
int count; // number we have so far
LPSTR *files;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hEvent;
};
@@ -179,7 +179,7 @@ void __cdecl IssueTransferThread(void *param) struct TSlotInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
int hProto;
int dwStatus; // will be aligned anyway
};
@@ -258,7 +258,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode) TSlotInfo *pContacts = (TSlotInfo*)mir_alloc((dwContacts + 2) * sizeof(TSlotInfo));
int i = 0;
int dwOnline = 0;
- for (HCONTACT hContact = db_find_first(); hContact != 0; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact != 0; hContact = db_find_next(hContact)) {
if (i >= dwContacts)
break;
@@ -354,7 +354,7 @@ bool ipcGetSortedContacts(THeaderIPC *ipch, int *pSlot, bool bGroupMode) // worker thread to clear MRU, called by the IPC bridge
void __cdecl ClearMRUThread(void*)
{
- for (HCONTACT hContact = db_find_first(); hContact != 0; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != 0; hContact = db_find_next(hContact))
if ( db_get_b(hContact, SHLExt_Name, SHLExt_MRU, 0) > 0)
db_set_b(hContact, SHLExt_Name, SHLExt_MRU, 0);
}
diff --git a/plugins/ShellExt/src/shlcom.h b/plugins/ShellExt/src/shlcom.h index 4e78587f61..c5adf538a2 100644 --- a/plugins/ShellExt/src/shlcom.h +++ b/plugins/ShellExt/src/shlcom.h @@ -86,7 +86,7 @@ struct TSlotIPC BYTE cbSize;
int fType; // a REQUEST_* type
TSlotIPC *Next;
- HCONTACT hContact;
+ MCONTACT hContact;
UINT hProto; // hash of the protocol the user is on
UINT hGroup; // hash of the entire path (not defined for REQUEST_GROUPS slots)
WORD Status;
@@ -207,7 +207,7 @@ struct TMenuDrawInfo int cch;
int wID; // should be the same as the menu item's ID
TSlotDrawTypes fTypes;
- HCONTACT hContact;
+ MCONTACT hContact;
HICON hStatusIcon; // HICON from Self->ProtoIcons[index].hIcons[status]; Do not DestroyIcon()
HBITMAP hStatusBitmap; // HBITMAP, don't free.
int pid;
diff --git a/plugins/ShellExt/src/shlext.cpp b/plugins/ShellExt/src/shlext.cpp index 7672226989..ff8ba3d906 100644 --- a/plugins/ShellExt/src/shlext.cpp +++ b/plugins/ShellExt/src/shlext.cpp @@ -702,7 +702,7 @@ HRESULT TShellExt::QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT _idCmdFirs /////////////////////////////////////////////////////////////////////////////////////////
-HRESULT ipcGetFiles(THeaderIPC *pipch, IDataObject* pDataObject, HCONTACT hContact)
+HRESULT ipcGetFiles(THeaderIPC *pipch, IDataObject* pDataObject, MCONTACT hContact)
{
FORMATETC fet;
fet.cfFormat = CF_HDROP;
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp index aad11984f5..befcce33d7 100644 --- a/plugins/SimpleAR/src/Main.cpp +++ b/plugins/SimpleAR/src/Main.cpp @@ -72,7 +72,7 @@ INT_PTR ToggleEnable(WPARAM wParam, LPARAM lParam) INT_PTR Toggle(WPARAM w, LPARAM l)
{
- HCONTACT hContact = (HCONTACT)w;
+ MCONTACT hContact = (MCONTACT)w;
BOOL on = !db_get_b(hContact, protocolname, "TurnedOn", 0);
db_set_b(hContact, protocolname, "TurnedOn", on);
on = !on;
@@ -87,7 +87,7 @@ INT_PTR Toggle(WPARAM w, LPARAM l) INT OnPreBuildContactMenu(WPARAM w, LPARAM l)
{
- HCONTACT hContact = (HCONTACT)w;
+ MCONTACT hContact = (MCONTACT)w;
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_NAME | CMIM_ICON | CMIF_TCHAR;
@@ -183,7 +183,7 @@ TCHAR* StrReplace (TCHAR* Search, TCHAR* Replace, TCHAR* Resource) INT addEvent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDBEvent = (HANDLE)lParam;
BOOL fEnabled = db_get_b(NULL, protocolname, KEY_ENABLED, 1);
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp index f2888d2443..2104b0e192 100644 --- a/plugins/SimpleStatusMsg/src/awaymsg.cpp +++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp @@ -79,7 +79,7 @@ static TCHAR *StrNormNewline(TCHAR *tszStr) struct AwayMsgDlgData
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hSeq;
HANDLE hAwayMsgEvent;
};
@@ -97,7 +97,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
@@ -126,7 +126,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP SendMessage(hwndDlg, WM_SETICON, ICON_SMALL, (LPARAM)LoadSkinnedProtoIcon(szProto, dwStatus));
EnableWindow(GetDlgItem(hwndDlg, IDC_COPY), FALSE);
}
- Utils_RestoreWindowPosition(hwndDlg, (HCONTACT)lParam, "SRAway", "AwayMsgDlg");
+ Utils_RestoreWindowPosition(hwndDlg, (MCONTACT)lParam, "SRAway", "AwayMsgDlg");
return TRUE;
case HM_AWAYMSG:
@@ -203,7 +203,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM)
{
- if (HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam))
+ if (HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam))
{
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -227,7 +227,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP dat = (AwayMsgDlgData*)mir_alloc(sizeof(AwayMsgDlgData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
dat->hAwayMsgEvent = dat->hSeq ? HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG) : NULL;
WindowList_Add(hWindowList2, hwndDlg, dat->hContact);
@@ -301,7 +301,7 @@ static INT_PTR CALLBACK CopyAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR CopyAwayMsgCommand(WPARAM wParam, LPARAM)
{
- if (HWND hwnd = WindowList_Find(hWindowList2, (HCONTACT)wParam))
+ if (HWND hwnd = WindowList_Find(hWindowList2, (MCONTACT)wParam))
{
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -330,7 +330,7 @@ static char *StrFindURL(char *pszStr) static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam)
{
- ptrA szMsg(db_get_sa((HCONTACT)wParam, "CList", "StatusMsg"));
+ ptrA szMsg(db_get_sa((MCONTACT)wParam, "CList", "StatusMsg"));
char *szURL = StrFindURL(szMsg);
if (szURL != NULL)
@@ -354,8 +354,8 @@ static INT_PTR GoToURLMsgCommand(WPARAM wParam, LPARAM lParam) static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
TCHAR str[128];
- char *szProto = GetContactProto((HCONTACT)wParam);
- int iHidden = szProto ? db_get_b((HCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
+ char *szProto = GetContactProto((MCONTACT)wParam);
+ int iHidden = szProto ? db_get_b((MCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
int iStatus;
CLISTMENUITEM clmi = { sizeof(clmi) };
@@ -363,7 +363,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden) {
iHidden = 1;
- iStatus = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ iStatus = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1,0) & PF1_MODEMSGRECV) {
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_3,0) & Proto_Status2Flag(iStatus == ID_STATUS_OFFLINE ? ID_STATUS_INVISIBLE : iStatus)) {
iHidden = 0;
@@ -377,7 +377,7 @@ static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM lParam) Menu_ModifyItem(hAwayMsgMenuItem, &clmi);
Skin_ReleaseIcon(clmi.hIcon);
- ptrA szMsg(db_get_sa((HCONTACT)wParam, "CList", "StatusMsg"));
+ ptrA szMsg(db_get_sa((MCONTACT)wParam, "CList", "StatusMsg"));
clmi.flags = CMIM_FLAGS | CMIF_HIDDEN | CMIF_TCHAR;
if (!iHidden && szMsg != NULL) {
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp index 8494ad66d6..f57160395d 100644 --- a/plugins/SimpleStatusMsg/src/main.cpp +++ b/plugins/SimpleStatusMsg/src/main.cpp @@ -384,7 +384,7 @@ TCHAR *InsertBuiltinVarsIntoMsg(TCHAR *in, const char *szProto, int status) return msg;
}
-TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, HCONTACT hContact)
+TCHAR *InsertVarsIntoMsg(TCHAR *tszMsg, const char *szProto, int iStatus, MCONTACT hContact)
{
if (ServiceExists(MS_VARS_FORMATSTRING) && db_get_b(NULL, "SimpleStatusMsg", "EnableVariables", 1))
{
@@ -523,7 +523,7 @@ void SaveStatusAsCurrent(const char *szProto, int iStatus) db_set_w(NULL, "SimpleStatusMsg", szSetting, (WORD)iStatus);
}
-static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, HCONTACT hContact)
+static TCHAR *GetAwayMessage(int iStatus, const char *szProto, BOOL bInsertVars, MCONTACT hContact)
{
TCHAR *format = NULL;
char szSetting[80];
@@ -1775,7 +1775,7 @@ static int OnICQStatusMsgRequest(WPARAM wParam, LPARAM lParam, LPARAM lMirParam) char *szProto = (char *)lMirParam;
BOOL bContactFound = FALSE;
- HCONTACT hContact;
+ MCONTACT hContact;
for (hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto)) {
if (db_get_dw(hContact, szProto, "UIN", 0) == (DWORD)lParam) {
diff --git a/plugins/SmileyAdd/src/customsmiley.cpp b/plugins/SmileyAdd/src/customsmiley.cpp index 7249242fa7..ca5f24ed26 100644 --- a/plugins/SmileyAdd/src/customsmiley.cpp +++ b/plugins/SmileyAdd/src/customsmiley.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. SmileyPackCListType g_SmileyPackCStore;
-bool SmileyPackCListType::AddSmileyPack(HCONTACT hContact, TCHAR* dir)
+bool SmileyPackCListType::AddSmileyPack(MCONTACT hContact, TCHAR* dir)
{
bool res = true;
if (GetSmileyPack(hContact) == NULL) {
@@ -38,7 +38,7 @@ bool SmileyPackCListType::AddSmileyPack(HCONTACT hContact, TCHAR* dir) }
-bool SmileyPackCListType::AddSmiley(HCONTACT hContact, TCHAR* path)
+bool SmileyPackCListType::AddSmiley(MCONTACT hContact, TCHAR* path)
{
SmileyPackCType *smpack = GetSmileyPack(hContact);
if (smpack == NULL) {
@@ -51,7 +51,7 @@ bool SmileyPackCListType::AddSmiley(HCONTACT hContact, TCHAR* path) }
-SmileyPackCType* SmileyPackCListType::GetSmileyPack(HCONTACT id)
+SmileyPackCType* SmileyPackCListType::GetSmileyPack(MCONTACT id)
{
for (int i = 0; i < m_SmileyPacks.getCount(); i++)
if (m_SmileyPacks[i].GetId() == id)
diff --git a/plugins/SmileyAdd/src/customsmiley.h b/plugins/SmileyAdd/src/customsmiley.h index 5ccfa5e04f..7e5f10b015 100644 --- a/plugins/SmileyAdd/src/customsmiley.h +++ b/plugins/SmileyAdd/src/customsmiley.h @@ -37,7 +37,7 @@ private: SmileyVectorType m_SmileyList;
SmileyLookupType m_SmileyLookup;
- HCONTACT m_id;
+ MCONTACT m_id;
void InsertLookup(SmileyCType& sml, CMString& lk, bool first);
void AddTriggersToSmileyLookup(void);
@@ -50,8 +50,8 @@ public: SmileyCType* GetSmiley(unsigned index) { return &m_SmileyList[index]; }
- HCONTACT GetId(void) { return m_id; }
- void SetId(HCONTACT id) { m_id = id; }
+ MCONTACT GetId(void) { return m_id; }
+ void SetId(MCONTACT id) { m_id = id; }
bool LoadSmileyDir(TCHAR* dir);
bool LoadSmiley(TCHAR* path);
@@ -69,12 +69,12 @@ private: public:
int NumberOfSmileyPacks(void) { return m_SmileyPacks.getCount(); }
- bool AddSmileyPack(HCONTACT hContact, TCHAR* dir);
- bool AddSmiley(HCONTACT hContact, TCHAR* path);
+ bool AddSmileyPack(MCONTACT hContact, TCHAR* dir);
+ bool AddSmiley(MCONTACT hContact, TCHAR* path);
void ClearAndFreeAll(void) { m_SmileyPacks.destroy(); }
- SmileyPackCType* GetSmileyPack(HCONTACT id);
+ SmileyPackCType* GetSmileyPack(MCONTACT id);
};
extern SmileyPackCListType g_SmileyPackCStore;
diff --git a/plugins/SmileyAdd/src/dlgboxsubclass.cpp b/plugins/SmileyAdd/src/dlgboxsubclass.cpp index 84723b91fa..426998964a 100644 --- a/plugins/SmileyAdd/src/dlgboxsubclass.cpp +++ b/plugins/SmileyAdd/src/dlgboxsubclass.cpp @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // we are not supposed to use this object, so be aware
typedef struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
int isSend;
const char *szInitialText;
}
@@ -56,7 +56,7 @@ public: mutable HBITMAP hSmlBmp;
mutable HICON hSmlIco;
int idxLastChar;
- HCONTACT hContact;
+ MCONTACT hContact;
bool doSmileyReplace;
bool doSmileyButton;
bool OldButtonPlace;
@@ -267,7 +267,7 @@ int UpdateSrmmDlg(WPARAM wParam, LPARAM /* lParam */) {
WaitForSingleObject(g_hMutex, 2000);
for (int i=0; i < g_MsgWndList.getCount(); ++i) {
- if (wParam == 0 || g_MsgWndList[i]->hContact == (HCONTACT)wParam) {
+ if (wParam == 0 || g_MsgWndList[i]->hContact == (MCONTACT)wParam) {
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, FALSE, 0);
SendMessage(g_MsgWndList[i]->hwnd, DM_OPTIONSAPPLIED, 0, 0);
SendMessage(g_MsgWndList[i]->hwnd, WM_SETREDRAW, TRUE, 0);
@@ -290,7 +290,7 @@ static MsgWndData* IsMsgWnd(HWND hwnd) }
-static void MsgWndDetect(HWND hwndDlg, HCONTACT hContact, msgData* datm)
+static void MsgWndDetect(HWND hwndDlg, MCONTACT hContact, msgData* datm)
{
MsgWndData dat;
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 91050e25cd..ed70db98f7 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -211,11 +211,11 @@ void DestroyGdiPlus(void) }
}
-HCONTACT DecodeMetaContact(HCONTACT hContact)
+MCONTACT DecodeMetaContact(MCONTACT hContact)
{
if (hContact == NULL) return NULL;
- HCONTACT hReal = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
- if (hReal == NULL || hReal == (HCONTACT)CALLSERVICE_NOTFOUND)
+ MCONTACT hReal = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ if (hReal == NULL || hReal == (MCONTACT)CALLSERVICE_NOTFOUND)
hReal = hContact;
return hReal;
diff --git a/plugins/SmileyAdd/src/general.h b/plugins/SmileyAdd/src/general.h index f9c255e3fc..5d62528903 100644 --- a/plugins/SmileyAdd/src/general.h +++ b/plugins/SmileyAdd/src/general.h @@ -164,7 +164,7 @@ bool IsOldSrmm(void); int CalculateTextHeight(HDC hdc, CHARFORMAT2* chf);
const TCHAR* GetImageExt(CMString &fname);
-HCONTACT DecodeMetaContact(HCONTACT hContact);
+MCONTACT DecodeMetaContact(MCONTACT hContact);
bool IsSmileyProto(char* proto);
HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle);
@@ -180,7 +180,7 @@ HICON GetDefaultIcon(bool copy = true); void CloseRichCallback(HWND hwnd);
void CloseRichOwnerCallback(HWND hwnd);
-bool SetRichCallback(HWND hwnd, HCONTACT hContact, bool subany, bool subnew);
+bool SetRichCallback(HWND hwnd, MCONTACT hContact, bool subany, bool subnew);
void SetRichOwnerCallback(HWND hwnd, HWND hwndInput, HWND hwndLog);
void ProcessAllInputAreas(bool restoreText);
void RichEditData_Destroy(void);
diff --git a/plugins/SmileyAdd/src/options.cpp b/plugins/SmileyAdd/src/options.cpp index 7fb45de5f0..3bf0895ab3 100644 --- a/plugins/SmileyAdd/src/options.cpp +++ b/plugins/SmileyAdd/src/options.cpp @@ -633,7 +633,7 @@ void OptionsType::WriteCustomCategories(const CMString& cats) }
-void OptionsType::ReadContactCategory(HCONTACT hContact, CMString& cats)
+void OptionsType::ReadContactCategory(MCONTACT hContact, CMString& cats)
{
DBVARIANT dbv;
INT_PTR res = db_get_ts(hContact, "SmileyAdd", "CustomCategory", &dbv);
@@ -644,7 +644,7 @@ void OptionsType::ReadContactCategory(HCONTACT hContact, CMString& cats) }
-void OptionsType::WriteContactCategory(HCONTACT hContact, const CMString& cats)
+void OptionsType::WriteContactCategory(MCONTACT hContact, const CMString& cats)
{
if (cats.IsEmpty())
db_unset(hContact, "SmileyAdd", "CustomCategory");
diff --git a/plugins/SmileyAdd/src/options.h b/plugins/SmileyAdd/src/options.h index ed953c5760..c7fcb9ebd2 100644 --- a/plugins/SmileyAdd/src/options.h +++ b/plugins/SmileyAdd/src/options.h @@ -48,10 +48,10 @@ public: static void ReadPackFileName(CMString& filename, const CMString& name,
const CMString& defaultFilename);
static void ReadCustomCategories(CMString& cats);
- static void ReadContactCategory(HCONTACT hContact, CMString& cats);
+ static void ReadContactCategory(MCONTACT hContact, CMString& cats);
static void WritePackFileName(const CMString& filename, const CMString& name);
static void WriteCustomCategories(const CMString& cats);
- static void WriteContactCategory(HCONTACT hContact, const CMString& cats);
+ static void WriteContactCategory(MCONTACT hContact, const CMString& cats);
};
extern OptionsType opt;
diff --git a/plugins/SmileyAdd/src/richcall.cpp b/plugins/SmileyAdd/src/richcall.cpp index 73579c0be9..9257a6c796 100644 --- a/plugins/SmileyAdd/src/richcall.cpp +++ b/plugins/SmileyAdd/src/richcall.cpp @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. struct RichEditData
{
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hToolTip;
int tipActive;
bool inputarea;
@@ -312,7 +312,7 @@ static LRESULT CALLBACK RichEditSubclass(HWND hwnd, UINT uMsg, WPARAM wParam, LP return result;
}
-bool SetRichCallback(HWND hwnd, HCONTACT hContact, bool subany, bool subnew)
+bool SetRichCallback(HWND hwnd, MCONTACT hContact, bool subany, bool subnew)
{
RichEditData* rdt = g_RichEditList.find((RichEditData*)&hwnd);
if (rdt == NULL) {
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index f7db0a0b94..66a5af8009 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -23,7 +23,7 @@ LIST<void> menuHandleArray(5); //implementation of service functions
-SmileyPackType* GetSmileyPack(const char* proto, HCONTACT hContact, SmileyPackCType** smlc)
+SmileyPackType* GetSmileyPack(const char* proto, MCONTACT hContact, SmileyPackCType** smlc)
{
hContact = DecodeMetaContact(hContact);
if (smlc)
@@ -100,7 +100,7 @@ INT_PTR ShowSmileySelectionCommand(WPARAM, LPARAM lParam) if (smaddInfo == NULL || smaddInfo->cbSize < SMADD_SHOWSEL_SIZE_V1) return FALSE;
HWND parent = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V1 ? smaddInfo->hwndParent : NULL;
- HCONTACT hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL;
+ MCONTACT hContact = smaddInfo->cbSize > SMADD_SHOWSEL_SIZE_V2 ? smaddInfo->hContact : NULL;
SmileyToolWindowParam *stwp = new SmileyToolWindowParam;
stwp->pSmileyPack = GetSmileyPack(smaddInfo->Protocolname, hContact);
@@ -155,7 +155,7 @@ INT_PTR GetSmileyIconCommand(WPARAM, LPARAM lParam) static int GetInfoCommandE(SMADD_INFO2* smre, bool retDup)
{
if (smre == NULL || smre->cbSize < SMADD_INFO_SIZE_V1) return FALSE;
- HCONTACT hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL;
+ MCONTACT hContact = smre->cbSize > SMADD_INFO_SIZE_V1 ? smre->hContact : NULL;
SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact);
@@ -282,7 +282,7 @@ INT_PTR ParseTextBatch(WPARAM, LPARAM lParam) SMADD_BATCHPARSE2* smre = (SMADD_BATCHPARSE2*) lParam;
if (smre == NULL || smre->cbSize < SMADD_BATCHPARSE_SIZE_V1) return FALSE;
- HCONTACT hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL;
+ MCONTACT hContact = smre->cbSize > SMADD_BATCHPARSE_SIZE_V1 ? smre->hContact : NULL;
SmileyPackCType* smcp = NULL;
SmileyPackType* SmileyPack = GetSmileyPack(smre->Protocolname, hContact,
@@ -356,7 +356,7 @@ INT_PTR RegisterPack(WPARAM, LPARAM lParam) INT_PTR CustomCatMenu(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if (lParam != 0)
{
SmileyCategoryType* smct = g_SmileyCategories.GetSmileyCategory((unsigned)lParam - 3);
@@ -382,7 +382,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) {
SmileyCategoryListType::SmileyCategoryVectorType& smc = *g_SmileyCategories.GetSmileyCategoryList();
- char* protnam = GetContactProto((HCONTACT)wParam);
+ char* protnam = GetContactProto((MCONTACT)wParam);
bool haveMenu = IsSmileyProto(protnam);
if (haveMenu && opt.UseOneForAll) {
unsigned cnt = 0;
@@ -399,7 +399,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) if (haveMenu) {
CMString cat;
- opt.ReadContactCategory((HCONTACT)wParam, cat);
+ opt.ReadContactCategory((MCONTACT)wParam, cat);
CLISTMENUITEM mi = { sizeof(mi) };
mi.hParentMenu = hContactMenuItem;
@@ -540,7 +540,7 @@ int AccountListChanged(WPARAM wParam, LPARAM lParam) int DbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL) return 0;
diff --git a/plugins/SmileyAdd/src/services.h b/plugins/SmileyAdd/src/services.h index 21ee912e79..8121ef0203 100644 --- a/plugins/SmileyAdd/src/services.h +++ b/plugins/SmileyAdd/src/services.h @@ -38,7 +38,7 @@ INT_PTR LoadContactSmileys(WPARAM, LPARAM lParam); int AccountListChanged(WPARAM wParam, LPARAM lParam);
int DbSettingChanged(WPARAM wParam, LPARAM lParam);
-SmileyPackType* GetSmileyPack(const char* proto, HCONTACT hContact = NULL, SmileyPackCType** smlc = NULL);
+SmileyPackType* GetSmileyPack(const char* proto, MCONTACT hContact = NULL, SmileyPackCType** smlc = NULL);
#endif // SMILEYADD_SERVICES_H_
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 51e1fafb8d..10446dbfc2 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -152,7 +152,7 @@ SmileyType* SmileyPackType::GetSmiley(unsigned index) }
-static DWORD_PTR ConvertServiceParam(HCONTACT hContact, const TCHAR *param)
+static DWORD_PTR ConvertServiceParam(MCONTACT hContact, const TCHAR *param)
{
DWORD_PTR ret;
if (param == NULL)
@@ -168,7 +168,7 @@ static DWORD_PTR ConvertServiceParam(HCONTACT hContact, const TCHAR *param) }
-void SmileyType::CallSmileyService(HCONTACT hContact)
+void SmileyType::CallSmileyService(MCONTACT hContact)
{
_TPattern * srvsplit = _TPattern::compile(_T("(.*)\\|(.*)\\|(.*)"));
_TMatcher * m0 = srvsplit->createTMatcher(GetTriggerText());
@@ -856,7 +856,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) {
CMString tname(A2T_SM(acc->szModuleName));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char* proto = GetContactProto(hContact);
if (proto == NULL)
continue;
@@ -878,7 +878,7 @@ void SmileyCategoryListType::DeleteAccountAsCategory(PROTOACCOUNT *acc) }
}
-void SmileyCategoryListType::AddContactTransportAsCategory(HCONTACT hContact, const CMString& defaultFile)
+void SmileyCategoryListType::AddContactTransportAsCategory(MCONTACT hContact, const CMString& defaultFile)
{
char* proto = GetContactProto(hContact);
if (proto == NULL) return;
@@ -944,7 +944,7 @@ void SmileyCategoryListType::AddAllProtocolsAsCategory(void) for (int i = 0; i < protoCount; i++)
AddAccountAsCategory(accList[i], defaultFile);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
AddContactTransportAsCategory(hContact, defaultFile);
CMString cats;
diff --git a/plugins/SmileyAdd/src/smileys.h b/plugins/SmileyAdd/src/smileys.h index 4e7d95f6fa..d0ed2756c9 100644 --- a/plugins/SmileyAdd/src/smileys.h +++ b/plugins/SmileyAdd/src/smileys.h @@ -76,7 +76,7 @@ public: HICON GetIconDup(void);
HBITMAP GetBitmap(COLORREF bkgClr, int sizeX, int sizeY);
- void CallSmileyService(HCONTACT hContact);
+ void CallSmileyService(MCONTACT hContact);
void SetHidden(bool hid) { SetFlagsBit(HiddenSmiley, hid); }
void SetRegEx(bool regex) { SetFlagsBit(RegExSmiley, regex); }
@@ -291,7 +291,7 @@ public: void AddAndLoad(const CMString& name, const CMString& displayName);
void AddAllProtocolsAsCategory(void);
void AddAccountAsCategory(PROTOACCOUNT *acc, const CMString& defaultFile);
- void AddContactTransportAsCategory(HCONTACT hContact, const CMString& defaultFile);
+ void AddContactTransportAsCategory(MCONTACT hContact, const CMString& defaultFile);
void ClearAndLoadAll(void);
void ClearAll(void)
diff --git a/plugins/SmileyAdd/src/smltool.cpp b/plugins/SmileyAdd/src/smltool.cpp index 821173887b..e8adc50c89 100644 --- a/plugins/SmileyAdd/src/smltool.cpp +++ b/plugins/SmileyAdd/src/smltool.cpp @@ -45,7 +45,7 @@ private: int m_Direction;
UINT m_TargetMessage;
WPARAM m_TargetWParam;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
int rowSel;
bool m_Choosing;
@@ -171,10 +171,10 @@ LRESULT SmileyToolWindowType::DialogProcedure(UINT msg, WPARAM wParam, LPARAM lP struct smlsrvstruct
{
- smlsrvstruct(SmileyType *tsml, HCONTACT thContact)
+ smlsrvstruct(SmileyType *tsml, MCONTACT thContact)
: sml(tsml), hContact(thContact) {}
SmileyType *sml;
- HCONTACT hContact;
+ MCONTACT hContact;
};
void CALLBACK smileyServiceCallback(void* arg)
diff --git a/plugins/SmileyAdd/src/smltool.h b/plugins/SmileyAdd/src/smltool.h index ccdab2511e..76a9c7e06e 100644 --- a/plugins/SmileyAdd/src/smltool.h +++ b/plugins/SmileyAdd/src/smltool.h @@ -32,7 +32,7 @@ struct SmileyToolWindowParam HWND hWndParent;
UINT targetMessage;
WPARAM targetWParam;
- HCONTACT hContact;
+ MCONTACT hContact;
};
diff --git a/plugins/Spamotron/src/bayes.cpp b/plugins/Spamotron/src/bayes.cpp index 9df33ba9a1..d444e12411 100644 --- a/plugins/Spamotron/src/bayes.cpp +++ b/plugins/Spamotron/src/bayes.cpp @@ -221,7 +221,7 @@ double get_msg_score(TCHAR *msg) return tmp1 / (tmp1 + tmp2);
}
-void queue_message(HCONTACT hContact, DWORD msgtime, TCHAR *message)
+void queue_message(MCONTACT hContact, DWORD msgtime, TCHAR *message)
{
char *tmp;
sqlite3_stmt *stmt;
@@ -245,7 +245,7 @@ void queue_message(HCONTACT hContact, DWORD msgtime, TCHAR *message) sqlite3_finalize(stmt);
}
-void bayes_approve_contact(HCONTACT hContact)
+void bayes_approve_contact(MCONTACT hContact)
{
const char *message;
TCHAR *messageW;
@@ -353,7 +353,7 @@ void learn(int type, TCHAR *msg) #ifdef _DEBUG
sqlite3_prepare_v2(bayesdbg, sql_select, -1, &stmtdbg, NULL);
- sqlite3_bind_text(stmtdbg, 1, tok, strlen(tok), NULL);
+ sqlite3_bind_text(stmtdbg, 1, tok, (int)strlen(tok), NULL);
if (SQLITE_ROW == sqlite3_step(stmtdbg)) {
sqlite3_finalize(stmtdbg);
sqlite3_prepare_v2(bayesdbg, sql_update, -1, &stmtdbg, NULL);
@@ -361,7 +361,7 @@ void learn(int type, TCHAR *msg) sqlite3_finalize(stmtdbg);
sqlite3_prepare_v2(bayesdbg, sql_insert, -1, &stmtdbg, NULL);
}
- sqlite3_bind_text(stmtdbg, 1, tok, strlen(tok), SQLITE_STATIC);
+ sqlite3_bind_text(stmtdbg, 1, tok, (int)strlen(tok), SQLITE_STATIC);
sqlite3_step(stmtdbg);
sqlite3_finalize(stmtdbg);
#endif
diff --git a/plugins/Spamotron/src/common.h b/plugins/Spamotron/src/common.h index 2e9501c0ff..1de7db832c 100644 --- a/plugins/Spamotron/src/common.h +++ b/plugins/Spamotron/src/common.h @@ -42,7 +42,7 @@ #define _getOptD(a,b) _getCOptD(NULL, a, b)
#define _setOptD(a,b) _setCOptD(NULL, a, b)
-TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HCONTACT hContact, const char* option, const TCHAR *def);
+TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, MCONTACT hContact, const char* option, const TCHAR *def);
#define _getOptS(a,b,c,d) _getCOptS(a, b, NULL, c, d)
#define _setCOptTS(a,b,c) db_set_ts(a, PLUGIN_NAME, b, c)
#define _setCOptS(a,b,c) db_set_s(a, PLUGIN_NAME, b, c)
@@ -105,11 +105,11 @@ BOOL _isvalidregex(TCHAR* strSearch); BOOL _regmatch(TCHAR* str, TCHAR* strSearch);
BOOL Contains(TCHAR* dst, TCHAR* src);
BOOL isOneDay(DWORD timestamp1, DWORD timestamp2);
-void MarkUnread(HCONTACT hContact);
+void MarkUnread(MCONTACT hContact);
-int ShowPopup(HCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2);
+int ShowPopup(MCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2);
int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2);
-int _notify(HCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage);
+int _notify(MCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage);
int LogToSystemHistory(char *message, char *origmessage);
#define POPUP_DEFAULT 0
#define POPUP_BLOCKED 1
@@ -151,8 +151,8 @@ void learn_spam(TCHAR *msg); int get_token_count(int type);
int get_msg_count(int type);
double get_msg_score(TCHAR *msg);
-void queue_message(HCONTACT hContact, DWORD msgtime, TCHAR *message);
-void bayes_approve_contact(HCONTACT hContact);
+void queue_message(MCONTACT hContact, DWORD msgtime, TCHAR *message);
+void bayes_approve_contact(MCONTACT hContact);
void dequeue_messages();
#ifdef _DEBUG
diff --git a/plugins/Spamotron/src/options.cpp b/plugins/Spamotron/src/options.cpp index 7a3cdf0672..1aa1f6c119 100644 --- a/plugins/Spamotron/src/options.cpp +++ b/plugins/Spamotron/src/options.cpp @@ -2,7 +2,7 @@ TCHAR currentResponse[256] = {0};
-TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, HCONTACT hContact, const char* option, const TCHAR *def)
+TCHAR* _getCOptS(TCHAR *buf, unsigned int buflen, MCONTACT hContact, const char* option, const TCHAR *def)
{
DBVARIANT dbv = {0};
_tcsnset(buf, 0, buflen);
diff --git a/plugins/Spamotron/src/popups.cpp b/plugins/Spamotron/src/popups.cpp index ee11962bed..415bcc3517 100644 --- a/plugins/Spamotron/src/popups.cpp +++ b/plugins/Spamotron/src/popups.cpp @@ -192,7 +192,7 @@ int ShowPopupPreview(HWND optDlg, BYTE popupType, TCHAR *line1, TCHAR *line2) }
-int ShowPopup(HCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2)
+int ShowPopup(MCONTACT hContact, BYTE popupType, TCHAR *line1, TCHAR *line2)
{
POPUPDATAT ppdp = {0};
switch (popupType)
diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 0c79c8b958..c3e32f01d6 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -50,7 +50,7 @@ int OnDBEventAdded(WPARAM wParam, LPARAM lParam) int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBEVENTINFO *dbei = (DBEVENTINFO *)lParam;
char *msgblob;
POPUPDATA ppdp = {0};
@@ -68,7 +68,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) // get hContact from DBEVENTINFO as icq_proto.c doesn't pass hContact the usual way for some reason.
if (dbei->eventType == EVENTTYPE_AUTHREQUEST)
- hContact = (HCONTACT)*(PDWORD(dbei->pBlob+sizeof(DWORD)));
+ hContact = (MCONTACT)*(PDWORD(dbei->pBlob+sizeof(DWORD)));
// get maximum length of the message a protocol supports
maxmsglen = CallProtoService(dbei->szModule, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
@@ -524,7 +524,7 @@ void RemoveNotOnListSettings() {
DBVARIANT dbv;
char protoName[256] = {0};
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
strcpy(protoName, "proto_");
while (hContact != NULL) {
if (db_get_s(hContact, "Protocol", "p", &dbv) == 0) {
diff --git a/plugins/Spamotron/src/utils.cpp b/plugins/Spamotron/src/utils.cpp index 4858ee2297..5c561aa750 100644 --- a/plugins/Spamotron/src/utils.cpp +++ b/plugins/Spamotron/src/utils.cpp @@ -433,7 +433,7 @@ TCHAR* ReplaceVarsNum(TCHAR *dst, unsigned int len, int num) return dst;
}
-int _notify(HCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
+int _notify(MCONTACT hContact, BYTE type, TCHAR *message, TCHAR *origmessage)
{
char *tmp, *tmporig;
TCHAR msg[MAX_BUFFER_LENGTH];
@@ -484,7 +484,7 @@ int LogToSystemHistory(char *message, char *origmessage) return 0;
}
-void MarkUnread(HCONTACT hContact)
+void MarkUnread(MCONTACT hContact)
{
// We're not actually marking anything. We just pushing saved events to the database from a temporary location
DBVARIANT _dbv = {0};
diff --git a/plugins/SpellChecker/src/commons.h b/plugins/SpellChecker/src/commons.h index ac8ba21e2d..598627fcd2 100644 --- a/plugins/SpellChecker/src/commons.h +++ b/plugins/SpellChecker/src/commons.h @@ -120,7 +120,7 @@ struct Dialog {
HWND hwnd;
HWND hwnd_owner;
- HCONTACT hContact;
+ MCONTACT hContact;
char name[64];
Dictionary *lang;
TCHAR lang_name[32];
@@ -150,7 +150,7 @@ int MsgWindowEvent(WPARAM wParam, LPARAM lParam); int MsgWindowPopup(WPARAM wParam, LPARAM lParam);
int IconPressed(WPARAM wParam, LPARAM lParam);
-int AddContactTextBox(HCONTACT hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner);
+int AddContactTextBox(MCONTACT hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner);
int RemoveContactTextBox(HWND hwnd);
int ShowPopupMenu(HWND hwnd, HMENU hMenu, POINT pt, HWND hwndOwner);
diff --git a/plugins/SpellChecker/src/utils.cpp b/plugins/SpellChecker/src/utils.cpp index afa493cb39..31c092e5be 100644 --- a/plugins/SpellChecker/src/utils.cpp +++ b/plugins/SpellChecker/src/utils.cpp @@ -715,7 +715,7 @@ int GetClosestLanguage(TCHAR *lang_name) return -1; } -void GetUserProtoLanguageSetting(Dialog *dlg, HCONTACT hContact, char *group, char *setting, BOOL isProtocol = TRUE) +void GetUserProtoLanguageSetting(Dialog *dlg, MCONTACT hContact, char *group, char *setting, BOOL isProtocol = TRUE) { DBVARIANT dbv = {0}; dbv.type = DBVT_TCHAR; @@ -776,7 +776,7 @@ void GetUserLanguageSetting(Dialog *dlg, char *setting) if (metacontacts_proto != NULL) { mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); if (mc != CALLSERVICE_NOTFOUND) { - HCONTACT hMetaContact = (HCONTACT)mc; + MCONTACT hMetaContact = (MCONTACT)mc; if (hMetaContact != NULL) { GetUserProtoLanguageSetting(dlg, hMetaContact, metacontacts_proto, setting); if (dlg->lang_name[0] != _T('\0')) @@ -816,7 +816,7 @@ void GetContactLanguage(Dialog *dlg) if (dlg->lang_name[0] == _T('\0')) { INT_PTR mc = CallService(MS_MC_GETMETACONTACT, (WPARAM) dlg->hContact, 0); if (mc != CALLSERVICE_NOTFOUND) { - HCONTACT hMetaContact = (HCONTACT)mc; + MCONTACT hMetaContact = (MCONTACT)mc; if (hMetaContact != NULL) { if (!db_get_ts(hMetaContact, MODULE_NAME, "TalkLanguage", &dbv)) { lstrcpyn(dlg->lang_name, dbv.ptszVal, SIZEOF(dlg->lang_name)); @@ -899,7 +899,7 @@ void NotifyWrongSRMM() notified = TRUE; } -int AddContactTextBox(HCONTACT hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner) +int AddContactTextBox(MCONTACT hContact, HWND hwnd, char *name, BOOL srmm, HWND hwndOwner) { if (languages.getCount() <= 0) return 0; @@ -1406,7 +1406,7 @@ int IconPressed(WPARAM wParam, LPARAM lParam) if (sicd == NULL || strcmp(sicd->szModule, MODULE_NAME) != 0) return 0; - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; if (hContact == NULL) return 0; diff --git a/plugins/SplashScreen/src/debug.h b/plugins/SplashScreen/src/debug.h index 7ccd1b0b42..2db41cb734 100644 --- a/plugins/SplashScreen/src/debug.h +++ b/plugins/SplashScreen/src/debug.h @@ -11,7 +11,7 @@ extern TCHAR szLogFile[MAX_PATH]; *
*/
-int inline _DebugPopup(HCONTACT hContact, TCHAR *fmt, ...)
+int inline _DebugPopup(MCONTACT hContact, TCHAR *fmt, ...)
{
va_list va;
TCHAR debug[1024];
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp index cce7cdb970..98ab78e238 100644 --- a/plugins/StartupSilence/src/main.cpp +++ b/plugins/StartupSilence/src/main.cpp @@ -136,7 +136,7 @@ int DisablePopup(WPARAM wParam, LPARAM lParam) || ((DefPopup == 1 && DefEnabled == 1) && timer !=2) ) //also filtered only: We do not run next lines every time
//if "Filtered only..." is unchecked --->
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL)
{
char* cp = GetContactProto(hContact);
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp index 5afac93be1..727d83a33a 100755 --- a/plugins/StopSpamMod/src/init.cpp +++ b/plugins/StopSpamMod/src/init.cpp @@ -76,7 +76,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD) return &pluginInfoEx;
}
-extern tstring DBGetContactSettingStringPAN(HCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue);
+extern tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue);
void InitVars()
{
diff --git a/plugins/StopSpamMod/src/stopspam.cpp b/plugins/StopSpamMod/src/stopspam.cpp index b2b788c30d..7890bf6ab7 100755 --- a/plugins/StopSpamMod/src/stopspam.cpp +++ b/plugins/StopSpamMod/src/stopspam.cpp @@ -26,7 +26,7 @@ MIRANDA_HOOK_EVENT(ME_DB_CONTACT_ADDED, w, l) MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) { - HCONTACT hContact = (HCONTACT)wParam; + MCONTACT hContact = (MCONTACT)wParam; HANDLE hDbEvent = (HANDLE)lParam; DBEVENTINFO dbei = { sizeof(dbei) }; @@ -44,7 +44,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) // event is an auth request if(gbHandleAuthReq) { if(!(dbei.flags & DBEF_SENT) && !(dbei.flags & DBEF_READ) && dbei.eventType == EVENTTYPE_AUTHREQUEST) { - HCONTACT hcntct = DbGetAuthEventContact(&dbei); + MCONTACT hcntct = DbGetAuthEventContact(&dbei); // if request is from unknown or not marked Answered contact int a = db_get_b(hcntct, "CList", "NotOnList", 0); @@ -83,7 +83,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) { - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; if(!l) //fix potential DEP crash return 0; DBEVENTINFO * dbei = (DBEVENTINFO*)l; @@ -345,7 +345,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l) { - HCONTACT hContact = (HCONTACT)w; + MCONTACT hContact = (MCONTACT)w; DBCONTACTWRITESETTING * cws = (DBCONTACTWRITESETTING*)l; // if CList/NotOnList is being deleted then remove answeredSetting diff --git a/plugins/StopSpamMod/src/utilities.cpp b/plugins/StopSpamMod/src/utilities.cpp index e4a7793514..db12bee1a7 100755 --- a/plugins/StopSpamMod/src/utilities.cpp +++ b/plugins/StopSpamMod/src/utilities.cpp @@ -18,7 +18,7 @@ #include "headers.h"
-tstring DBGetContactSettingStringPAN(HCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue)
+tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue)
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
@@ -30,7 +30,7 @@ tstring DBGetContactSettingStringPAN(HCONTACT hContact, char const * szModule, c return errorValue;
}
-std::string DBGetContactSettingStringPAN_A(HCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue)
+std::string DBGetContactSettingStringPAN_A(MCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue)
{
DBVARIANT dbv;
//if(db_get(hContact, szModule, szSetting, &dbv))
@@ -97,7 +97,7 @@ int RemoveTmp(WPARAM,LPARAM) return 0;
}
-tstring variables_parse(tstring const &tstrFormat, HCONTACT hContact){
+tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact){
if (gbVarsServiceExist) {
FORMATINFO fi;
TCHAR *tszParsed;
@@ -201,7 +201,7 @@ BOOL IsUrlContains(TCHAR * Str) return 0;
}
-tstring GetContactUid(HCONTACT hContact, tstring Protocol)
+tstring GetContactUid(MCONTACT hContact, tstring Protocol)
{
tstring Uid;
TCHAR dUid[32]={0};
@@ -235,7 +235,7 @@ tstring GetContactUid(HCONTACT hContact, tstring Protocol) return Uid;
}
-void LogSpamToFile(HCONTACT hContact, tstring message)
+void LogSpamToFile(MCONTACT hContact, tstring message)
{
if (!gbLogToFile) return;
@@ -293,15 +293,15 @@ void CleanProtocolTmpThread(std::string proto) boost::this_thread::sleep(boost::posix_time::seconds(2));
}
- std::list<HCONTACT> contacts;
- for(HCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
+ std::list<MCONTACT> contacts;
+ for(MCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
if(db_get_b(hContact, "CList", "NotOnList", 0)|| (_T("Not In List")== DBGetContactSettingStringPAN(hContact,"CList","Group",_T(""))))
contacts.push_back(hContact);
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
- std::list<HCONTACT>::iterator end = contacts.end();
- for(std::list<HCONTACT>::iterator i = contacts.begin(); i != end; ++i)
+ std::list<MCONTACT>::iterator end = contacts.end();
+ for(std::list<MCONTACT>::iterator i = contacts.begin(); i != end; ++i)
{
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
@@ -320,15 +320,15 @@ void CleanProtocolExclThread(std::string proto) boost::this_thread::sleep(boost::posix_time::seconds(2));
}
- std::list<HCONTACT> contacts;
- for(HCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
+ std::list<MCONTACT> contacts;
+ for(MCONTACT hContact = db_find_first(proto.c_str()); hContact; hContact = db_find_next(hContact, proto.c_str()))
if(db_get_b(hContact, "CList", "NotOnList", 0) && db_get_b(hContact, pluginName, "Excluded", 0))
contacts.push_back(hContact);
boost::this_thread::sleep(boost::posix_time::seconds(5));
clean_mutex.lock();
- std::list<HCONTACT>::iterator end = contacts.end();
- for(std::list<HCONTACT>::iterator i = contacts.begin(); i != end; ++i)
+ std::list<MCONTACT>::iterator end = contacts.end();
+ for(std::list<MCONTACT>::iterator i = contacts.begin(); i != end; ++i)
{
LogSpamToFile(*i, _T("Deleted"));
HistoryLogFunc(*i, "Deleted");
@@ -358,7 +358,7 @@ void CleanThread() }
}
-void HistoryLog(HCONTACT hContact, char *data, int event_type, int flags)
+void HistoryLog(MCONTACT hContact, char *data, int event_type, int flags)
{
DBEVENTINFO Event = { sizeof(Event) };
Event.szModule = pluginName;
@@ -370,11 +370,11 @@ void HistoryLog(HCONTACT hContact, char *data, int event_type, int flags) db_event_add(hContact, &Event);
}
-void HistoryLogFunc(HCONTACT hContact, std::string message)
+void HistoryLogFunc(MCONTACT hContact, std::string message)
{
if(gbHistoryLog)
{
- if(hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if(hContact == INVALID_CONTACT_ID)
return;
std::string msg = message;
diff --git a/plugins/StopSpamMod/src/utilities.h b/plugins/StopSpamMod/src/utilities.h index 287a7bc54e..4120d0dec9 100755 --- a/plugins/StopSpamMod/src/utilities.h +++ b/plugins/StopSpamMod/src/utilities.h @@ -1,19 +1,19 @@ -tstring DBGetContactSettingStringPAN(HCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue); -std::string DBGetContactSettingStringPAN_A(HCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue); +tstring DBGetContactSettingStringPAN(MCONTACT hContact, char const * szModule, char const * szSetting, tstring errorValue); +std::string DBGetContactSettingStringPAN_A(MCONTACT hContact, char const * szModule, char const * szSetting, std::string errorValue); tstring &GetDlgItemString(HWND hwnd, int id); std::string &GetProtoList(); bool ProtoInList(std::string proto); void RemoveExcludedUsers(); -tstring variables_parse(tstring const &tstrFormat, HCONTACT hContact); +tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact); const int Stricmp(const TCHAR *str, const TCHAR *substr); //const int Stristr(const TCHAR *str, const TCHAR *substr); TCHAR* ReqGetText(DBEVENTINFO* dbei); BOOL IsUrlContains(TCHAR * Str); void DeleteCListGroupsByName(TCHAR* szGroupName); -tstring GetContactUid(HCONTACT hContact, std::string Protocol); -void LogSpamToFile(HCONTACT hContact, tstring message); +tstring GetContactUid(MCONTACT hContact, std::string Protocol); +void LogSpamToFile(MCONTACT hContact, tstring message); std::string toUTF8(std::wstring str); std::string toUTF8(std::string str); std::wstring toUTF16(std::string str); -void HistoryLogFunc(HCONTACT hContact, std::string message); +void HistoryLogFunc(MCONTACT hContact, std::string message); std::string get_random_num(int length);
\ No newline at end of file diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index 309fbdc612..03cc73334e 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -20,7 +20,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) // event is an auth request
if (!(dbei.flags & DBEF_SENT) && !(dbei.flags & DBEF_READ) && dbei.eventType == EVENTTYPE_AUTHREQUEST) {
- HCONTACT hcntct = DbGetAuthEventContact(&dbei);
+ MCONTACT hcntct = DbGetAuthEventContact(&dbei);
// if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
@@ -48,7 +48,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam) MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
{
- HCONTACT hContact = (HCONTACT)w;
+ MCONTACT hContact = (MCONTACT)w;
DBEVENTINFO *dbei = (DBEVENTINFO*)l;
if (dbei == NULL) //fix potential DEP crash
return 0;
@@ -188,7 +188,7 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l) MIRANDA_HOOK_EVENT(ME_DB_CONTACT_SETTINGCHANGED, w, l)
{
- HCONTACT hContact = (HCONTACT)w;
+ MCONTACT hContact = (MCONTACT)w;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)l;
// if CList/NotOnList is being deleted then remove answeredSetting
diff --git a/plugins/StopSpamPlus/src/headers.h b/plugins/StopSpamPlus/src/headers.h index 08f8965dab..1b2ac5b2e1 100644 --- a/plugins/StopSpamPlus/src/headers.h +++ b/plugins/StopSpamPlus/src/headers.h @@ -48,8 +48,8 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) void SetDlgItemString(HWND hwndDlg, UINT idItem, std::string const &str);
void SetDlgItemString(HWND hwndDlg, UINT idItem, std::wstring const &str);
tstring &GetDlgItemString(HWND hwnd, int id);
-bool IsExistMyMessage(HCONTACT hContact);
-tstring variables_parse(tstring const &tstrFormat, HCONTACT hContact);
+bool IsExistMyMessage(MCONTACT hContact);
+tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact);
tstring trim(tstring const &tstr, tstring const &trimChars = _T(" \f\n\r\t\v"));
INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/);
diff --git a/plugins/StopSpamPlus/src/services.cpp b/plugins/StopSpamPlus/src/services.cpp index 032b70c94c..578ff5f3b6 100644 --- a/plugins/StopSpamPlus/src/services.cpp +++ b/plugins/StopSpamPlus/src/services.cpp @@ -2,7 +2,7 @@ INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
std::string proto = GetContactProto(hContact);
if ( !plSets->ProtoDisabled( proto.c_str()))
@@ -22,8 +22,8 @@ INT_PTR IsContactPassed(WPARAM wParam, LPARAM /*lParam*/) INT_PTR RemoveTempContacts(WPARAM wParam,LPARAM lParam)
{
- for (HCONTACT hContact = db_find_first(); hContact; ) {
- HCONTACT hNext = db_find_next(hContact);
+ for (MCONTACT hContact = db_find_first(); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact);
ptrT szGroup( db_get_tsa( hContact, "CList", "Group"));
if ( db_get_b(hContact, "CList", "NotOnList", 0) || db_get_b(hContact, "CList", "Hidden", 0 ) || (szGroup != NULL && (_tcsstr(szGroup, _T("Not In List")) || _tcsstr(szGroup, TranslateT("Not In List"))))) {
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp index 17ef65e2bb..54bbdcea1e 100644 --- a/plugins/StopSpamPlus/src/utils.cpp +++ b/plugins/StopSpamPlus/src/utils.cpp @@ -12,7 +12,7 @@ tstring &GetDlgItemString(HWND hwnd, int id) return s;
}
-bool IsExistMyMessage(HCONTACT hContact)
+bool IsExistMyMessage(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_first(hContact);
while(hDbEvent){
@@ -41,7 +41,7 @@ void SetDlgItemString(HWND hwndDlg, UINT idItem, std::wstring const &str) SetDlgItemTextW(hwndDlg, idItem, str.c_str());
}
-tstring variables_parse(tstring const &tstrFormat, HCONTACT hContact){
+tstring variables_parse(tstring const &tstrFormat, MCONTACT hContact){
if (ServiceExists(MS_VARS_FORMATSTRING)) {
FORMATINFO fi;
tstring tstrResult;
diff --git a/plugins/TabSRMM/src/buttonbar.h b/plugins/TabSRMM/src/buttonbar.h index 9e0fd7a16d..ec5a1c70e6 100644 --- a/plugins/TabSRMM/src/buttonbar.h +++ b/plugins/TabSRMM/src/buttonbar.h @@ -34,9 +34,9 @@ static INT_PTR CB_RemoveButton(WPARAM wParam, LPARAM lParam); static INT_PTR CB_AddButton(WPARAM wParam, LPARAM lParam);
static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam);
static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam);
-static void CB_GetButtonSettings(HCONTACT hContact,CustomButtonData *cbd);
+static void CB_GetButtonSettings(MCONTACT hContact,CustomButtonData *cbd);
-void CB_WriteButtonSettings(HCONTACT hContact,CustomButtonData *cbd);
+void CB_WriteButtonSettings(MCONTACT hContact,CustomButtonData *cbd);
int sstSortButtons(const void * vmtbi1, const void * vmtbi2);
void CB_DeInitCustomButtons();
diff --git a/plugins/TabSRMM/src/buttonsbar.cpp b/plugins/TabSRMM/src/buttonsbar.cpp index 1cba4cbbcd..e3f277319e 100644 --- a/plugins/TabSRMM/src/buttonsbar.cpp +++ b/plugins/TabSRMM/src/buttonsbar.cpp @@ -101,7 +101,7 @@ static int DBRemoveEnumProc(const char *szSetting, LPARAM lParam) return 0;
}
-static int Hlp_RemoveDatabaseSettings(HCONTACT hContact, char *szModule, char *szPrefix)
+static int Hlp_RemoveDatabaseSettings(MCONTACT hContact, char *szModule, char *szPrefix)
{
RemoveSettings rs;
int i, count;
@@ -350,7 +350,7 @@ static INT_PTR CB_GetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton)
return 1;
- HWND hwndDlg = M.FindWindow((HCONTACT)wParam);
+ HWND hwndDlg = M.FindWindow((MCONTACT)wParam);
if(!hwndDlg)
return 1;
HWND hwndBtn = GetDlgItem(hwndDlg, tempCID);
@@ -385,7 +385,7 @@ static INT_PTR CB_SetButtonState(WPARAM wParam, LPARAM lParam) if (!realbutton)
return 1;
- HWND hwndDlg = M.FindWindow((HCONTACT)wParam);
+ HWND hwndDlg = M.FindWindow((MCONTACT)wParam);
if(!hwndDlg)
return 1;
@@ -856,7 +856,7 @@ void TSAPI BB_CustomButtonClick(TWindowData *dat, DWORD idFrom, HWND hwndFrom, B }
-void CB_GetButtonSettings(HCONTACT hContact, CustomButtonData *cbd)
+void CB_GetButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
{
DBVARIANT dbv = {0};
char SettingName[1024] = {'\0'};
@@ -884,7 +884,7 @@ void CB_GetButtonSettings(HCONTACT hContact, CustomButtonData *cbd) }
}
-void CB_WriteButtonSettings(HCONTACT hContact, CustomButtonData *cbd)
+void CB_WriteButtonSettings(MCONTACT hContact, CustomButtonData *cbd)
{
char SettingName[1024] = {'\0'};
char SettingParameter[1024] = {'\0'};
diff --git a/plugins/TabSRMM/src/chat/chat.h b/plugins/TabSRMM/src/chat/chat.h index 1e1e8caa16..3ea4cdc8b4 100644 --- a/plugins/TabSRMM/src/chat/chat.h +++ b/plugins/TabSRMM/src/chat/chat.h @@ -103,7 +103,7 @@ struct TMUCSettings : public GlobalLogSettingsBase struct FLASH_PARAMS
{
- HCONTACT hContact;
+ MCONTACT hContact;
const char* sound;
int iEvent;
HICON hNotifyIcon;
@@ -151,7 +151,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateT // manager.c
SESSION_INFO* SM_FindSessionByHWND(HWND h);
-SESSION_INFO* SM_FindSessionByHCONTACT(HCONTACT h);
+SESSION_INFO* SM_FindSessionByHCONTACT(MCONTACT h);
SESSION_INFO* SM_FindSessionAutoComplete(const char* pszModule, SESSION_INFO* currSession, SESSION_INFO* prevSession, const TCHAR* pszOriginal, const TCHAR* pszCurrent);
void SM_RemoveContainer(TContainerData *pContainer);
@@ -173,7 +173,7 @@ void DestroyGCMenu(HMENU *hMenu, int iIndex); void Chat_SetFilters(SESSION_INFO *si);
void TSAPI DoFlashAndSoundWorker(FLASH_PARAMS* p);
BOOL DoPopup(SESSION_INFO *si, GCEVENT* gce);
-int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...);
+int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...);
BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce);
// message.c
diff --git a/plugins/TabSRMM/src/chat/manager.cpp b/plugins/TabSRMM/src/chat/manager.cpp index 9aff83efd0..500e5f394d 100644 --- a/plugins/TabSRMM/src/chat/manager.cpp +++ b/plugins/TabSRMM/src/chat/manager.cpp @@ -93,7 +93,7 @@ SESSION_INFO* SM_FindSessionByHWND(HWND hWnd) return NULL;
}
-SESSION_INFO* SM_FindSessionByHCONTACT(HCONTACT h)
+SESSION_INFO* SM_FindSessionByHCONTACT(MCONTACT h)
{
for (SESSION_INFO *si = pci->wndList; si; si = si->next)
if (si->hContact == h)
diff --git a/plugins/TabSRMM/src/chat/services.cpp b/plugins/TabSRMM/src/chat/services.cpp index 5f44fa352c..70f6a16088 100644 --- a/plugins/TabSRMM/src/chat/services.cpp +++ b/plugins/TabSRMM/src/chat/services.cpp @@ -35,7 +35,7 @@ HWND CreateNewRoom(TContainerData *pContainer, SESSION_INFO *si, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup)
{
- HCONTACT hContact = si->hContact;
+ MCONTACT hContact = si->hContact;
if (M.FindWindow(hContact) != 0)
return 0;
diff --git a/plugins/TabSRMM/src/chat/tools.cpp b/plugins/TabSRMM/src/chat/tools.cpp index e082f985a0..beaed8af21 100644 --- a/plugins/TabSRMM/src/chat/tools.cpp +++ b/plugins/TabSRMM/src/chat/tools.cpp @@ -102,7 +102,7 @@ BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce) return TRUE;
}
-int ShowPopup(HCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...)
+int ShowPopup(MCONTACT hContact, SESSION_INFO *si, HICON hIcon, char* pszProtoName, TCHAR* pszRoomName, COLORREF crBkg, const TCHAR* fmt, ...)
{
POPUPDATAT pd = { 0 };
va_list marker;
diff --git a/plugins/TabSRMM/src/chat/window.cpp b/plugins/TabSRMM/src/chat/window.cpp index 3c940648d4..3c8e9420f2 100644 --- a/plugins/TabSRMM/src/chat/window.cpp +++ b/plugins/TabSRMM/src/chat/window.cpp @@ -3332,7 +3332,7 @@ LABEL_SHOWWINDOW: case DM_QUERYHCONTACT:
if (lParam)
- *(HCONTACT*)lParam = dat->hContact;
+ *(MCONTACT*)lParam = dat->hContact;
return 0;
case GC_CLOSEWINDOW:
diff --git a/plugins/TabSRMM/src/contactcache.cpp b/plugins/TabSRMM/src/contactcache.cpp index a255657c65..31f20b99a7 100644 --- a/plugins/TabSRMM/src/contactcache.cpp +++ b/plugins/TabSRMM/src/contactcache.cpp @@ -37,7 +37,7 @@ static OBJLIST<CContactCache> arContacts(50, HandleKeySortT);
-CContactCache::CContactCache(const HCONTACT hContact)
+CContactCache::CContactCache(const MCONTACT hContact)
{
m_hContact = hContact;
m_wOldStatus = m_wStatus = m_wMetaStatus = ID_STATUS_OFFLINE;
@@ -156,7 +156,7 @@ bool CContactCache::updateStatus() void CContactCache::updateMeta(bool fForce)
{
if (m_Valid) {
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)m_hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)m_hContact, 0);
if (hSubContact && (hSubContact != m_hSubContact || fForce)) {
m_hSubContact = hSubContact;
m_szMetaProto = GetContactProto(m_hSubContact);
@@ -442,7 +442,7 @@ void CContactCache::deletedHandler() ::SendMessage(m_hwnd, WM_CLOSE, 1, 2);
releaseAlloced();
- m_hContact = (HCONTACT)-1;
+ m_hContact = (MCONTACT)-1;
}
/**
@@ -512,7 +512,7 @@ void CContactCache::updateStatusMsg(const char *szKey) * @return CContactCache* pointer to the cache entry for this contact
*/
-CContactCache* CContactCache::getContactCache(HCONTACT hContact)
+CContactCache* CContactCache::getContactCache(MCONTACT hContact)
{
CContactCache *cc = arContacts.find((CContactCache*)&hContact);
if (cc == NULL) {
@@ -622,7 +622,7 @@ HICON CContactCache::getIcon(int& iSize) const int CContactCache::getMaxMessageLength()
{
- HCONTACT hContact = getActiveContact();
+ MCONTACT hContact = getActiveContact();
LPCSTR szProto = getActiveProto();
if (szProto) {
m_nMax = CallProtoService(szProto, PS_GETCAPS, PFLAG_MAXLENOFMESSAGE, (LPARAM)hContact);
diff --git a/plugins/TabSRMM/src/contactcache.h b/plugins/TabSRMM/src/contactcache.h index ec1f8e4bb0..46212cd706 100644 --- a/plugins/TabSRMM/src/contactcache.h +++ b/plugins/TabSRMM/src/contactcache.h @@ -65,7 +65,7 @@ struct TSessionStats { struct CContactCache : public MZeroedObject
{
CContactCache() {}
- CContactCache(const HCONTACT hContact);
+ CContactCache(const MCONTACT hContact);
~CContactCache()
{
releaseAlloced();
@@ -77,8 +77,8 @@ struct CContactCache : public MZeroedObject const WORD getActiveStatus() const { return(m_isMeta ? m_wMetaStatus : m_wStatus); }
const WORD getOldStatus() const { return(m_wOldStatus); }
const TCHAR* getNick() const { return(m_szNick); }
- const HCONTACT getContact() const { return(m_hContact); }
- const HCONTACT getActiveContact() const { return(m_isMeta ? (m_hSubContact ? m_hSubContact : m_hContact) : m_hContact); }
+ const MCONTACT getContact() const { return(m_hContact); }
+ const MCONTACT getActiveContact() const { return(m_isMeta ? (m_hSubContact ? m_hSubContact : m_hContact) : m_hContact); }
const DWORD getIdleTS() const { return(m_idleTS); }
const char* getProto() const { return(m_szProto); }
const TCHAR* getProtoT() const { return(m_tszProto); }
@@ -128,7 +128,7 @@ struct CContactCache : public MZeroedObject void saveHistory(WPARAM wParam, LPARAM lParam);
void inputHistoryEvent(WPARAM wParam);
- static CContactCache* getContactCache(HCONTACT hContact);
+ static CContactCache* getContactCache(MCONTACT hContact);
static void cacheUpdateMetaChanged();
private:
@@ -137,8 +137,8 @@ private: void allocHistory();
void releaseAlloced();
- HCONTACT m_hContact;
- HCONTACT m_hSubContact;
+ MCONTACT m_hContact;
+ MCONTACT m_hSubContact;
WORD m_wStatus, m_wMetaStatus;
WORD m_wOldStatus;
char* m_szProto, *m_szMetaProto;
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 61dd9940e6..f51d760d92 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -39,7 +39,7 @@ TContainerData *pLastActiveContainer = NULL; static bool fForceOverlayIcons = false;
-static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, HCONTACT hContact)
+static int ServiceParamsOK(ButtonItem *item, WPARAM *wParam, LPARAM *lParam, MCONTACT hContact)
{
if (item->dwFlags & BUTTON_PASSHCONTACTW || item->dwFlags & BUTTON_PASSHCONTACTL || item->dwFlags & BUTTON_ISCONTACTDBACTION) {
if (hContact == 0)
@@ -135,7 +135,7 @@ void TSAPI SetAeroMargins(TContainerData *pContainer) * pointer and for removing the struct from the linked list.
*/
-TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, HCONTACT hContactFrom)
+TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hContactFrom)
{
if (CMimAPI::m_shutDown)
return NULL;
@@ -873,7 +873,7 @@ panel_found: }
else if (((LPNMHDR)lParam)->code == NM_RCLICK) {
POINT pt;
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
HMENU hMenu;
GetCursorPos(&pt);
@@ -1013,7 +1013,7 @@ panel_found: bool fProcessMainMenu = pContainer->MenuBar->isMainMenu();
pContainer->MenuBar->Cancel();
- HCONTACT hContact;
+ MCONTACT hContact;
TWindowData *dat = (TWindowData*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
DWORD dwOldFlags = pContainer->dwFlags;
ButtonItem *pItem = pContainer->buttonItems;
@@ -1175,7 +1175,7 @@ panel_found: case DM_UPDATETITLE:
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
const TCHAR *szNewTitle = NULL;
TWindowData *dat = NULL;
@@ -1197,15 +1197,15 @@ panel_found: dat = (TWindowData*)GetWindowLongPtr(pContainer->hwndActive, GWLP_USERDATA);
}
else {
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd == 0) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam);
if (si) {
SendMessage(si->hWnd, GC_UPDATETITLE, 0, 0);
return 0;
}
}
- hContact = (HCONTACT)wParam;
+ hContact = (MCONTACT)wParam;
if (hwnd && hContact)
dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
}
@@ -1392,7 +1392,7 @@ panel_found: SetLayeredWindowAttributes(hwndDlg, Skin->getColorKey(), (BYTE)trans, (pContainer->dwFlags & CNT_TRANSPARENCY ? LWA_ALPHA : 0));
}
if (pContainer->dwFlags & CNT_NEED_UPDATETITLE) {
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
pContainer->dwFlags &= ~CNT_NEED_UPDATETITLE;
if (pContainer->hwndActive) {
SendMessage(pContainer->hwndActive, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
@@ -1550,7 +1550,7 @@ panel_found: {
DWORD ws, wsold, ex = 0, exold = 0;
HMENU hSysmenu = GetSystemMenu(hwndDlg, FALSE);
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
int i=0;
UINT sBarHeight;
bool bAero = M.isAero();
@@ -1897,7 +1897,7 @@ panel_found: item.mask = TCIF_PARAM;
TabCtrl_GetItem(hwndTab, TabCtrl_GetCurSel(hwndTab), &item);
- HCONTACT hContact;
+ MCONTACT hContact;
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
db_set_b(hContact, SRMSGMOD_T, "splitmax", (BYTE)((wp.showCmd == SW_SHOWMAXIMIZED) ? 1 : 0));
@@ -1934,7 +1934,7 @@ panel_found: pContainer->dwFlags &= ~(CNT_DEFERREDCONFIGURE | CNT_CREATE_MINIMIZED | CNT_DEFERREDSIZEREQUEST | CNT_CREATE_CLONED);
for (int i=0; i < TabCtrl_GetItemCount(hwndTab); i++) {
if (TabCtrl_GetItem(hwndTab, i, &item)) {
- HCONTACT hContact;
+ MCONTACT hContact;
SendMessage((HWND)item.lParam, DM_QUERYHCONTACT, 0, (LPARAM)&hContact);
char szCName[40];
@@ -2215,7 +2215,7 @@ void TSAPI AdjustTabClientRect(TContainerData *pContainer, RECT *rc) * if none is assigned, return the name of the default container
*/
-int TSAPI GetContainerNameForContact(HCONTACT hContact, TCHAR *szName, int iNameLen)
+int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iNameLen)
{
// single window mode using cloned (temporary) containers
if (M.GetByte("singlewinmode", 0)) {
@@ -2255,7 +2255,7 @@ void TSAPI DeleteContainer(int iIndex) db_set_ts(NULL, CONTAINER_KEY, szIndex, _T("**mir_free**"));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!lstrcmp(tszValue, tszContainerName))
db_unset(hContact, SRMSGMOD_T, CONTAINER_SUBKEY);
@@ -2289,7 +2289,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew) db_set_ts(NULL, CONTAINER_KEY, szIndex, szNew);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
ptrT tszValue(db_get_tsa(hContact, SRMSGMOD_T, CONTAINER_SUBKEY));
if (!lstrcmp(tszValue, tszContainerName))
db_set_ts(hContact, SRMSGMOD_T, CONTAINER_SUBKEY, szNew);
@@ -2347,7 +2347,7 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) int iNumProtos = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)dat->hContact, 0);
int iDefaultProtoByNum = (int)CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)dat->hContact, 0);
- HCONTACT hContactMostOnline = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->hContact, 0);
+ MCONTACT hContactMostOnline = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)dat->hContact, 0);
char *szProtoMostOnline = GetContactProto(hContactMostOnline);
int isForced = M.GetDword(dat->hContact, "tabSRMM_forced", -1);
@@ -2364,8 +2364,8 @@ HMENU TSAPI BuildMCProtocolMenu(HWND hwndDlg) mir_snprintf(szTemp, sizeof(szTemp), "Handle%d", i);
TCHAR *nick = NULL, *szStatusText = NULL;
- HCONTACT hContact;
- if ((hContact = (HCONTACT)db_get_dw(dat->hContact, PluginConfig.szMetaName, szTemp, 0)) != 0) {
+ MCONTACT hContact;
+ if ((hContact = (MCONTACT)db_get_dw(dat->hContact, PluginConfig.szMetaName, szTemp, 0)) != 0) {
nick = pcli->pfnGetContactDisplayName(hContact, 0);
mir_snprintf(szTemp, sizeof(szTemp), "Status%d", i);
WORD wStatus = (WORD)db_get_w(dat->hContact, PluginConfig.szMetaName, szTemp, 0);
diff --git a/plugins/TabSRMM/src/controls.cpp b/plugins/TabSRMM/src/controls.cpp index ffbb3e24bb..c7ee0e98d6 100644 --- a/plugins/TabSRMM/src/controls.cpp +++ b/plugins/TabSRMM/src/controls.cpp @@ -398,7 +398,7 @@ void CMenuBar::invoke(const int id) TWindowData *dat = (TWindowData*)GetWindowLongPtr(m_pContainer->hwndActive, GWLP_USERDATA);
- HCONTACT hContact = dat ? dat->hContact : 0;
+ MCONTACT hContact = dat ? dat->hContact : 0;
if (index == 3 && hContact != 0) {
hMenu = reinterpret_cast<HMENU>(::CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0));
diff --git a/plugins/TabSRMM/src/eventpopups.cpp b/plugins/TabSRMM/src/eventpopups.cpp index 740e3d5f7b..43aa9d02d8 100644 --- a/plugins/TabSRMM/src/eventpopups.cpp +++ b/plugins/TabSRMM/src/eventpopups.cpp @@ -44,7 +44,7 @@ static LIST<PLUGIN_DATAT> arPopupList(10, HandleKeySortT); BOOL bWmNotify = TRUE;
-static PLUGIN_DATAT* PU_GetByContact(const HCONTACT hContact)
+static PLUGIN_DATAT* PU_GetByContact(const MCONTACT hContact)
{
return arPopupList.find((PLUGIN_DATAT*)&hContact);
}
@@ -559,7 +559,7 @@ static TCHAR* GetPreviewT(WORD eventType, DBEVENTINFO* dbe) }
}
-static int PopupUpdateT(HCONTACT hContact, HANDLE hEvent)
+static int PopupUpdateT(MCONTACT hContact, HANDLE hEvent)
{
PLUGIN_DATAT *pdata = const_cast<PLUGIN_DATAT *>(PU_GetByContact(hContact));
if (!pdata)
@@ -630,7 +630,7 @@ static int PopupUpdateT(HCONTACT hContact, HANDLE hEvent) return 0;
}
-static int PopupShowT(NEN_OPTIONS *pluginOptions, HCONTACT hContact, HANDLE hEvent, UINT eventType, HWND hContainer)
+static int PopupShowT(NEN_OPTIONS *pluginOptions, MCONTACT hContact, HANDLE hEvent, UINT eventType, HWND hContainer)
{
//there has to be a maximum number of popups shown at the same time
if (arPopupList.getCount() >= MAX_POPUPS)
@@ -759,7 +759,7 @@ void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced) * if we want tray support, add the contact to the list of unread sessions in the tray menu
*/
-int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HCONTACT hContact, DWORD fromEvent)
+int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, MCONTACT hContact, DWORD fromEvent)
{
if (!PluginConfig.g_hMenuTrayUnread || hContact == 0 || szProto == NULL)
return 0;
@@ -823,7 +823,7 @@ int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szPro return 0;
}
-int tabSRMM_ShowPopup(HCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
+int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat)
{
if (nen_options.iDisable) // no popups at all. Period
return 0;
@@ -883,7 +883,7 @@ passed: * remove all popups for hContact, but only if the mask matches the current "mode"
*/
-void TSAPI DeletePopupsForContact(HCONTACT hContact, DWORD dwMask)
+void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask)
{
if (!(dwMask & nen_options.dwRemoveMask) || nen_options.iDisable || !PluginConfig.g_PopupAvail)
return;
diff --git a/plugins/TabSRMM/src/functions.h b/plugins/TabSRMM/src/functions.h index cfb6b5204e..28ad139f09 100644 --- a/plugins/TabSRMM/src/functions.h +++ b/plugins/TabSRMM/src/functions.h @@ -53,9 +53,9 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP int TSAPI NEN_ReadOptions(NEN_OPTIONS *options);
int TSAPI NEN_WriteOptions(NEN_OPTIONS *options);
-int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, HCONTACT hContact, DWORD fromEvent);
+int TSAPI UpdateTrayMenu(const TWindowData *dat, WORD wStatus, const char *szProto, const TCHAR *szStatus, MCONTACT hContact, DWORD fromEvent);
int TSAPI PopupPreview(NEN_OPTIONS *pluginOptions);
-void TSAPI DeletePopupsForContact(HCONTACT hContact, DWORD dwMask);
+void TSAPI DeletePopupsForContact(MCONTACT hContact, DWORD dwMask);
/*
* tray stuff
@@ -65,24 +65,24 @@ void TSAPI CreateSystrayIcon(int create); void TSAPI FlashTrayIcon(HICON hIcon);
void TSAPI UpdateTrayMenuState(TWindowData *dat, BOOL bForced);
void TSAPI LoadFavoritesAndRecent();
-void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus,
+void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus,
WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu);
void TSAPI CreateTrayMenus(int mode);
-void TSAPI HandleMenuEntryFromhContact(HCONTACT iSelection);
+void TSAPI HandleMenuEntryFromhContact(MCONTACT iSelection);
/*
* gneric msgwindow functions(creation, container management etc.)
*/
-BOOL TSAPI IsUtfSendAvailable(HCONTACT hContact);
-HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact, int isSend,
+BOOL TSAPI IsUtfSendAvailable(MCONTACT hContact);
+HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend,
const char *pszInitialText, BOOL bActivateTAb, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent);
int TSAPI ActivateTabFromHWND(HWND hwndTab, HWND hwnd);
void TSAPI FlashContainer(TContainerData *pContainer, int iMode, int iNum);
void TSAPI CreateImageList(BOOL bInitial);
-TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, HCONTACT hContact);
-TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, HCONTACT hContactFrom);
+TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, MCONTACT hContact);
+TContainerData* TSAPI CreateContainer(const TCHAR *name, int iTemp, MCONTACT hContactFrom);
TContainerData* TSAPI FindContainerByName(const TCHAR *name);
int TSAPI GetTabIndexFromHWND(HWND hwndTab, HWND hwnd);
@@ -100,7 +100,7 @@ TContainerData* TSAPI RemoveContainerFromList(TContainerData *pContainer); void TSAPI CloseAllContainers();
void TSAPI DeleteContainer(int iIndex);
void TSAPI RenameContainer(int iIndex, const TCHAR *newName);
-int TSAPI GetContainerNameForContact(HCONTACT hContact, TCHAR *szName, int iNameLen);
+int TSAPI GetContainerNameForContact(MCONTACT hContact, TCHAR *szName, int iNameLen);
HMENU TSAPI BuildContainerMenu();
void TSAPI BuildCodePageList();
void TSAPI PreTranslateDates();
@@ -108,7 +108,7 @@ void TSAPI ApplyContainerSetting(TContainerData *pContainer, DWORD flags, UINT void TSAPI BroadCastContainer(const TContainerData *pContainer, UINT message, WPARAM wParam, LPARAM lParam, BYTE iType = 0);
void TSAPI GetDefaultContainerTitleFormat();
void TSAPI SetAeroMargins(TContainerData *pContainer);
-int TABSRMM_FireEvent(HCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType);
+int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType);
INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam);
@@ -154,7 +154,7 @@ int TSAPI UnloadTSButtonModule(); * debugging support
*/
-int _DebugPopup(HCONTACT hContact, const TCHAR *fmt, ...);
+int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...);
int _DebugMessage(HWND hwndDlg, TWindowData *dat, const char *fmt, ...);
// themes
@@ -175,7 +175,7 @@ int TSAPI LoadLocalFlags(HWND hwnd, TWindowData *dat); int TN_ModuleInit();
int TN_OptionsInitialize(WPARAM wParam, LPARAM lParam);
int TN_ModuleDeInit();
-void TN_TypingMessage(HCONTACT hContact, int iMode);
+void TN_TypingMessage(MCONTACT hContact, int iMode);
// hotkeys
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index a6cb622037..cebd17df30 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -306,7 +306,7 @@ LRESULT TSAPI DM_MsgWindowCmdHandler(HWND hwndDlg, TContainerData *m_pContainer, case IDC_SMILEYBTN:
if (dat->doSmileys && PluginConfig.g_SmileyAddAvail) {
- HCONTACT hContact = dat->cache->getActiveContact();
+ MCONTACT hContact = dat->cache->getActiveContact();
if (CheckValidSmileyPack(dat->cache->getActiveProto(), hContact) != 0) {
SMADD_SHOWSEL3 smaddInfo = {0};
@@ -875,7 +875,7 @@ void TSAPI DM_InitRichEdit(TWindowData *dat) void TSAPI DM_SetDBButtonStates(HWND hwndChild, TWindowData *dat)
{
ButtonItem *buttonItem = dat->pContainer->buttonItems;
- HCONTACT hContact = dat->hContact, hFinalContact = 0;
+ MCONTACT hContact = dat->hContact, hFinalContact = 0;
char *szModule, *szSetting;
HWND hwndContainer = dat->pContainer->hwnd;
@@ -978,7 +978,7 @@ void TSAPI DM_ScrollToBottom(TWindowData *dat, WPARAM wParam, LPARAM lParam) static void LoadKLThread(LPVOID _param)
{
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)_param, SRMSGMOD_T, "locale", &dbv)) {
+ if (!db_get_ts((MCONTACT)_param, SRMSGMOD_T, "locale", &dbv)) {
HKL hkl = LoadKeyboardLayout(dbv.ptszVal, 0);
PostMessage(PluginConfig.g_hwndHotkeyHandler, DM_SETLOCALE, (WPARAM)_param, (LPARAM)hkl);
db_free(&dbv);
@@ -1278,7 +1278,7 @@ void TSAPI DM_NotifyTyping(TWindowData *dat, int mode) DWORD protoCaps;
DWORD typeCaps;
const char *szProto = 0;
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
if (!dat || !dat->hContact)
return;
@@ -1626,7 +1626,7 @@ void TSAPI DM_EventAdded(TWindowData *dat, WPARAM wParam, LPARAM lParam) SendMessage(hwndDlg, DM_ADDDIVIDER, 0, 0);
}
}
- tabSRMM_ShowPopup((HCONTACT)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
+ tabSRMM_ShowPopup((MCONTACT)wParam, hDbEvent, dbei.eventType, m_pContainer->fHidden ? 0 : 1, m_pContainer, hwndDlg, dat->cache->getActiveProto(), dat);
if (IsWindowVisible(m_pContainer->hwnd))
m_pContainer->fHidden = false;
}
@@ -1789,7 +1789,7 @@ void TSAPI DM_UpdateTitle(TWindowData *dat, WPARAM wParam, LPARAM lParam) if (dat->szProto) {
szActProto = dat->cache->getActiveProto();
- HCONTACT hActContact = dat->hContact;
+ MCONTACT hActContact = dat->hContact;
bool bHasName = (dat->cache->getUIN()[0] != 0);
dat->idle = dat->cache->getIdleTS();
@@ -1895,7 +1895,7 @@ static HANDLE hHookIconPressedEvt; static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
M.BroadcastMessage(DM_STATUSICONCHANGE, 0, 0);
else {
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 219036be27..15e32170e8 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -402,11 +402,11 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) CContactCache* c = 0;
bool fChanged = false, fNickChanged = false, fExtendedStatusChange = false;
- hwnd = M.FindWindow((HCONTACT)wParam);
+ hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd == 0 && wParam != 0) { // we are not interested in this event if there is no open message window/tab
if (!strcmp(setting, "Status") || !strcmp(setting, "MyHandle") || !strcmp(setting, "Nick") || !strcmp(cws->szModule, SRMSGMOD_T)) {
- c = CContactCache::getContactCache((HCONTACT)wParam);
+ c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
fChanged = c->updateStatus();
if (strcmp(setting, "Status"))
@@ -424,7 +424,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) }
if (wParam) {
- c = CContactCache::getContactCache((HCONTACT)wParam);
+ c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
szProto = c->getProto();
if (!strcmp(cws->szModule, SRMSGMOD_T)) { // catch own relevant settings
@@ -500,7 +500,7 @@ int CGlobals::DBSettingChanged(WPARAM wParam, LPARAM lParam) int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- CContactCache *c = CContactCache::getContactCache((HCONTACT)wParam);
+ CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam);
if (c)
c->deletedHandler();
}
@@ -515,7 +515,7 @@ int CGlobals::DBContactDeleted(WPARAM wParam, LPARAM lParam) int CGlobals::MetaContactEvent(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- CContactCache *c = CContactCache::getContactCache((HCONTACT)wParam);
+ CContactCache *c = CContactCache::getContactCache((MCONTACT)wParam);
if (c) {
c->updateMeta(true);
if (c->getHwnd()) {
@@ -532,7 +532,7 @@ int CGlobals::PreshutdownSendRecv(WPARAM wParam, LPARAM lParam) ::TN_ModuleDeInit();
::CloseAllContainers();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
db_set_dw(hContact, SRMSGMOD_T, "messagecount", 0);
::SI_DeinitStatusIcons();
@@ -582,7 +582,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void) cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, "SendLater", "count", 0))
sendLater->addContact(hContact);
@@ -616,7 +616,7 @@ void CGlobals::logStatusChange(WPARAM wParam, const CContactCache *c) if (dat == NULL || !c->isValid())
return;
- HCONTACT hContact = c->getContact();
+ MCONTACT hContact = c->getContact();
if (!PluginConfig.m_LogStatusChanges && !M.GetByte(hContact, "logstatuschanges", 0))
return;
diff --git a/plugins/TabSRMM/src/hotkeyhandler.cpp b/plugins/TabSRMM/src/hotkeyhandler.cpp index cd2cf9333a..ff4a710b64 100644 --- a/plugins/TabSRMM/src/hotkeyhandler.cpp +++ b/plugins/TabSRMM/src/hotkeyhandler.cpp @@ -93,7 +93,7 @@ static INT_PTR HotkeyProcessor(WPARAM wParam, LPARAM lParam) return 0;
}
-void TSAPI HandleMenuEntryFromhContact(HCONTACT hContact)
+void TSAPI HandleMenuEntryFromhContact(MCONTACT hContact)
{
if (hContact == 0)
return;
@@ -203,11 +203,11 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP return TRUE;
}
else if (dis->CtlType == ODT_MENU) {
- HWND hWnd = M.FindWindow((HCONTACT)dis->itemID);
+ HWND hWnd = M.FindWindow((MCONTACT)dis->itemID);
DWORD idle = 0;
if (hWnd == NULL) {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)dis->itemID);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)dis->itemID);
hWnd = si ? si->hWnd : 0;
}
@@ -243,7 +243,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP SetForegroundWindow(hwndDlg);
if (GetMenuItemCount(PluginConfig.g_hMenuTrayUnread) > 0) {
BOOL iSelection = TrackPopupMenu(PluginConfig.g_hMenuTrayUnread, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
- HandleMenuEntryFromhContact((HCONTACT)iSelection);
+ HandleMenuEntryFromhContact((MCONTACT)iSelection);
}
else TrackPopupMenu(GetSubMenu(PluginConfig.g_hMenuContext, 8), TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, NULL);
@@ -268,7 +268,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP GetMenuItemInfoA(PluginConfig.g_hMenuTrayUnread, i, TRUE, &mii);
if (mii.dwItemData > 0) {
UINT uid = GetMenuItemID(PluginConfig.g_hMenuTrayUnread, i);
- HandleMenuEntryFromhContact((HCONTACT)uid);
+ HandleMenuEntryFromhContact((MCONTACT)uid);
break;
}
}
@@ -318,7 +318,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP mii.fMask = MIIM_DATA | MIIM_ID;
GetMenuItemInfo(submenu, (UINT_PTR)iSelection, FALSE, &mii);
if (mii.dwItemData != 0) // this must be an itm of the fav or recent menu
- HandleMenuEntryFromhContact((HCONTACT)iSelection);
+ HandleMenuEntryFromhContact((MCONTACT)iSelection);
else {
switch (iSelection) {
case ID_TRAYCONTEXT_SHOWTHETRAYICON:
@@ -372,7 +372,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP * if lParam == NULL, don't consider clist events, just open the message tab
*/
if (lParam == 0)
- HandleMenuEntryFromhContact((HCONTACT)wParam);
+ HandleMenuEntryFromhContact((MCONTACT)wParam);
else {
CLISTEVENT *cle = (CLISTEVENT *)CallService(MS_CLIST_GETEVENT, wParam, 0);
if (cle) {
@@ -382,13 +382,13 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP }
}
// still, we got that message posted.. the event may be waiting in tabSRMMs tray...
- else HandleMenuEntryFromhContact((HCONTACT)wParam);
+ else HandleMenuEntryFromhContact((MCONTACT)wParam);
}
break;
case DM_DOCREATETAB:
{
- HWND hWnd = M.FindWindow((HCONTACT)lParam);
+ HWND hWnd = M.FindWindow((MCONTACT)lParam);
if (hWnd && IsWindow(hWnd)) {
TContainerData *pContainer = 0;
SendMessage(hWnd, DM_QUERYCONTAINER, 0, (LPARAM)&pContainer);
@@ -399,7 +399,7 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP else
SendMessage(hWnd, WM_CLOSE, 0, 1);
- CreateNewTabForContact((TContainerData*)wParam, (HCONTACT)lParam, 0, NULL, TRUE, TRUE, FALSE, 0);
+ CreateNewTabForContact((TContainerData*)wParam, (MCONTACT)lParam, 0, NULL, TRUE, TRUE, FALSE, 0);
}
}
}
@@ -441,13 +441,13 @@ LONG_PTR CALLBACK HotkeyHandlerDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP */
case DM_REMOVECLISTEVENT:
CallService(MS_CLIST_REMOVEEVENT, wParam, lParam);
- db_event_markRead((HCONTACT)wParam, (HANDLE)lParam);
+ db_event_markRead((MCONTACT)wParam, (HANDLE)lParam);
return 0;
case DM_SETLOCALE:
{
HKL hkl = (HKL)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = M.FindWindow(hContact);
if (hWnd) {
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 90a8c07f74..691b5ff067 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -1364,7 +1364,7 @@ void CInfoPanel::dismissConfig(bool fForced) * @param panel CInfoPanel* the panel which owns it
*/
-CTip::CTip(const HWND hwndParent, const HCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
+CTip::CTip(const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText, const CInfoPanel* panel)
{
m_hwnd = ::CreateWindowEx(WS_EX_TOOLWINDOW, _T("RichEditTipClass"), _T(""), (M.isAero() ? WS_THICKFRAME : WS_BORDER) | WS_POPUPWINDOW | WS_TABSTOP | WS_CLIPCHILDREN | WS_CLIPSIBLINGS,
0, 0, 40, 40, 0, 0, g_hInst, this);
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h index 0e2c962706..3bb8835d38 100644 --- a/plugins/TabSRMM/src/infopanel.h +++ b/plugins/TabSRMM/src/infopanel.h @@ -74,7 +74,7 @@ public: LEFT_BAR_WIDTH = 20
};
- CTip (const HWND hwndParent, const HCONTACT hContact, const TCHAR *pszText = 0, const CInfoPanel *panel = 0);
+ CTip (const HWND hwndParent, const MCONTACT hContact, const TCHAR *pszText = 0, const CInfoPanel *panel = 0);
~CTip()
{
mir_free(m_pszText);
@@ -92,7 +92,7 @@ private: HWND m_hwnd; // our window handle
HWND m_hRich; // handle of the rich edit child
HWND m_hwndParent; // parent window (used for position calculations and to send notifications)
- HCONTACT m_hContact; // contact handle
+ MCONTACT m_hContact; // contact handle
char *m_pszText; // the richedit text
SIZE m_szRich; // size of the richedit control (height auto-calculated to make it fit the text)
RECT m_rcRich; // adjusted rectangle for the richedit control (client coordinates)
diff --git a/plugins/TabSRMM/src/mim.cpp b/plugins/TabSRMM/src/mim.cpp index 69a97a7a5f..7c81027490 100644 --- a/plugins/TabSRMM/src/mim.cpp +++ b/plugins/TabSRMM/src/mim.cpp @@ -164,12 +164,12 @@ void CMimAPI::BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam) WindowList_BroadcastAsync(m_hMessageWindowList, msg, wParam, lParam);
}
-HWND CMimAPI::FindWindow(HCONTACT h) const
+HWND CMimAPI::FindWindow(MCONTACT h) const
{
return WindowList_Find(m_hMessageWindowList, h);
}
-INT_PTR CMimAPI::AddWindow(HWND hWnd, HCONTACT h)
+INT_PTR CMimAPI::AddWindow(HWND hWnd, MCONTACT h)
{
return WindowList_Add(m_hMessageWindowList, hWnd, h);
}
@@ -335,7 +335,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) int issplit = 1, foundWin = 0, preTyping = 0;
BOOL fShowOnClist = TRUE;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
if ((hwnd = M.FindWindow(hContact)) && M.GetByte(SRMSGMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING))
preTyping = SendMessage(hwnd, DM_TYPING, 0, lParam);
@@ -407,7 +407,7 @@ int CMimAPI::TypingMessage(WPARAM wParam, LPARAM lParam) }
if (fShowOnClist) {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
@@ -468,7 +468,7 @@ int CMimAPI::ProtoAck(WPARAM wParam, LPARAM lParam) int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return NULL;
@@ -497,7 +497,7 @@ int CMimAPI::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) int CMimAPI::DispatchNewEvent(WPARAM wParam, LPARAM lParam)
{
if (wParam) {
- HWND h = M.FindWindow((HCONTACT)wParam);
+ HWND h = M.FindWindow((MCONTACT)wParam);
if (h)
PostMessage(h, HM_DBEVENTADDED, wParam, lParam); // was SENDMESSAGE !!! XXX
}
@@ -522,7 +522,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(hDbEvent, &dbei);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hwnd = M.FindWindow(hContact);
BOOL isCustomEvent = IsCustomEvent(dbei.eventType);
@@ -614,7 +614,7 @@ int CMimAPI::MessageEventAdded(WPARAM wParam, LPARAM lParam) else {
char *szProto = GetContactProto(hContact);
if (PluginConfig.g_MetaContactsAvail && szProto && !strcmp(szProto, (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0))) {
- HCONTACT hSubconttact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
+ MCONTACT hSubconttact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, wParam, 0);
szProto = GetContactProto(hSubconttact);
}
if (szProto) {
diff --git a/plugins/TabSRMM/src/mim.h b/plugins/TabSRMM/src/mim.h index 51f70830db..c548d07c4f 100644 --- a/plugins/TabSRMM/src/mim.h +++ b/plugins/TabSRMM/src/mim.h @@ -107,14 +107,14 @@ public: { return db_get_dw(0, szModule, szSetting, uDefault); }
static DWORD __forceinline GetDword(const char *szSetting, DWORD uDefault)
{ return db_get_dw(0, SRMSGMOD_T, szSetting, uDefault); }
- static DWORD __forceinline GetDword(const HCONTACT hContact, const char *szSetting, DWORD uDefault)
+ static DWORD __forceinline GetDword(const MCONTACT hContact, const char *szSetting, DWORD uDefault)
{ return db_get_dw(hContact, SRMSGMOD_T, szSetting, uDefault); }
static int __forceinline GetByte(const char *szSetting, int uDefault)
{ return db_get_b(0, SRMSGMOD_T, szSetting, uDefault); }
static int __forceinline GetByte(const char *szModule, const char *szSetting, int uDefault)
{ return db_get_b(0, szModule, szSetting, uDefault); }
- static int __forceinline GetByte(const HCONTACT hContact, const char *szSetting, int uDefault)
+ static int __forceinline GetByte(const MCONTACT hContact, const char *szSetting, int uDefault)
{ return db_get_b(hContact, SRMSGMOD_T, szSetting, uDefault); }
static bool __forceinline GetBool(const char *szModule, const char *szSetting, bool uDefault)
@@ -182,9 +182,9 @@ public: void BroadcastMessage(UINT msg, WPARAM wParam, LPARAM lParam);
void BroadcastMessageAsync(UINT msg, WPARAM wParam, LPARAM lParam);
- INT_PTR AddWindow(HWND hWnd, HCONTACT h);
+ INT_PTR AddWindow(HWND hWnd, MCONTACT h);
INT_PTR RemoveWindow(HWND hWnd);
- HWND FindWindow(HCONTACT h) const;
+ HWND FindWindow(MCONTACT h) const;
static LPCTSTR StriStr(const TCHAR *szString, const TCHAR *szSearchFor);
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index 9cc6c056b2..4789769410 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -71,7 +71,7 @@ static void _clrMsgFilter(LPARAM lParam) m->wParam = 0;
}
-BOOL TSAPI IsUtfSendAvailable(HCONTACT hContact)
+BOOL TSAPI IsUtfSendAvailable(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -2547,7 +2547,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case HM_DBEVENTADDED:
if (!dat)
return 0;
- if ((HCONTACT)wParam != dat->hContact)
+ if ((MCONTACT)wParam != dat->hContact)
return 0;
if (dat->hContact == NULL)
return 0;
@@ -2693,7 +2693,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case DM_QUERYHCONTACT:
{
- HCONTACT *phContact = (HCONTACT*)lParam;
+ MCONTACT *phContact = (MCONTACT*)lParam;
if (phContact)
*phContact = dat->hContact;
}
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index 9a7f0217bc..63dd0cddd6 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -711,7 +711,7 @@ int TSAPI GetAvatarVisibility(HWND hwndDlg, TWindowData *dat) * checks, if there is a valid smileypack installed for the given protocol
*/
-int TSAPI CheckValidSmileyPack(const char *szProto, HCONTACT hContact)
+int TSAPI CheckValidSmileyPack(const char *szProto, MCONTACT hContact)
{
SMADD_INFO2 smainfo = {0};
@@ -894,7 +894,7 @@ void TSAPI FlashOnClist(HWND hwndDlg, TWindowData *dat, HANDLE hEvent, DBEVENTIN if ((GetForegroundWindow() != dat->pContainer->hwnd || dat->pContainer->hwndActive != hwndDlg) && !(dbei->flags & DBEF_SENT) && dbei->eventType == EVENTTYPE_MESSAGE && !(dat->dwFlagsEx & MWF_SHOW_FLASHCLIST)) {
ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
- cle.hContact = (HCONTACT)dat->hContact;
+ cle.hContact = (MCONTACT)dat->hContact;
cle.hDbEvent = hEvent;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
@@ -1214,7 +1214,7 @@ void TSAPI GetMYUIN(TWindowData *dat) static int g_IEViewAvail = -1;
static int g_HPPAvail = -1;
-UINT TSAPI GetIEViewMode(HWND hwndDlg, HCONTACT hContact)
+UINT TSAPI GetIEViewMode(HWND hwndDlg, MCONTACT hContact)
{
int iWantIEView = 0, iWantHPP = 0;
diff --git a/plugins/TabSRMM/src/msgdlgutils.h b/plugins/TabSRMM/src/msgdlgutils.h index 6e85f994ab..54ceba788b 100644 --- a/plugins/TabSRMM/src/msgdlgutils.h +++ b/plugins/TabSRMM/src/msgdlgutils.h @@ -40,7 +40,7 @@ int TSAPI MsgWindowUpdateMenu (TWindowData *dat, HMENU submenu, int menuID); int TSAPI MsgWindowMenuHandler (TWindowData *dat, int selection, int menuId);
int TSAPI GetAvatarVisibility (HWND hwndDlg, TWindowData *dat);
void TSAPI UpdateStatusBar (const TWindowData *dat);
-int TSAPI CheckValidSmileyPack (const char *szProto, HCONTACT hContact);
+int TSAPI CheckValidSmileyPack (const char *szProto, MCONTACT hContact);
TCHAR* TSAPI QuoteText (const TCHAR *text, int charsPerLine, int removeExistingQuotes);
void TSAPI UpdateReadChars (const TWindowData *dat);
void TSAPI ShowPicture (TWindowData *dat, BOOL showNewPic);
@@ -52,7 +52,7 @@ BOOL TSAPI DoRtfToTags (TCHAR * pszText, const TWindowData *dat); void TSAPI GetMYUIN (TWindowData *dat);
void TSAPI SetMessageLog (TWindowData *dat);
void TSAPI SwitchMessageLog (TWindowData *dat, int iMode);
-UINT TSAPI GetIEViewMode (HWND hwndDlg, HCONTACT hContact);
+UINT TSAPI GetIEViewMode (HWND hwndDlg, MCONTACT hContact);
void TSAPI FindFirstEvent (TWindowData *dat);
void TSAPI SaveSplitter (TWindowData *dat);
void TSAPI LoadSplitter (TWindowData *dat);
diff --git a/plugins/TabSRMM/src/msglog.cpp b/plugins/TabSRMM/src/msglog.cpp index d031bf322f..4458a32375 100644 --- a/plugins/TabSRMM/src/msglog.cpp +++ b/plugins/TabSRMM/src/msglog.cpp @@ -93,7 +93,7 @@ static HICON Logicons[NR_LOGICONS]; #define STREAMSTAGE_STOP 3
struct LogStreamData {
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -556,7 +556,7 @@ int DbEventIsForMsgWindow(DBEVENTINFO *dbei) return et && ( et->flags & DETF_MSGWINDOW );
}
-static char *Template_CreateRTFFromDbEvent(TWindowData *dat, HCONTACT hContact, HANDLE hDbEvent, int prefixParaBreak, LogStreamData *streamData)
+static char *Template_CreateRTFFromDbEvent(TWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, int prefixParaBreak, LogStreamData *streamData)
{
char *buffer, c;
TCHAR ci, cc;
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 2d54a4702a..55a37b8cdd 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -847,7 +847,7 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown && M.GetByte(SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItemUnknown, 1);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, SRMSGMOD, SRMSGSET_TYPING, defType))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -862,7 +862,7 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown)
db_set_b(0, SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItemUnknown, 0) ? 1 : 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
db_set_b(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0) ? 1 : 0));
diff --git a/plugins/TabSRMM/src/msgs.cpp b/plugins/TabSRMM/src/msgs.cpp index 974da99469..e6b2fe0ea7 100644 --- a/plugins/TabSRMM/src/msgs.cpp +++ b/plugins/TabSRMM/src/msgs.cpp @@ -133,7 +133,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) {
TContainerData *pContainer;
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (hwnd != NULL) {
TWindowData *dat = (TWindowData*)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (dat == NULL || (pContainer = dat->pContainer) == NULL)
@@ -150,7 +150,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) return 1;
}
else {
- SESSION_INFO *si = SM_FindSessionByHCONTACT((HCONTACT)wParam);
+ SESSION_INFO *si = SM_FindSessionByHCONTACT((MCONTACT)wParam);
if (si == NULL || si->hWnd == 0 || (pContainer = si->pContainer) == NULL || pContainer->hwndActive != si->hWnd)
return 1;
}
@@ -166,7 +166,7 @@ static INT_PTR SetStatusText(WPARAM wParam, LPARAM lParam) static INT_PTR SetUserPrefs(WPARAM wParam, LPARAM)
{
- HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, (HCONTACT)wParam);
+ HWND hWnd = WindowList_Find(PluginConfig.hUserPrefsWindowList, (MCONTACT)wParam);
if (hWnd) {
SetForegroundWindow(hWnd); // already open, bring it to front
return 0;
@@ -197,7 +197,7 @@ static INT_PTR GetMessageWindowFlags(WPARAM wParam, LPARAM lParam) HWND hwndTarget = (HWND)lParam;
if (hwndTarget == 0)
- hwndTarget = M.FindWindow((HCONTACT)wParam);
+ hwndTarget = M.FindWindow((MCONTACT)wParam);
if (hwndTarget == 0)
return 0;
@@ -234,7 +234,7 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam) TContainerData *pContainer = NULL;
if (wParam)
- hwnd = M.FindWindow((HCONTACT)wParam);
+ hwnd = M.FindWindow((MCONTACT)wParam);
else if (lParam)
hwnd = (HWND) lParam;
else
@@ -271,7 +271,7 @@ INT_PTR MessageWindowOpened(WPARAM wParam, LPARAM lParam) static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam)
{
- HCONTACT hContact = ((CLISTEVENT *) lParam)->hContact;
+ MCONTACT hContact = ((CLISTEVENT *) lParam)->hContact;
HWND hwndExisting = M.FindWindow(hContact);
if (hwndExisting != 0)
@@ -296,7 +296,7 @@ static INT_PTR ReadMessageCommand(WPARAM, LPARAM lParam) INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -315,7 +315,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) return 0;
}
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
@@ -355,7 +355,7 @@ INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam) INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TNewWindowData newData = { 0 };
int isSplit = 1;
@@ -371,7 +371,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) return 0;
}
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (szProto) {
if (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND)
@@ -391,7 +391,7 @@ INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam) SendMessage(hwnd, DM_ACTIVATEME, 0, 0); // ask the message window about its parent...
} else {
TCHAR szName[CONTAINER_NAMELEN + 1];
- GetContainerNameForContact((HCONTACT)wParam, szName, CONTAINER_NAMELEN);
+ GetContainerNameForContact((MCONTACT)wParam, szName, CONTAINER_NAMELEN);
TContainerData *pContainer = FindContainerByName(szName);
if (pContainer == NULL)
pContainer = CreateContainer(szName, FALSE, hContact);
@@ -465,7 +465,7 @@ int MyAvatarChanged(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
avatarCacheEntry *ace = (avatarCacheEntry *)lParam;
- HWND hwnd = M.FindWindow((HCONTACT)wParam);
+ HWND hwnd = M.FindWindow((MCONTACT)wParam);
if (wParam == 0) { // protocol picture has changed...
M.BroadcastMessage(DM_PROTOAVATARCHANGED, wParam, lParam);
@@ -660,7 +660,7 @@ int TSAPI ActivateExistingTab(TContainerData *pContainer, HWND hwndChild) * bPopupContainer: restore container if it was minimized, otherwise flash it...
*/
-HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent)
+HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, MCONTACT hContact, int isSend, const char *pszInitialText, BOOL bActivateTab, BOOL bPopupContainer, BOOL bWantPopup, HANDLE hdbEvent)
{
TCHAR newcontactname[128], tabtitle[128];
int newItem;
@@ -832,7 +832,7 @@ HWND TSAPI CreateNewTabForContact(TContainerData *pContainer, HCONTACT hContact, * a new (cloned) one.
*/
-TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, HCONTACT hContact)
+TContainerData* TSAPI FindMatchingContainer(const TCHAR *szName, MCONTACT hContact)
{
int iMaxTabs = M.GetDword("maxtabs", 0);
if (iMaxTabs > 0 && M.GetByte("limittabs", 0) && !_tcsncmp(szName, _T("default"), 6)) {
@@ -880,7 +880,7 @@ void TSAPI CreateImageList(BOOL bInitial) PluginConfig.g_IconTypingEvent = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
}
-int TABSRMM_FireEvent(HCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType)
+int TABSRMM_FireEvent(MCONTACT hContact, HWND hwnd, unsigned int type, unsigned int subType)
{
if (hContact == NULL || hwnd == NULL || !M.GetByte("_eventapi", 1))
return 0;
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 0412e44e76..27d245f8d2 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -194,7 +194,7 @@ struct TContainerData LONG uChildMinHeight;
int tBorder;
int tBorder_outer_left, tBorder_outer_right, tBorder_outer_top, tBorder_outer_bottom;
- HCONTACT hContactFrom;
+ MCONTACT hContactFrom;
BOOL isCloned;
HWND hwndStatus;
int statusBarHeight;
@@ -243,7 +243,7 @@ struct TWindowData HWND hwnd;
DWORD dwFlags;
DWORD dwFlagsEx;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
TCHAR szMyNickname[130];
TCHAR szStatusBar[100];
@@ -417,7 +417,7 @@ struct TIconDescW struct TNewWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
int isWchar;
LPCSTR szInitialText;
int iTabID;
@@ -895,7 +895,7 @@ struct TABSRMM_SessionInfo { typedef struct {
int cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
int uFlags; // should be same as input data unless 0, then it will be the actual type
HWND hwndWindow; //top level window for the contact or NULL if no window exists
int uState; // see window states
diff --git a/plugins/TabSRMM/src/nen.h b/plugins/TabSRMM/src/nen.h index f92f3308e9..b9207f8fc8 100644 --- a/plugins/TabSRMM/src/nen.h +++ b/plugins/TabSRMM/src/nen.h @@ -43,7 +43,7 @@ #define MODULE "tabSRMM_NEN"
-int tabSRMM_ShowPopup(HCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
+int tabSRMM_ShowPopup(MCONTACT hContact, HANDLE hDbEvent, WORD eventType, int windowOpen, TContainerData *pContainer, HWND hwndChild, const char *szProto, TWindowData *dat);
#define DEFAULT_COLBACK RGB(255,255,128)
#define DEFAULT_COLTEXT RGB(0,0,0)
@@ -143,7 +143,7 @@ struct EVENT_DATAT struct PLUGIN_DATAT
{
- HCONTACT hContact;
+ MCONTACT hContact;
UINT eventType;
NEN_OPTIONS *pluginOptions;
POPUPDATAT *pud;
diff --git a/plugins/TabSRMM/src/sendlater.cpp b/plugins/TabSRMM/src/sendlater.cpp index a7e2748315..38ab2fc16f 100644 --- a/plugins/TabSRMM/src/sendlater.cpp +++ b/plugins/TabSRMM/src/sendlater.cpp @@ -269,7 +269,7 @@ int _cdecl CSendLater::addStub(const char *szSetting, LPARAM lParam) * addJob() will deal with possible duplicates
* @param hContact HANDLE: contact's handle
*/
-void CSendLater::processSingleContact(const HCONTACT hContact)
+void CSendLater::processSingleContact(const MCONTACT hContact)
{
int iCount = db_get_dw(hContact, "SendLater", "count", 0);
@@ -291,7 +291,7 @@ void CSendLater::processContacts() {
if (m_fAvail && m_sendLaterContactList.getCount() != 0) {
for (int i=0; i < m_sendLaterContactList.getCount(); i++)
- processSingleContact((HCONTACT)m_sendLaterContactList[i]);
+ processSingleContact((MCONTACT)m_sendLaterContactList[i]);
m_sendLaterContactList.destroy();
}
@@ -310,7 +310,7 @@ void CSendLater::processContacts() */
int CSendLater::addJob(const char *szSetting, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
DBVARIANT dbv = {0};
char *szOrig_Utf = 0;
@@ -395,7 +395,7 @@ int CSendLater::addJob(const char *szSetting, LPARAM lParam) */
int CSendLater::sendIt(CSendLaterJob *job)
{
- HCONTACT hContact = job->hContact;
+ MCONTACT hContact = job->hContact;
time_t now = time(0);
DWORD dwFlags = 0;
DBVARIANT dbv = {0};
@@ -485,7 +485,7 @@ int CSendLater::sendIt(CSendLaterJob *job) * and new jobs are created.
*/
-void CSendLater::addContact(const HCONTACT hContact)
+void CSendLater::addContact(const MCONTACT hContact)
{
if (!m_fAvail)
return;
@@ -558,7 +558,7 @@ void CSendLater::qMgrUpdate(bool fReEnable) }
}
-LRESULT CSendLater::qMgrAddFilter(const HCONTACT hContact, const TCHAR* tszNick)
+LRESULT CSendLater::qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick)
{
LRESULT lr;
@@ -773,7 +773,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM TranslateDialogDefault(hwnd);
m_hwndList = ::GetDlgItem(m_hwndDlg, IDC_QMGR_LIST);
m_hwndFilter = ::GetDlgItem(m_hwndDlg, IDC_QMGR_FILTER);
- m_hFilter = (HCONTACT)(db_get_dw(0, SRMSGMOD_T, "qmgrFilterContact", 0));
+ m_hFilter = (MCONTACT)(db_get_dw(0, SRMSGMOD_T, "qmgrFilterContact", 0));
::SetWindowLongPtr(m_hwndList, GWL_STYLE, ::GetWindowLongPtr(m_hwndList, GWL_STYLE) | LVS_SHOWSELALWAYS);
::SendMessage(m_hwndList, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, LVS_EX_FULLROWSELECT|LVS_EX_GRIDLINES|LVS_EX_LABELTIP|LVS_EX_DOUBLEBUFFER);
@@ -832,7 +832,7 @@ INT_PTR CALLBACK CSendLater::DlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (HIWORD(wParam) == CBN_SELCHANGE && reinterpret_cast<HWND>(lParam) == m_hwndFilter) {
LRESULT lr = ::SendMessage(m_hwndFilter, CB_GETCURSEL, 0, 0);
if (lr != CB_ERR) {
- m_hFilter = (HCONTACT)::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0);
+ m_hFilter = (MCONTACT)::SendMessage(m_hwndFilter, CB_GETITEMDATA, lr, 0);
qMgrFillList();
}
break;
diff --git a/plugins/TabSRMM/src/sendlater.h b/plugins/TabSRMM/src/sendlater.h index 102701c5db..35b3ce6ac4 100644 --- a/plugins/TabSRMM/src/sendlater.h +++ b/plugins/TabSRMM/src/sendlater.h @@ -70,8 +70,8 @@ public: ~CSendLaterJob();
char szId[20]; // database key name (time stamp of original send)
- HCONTACT hContact; // original contact where the message has been assigned
- HCONTACT hTargetContact; // *real* contact (can be different for metacontacts, e.g).
+ MCONTACT hContact; // original contact where the message has been assigned
+ MCONTACT hTargetContact; // *real* contact (can be different for metacontacts, e.g).
HANDLE hProcess; // returned from the protocols sending service. needed to find it in the ACK handler
time_t created; // job was created at this time (important to kill jobs, that are too old)
time_t lastSent; // time at which the delivery was initiated. used to handle timeouts
@@ -110,7 +110,7 @@ public: bool processCurrentJob();
void processContacts();
int addJob(const char *szSetting, LPARAM lParam);
- void addContact(const HCONTACT hContact);
+ void addContact(const MCONTACT hContact);
HANDLE processAck(const ACKDATA *ack);
void invokeQueueMgrDlg();
@@ -118,7 +118,7 @@ public: static INT_PTR svcQMgr(WPARAM wParam, LPARAM lParam);
private:
- void processSingleContact(const HCONTACT hContact);
+ void processSingleContact(const MCONTACT hContact);
int sendIt(CSendLaterJob *job);
INT_PTR CALLBACK DlgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -127,7 +127,7 @@ private: void qMgrFillList(bool fClear = true);
void qMgrSetupColumns();
void qMgrSaveColumns();
- LRESULT qMgrAddFilter(const HCONTACT hContact, const TCHAR* tszNick);
+ LRESULT qMgrAddFilter(const MCONTACT hContact, const TCHAR* tszNick);
LIST<void> m_sendLaterContactList;
LIST<CSendLaterJob> m_sendLaterJobList;
@@ -141,7 +141,7 @@ private: HWND m_hwndDlg;
HWND m_hwndList, m_hwndFilter;
- HCONTACT m_hFilter; // contact handle to filter the qmgr list (0 = no filter, show all)
+ MCONTACT m_hFilter; // contact handle to filter the qmgr list (0 = no filter, show all)
LRESULT m_sel; // index of the combo box entry corresponding to the contact filter;
};
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 30b9d6a183..4d90ae3c42 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -127,7 +127,7 @@ entry_found: #define SPLIT_WORD_CUTOFF 20
-static int SendChunkW(WCHAR *chunk, HCONTACT hContact, DWORD dwFlags)
+static int SendChunkW(WCHAR *chunk, MCONTACT hContact, DWORD dwFlags)
{
int wLen = lstrlenW(chunk);
DWORD memRequired = (wLen + 1) * sizeof(WCHAR);
@@ -142,7 +142,7 @@ static int SendChunkW(WCHAR *chunk, HCONTACT hContact, DWORD dwFlags) return CallContactService(hContact, PSS_MESSAGE, dwFlags, (LPARAM)pBuf);
}
-static int SendChunkA(char *chunk, HCONTACT hContact, char *szSvc, DWORD dwFlags)
+static int SendChunkA(char *chunk, MCONTACT hContact, char *szSvc, DWORD dwFlags)
{
return(CallContactService(hContact, szSvc, dwFlags, (LPARAM)chunk));
}
@@ -154,7 +154,7 @@ static void DoSplitSendW(LPVOID param) WCHAR *wszSaved, savedChar;
int iCur = 0, iSavedCur = 0, i;
BOOL fSplitting = TRUE;
- HCONTACT hContact = job->hOwner;
+ MCONTACT hContact = job->hOwner;
DWORD dwFlags = job->dwFlags;
int chunkSize = job->chunkSize / 2;
char *szProto = GetContactProto(hContact);
@@ -229,7 +229,7 @@ static void DoSplitSendA(LPVOID param) char *szBegin, *szTemp, *szSaved, savedChar;
int iLen, iCur = 0, iSavedCur = 0, i;
BOOL fSplitting = TRUE;
- HCONTACT hContact = job->hOwner;
+ MCONTACT hContact = job->hOwner;
DWORD dwFlags = job->dwFlags;
int chunkSize = job->chunkSize;
@@ -322,7 +322,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) int iSendLength = getSendLength(iEntry, dat->sendMode);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
CContactCache *c = CContactCache::getContactCache(hContact);
@@ -339,7 +339,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) return 0;
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
doSendLater(iEntry, 0, hContact, false);
@@ -804,7 +804,7 @@ LRESULT SendQueue::WarnPendingJobs(unsigned int uNrMessages) *
* @return the index on success, -1 on failure
*/
-int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, HCONTACT hContact, bool fIsSendLater)
+int SendQueue::doSendLater(int iJobIndex, TWindowData *dat, MCONTACT hContact, bool fIsSendLater)
{
bool fAvail = sendLater->isAvail();
diff --git a/plugins/TabSRMM/src/sendqueue.h b/plugins/TabSRMM/src/sendqueue.h index 38ee818db2..2cccff76f7 100644 --- a/plugins/TabSRMM/src/sendqueue.h +++ b/plugins/TabSRMM/src/sendqueue.h @@ -44,7 +44,7 @@ struct SendJob char *szSendBuffer;
int iSendLength; // length of message in utf-8 octets (used to check maxlen)
int sendCount;
- HCONTACT hOwner;
+ MCONTACT hOwner;
HWND hwndOwner;
unsigned iStatus;
TCHAR szErrorMsg[128];
@@ -92,7 +92,7 @@ public: void recallFailed(const TWindowData *dat, int iEntry) const;
void showErrorControls(TWindowData *dat, const int showCmd) const;
int ackMessage(TWindowData *dat, WPARAM wParam, LPARAM lParam);
- int doSendLater(int iIndex, TWindowData *dat, HCONTACT hContact = 0, bool fIsSendLater = true);
+ int doSendLater(int iIndex, TWindowData *dat, MCONTACT hContact = 0, bool fIsSendLater = true);
/*
* static members
*/
diff --git a/plugins/TabSRMM/src/sidebar.cpp b/plugins/TabSRMM/src/sidebar.cpp index 3be0d53a5b..2855d35281 100644 --- a/plugins/TabSRMM/src/sidebar.cpp +++ b/plugins/TabSRMM/src/sidebar.cpp @@ -840,7 +840,7 @@ CSideBarButton* CSideBar::findSession(const TWindowData *dat) * @return CSideBarButtonItem*: pointer to the found item. Zero, if none was found
*/
-CSideBarButton* CSideBar::findSession(const HCONTACT hContact)
+CSideBarButton* CSideBar::findSession(const MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
diff --git a/plugins/TabSRMM/src/sidebar.h b/plugins/TabSRMM/src/sidebar.h index 74704ea82a..53f69f43eb 100644 --- a/plugins/TabSRMM/src/sidebar.h +++ b/plugins/TabSRMM/src/sidebar.h @@ -74,7 +74,7 @@ public: const bool isTopAligned() const { return(m_isTopAligned); }
const HWND getHwnd() const { return(m_hwnd); }
const UINT getID() const { return(m_id); }
- const HCONTACT getContactHandle() const { return(m_dat->hContact); }
+ const MCONTACT getContactHandle() const { return(m_dat->hContact); }
const TWindowData* getDat() const { return(m_dat); }
const TSideBarLayout* getLayout() const { return(m_sideBarLayout); }
@@ -194,7 +194,7 @@ private: void removeAll();
void Invalidate();
CSideBarButton* findSession(const TWindowData *dat);
- CSideBarButton* findSession(const HCONTACT hContact);
+ CSideBarButton* findSession(const MCONTACT hContact);
LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp index 292c70872e..76ce8aeaa0 100644 --- a/plugins/TabSRMM/src/srmm.cpp +++ b/plugins/TabSRMM/src/srmm.cpp @@ -178,7 +178,7 @@ int _DebugTraceA(const char *fmt, ...) * popup plugin.
*/
-int _DebugPopup(HCONTACT hContact, const TCHAR *fmt, ...)
+int _DebugPopup(MCONTACT hContact, const TCHAR *fmt, ...)
{
va_list va;
TCHAR debug[1024];
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 8c900a51d6..b32f300735 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -81,7 +81,7 @@ static int helpActive = 0; * templates
*/
-static void LoadTemplatesFrom(TTemplateSet *tSet, HCONTACT hContact, int rtl)
+static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl)
{
DBVARIANT dbv = {0};
int i;
diff --git a/plugins/TabSRMM/src/templates.h b/plugins/TabSRMM/src/templates.h index 505411aadc..3c73aa2966 100644 --- a/plugins/TabSRMM/src/templates.h +++ b/plugins/TabSRMM/src/templates.h @@ -31,18 +31,18 @@ struct TemplateEditorInfo int inEdit; // template currently in editor
BOOL updateInfo[TMPL_ERRMSG + 1]; // item states...
HWND hwndParent;
- HCONTACT hContact;
+ MCONTACT hContact;
};
struct TemplateEditorNew
{
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL rtl;
HWND hwndParent;
};
BOOL CALLBACK DlgProcTemplateEdit(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
-static void LoadTemplatesFrom(TTemplateSet *tSet, HCONTACT hContact, int rtl);
+static void LoadTemplatesFrom(TTemplateSet *tSet, MCONTACT hContact, int rtl);
void LoadDefaultTemplates();
#define DM_UPDATETEMPLATEPREVIEW (WM_USER + 50)
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index b636ae54e6..c495de5f87 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -231,7 +231,7 @@ void TSAPI FlashTrayIcon(HICON hIcon) * is deleted, if necessary.
*/
-void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus, WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu)
+void TSAPI AddContactToFavorites(MCONTACT hContact, const TCHAR *szNickname, const char *szProto, TCHAR *szStatus, WORD wStatus, HICON hIcon, BOOL mode, HMENU hMenu)
{
MENUITEMINFO mii = {0};
TCHAR szMenuEntry[80];
@@ -248,7 +248,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con szProto = GetContactProto(hContact);
if (szProto) {
if (wStatus == 0)
- wStatus = db_get_w((HCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
+ wStatus = db_get_w((MCONTACT)hContact, szProto, "Status", ID_STATUS_OFFLINE);
if (szStatus == NULL)
szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
}
@@ -273,7 +273,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con UINT uid = GetMenuItemID(hMenu, 0);
if (uid) {
DeleteMenu(hMenu, (UINT_PTR)0, MF_BYPOSITION);
- db_set_dw((HCONTACT)uid, SRMSGMOD_T, "isRecent", 0);
+ db_set_dw((MCONTACT)uid, SRMSGMOD_T, "isRecent", 0);
}
}
addnew:
@@ -324,7 +324,7 @@ void TSAPI AddContactToFavorites(HCONTACT hContact, const TCHAR *szNickname, con typedef struct _recentEntry {
DWORD dwTimestamp;
- HCONTACT hContact;
+ MCONTACT hContact;
} RCENTRY;
void TSAPI LoadFavoritesAndRecent()
@@ -336,7 +336,7 @@ void TSAPI LoadFavoritesAndRecent() if (recentEntries == NULL)
return;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (M.GetByte(hContact, "isFavorite", 0))
AddContactToFavorites(hContact, NULL, NULL, NULL, 0, 0, 1, PluginConfig.g_hMenuFavorites);
if ((dwRecent = M.GetDword(hContact, "isRecent", 0)) != 0 && iIndex < nen_options.wMaxRecent) {
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 937482a3ff..33b12efd28 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -89,7 +89,7 @@ static int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM return DefWindowProc(hWnd, message, wParam, lParam);
}
-void TN_TypingMessage(HCONTACT hContact, int iMode)
+void TN_TypingMessage(MCONTACT hContact, int iMode)
{
// hidden & ignored contacts check
if (db_get_b(hContact, "CList", "Hidden", 0) || (db_get_dw(hContact, "Ignore", "Mask1",0) & 1)) // 9 - online notification
@@ -363,7 +363,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
ppd.lchIcon = PluginConfig.g_buttonBarIcons[ICON_DEFAULT_TYPING];
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.PluginWindowProc = NULL;
ppd.PluginData = NULL;
PUAddPopupT(&ppd);
diff --git a/plugins/TabSRMM/src/userprefs.cpp b/plugins/TabSRMM/src/userprefs.cpp index ac362d93f1..5c3389748d 100644 --- a/plugins/TabSRMM/src/userprefs.cpp +++ b/plugins/TabSRMM/src/userprefs.cpp @@ -57,13 +57,13 @@ static int have_ieview = 0, have_hpp = 0; static INT_PTR CALLBACK DlgProcUserPrefs(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG: {
DWORD sCodePage;
int i;
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
DWORD maxhist = M.GetDword(hContact, "maxhist", 0);
BYTE bIEView = M.GetByte(hContact, "ieview", 0);
BYTE bHPP = M.GetByte(hContact, "hpplog", 0);
@@ -362,10 +362,10 @@ int TSAPI LoadLocalFlags(HWND hwnd, TWindowData *dat) */
static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
SendMessage(hwndDlg, WM_COMMAND, WM_USER + 200, 0);
@@ -457,14 +457,14 @@ static INT_PTR CALLBACK DlgProcUserPrefsLogOptions(HWND hwndDlg, UINT msg, WPARA */
INT_PTR CALLBACK DlgProcUserPrefsFrame(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
TCITEM tci;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
WindowList_Add(PluginConfig.hUserPrefsWindowList, hwndDlg, hContact);
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 2d6d5c7f5e..f3e8030417 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -617,7 +617,7 @@ int Utils::RTFColorToIndex(int iCol) */
INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)PUGetPluginData(hWnd);
+ MCONTACT hContact = (MCONTACT)PUGetPluginData(hWnd);
switch (message) {
case WM_COMMAND:
@@ -642,7 +642,7 @@ INT_PTR CALLBACK Utils::PopupDlgProcError(HWND hWnd, UINT message, WPARAM wParam * @param cs TContainerSettings* target structure
* @return 0 on success, 1 failure (blob does not exist OR is not a valid private setting structure
*/
-int Utils::ReadContainerSettingsFromDB(const HCONTACT hContact, TContainerSettings *cs, const char *szKey)
+int Utils::ReadContainerSettingsFromDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey)
{
CopyMemory(cs, &PluginConfig.globalContainerSettings, sizeof(TContainerSettings));
@@ -664,7 +664,7 @@ int Utils::ReadContainerSettingsFromDB(const HCONTACT hContact, TContainerSettin return 1;
}
-int Utils::WriteContainerSettingsToDB(const HCONTACT hContact, TContainerSettings *cs, const char *szKey)
+int Utils::WriteContainerSettingsToDB(const MCONTACT hContact, TContainerSettings *cs, const char *szKey)
{
::db_set_blob(hContact, SRMSGMOD_T, szKey ? szKey : CNT_KEYNAME, cs, sizeof(TContainerSettings));
return 0;
@@ -823,7 +823,7 @@ HICON Utils::iconFromAvatar(const TWindowData *dat) return hIcon;
}
-AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const HCONTACT hContact)
+AVATARCACHEENTRY* Utils::loadAvatarFromAVS(const MCONTACT hContact)
{
if (!ServiceExists(MS_AV_GETAVATARBITMAP))
return 0;
@@ -1336,7 +1336,7 @@ INT_PTR CALLBACK CWarning::dlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP if (!(m_dwFlags & MB_YESNO || m_dwFlags & MB_YESNOCANCEL))
::ShowWindow(hwnd, SW_SHOWNORMAL);
- WindowList_Add(hWindowList, hwnd, (HCONTACT)hwnd);
+ WindowList_Add(hWindowList, hwnd, (MCONTACT)hwnd);
}
return TRUE;
diff --git a/plugins/TabSRMM/src/utils.h b/plugins/TabSRMM/src/utils.h index 7e3b56b310..d2edbc9f6e 100644 --- a/plugins/TabSRMM/src/utils.h +++ b/plugins/TabSRMM/src/utils.h @@ -76,8 +76,8 @@ public: static void TSAPI RTF_ColorAdd (const TCHAR *tszColname, size_t length);
static void TSAPI CreateColorMap (TCHAR *Text);
static int TSAPI RTFColorToIndex (int iCol);
- static int TSAPI ReadContainerSettingsFromDB (const HCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
- static int TSAPI WriteContainerSettingsToDB (const HCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
+ static int TSAPI ReadContainerSettingsFromDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
+ static int TSAPI WriteContainerSettingsToDB (const MCONTACT hContact, TContainerSettings *cs, const char *szKey = 0);
static void TSAPI SettingsToContainer (TContainerData *pContainer);
static void TSAPI ContainerToSettings (TContainerData *pContainer);
static void TSAPI ReadPrivateContainerSettings (TContainerData *pContainer, bool fForce = false);
@@ -97,7 +97,7 @@ public: const TCHAR *tszFilename, bool fForceOverwrite);
static void TSAPI scaleAvatarHeightLimited (const HBITMAP hBm, double& dNewWidth, double& dNewHeight, const LONG maxHeight);
- static AVATARCACHEENTRY* TSAPI loadAvatarFromAVS (const HCONTACT hContact);
+ static AVATARCACHEENTRY* TSAPI loadAvatarFromAVS (const MCONTACT hContact);
static void TSAPI sanitizeFilename (wchar_t *tszFilename);
static void TSAPI ensureTralingBackslash (wchar_t *szPathname);
diff --git a/plugins/TipperYM/src/message_pump.cpp b/plugins/TipperYM/src/message_pump.cpp index 7bd6e7980b..0bf9936be4 100644 --- a/plugins/TipperYM/src/message_pump.cpp +++ b/plugins/TipperYM/src/message_pump.cpp @@ -48,14 +48,14 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) if (opt.bWaitForContent && IsContactTooltip(clcitex))
{
- char *szProto = GetContactProto((HCONTACT)clcitex->hItem);
+ char *szProto = GetContactProto((MCONTACT)clcitex->hItem);
if (!szProto) return false;
if (opt.bWaitForStatusMsg && !bStatusMsgReady)
{
- db_unset((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg");
- if (CanRetrieveStatusMsg((HCONTACT)clcitex->hItem, szProto) &&
- CallContactService((HCONTACT)clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
+ db_unset((MCONTACT)clcitex->hItem, MODULE, "TempStatusMsg");
+ if (CanRetrieveStatusMsg((MCONTACT)clcitex->hItem, szProto) &&
+ CallContactService((MCONTACT)clcitex->hItem, PSS_GETAWAYMSG, 0, 0))
{
if (WaitForContentTimerID)
KillTimer(0, WaitForContentTimerID);
@@ -69,7 +69,7 @@ bool NeedWaitForContent(CLCINFOTIPEX *clcitex) CallProtoService(szProto, PS_GETAVATARCAPS, AF_ENABLED, 0))
{
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)clcitex->hItem, "ContactPhoto", "File", &dbv))
+ if (!db_get_s((MCONTACT)clcitex->hItem, "ContactPhoto", "File", &dbv))
{
if (!strstr(dbv.pszVal, ".xml"))
{
@@ -153,7 +153,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTSTATUS:
{
- HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
+ MCONTACT hContact = (MCONTACT)hwndMsg.wParam;
TCHAR *swzMsg = (TCHAR *)hwndMsg.lParam;
if (opt.bWaitForContent && bStatusMsgReady == false && clcitex && clcitex->hItem == (HANDLE)hContact) {
@@ -163,7 +163,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
if (swzMsg) {
- db_set_ts((HCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
+ db_set_ts((MCONTACT)clcitex->hItem, MODULE, "TempStatusMsg", swzMsg);
mir_free(swzMsg);
}
@@ -185,7 +185,7 @@ unsigned int CALLBACK MessagePumpThread(void *param) }
case MUM_GOTAVATAR:
{
- HCONTACT hContact = (HCONTACT)hwndMsg.wParam;
+ MCONTACT hContact = (MCONTACT)hwndMsg.wParam;
if (opt.bWaitForContent && bAvatarReady == false && clcitex && clcitex->hItem == (HANDLE)hContact)
{
if (WaitForContentTimerID)
@@ -340,7 +340,7 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
PostMPMessage(MUM_GOTAVATAR, (WPARAM)hContact, 0);
return 0;
}
diff --git a/plugins/TipperYM/src/options.cpp b/plugins/TipperYM/src/options.cpp index ed49ccb962..07d22050da 100644 --- a/plugins/TipperYM/src/options.cpp +++ b/plugins/TipperYM/src/options.cpp @@ -2101,7 +2101,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETGREYOUTFLAGS, 0, 0);
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETLEFTMARGIN, 2, 0);
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && db_get_b(hContact, MODULE, "FavouriteContact", 0))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM)hItem, 1);
@@ -2118,7 +2118,7 @@ INT_PTR CALLBACK DlgProcFavouriteContacts(HWND hwndDlg, UINT msg, WPARAM wParam, BYTE isChecked;
int count = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
isChecked = (BYTE)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0);
diff --git a/plugins/TipperYM/src/popwin.cpp b/plugins/TipperYM/src/popwin.cpp index 0a7cfa7dce..92566cd72e 100644 --- a/plugins/TipperYM/src/popwin.cpp +++ b/plugins/TipperYM/src/popwin.cpp @@ -305,7 +305,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pwd->bIsTextTip = false;
pwd->iIndent = opt.iTextIndent;
pwd->iSidebarWidth= opt.iSidebarWidth;
- pwd->hContact = (HCONTACT)pwd->clcit.hItem;
+ pwd->hContact = (MCONTACT)pwd->clcit.hItem;
pwd->iIconIndex = (int)CallService(MS_CLIST_GETCONTACTICON, (WPARAM)pwd->hContact, 0);
// don't use stored status message
@@ -976,7 +976,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa break;
case PUM_SETSTATUSTEXT:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
db_set_ts(pwd->hContact, MODULE, "TempStatusMsg", (TCHAR *)lParam);
pwd->bIsPainted = false;
pwd->bNeedRefresh = true;
@@ -988,7 +988,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE;
case PUM_SHOWXSTATUS:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
// in case we have retrieve xstatus
pwd->bIsPainted = false;
SendMessage(hwnd, PUM_REFRESH_VALUES, TRUE, 0);
@@ -997,7 +997,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa return TRUE;
case PUM_SETAVATAR:
- if (pwd && (HCONTACT)wParam == pwd->hContact) {
+ if (pwd && (MCONTACT)wParam == pwd->hContact) {
pwd->bIsPainted = false;
SendMessage(hwnd, PUM_GETHEIGHT, 0, 0);
SendMessage(hwnd, PUM_CALCPOS, 0, 0);
@@ -1528,7 +1528,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa if (dwItems & TRAYTIP_NUMCONTACTS) {
int iCount = 0, iCountOnline = 0;
- for (HCONTACT hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
+ for (MCONTACT hContact = db_find_first(pa->szModuleName); hContact; hContact = db_find_next(hContact, pa->szModuleName)) {
if (db_get_w(hContact, pa->szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
iCountOnline++;
iCount++;
@@ -1646,7 +1646,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa bool bTitlePainted = false;
int iCount = 0, iCountOnline = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_b(hContact, MODULE, "FavouriteContact", 0)) {
char *proto = GetContactProto(hContact);
if (proto == NULL)
diff --git a/plugins/TipperYM/src/popwin.h b/plugins/TipperYM/src/popwin.h index 64e8df08ce..8ef1208a5f 100644 --- a/plugins/TipperYM/src/popwin.h +++ b/plugins/TipperYM/src/popwin.h @@ -107,7 +107,7 @@ typedef struct { HPEN hpenBorder, hpenDivider;
int iTitleHeight, iAvatarHeight, iIconsHeight, iTextHeight, iLabelWidth;
int iRealAvatarWidth, iRealAvatarHeight;
- HCONTACT hContact;
+ MCONTACT hContact;
int iIconIndex;
CLCINFOTIPEX clcit;
TCHAR swzTitle[TITLE_TEXT_LEN];
diff --git a/plugins/TipperYM/src/subst.cpp b/plugins/TipperYM/src/subst.cpp index 77938b3d62..441897d5f0 100644 --- a/plugins/TipperYM/src/subst.cpp +++ b/plugins/TipperYM/src/subst.cpp @@ -20,7 +20,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
-bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
buff[0] = 0;
@@ -63,7 +63,7 @@ bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, co return buff[0] ? true : false;
}
-bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di)
+bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di)
{
if (di.type == DIT_ALL)
return true;
@@ -127,7 +127,7 @@ void StripBBCodesInPlace(TCHAR *swzText) }
}
-DWORD LastMessageTimestamp(HCONTACT hContact)
+DWORD LastMessageTimestamp(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -153,7 +153,7 @@ void FormatTimestamp(DWORD ts, char *szFormat, TCHAR *buff, int bufflen) CallService(MS_DB_TIME_TIMESTAMPTOSTRINGT, (WPARAM)ts, (LPARAM)&dbt);
}
-bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen)
+bool Uid(MCONTACT hContact, char *szProto, TCHAR *buff, int bufflen)
{
char *tmpProto = NULL;
@@ -184,7 +184,7 @@ bool UidName(char *szProto, TCHAR *buff, int bufflen) return false;
}
-TCHAR *GetLastMessageText(HCONTACT hContact)
+TCHAR *GetLastMessageText(MCONTACT hContact)
{
HANDLE hDbEvent = db_event_last(hContact);
while (hDbEvent) {
@@ -210,7 +210,7 @@ TCHAR *GetLastMessageText(HCONTACT hContact) return 0;
}
-bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto)
+bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto)
{
if (opt.bGetNewStatusMsg)
{
@@ -242,7 +242,7 @@ bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto) return false;
}
-TCHAR *GetStatusMessageText(HCONTACT hContact)
+TCHAR *GetStatusMessageText(MCONTACT hContact)
{
TCHAR *swzMsg = 0;
DBVARIANT dbv;
@@ -250,7 +250,7 @@ TCHAR *GetStatusMessageText(HCONTACT hContact) char *szProto = GetContactProto(hContact);
if (szProto) {
if (!strcmp(szProto, szMetaModuleName))
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
else {
WORD wStatus = (int)CallProtoService(szProto, PS_GETSTATUS, 0, 0);
if (wStatus == ID_STATUS_OFFLINE)
@@ -286,7 +286,7 @@ TCHAR *GetStatusMessageText(HCONTACT hContact) return swzMsg;
}
-bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
+bool GetSysSubstText(MCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int bufflen)
{
if (!_tcscmp(swzRawSpec, _T("uid")))
{
@@ -361,7 +361,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff }
else if (!_tcscmp(swzRawSpec, _T("meta_subuid")))
{
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return Uid(hSubContact, 0, buff, bufflen);
@@ -369,7 +369,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff else if (!_tcscmp(swzRawSpec, _T("meta_subproto")))
{
// get protocol of active subcontact
- HCONTACT hSubContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (!hSubContact || (INT_PTR)hSubContact == CALLSERVICE_NOTFOUND)
return false;
return GetSysSubstText(hSubContact, _T("account"), buff, bufflen);
@@ -409,18 +409,18 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff DWORD dwLastTs, dwNewTs, dwRecountTs;
DWORD dwTime, dwDiff;
int iNumber = 1;
- HCONTACT hTmpContact = hContact;
+ MCONTACT hTmpContact = hContact;
char *szProto = GetContactProto(hContact);
if (szProto && !strcmp(szProto, szMetaModuleName))
{
iNumber = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0);
- hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, 0);
}
for (int i = 0; i < iNumber; i++) {
if (i > 0)
- hTmpContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ hTmpContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
dwRecountTs = db_get_dw(hTmpContact, MODULE, "LastCountTS", 0);
dwTime = (DWORD)time(0);
dwDiff = (dwTime - dwRecountTs);
@@ -474,7 +474,7 @@ bool GetSysSubstText(HCONTACT hContact, TCHAR *swzRawSpec, TCHAR *buff, int buff return false;
}
-bool GetSubstText(HCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
+bool GetSubstText(MCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bufflen)
{
TranslateFunc *transFunc = 0;
for (int i = 0; i < iTransFuncsCount; i++)
@@ -509,7 +509,7 @@ bool GetSubstText(HCONTACT hContact, const DISPLAYSUBST &ds, TCHAR *buff, int bu return false;
}
-bool GetRawSubstText(HCONTACT hContact, char *szRawSpec, TCHAR *buff, int bufflen)
+bool GetRawSubstText(MCONTACT hContact, char *szRawSpec, TCHAR *buff, int bufflen)
{
size_t lenght = strlen(szRawSpec);
for (size_t i = 0; i < lenght; i++)
@@ -541,7 +541,7 @@ bool GetRawSubstText(HCONTACT hContact, char *szRawSpec, TCHAR *buff, int buffle return false;
}
-bool ApplySubst(HCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
+bool ApplySubst(MCONTACT hContact, const TCHAR *swzSource, bool parseTipperVarsFirst, TCHAR *swzDest, int iDestLen)
{
// hack - allow empty strings before passing to variables (note - zero length strings return false after this)
if (swzDest && swzSource && _tcslen(swzSource) == 0) {
@@ -785,12 +785,12 @@ error: return true;
}
-bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetLabelText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzLabel, false, buff, bufflen);
}
-bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
+bool GetValueText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int bufflen)
{
return ApplySubst(hContact, di.swzValue, di.bParseTipperVarsFirst, buff, bufflen);
}
@@ -889,7 +889,7 @@ TCHAR *GetProtoExtraStatusMessage(char *szProto) db_free(&dbv);
if (ServiceExists(MS_VARS_FORMATSTRING)) {
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
char *proto = GetContactProto(hContact);
while(!proto) {
hContact = db_find_next(hContact);
@@ -957,7 +957,7 @@ TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szV return swzText;
}
-HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto)
+HICON GetJabberActivityIcon(MCONTACT hContact, char *szProto)
{
DBVARIANT dbv;
HICON hIcon = NULL;
diff --git a/plugins/TipperYM/src/subst.h b/plugins/TipperYM/src/subst.h index 05e62014da..53c2d9ab51 100644 --- a/plugins/TipperYM/src/subst.h +++ b/plugins/TipperYM/src/subst.h @@ -21,25 +21,25 @@ Boston, MA 02111-1307, USA. #ifndef _SUBST_INC
#define _SUBST_INC
-bool GetLabelText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool GetValueText(HCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetLabelText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
+bool GetValueText(MCONTACT hContact, const DISPLAYITEM &di, TCHAR *buff, int iBufflen);
-bool CheckContactType(HCONTACT hContact, const DISPLAYITEM &di);
+bool CheckContactType(MCONTACT hContact, const DISPLAYITEM &di);
void StripBBCodesInPlace(TCHAR *text);
// can be used with hContact == 0 to get uid for a given proto
bool UidName(char *szProto, TCHAR *buff, int bufflen);
-bool Uid(HCONTACT hContact, char *szProto, TCHAR *buff, int bufflen);
+bool Uid(MCONTACT hContact, char *szProto, TCHAR *buff, int bufflen);
// get info for status and tray tooltip
-bool DBGetContactSettingAsString(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-bool CanRetrieveStatusMsg(HCONTACT hContact, char *szProto);
+bool DBGetContactSettingAsString(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+bool CanRetrieveStatusMsg(MCONTACT hContact, char *szProto);
TCHAR *GetProtoStatusMessage(char *szProto, WORD status);
TCHAR *GetProtoExtraStatusTitle(char *szProto);
TCHAR *GetProtoExtraStatusMessage(char *szProto);
TCHAR *GetListeningTo(char *szProto);
TCHAR *GetJabberAdvStatusText(char *szProto, const char *szSlot, const char *szValue);
-HICON GetJabberActivityIcon(HCONTACT hContact, char *szProto);
+HICON GetJabberActivityIcon(MCONTACT hContact, char *szProto);
#endif
diff --git a/plugins/TipperYM/src/tipper.cpp b/plugins/TipperYM/src/tipper.cpp index 91ef259fa6..52ea8a876f 100644 --- a/plugins/TipperYM/src/tipper.cpp +++ b/plugins/TipperYM/src/tipper.cpp @@ -113,7 +113,7 @@ int EventDeleted(WPARAM wParam, LPARAM lParam) DBEVENTINFO dbei = { sizeof(dbei) };
if (!db_event_get((HANDLE)lParam, &dbei))
if (dbei.eventType == EVENTTYPE_MESSAGE)
- db_unset((HCONTACT)wParam, MODULE, "LastCountTS");
+ db_unset((MCONTACT)wParam, MODULE, "LastCountTS");
return 0;
}
diff --git a/plugins/TipperYM/src/translations.cpp b/plugins/TipperYM/src/translations.cpp index 5fcb384aa4..ad98d19a5e 100644 --- a/plugins/TipperYM/src/translations.cpp +++ b/plugins/TipperYM/src/translations.cpp @@ -61,14 +61,14 @@ void AddTranslation(DBVTranslation *newTrans) mir_free(szName);
}
-TCHAR *NullTranslation(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *NullTranslation(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
if (DBGetContactSettingAsString(hContact, szModuleName, szSettingName, buff, bufflen))
return buff;
return NULL;
}
-TCHAR *TimestampToShortDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToShortDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -81,7 +81,7 @@ TCHAR *TimestampToShortDate(HCONTACT hContact, const char *szModuleName, const c return buff;
}
-TCHAR *TimestampToLongDate(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToLongDate(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -94,7 +94,7 @@ TCHAR *TimestampToLongDate(HCONTACT hContact, const char *szModuleName, const ch return buff;
}
-TCHAR *TimestampToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -107,7 +107,7 @@ TCHAR *TimestampToTime(HCONTACT hContact, const char *szModuleName, const char * return buff;
}
-TCHAR *TimestampToTimeNoSecs(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeNoSecs(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ts == 0) return 0;
@@ -120,7 +120,7 @@ TCHAR *TimestampToTimeNoSecs(HCONTACT hContact, const char *szModuleName, const return buff;
}
-TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ts = db_get_dw(hContact, szModuleName, szSettingName, 0);
DWORD t = (DWORD)time(0);
@@ -140,7 +140,7 @@ TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, co return buff;
}
-TCHAR *SecondsToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *SecondsToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD diff = db_get_dw(hContact, szModuleName, szSettingName, 0);
int d = (diff / 60 / 60 / 24);
@@ -156,7 +156,7 @@ TCHAR *SecondsToTimeDifference(HCONTACT hContact, const char *szModuleName, cons return buff;
}
-TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
WORD wStatus = db_get_w(hContact, szModuleName, szSettingName, ID_STATUS_OFFLINE);
TCHAR *szStatus = pcli->pfnGetStatusModeDescription(wStatus, 0);
@@ -164,7 +164,7 @@ TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char return buff;
}
-TCHAR *ByteToYesNo(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToYesNo(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
if (!db_get(hContact, szModuleName, szSettingName, &dbv))
@@ -184,7 +184,7 @@ TCHAR *ByteToYesNo(HCONTACT hContact, const char *szModuleName, const char *szSe return 0;
}
-TCHAR *ByteToGender(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToGender(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
BYTE val = (BYTE)db_get_b(hContact, szModuleName, szSettingName, 0);
if (val == 'F')
@@ -198,7 +198,7 @@ TCHAR *ByteToGender(HCONTACT hContact, const char *szModuleName, const char *szS return buff;
}
-TCHAR *WordToCountry(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *WordToCountry(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
char *szCountryName = 0;
WORD cid = (WORD)db_get_w(hContact, szModuleName, szSettingName, (WORD)-1);
@@ -213,7 +213,7 @@ TCHAR *WordToCountry(HCONTACT hContact, const char *szModuleName, const char *sz return 0;
}
-TCHAR *DwordToIp(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *DwordToIp(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
DWORD ip = db_get_dw(hContact, szModuleName, szSettingName, 0);
if (ip) {
@@ -243,7 +243,7 @@ bool GetInt(const DBVARIANT &dbv, int *iVal) return false;
}
-TCHAR *DayMonthYearToDate(HCONTACT hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToDate(MCONTACT hContact, const char *szModuleName, const char *prefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -291,7 +291,7 @@ TCHAR *DayMonthYearToDate(HCONTACT hContact, const char *szModuleName, const cha return 0;
}
-TCHAR *DayMonthYearToAge(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthYearToAge(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -340,7 +340,7 @@ TCHAR *DayMonthYearToAge(HCONTACT hContact, const char *szModuleName, const char return 0;
}
-TCHAR *HoursMinutesSecondsToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesSecondsToTime(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -384,7 +384,7 @@ TCHAR *HoursMinutesSecondsToTime(HCONTACT hContact, const char *szModuleName, co return 0;
}
-TCHAR *HoursMinutesToTime(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *HoursMinutesToTime(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -420,7 +420,7 @@ TCHAR *HoursMinutesToTime(HCONTACT hContact, const char *szModuleName, const cha return 0;
}
-TCHAR *DmyToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DmyToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -522,7 +522,7 @@ TCHAR *DmyToTimeDifference(HCONTACT hContact, const char *szModuleName, const ch return 0;
}
-TCHAR *DayMonthToDaysToNextBirthday(HCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
+TCHAR *DayMonthToDaysToNextBirthday(MCONTACT hContact, const char *szModuleName, const char *szPrefix, TCHAR *buff, int bufflen)
{
DBVARIANT dbv;
char szSettingName[256];
@@ -575,7 +575,7 @@ TCHAR *DayMonthToDaysToNextBirthday(HCONTACT hContact, const char *szModuleName, }
-TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
TCHAR szDefaultName[1024];
CUSTOM_STATUS xstatus = {0};
@@ -615,7 +615,7 @@ TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, co return 0;
}
-TCHAR *TimezoneToTime(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *TimezoneToTime(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int timezone = db_get_b(hContact,szModuleName,szSettingName,256);
if (timezone==256 || (char)timezone==-100)
@@ -640,7 +640,7 @@ TCHAR *TimezoneToTime(HCONTACT hContact, const char *szModuleName, const char *s return buff;
}
-TCHAR *ByteToDay(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToDay(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iDay = db_get_w(hContact, szModuleName, szSettingName, -1);
if (iDay > -1 && iDay < 7)
@@ -653,7 +653,7 @@ TCHAR *ByteToDay(HCONTACT hContact, const char *szModuleName, const char *szSett return 0;
}
-TCHAR *ByteToMonth(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToMonth(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iMonth = db_get_w(hContact, szModuleName, szSettingName, 0);
if (iMonth > 0 && iMonth < 13)
@@ -666,7 +666,7 @@ TCHAR *ByteToMonth(HCONTACT hContact, const char *szModuleName, const char *szSe return 0;
}
-TCHAR *ByteToLanguage(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
+TCHAR *ByteToLanguage(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen)
{
int iLang = db_get_b(hContact, szModuleName, szSettingName, 0);
if (iLang)
diff --git a/plugins/TipperYM/src/translations.h b/plugins/TipperYM/src/translations.h index 7f09002bad..1ed2e8f53e 100644 --- a/plugins/TipperYM/src/translations.h +++ b/plugins/TipperYM/src/translations.h @@ -117,9 +117,9 @@ static char *months[12] = { void InitTranslations();
void DeinitTranslations();
-TCHAR *TimestampToTimeDifference(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *EmptyXStatusToDefaultName(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
-TCHAR *WordToStatusDesc(HCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *TimestampToTimeDifference(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *EmptyXStatusToDefaultName(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
+TCHAR *WordToStatusDesc(MCONTACT hContact, const char *szModuleName, const char *szSettingName, TCHAR *buff, int bufflen);
#endif
diff --git a/plugins/TooltipNotify/src/DbHelpers.cpp b/plugins/TooltipNotify/src/DbHelpers.cpp index 15261988de..3a891bfa5e 100644 --- a/plugins/TooltipNotify/src/DbHelpers.cpp +++ b/plugins/TooltipNotify/src/DbHelpers.cpp @@ -11,7 +11,7 @@ static int EnumSettingsProc1(const char *pszSetting, LPARAM lParam) return 0;
}
-bool ModuleSettingsExists(HCONTACT hContact, const char* pszModuleName)
+bool ModuleSettingsExists(MCONTACT hContact, const char* pszModuleName)
{
DBCONTACTENUMSETTINGS dbces = {0};
dbces.szModule = pszModuleName;
@@ -28,7 +28,7 @@ static int EnumSettingsProc2(const char *pszSetting, LPARAM lParam) return 0;
}
-void DeleteModuleSettings(HCONTACT hContact, const char* pszModuleName)
+void DeleteModuleSettings(MCONTACT hContact, const char* pszModuleName)
{
SettingsList settingsList;
DBCONTACTENUMSETTINGS dbces = {0};
@@ -48,7 +48,7 @@ void DeleteModuleSettings(HCONTACT hContact, const char* pszModuleName) }
-static int GetSetting(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+static int GetSetting(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
int rr = db_get(hContact, szModule, szSetting, dbv);
if (dbv->type != DBVT_UTF8)
@@ -57,7 +57,7 @@ static int GetSetting(HCONTACT hContact, const char *szModule, const char *szSet return 1;
}
-void RenameModule(HCONTACT hContact, const char* pszOldName, const char* pszNewName)
+void RenameModule(MCONTACT hContact, const char* pszOldName, const char* pszNewName)
{
SettingsList settingsList;
DBCONTACTENUMSETTINGS dbces = {0};
diff --git a/plugins/TooltipNotify/src/DbHelpers.h b/plugins/TooltipNotify/src/DbHelpers.h index d07b6cf26b..94677569a8 100644 --- a/plugins/TooltipNotify/src/DbHelpers.h +++ b/plugins/TooltipNotify/src/DbHelpers.h @@ -2,6 +2,6 @@ //
//////////////////////////////////////////////////////////////////////
-bool ModuleSettingsExists(HCONTACT hContact, const char* pszModuleName);
-void DeleteModuleSettings(HCONTACT hContact, const char* pszModuleName);
-void RenameModule(HCONTACT hContact, const char* pszOldName, const char* pszNewName);
+bool ModuleSettingsExists(MCONTACT hContact, const char* pszModuleName);
+void DeleteModuleSettings(MCONTACT hContact, const char* pszModuleName);
+void RenameModule(MCONTACT hContact, const char* pszOldName, const char* pszNewName);
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 2352c0749c..75210c8dec 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -162,7 +162,7 @@ int CTooltipNotify::ProtoContactIsTyping(WPARAM wParam, LPARAM lParam) {
STooltipData *pTooltipData = new STooltipData;
pTooltipData->uiTimeout = lParam*1000;
- pTooltipData->hContact = (HCONTACT)wParam;
+ pTooltipData->hContact = (MCONTACT)wParam;
pTooltipData->iStatus = ID_TTNTF_STATUS_TYPING;
EndNotifyAll();
@@ -211,7 +211,7 @@ int CTooltipNotify::ProtoAck(WPARAM wParam, LPARAM lParam) int CTooltipNotify::ContactSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if(hContact==NULL) return 0;
bool idle = false;
@@ -798,7 +798,7 @@ void CTooltipNotify::LoadList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown if (hItemUnknown && !m_sOptions.bIgnoreUnknown)
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM) hItemUnknown, 1);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem && !db_get_b(hContact, MODULENAME, CONTACT_IGNORE_TTNOTIFY, m_sOptions.bIgnoreNew))
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM) hItem, 1);
@@ -813,7 +813,7 @@ void CTooltipNotify::SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown if (hItemUnknown)
m_sOptions.bIgnoreUnknown = (BYTE) (SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItemUnknown, 0) ? 0 : 1);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem) {
BYTE bChecked = (BYTE) (SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItem, 0));
@@ -912,7 +912,7 @@ TCHAR *CTooltipNotify::StatusToString(int iStatus, TCHAR *szStatus, int iBufSize }
-TCHAR *CTooltipNotify::MakeTooltipString(HCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize)
+TCHAR *CTooltipNotify::MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize)
{
TCHAR szStatus[32];
StatusToString(iStatus, szStatus, SIZEOF(szStatus));
diff --git a/plugins/TooltipNotify/src/TooltipNotify.h b/plugins/TooltipNotify/src/TooltipNotify.h index 58ddbf9cb9..50f507da31 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.h +++ b/plugins/TooltipNotify/src/TooltipNotify.h @@ -67,7 +67,7 @@ private: CTooltip *pTooltip;
UINT_PTR idTimer;
UINT uiTimeout;
- HCONTACT hContact;
+ MCONTACT hContact;
int iStatus;
};
@@ -88,7 +88,7 @@ private: MapTimerIdProtoIter FindProtoByTimer(UINT idTimer);
template<typename T> TooltipsListIter FindBy(T STooltipData::* m, const T& value);
TCHAR *StatusToString(int iStatus, TCHAR *szStatus, int iBufSize);
- TCHAR *MakeTooltipString(HCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize);
+ TCHAR *MakeTooltipString(MCONTACT hContact, int iStatus, TCHAR *szString, int iBufSize);
void MigrateSettings();
void RegisterFonts();
void GetFont(int iStatus, LOGFONT* lf, COLORREF* text, COLORREF* bg);
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 8b35da97e9..c27e8a576d 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp +++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp @@ -44,18 +44,18 @@ static LIST<MsgWndData> gMsgWndList(10, HandleKeySortT); static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam)
{
WORD countryNumber;
- char *pszProto = GetContactProto((HCONTACT)wParam);
+ char *pszProto = GetContactProto((MCONTACT)wParam);
/* UserinfoEx */
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
return countryNumber;
/* fallback proto settings */
- if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "Country", 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, pszProto, "Country", 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "CompanyCountry", 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, pszProto, "CompanyCountry", 0))
return countryNumber;
return (INT_PTR)0xFFFF;
@@ -69,7 +69,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam) {
/* get contact's country */
int countryNumber = ServiceDetectContactOriginCountry(lParam, 0);
- ExtraIcon_SetIcon(hExtraIconSvc, (HCONTACT)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL);
+ ExtraIcon_SetIcon(hExtraIconSvc, (MCONTACT)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL);
}
static int OnCListApplyIcons(WPARAM wParam, LPARAM)
@@ -82,7 +82,7 @@ static int OnCListApplyIcons(WPARAM wParam, LPARAM) * message winsow status icon functions
***********************************************************************************************************/
-MsgWndData::MsgWndData(HWND hwnd, HCONTACT hContact)
+MsgWndData::MsgWndData(HWND hwnd, MCONTACT hContact)
{
m_hwnd = hwnd;
m_hContact = hContact;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.h b/plugins/UserInfoEx/src/Flags/svc_flags.h index 55d57a93ae..974fce9f62 100644 --- a/plugins/UserInfoEx/src/Flags/svc_flags.h +++ b/plugins/UserInfoEx/src/Flags/svc_flags.h @@ -33,11 +33,11 @@ extern bool g_eiGender, g_eiHome, g_eiEmail, g_eiPhone; struct MsgWndData
{
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
HWND m_hwnd;
int m_countryID;
- MsgWndData(HWND hwnd, HCONTACT hContact);
+ MsgWndData(HWND hwnd, MCONTACT hContact);
~MsgWndData();
void FlagsIconSet();
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index f23bf33c74..bd4396612d 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -255,9 +255,9 @@ MZodiac MAnnivDate::Zodiac() * param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetReminderOpts(HCONTACT hContact)
+int MAnnivDate::DBGetReminderOpts(MCONTACT hContact)
{
- if (!hContact || hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (!hContact || hContact == INVALID_CONTACT_ID)
return 1;
if (_wID == ANID_BIRTHDAY) {
@@ -288,9 +288,9 @@ int MAnnivDate::DBGetReminderOpts(HCONTACT hContact) * param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact)
+int MAnnivDate::DBWriteReminderOpts(MCONTACT hContact)
{
- if (!hContact || hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (!hContact || hContact == INVALID_CONTACT_ID)
return 1;
if (_wID == ANID_BIRTHDAY) {
@@ -338,7 +338,7 @@ int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact) * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
ZeroDate();
@@ -373,7 +373,7 @@ int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPC * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBWriteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
return
db_set_b(hContact, pszModule, szDay, (BYTE)Day()) ||
@@ -392,7 +392,7 @@ int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, L * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
+int MAnnivDate::DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
{
int ret;
@@ -415,7 +415,7 @@ int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, * pszSetting - key used to identify the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIs(hContact, pszModule, pszSetting, &dbv))
@@ -438,9 +438,9 @@ int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSe * pszSetting - key used to save the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
+ if (hContact == INVALID_CONTACT_ID || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
return 1;
DWORD dwStamp = DateStamp();
@@ -459,7 +459,7 @@ int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR psz * pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto)
+int MAnnivDate::DBGetBirthDate(MCONTACT hContact, LPSTR pszProto)
{
Clear();
@@ -484,7 +484,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto) // try to get setting from the default subcontact first
const int def = DB::MetaContact::SubDefNum(hContact);
if (def > -1 && def < INT_MAX) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -498,7 +498,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto) if (cnt < INT_MAX) {
for (int i = 0; i < cnt; i++) {
if (i != def) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -523,7 +523,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew)
+int MAnnivDate::DBMoveBirthDate(MCONTACT hContact, BYTE bOld, BYTE bNew)
{
Clear();
switch(bOld) {
@@ -558,7 +558,7 @@ int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteBirthDate(HCONTACT hContact)
+int MAnnivDate::DBWriteBirthDate(MCONTACT hContact)
{
LPCSTR pszModule = SvcReminderGetMyBirthdayModule();
@@ -601,7 +601,7 @@ int MAnnivDate::DBWriteBirthDate(HCONTACT hContact) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact)
+int MAnnivDate::DBDeleteBirthDate(MCONTACT hContact)
{
return DBDeleteDate(hContact, Module(), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
}
@@ -619,7 +619,7 @@ int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex)
+int MAnnivDate::DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex)
{
Clear();
@@ -651,7 +651,7 @@ int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex) * pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex)
+int MAnnivDate::DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex)
{
// date can only be written to db as anniversary if it is not marked as birthday
if (wIndex <= ANID_LAST && _wID != ANID_BIRTHDAY) {
@@ -675,7 +675,7 @@ int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex) * automatic backup service
***********************************************************************************************************/
-static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
+static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
TCHAR szMsg[MAXDATASIZE];
@@ -709,7 +709,7 @@ static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *p * return: 0 if backup was done, 1 otherwise
**/
-int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
+int MAnnivDate::BackupBirthday(MCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
{
if (!hContact)
return 1;
@@ -744,7 +744,7 @@ int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDo // allow backup only, if the custom setting differs from all meta subcontacts' protocol based settings, too.
for (int i = 0; (i < nSubContactCount) && bWantBackup && bIsMeta; i++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact && !mdbIgnore.DBGetDate(hSubContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
bWantBackup = bWantBackup
&& !IsEqual(mdbIgnore.SystemTime())
@@ -769,7 +769,7 @@ int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDo // update metasubcontacts
for (int i = 0; i < nSubContactCount; i++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL) {
if (!mdbIgnore.DBGetDate(hSubContact, DB::Contact::Proto(hSubContact), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
mdbIgnore.DBWriteDateStamp(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED);
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h index c2ebffbe89..bca4cd22c2 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.h +++ b/plugins/UserInfoEx/src/classMAnnivDate.h @@ -50,8 +50,8 @@ private: BYTE _bRemind; // per user setting for reminder (0 - disabled, 1 - use local offset, 2 - use global offset)
WORD _wDaysEarlier; // number of days to the anniversary the user wants to be reminded of this anniversary
- int DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
- int DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
+ int DBWriteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
public:
MAnnivDate();
@@ -93,23 +93,23 @@ public: void Clear();
// read date from database
- int DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
- int DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex);
- int DBGetBirthDate(HCONTACT hContact, LPSTR pszProto = NULL);
- int DBGetReminderOpts(HCONTACT hContact);
+ int DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex);
+ int DBGetBirthDate(MCONTACT hContact, LPSTR pszProto = NULL);
+ int DBGetReminderOpts(MCONTACT hContact);
// write date to database
- int DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex);
- int DBWriteBirthDate(HCONTACT hContact);
- int DBWriteReminderOpts(HCONTACT hContact);
+ int DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex);
+ int DBWriteBirthDate(MCONTACT hContact);
+ int DBWriteReminderOpts(MCONTACT hContact);
// delete date from database
- int DBDeleteBirthDate(HCONTACT hContact);
+ int DBDeleteBirthDate(MCONTACT hContact);
- int DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew);
- int BackupBirthday (HCONTACT hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL);
+ int DBMoveBirthDate(MCONTACT hContact, BYTE bOld, BYTE bNew);
+ int BackupBirthday (MCONTACT hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL);
// setting values
void SetDate(SYSTEMTIME &st);
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp index 190488b10a..65939b07ad 100644 --- a/plugins/UserInfoEx/src/classMTime.cpp +++ b/plugins/UserInfoEx/src/classMTime.cpp @@ -408,7 +408,7 @@ void MTime::GetLocalTime() ::GetLocalTime(&_SysTime);
}
-void MTime::GetLocalTime(HCONTACT hContact)
+void MTime::GetLocalTime(MCONTACT hContact)
{
TIME_ZONE_INFORMATION tzi;
@@ -423,9 +423,9 @@ void MTime::GetLocalTime(HCONTACT hContact) * read and write time to miranda's database
*********************************************/
-int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBGetStamp (MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
+ if (hContact == INVALID_CONTACT_ID || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
ZeroDate();
return 1;
}
@@ -440,9 +440,9 @@ int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) return 0;
}
-int MTime::DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
+ if (hContact == INVALID_CONTACT_ID || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
return 1;
return db_set_dw(hContact, pszModule, pszSetting, TimeStamp());
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index 1363a0247b..d0f02420fd 100644 --- a/plugins/UserInfoEx/src/classMTime.h +++ b/plugins/UserInfoEx/src/classMTime.h @@ -90,7 +90,7 @@ public: // get current time
void GetTimeUTC();
void GetLocalTime();
- void GetLocalTime(HCONTACT hContact);
+ void GetLocalTime(MCONTACT hContact);
// conversions
void UTCToLocal();
@@ -100,8 +100,8 @@ public: void TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi);
// read and write from and to db
- int DBGetStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
// operatoren
void operator = (DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp index c0041d26e5..f71a0ff047 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp +++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp @@ -140,7 +140,7 @@ void CAnnivEditCtrl::EnableCurrentItem() MAnnivDate *pCurrent = Current();
if (pCurrent) {
- HCONTACT hContact;
+ MCONTACT hContact;
PSGetContact(_hwndDlg, hContact);
@@ -233,7 +233,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex) // only delete values, but not the item
if (_pDates[wIndex]->Id() == ANID_BIRTHDAY) {
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
PSGetContact(_hwndDlg, hContact);
@@ -273,7 +273,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex) * param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto)
+INT_PTR CAnnivEditCtrl::DBGetBirthDay(MCONTACT hContact, LPCSTR pszProto)
{
MAnnivDate mdb;
@@ -290,7 +290,7 @@ INT_PTR CAnnivEditCtrl::DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto) * param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBGetAnniversaries(MCONTACT hContact)
{
MAnnivDate mda;
@@ -317,7 +317,7 @@ INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HCONTACT hContact) * param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBWriteBirthDay(MCONTACT hContact)
{
MAnnivDate *pmdb;
@@ -346,7 +346,7 @@ INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HCONTACT hContact) * param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(MCONTACT hContact)
{
const LPCSTR szPrefix[] = { "Reminder", "Offset", "Desc", "Day", "Month", "Year", "Stamp", "Date" };
CHAR szSet0[MAXSETTING];
@@ -526,7 +526,7 @@ void CAnnivEditCtrl::OnRemindEditChanged() **/
void CAnnivEditCtrl::OnReminderChecked()
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
int state;
TCHAR buf[6];
@@ -606,7 +606,7 @@ void CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt) }
}
-BOOL CAnnivEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CAnnivEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged;
bChanged = DBGetBirthDay(hContact, pszProto);
@@ -616,7 +616,7 @@ BOOL CAnnivEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) return bChanged;
}
-void CAnnivEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CAnnivEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
DBWriteBirthDay(hContact);
DBWriteAnniversaries(hContact);
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h index 932fe8f49f..96caf188fd 100644 --- a/plugins/UserInfoEx/src/ctrl_annivedit.h +++ b/plugins/UserInfoEx/src/ctrl_annivedit.h @@ -42,11 +42,11 @@ class CAnnivEditCtrl : public CBaseCtrl BYTE ItemValid(WORD wIndex) const;
BYTE CurrentItemValid() const;
- INT_PTR DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto);
- INT_PTR DBWriteBirthDay(HCONTACT hContact);
+ INT_PTR DBGetBirthDay(MCONTACT hContact, LPCSTR pszProto);
+ INT_PTR DBWriteBirthDay(MCONTACT hContact);
- INT_PTR DBGetAnniversaries(HCONTACT hContact);
- INT_PTR DBWriteAnniversaries(HCONTACT hContact);
+ INT_PTR DBGetAnniversaries(MCONTACT hContact);
+ INT_PTR DBWriteAnniversaries(MCONTACT hContact);
CAnnivEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
~CAnnivEditCtrl();
@@ -87,8 +87,8 @@ public: static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
virtual void Release();
- virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
};
#endif /* _UINFOEX_CTRLANNIVEDIT_H_ */
\ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp index 5e90f7f989..1151592fe5 100644 --- a/plugins/UserInfoEx/src/ctrl_base.cpp +++ b/plugins/UserInfoEx/src/ctrl_base.cpp @@ -219,7 +219,7 @@ void CCtrlList::OnReset() *
*
**/
-BOOL CCtrlList::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CCtrlList::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged = 0;
INT_PTR i;
@@ -238,7 +238,7 @@ BOOL CCtrlList::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
*
**/
-void CCtrlList::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CCtrlList::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
INT_PTR i;
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h index 20ef261090..22aacd2baf 100644 --- a/plugins/UserInfoEx/src/ctrl_base.h +++ b/plugins/UserInfoEx/src/ctrl_base.h @@ -163,7 +163,7 @@ public: * @retval TRUE - the content was updated
* @retval FALSE - content not updated
**/
- virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) { return 0; }
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto) { return 0; }
/**
* This is a pure virtual method, which is the common interface
@@ -174,7 +174,7 @@ public: *
* @return nothing
**/
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto) { }
+ virtual void OnApply(MCONTACT hContact, LPCSTR pszProto) { }
/**
* This is a pure virtual method, which is called to set the
@@ -220,8 +220,8 @@ public: void Release();
void OnReset();
- BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
- void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ void OnApply(MCONTACT hContact, LPCSTR pszProto);
void OnChangedByUser(WORD idCtrl, WORD wChangedMsg);
INT_PTR OnSetTextColour(HWND hCtrl, HDC hdc);
};
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp index 42a6d6df00..b32ea49ee0 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.cpp +++ b/plugins/UserInfoEx/src/ctrl_combo.cpp @@ -148,7 +148,7 @@ void CCombo::Release() *
* @return nothing
**/
-BOOL CCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged && _pList != NULL)
{
@@ -196,7 +196,7 @@ BOOL CCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_combo.h b/plugins/UserInfoEx/src/ctrl_combo.h index ad5ea0aa54..b2e2dc1ecf 100644 --- a/plugins/UserInfoEx/src/ctrl_combo.h +++ b/plugins/UserInfoEx/src/ctrl_combo.h @@ -61,8 +61,8 @@ public: static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount);
virtual void Release();
- virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
};
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp index 12286d6f71..7739fc9bf0 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.cpp +++ b/plugins/UserInfoEx/src/ctrl_contact.cpp @@ -690,7 +690,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L cbi.dwID = 0;
if (DialogBoxParam(ghInst, MAKEINTRESOURCE(dlgID), GetParent(hwnd), dlgProc, (LPARAM)&cbi) == IDOK) {
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
SendMessage(hDlgDetails, PSM_GETCONTACT, NULL, (LPARAM)&hContact);
if (hContact) cbi.wFlags |= CTRLF_HASCUSTOM;
@@ -748,7 +748,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L }
if (DialogBoxParam(ghInst, MAKEINTRESOURCE(dlgID), GetParent(hwnd), dlgProc, (LPARAM)&cbi) == IDOK) {
- HCONTACT hContact;
+ MCONTACT hContact;
SendMessage(hDlgDetails, PSM_GETCONTACT, NULL, (LPARAM)&hContact);
if (hContact) cbi.wFlags |= CTRLF_HASCUSTOM;
@@ -826,7 +826,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L {
TCHAR szVal[MAXDATASIZE] = { 0 };
int ccVal;
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hDlgDetails = GetParent(GetParent(hwnd));
EnableWindow(cbex->hBtnDel, GetWindowTextLength(cbex->hEdit) > 0);
@@ -1124,7 +1124,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L **/
case CBEXM_ENABLEITEM:
if (cbex->iSelectedItem >= 0 && cbex->iSelectedItem < cbex->numItems) {
- HCONTACT hContact;
+ MCONTACT hContact;
BYTE bEnabled;
PSGetContact(GetParent(hwnd), hContact);
@@ -1277,7 +1277,7 @@ int CtrlContactAddItemFromDB( HWND hCtrl,
LPCSTR szIcon,
LPTSTR szItem,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szSettingVal)
@@ -1330,7 +1330,7 @@ int CtrlContactAddMyItemsFromDB( HWND hCtrl,
LPCSTR szIcon,
WORD wForcedFlags,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
@@ -1406,7 +1406,7 @@ int CtrlContactAddMyItemsFromDB( **/
int CtrlContactWriteItemToDB(
HWND hCtrl,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR pszSetting)
@@ -1448,7 +1448,7 @@ int CtrlContactWriteItemToDB( int CtrlContactWriteMyItemsToDB(
HWND hCtrl,
int iFirstItem,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 92cc6894ff..20a5f23902 100644 --- a/plugins/UserInfoEx/src/ctrl_contact.h +++ b/plugins/UserInfoEx/src/ctrl_contact.h @@ -69,9 +69,9 @@ typedef struct TComboExItem int CtrlContactLoadModule();
int CtrlContactUnLoadModule();
-int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
-int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
-int CtrlContactWriteItemToDB(HWND hCtrl, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
-int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
+int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactWriteItemToDB(HWND hCtrl, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
+int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
#endif /* _UI_CTRL_INCLUDE_ */
\ No newline at end of file diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp index c87490dba0..1b4ecac93e 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.cpp +++ b/plugins/UserInfoEx/src/ctrl_edit.cpp @@ -105,7 +105,7 @@ void CEditCtrl::OnReset() *
* @return nothing
**/
-BOOL CEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged)
{
@@ -165,7 +165,7 @@ BOOL CEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_edit.h b/plugins/UserInfoEx/src/ctrl_edit.h index 4e569645ba..2166d74831 100644 --- a/plugins/UserInfoEx/src/ctrl_edit.h +++ b/plugins/UserInfoEx/src/ctrl_edit.h @@ -57,8 +57,8 @@ public: virtual void Release();
virtual void OnReset();
- virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
void OpenUrl();
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp index d98c591f34..dfa4084a83 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp @@ -157,7 +157,7 @@ void CTzCombo::Release() *
* @return _Flags.B.hasChanged member
**/
-BOOL CTzCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CTzCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged) {
//use new core tz interface to change the cbbox
@@ -198,7 +198,7 @@ BOOL CTzCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CTzCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CTzCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.h b/plugins/UserInfoEx/src/ctrl_tzcombo.h index 487792ebd5..08e5ef092d 100644 --- a/plugins/UserInfoEx/src/ctrl_tzcombo.h +++ b/plugins/UserInfoEx/src/ctrl_tzcombo.h @@ -46,8 +46,8 @@ public: virtual void Release();
// virtual void OnReset() {};
- virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
void GetTime(LPTSTR szTime, WORD cchTime);
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index d451d11ad5..42e7d3e525 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -91,12 +91,12 @@ class CAnnivList struct CItemData
{
- HCONTACT _hContact;
+ MCONTACT _hContact;
MAnnivDate* _pDate;
WORD _wDaysBefore;
BYTE _wReminderState;
- CItemData(HCONTACT hContact, MAnnivDate &date)
+ CItemData(MCONTACT hContact, MAnnivDate &date)
{
_hContact = hContact;
_wReminderState = date.RemindOption();
@@ -740,7 +740,7 @@ class CAnnivList * @retval TRUE if successful
* @retval FALSE if failed
**/
- BYTE AddRow(HCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
+ BYTE AddRow(MCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
{
TCHAR szText[MAX_PATH];
int diff, iItem = -1;
@@ -826,7 +826,7 @@ class CAnnivList mtNow.GetLocalTime();
// insert the items into the list
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
{
// ignore meta subcontacts here, as they are not interesting.
if (!DB::MetaContact::IsSub(hContact)) {
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 470d988a1f..3df5b58e95 100644 --- a/plugins/UserInfoEx/src/dlg_msgbox.cpp +++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp @@ -613,7 +613,7 @@ static LRESULT CALLBACK PopupProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP /**
* This is the service function for external plugins to use the nice messagebox
*
-* @param wParam - HCONTACT hContact which can display an avatar for popups
+* @param wParam - MCONTACT hContact which can display an avatar for popups
* @param lParam - MSGBOX structure holding parameters
*
* @return The function returns the ID of the clicked button (IDOK, IDCANCEL, ...)
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index 1efc6eb034..a8ec59ab5c 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -253,7 +253,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) myGlobals.WantAeroAdaption = db_get_b(NULL, MODNAME, SET_PROPSHEET_AEROADAPTION, TRUE);
// allow only one dialog per user
- if (HWND hWnd = WindowList_Find(ghWindowList, (HCONTACT)wParam)) {
+ if (HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)wParam)) {
SetForegroundWindow(hWnd);
SetFocus(hWnd);
return 0;
@@ -285,7 +285,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) ImageList_AddIcon(psh._hImages, hDefIcon);
// init contact
- psh._hContact = (HCONTACT)wParam;
+ psh._hContact = (MCONTACT)wParam;
if (psh._hContact == NULL) {
// mark owner icons as initiated
bInitIcons |= INIT_ICONS_OWNER;
@@ -294,7 +294,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) }
else {
// get contact's protocol
- psh._pszPrefix = psh._pszProto = DB::Contact::Proto((HCONTACT)wParam);
+ psh._pszPrefix = psh._pszProto = DB::Contact::Proto((MCONTACT)wParam);
if (psh._pszProto == NULL) {
MsgErr(NULL, LPGENT("Could not find contact's protocol. Maybe it is not active!"));
return 1;
@@ -313,12 +313,12 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) // metacontacts sub pages
if (bScanMetaSubContacts) {
- int numSubs = DB::MetaContact::SubCount((HCONTACT)wParam);
+ int numSubs = DB::MetaContact::SubCount((MCONTACT)wParam);
psh._dwFlags &= ~PSF_PROTOPAGESONLY_INIT;
psh._dwFlags |= PSF_PROTOPAGESONLY;
for (int i = 0; i < numSubs; i++) {
- psh._hContact = DB::MetaContact::Sub((HCONTACT)wParam, i);
+ psh._hContact = DB::MetaContact::Sub((MCONTACT)wParam, i);
psh._nSubContact = i;
if (psh._hContact) {
psh._pszProto = DB::Contact::Proto(psh._hContact);
@@ -326,7 +326,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam) NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
}
}
- psh._hContact = (HCONTACT)wParam;
+ psh._hContact = (MCONTACT)wParam;
}
// sort the pages by the position read from database
@@ -409,7 +409,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) **/
static int OnDeleteContact(WPARAM wParam, LPARAM lParam)
{
- HWND hWnd = WindowList_Find(ghWindowList, (HCONTACT)wParam);
+ HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)wParam);
if (hWnd != NULL)
DestroyWindow(hWnd);
return 0;
@@ -986,15 +986,15 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar : pPs->pTree->CurrentItem();
// prefer to return the contact accociated with the current page
- if (pti && pti->hContact() != (HCONTACT)INVALID_HANDLE_VALUE) {
- *(HCONTACT*)lParam = pti->hContact();
+ if (pti && pti->hContact() != INVALID_CONTACT_ID) {
+ *(MCONTACT*)lParam = pti->hContact();
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, (LONG_PTR)pti->hContact());
return TRUE;
}
// return contact who owns the details dialog
- if (pPs->hContact != (HCONTACT)INVALID_HANDLE_VALUE) {
- *(HCONTACT*)lParam = pPs->hContact;
+ if (pPs->hContact != INVALID_CONTACT_ID) {
+ *(MCONTACT*)lParam = pPs->hContact;
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, (LONG_PTR)pPs->hContact);
return TRUE;
}
@@ -1356,13 +1356,13 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/
case HM_SETTING_CHANGED:
if (!(pPs->dwFlags & PSF_LOCKED)) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact != pPs->hContact) {
if (!myGlobals.szMetaProto)
break;
- if (pPs->hContact != (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL))
+ if (pPs->hContact != (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL))
break;
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
break;
@@ -1593,7 +1593,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar // count valid subcontacts whose protocol supports the PSS_GETINFO service to update the information
int numSubs = DB::MetaContact::SubCount(pPs->hContact);
for (int i = 0; i < numSubs; i++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(pPs->hContact, i);
+ MCONTACT hSubContact = DB::MetaContact::Sub(pPs->hContact, i);
if (hSubContact != NULL) {
if (ProtoServiceExists(DB::Contact::Proto(hSubContact), PSS_GETINFO)) {
pPs->infosUpdated = (TAckInfo*)mir_realloc(pPs->infosUpdated, sizeof(TAckInfo)* (pPs->nSubContacts + 1));
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h index 88e9f4a643..8e28a102cc 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.h +++ b/plugins/UserInfoEx/src/dlg_propsheet.h @@ -40,7 +40,7 @@ class CPsTreeItem DWORD _dwFlags; // some flags
int _iPosition; // initiating position if custom (used for sorting)
LPARAM _initParam;
- HCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
+ MCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
LPCSTR _pszProto; // protocol the page is accociated with (is the contact's protocol if _hContact is not NULL)
LPCSTR _pszPrefix; // pointer to the dialog owning contact's protocol
@@ -68,7 +68,7 @@ public: __inline LPCSTR Proto() const { return _pszProto; };
__inline LPTSTR Label() const { return _ptszLabel; };
void Rename( const LPTSTR pszLabel );
- __inline HCONTACT hContact() const { return _hContact; };
+ __inline MCONTACT hContact() const { return _hContact; };
__inline HWND Wnd() const { return _hWnd; };
__inline int DlgId() const { return _idDlg; };
@@ -219,7 +219,7 @@ class CPsHdr {
public:
DWORD _dwSize; // size of this class in bytes
- HCONTACT _hContact; // handle to the owning contact
+ MCONTACT _hContact; // handle to the owning contact
LPCSTR _pszProto; // owning contact's protocol
LPCSTR _pszPrefix; // name prefix for treeitem settings
CPsTreeItem** _pPages; // the pages
@@ -238,7 +238,7 @@ public: struct TAckInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPINT acks;
int count;
};
@@ -246,7 +246,7 @@ struct TAckInfo struct TPropSheet
{
// dialogs owner
- HCONTACT hContact;
+ MCONTACT hContact;
CHAR pszProto[MAXMODULELABELLENGTH];
HANDLE hProtoAckEvent; // eventhook for protocol acks
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 023f551096..67681553b8 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -39,7 +39,7 @@ CExImContactBase::CExImContactBase() _pszUIDKey = NULL;
_dbvUIDHash = NULL;
ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_isNewContact = FALSE;
}
@@ -69,7 +69,7 @@ CExImContactBase::~CExImContactBase() * param: hContact - handle to contact whose information to read
* return: TRUE if successful or FALSE otherwise
**/
-BYTE CExImContactBase::fromDB(HCONTACT hContact)
+BYTE CExImContactBase::fromDB(MCONTACT hContact)
{
BYTE ret = FALSE;
BYTE isChatRoom = FALSE;
@@ -224,14 +224,14 @@ BYTE CExImContactBase::fromIni(LPSTR& row) * param: hMetaContact - a meta contact to add this contact to
* return: handle of the contact if successful
**/
-HCONTACT CExImContactBase::toDB()
+MCONTACT CExImContactBase::toDB()
{
// create new contact if none exists
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
+ if (_hContact == INVALID_CONTACT_ID && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
PROTOACCOUNT* pszAccount = 0;
if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) {
//account does not exist
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
if (!IsAccountEnabled(pszAccount)) {
;
@@ -239,17 +239,17 @@ HCONTACT CExImContactBase::toDB() // create new contact
_hContact = DB::Contact::Add();
if (!_hContact) {
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// Add the protocol to the new contact
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)_hContact, (LPARAM)_pszProto)) {
DB::Contact::Delete(_hContact);
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// write uid to protocol module
if (db_set(_hContact, _pszProto, _pszUIDKey, &_dbvUID)) {
DB::Contact::Delete(_hContact);
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// write nick and display name
if (_pszNick) db_set_utf(_hContact, _pszProto, SET_CONTACT_NICK, _pszNick);
@@ -473,7 +473,7 @@ BYTE CExImContactBase::isMeta() const return DB::Module::IsMeta(_pszProto);
}
-BYTE CExImContactBase::isHandle(HCONTACT hContact)
+BYTE CExImContactBase::isHandle(MCONTACT hContact)
{
LPCSTR pszProto;
DBVARIANT dbv;
@@ -521,9 +521,9 @@ BYTE CExImContactBase::isHandle(HCONTACT hContact) * param: none
* return: handle if successful, INVALID_HANDLE_VALUE otherwise
**/
-HCONTACT CExImContactBase::findHandle()
+MCONTACT CExImContactBase::findHandle()
{
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (isHandle(hContact)) {
_hContact = hContact;
_isNewContact = FALSE;
@@ -531,5 +531,5 @@ HCONTACT CExImContactBase::findHandle() }
}
_isNewContact = TRUE;
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index e248c1d2a7..90e080b34e 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -37,17 +37,17 @@ protected: LPSTR _pszUIDKey;
DWORD _dbvUIDHash;
DBVARIANT _dbvUID;
- HCONTACT _hContact;
+ MCONTACT _hContact;
BYTE _isNewContact; // is this contact a new one?
- HCONTACT findHandle();
+ MCONTACT findHandle();
public:
CExImContactBase();
~CExImContactBase();
__inline DBVARIANT& uid() { return _dbvUID; }
- __inline HCONTACT handle() const { return _hContact; }
+ __inline MCONTACT handle() const { return _hContact; }
__inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; }
__inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; }
@@ -72,16 +72,16 @@ public: mir_free(temp);
}
- BYTE isHandle(HCONTACT hContact);
+ BYTE isHandle(MCONTACT hContact);
BYTE isMeta() const;
LPSTR uid2String(BYTE bPrependType);
- BYTE fromDB(HCONTACT hContact);
+ BYTE fromDB(MCONTACT hContact);
BYTE fromIni(LPSTR& row);
- HCONTACT toDB();
+ MCONTACT toDB();
void toIni(FILE* file, int modCount);
- BYTE operator = (HCONTACT hContact) { return fromDB(hContact); }
+ BYTE operator = (MCONTACT hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 1bef0889b8..de9db38883 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -207,7 +207,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) if (!xmlfile)
return ERROR_INVALID_PARAMS;
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (_hContact == INVALID_CONTACT_ID)
return ERROR_INVALID_CONTACT;
if (!CreateXmlElement())
@@ -219,7 +219,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) const int cnt = DB::MetaContact::SubCount(_hContact);
const int def = DB::MetaContact::SubDefNum(_hContact);
- HCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
+ MCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
// export default subcontact
if (hSubContact && vContact.fromDB(hSubContact))
@@ -488,7 +488,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) // delete last contact
db_free(&_dbvUID);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_xmlNode = xContact;
MIR_FREE(_pszAMPro); ampro(xContact->Attribute("ampro"));
@@ -510,8 +510,8 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) CExImContactXML vSub(_pXmlFile);
if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE && vSub.handle() != (HCONTACT)INVALID_HANDLE_VALUE) {
- HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ if (_hContact == INVALID_CONTACT_ID && vSub.handle() != INVALID_CONTACT_ID) {
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -520,7 +520,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) }
}
// if no handle was found, this is a new meta contact
- _isNewContact = _hContact == (HCONTACT)INVALID_HANDLE_VALUE;
+ _isNewContact = _hContact == INVALID_CONTACT_ID;
}
// entry is a default contact
else {
@@ -588,7 +588,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) int CExImContactXML::ImportContact()
{
// create the contact if not yet exists
- if (toDB() != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (toDB() != INVALID_CONTACT_ID) {
_hEvent = NULL;
// count settings and events and init progress dialog
@@ -610,7 +610,7 @@ int CExImContactXML::ImportContact() LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
return ERROR_ABORTED;
@@ -674,9 +674,9 @@ int CExImContactXML::Import(BYTE keepMetaSubContact) return result;
// convert default subcontact to metacontact
- _hContact = (HCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
+ _hContact = (MCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
if (_hContact == NULL) {
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
return ERROR_CONVERT_METACONTACT;
}
@@ -736,7 +736,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) return err;
// check if contact is subcontact of the desired meta contact
- if ((HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
+ if ((MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
// add contact to the metacontact (this service returns TRUE if successful)
err = CallService(MS_MC_ADDTOMETA, (WPARAM)_hContact, (LPARAM)pMetaContact->handle());
if (err == FALSE) {
@@ -753,7 +753,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) MIR_FREE(ptszMetaNick);
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
return ERROR_ADDTO_METACONTACT;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp index 1c552187e2..f6b36c931f 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp @@ -292,7 +292,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar // module must exist in at least one contact
if (pDat->ExImContact->Typ != EXIM_CONTACT) // TRUE = All Contacts
{
- HCONTACT hContact;
+ MCONTACT hContact;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
{
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp index acd8410463..458e41d901 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp @@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * file - file to write the settings to
* return nothing
**/
-static void ExportModule(HCONTACT hContact, LPCSTR pszModule, FILE* file)
+static void ExportModule(MCONTACT hContact, LPCSTR pszModule, FILE* file)
{
DB::CEnumList Settings;
@@ -126,7 +126,7 @@ static void ExportModule(HCONTACT hContact, LPCSTR pszModule, FILE* file) * pModules - module to export, NULL to export all modules of a contact
* file - ini file to write the contact to
**/
-static BYTE ExportContact(HCONTACT hContact, DB::CEnumList* pModules, FILE* file)
+static BYTE ExportContact(MCONTACT hContact, DB::CEnumList* pModules, FILE* file)
{
CExImContactBase vcc;
@@ -167,7 +167,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName) errno_t err;
DB::CEnumList Modules;
SYSTEMTIME now;
- HCONTACT hContact;
+ MCONTACT hContact;
if (!DlgExImModules_SelectModulesToExport(ExImContact, &Modules, NULL))
{
@@ -298,12 +298,12 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str) * cchBuf - character count of the buffer
* return: handle to the contact that matches the information or NULL if no match
**/
-static HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
+static MCONTACT ImportFindContact(MCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
{
CExImContactBase vcc;
vcc.fromIni(strBuf);
- if (vcc.handle() != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (vcc.handle() != INVALID_CONTACT_ID) {
//if (vcc.isHandle(hContact))
// return hContact;
return vcc.handle();
@@ -322,7 +322,7 @@ static HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCre * strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int ImportSetting(HCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
+int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
{
DBVARIANT dbv;
LPSTR end, value;
@@ -433,10 +433,10 @@ int ImportSetting(HCONTACT hContact, LPCSTR pszModule, LPSTR &strLine) * strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName)
+int SvcExImINI_Import(MCONTACT hContact, LPCSTR pszFileName)
{
FILE *file;
- HCONTACT hNewContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hNewContact = INVALID_CONTACT_ID;
DWORD end,
numLines = 0;
CHAR szModule[MAXSETTING] = {0};
@@ -452,11 +452,11 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) numLines++;
// contact was found and imported
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && hNewContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID && hNewContact != INVALID_CONTACT_ID)
break;
// importing settings is only valid vor the main menu item
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
if (!strncmp(strBuf, "SETTINGS:", 9)) {
*szModule = 0;
hNewContact = NULL;
@@ -471,7 +471,7 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) strBuf = mir_strnerase(strBuf, 0, 1);
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != INVALID_CONTACT_ID)
numContactsAdded++;
continue;
}
@@ -484,13 +484,13 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) *szModule = 0;
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != INVALID_CONTACT_ID)
numContactsAdded++;
continue;
}
// read modules and settings only for valid contacts
- if (hNewContact != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hNewContact != INVALID_CONTACT_ID) {
// found a module line
if (strBuf[0] == '[' && (end = (strchr(strBuf, ']') - strBuf)) > 0) {
mir_strncpy(szModule, &strBuf[1], end);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h index 9d737fcdb8..250df73991 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h @@ -25,6 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #pragma once
int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName);
- int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName);
+ int SvcExImINI_Import(MCONTACT hContact, LPCSTR pszFileName);
#endif /* _SVC_EXIMINI_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp index 0cea3cff25..0f27390c84 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp @@ -557,7 +557,7 @@ size_t CLineBuffer::GetTokenNext(const CHAR delim, CLineBuffer * pBuf) *
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenFirst(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -594,7 +594,7 @@ int CLineBuffer::DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, con *
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenNext(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -628,7 +628,7 @@ int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, cons *
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
+int CLineBuffer::DBWriteSettingString(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
{
if (_pVal && _cbUsed > 0)
return db_set_s(hContact, pszModule, pszSetting, (LPSTR)_pVal);
@@ -650,7 +650,7 @@ int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, CVCardFileVCF::CVCardFileVCF()
{
_pFile = NULL;
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_pszBaseProto = NULL;
_hasUtf8 = 0;
_useUtf8 = FALSE;
@@ -850,11 +850,11 @@ void CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew) * pszMode - the mode the file should be opened with
* return TRUE or FALSE
**/
-BYTE CVCardFileVCF::Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
+BYTE CVCardFileVCF::Open(MCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
{
if (!(_pFile = fopen(pszFileName, pszMode)))
return FALSE;
- if ((_hContact = hContact) == (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((_hContact = hContact) == INVALID_CONTACT_ID)
return FALSE;
if (!(_pszBaseProto = DB::Contact::Proto(_hContact)))
return FALSE;
@@ -874,7 +874,7 @@ void CVCardFileVCF::Close(void) if (_pFile)
fclose(_pFile);
_pFile = NULL;
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_pszBaseProto = NULL;
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 2507d83b61..cb1e70b4ec 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h @@ -59,9 +59,9 @@ public: size_t GetTokenFirst(const CHAR delim, CLineBuffer * pBuf);
size_t GetTokenNext(const CHAR delim, CLineBuffer * pBuf);
- int DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting);
+ int DBWriteTokenFirst(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteTokenNext(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteSettingString(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting);
};
class CVCardFileVCF
@@ -69,7 +69,7 @@ class CVCardFileVCF private:
CLineBuffer _clVal;
FILE *_pFile;
- HCONTACT _hContact;
+ MCONTACT _hContact;
const CHAR *_pszBaseProto;
WORD _cbRew;
BYTE _useUtf8;
@@ -87,7 +87,7 @@ private: public:
CVCardFileVCF();
- BYTE Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode);
+ BYTE Open(MCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode);
void Close(void);
BYTE Export(BYTE bExportUtf);
BYTE Import();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index 245c28e016..6a5f9154dc 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -93,7 +93,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) LONG cbHeader;
SYSTEMTIME now;
DWORD result;
- HCONTACT hContact;
+ MCONTACT hContact;
result = (DWORD)DialogBox(ghInst,
MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY),
@@ -139,7 +139,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) }
else {
// other export mode
- _hContactToWorkOn = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContactToWorkOn = INVALID_CONTACT_ID;
#ifdef _DEBUG
LARGE_INTEGER freq, t1, t2;
@@ -265,8 +265,8 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) switch (result) {
case ERROR_OK:
// init contact class and import if matches the user desires
- if (_hContactToWorkOn == (HCONTACT)INVALID_HANDLE_VALUE || vContact.handle() == _hContactToWorkOn) {
- result = vContact.Import(_hContactToWorkOn != (HCONTACT)INVALID_HANDLE_VALUE);
+ if (_hContactToWorkOn == INVALID_CONTACT_ID || vContact.handle() == _hContactToWorkOn) {
+ result = vContact.Import(_hContactToWorkOn != INVALID_CONTACT_ID);
switch (result) {
case ERROR_OK:
_numContactsDone++;
@@ -295,7 +295,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) if (pszNick) mir_free(pszNick);
}
// import owner contact
- else if (_hContactToWorkOn == (HCONTACT)INVALID_HANDLE_VALUE && !mir_stricmp(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) {
+ else if (_hContactToWorkOn == INVALID_CONTACT_ID && !mir_stricmp(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) {
result = vContact.Import();
switch (result) {
case ERROR_OK:
@@ -346,7 +346,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent) * pszFileName - full qualified path to the xml file which is to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-int CFileXml::Import(HCONTACT hContact, LPCSTR pszFileName)
+int CFileXml::Import(MCONTACT hContact, LPCSTR pszFileName)
{
TiXmlDocument doc;
TiXmlElement *xmlCard = NULL;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h index cbc64d761d..b7e6fe50ee 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h @@ -37,7 +37,7 @@ class CFileXml { DWORD _numEventsDone;
DWORD _numEventsDuplicated;
- HCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
+ MCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
WORD _wExport;
@@ -50,13 +50,13 @@ class CFileXml { /*
int ExportOwner(FILE *xmlfile, BYTE bExportEvents);
- int ExportContact(FILE *xmlfile, HCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
- int ExportSubContact(TiXmlElement *xContact, HCONTACT hContact, BYTE bExportEvents);
+ int ExportContact(FILE *xmlfile, MCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
+ int ExportSubContact(TiXmlElement *xContact, MCONTACT hContact, BYTE bExportEvents);
*/
public:
CFileXml();
- int Import(HCONTACT hContact, LPCSTR pszFileName);
+ int Import(MCONTACT hContact, LPCSTR pszFileName);
int Export(lpExImParam ExImContact, LPCSTR pszFileName);
};
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp index 0632d96f32..50f0aba261 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp @@ -211,7 +211,7 @@ INT_PTR svcExIm_MainExport_Service(WPARAM wParam, LPARAM lParam) {
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ ExIm.hContact = INVALID_CONTACT_ID;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -220,7 +220,7 @@ INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam) {
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ ExIm.hContact = INVALID_CONTACT_ID;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
@@ -233,7 +233,7 @@ INT_PTR svcExIm_ContactExport_Service(WPARAM wParam, LPARAM lParam) {
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HCONTACT)wParam;
+ ExIm.hContact = (MCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -242,7 +242,7 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam) {
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HCONTACT)wParam;
+ ExIm.hContact = (MCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h index 484c266535..5a6f684139 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h @@ -26,7 +26,7 @@ typedef struct {
BYTE Typ;
union {
- HCONTACT hContact;
+ MCONTACT hContact;
LPSTR pszName;
LPTSTR ptszName;
};
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.cpp b/plugins/UserInfoEx/src/mir_contactqueue.cpp index 0c9ff0883b..b06593d1bd 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.cpp +++ b/plugins/UserInfoEx/src/mir_contactqueue.cpp @@ -123,7 +123,7 @@ void CContactQueue::RemoveAll() *
* @return nothing
**/
-void CContactQueue::RemoveAll(HCONTACT hContact)
+void CContactQueue::RemoveAll(MCONTACT hContact)
{
Lock();
@@ -149,7 +149,7 @@ void CContactQueue::RemoveAll(HCONTACT hContact) *
* @return nothing
**/
-void CContactQueue::RemoveAllConsiderParam(HCONTACT hContact, PVOID param)
+void CContactQueue::RemoveAllConsiderParam(MCONTACT hContact, PVOID param)
{
Lock();
@@ -177,7 +177,7 @@ void CContactQueue::RemoveAllConsiderParam(HCONTACT hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::Add(int waitTime, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::Add(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -201,7 +201,7 @@ BOOL CContactQueue::Add(int waitTime, HCONTACT hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddIfDontHave(int waitTime, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddIfDontHave(int waitTime, MCONTACT hContact, PVOID param)
{
int i;
BOOL rc;
@@ -235,7 +235,7 @@ BOOL CContactQueue::AddIfDontHave(int waitTime, HCONTACT hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddUnique(int waitTime, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddUnique(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -261,7 +261,7 @@ BOOL CContactQueue::AddUnique(int waitTime, HCONTACT hContact, PVOID param) * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -285,7 +285,7 @@ BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HCONTACT hContact, PVOI * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::InternalAdd(int waitTime, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::InternalAdd(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
CQueueItem *qi = (CQueueItem *) mir_alloc(sizeof(CQueueItem));
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h index 4da54dcacc..a426701e19 100644 --- a/plugins/UserInfoEx/src/mir_contactqueue.h +++ b/plugins/UserInfoEx/src/mir_contactqueue.h @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct CQueueItem
{
DWORD check_time;
- HCONTACT hContact;
+ MCONTACT hContact;
PVOID param;
};
@@ -65,7 +65,7 @@ public: *
* @return nothing
**/
- void RemoveAll(HCONTACT hContact);
+ void RemoveAll(MCONTACT hContact);
/**
* This function removes all queue items for the hContact considering the correct parameter.
@@ -75,7 +75,7 @@ public: *
* @return nothing
**/
- void RemoveAllConsiderParam(HCONTACT hContact, PVOID param);
+ void RemoveAllConsiderParam(MCONTACT hContact, PVOID param);
/**
* This method adds the desired new item.
@@ -87,7 +87,7 @@ public: * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL Add(int waitTime, HCONTACT hContact, PVOID param = NULL);
+ BOOL Add(int waitTime, MCONTACT hContact, PVOID param = NULL);
/**
* This method adds the desired new item only, if the queue does not yet contain
@@ -100,7 +100,7 @@ public: * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL AddIfDontHave(int waitTime, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddIfDontHave(int waitTime, MCONTACT hContact, PVOID param = NULL);
/**
* This method removes all existing queue items for the contact and adds a new queue item
@@ -113,7 +113,7 @@ public: *
* @return nothing
**/
- BOOL AddUnique(int waitTime, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddUnique(int waitTime, MCONTACT hContact, PVOID param = NULL);
/**
* This method removes all existing queue items for the contact with the same parameter as @e param
@@ -126,7 +126,7 @@ public: *
* @return nothing
**/
- BOOL AddUniqueConsiderParam (int waitTime, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddUniqueConsiderParam (int waitTime, MCONTACT hContact, PVOID param = NULL);
/**
* This method resumes the worker thread and immitiatly goes on with the next entry.
@@ -140,7 +140,7 @@ public: protected:
virtual void OnEmpty () {};
- virtual void Callback (HCONTACT hContact, PVOID param) = 0;
+ virtual void Callback (MCONTACT hContact, PVOID param) = 0;
/**
* This is the real thread callback function. As long as _status
@@ -198,7 +198,7 @@ private: * @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL InternalAdd(int waitTime, HCONTACT hContact, PVOID param);
+ BOOL InternalAdd(int waitTime, MCONTACT hContact, PVOID param);
};
#endif // __CONTACTASYNCQUEUE_H__
\ No newline at end of file diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 1a41e8da34..a87b654658 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -25,41 +25,41 @@ namespace DB { namespace MetaContact {
-INT_PTR SubCount(HCONTACT hMetaContact)
+INT_PTR SubCount(MCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETNUMCONTACTS, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-INT_PTR SubDefNum(HCONTACT hMetaContact)
+INT_PTR SubDefNum(MCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-HCONTACT Sub(HCONTACT hMetaContact, int idx)
+MCONTACT Sub(MCONTACT hMetaContact, int idx)
{
if (idx != -1) {
INT_PTR result = CallService(MS_MC_GETSUBCONTACT, (WPARAM) hMetaContact, (LPARAM) idx);
- return (result == CALLSERVICE_NOTFOUND) ? NULL : (HCONTACT)result;
+ return (result == CALLSERVICE_NOTFOUND) ? NULL : (MCONTACT)result;
}
return NULL;
}
-bool IsSub(HCONTACT hContact)
+bool IsSub(MCONTACT hContact)
{
return myGlobals.szMetaProto &&
db_get_b(NULL, myGlobals.szMetaProto, "Enabled", TRUE) &&
db_get_b(hContact, myGlobals.szMetaProto, "IsSubcontact", FALSE);
}
-HCONTACT GetMeta(HCONTACT hContact)
+MCONTACT GetMeta(MCONTACT hContact)
{
if (!myGlobals.szMetaProto)
return NULL;
- HCONTACT result = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
- return (result == (HCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
+ MCONTACT result = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (result == (MCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
}
} /* namespace MetaContact */
@@ -76,7 +76,7 @@ namespace Contact { * @return Returns the display name of a contact.
**/
-LPTSTR DisplayName(HCONTACT hContact)
+LPTSTR DisplayName(MCONTACT hContact)
{
return pcli->pfnGetContactDisplayName(hContact, 0);
}
@@ -87,7 +87,7 @@ LPTSTR DisplayName(HCONTACT hContact) * @return This function returns the basic protocol of a contact.
**/
-LPSTR Proto(HCONTACT hContact)
+LPSTR Proto(MCONTACT hContact)
{
if (hContact) {
INT_PTR result;
@@ -112,16 +112,16 @@ INT_PTR GetCount() * Simply adds a new contact without setting up any protocol or something else
* @return HANDLE The function returns the HANDLE of the new contact
**/
-HCONTACT Add()
+MCONTACT Add()
{
- return (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ return (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
}
/**
* This function deletes a contact from the database.
* @param hContact - handle to the contact
**/
-BYTE Delete(HCONTACT hContact)
+BYTE Delete(MCONTACT hContact)
{
return CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0) != 0;
}
@@ -159,7 +159,7 @@ namespace Module { * return: nothing
**/
-void Delete(HCONTACT hContact, LPCSTR pszModule)
+void Delete(MCONTACT hContact, LPCSTR pszModule)
{
CEnumList Settings;
if (!Settings.EnumSettings(hContact, pszModule))
@@ -187,7 +187,7 @@ static int IsEmptyEnumProc(LPCSTR pszSetting, LPARAM lParam) * @retval FALSE - the module contains settings
**/
-bool IsEmpty(HCONTACT hContact, LPCSTR pszModule)
+bool IsEmpty(MCONTACT hContact, LPCSTR pszModule)
{
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = IsEmptyEnumProc;
@@ -236,7 +236,7 @@ namespace Setting { * @retval 1 - error
**/
-BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE Get(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
// read value without translation to specific type
BYTE result = db_get_s(hContact, pszModule, pszSetting, dbv, 0) != 0;
@@ -256,7 +256,7 @@ BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, * @return string value
**/
-LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPSTR GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetAString(hContact, pszModule, pszSetting, &dbv) == 0){
@@ -277,7 +277,7 @@ LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @return string value
**/
-LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPWSTR GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetWString(hContact, pszModule, pszSetting, &dbv) == 0) {
@@ -302,7 +302,7 @@ LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @retval 1 - error
**/
-BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
BYTE result = !pszModule || Get(hContact, pszModule, pszSetting, dbv, destType);
// try to read setting from the contact's protocol module
@@ -311,7 +311,7 @@ BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti // try to get setting from a metasubcontact
if (result && DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HCONTACT hSubContact;
+ MCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
@@ -347,7 +347,7 @@ BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti * @return This function returns the WORD which contains the source of information.
**/
-WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
WORD wFlags = 0;
@@ -366,7 +366,7 @@ WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps // try to read the setting from the sub contacts' modules
else if (DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HCONTACT hSubContact;
+ MCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
@@ -409,7 +409,7 @@ WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps * @retval FALSE - setting does not exist
**/
-BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+BYTE Exists(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (pszModule && pszSetting) {
CHAR szDummy[1];
@@ -428,7 +428,7 @@ BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @return nothing
**/
-void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
+void DeleteArray(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
{
CHAR pszSetting[MAXSETTING];
do {
@@ -702,7 +702,7 @@ static FORCEINLINE bool IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bo *
**/
-bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
+bool Exists(MCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
{
bool result = false;
DBEVENTINFO edbei;
@@ -826,7 +826,7 @@ INT_PTR CEnumList::EnumModules() * @retval 0 - success
**/
-INT_PTR CEnumList::EnumSettings(HCONTACT hContact, LPCSTR pszModule)
+INT_PTR CEnumList::EnumSettings(MCONTACT hContact, LPCSTR pszModule)
{
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = (DBSETTINGENUMPROC)CEnumList::EnumSettingsProc;
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 2732d6e6f8..9d850c0006 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. namespace DB {
namespace MetaContact{
- INT_PTR SubCount(HCONTACT hMetaContact);
- INT_PTR SubDefNum(HCONTACT hMetaContact);
- HCONTACT Sub(HCONTACT hMetaContact, int idx);
+ INT_PTR SubCount(MCONTACT hMetaContact);
+ INT_PTR SubDefNum(MCONTACT hMetaContact);
+ MCONTACT Sub(MCONTACT hMetaContact, int idx);
- bool IsSub(HCONTACT hContact);
- HCONTACT GetMeta(HCONTACT hContact);
+ bool IsSub(MCONTACT hContact);
+ MCONTACT GetMeta(MCONTACT hContact);
} /* namespace MetaContact */
/**
@@ -37,21 +37,21 @@ namespace MetaContact{ * or modify contacts in the database.
**/
namespace Contact {
- LPTSTR DisplayName(HCONTACT hContact);
- LPSTR Proto(HCONTACT hContact);
+ LPTSTR DisplayName(MCONTACT hContact);
+ LPSTR Proto(MCONTACT hContact);
INT_PTR GetCount();
- HCONTACT Add();
- BYTE Delete(HCONTACT hContact);
+ MCONTACT Add();
+ BYTE Delete(MCONTACT hContact);
DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
namespace Module {
- void Delete(HCONTACT hContact, LPCSTR pszModule);
- bool IsEmpty(HCONTACT hContact, LPCSTR pszModule);
+ void Delete(MCONTACT hContact, LPCSTR pszModule);
+ bool IsEmpty(MCONTACT hContact, LPCSTR pszModule);
bool IsMeta(LPCSTR pszModule);
bool IsMetaAndScan(LPCSTR pszModule);
@@ -62,38 +62,38 @@ namespace Module { **/
namespace Setting {
- BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE BYTE GetAsIs(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ BYTE Get(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIs(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, 0); }
- static FORCEINLINE BYTE GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE BYTE GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_ASCIIZ); }
- LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPSTR GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_WCHAR); }
- LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetUString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPWSTR GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetUString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_UTF8); }
- BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE BYTE GetAsIsEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ BYTE GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIsEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetEx(hContact, pszModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE LPSTR GetAStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetAStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_ASCIIZ) && dbv.type == DBVT_ASCIIZ) ? dbv.pszVal : NULL; }
- static FORCEINLINE LPWSTR GetWStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPWSTR GetWStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_WCHAR) && dbv.type == DBVT_WCHAR) ? dbv.pwszVal : NULL; }
- static FORCEINLINE LPSTR GetUStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetUStringEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_UTF8) && dbv.type == DBVT_UTF8) ? dbv.pszVal : NULL; }
- WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE WORD GetAsIsCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE WORD GetAsIsCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE WORD GetAStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetAStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_ASCIIZ); }
- static FORCEINLINE WORD GetWStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetWStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_WCHAR); }
- static FORCEINLINE WORD GetUStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetUStringCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_UTF8); }
#define GetTString GetWString
@@ -104,8 +104,8 @@ namespace Setting { /**
* misc operations
**/
- BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
+ BYTE Exists(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ void DeleteArray(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
} /* namespace Setting */
@@ -115,11 +115,11 @@ namespace Variant { } /* namespace Variant */
namespace Event {
- HANDLE FindLast(HCONTACT hContact);
+ HANDLE FindLast(MCONTACT hContact);
bool GetInfo(HANDLE hEvent, DBEVENTINFO *dbei);
bool GetInfoWithData(HANDLE hEvent, DBEVENTINFO *dbei);
DWORD GetTime(HANDLE hEvent);
- bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
+ bool Exists(MCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
} /* namespace Events */
/**
@@ -140,7 +140,7 @@ public: LPSTR Insert(LPCSTR str);
INT_PTR EnumModules();
- INT_PTR EnumSettings(HCONTACT hContact, LPCSTR pszModule);
+ INT_PTR EnumSettings(MCONTACT hContact, LPCSTR pszModule);
};
} /* namespace DB */
\ No newline at end of file diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp index 77ec44c285..611783f1c2 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -58,7 +58,7 @@ INT_PTR CALLBACK PSPBaseProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPSTR pszProto;
switch (((LPNMHDR)lParam)->code) {
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index b71f809b49..0bce7739ae 100644 --- a/plugins/UserInfoEx/src/psp_contact.cpp +++ b/plugins/UserInfoEx/src/psp_contact.cpp @@ -41,7 +41,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (pCtrlList)
{
TCHAR szAddr[MAX_PATH];
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -74,7 +74,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
HWND hCtrl;
@@ -196,7 +196,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM if (pCtrlList)
{
TCHAR szAddr[MAX_PATH];
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -227,7 +227,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
HWND hCtrl;
diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index d881f8b812..44aa65c843 100644 --- a/plugins/UserInfoEx/src/psp_general.cpp +++ b/plugins/UserInfoEx/src/psp_general.cpp @@ -77,7 +77,7 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
char* pszProto;
switch (((LPNMHDR)lParam)->code)
@@ -149,7 +149,7 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar case WM_COMMAND:
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
switch (LOWORD(wParam))
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 49626f63e7..aaafe6e38e 100644 --- a/plugins/UserInfoEx/src/psp_options.cpp +++ b/plugins/UserInfoEx/src/psp_options.cpp @@ -488,7 +488,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam LPGENT("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to procceed?"));
if (WantReset) {
- HCONTACT hContact;
+ MCONTACT hContact;
DB::CEnumList Settings;
// delete all skin icons
@@ -706,7 +706,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam if (bOld != bNew) {
//keep the database clean
MAnnivDate mdb;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
DBWriteComboByte(hDlg, EDIT_BIRTHMODULE, SET_REMIND_BIRTHMODULE, DEFVAL_REMIND_BIRTHMODULE);
//walk through all the contacts stored in the DB
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp index 6b337a4d5c..5c455e2a78 100644 --- a/plugins/UserInfoEx/src/psp_origin.cpp +++ b/plugins/UserInfoEx/src/psp_origin.cpp @@ -72,7 +72,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
switch (((LPNMHDR) lParam)->code)
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp index 098fc8ad72..621e913492 100644 --- a/plugins/UserInfoEx/src/psp_profile.cpp +++ b/plugins/UserInfoEx/src/psp_profile.cpp @@ -278,7 +278,7 @@ static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, int iItem, int iSubItem {
LVITEM lvi;
LPLCITEM pItem;
- HCONTACT hContact;
+ MCONTACT hContact;
RECT rcList;
if (!PtrIsValid(pList))
@@ -431,7 +431,7 @@ static BYTE ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENT {
LPLCITEM pItem;
LVITEM lvi;
- HCONTACT hContact;
+ MCONTACT hContact;
if (PtrIsValid(pList) && (pItem = (LPLCITEM)mir_alloc(sizeof(LCITEM)))) {
PSGetContact(hDlg, hContact);
@@ -478,7 +478,7 @@ static int ProfileList_AddItemlistFromDB( int &iItem,
LPIDSTRLIST idList,
UINT nList,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR szCatFormat,
LPCSTR szValFormat,
@@ -1113,7 +1113,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR switch (((LPNMHDR)lParam)->idFrom) {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
if (!PtrIsValid(pList = (LPLISTCTRL)GetUserData(hList)))
@@ -1144,11 +1144,11 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR // scan all basic protocols for the subcontacts
if (DB::Module::IsMetaAndScan(pszProto)) {
int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)hContact, NULL);
- HCONTACT hSubContact, hDefContact;
+ MCONTACT hSubContact, hDefContact;
LPCSTR pszSubBaseProto;
int j, numSubs;
- if ((hDefContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
+ if ((hDefContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
(pszSubBaseProto = DB::Contact::Proto(hDefContact)))
{
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hDefContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
@@ -1158,7 +1158,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR numSubs = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, NULL);
for (j = 0; j < numSubs; j++) {
if (j == iDefault) continue;
- if (!(hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
+ if (!(hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
if (!(pszSubBaseProto = DB::Contact::Proto(hSubContact))) continue;
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hSubContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
return FALSE;
@@ -1270,7 +1270,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR {
HMENU hMenu = CreatePopupMenu();
MENUITEMINFO mii;
- HCONTACT hContact;
+ MCONTACT hContact;
LVHITTESTINFO hi;
LPLCITEM pItem;
POINT pt;
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp index 38b3897a43..c6edeaab85 100644 --- a/plugins/UserInfoEx/src/svc_avatar.cpp +++ b/plugins/UserInfoEx/src/svc_avatar.cpp @@ -50,7 +50,7 @@ namespace NServices *
*
**/
- static void SetZodiacAvatar(HCONTACT hContact)
+ static void SetZodiacAvatar(MCONTACT hContact)
{
MAnnivDate mtb;
@@ -76,7 +76,7 @@ namespace NServices }
}
- void DeleteAvatar(HCONTACT hContact)
+ void DeleteAvatar(MCONTACT hContact)
{
if (hContact && db_get_b(hContact, "ContactPhoto", "IsZodiac", FALSE))
{
@@ -94,7 +94,7 @@ namespace NServices *
*
**/
- static int OnAvatarChanged(HCONTACT hContact, AVATARCACHEENTRY *ace)
+ static int OnAvatarChanged(MCONTACT hContact, AVATARCACHEENTRY *ace)
{
if (hContact)
{
@@ -127,7 +127,7 @@ namespace NServices **/
void Enable(BYTE bEnable)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (bEnable && !ghChangedHook)
diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 1743477c89..aaa4c816e2 100644 --- a/plugins/UserInfoEx/src/svc_contactinfo.cpp +++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp @@ -705,7 +705,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam) static INT_PTR GetContactSettingStrExService(WPARAM wParam, LPARAM lParam)
{
DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam;
- return DB::Setting::GetEx((HCONTACT)wParam, USERINFO,
+ return DB::Setting::GetEx((MCONTACT)wParam, USERINFO,
cgs->szModule, cgs->szSetting, cgs->pValue, cgs->pValue->type);
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp index 40bbf256cc..3888dd7ba9 100644 --- a/plugins/UserInfoEx/src/svc_email.cpp +++ b/plugins/UserInfoEx/src/svc_email.cpp @@ -39,7 +39,7 @@ bool g_eiEmail = false; * @retval NULL, if contact does not provide any email address
**/
-static LPSTR Get(HCONTACT hContact)
+static LPSTR Get(MCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -84,7 +84,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) __try
{
- val = Get((HCONTACT)wParam);
+ val = Get((MCONTACT)wParam);
if (val) {
LPSTR szUrl;
INT_PTR len;
@@ -126,8 +126,8 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HCONTACT)wParam);
- ExtraIcon_SetIcon(ghExtraIconSvc, (HCONTACT)wParam, (val) ? ICO_BTN_EMAIL : 0);
+ LPSTR val = Get((MCONTACT)wParam);
+ ExtraIcon_SetIcon(ghExtraIconSvc, (MCONTACT)wParam, (val) ? ICO_BTN_EMAIL : 0);
mir_free(val);
return 0;
}
@@ -139,7 +139,7 @@ static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
@@ -163,7 +163,7 @@ static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HCONTACT)wParam);
+ LPSTR val = Get((MCONTACT)wParam);
Menu_ShowItem(ghMenuItem, val != NULL);
mir_free(val);
return 0;
diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp index 26a26d7aa7..0582c9c82d 100644 --- a/plugins/UserInfoEx/src/svc_gender.cpp +++ b/plugins/UserInfoEx/src/svc_gender.cpp @@ -30,7 +30,7 @@ static HANDLE hApplyIconHook = NULL; bool g_eiGender = false;
-BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto)
+BYTE GenderOf(MCONTACT hContact, LPCSTR pszProto)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIsEx(hContact, USERINFO, pszProto, SET_CONTACT_GENDER, &dbv) == 0) {
@@ -53,7 +53,7 @@ BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto) * @retval 0 - contact does not provide its gender
**/
-BYTE GenderOf(HCONTACT hContact)
+BYTE GenderOf(MCONTACT hContact)
{
return GenderOf(hContact, DB::Contact::Proto(hContact));
}
@@ -69,7 +69,7 @@ BYTE GenderOf(HCONTACT hContact) * @param lParam - not used
**/
-static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
if (ghExtraIconSvc != INVALID_HANDLE_VALUE) {
char *icoName;
@@ -90,7 +90,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !lstrcmpA(pdbcws->szSetting, SET_CONTACT_GENDER))
OnCListApplyIcons(hContact, 0);
diff --git a/plugins/UserInfoEx/src/svc_gender.h b/plugins/UserInfoEx/src/svc_gender.h index 1e90820b95..5d897bbe11 100644 --- a/plugins/UserInfoEx/src/svc_gender.h +++ b/plugins/UserInfoEx/src/svc_gender.h @@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef _UINFOEX_SVCGENDER_H_INCLUDED_
#define _UINFOEX_SVCGENDER_H_INCLUDED_
-BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto);
-BYTE GenderOf(HCONTACT hContact);
+BYTE GenderOf(MCONTACT hContact, LPCSTR pszProto);
+BYTE GenderOf(MCONTACT hContact);
bool SvcGenderEnableExtraIcons(bool bEnable = false, bool bUpdateDB = false);
void SvcGenderUnloadModule();
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp index 2845570486..d5a1d8d5fd 100644 --- a/plugins/UserInfoEx/src/svc_homepage.cpp +++ b/plugins/UserInfoEx/src/svc_homepage.cpp @@ -39,7 +39,7 @@ bool g_eiHome = false; * @retval NULL if contact provides no homepage
**/
-static LPSTR Get(HCONTACT hContact)
+static LPSTR Get(MCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -68,7 +68,7 @@ static LPSTR Get(HCONTACT hContact) static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam)
{
- LPSTR szUrl = Get((HCONTACT)wParam);
+ LPSTR szUrl = Get((MCONTACT)wParam);
if (szUrl) {
CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
mir_free(szUrl);
@@ -89,7 +89,7 @@ static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam) * @param lParam - not used
**/
-static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
LPSTR val = Get(hContact);
if (ghExtraIconSvc != INVALID_HANDLE_VALUE)
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
@@ -127,7 +127,7 @@ static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HCONTACT)wParam);
+ LPSTR val = Get((MCONTACT)wParam);
Menu_ShowItem(ghMenuItem, val != 0);
mir_free(val);
return 0;
diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp index 6a510f28c3..c640d0b34c 100644 --- a/plugins/UserInfoEx/src/svc_phone.cpp +++ b/plugins/UserInfoEx/src/svc_phone.cpp @@ -47,7 +47,7 @@ bool g_eiPhone = false; * @retval PHONE_NONE: The contact does not provide any phone number
**/
-static INT_PTR Get(HCONTACT hContact)
+static INT_PTR Get(MCONTACT hContact)
{
INT_PTR nType = PHONE_NONE;
@@ -86,7 +86,7 @@ static INT_PTR Get(HCONTACT hContact) * @param lParam - not used
**/
-static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
char *icoName;
switch (Get(hContact)) {
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp index 4d2715dc39..e2022e5982 100644 --- a/plugins/UserInfoEx/src/svc_refreshci.cpp +++ b/plugins/UserInfoEx/src/svc_refreshci.cpp @@ -485,7 +485,7 @@ class CContactUpdater : public CContactQueue {
CUpdProgress* _pProgress; // pointer to the progress dialog/popup
HANDLE _hProtoAckEvent; // handle to protocol ack notification
- HCONTACT _hContact; // current contact being refreshed
+ MCONTACT _hContact; // current contact being refreshed
PBYTE _hContactAcks; // array of acknoledgements for the current contact to wait for
INT_PTR _nContactAcks; // number of acknoledgements for the current contact to wait for
@@ -627,7 +627,7 @@ class CContactUpdater : public CContactQueue *
* @return nothing
**/
- virtual void Callback(HCONTACT hContact, PVOID param)
+ virtual void Callback(MCONTACT hContact, PVOID param)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -687,7 +687,7 @@ public: *
*
**/
- BOOL QueueAddRefreshContact(HCONTACT hContact, int iWait)
+ BOOL QueueAddRefreshContact(MCONTACT hContact, int iWait)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -708,7 +708,7 @@ public: {
int iWait = 100;
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
if (QueueAddRefreshContact(hContact, iWait))
iWait += 5000;
@@ -840,13 +840,13 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam) {
try
{
- DWORD dwStmp = db_get_dw((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ DWORD dwStmp = db_get_dw((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp)
{
MTime mt;
mt.GetLocalTime();
- mt.DBWriteStamp((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
+ mt.DBWriteStamp((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
// create updater, if not yet exists
if (!ContactUpdater)
@@ -858,7 +858,7 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam) ContactUpdater->AddIfDontHave(
(ContactUpdater->Size() > 0)
? max(ContactUpdater->Get(ContactUpdater->Size() - 1)->check_time + 15000, 4000)
- : 4000, (HCONTACT)wParam);
+ : 4000, (MCONTACT)wParam);
}
}
catch(...)
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 235694e451..ca075925d0 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -173,7 +173,7 @@ static HICON GetAnnivIcon(const CEvent &evt) * @return nothing
**/
-static void NotifyWithExtraIcon(HCONTACT hContact, const CEvent &evt)
+static void NotifyWithExtraIcon(MCONTACT hContact, const CEvent &evt)
{
if (gRemindOpts.bCListExtraIcon) {
char szIcon[MAXSETTING], *icoName;
@@ -244,7 +244,7 @@ static LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA * @return return value of the popup service
**/
-static int NotifyWithPopup(HCONTACT hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
+static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
{
if (!gRemindOpts.bPopups)
return 1;
@@ -304,7 +304,7 @@ static int NotifyWithPopup(HCONTACT hContact, CEvent::EType eventType, int DaysT * @return nothing
**/
-static void NotifyFlashCListIcon(HCONTACT hContact, const CEvent &evt)
+static void NotifyFlashCListIcon(MCONTACT hContact, const CEvent &evt)
{
if (!gRemindOpts.bFlashCList || evt._wDaysLeft != 0)
return;
@@ -369,7 +369,7 @@ static BYTE NotifyWithSound(const CEvent &evt) * "check for anniversary" functions
***********************************************************************************************************/
-static LPCTSTR ContactGender(HCONTACT hContact)
+static LPCTSTR ContactGender(MCONTACT hContact)
{
switch (GenderOf(hContact)) {
case 'M': return TranslateT("He");
@@ -378,7 +378,7 @@ static LPCTSTR ContactGender(HCONTACT hContact) return TranslateT("He/She");
}
-static BYTE CheckAnniversaries(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
+static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
{
int numAnniversaries = 0;
int Diff;
@@ -466,7 +466,7 @@ static BYTE CheckAnniversaries(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE * @retval FALSE - contact has no birthday or it is not within the desired period of time.
**/
-static BYTE CheckBirthday(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
+static BYTE CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
{
BYTE result = FALSE;
@@ -534,7 +534,7 @@ static BYTE CheckBirthday(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti * @return nothing
**/
-static void CheckContact(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0)
+static void CheckContact(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0)
{
// ignore meta subcontacts here as their birthday information are collected explicitly
if (hContact &&
@@ -570,7 +570,7 @@ void SvcReminderCheckAll(const ENotify notify) now.GetLocalTime();
//walk through all the contacts stored in the DB
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
CheckContact(hContact, now, evt, notify != NOTIFY_CLIST, &a1);
if (notify != NOTIFY_CLIST) {
@@ -623,7 +623,7 @@ static int OnCListRebuildIcons(WPARAM, LPARAM) * @return This function must return 0 in order to continue in the notification chain.
**/
-int OnCListApplyIcon(HCONTACT hContact, LPARAM)
+int OnCListApplyIcon(MCONTACT hContact, LPARAM)
{
if (gRemindOpts.RemindState != REMIND_OFF) {
CEvent evt;
@@ -645,7 +645,7 @@ int OnCListApplyIcon(HCONTACT hContact, LPARAM) * @return This function must return 0 in order to continue in the notification chain.
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && // valid contact not owner!
ghCListIA && // extraicons active
@@ -656,7 +656,7 @@ static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdb !strncmp(pdbcws->szSetting, "Anniv", 5) ||
!strncmp(pdbcws->szSetting, "DOB", 3)))
{
- HCONTACT hMeta = DB::MetaContact::GetMeta(hContact);
+ MCONTACT hMeta = DB::MetaContact::GetMeta(hContact);
WORD LastAnswer = IDNONE;
CEvent evt;
MTime now;
@@ -727,7 +727,7 @@ static INT_PTR CheckService(WPARAM, LPARAM) static INT_PTR BackupBirthdayService(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
MAnnivDate mdb;
if (hContact) {
@@ -872,7 +872,7 @@ void SvcReminderEnable(BYTE bEnable) UpdateTimer(TRUE);
}
else { // Reminder is off
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
NotifyWithExtraIcon(hContact, CEvent());
gRemindOpts.RemindState = REMIND_OFF;
diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp index 777a12e2a8..f9341d1543 100644 --- a/plugins/UserInfoEx/src/svc_timezone.cpp +++ b/plugins/UserInfoEx/src/svc_timezone.cpp @@ -41,7 +41,7 @@ INT_PTR GetContactTimeZoneInformation(WPARAM wParam,LPARAM lParam) {
//use new core tz interface
LPTIME_ZONE_INFORMATION pTimeZoneInformation = (LPTIME_ZONE_INFORMATION)lParam;
- (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((HCONTACT)wParam, 0));
+ (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((MCONTACT)wParam, 0));
return (pTimeZoneInformation == NULL);
}
@@ -58,7 +58,7 @@ INT_PTR GetContactLocalTime(WPARAM wParam, LPARAM lParam) {
//use new core tz interface
LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam;
- return (INT_PTR)tmi.getTimeZoneTimeByContact((HCONTACT)wParam, pSystemTime);
+ return (INT_PTR)tmi.getTimeZoneTimeByContact((MCONTACT)wParam, pSystemTime);
}
/***********************************************************************************************************
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index 641d4c6d3e..1bb5a202a8 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.cpp +++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp @@ -375,7 +375,7 @@ static TZ_MAP MirTZ2WinTZ(const CHAR MirTz) * @retval CTimeZone* - Pointer to the timezone.
**/
-CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto)
+CTimeZone* GetContactTimeZone(MCONTACT hContact, LPCSTR pszProto)
{
LPTSTR ptszName;
CTimeZone* pTimeZone = NULL;
@@ -410,7 +410,7 @@ CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto) *
**/
-CTimeZone* GetContactTimeZone(HCONTACT hContact)
+CTimeZone* GetContactTimeZone(MCONTACT hContact)
{
return GetContactTimeZone(hContact, DB::Contact::Proto(hContact));
}
@@ -431,7 +431,7 @@ CTimeZone* GetContactTimeZone(HCONTACT hContact) * @e dwIndex retrieved its value. If not, dwIndex is -100 (unspecified).
**/
-WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
+WORD GetContactTimeZoneCtrl(MCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
{
WORD flags;
DBVARIANT dbv;
@@ -476,7 +476,7 @@ WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTim * @return String containing display name.
**/
-LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact)
+LPCTSTR GetContactTimeZoneDisplayName(MCONTACT hContact)
{
CTimeZone *pTimeZone;
@@ -561,7 +561,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam) CTimeZone *pTimeZone;
TIME_ZONE_INFORMATION* pTimeZoneInformation = (TIME_ZONE_INFORMATION*)lParam;
- pTimeZone = GetContactTimeZone((HCONTACT)wParam);
+ pTimeZone = GetContactTimeZone((MCONTACT)wParam);
if (pTimeZone && pTimeZoneInformation)
(*pTimeZoneInformation) = *pTimeZone;
@@ -580,7 +580,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam) INT_PTR GetContactLocalTime_old(WPARAM wParam, LPARAM lParam)
{
MTime now;
- now.GetLocalTime((HCONTACT)wParam);
+ now.GetLocalTime((MCONTACT)wParam);
LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam;
*pSystemTime = now.SystemTime();
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.h b/plugins/UserInfoEx/src/svc_timezone_old.h index 073794fd21..040f272ec6 100644 --- a/plugins/UserInfoEx/src/svc_timezone_old.h +++ b/plugins/UserInfoEx/src/svc_timezone_old.h @@ -78,10 +78,10 @@ struct CTimeZone : public REG_TZI_FORMAT typedef INT_PTR (*PEnumNamesProc)(CTimeZone* pTimeZone, int index, LPARAM lParam);
-CTimeZone* GetContactTimeZone(HCONTACT hContact);
-CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto);
-WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
-LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact);
+CTimeZone* GetContactTimeZone(MCONTACT hContact);
+CTimeZone* GetContactTimeZone(MCONTACT hContact, LPCSTR pszProto);
+WORD GetContactTimeZoneCtrl(MCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
+LPCTSTR GetContactTimeZoneDisplayName(MCONTACT hContact);
INT_PTR EnumTimeZones(PEnumNamesProc enumProc, LPARAM lParam);
INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam, LPARAM lParam);
diff --git a/plugins/Utils/mir_buffer.h b/plugins/Utils/mir_buffer.h index 40d450fa47..77e8832f7d 100644 --- a/plugins/Utils/mir_buffer.h +++ b/plugins/Utils/mir_buffer.h @@ -439,7 +439,7 @@ class Buffer };
-static void ReplaceVars(Buffer<TCHAR> *buffer, HCONTACT hContact, TCHAR **variables, int numVariables)
+static void ReplaceVars(Buffer<TCHAR> *buffer, MCONTACT hContact, TCHAR **variables, int numVariables)
{
if (buffer->len < 3)
return;
@@ -502,7 +502,7 @@ static void ReplaceVars(Buffer<TCHAR> *buffer, HCONTACT hContact, TCHAR **variab }
-static void ReplaceTemplate(Buffer<TCHAR> *out, HCONTACT hContact, TCHAR *templ, TCHAR **vars, int numVars)
+static void ReplaceTemplate(Buffer<TCHAR> *out, MCONTACT hContact, TCHAR *templ, TCHAR **vars, int numVars)
{
if (ServiceExists(MS_VARS_FORMATSTRING))
diff --git a/plugins/Utils/mir_options.cpp b/plugins/Utils/mir_options.cpp index 5ceadf4486..f1960d30d5 100644 --- a/plugins/Utils/mir_options.cpp +++ b/plugins/Utils/mir_options.cpp @@ -33,7 +33,7 @@ Boston, MA 02111-1307, USA. #include "mir_options.h"
#include "mir_memory.h"
-static TCHAR* MyDBGetContactSettingTString(HCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
+static TCHAR* MyDBGetContactSettingTString(MCONTACT hContact, char* module, char* setting, TCHAR* out, size_t len, TCHAR *def)
{
DBVARIANT dbv = {0};
diff --git a/plugins/Variables/src/contact.cpp b/plugins/Variables/src/contact.cpp index a655d799ae..0f0ad17159 100644 --- a/plugins/Variables/src/contact.cpp +++ b/plugins/Variables/src/contact.cpp @@ -75,7 +75,7 @@ static builtinCnfs[] = typedef struct {
TCHAR* tszContact;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD flags;
} CONTACTCE; /* contact cache entry */
@@ -104,7 +104,7 @@ BYTE getContactInfoType(TCHAR* type) /*
returns info about a contact as a string
*/
-TCHAR* getContactInfoT(BYTE type, HCONTACT hContact)
+TCHAR* getContactInfoT(BYTE type, MCONTACT hContact)
{
/* returns dynamic allocated buffer with info, or NULL if failed */
TCHAR *res = NULL;
@@ -216,7 +216,7 @@ int getContactFromString(CONTACTSINFO *ci) for (int i=0; i < cacheSize; i++) {
if ((!_tcscmp(cce[i].tszContact, tszContact)) && (ci->flags == cce[i].flags)) {
/* found in cache */
- ci->hContacts = (HCONTACT*)mir_alloc(sizeof(HCONTACT));
+ ci->hContacts = (MCONTACT*)mir_alloc(sizeof(MCONTACT));
if (ci->hContacts == NULL)
return -1;
@@ -227,7 +227,7 @@ int getContactFromString(CONTACTSINFO *ci) }
/* contact was not in cache, do a search */
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
continue;
@@ -325,7 +325,7 @@ int getContactFromString(CONTACTSINFO *ci) }
}
if (bMatch) {
- ci->hContacts = (HCONTACT*)mir_realloc(ci->hContacts, (count + 1)*sizeof(HCONTACT));
+ ci->hContacts = (MCONTACT*)mir_realloc(ci->hContacts, (count + 1)*sizeof(MCONTACT));
if (ci->hContacts == NULL)
return -1;
@@ -353,7 +353,7 @@ int getContactFromString(CONTACTSINFO *ci) static int contactSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *dbw = (DBCONTACTWRITESETTING*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
mir_cslock lck(csContactCache);
for (int i=0; i < cacheSize; i++) {
@@ -407,7 +407,7 @@ int deinitContactModule() // returns a string in the form <PROTOID:UNIQUEID>, cannot be _HANDLE_!
// result must be freed
-TCHAR* encodeContactToString(HCONTACT hContact)
+TCHAR* encodeContactToString(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
TCHAR *tszUniqueId = getContactInfoT(CNF_UNIQUEID, hContact);
@@ -423,9 +423,9 @@ TCHAR* encodeContactToString(HCONTACT hContact) // returns a contact from a string in the form <PROTOID:UNIQUEID>
// returns INVALID_HANDLE_VALUE in case of an error.
-HCONTACT decodeContactFromString(TCHAR *tszContact)
+MCONTACT decodeContactFromString(TCHAR *tszContact)
{
- HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hContact = INVALID_CONTACT_ID;
CONTACTSINFO ci = { sizeof(ci) };
ci.tszContact = tszContact;
ci.flags = CI_PROTOID|CI_TCHAR;
diff --git a/plugins/Variables/src/contact.h b/plugins/Variables/src/contact.h index 0a81df4d1f..052e969d2c 100644 --- a/plugins/Variables/src/contact.h +++ b/plugins/Variables/src/contact.h @@ -83,7 +83,7 @@ typedef struct { WCHAR *wszContact;
TCHAR *tszContact;
};
- HCONTACT *hContacts; // (output) Array of contacts found.
+ MCONTACT *hContacts; // (output) Array of contacts found.
DWORD flags; // Contact details that will be matched with the search
// string (flags can be combined).
} CONTACTSINFO;
@@ -115,5 +115,5 @@ typedef struct { #define CI_TCHAR 0
#endif
-TCHAR *encodeContactToString(HCONTACT hContact);
-HCONTACT decodeContactFromString(TCHAR *tszContact);
+TCHAR *encodeContactToString(MCONTACT hContact);
+MCONTACT decodeContactFromString(TCHAR *tszContact);
diff --git a/plugins/Variables/src/dbhelpers.h b/plugins/Variables/src/dbhelpers.h index 8cc7332a69..a3526dd473 100644 --- a/plugins/Variables/src/dbhelpers.h +++ b/plugins/Variables/src/dbhelpers.h @@ -22,7 +22,7 @@ #endif
// database helpers
-static int __inline DBWriteIthSettingByte(DWORD i, HCONTACT hContact,const char *szModule,const char *szSetting,BYTE val) {
+static int __inline DBWriteIthSettingByte(DWORD i, MCONTACT hContact,const char *szModule,const char *szSetting,BYTE val) {
char dbSetting[128];
@@ -30,7 +30,7 @@ static int __inline DBWriteIthSettingByte(DWORD i, HCONTACT hContact,const char return db_set_b(hContact, szModule, dbSetting, val);
}
-static int __inline DBWriteIthSettingWord(DWORD i, HCONTACT hContact,const char *szModule,const char *szSetting,WORD val) {
+static int __inline DBWriteIthSettingWord(DWORD i, MCONTACT hContact,const char *szModule,const char *szSetting,WORD val) {
char dbSetting[128];
@@ -38,7 +38,7 @@ static int __inline DBWriteIthSettingWord(DWORD i, HCONTACT hContact,const char return db_set_w(hContact, szModule, dbSetting, val);
}
-static int __inline DBWriteIthSettingDword(DWORD i, HCONTACT hContact,const char *szModule,const char *szSetting,DWORD val) {
+static int __inline DBWriteIthSettingDword(DWORD i, MCONTACT hContact,const char *szModule,const char *szSetting,DWORD val) {
char dbSetting[128];
@@ -46,7 +46,7 @@ static int __inline DBWriteIthSettingDword(DWORD i, HCONTACT hContact,const char return db_set_dw(hContact, szModule, dbSetting, val);
}
-static int __inline DBWriteIthSettingString(DWORD i, HCONTACT hContact,const char *szModule,const char *szSetting,const char *val) {
+static int __inline DBWriteIthSettingString(DWORD i, MCONTACT hContact,const char *szModule,const char *szSetting,const char *val) {
char dbSetting[128];
@@ -54,7 +54,7 @@ static int __inline DBWriteIthSettingString(DWORD i, HCONTACT hContact,const cha return db_set_s(hContact, szModule, dbSetting, val);
}
-static int __inline DBGetIthSettingByte(DWORD i, HCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
+static int __inline DBGetIthSettingByte(DWORD i, MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
char dbSetting[128];
@@ -63,7 +63,7 @@ static int __inline DBGetIthSettingByte(DWORD i, HCONTACT hContact, const char * return db_get_b(hContact, szModule, dbSetting, errorValue);
}
-static WORD __inline DBGetIthSettingWord(DWORD i, HCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
+static WORD __inline DBGetIthSettingWord(DWORD i, MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
char dbSetting[128];
@@ -72,7 +72,7 @@ static WORD __inline DBGetIthSettingWord(DWORD i, HCONTACT hContact, const char return db_get_w(hContact, szModule, dbSetting, errorValue);
}
-static DWORD __inline DBGetIthSettingDword(DWORD i, HCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
+static DWORD __inline DBGetIthSettingDword(DWORD i, MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue) {
char dbSetting[128];
@@ -81,7 +81,7 @@ static DWORD __inline DBGetIthSettingDword(DWORD i, HCONTACT hContact, const cha return db_get_dw(hContact, szModule, dbSetting, errorValue);
}
-static int __inline DBGetIthSetting(DWORD i, HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) {
+static int __inline DBGetIthSetting(DWORD i, MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv) {
char dbSetting[128];
@@ -90,7 +90,7 @@ static int __inline DBGetIthSetting(DWORD i, HCONTACT hContact, const char *szMo return db_get(hContact, szModule, dbSetting, dbv);
}
-static int __inline DBDeleteIthSetting(DWORD i, HCONTACT hContact,const char *szModule,const char *szSetting) {
+static int __inline DBDeleteIthSetting(DWORD i, MCONTACT hContact,const char *szModule,const char *szSetting) {
char dbSetting[128];
diff --git a/plugins/Variables/src/help.cpp b/plugins/Variables/src/help.cpp index 6cabbab4b7..a5900761ee 100644 --- a/plugins/Variables/src/help.cpp +++ b/plugins/Variables/src/help.cpp @@ -140,9 +140,9 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM case VARM_SETSUBJECT: {
LPARAM res = 0;
- HCONTACT hItem, hContact = (HCONTACT)wParam;
+ MCONTACT hItem, hContact = (MCONTACT)wParam;
log_debugA("VARM_SETSUBJECT: %u", hContact);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
TCHAR *tszContact = db_get_tsa(NULL, MODULENAME, SETTING_SUBJECT);
log_debugA("VARM_SETSUBJECT: %s", tszContact);
if (tszContact != NULL) {
@@ -151,8 +151,8 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM mir_free(tszContact);
} }
- if ((hContact != (HCONTACT)INVALID_HANDLE_VALUE) && (hContact != NULL))
- hItem = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ if ((hContact != INVALID_CONTACT_ID) && (hContact != NULL))
+ hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
else
hItem = NULL;
@@ -223,7 +223,7 @@ static INT_PTR CALLBACK clistDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM case WM_DESTROY:
db_unset(NULL, MODULENAME, SETTING_SUBJECT);
{
- HCONTACT hContact = (HCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
+ MCONTACT hContact = (MCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
if (hContact != NULL) {
TCHAR *tszContact = encodeContactToString(hContact);
if (tszContact != NULL) {
@@ -724,7 +724,7 @@ static INT_PTR CALLBACK inputDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM else extraText = NULL;
if (string != NULL) {
- TCHAR *newString = variables_parsedup(string, extraText, (HCONTACT)SendMessage(GetParent(hwndDlg), VARM_GETSUBJECT, 0, 0));
+ TCHAR *newString = variables_parsedup(string, extraText, (MCONTACT)SendMessage(GetParent(hwndDlg), VARM_GETSUBJECT, 0, 0));
if (newString != NULL) {
TCHAR *oldString = Hlp_GetDlgItemText(hwndDlg, IDC_RESULT);
if (oldString == NULL || _tcscmp(oldString, newString))
@@ -1001,7 +1001,7 @@ static INT_PTR CALLBACK helpDlgProc(HWND hwndDlg,UINT msg,WPARAM wParam,LPARAM l SendMessageA(hwndDlg, VARM_GETEXTRATEXT, (WPARAM)len + 1, (LPARAM)dat->vhs->fi->szExtraText);
}
}
- dat->vhs->fi->hContact = (HCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
+ dat->vhs->fi->hContact = (MCONTACT)SendMessage(hwndDlg, VARM_GETSUBJECT, 0, 0);
}
// fall through
diff --git a/plugins/Variables/src/parse_metacontacts.cpp b/plugins/Variables/src/parse_metacontacts.cpp index 3cb038c029..edb435163d 100644 --- a/plugins/Variables/src/parse_metacontacts.cpp +++ b/plugins/Variables/src/parse_metacontacts.cpp @@ -24,7 +24,7 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai) if (ai->argc != 2)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
@@ -40,7 +40,7 @@ static TCHAR *parseGetParent(ARGUMENTSINFO *ai) return NULL;
}
- hContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
if (hContact == NULL)
return NULL;
@@ -79,7 +79,7 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai) if (ai->argc != 2)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
@@ -95,7 +95,7 @@ static TCHAR *parseGetDefault(ARGUMENTSINFO *ai) return NULL;
}
- hContact = (HCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETDEFAULTCONTACT, (WPARAM)hContact, 0);
if (hContact == NULL)
return NULL;
@@ -134,7 +134,7 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai) if (ai->argc != 2)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
@@ -150,7 +150,7 @@ static TCHAR *parseGetMostOnline(ARGUMENTSINFO *ai) return NULL;
}
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact == NULL)
return NULL;
diff --git a/plugins/Variables/src/parse_miranda.cpp b/plugins/Variables/src/parse_miranda.cpp index 3c7279782c..c009602524 100644 --- a/plugins/Variables/src/parse_miranda.cpp +++ b/plugins/Variables/src/parse_miranda.cpp @@ -99,7 +99,7 @@ static TCHAR* parseContact(ARGUMENTSINFO *ai) mir_free(ci.hContacts);
return NULL;
}
- HCONTACT hContact = ci.hContacts[n];
+ MCONTACT hContact = ci.hContacts[n];
log_debugA("contact: %x", hContact);
mir_free(ci.hContacts);
@@ -127,7 +127,7 @@ static TCHAR* parseContactInfo(ARGUMENTSINFO *ai) if (ai->argc != 3)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
ci.tszContact = ai->targv[1];
@@ -172,7 +172,7 @@ static TCHAR* parseDBProfilePath(ARGUMENTSINFO *ai) return mir_tstrdup(path);
}
-static TCHAR* getDBSetting(HCONTACT hContact, char* module, char* setting, TCHAR* defaultValue)
+static TCHAR* getDBSetting(MCONTACT hContact, char* module, char* setting, TCHAR* defaultValue)
{
DBVARIANT dbv;
if (db_get_s(hContact, module, setting, &dbv, 0))
@@ -210,7 +210,7 @@ static TCHAR* parseDBSetting(ARGUMENTSINFO *ai) return NULL;
TCHAR *res = NULL, *szDefaultValue = NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (_tcslen(ai->targv[1]) > 0) {
CONTACTSINFO ci = { 0 };
@@ -247,7 +247,7 @@ static TCHAR* parseLastSeenDate(ARGUMENTSINFO *ai) if (ai->argc <= 1)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
ci.tszContact = ai->targv[1];
@@ -300,7 +300,7 @@ static TCHAR* parseLastSeenTime(ARGUMENTSINFO *ai) if (ai->argc <= 1)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
@@ -355,7 +355,7 @@ static TCHAR* parseLastSeenStatus(ARGUMENTSINFO *ai) if (ai->argc != 2)
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
ci.tszContact = ai->targv[1];
@@ -498,7 +498,7 @@ static BOOL isValidDbEvent(DBEVENTINFO *dbe, int flags) return (bEventType && bEventFlags);
}
-static HANDLE findDbEvent(HCONTACT hContact, HANDLE hDbEvent, int flags)
+static HANDLE findDbEvent(MCONTACT hContact, HANDLE hDbEvent, int flags)
{
DBEVENTINFO dbe;
BOOL bEventOk;
@@ -530,7 +530,7 @@ static HANDLE findDbEvent(HCONTACT hContact, HANDLE hDbEvent, int flags) hMatchEvent = hSearchEvent = NULL;
matchTimestamp = priorTimestamp = 0;
if (flags & DBE_FIRST) {
- for (HCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
+ for (MCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -543,7 +543,7 @@ static HANDLE findDbEvent(HCONTACT hContact, HANDLE hDbEvent, int flags) hDbEvent = hMatchEvent;
}
else if (flags & DBE_LAST) {
- for (HCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
+ for (MCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
hSearchEvent = findDbEvent(hSearchContact, NULL, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -559,7 +559,7 @@ static HANDLE findDbEvent(HCONTACT hContact, HANDLE hDbEvent, int flags) dbe.cbBlob = 0;
if (!db_event_get(hDbEvent, &dbe)) {
priorTimestamp = dbe.timestamp;
- for (HCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
+ for (MCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -575,7 +575,7 @@ static HANDLE findDbEvent(HCONTACT hContact, HANDLE hDbEvent, int flags) else if (flags & DBE_PREV) {
if (!db_event_get(hDbEvent, &dbe)) {
priorTimestamp = dbe.timestamp;
- for (HCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
+ for (MCONTACT hSearchContact = db_find_first(); hSearchContact; hSearchContact = db_find_next(hSearchContact)) {
hSearchEvent = findDbEvent(hSearchContact, hDbEvent, flags);
dbe.cbBlob = 0;
if (!db_event_get(hSearchEvent, &dbe)) {
@@ -648,7 +648,7 @@ static TCHAR* parseDbEvent(ARGUMENTSINFO *ai) break;
}
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
CONTACTSINFO ci = { 0 };
ci.cbSize = sizeof(ci);
diff --git a/plugins/Variables/src/variables.h b/plugins/Variables/src/variables.h index a537364c84..f670eda2f8 100644 --- a/plugins/Variables/src/variables.h +++ b/plugins/Variables/src/variables.h @@ -122,7 +122,7 @@ For example: ?contact(miranda@hotmail.com,email) or ?contact(Miranda,nick). The #define VARM_GETINPUTTEXT (WM_APP+13)
#define VARM_GETINPUTTEXTLENGTH (WM_APP+14)
#define VARM_SETSUBJECT (WM_APP+15)
-#define VARM_GETSUBJECT (WM_APP+16) // wParam=HCONTACT hContact
+#define VARM_GETSUBJECT (WM_APP+16) // wParam=MCONTACT hContact
#define VARM_SETEXTRATEXT (WM_APP+17)
#define VARM_GETEXTRATEXT (WM_APP+18)
#define VARM_GETEXTRATEXTLENGTH (WM_APP+19)
@@ -136,7 +136,7 @@ typedef struct { int cbSize;
char *szFormat;
char *szSource;
- HCONTACT hContact;
+ MCONTACT hContact;
int pCount; // number of succesful parses
int eCount; // number of failures
} FORMATINFOV1;
@@ -172,7 +172,7 @@ int initTokenRegister(); int deinitTokenRegister();
// contact.c
BYTE getContactInfoType(TCHAR* type);
-TCHAR* getContactInfoT(BYTE type, HCONTACT hContact);
+TCHAR* getContactInfoT(BYTE type, MCONTACT hContact);
int getContactFromString( CONTACTSINFO* );
int initContactModule();
int deinitContactModule();
diff --git a/plugins/Watrack_MPD/src/utilities.cpp b/plugins/Watrack_MPD/src/utilities.cpp index 901bfbe6b9..8ff7a65624 100755 --- a/plugins/Watrack_MPD/src/utilities.cpp +++ b/plugins/Watrack_MPD/src/utilities.cpp @@ -17,7 +17,7 @@ #include "commonheaders.h" -TCHAR* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef) +TCHAR* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef) { DBVARIANT dbv = {DBVT_DELETED}; TCHAR* szRes = NULL; diff --git a/plugins/Watrack_MPD/src/utilities.h b/plugins/Watrack_MPD/src/utilities.h index 6460a8d479..7b6680b59c 100755 --- a/plugins/Watrack_MPD/src/utilities.h +++ b/plugins/Watrack_MPD/src/utilities.h @@ -2,6 +2,6 @@ #define UTILITIES_H HANDLE CreateThreadEx(pThreadFuncEx AFunc, void* arg, DWORD* pThreadID); -TCHAR* __stdcall UniGetContactSettingUtf(HCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef); +TCHAR* __stdcall UniGetContactSettingUtf(MCONTACT hContact, const char *szModule,const char* szSetting, TCHAR* szDef); #endif diff --git a/plugins/Weather/src/weather.h b/plugins/Weather/src/weather.h index 27fd3f82c7..44952fa752 100644 --- a/plugins/Weather/src/weather.h +++ b/plugins/Weather/src/weather.h @@ -226,7 +226,7 @@ struct MYOPTIONS // other misc stuff
TCHAR Default[64];
- HCONTACT DefStn;
+ MCONTACT DefStn;
};
void DestroyOptions(void);
@@ -234,7 +234,7 @@ void DestroyOptions(void); //============ STRUCT USED TO MAKE AN UPDATE LIST ============
struct WCONTACTLIST {
- HCONTACT hContact;
+ MCONTACT hContact;
struct WCONTACTLIST *next;
};
@@ -395,7 +395,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa int ContactDeleted(WPARAM wParam,LPARAM lParam);
-BOOL IsMyContact(HCONTACT hContact);
+BOOL IsMyContact(MCONTACT hContact);
// functions in weather_conv.c
BOOL is_number(char *s);
@@ -422,10 +422,10 @@ void GetID(TCHAR *pszID); TCHAR *GetError(int code);
// functions in weather_data.c
-void GetStationID(HCONTACT hContact, TCHAR* id, size_t idlen);
-WEATHERINFO LoadWeatherInfo(HCONTACT Change);
-int DBGetData(HCONTACT hContact, char *setting, DBVARIANT *dbv);
-int DBGetStaticString(HCONTACT hContact, const char *szModule, const char *valueName, TCHAR *dest, size_t dest_len);
+void GetStationID(MCONTACT hContact, TCHAR* id, size_t idlen);
+WEATHERINFO LoadWeatherInfo(MCONTACT Change);
+int DBGetData(MCONTACT hContact, char *setting, DBVARIANT *dbv);
+int DBGetStaticString(MCONTACT hContact, const char *szModule, const char *valueName, TCHAR *dest, size_t dest_len);
void EraseAllInfo(void);
@@ -438,7 +438,7 @@ void wSetData(WCHAR **Data, const WCHAR *Value); void wfree(char **Data);
void wfree(WCHAR **Data);
-void DBDataManage(HCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam);
+void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam);
// functions in weather_http.c
int InternetDownloadFile (char *szUrl, char *cookie, TCHAR** szData);
@@ -498,12 +498,12 @@ INT_PTR WeatherLoadIcon(WPARAM wParam, LPARAM lParam); void UpdateMenu(BOOL State);
void UpdatePopupMenu(BOOL State);
void AddMenuItems();
-void AvatarDownloaded(HCONTACT hContact);
+void AvatarDownloaded(MCONTACT hContact);
// functions in weather_update.c
-int UpdateWeather(HCONTACT hContact);
+int UpdateWeather(MCONTACT hContact);
-int RetrieveWeather(HCONTACT hContact, WEATHERINFO *winfo);
+int RetrieveWeather(MCONTACT hContact, WEATHERINFO *winfo);
void UpdateAll(BOOL AutoUpdate, BOOL RemoveOld);
void UpdateThreadProc(LPVOID hWnd);
@@ -512,7 +512,7 @@ INT_PTR UpdateAllInfo(WPARAM wParam,LPARAM lParam); INT_PTR UpdateSingleRemove(WPARAM wParam,LPARAM lParam);
INT_PTR UpdateAllRemove(WPARAM wParam,LPARAM lParam);
-int GetWeatherData(HCONTACT hContact);
+int GetWeatherData(MCONTACT hContact);
void CALLBACK timerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
void CALLBACK timerProc2(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime);
@@ -522,8 +522,8 @@ void InitMwin(void); void DestroyMwin(void);
INT_PTR Mwin_MenuClicked(WPARAM wParam, LPARAM lParam);
int BuildContactMenu(WPARAM wparam, LPARAM lparam);
-void UpdateMwinData(HCONTACT hContact);
-void removeWindow(HCONTACT hContact);
+void UpdateMwinData(MCONTACT hContact);
+void removeWindow(MCONTACT hContact);
// functions in weather_userinfo.c
int UserInfoInit(WPARAM wParam, LPARAM lParam);
@@ -535,7 +535,7 @@ INT_PTR CALLBACK DlgProcINIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP int BriefInfo(WPARAM wParam, LPARAM lParam);
INT_PTR BriefInfoSvc(WPARAM wParam, LPARAM lParam);
-void LoadBriefInfoText(HWND hwndDlg, HCONTACT hContact);
+void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact);
INT_PTR CALLBACK DlgProcBrief(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void InitIcons(void);
diff --git a/plugins/Weather/src/weather_addstn.cpp b/plugins/Weather/src/weather_addstn.cpp index a587b471a6..3e61f0d159 100644 --- a/plugins/Weather/src/weather_addstn.cpp +++ b/plugins/Weather/src/weather_addstn.cpp @@ -40,7 +40,7 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam) return 0;
// search for existing contact
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// check if it is a weather contact
if ( IsMyContact(hContact)) {
DBVARIANT dbv;
@@ -64,7 +64,7 @@ INT_PTR WeatherAddToList(WPARAM wParam, LPARAM lParam) // if contact with the same ID was not found, add it
if (psr->cbSize < sizeof(PROTOSEARCHRESULT)) return 0;
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)WEATHERPROTONAME);
// suppress online notification for the new contact
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact, IGNOREEVENT_USERONLINE);
diff --git a/plugins/Weather/src/weather_contacts.cpp b/plugins/Weather/src/weather_contacts.cpp index 13758addac..f52f5d13eb 100644 --- a/plugins/Weather/src/weather_contacts.cpp +++ b/plugins/Weather/src/weather_contacts.cpp @@ -43,7 +43,7 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) {
// see if the log path is set
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)wParam, WEATHERPROTONAME, "Log", &dbv)) {
+ if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "Log", &dbv)) {
if (dbv.pszVal[0] != 0)
ShellExecute((HWND)lParam, _T("open"), dbv.ptszVal, _T(""), _T(""), SW_SHOW);
db_free(&dbv);
@@ -59,10 +59,10 @@ INT_PTR ViewLog(WPARAM wParam, LPARAM lParam) INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam)
{
TCHAR id[256], loc2[256];
- GetStationID((HCONTACT)wParam, id, SIZEOF(id));
+ GetStationID((MCONTACT)wParam, id, SIZEOF(id));
if (id[0] != 0) {
// check if the complte forecast URL is set. If it is not, display warning and quit
- if (DBGetStaticString((HCONTACT)wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
+ if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "InfoURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
MessageBox(NULL, TranslateT("The URL for complete forcast have not been set. You can set it from the Edit Settings dialog."),
TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
@@ -78,10 +78,10 @@ INT_PTR LoadForecast(WPARAM wParam, LPARAM lParam) INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam)
{
TCHAR id[256], loc2[256];
- GetStationID((HCONTACT)wParam, id, SIZEOF(id));
+ GetStationID((MCONTACT)wParam, id, SIZEOF(id));
if (id[0] != 0) {
// check if the weather map URL is set. If it is not, display warning and quit
- if (DBGetStaticString((HCONTACT)wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
+ if (DBGetStaticString((MCONTACT)wParam, WEATHERPROTONAME, "MapURL", loc2, SIZEOF(loc2)) || loc2[0] == 0) {
MessageBox(NULL, TranslateT("The URL for weather map have not been set. You can set it from the Edit Settings dialog."), TranslateT("Weather Protocol"), MB_ICONINFORMATION);
return 1;
}
@@ -99,7 +99,7 @@ INT_PTR WeatherMap(WPARAM wParam, LPARAM lParam) // wParam = current contact
INT_PTR EditSettings(WPARAM wParam, LPARAM lParam)
{
- HWND hEditDlg = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hEditDlg = WindowList_Find(hWindowList, (MCONTACT)wParam);
// search the dialog list to prevent multiple instance of dialog for the same contact
if (hEditDlg != NULL) {
@@ -109,7 +109,7 @@ INT_PTR EditSettings(WPARAM wParam, LPARAM lParam) }
else {
// if the dialog box is not opened, open a new one
- if (IsMyContact((HCONTACT)wParam))
+ if (IsMyContact((MCONTACT)wParam))
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_EDIT), NULL, DlgProcChange, (LPARAM)wParam);
}
@@ -118,7 +118,7 @@ INT_PTR EditSettings(WPARAM wParam, LPARAM lParam) typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
HICON hRename;
HICON hUserDetail;
HICON hFile;
@@ -133,7 +133,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa TCHAR str[256], str2[256], city[256], filter[256], *pfilter, *chop;
char loc[512];
OPENFILENAME ofn; // common dialog box structure
- HCONTACT hContact;
+ MCONTACT hContact;
WIDATA *sData;
CntSetWndDataType *wndData = NULL;
@@ -142,7 +142,7 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa TranslateDialogDefault(hwndDlg);
wndData = ( CntSetWndDataType* )mir_alloc(sizeof(CntSetWndDataType));
- wndData->hContact = hContact = (HCONTACT)lParam;
+ wndData->hContact = hContact = (MCONTACT)lParam;
wndData->hRename = LoadSkinnedIcon(SKINICON_OTHER_RENAME);
wndData->hUserDetail = LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS);
wndData->hFile = LoadSkinnedIcon(SKINICON_EVENT_FILE);
@@ -430,14 +430,14 @@ INT_PTR CALLBACK DlgProcChange(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa // wParam = deleted contact
int ContactDeleted(WPARAM wParam, LPARAM lParam)
{
- if (!IsMyContact((HCONTACT)wParam))
+ if (!IsMyContact((MCONTACT)wParam))
return 0;
- removeWindow((HCONTACT)wParam);
+ removeWindow((MCONTACT)wParam);
// exit this function if it is not default station
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)wParam, WEATHERPROTONAME, "ID", &dbv)) {
+ if (!db_get_ts((MCONTACT)wParam, WEATHERPROTONAME, "ID", &dbv)) {
if ( _tcscmp(dbv.ptszVal, opt.Default)) {
db_free(&dbv);
return 0;
@@ -448,7 +448,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) // now the default station is deleted, try to get a new one
// start looking for other weather stations
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
if ( !db_get_ts(hContact, WEATHERPROTONAME, "ID", &dbv)) {
// if the station is not a default station, set it as the new default station
// this is the first weather station encountered from the search
@@ -475,7 +475,7 @@ int ContactDeleted(WPARAM wParam, LPARAM lParam) return 0;
}
-BOOL IsMyContact(HCONTACT hContact)
+BOOL IsMyContact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(WEATHERPROTONAME, szProto) == 0;
diff --git a/plugins/Weather/src/weather_conv.cpp b/plugins/Weather/src/weather_conv.cpp index 7e18e3f749..129c36eb2b 100644 --- a/plugins/Weather/src/weather_conv.cpp +++ b/plugins/Weather/src/weather_conv.cpp @@ -572,7 +572,7 @@ TCHAR* GetDisplay(WEATHERINFO *w, const TCHAR *dis, TCHAR* str) TCHAR svcReturnText[MAX_TEXT_SIZE];
INT_PTR GetDisplaySvcFunc(WPARAM wParam, LPARAM lParam)
{
- WEATHERINFO winfo = LoadWeatherInfo((HCONTACT)wParam);
+ WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam);
return (INT_PTR)GetDisplay(&winfo, (TCHAR*)lParam, svcReturnText);
}
diff --git a/plugins/Weather/src/weather_data.cpp b/plugins/Weather/src/weather_data.cpp index 288b415509..8d5a3bd5a8 100644 --- a/plugins/Weather/src/weather_data.cpp +++ b/plugins/Weather/src/weather_data.cpp @@ -30,7 +30,7 @@ saving individual weather data for a weather contact. // hContact = the current contact handle
// return value = the string for station ID
-void GetStationID(HCONTACT hContact, TCHAR* id, size_t idlen)
+void GetStationID(MCONTACT hContact, TCHAR* id, size_t idlen)
{
// accessing the database
if (DBGetStaticString(hContact, WEATHERPROTONAME, "ID", id, idlen))
@@ -40,7 +40,7 @@ void GetStationID(HCONTACT hContact, TCHAR* id, size_t idlen) // initialize weather info by loading values from database
// hContact = current contact handle
// return value = the current weather information in WEATHERINFO struct
-WEATHERINFO LoadWeatherInfo(HCONTACT hContact)
+WEATHERINFO LoadWeatherInfo(MCONTACT hContact)
{
// obtaining values from the DB
// assuming station ID must exist at all time, but others does not have to
@@ -86,7 +86,7 @@ WEATHERINFO LoadWeatherInfo(HCONTACT hContact) // getting weather setting from database
// return 0 on success
-int DBGetData(HCONTACT hContact, char *setting, DBVARIANT *dbv)
+int DBGetData(MCONTACT hContact, char *setting, DBVARIANT *dbv)
{
if ( db_get_ts(hContact, WEATHERCONDITION, setting, dbv)) {
size_t len = strlen(setting) + 1;
@@ -100,7 +100,7 @@ int DBGetData(HCONTACT hContact, char *setting, DBVARIANT *dbv) return 0;
}
-int DBGetStaticString(HCONTACT hContact, const char *szModule, const char *valueName, TCHAR *dest, size_t dest_len)
+int DBGetStaticString(MCONTACT hContact, const char *szModule, const char *valueName, TCHAR *dest, size_t dest_len)
{
DBVARIANT dbv;
if ( db_get_ts( hContact, szModule, valueName, &dbv ))
@@ -121,10 +121,10 @@ void EraseAllInfo() {
TCHAR str[255];
int ContactCount = 0;
- HCONTACT LastContact = NULL;
+ MCONTACT LastContact = NULL;
DBVARIANT dbv;
// loop through all contacts
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
db_set_w(hContact,WEATHERPROTONAME, "Status",ID_STATUS_OFFLINE);
db_set_w(hContact,WEATHERPROTONAME, "StatusIcon",ID_STATUS_OFFLINE);
db_unset(hContact, "CList", "MyHandle");
@@ -424,7 +424,7 @@ int GetWeatherDataFromDB(const char *szSetting, LPARAM lparam) // remove or display the weather information for a contact
// hContact - the contact in which the info is going to be removed
-void DBDataManage(HCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam)
+void DBDataManage(MCONTACT hContact, WORD Mode, WPARAM wParam, LPARAM lParam)
{
LIST<char> arSettings(10);
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index ccf23266cb..75f32395be 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -30,7 +30,7 @@ HGENMENU hMwinMenu; typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hAvt;
BOOL haveAvatar;
} MWinDataType;
@@ -47,7 +47,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara data = (MWinDataType*)mir_calloc(sizeof(MWinDataType));
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)data);
- data->hContact = (HCONTACT)((LPCREATESTRUCT)lParam)->lpCreateParams;
+ data->hContact = (MCONTACT)((LPCREATESTRUCT)lParam)->lpCreateParams;
data->hAvt = CreateWindow(AVATAR_CONTROL_CLASS, TEXT(""), WS_CHILD,
0, 0, opt.AvatarSize, opt.AvatarSize, hwnd, NULL, hInst, 0);
if (data->hAvt) SendMessage(data->hAvt, AVATAR_SETCONTACT, 0, (LPARAM)data->hContact);
@@ -246,7 +246,7 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara return(TRUE);
}
-static void addWindow(HCONTACT hContact)
+static void addWindow(MCONTACT hContact)
{
DBVARIANT dbv;
db_get_ts(hContact, WEATHERPROTONAME, "Nick", &dbv);
@@ -273,7 +273,7 @@ static void addWindow(HCONTACT hContact) db_set_b(hContact, "CList", "Hidden", TRUE);
}
-void removeWindow(HCONTACT hContact)
+void removeWindow(MCONTACT hContact)
{
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
@@ -284,7 +284,7 @@ void removeWindow(HCONTACT hContact) db_unset(hContact, "CList", "Hidden");
}
-void UpdateMwinData(HCONTACT hContact)
+void UpdateMwinData(MCONTACT hContact)
{
HWND hwnd = WindowList_Find(hMwinWindowList, hContact);
if (hwnd != NULL)
@@ -294,11 +294,11 @@ void UpdateMwinData(HCONTACT hContact) INT_PTR Mwin_MenuClicked(WPARAM wParam,LPARAM lParam)
{
- BOOL addwnd = WindowList_Find(hMwinWindowList, (HCONTACT)wParam) == NULL;
+ BOOL addwnd = WindowList_Find(hMwinWindowList, (MCONTACT)wParam) == NULL;
if (addwnd)
- addWindow((HCONTACT)wParam);
+ addWindow((MCONTACT)wParam);
else
- removeWindow((HCONTACT)wParam);
+ removeWindow((MCONTACT)wParam);
return 0;
}
@@ -307,7 +307,7 @@ int BuildContactMenu(WPARAM wparam,LPARAM lparam) {
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS |
- (db_get_dw((HCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0);
+ (db_get_dw((MCONTACT)wparam, WEATHERPROTONAME, "mwin", 0) ? CMIF_CHECKED : 0);
Menu_ModifyItem(hMwinMenu, &mi);
return 0;
}
@@ -372,7 +372,7 @@ void InitMwin(void) strcpy(fontid.prefix, "fnt1");
FontRegisterT(&fontid);
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
addWindow(hContact);
@@ -381,7 +381,7 @@ void InitMwin(void) void DestroyMwin(void)
{
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME)) {
DWORD frameId = db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0);
if (frameId)
CallService(MS_CLIST_FRAMES_REMOVEFRAME, frameId, 0);
diff --git a/plugins/Weather/src/weather_popup.cpp b/plugins/Weather/src/weather_popup.cpp index 27152b0d9b..d1477eee2e 100644 --- a/plugins/Weather/src/weather_popup.cpp +++ b/plugins/Weather/src/weather_popup.cpp @@ -36,13 +36,13 @@ int WeatherPopup(WPARAM wParam, LPARAM lParam) {
// determine if the popup should display or not
if (opt.UsePopup && opt.UpdatePopup && (!opt.PopupOnChange || (BOOL)lParam) &&
- !db_get_b((HCONTACT)wParam, WEATHERPROTONAME, "DPopUp", 0))
+ !db_get_b((MCONTACT)wParam, WEATHERPROTONAME, "DPopUp", 0))
{
- WEATHERINFO winfo = LoadWeatherInfo((HCONTACT)wParam);
+ WEATHERINFO winfo = LoadWeatherInfo((MCONTACT)wParam);
// setup the popup
POPUPDATAT ppd = { 0 };
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.PluginData = ppd.lchIcon = LoadSkinnedProtoIcon(WEATHERPROTONAME, winfo.status);
GetDisplay(&winfo, opt.pTitle, ppd.lptzContactName);
GetDisplay(&winfo, opt.pText, ppd.lptzText);
@@ -120,7 +120,7 @@ int WPShowMessage(TCHAR* lpzText, WORD kind) LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
DWORD ID = 0;
- HCONTACT hContact;
+ MCONTACT hContact;
hContact = PUGetContact(hWnd);
switch(message) {
@@ -248,7 +248,7 @@ INT_PTR CALLBACK DlgPopupOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam) HMENU hMenu, hMenu1;
RECT pos;
HWND button;
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp index 5bbe057899..96033c2ba7 100644 --- a/plugins/Weather/src/weather_svcs.cpp +++ b/plugins/Weather/src/weather_svcs.cpp @@ -110,7 +110,7 @@ INT_PTR WeatherLoadIcon(WPARAM wParam,LPARAM lParam) static void __cdecl AckThreadProc(HANDLE param)
{
Sleep(100);
- ProtoBroadcastAck(WEATHERPROTONAME, (HCONTACT)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck(WEATHERPROTONAME, (MCONTACT)param, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
// nothing to do here because weather proto do not need to retrieve contact info form network
@@ -163,7 +163,7 @@ INT_PTR WeatherGetAvatarInfo(WPARAM wParam, LPARAM lParam) }
-void AvatarDownloaded(HCONTACT hContact)
+void AvatarDownloaded(MCONTACT hContact)
{
PROTO_AVATAR_INFORMATIONT AI = {0};
AI.cbSize = sizeof(AI);
@@ -181,11 +181,11 @@ static void __cdecl WeatherGetAwayMsgThread(void *hContact) Sleep(100);
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck(WEATHERPROTONAME, (HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ if (!db_get_ts((MCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
+ ProtoBroadcastAck(WEATHERPROTONAME, (MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free( &dbv );
}
- else ProtoBroadcastAck(WEATHERPROTONAME, (HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ else ProtoBroadcastAck(WEATHERPROTONAME, (MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
static INT_PTR WeatherGetAwayMsg(WPARAM wParam, LPARAM lParam)
diff --git a/plugins/Weather/src/weather_update.cpp b/plugins/Weather/src/weather_update.cpp index a951d5980b..3736b1a87f 100644 --- a/plugins/Weather/src/weather_update.cpp +++ b/plugins/Weather/src/weather_update.cpp @@ -34,7 +34,7 @@ UPDATELIST *UpdateListTail; // retrieve weather info and display / log them
// hContact = current contact
-int UpdateWeather(HCONTACT hContact)
+int UpdateWeather(MCONTACT hContact)
{
TCHAR str[256], str2[MAX_TEXT_SIZE];
DBVARIANT dbv;
@@ -219,7 +219,7 @@ int UpdateWeather(HCONTACT hContact) // a linked list queue for updating weather station
// this function add a weather contact to the end of queue for update
// hContact = current contact
-void UpdateListAdd(HCONTACT hContact)
+void UpdateListAdd(MCONTACT hContact)
{
UPDATELIST *newItem = (UPDATELIST*)mir_alloc(sizeof(UPDATELIST));
newItem->hContact = hContact;
@@ -236,9 +236,9 @@ void UpdateListAdd(HCONTACT hContact) // get the first item from the update queue and remove it from the queue
// return value = the contact for next update
-HCONTACT UpdateGetFirst()
+MCONTACT UpdateGetFirst()
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
WaitForSingleObject(hUpdateMutex, INFINITE);
@@ -283,10 +283,10 @@ void DestroyUpdateList(void) void UpdateAll(BOOL AutoUpdate, BOOL RemoveData)
{
// add all weather contact to the update queue list
- for (HCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
+ for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if ( !db_get_b(hContact,WEATHERPROTONAME, "AutoUpdate",FALSE) || !AutoUpdate) {
if (RemoveData)
- DBDataManage((HCONTACT)hContact, WDBM_REMOVE, 0, 0);
+ DBDataManage((MCONTACT)hContact, WDBM_REMOVE, 0, 0);
UpdateListAdd(hContact);
}
@@ -300,9 +300,9 @@ void UpdateAll(BOOL AutoUpdate, BOOL RemoveData) // wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((HCONTACT)wParam)) {
+ if (IsMyContact((MCONTACT)wParam)) {
// add the station to the end of the update queue
- UpdateListAdd((HCONTACT)wParam);
+ UpdateListAdd((MCONTACT)wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get
@@ -318,10 +318,10 @@ INT_PTR UpdateSingleStation(WPARAM wParam, LPARAM lParam) // wParam = handle for the weather station that is going to be updated
INT_PTR UpdateSingleRemove(WPARAM wParam, LPARAM lParam)
{
- if (IsMyContact((HCONTACT)wParam)) {
+ if (IsMyContact((MCONTACT)wParam)) {
// add the station to the end of the update queue, and also remove old data
- DBDataManage((HCONTACT)wParam, WDBM_REMOVE, 0, 0);
- UpdateListAdd((HCONTACT)wParam);
+ DBDataManage((MCONTACT)wParam, WDBM_REMOVE, 0, 0);
+ UpdateListAdd((MCONTACT)wParam);
// if it is not updating, then start the update thread process
// if it is updating, the stations just added to the queue will get updated by the already-running process
@@ -373,7 +373,7 @@ INT_PTR UpdateAllRemove(WPARAM wParam,LPARAM lParam) { // getting weather data and save them into the database
// hContact = the contact to get the data
-int GetWeatherData(HCONTACT hContact)
+int GetWeatherData(MCONTACT hContact)
{
// get eacnh part of the id's
TCHAR id[256];
diff --git a/plugins/Weather/src/weather_userinfo.cpp b/plugins/Weather/src/weather_userinfo.cpp index 827badd085..d6e3f1b64e 100644 --- a/plugins/Weather/src/weather_userinfo.cpp +++ b/plugins/Weather/src/weather_userinfo.cpp @@ -46,7 +46,7 @@ int UserInfoInit(WPARAM wParam, LPARAM lParam) }
else {
// check if it is a weather contact
- if (IsMyContact((HCONTACT)lParam)) {
+ if (IsMyContact((MCONTACT)lParam)) {
// register the contact info page
odp.pszTemplate = MAKEINTRESOURCEA(IDD_USERINFO);
odp.pfnDlgProc = DlgProcUIPage;
@@ -64,16 +64,16 @@ INT_PTR CALLBACK DlgProcUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPa WEATHERINFO w;
TCHAR str[MAX_TEXT_SIZE];
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
SendMessage(GetDlgItem(hwndDlg,IDC_MOREDETAIL), BUTTONSETASFLATBTN, TRUE, 0);
// save the contact handle for later use
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
// load weather info for the contact
- w = LoadWeatherInfo((HCONTACT)lParam);
+ w = LoadWeatherInfo((MCONTACT)lParam);
SetDlgItemText(hwndDlg, IDC_INFO1, GetDisplay(&w, TranslateT("Current condition for %n"), str));
SendDlgItemMessage(hwndDlg, IDC_INFOICON, STM_SETICON,
@@ -158,12 +158,12 @@ static int BriefDlgResizer(HWND hwnd, LPARAM lParam, UTILRESIZECONTROL *urc) INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
static const unsigned tabstops = 48;
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
// save the contact handle for later use
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)hContact);
SendDlgItemMessage(hwndDlg, IDC_MTEXT, EM_AUTOURLDETECT, (WPARAM) TRUE, 0);
@@ -327,7 +327,7 @@ INT_PTR CALLBACK DlgProcMoreData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l // set the title of the dialog and on the which rectangle
// also load brief info into message box
-void LoadBriefInfoText(HWND hwndDlg, HCONTACT hContact)
+void LoadBriefInfoText(HWND hwndDlg, MCONTACT hContact)
{
WEATHERINFO winfo;
TCHAR str[4096], str2[4096];
@@ -354,8 +354,8 @@ void LoadBriefInfoText(HWND hwndDlg, HCONTACT hContact) int BriefInfo(WPARAM wParam, LPARAM lParam)
{
// make sure that the contact is actually a weather one
- if (IsMyContact((HCONTACT)wParam)) {
- HWND hMoreDataDlg = WindowList_Find(hDataWindowList, (HCONTACT)wParam);
+ if (IsMyContact((MCONTACT)wParam)) {
+ HWND hMoreDataDlg = WindowList_Find(hDataWindowList, (MCONTACT)wParam);
if (hMoreDataDlg != NULL) {
SetForegroundWindow(hMoreDataDlg);
SetFocus(hMoreDataDlg);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp index 1432bb4c4e..0778402772 100644 --- a/plugins/WebView/src/main.cpp +++ b/plugins/WebView/src/main.cpp @@ -96,7 +96,7 @@ void ChangeContactStatus(int con_stat) if (con_stat == 3)
status_code = ID_STATUS_NA;
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
db_set_w(hContact, MODULENAME, "Status", status_code);
}
diff --git a/plugins/WebView/src/webview.cpp b/plugins/WebView/src/webview.cpp index a176e7b81a..46d70533f1 100644 --- a/plugins/WebView/src/webview.cpp +++ b/plugins/WebView/src/webview.cpp @@ -104,7 +104,7 @@ void FillFontListThread(void *param) /*****************************************************************************/
void TxtclrLoop()
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
InvalidateRect(hwndDlg, NULL, 1);
@@ -114,7 +114,7 @@ void TxtclrLoop() /*****************************************************************************/
void BGclrLoop()
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
HWND hwndDlg = (WindowList_Find(hWindowList, hContact));
SetDlgItemText(hwndDlg, IDC_DATA, _T(""));
SendMessage(GetDlgItem(hwndDlg, IDC_DATA), EM_SETBKGNDCOLOR, 0, BackgoundClr);
@@ -128,7 +128,7 @@ void StartUpdate(void *dummy) StartUpDelay = 1;
Sleep(((db_get_dw(NULL, MODULENAME, START_DELAY_KEY, 0)) * SECOND));
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
GetData((void*)hContact);
StartUpDelay = 0;
@@ -138,7 +138,7 @@ void StartUpdate(void *dummy) void ContactLoop(void *dummy)
{
if (StartUpDelay == 0) {
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
GetData((void*)hContact);
Sleep(10); // avoid 100% CPU
}
@@ -176,7 +176,7 @@ void InitialiseGlobals(void) /*****************************************************************************/
int Doubleclick(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *szProto = GetContactProto(hContact);
if ( lstrcmpA(MODULENAME, szProto))
return 0;
@@ -371,7 +371,7 @@ int ModulesLoaded(WPARAM, LPARAM) /*****************************************************************************/
INT_PTR DataWndMenuCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hwndDlg = WindowList_Find(hWindowList, hContact);
if (hwndDlg != NULL) {
DestroyWindow(hwndDlg);
@@ -432,7 +432,7 @@ INT_PTR AddContactMenuCommand(WPARAM, LPARAM) }
/*****************************************************************************/
-int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
+int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact)
{
int ontop = 0;
int done = 0;
@@ -455,7 +455,7 @@ int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact) /*****************************************************************************/
INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT url( db_get_tsa(hContact, MODULENAME, "URL"));
if (url)
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
@@ -465,7 +465,7 @@ INT_PTR WebsiteMenuCommand(WPARAM wParam, LPARAM lParam) }
/*****************************************************************************/
-int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact)
+int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact)
{
mir_forkthread(GetData, (void*)singlecontact);
return 0;
@@ -474,14 +474,14 @@ int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact) /*****************************************************************************/
int ContactMenuItemUpdateData(WPARAM wParam, LPARAM lParam)
{
- UpdateMenuCommand(wParam, lParam, (HCONTACT)wParam);
+ UpdateMenuCommand(wParam, lParam, (MCONTACT)wParam);
return 0;
}
/*****************************************************************************/
INT_PTR CntOptionsMenuCommand(WPARAM wParam, LPARAM)
{
- HWND hwndDlg = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwndDlg = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwndDlg) {
DestroyWindow(hwndDlg);
return 0;
@@ -496,7 +496,7 @@ INT_PTR CntOptionsMenuCommand(WPARAM wParam, LPARAM) /*****************************************************************************/
INT_PTR CntAlertMenuCommand(WPARAM wParam, LPARAM)
{
- HWND hwndDlg = WindowList_Find(hWindowList, (HCONTACT) wParam);
+ HWND hwndDlg = WindowList_Find(hWindowList, (MCONTACT) wParam);
if (hwndDlg) {
DestroyWindow(hwndDlg);
return 0;
diff --git a/plugins/WebView/src/webview.h b/plugins/WebView/src/webview.h index 73c410bf7d..8884763804 100644 --- a/plugins/WebView/src/webview.h +++ b/plugins/WebView/src/webview.h @@ -190,8 +190,8 @@ INT_PTR ShowHideContactCommand(WPARAM wParam, LPARAM lParam); INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam);
INT_PTR StpPrcssMenuCommand(WPARAM wParam, LPARAM lParam);
-int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact);
-int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, HCONTACT singlecontact);
+int UpdateMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact);
+int OnTopMenuCommand(WPARAM wParam, LPARAM lParam, MCONTACT singlecontact);
//
void ChangeContactStatus(int con_stat);
@@ -206,7 +206,7 @@ void RemoveTabs(char *truncated); void FastTagFilter(char *truncated);
void EraseBlock(char *truncated);
void EraseSymbols(char *truncated);
-int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent);
+int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent);
INT_PTR CALLBACK DlgPopUpOpts(HWND hdlg, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -223,8 +223,8 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM void AckFunc(void *dummy);
int SiteDeleted(WPARAM wParam, LPARAM lParam);
-int WErrorPopup(HCONTACT hContact, TCHAR *textdisplay);
-int WAlertPopup(HCONTACT hContact, TCHAR *displaytext);
+int WErrorPopup(MCONTACT hContact, TCHAR *textdisplay);
+int WAlertPopup(MCONTACT hContact, TCHAR *displaytext);
//////////////////////
// wrappers
diff --git a/plugins/WebView/src/webview_alerts.cpp b/plugins/WebView/src/webview_alerts.cpp index 5a3bca1cb4..946856a3ab 100644 --- a/plugins/WebView/src/webview_alerts.cpp +++ b/plugins/WebView/src/webview_alerts.cpp @@ -29,7 +29,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) switch (message) {
case WM_COMMAND:
case WM_CONTEXTMENU:
- HCONTACT hContact = PUGetContact(hWnd);
+ MCONTACT hContact = PUGetContact(hWnd);
ptrT url( db_get_tsa(hContact, MODULENAME, URL_KEY));
if (message == WM_COMMAND) { // left click
@@ -44,7 +44,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if ( db_get_b(NULL, MODULENAME, LCLK_WEB_PGE_KEY, 0)) {
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
PUDeletePopup(hWnd);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
}
// dismiss
if ( db_get_b(NULL, MODULENAME, LCLK_DISMISS_KEY, 1))
@@ -65,7 +65,7 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if ( db_get_b(NULL, MODULENAME, RCLK_WEB_PGE_KEY, 1)) {
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
PUDeletePopup(hWnd);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
}
// dismiss
if ( db_get_b(NULL, MODULENAME, RCLK_DISMISS_KEY, 0))
@@ -81,28 +81,28 @@ int CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) }
/*****************************************************************************/
-int WDisplayDataAlert(HCONTACT hContact)
+int WDisplayDataAlert(MCONTACT hContact)
{
NotifyEventHooks(hHookDisplayDataAlert, (WPARAM)hContact, 0);
return 0;
}
/*****************************************************************************/
-int WAlertPopup(HCONTACT hContact, TCHAR *displaytext)
+int WAlertPopup(MCONTACT hContact, TCHAR *displaytext)
{
NotifyEventHooks(hHookAlertPopup, (WPARAM)hContact, (LPARAM)displaytext);
return 0;
}
/*****************************************************************************/
-int WErrorPopup(HCONTACT hContact, TCHAR *textdisplay)
+int WErrorPopup(MCONTACT hContact, TCHAR *textdisplay)
{
NotifyEventHooks(hHookErrorPopup, (WPARAM)hContact, (LPARAM) textdisplay);
return 0;
}
/*****************************************************************************/
-int WAlertOSD(HCONTACT hContact, TCHAR *displaytext)
+int WAlertOSD(MCONTACT hContact, TCHAR *displaytext)
{
NotifyEventHooks(hHookAlertOSD, (WPARAM)hContact, (LPARAM) displaytext);
return 0;
@@ -115,13 +115,13 @@ int WPopupAlert(WPARAM wParam, LPARAM lParam) if( ((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- db_get_ts((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
+ db_get_ts((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv);
lstrcpyn(ppd.lptzContactName, dbv.ptszVal, SIZEOF(ppd.lptzContactName));
db_free(&dbv);
}
else lstrcpy(ppd.lptzContactName, _A2T(MODULENAME));
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
TCHAR *displaytext = (TCHAR*)lParam;
@@ -158,7 +158,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) POPUPDATA ppd = { 0 };
if (((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- if ( !db_get_s((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
lstrcpynA(ppd.lptzContactName, dbv.pszVal, SIZEOF(ppd.lptzContactName));
db_free(&dbv);
}
@@ -166,7 +166,7 @@ int PopupAlert(WPARAM wParam, LPARAM lParam) if (ppd.lptzContactName[0] == 0)
strncpy_s(ppd.lptzContactName, SIZEOF(ppd.lptzContactName), MODULENAME, _TRUNCATE);
- ppd.lchContact = (HCONTACT)wParam;
+ ppd.lchContact = (MCONTACT)wParam;
ppd.lchIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
char *displaytext = (char*)lParam;
@@ -205,7 +205,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam) if (((HANDLE)wParam) != NULL) {
DBVARIANT dbv;
- if ( !db_get_s((HCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
+ if ( !db_get_s((MCONTACT)wParam, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
strncpy_s(contactname, SIZEOF(contactname), dbv.pszVal, _TRUNCATE);
db_free(&dbv);
}
@@ -225,7 +225,7 @@ int OSDAlert(WPARAM wParam, LPARAM lParam) /*****************************************************************************/
int ErrorMsgs(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR newdisplaytext[2000], *displaytext = (TCHAR*)lParam;
if ( db_get_b(NULL, MODULENAME, SUPPRESS_ERR_KEY, 0))
@@ -254,7 +254,7 @@ int ErrorMsgs(WPARAM wParam, LPARAM lParam) }
/*****************************************************************************/
-void SaveToFile(HCONTACT hContact, char *truncated)
+void SaveToFile(MCONTACT hContact, char *truncated)
{
char *mode;
if (!db_get_b(hContact, MODULENAME, APPEND_KEY, 0))
@@ -299,7 +299,7 @@ void SaveToFile(HCONTACT hContact, char *truncated) }
/*****************************************************************************/
-int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent)
+int ProcessAlerts(MCONTACT hContact, char *truncated, char *tstr, char *contactname, int notpresent)
{
char alertstring[255];
TCHAR displaystring[300];
@@ -479,7 +479,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn // file exists?
if ( _taccess(newcachepath, 0) != -1) {
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot read from file"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
ZeroMemory(&cachecompare, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
@@ -488,7 +488,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn }
// write to cache
if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot write to file 1"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot write to file 1"));
else {
fwrite(tempraw, strlen(tempraw), 1, pcachefile); //smaller cache
fclose(pcachefile);
@@ -691,7 +691,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn // file exists?
if ( _taccess(newcachepath, 0) != -1) {
if ((pcachefile = _tfopen(newcachepath, _T("r"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot read from file"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot read from file"));
else {
ZeroMemory(&cachecompare, sizeof(cachecompare));
fread(cachecompare, sizeof(cachecompare), 1, pcachefile);
@@ -700,7 +700,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn }
// write to cache
if ((pcachefile = _tfopen(newcachepath, _T("w"))) == NULL)
- WErrorPopup((HCONTACT)contactname, TranslateT("Cannot write to file 2"));
+ WErrorPopup((MCONTACT)contactname, TranslateT("Cannot write to file 2"));
else {
fwrite(raw, strlen(raw), 1, pcachefile); //smaller cache
db_set_ts(hContact, MODULENAME, CACHE_FILE_KEY, newcachepath);
@@ -814,7 +814,7 @@ int ProcessAlerts(HCONTACT hContact, char *truncated, char *tstr, char *contactn /*****************************************************************************/
int DataWndAlertCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if ( WindowList_Find(hWindowList, hContact))
return 0;
@@ -838,7 +838,7 @@ int DataWndAlertCommand(WPARAM wParam, LPARAM lParam) /*****************************************************************************/
void ReadFromFile(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
DBVARIANT dbv;
char truncated[MAXSIZE1];
diff --git a/plugins/WebView/src/webview_datawnd.cpp b/plugins/WebView/src/webview_datawnd.cpp index 24ba98a50b..1f13631e52 100644 --- a/plugins/WebView/src/webview_datawnd.cpp +++ b/plugins/WebView/src/webview_datawnd.cpp @@ -119,16 +119,16 @@ INT_PTR CALLBACK DlgProcFind(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara static TCHAR tszSizeString[] = _T("xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx");
-static HCONTACT FindContactByUrl(HWND hwndDlg)
+static MCONTACT FindContactByUrl(HWND hwndDlg)
{
- HCONTACT res = NULL;
+ MCONTACT res = NULL;
TCHAR urltext[300], titlebartxt[300];
int contactcount = 0;
GetDlgItemText(hwndDlg, IDC_OPEN_URL, urltext, SIZEOF(urltext));
GetWindowText(hwndDlg, titlebartxt, SIZEOF(titlebartxt));
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
ptrT db1( db_get_tsa(hContact, MODULENAME, URL_KEY));
ptrT db2( db_get_tsa(hContact, MODULENAME, PRESERVE_NAME_KEY));
@@ -149,13 +149,13 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA DBVARIANT dbv;
RECT rc;
TCHAR url[300];
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
{
- HCONTACT hContact2 = (HCONTACT)lParam;
+ MCONTACT hContact2 = (MCONTACT)lParam;
SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact2);
WindowList_Add(hWindowList, hwndDlg, hContact2);
@@ -339,7 +339,7 @@ INT_PTR CALLBACK DlgProcDisplayData(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA case IDC_OPEN_URL:
GetDlgItemText(hwndDlg, IDC_OPEN_URL, url, SIZEOF(url));
CallService(MS_UTILS_OPENURL, OUF_TCHAR, (LPARAM)url);
- db_set_w((HCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
+ db_set_w((MCONTACT)wParam, MODULENAME, "Status", ID_STATUS_ONLINE);
break;
case IDC_UPDATE_BUTTON:
diff --git a/plugins/WebView/src/webview_getdata.cpp b/plugins/WebView/src/webview_getdata.cpp index b56688180c..0c885b9012 100644 --- a/plugins/WebView/src/webview_getdata.cpp +++ b/plugins/WebView/src/webview_getdata.cpp @@ -29,7 +29,7 @@ int AlreadyDownloading = 0; /*******************/
void GetData(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
int statpos = 0, dispos = 0, statposend = 0;
char*pos;
DBVARIANT dbv;
diff --git a/plugins/WebView/src/webview_opts.cpp b/plugins/WebView/src/webview_opts.cpp index fd3246dc47..168ac8c2b4 100644 --- a/plugins/WebView/src/webview_opts.cpp +++ b/plugins/WebView/src/webview_opts.cpp @@ -277,7 +277,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int alertIndex = 0;
int eventIndex = 0;
static int test;
- HCONTACT hContact;
+ MCONTACT hContact;
ParentHwnd = GetParent(hwndDlg);
@@ -285,7 +285,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case WM_INITDIALOG:
test = 0;
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
SetWindowLong(hwndDlg, GWLP_USERDATA, (LONG) hContact);
@@ -509,7 +509,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l break;
case IDC_ENABLE_ALERTS:
- hContact = (HCONTACT)GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT)GetWindowLong(hwndDlg, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwndDlg, IDC_ADD_DATE_NAME), (IsDlgButtonChecked(hwndDlg, IDC_ENABLE_ALERTS)));
if ( IsDlgButtonChecked(hwndDlg, IDC_ADD_DATE_NAME)) {
@@ -631,7 +631,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_ALERT_TYPE:
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE) {
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
int alertIndex = SendDlgItemMessage(hwndDlg, IDC_ALERT_TYPE, CB_GETCURSEL, 0, 0);
if (HIWORD(wParam) == CBN_SELCHANGE) {
@@ -678,7 +678,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_EVENT_TYPE:
if (HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE) {
- HCONTACT hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
int eventIndex = SendDlgItemMessage(hwndDlg, IDC_EVENT_TYPE, CB_GETCURSEL, 0, 0);
if (HIWORD(wParam) == CBN_SELCHANGE) {
@@ -709,7 +709,7 @@ INT_PTR CALLBACK DlgProcAlertOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_ALERT_APPLY:
case IDC_OK2:
{
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
TCHAR buf[MAX_PATH];
eventIndex = db_get_b(hContact, MODULENAME, EVNT_INDEX_KEY, 0);
@@ -815,13 +815,13 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM HWND ParentHwnd = GetParent(hwndDlg);
static int test;
static int test2;
- HCONTACT hContact;
+ MCONTACT hContact;
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hwndDlg);
- hContact = (HCONTACT) lParam;
+ hContact = (MCONTACT) lParam;
test = 0;
test2 = 0;
@@ -927,7 +927,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM case IDC_CPY_STRINGS:
{
TCHAR string[128];
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_START, string, SIZEOF(string));
db_set_ts(hContact, MODULENAME, ALRT_S_STRING_KEY, string);
@@ -1022,7 +1022,7 @@ INT_PTR CALLBACK DlgProcContactOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
}
- hContact = (HCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
+ hContact = (MCONTACT) GetWindowLong(hwndDlg, GWLP_USERDATA);
GetDlgItemText(hwndDlg, IDC_URL, url, SIZEOF(url));
db_set_ts(hContact, MODULENAME, URL_KEY, url);
diff --git a/plugins/WebView/src/webview_services.cpp b/plugins/WebView/src/webview_services.cpp index 717966f75d..94b28249d2 100644 --- a/plugins/WebView/src/webview_services.cpp +++ b/plugins/WebView/src/webview_services.cpp @@ -32,7 +32,7 @@ static char szInvalidChars[] = { '\\', '/', ':', '*', '?', '\"', '<', '>', '|' } int DBSettingChanged(WPARAM wParam, LPARAM lParam)
{
// We can't upload changes to NULL contact
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -60,7 +60,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) for (int i=0; i < SIZEOF(szInvalidChars); i++ ) {
TCHAR *p = _tcschr(nick, szInvalidChars[i]);
if (p != NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Invalid symbol present in contact name."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Invalid symbol present in contact name."));
*p = '_';
invalidpresent =1;
}
@@ -111,7 +111,7 @@ int DBSettingChanged(WPARAM wParam, LPARAM lParam) /*****************************************************************************/
int SiteDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (lstrcmpA(GetContactProto(hContact), MODULENAME))
return 0;
@@ -152,7 +152,7 @@ INT_PTR OpenCacheDir(WPARAM, LPARAM) mir_sntprintf(cachedirectorypath, SIZEOF(cachedirectorypath), _T("%s")_T(MODULENAME)_T("cache\\%s"), cachepath, cacheend);
if( _taccess(cachedirectorypath, 0) != 0)
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Cache folder does not exist."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Cache folder does not exist."));
else
ShellExecute(NULL, _T("open"), cachedirectorypath, NULL, NULL, SW_SHOWNORMAL);
return 0;
@@ -163,11 +163,11 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam) {
FILE *pfile = fopen("psite.bat", "r");
if (pfile == NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Missing \"psite.bat\" file."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Missing \"psite.bat\" file."));
return 0;
}
- ptrT url( db_get_tsa((HCONTACT)wParam, MODULENAME, "URL"));
+ ptrT url( db_get_tsa((MCONTACT)wParam, MODULENAME, "URL"));
if (url == NULL)
return 0;
@@ -188,7 +188,7 @@ INT_PTR PingWebsiteMenuCommand(WPARAM wParam, LPARAM lParam) /*****************************************************************************/
INT_PTR StpPrcssMenuCommand(WPARAM wParam, LPARAM)
{
- db_set_b((HCONTACT)wParam, MODULENAME, STOP_KEY, 1);
+ db_set_b((MCONTACT)wParam, MODULENAME, STOP_KEY, 1);
return 0;
}
@@ -251,7 +251,7 @@ INT_PTR SetStatus(WPARAM wParam, LPARAM lParam) // Make sure no contact has offline status for any reason on first time run
if ( db_get_b(NULL, MODULENAME, "FirstTime", 100) == 100) {
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
db_set_w(hContact, MODULENAME, "Status", ID_STATUS_ONLINE);
db_set_b(NULL, MODULENAME, "FirstTime", 1);
@@ -341,7 +341,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) int samename = 0;
// search for existing contact
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME)) {
// check ID to see if the contact already exist in the database
if (!db_get_ts(hContact, MODULENAME, "URL", &dbv)) {
if (!lstrcmpi(psr->nick, dbv.ptszVal)) {
@@ -359,7 +359,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) }
if (psr->nick == NULL) {
- WErrorPopup((HCONTACT)"ERROR", TranslateT("Please select site in Find/Add contacts..."));
+ WErrorPopup((MCONTACT)"ERROR", TranslateT("Please select site in Find/Add contacts..."));
return 0;
}
@@ -367,7 +367,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return NULL;
- HCONTACT hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) MODULENAME);
/////////write to db
@@ -403,7 +403,7 @@ INT_PTR AddToList(WPARAM wParam, LPARAM lParam) TCHAR *Nend = _tcschr(Newnick, '.');
if (Nend) *Nend = '\0';
- for (HCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
+ for (MCONTACT hContact2 = db_find_first(MODULENAME); hContact2 != NULL; hContact2 = db_find_next(hContact2, MODULENAME)) {
if (!db_get_ts(hContact2, MODULENAME, PRESERVE_NAME_KEY, &dbv)) {
if (!lstrcmpi(Newnick, dbv.ptszVal)) {
// remove the flag for not on list and hidden, thus make the
@@ -461,6 +461,6 @@ INT_PTR GetInfo(WPARAM, LPARAM) /*****************************************************************************/
void AckFunc(void *dummy)
{
- for (HCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
+ for (MCONTACT hContact = db_find_first(MODULENAME); hContact != NULL; hContact = db_find_next(hContact, MODULENAME))
ProtoBroadcastAck(MODULENAME, hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
diff --git a/plugins/WhenWasIt/src/birthdays.cpp b/plugins/WhenWasIt/src/birthdays.cpp index d3615a06f9..ccea05193f 100644 --- a/plugins/WhenWasIt/src/birthdays.cpp +++ b/plugins/WhenWasIt/src/birthdays.cpp @@ -82,7 +82,7 @@ void CBirthdays::Realloc(int increaseCapacity) birthdays = (PBirthdayContact *) realloc(birthdays, size * sizeof(PBirthdayContact));
}
-int CBirthdays::Add(HCONTACT hContact, HANDLE hClistIcon)
+int CBirthdays::Add(MCONTACT hContact, HANDLE hClistIcon)
{
if ( !Contains(hContact)) {
EnsureCapacity();
@@ -107,12 +107,12 @@ int CBirthdays::Remove(int index) return -1;
}
-int CBirthdays::Remove(HCONTACT hContact)
+int CBirthdays::Remove(MCONTACT hContact)
{
return Remove( Index(hContact));
}
-int CBirthdays::Contains(HCONTACT hContact) const
+int CBirthdays::Contains(MCONTACT hContact) const
{
for (int i = 0; i < count; i++)
if (birthdays[i]->hContact == hContact)
@@ -121,7 +121,7 @@ int CBirthdays::Contains(HCONTACT hContact) const return FALSE;
}
-int CBirthdays::Index(HCONTACT hContact) const
+int CBirthdays::Index(MCONTACT hContact) const
{
for (int i = 0; i < count; i++)
if (birthdays[i]->hContact == hContact)
@@ -140,7 +140,7 @@ int CBirthdays::GetAdvancedIconIndex() const return advancedIcon;
}
-HANDLE CBirthdays::GetClistIcon(HCONTACT hContact) const
+HANDLE CBirthdays::GetClistIcon(MCONTACT hContact) const
{
int index = Index(hContact);
if ((index >= 0) && (index < count))
diff --git a/plugins/WhenWasIt/src/birthdays.h b/plugins/WhenWasIt/src/birthdays.h index f42b8dc09c..8336feaaf8 100644 --- a/plugins/WhenWasIt/src/birthdays.h +++ b/plugins/WhenWasIt/src/birthdays.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define M_WWI_BIRTHDAYS_H
struct TBirthdayContact{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hClistIcon;
};
@@ -45,19 +45,19 @@ class CBirthdays CBirthdays(int initialSize = 10);
~CBirthdays();
- int Add(HCONTACT hContact, HANDLE hClistIcon);
+ int Add(MCONTACT hContact, HANDLE hClistIcon);
int Remove(int index);
- int Remove(HCONTACT hContact);
+ int Remove(MCONTACT hContact);
void Clear();
void Destroy();
- int Index(HCONTACT hContact) const;
- int Contains(HCONTACT hContact) const;
+ int Index(MCONTACT hContact) const;
+ int Contains(MCONTACT hContact) const;
void SetAdvancedIconIndex(int advIcon);
int GetAdvancedIconIndex() const;
- HANDLE GetClistIcon(HCONTACT hContact) const;
+ HANDLE GetClistIcon(MCONTACT hContact) const;
int Count() const;
int Size() const;
diff --git a/plugins/WhenWasIt/src/date_utils.cpp b/plugins/WhenWasIt/src/date_utils.cpp index 863371eead..c10fdfe56b 100644 --- a/plugins/WhenWasIt/src/date_utils.cpp +++ b/plugins/WhenWasIt/src/date_utils.cpp @@ -33,7 +33,7 @@ bool IsDOBValid(int year, int month, int day) return (year != 0 && month != 0 && day != 0);
}
-int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day)
+int GetContactDOB(MCONTACT hContact, int &year, int &month, int &day)
{
year = db_get_w(hContact, "UserInfo", "DOBy", 0);
month = db_get_b(hContact, "UserInfo", "DOBm", 0);
@@ -69,7 +69,7 @@ int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day) return DOB_UNKNOWN;
}
-int GetContactAge(HCONTACT hContact)
+int GetContactAge(MCONTACT hContact)
{
int year, month, day;
time_t tNow;
@@ -79,7 +79,7 @@ int GetContactAge(HCONTACT hContact) return (now->tm_year + 1900) - year;
}
-char GetContactGender(HCONTACT hContact)
+char GetContactGender(MCONTACT hContact)
{
char gender = db_get_b(hContact, "UserInfo", "Gender", 'U');
if (gender == 'U')
@@ -185,7 +185,7 @@ void FillStandard(char *&module, char *&sYear, char *&sMonth, char *&sDay) sDay = "DOBd";
}
-int SaveBirthday(HCONTACT hContact, int year, int month, int day, int mode)
+int SaveBirthday(MCONTACT hContact, int year, int month, int day, int mode)
{
char *sModule, *sdModule, *sd2Module; //s* = keep, sd* = delete, sd2* = delete
char *sYear, *sdYear, *sd2Year;
diff --git a/plugins/WhenWasIt/src/date_utils.h b/plugins/WhenWasIt/src/date_utils.h index db69702729..d0f5d171dc 100644 --- a/plugins/WhenWasIt/src/date_utils.h +++ b/plugins/WhenWasIt/src/date_utils.h @@ -42,10 +42,10 @@ bool IsDOBValid(int year, int month, int day); unsigned int DaysToBirthday(time_t now, int ctYear, int ctMonth, int ctDay);
int DaysAfterBirthday(time_t now, int ctYear, int ctMonth, int ctDay);
-int GetContactAge(HCONTACT hContact);
-int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day);
-char GetContactGender(HCONTACT hContact);
+int GetContactAge(MCONTACT hContact);
+int GetContactDOB(MCONTACT hContact, int &year, int &month, int &day);
+char GetContactGender(MCONTACT hContact);
-int SaveBirthday(HCONTACT hContact, int year, int month, int day, int mode);
+int SaveBirthday(MCONTACT hContact, int year, int month, int day, int mode);
#endif //H_WWI_DATE_UTILS_H
\ No newline at end of file diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index a38258c5c8..ff123eed26 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -272,7 +272,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case IDC_PREVIEW:
{
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
int dtb = rand() % 11; //0..10
int age = rand() % 50 + 1; //1..50
PopupNotifyBirthday(hContact, dtb, age);
@@ -391,14 +391,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hWnd);
SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam);
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
WindowList_Add(hAddBirthdayWndsList, hWnd, hContact);
Utils_RestoreWindowPositionNoSize(hWnd,hContact,ModuleName,"BirthdayWnd");
}
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l case IDOK:
{
SYSTEMTIME st;
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
HWND hDate = GetDlgItem(hWnd, IDC_DATE);
if (DateTime_GetSystemtime(hDate, &st) == GDT_VALID) {
int mode = SendMessage(GetDlgItem(hWnd, IDC_COMPATIBILITY), CB_GETCURSEL, 0, 0); //SAVE modes in date_utils.h are synced
@@ -519,7 +519,7 @@ void AddAnchorWindowToDeferList(HDWP &hdWnds, HWND window, RECT *rParent, WINDOW #define NA TranslateT("N/A")
-TCHAR *GetBirthdayModule(int module, HCONTACT hContact)
+TCHAR *GetBirthdayModule(int module, MCONTACT hContact)
{
switch (module) {
case DOB_MBIRTHDAY: return _T("mBirthday");
@@ -569,7 +569,7 @@ INT_PTR CALLBACK BirthdaysCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam }
//only updates the birthday part of the list view entry. Won't update the szProto and the contact name (those shouldn't change anyway :))
-int UpdateBirthdayEntry(HWND hList, HCONTACT hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
+int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
{
int currentMonth, currentDay;
int res = entry;
@@ -655,14 +655,14 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP case WM_LBUTTONDBLCLK:
{
int count = ListView_GetItemCount(hWnd);
- HCONTACT hContact;
+ MCONTACT hContact;
LVITEM item = {0};
item.mask = LVIF_PARAM;
for (int i = 0; i < count; i++) {
if (ListView_GetItemState(hWnd, i, LVIS_SELECTED)) {
item.iItem = i;
ListView_GetItem(hWnd, &item);
- hContact = (HCONTACT)item.lParam;
+ hContact = (MCONTACT)item.lParam;
CallService(MS_WWI_ADD_BIRTHDAY, (WPARAM) hContact, 0);
}
}
@@ -686,7 +686,7 @@ int LoadBirthdays(HWND hWnd, int bShowAll) ListView_DeleteAllItems(hList);
int count = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
count = UpdateBirthdayEntry(hList, hContact, count, bShowAll, commonData.cShowAgeMode, 1);
SetBirthdaysCount(hWnd);
@@ -746,7 +746,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa case WWIM_UPDATE_BIRTHDAY:
{//wParam = hContact
HWND hList = GetDlgItem(hWnd, IDC_BIRTHDAYS_LIST);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int i;
int count = ListView_GetItemCount(hList);
//int bShowCurrentAge = db_get_b(NULL, ModuleName, "ShowCurrentAge", 0);
@@ -757,7 +757,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa for (i = 0; (i < count) && (!found); i++) {
item.iItem = i;
ListView_GetItem(hList, &item);
- if (hContact == (HCONTACT)item.lParam) {
+ if (hContact == (MCONTACT)item.lParam) {
UpdateBirthdayEntry(hList, hContact, i, IsDlgButtonChecked(hWnd, IDC_SHOW_ALL), commonData.cShowAgeMode, 0);
found = 1;
}
@@ -938,7 +938,7 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar DWORD WINAPI OpenMessageWindowThread(void *data)
{
- HCONTACT hContact = (HCONTACT)data;
+ MCONTACT hContact = (MCONTACT)data;
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM)hContact, 0);
return 0;
@@ -949,7 +949,7 @@ int HandlePopupClick(HWND hWnd, int action) switch (action) {
case 2: //OPEN MESSAGE WINDOW
{
- HCONTACT hContact = (HCONTACT)PUGetContact(hWnd);
+ MCONTACT hContact = (MCONTACT)PUGetContact(hWnd);
if (hContact) {
DWORD threadID;
HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, (void*)hContact, 0, &threadID);
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 98793832d5..94f2f3a355 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -68,7 +68,7 @@ static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) DBCONTACTWRITESETTING *dw = (DBCONTACTWRITESETTING *) lParam;
DBVARIANT dv = dw->value;
if ((strcmp(dw->szModule, DUMMY_MODULE) == 0) && (strcmp(dw->szSetting, DUMMY_SETTING) == 0))
- RefreshContactListIcons((HCONTACT)wParam);
+ RefreshContactListIcons((MCONTACT)wParam);
return 0;
}
@@ -152,7 +152,7 @@ int UnhookEvents() /////////////////////////////////////////////////////////////////////////////////////////
-int RefreshContactListIcons(HCONTACT hContact)
+int RefreshContactListIcons(MCONTACT hContact)
{
if (hContact == 0)
return 0;
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 267b6bd8d7..71e701dc7b 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -64,14 +64,14 @@ TCHAR *BuildDABText(int dab, TCHAR *name, TCHAR *text, int size) return text;
}
-int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age)
+int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
TCHAR text[MAX_SIZE];
//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
if (commonData.bIgnoreSubcontacts) {
- HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
+ MCONTACT hMetacontact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
if ((hMetacontact) && (hMetacontact != hContact)) //not main metacontact
return 0;
}
@@ -108,14 +108,14 @@ int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age) return 0;
}
-int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
+int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
TCHAR text[MAX_SIZE];
//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
if (commonData.bIgnoreSubcontacts) {
- HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
+ MCONTACT hMetacontact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
if (hMetacontact && hMetacontact != hContact) //not main metacontact
return 0;
}
@@ -152,7 +152,7 @@ int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age) return 0;
}
-int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age)
+int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
@@ -178,7 +178,7 @@ int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age) return 0;
}
-int DialogNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
+int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
@@ -218,7 +218,7 @@ int SoundNotifyBirthday(int dtb) //called with oldClistIcon != -1 from dlg_handlers whtn the extra icon slot changes.
int RefreshAllContactListIcons(int oldClistIcon)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (oldClistIcon != -1)
ExtraIcon_Clear(hWWIExtraIcons, hContact);
diff --git a/plugins/WhenWasIt/src/notifiers.h b/plugins/WhenWasIt/src/notifiers.h index 598421078b..7fbeb682c3 100644 --- a/plugins/WhenWasIt/src/notifiers.h +++ b/plugins/WhenWasIt/src/notifiers.h @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DUMMY_SETTING "refreshIconsDummyVal"
struct TUpcomingBirthday{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *name;
TCHAR *message;
int dtb;
@@ -40,13 +40,13 @@ struct TUpcomingBirthday{ typedef TUpcomingBirthday *PUpcomingBirthday;
void PopupNotifyNoBirthdays();
-int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age);
-int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age);
-int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age);
-int DialogNotifyMissedBirthday(HCONTACT hContact, int dab, int age);
+int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age);
+int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age);
+int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age);
+int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age);
int SoundNotifyBirthday(int dtb);
-int RefreshContactListIcons(HCONTACT hContact);
+int RefreshContactListIcons(MCONTACT hContact);
int RefreshAllContactListIcons(int oldClistIcon = -1);
#endif //M_WWI_NOTIFIERS_H
\ No newline at end of file diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index c86a52c81b..79dd45688f 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -87,7 +87,7 @@ int DestroyServices() returns -1 if notify is not necesarry
returns daysToBirthday if it should notify
*/
-int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance)
+int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance)
{
int year, month, day;
GetContactDOB(hContact, year, month, day);
@@ -100,7 +100,7 @@ int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance) // returns -1 if notify is not necessary
// returns daysAfterBirthday if it should notify
-int NotifyMissedContactBirthday(HCONTACT hContact, time_t now, int daysAfter)
+int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter)
{
if (daysAfter > 0)
{
@@ -169,7 +169,7 @@ INT_PTR ShowListService(WPARAM wParam, LPARAM lParam) INT_PTR AddBirthdayService(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = WindowList_Find(hAddBirthdayWndsList, hContact);
if ( !hWnd) {
hWnd = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_ADD_BIRTHDAY), NULL, DlgProcAddBirthday, (LPARAM) hContact);
@@ -194,7 +194,7 @@ DWORD WINAPI RefreshUserDetailsWorkerThread(LPVOID param) int delay = db_get_w(NULL, ModuleName, "UpdateDelay", REFRESH_DETAILS_DELAY);
int res;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while (hContact != NULL) {
res = CallContactService(hContact, PSS_GETINFO, 0, 0);
hContact = db_find_next(hContact);
@@ -301,7 +301,7 @@ int DoImport(TCHAR *fileName) TCHAR *szHandle = buffer;
TCHAR *szProto = delProto + 1;
- HCONTACT hContact = GetContactFromID(szHandle, szProto);
+ MCONTACT hContact = GetContactFromID(szHandle, szProto);
if (hContact) {
delProto[0] = tmp;
delAccount[0] = tmp;
@@ -334,7 +334,7 @@ int DoExport(TCHAR *fileName) _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
_ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int year, month, day;
GetContactDOB(hContact, year, month, day);
if ( IsDOBValid(year, month, day)) {
diff --git a/plugins/WhenWasIt/src/services.h b/plugins/WhenWasIt/src/services.h index 437cc93f73..d4c19194a1 100644 --- a/plugins/WhenWasIt/src/services.h +++ b/plugins/WhenWasIt/src/services.h @@ -42,8 +42,8 @@ extern int bBirthdayFound; int InitServices();
int DestroyServices();
-int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance);
-int NotifyMissedContactBirthday(HCONTACT hContact, time_t now, int daysAfter);
+int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance);
+int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter);
int DoExport(TCHAR *fileName);
int DoImport(TCHAR *fileName);
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp index f09f9ffdca..ec04582ed2 100644 --- a/plugins/WhenWasIt/src/utils.cpp +++ b/plugins/WhenWasIt/src/utils.cpp @@ -118,7 +118,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) i = size;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -156,7 +156,7 @@ int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, si #pragma warning (disable: 4312)
-TCHAR *GetContactName(HCONTACT hContact, char *szProto)
+TCHAR *GetContactName(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo = { sizeof(ctInfo) };
ctInfo.szProto = (szProto) ? szProto : GetContactProto(hContact);
@@ -176,12 +176,12 @@ TCHAR *GetContactName(HCONTACT hContact, char *szProto) return buffer;
}
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
return GetContactID(hContact, GetContactProto(hContact));
}
-TCHAR *GetContactID(HCONTACT hContact, char *szProto)
+TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo = { sizeof(ctInfo) };
ctInfo.szProto = szProto;
@@ -217,9 +217,9 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) return (!ret) ? buffer : NULL;
}
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *m_szProto = GetContactProto(hContact);
TCHAR *szHandle = GetContactID(hContact, szProto);
if (szHandle) {
@@ -232,7 +232,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) return NULL;
}
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
{
char protocol[1024];
WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
diff --git a/plugins/WhenWasIt/src/utils.h b/plugins/WhenWasIt/src/utils.h index 022b79b117..ce7001b6dd 100644 --- a/plugins/WhenWasIt/src/utils.h +++ b/plugins/WhenWasIt/src/utils.h @@ -44,10 +44,10 @@ RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size);
-TCHAR *GetContactName(HCONTACT hContact, char *szProto);
-TCHAR *GetContactID(HCONTACT hContact);
-TCHAR *GetContactID(HCONTACT hContact, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
+TCHAR *GetContactName(MCONTACT hContact, char *szProto);
+TCHAR *GetContactID(MCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
#endif
\ No newline at end of file diff --git a/plugins/WinterSpeak/src/ConfigDatabase.cpp b/plugins/WinterSpeak/src/ConfigDatabase.cpp index 0184e7e5d0..863dd62a71 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.cpp +++ b/plugins/WinterSpeak/src/ConfigDatabase.cpp @@ -47,7 +47,7 @@ void ConfigDatabase::setActiveFlag(ActiveFlag flag, bool state) }
//------------------------------------------------------------------------------
-ConfigDatabase::act ConfigDatabase::getActiveUser(HCONTACT user) const
+ConfigDatabase::act ConfigDatabase::getActiveUser(MCONTACT user) const
{
ActiveUsersMap::const_iterator iter = m_active_users.find(user);
@@ -69,7 +69,7 @@ ConfigDatabase::act ConfigDatabase::getActiveUser(HCONTACT user) const }
//------------------------------------------------------------------------------
-void ConfigDatabase::setActiveUser(HCONTACT user, act state)
+void ConfigDatabase::setActiveUser(MCONTACT user, act state)
{
m_active_users[user].status = state.status;
m_active_users[user].message = state.message;
@@ -89,7 +89,7 @@ void ConfigDatabase::load() m_welcome_msg = DBGetContactSettingString(SPEAK, WELCOME_MSG, L"Welcome to Miranda");
// iterate through all the users and add them to the list if active
- HCONTACT contact = db_find_first();
+ MCONTACT contact = db_find_first();
while (NULL != contact) {
m_active_users[contact].status = (db_get_b(contact, SPEAK, ACTIVE_STATE, true) != 0);
m_active_users[contact].message = (db_get_b(contact, SPEAK, ACTIVE_MSG, true) != 0);
diff --git a/plugins/WinterSpeak/src/ConfigDatabase.h b/plugins/WinterSpeak/src/ConfigDatabase.h index da8b46dc8f..4e7f546aa1 100644 --- a/plugins/WinterSpeak/src/ConfigDatabase.h +++ b/plugins/WinterSpeak/src/ConfigDatabase.h @@ -26,7 +26,7 @@ public: bool message;
};
- typedef std::map<HCONTACT, act> ActiveUsersMap;
+ typedef std::map<MCONTACT, act> ActiveUsersMap;
//--------------------------------------------------------------------------
// Description : get/set the voice description
@@ -49,8 +49,8 @@ public: //--------------------------------------------------------------------------
// Description : get/set the user active flag
//--------------------------------------------------------------------------
- act getActiveUser(HCONTACT user) const;
- void setActiveUser(HCONTACT user, act state);
+ act getActiveUser(MCONTACT user) const;
+ void setActiveUser(MCONTACT user, act state);
ActiveUsersMap getActiveUsers() const { return m_active_users; }
//--------------------------------------------------------------------------
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.cpp b/plugins/WinterSpeak/src/DialogConfigActive.cpp index 8c59b83fca..00487967f5 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.cpp +++ b/plugins/WinterSpeak/src/DialogConfigActive.cpp @@ -255,7 +255,7 @@ void DialogConfigActive::SetAllContactIcons(HWND hwndList, HWND window) { ConfigDatabase::ActiveUsersMap::const_iterator iter;
for (iter = active_users.begin(); iter != active_users.end(); ++iter)
{
- HCONTACT hContact = iter->first;
+ MCONTACT hContact = iter->first;
if(hContact == 0) {
} else {
@@ -331,7 +331,7 @@ void DialogConfigActive::save(HWND window) m_db.setActiveFlag(ConfigDatabase::ActiveFlag_FreeForChat, (IsDlgButtonChecked(window, IDC_ACTIVE_FREEFORCHAT) != 0));
m_db.setActiveFlag(ConfigDatabase::ActiveFlag_Invisible, (IsDlgButtonChecked(window, IDC_ACTIVE_INVISIBLE) != 0));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(window, IDC_ACTIVE_USERS, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
SaveItemMask(GetDlgItem(window, IDC_ACTIVE_USERS), hContact, hItem);
@@ -342,7 +342,7 @@ void DialogConfigActive::save(HWND window) m_db.save();
}
-void DialogConfigActive::SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem) {
+void DialogConfigActive::SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem) {
ConfigDatabase::act mask;
mask.message = true;
mask.status = true;
diff --git a/plugins/WinterSpeak/src/DialogConfigActive.h b/plugins/WinterSpeak/src/DialogConfigActive.h index f1b428972b..d0ece06792 100644 --- a/plugins/WinterSpeak/src/DialogConfigActive.h +++ b/plugins/WinterSpeak/src/DialogConfigActive.h @@ -38,7 +38,7 @@ class DialogConfigActive : public MirandaDialog void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int iColumn, int iImage);
void SetAllChildIcons(HWND hwndList, HANDLE hFirstItem, int iColumn, int iImage);
void SetListGroupIcons(HWND hwndList, HANDLE hFirstItem, HANDLE hParentItem, int *groupChildCount);
- void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem);
+ void SaveItemMask(HWND hwndList, MCONTACT hContact, HANDLE hItem);
static DialogConfigActive *m_instance;
ConfigDatabase &m_db;
diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.cpp b/plugins/WinterSpeak/src/SpeakAnnounce.cpp index 1d95b743f6..766e2e90eb 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.cpp +++ b/plugins/WinterSpeak/src/SpeakAnnounce.cpp @@ -12,7 +12,7 @@ SpeakAnnounce::~SpeakAnnounce() }
//------------------------------------------------------------------------------
-void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT user)
+void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, MCONTACT user)
{
const std::string STATUS = "Status";
@@ -66,7 +66,7 @@ void SpeakAnnounce::statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT }
//------------------------------------------------------------------------------
-void SpeakAnnounce::incomingEvent(HCONTACT user, HANDLE event)
+void SpeakAnnounce::incomingEvent(MCONTACT user, HANDLE event)
{
if (!m_event_info.isValidEvent(event))
return;
@@ -131,18 +131,18 @@ void SpeakAnnounce::protocolAck(ACKDATA *ack) }
//------------------------------------------------------------------------------
-void SpeakAnnounce::message(const std::wstring &sentence, HCONTACT user)
+void SpeakAnnounce::message(const std::wstring &sentence, MCONTACT user)
{
CallService(MS_SPEAK_MESSAGE, LPARAM(user), reinterpret_cast<WPARAM>(sentence.c_str()));
}
-void SpeakAnnounce::status(const std::wstring &sentence, HCONTACT user)
+void SpeakAnnounce::status(const std::wstring &sentence, MCONTACT user)
{
CallService(MS_SPEAK_STATUS, LPARAM(user), reinterpret_cast<WPARAM>(sentence.c_str()));
}
//------------------------------------------------------------------------------
-bool SpeakAnnounce::readMessage(HCONTACT contact)
+bool SpeakAnnounce::readMessage(MCONTACT contact)
{
std::wstring title = m_user_info.nameString(contact) + L" (" + m_user_info.statusModeString(contact) + L"): ";
diff --git a/plugins/WinterSpeak/src/SpeakAnnounce.h b/plugins/WinterSpeak/src/SpeakAnnounce.h index cb1a53f8bf..c49223b86a 100644 --- a/plugins/WinterSpeak/src/SpeakAnnounce.h +++ b/plugins/WinterSpeak/src/SpeakAnnounce.h @@ -12,12 +12,12 @@ public: //--------------------------------------------------------------------------
// Description : handle a status change
//--------------------------------------------------------------------------
- void statusChange(DBCONTACTWRITESETTING *write_setting, HCONTACT user);
+ void statusChange(DBCONTACTWRITESETTING *write_setting, MCONTACT user);
//--------------------------------------------------------------------------
// Description : handle an event
//--------------------------------------------------------------------------
- void incomingEvent(HCONTACT user, HANDLE event);
+ void incomingEvent(MCONTACT user, HANDLE event);
//--------------------------------------------------------------------------
// Description : handle a protocol state change
@@ -31,8 +31,8 @@ public: // Returns : true - speak successful
// false - speak failed
//--------------------------------------------------------------------------
- void message(const std::wstring &sentence, HCONTACT user);
- void status(const std::wstring &sentence, HCONTACT user);
+ void message(const std::wstring &sentence, MCONTACT user);
+ void status(const std::wstring &sentence, MCONTACT user);
private:
//--------------------------------------------------------------------------
@@ -41,7 +41,7 @@ private: // Returns : true = message window is open
// false = message window not open
//--------------------------------------------------------------------------
- bool readMessage(HCONTACT contact);
+ bool readMessage(MCONTACT contact);
HINSTANCE m_instance;
diff --git a/plugins/WinterSpeak/src/SpeakConfig.cpp b/plugins/WinterSpeak/src/SpeakConfig.cpp index 605b120f92..20b86b05f2 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.cpp +++ b/plugins/WinterSpeak/src/SpeakConfig.cpp @@ -33,13 +33,13 @@ void SpeakConfig::update(Subject &subject) }
//------------------------------------------------------------------------------
-bool SpeakConfig::status(const std::wstring &sentence, HCONTACT user) {
+bool SpeakConfig::status(const std::wstring &sentence, MCONTACT user) {
return say(sentence, user, false);
}
-bool SpeakConfig::message(const std::wstring &sentence, HCONTACT user) {
+bool SpeakConfig::message(const std::wstring &sentence, MCONTACT user) {
return say(sentence, user, true);
}
-bool SpeakConfig::say(const std::wstring &sentence, HCONTACT user, bool message)
+bool SpeakConfig::say(const std::wstring &sentence, MCONTACT user, bool message)
{
if (!m_tts.get()){
return false;
diff --git a/plugins/WinterSpeak/src/SpeakConfig.h b/plugins/WinterSpeak/src/SpeakConfig.h index 6894eecfb3..be86fa4409 100644 --- a/plugins/WinterSpeak/src/SpeakConfig.h +++ b/plugins/WinterSpeak/src/SpeakConfig.h @@ -27,9 +27,9 @@ public: // Returns : true - speak successful
// false - speak failed
//--------------------------------------------------------------------------
- bool status(const std::wstring &sentence, HCONTACT user = NULL);
- bool message(const std::wstring &sentence, HCONTACT user = NULL);
- bool say(const std::wstring &sentence, HCONTACT user, bool message);
+ bool status(const std::wstring &sentence, MCONTACT user = NULL);
+ bool message(const std::wstring &sentence, MCONTACT user = NULL);
+ bool say(const std::wstring &sentence, MCONTACT user, bool message);
private:
HINSTANCE m_instance;
diff --git a/plugins/WinterSpeak/src/UserInformation.cpp b/plugins/WinterSpeak/src/UserInformation.cpp index ba081d2b95..9b24734afe 100644 --- a/plugins/WinterSpeak/src/UserInformation.cpp +++ b/plugins/WinterSpeak/src/UserInformation.cpp @@ -20,7 +20,7 @@ UserInformation::~UserInformation() }
//------------------------------------------------------------------------------
-bool UserInformation::updateStatus(HCONTACT user, int status)
+bool UserInformation::updateStatus(MCONTACT user, int status)
{
bool ret = false;
@@ -38,13 +38,13 @@ bool UserInformation::updateStatus(HCONTACT user, int status) }
//------------------------------------------------------------------------------
-std::wstring UserInformation::statusString(HCONTACT user)
+std::wstring UserInformation::statusString(MCONTACT user)
{
return m_status_strings[m_status_info[user]];
}
//------------------------------------------------------------------------------
-std::wstring UserInformation::statusModeString(HCONTACT user)
+std::wstring UserInformation::statusModeString(MCONTACT user)
{
int status = CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, m_status_info[user], 0);
@@ -57,14 +57,14 @@ std::wstring UserInformation::statusModeString(HCONTACT user) }
//------------------------------------------------------------------------------
-void UserInformation::insertName(std::wstring &str, HCONTACT user) const
+void UserInformation::insertName(std::wstring &str, MCONTACT user) const
{
// insert the user's name into the string
str.replace(str.find(L"%u"), 2, nameString(user));
}
//------------------------------------------------------------------------------
-std::wstring UserInformation::nameString(HCONTACT user) const
+std::wstring UserInformation::nameString(MCONTACT user) const
{
//WCHAR *ret = reinterpret_cast<WCHAR *>(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, reinterpret_cast<unsigned int>(user), 0));
char* ret = (char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(user), 0);
diff --git a/plugins/WinterSpeak/src/UserInformation.h b/plugins/WinterSpeak/src/UserInformation.h index 7ab11ecddc..c184e2ae59 100644 --- a/plugins/WinterSpeak/src/UserInformation.h +++ b/plugins/WinterSpeak/src/UserInformation.h @@ -16,38 +16,38 @@ public: // Returns : true - the status changed
// false - the status stayed the same
//--------------------------------------------------------------------------
- bool updateStatus(HCONTACT user, int status);
+ bool updateStatus(MCONTACT user, int status);
//--------------------------------------------------------------------------
// Description : get a string containing the users current status string
// Parameters : user - the current user
// Returns : the string containing the users status
//--------------------------------------------------------------------------
- std::wstring statusString(HCONTACT user);
+ std::wstring statusString(MCONTACT user);
//--------------------------------------------------------------------------
// Description : return the status mode of the user
// Parameters : user - the current user
// Returns : the string containing the users status mode
//--------------------------------------------------------------------------
- std::wstring statusModeString(HCONTACT user);
+ std::wstring statusModeString(MCONTACT user);
//--------------------------------------------------------------------------
// Description : insert the name into the string at the %u location
// Parameters : str - the string to have the username inserted into
// user - the current user
//--------------------------------------------------------------------------
- void insertName(std::wstring &str, HCONTACT user) const;
+ void insertName(std::wstring &str, MCONTACT user) const;
//--------------------------------------------------------------------------
// Description : get the name string for the user
// Parameters : user - the current user
// Returns : a string containing the user's name
//--------------------------------------------------------------------------
- std::wstring nameString(HCONTACT user) const;
+ std::wstring nameString(MCONTACT user) const;
private:
- std::map<HCONTACT, int> m_status_info;
+ std::map<MCONTACT, int> m_status_info;
std::map<int, std::wstring> m_status_strings;
};
diff --git a/plugins/WinterSpeak/src/main.cpp b/plugins/WinterSpeak/src/main.cpp index f218b87f43..d6c7d9bbcc 100644 --- a/plugins/WinterSpeak/src/main.cpp +++ b/plugins/WinterSpeak/src/main.cpp @@ -31,12 +31,12 @@ PLUGININFOEX pluginInfo={ //-----------------------------------------------------------------------------
INT_PTR status(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), HCONTACT(wParam));
+ return g_speak_config->status(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
}
INT_PTR message(WPARAM wParam, LPARAM lParam)
{
- return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), HCONTACT(wParam));
+ return g_speak_config->message(reinterpret_cast<WCHAR *>(lParam), MCONTACT(wParam));
}
//-----------------------------------------------------------------------------
@@ -44,7 +44,7 @@ INT_PTR message(WPARAM wParam, LPARAM lParam) //-----------------------------------------------------------------------------
int eventStatusChange(WPARAM wParam, LPARAM lParam)
{
- g_speak_announce->statusChange(reinterpret_cast<DBCONTACTWRITESETTING *>(lParam), HCONTACT(wParam));
+ g_speak_announce->statusChange(reinterpret_cast<DBCONTACTWRITESETTING *>(lParam), MCONTACT(wParam));
return 0;
}
@@ -53,7 +53,7 @@ int eventStatusChange(WPARAM wParam, LPARAM lParam) //-----------------------------------------------------------------------------
int eventMessageAdded(WPARAM wParam, LPARAM lParam)
{
- g_speak_announce->incomingEvent(HCONTACT(wParam), reinterpret_cast<HANDLE>(lParam));
+ g_speak_announce->incomingEvent(MCONTACT(wParam), reinterpret_cast<HANDLE>(lParam));
return 0;
}
diff --git a/plugins/XSoundNotify/src/Common.h b/plugins/XSoundNotify/src/Common.h index 106022b842..c87618ceae 100644 --- a/plugins/XSoundNotify/src/Common.h +++ b/plugins/XSoundNotify/src/Common.h @@ -23,11 +23,11 @@ struct XSN_Data
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR path[MAX_PATH];
BYTE ignore;
- __forceinline XSN_Data(HCONTACT _aContact, TCHAR *_path, BYTE _ignore) :
+ __forceinline XSN_Data(MCONTACT _aContact, TCHAR *_path, BYTE _ignore) :
hContact(_aContact)
{
_tcsncpy(path, _path, SIZEOF(path));
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index ec114a71b2..206d4be1c4 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -15,7 +15,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case WM_INITDIALOG:
{
TranslateDialogDefault(hwndDlg);
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, lParam);
WindowList_Add(hChangeSoundDlgList, hwndDlg, hContact);
Utils_RestoreWindowPositionNoSize(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg");
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP switch (LOWORD(wParam)) {
case IDOK:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
if (lstrcmpi(p->path, _T(""))) {
@@ -116,7 +116,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP ofn.lpstrDefExt = _T("");
if (GetOpenFileName(&ofn)) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
SetDlgItemText(hwndDlg, IDC_CONT_LABEL_SOUND, PathFindFileName(FileName));
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL)
@@ -134,7 +134,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_TEST_PLAY:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
isIgnoreSound = 0;
if (p == NULL) {
@@ -156,7 +156,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_BUTTON_RESET_SOUND:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_TEST_PLAY), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_CONT_BUTTON_RESET_SOUND), FALSE);
CheckDlgButton(hwndDlg, IDC_CONT_IGNORE_SOUND, BST_UNCHECKED);
@@ -173,7 +173,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP case IDC_CONT_IGNORE_SOUND:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
@@ -195,7 +195,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP break;
case WM_DESTROY:
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
Utils_SaveWindowPosition(hwndDlg, hContact, SETTINGSNAME, "ChangeSoundDlg");
WindowList_Remove(hChangeSoundDlgList, hwndDlg);
}
@@ -204,7 +204,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
{
- HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (HCONTACT)wParam);
+ HWND hChangeSoundDlg = WindowList_Find(hChangeSoundDlgList, (MCONTACT)wParam);
if (!hChangeSoundDlg) {
hChangeSoundDlg = CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_CONTACTS), 0, DlgProcContactsOptions, (LPARAM)wParam);
ShowWindow(hChangeSoundDlg, SW_SHOW);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index c7d98bc589..76143744ee 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -50,7 +50,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETCURSEL, 0, 0);
PROTOACCOUNT *pa = (PROTOACCOUNT *)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_PROTO, CB_GETITEMDATA, cursel, 0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char* szUniqueId = (char*)CallProtoService(pa->szModuleName, PS_GETCAPS, PFLAG_UNIQUEIDSETTING, 0);
if ((INT_PTR) szUniqueId != CALLSERVICE_NOTFOUND && szUniqueId != NULL) {
DBVARIANT dbvuid = {0};
@@ -85,7 +85,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_COMBO_USERS:
if ((HIWORD(wParam) == CBN_SELCHANGE) || (HIWORD(wParam) == LBN_SELCHANGE)) {
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
EnableWindow(GetDlgItem(hwndDlg, IDC_OPT_BUTTON_CHOOSE_SOUND), TRUE);
DBVARIANT dbv = {0};
if ( !db_get_ts(hContact, SETTINGSNAME, SETTINGSKEY, &dbv))
@@ -129,7 +129,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l if (GetOpenFileName(&ofn)) {
SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, PathFindFileName(FileName));
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL)
XSN_Users.insert( new XSN_Data(hContact, FileName, IsDlgButtonChecked(hwndDlg, IDC_OPT_IGNORE_SOUND) ? 1 : 0));
@@ -149,7 +149,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_BUTTON_TEST_PLAY:
{
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
isIgnoreSound = 0;
if (p == NULL) {
@@ -176,7 +176,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l CheckDlgButton(hwndDlg, IDC_OPT_IGNORE_SOUND, BST_UNCHECKED);
SetDlgItemText(hwndDlg, IDC_OPT_LABEL_SOUND, TranslateT("Not set"));
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p != NULL) {
XSN_Users.remove(p);
@@ -191,7 +191,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l case IDC_OPT_IGNORE_SOUND:
{
int cursel = SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
+ MCONTACT hContact = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_OPT_COMBO_USERS, CB_GETITEMDATA, cursel, 0);
XSN_Data *p = XSN_Users.find((XSN_Data *)&hContact);
if (p == NULL) {
DBVARIANT dbv;
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp index a567a8d580..44acde8a95 100644 --- a/plugins/XSoundNotify/src/xsn_main.cpp +++ b/plugins/XSoundNotify/src/xsn_main.cpp @@ -113,9 +113,9 @@ static int ProcessEvent(WPARAM wParam, LPARAM lParam) if (!isReceiveMessage(HANDLE(lParam)))
return 0;
- isIgnoreSound = db_get_b((HCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
+ isIgnoreSound = db_get_b((MCONTACT)wParam, SETTINGSNAME, SETTINGSIGNOREKEY, 0);
DBVARIANT dbv;
- if ( !isIgnoreSound && !db_get_ts((HCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) {
+ if ( !isIgnoreSound && !db_get_ts((MCONTACT)wParam, SETTINGSNAME, SETTINGSKEY, &dbv)) {
TCHAR PlaySoundPath[MAX_PATH] = {0};
PathToAbsoluteT(dbv.ptszVal, PlaySoundPath);
SkinPlaySoundFile(PlaySoundPath);
@@ -154,7 +154,7 @@ static int OnLoadInit(WPARAM wParam, LPARAM lParam) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
char* szProto = GetContactProto(hContact);
PROTOACCOUNT *pa = ProtoGetAccount(szProto);
diff --git a/plugins/YAMN/src/browser/badconnect.cpp b/plugins/YAMN/src/browser/badconnect.cpp index 06e080d274..3c91453bab 100644 --- a/plugins/YAMN/src/browser/badconnect.cpp +++ b/plugins/YAMN/src/browser/badconnect.cpp @@ -127,7 +127,7 @@ INT_PTR CALLBACK DlgProcYAMNBadConnection(HWND hDlg,UINT msg,WPARAM wParam,LPARA if (ShowPopup)
{
- BadConnectPopup.lchContact=(HCONTACT)ActualAccount;
+ BadConnectPopup.lchContact=(MCONTACT)ActualAccount;
BadConnectPopup.lchIcon=g_LoadIconEx(3);
BadConnectPopup.colorBack=ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupB : GetSysColor(COLOR_BTNFACE);
BadConnectPopup.colorText=ActualAccount->BadConnectN.Flags & YAMN_ACC_POPC ? ActualAccount->BadConnectN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
diff --git a/plugins/YAMN/src/browser/mailbrowser.cpp b/plugins/YAMN/src/browser/mailbrowser.cpp index 83bc7a02e3..47f08ecc35 100644 --- a/plugins/YAMN/src/browser/mailbrowser.cpp +++ b/plugins/YAMN/src/browser/mailbrowser.cpp @@ -510,7 +510,7 @@ int AddNewMailsToListView(HWND hListView,HACCOUNT ActualAccount,struct CMailNumb lfoundi=0;
}
- NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
+ NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (MCONTACT)ActualAccount;
NewMailPopup.lchIcon=g_LoadIconEx(2);
NewMailPopup.colorBack=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NewMailPopup.colorText=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -681,7 +681,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR {
POPUPDATAT NewMailPopup ={0};
- NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
+ NewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (MCONTACT)ActualAccount;
NewMailPopup.lchIcon=g_LoadIconEx(2);
NewMailPopup.colorBack=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NewMailPopup.colorText=nflags & YAMN_ACC_POPC ? ActualAccount->NewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -784,7 +784,7 @@ void DoMailActions(HWND hDlg,HACCOUNT ActualAccount,struct CMailNumbers *MN,DWOR {
POPUPDATAT NoNewMailPopup;
- NoNewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (HCONTACT)ActualAccount;
+ NoNewMailPopup.lchContact=(ActualAccount->hContact != NULL) ? ActualAccount->hContact : (MCONTACT)ActualAccount;
NoNewMailPopup.lchIcon=g_LoadIconEx(1);
NoNewMailPopup.colorBack=ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? ActualAccount->NoNewMailN.PopupB : GetSysColor(COLOR_BTNFACE);
NoNewMailPopup.colorText=ActualAccount->NoNewMailN.Flags & YAMN_ACC_POPC ? ActualAccount->NoNewMailN.PopupT : GetSysColor(COLOR_WINDOWTEXT);
@@ -830,7 +830,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam //if clicked and it's new mail popup window
if ((HIWORD(wParam)==STN_CLICKED) && (-1 != (PluginParam=CallService(MS_POPUP_GETPLUGINDATA,(WPARAM)hWnd,(LPARAM)&PluginParam))))
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
HACCOUNT Account;
if (PluginParam) {
PYAMN_MAILSHOWPARAM MailParam = new YAMN_MAILSHOWPARAM;
@@ -849,9 +849,9 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam } else {
DBVARIANT dbv;
- hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(MCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((MCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
{
Account=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -900,7 +900,7 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam break;
case UM_FREEPLUGINDATA:{
PYAMN_MAILSHOWPARAM mpd = (PYAMN_MAILSHOWPARAM)PUGetPluginData(hWnd);
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
if ((mpd) && (INT_PTR)mpd != -1)free(mpd);
return FALSE;
}
@@ -914,12 +914,12 @@ LRESULT CALLBACK NewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam case WM_YAMN_STOPACCOUNT:
{
HACCOUNT ActualAccount;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
- hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(MCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((MCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -947,12 +947,12 @@ LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar if ((HIWORD(wParam)==STN_CLICKED) && (msg==WM_COMMAND))
{
HACCOUNT ActualAccount;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
- hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(MCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((MCONTACT)hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -1014,12 +1014,12 @@ LRESULT CALLBACK NoNewMailPopupProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lPar case WM_YAMN_STOPACCOUNT:
{
HACCOUNT ActualAccount;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
- hContact=(HCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
+ hContact=(MCONTACT)CallService(MS_POPUP_GETCONTACT,(WPARAM)hWnd,0);
- if (!db_get((HCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
+ if (!db_get((MCONTACT) hContact,YAMN_DBMODULE,"Id",&dbv))
{
ActualAccount=(HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME,(WPARAM)POP3Plugin,(LPARAM)dbv.pszVal);
db_free(&dbv);
@@ -1465,7 +1465,7 @@ INT_PTR CALLBACK DlgProcYAMNShowMessage(HWND hDlg,UINT msg,WPARAM wParam,LPARAM if (MailParam->mail->Flags & YAMN_MSG_UNSEEN) {
MailParam->mail->Flags&=~YAMN_MSG_UNSEEN; //mark the message as seen
HWND hMailBrowser;
- if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (HCONTACT)MailParam->account)) {
+ if (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (MCONTACT)MailParam->account)) {
struct CChangeContent Params={MailParam->account->NewMailN.Flags|YAMN_ACC_MSGP,MailParam->account->NoNewMailN.Flags|YAMN_ACC_MSGP};
SendMessageW(hMailBrowser,WM_YAMN_CHANGECONTENT,(WPARAM)MailParam->account,(LPARAM)&Params);
}
@@ -1736,7 +1736,7 @@ INT_PTR CALLBACK DlgProcYAMNMailBrowser(HWND hDlg,UINT msg,WPARAM wParam,LPARAM ReadDoneFcn(ActualAccount->AccountAccessSO);
WindowList_Add(YAMNVar.MessageWnds,hDlg,NULL);
- WindowList_Add(YAMNVar.NewMailAccountWnd,hDlg, (HCONTACT)ActualAccount);
+ WindowList_Add(YAMNVar.NewMailAccountWnd,hDlg, (MCONTACT)ActualAccount);
{
TCHAR accstatus[512];
@@ -2509,7 +2509,7 @@ DWORD WINAPI MailBrowser(LPVOID Param) #endif
ReadDoneFcn(ActualAccount->AccountAccessSO);
- if (NULL != (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (HCONTACT)ActualAccount)))
+ if (NULL != (hMailBrowser=WindowList_Find(YAMNVar.NewMailAccountWnd, (MCONTACT)ActualAccount)))
WndFound=TRUE;
if ((hMailBrowser==NULL) && ((MyParam.nflags & YAMN_ACC_MSG) || (MyParam.nflags & YAMN_ACC_ICO) || (MyParam.nnflags & YAMN_ACC_MSG)))
{
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp index ebd9c90d2c..16de87d686 100644 --- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp +++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp @@ -276,7 +276,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) for (Finder=POP3Plugin->FirstAccount;Finder != NULL;Finder=Finder->Next) {
Finder->hContact = NULL;
- for (HCONTACT hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
+ for (MCONTACT hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
if (!db_get_s(hContact,YAMN_DBMODULE,"Id",&dbv)) {
if ( strcmp( dbv.pszVal, Finder->Name) == 0) {
Finder->hContact = hContact;
@@ -294,7 +294,7 @@ int RegisterPOP3Plugin(WPARAM,LPARAM) if (Finder->hContact == NULL && (Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
//No account contact found, have to create one
- Finder->hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ Finder->hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)Finder->hContact,(LPARAM)YAMN_DBMODULE);
db_set_s(Finder->hContact,YAMN_DBMODULE,"Id",Finder->Name);
db_set_s(Finder->hContact,YAMN_DBMODULE,"Nick",Finder->Name);
diff --git a/plugins/YAMN/src/services.cpp b/plugins/YAMN/src/services.cpp index 40484f73e0..2caa8811d9 100644 --- a/plugins/YAMN/src/services.cpp +++ b/plugins/YAMN/src/services.cpp @@ -65,12 +65,12 @@ static int Service_ContactDoubleclicked(WPARAM wParam, LPARAM lParam) static INT_PTR ContactApplication(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
- if ( db_get((HCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((MCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
return 0;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -168,12 +168,12 @@ static INT_PTR AccountMailCheck(WPARAM wParam, LPARAM lParam) static INT_PTR ContactMailCheck(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return 0;
DBVARIANT dbv;
- if ( db_get((HCONTACT) wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((MCONTACT) wParam, YAMN_DBMODULE, "Id", &dbv))
return 0;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -227,12 +227,12 @@ void MainMenuAccountClicked(WPARAM wParam, LPARAM lParam) /*static*/ void ContactDoubleclicked(WPARAM wParam, LPARAM lParam)
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if ( lstrcmpA(szProto, YAMN_DBMODULE))
return;
DBVARIANT dbv;
- if ( db_get((HCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
+ if ( db_get((MCONTACT)wParam, YAMN_DBMODULE, "Id", &dbv))
return;
HACCOUNT ActualAccount = (HACCOUNT) CallService(MS_YAMN_FINDACCOUNTBYNAME, (WPARAM)POP3Plugin, (LPARAM)dbv.pszVal);
@@ -483,7 +483,7 @@ void RefreshContact(void) db_set_b(Finder->hContact, "CList", "Hidden", 1);
}
else if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT)) {
- Finder->hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ Finder->hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)Finder->hContact, (LPARAM)YAMN_DBMODULE);
db_set_s(Finder->hContact, YAMN_DBMODULE, "Id", Finder->Name);
db_set_s(Finder->hContact, YAMN_DBMODULE, "Nick", Finder->Name);
diff --git a/plugins/YAPP/src/message_pump.h b/plugins/YAPP/src/message_pump.h index 6283a0f14b..a6fbb1c164 100644 --- a/plugins/YAPP/src/message_pump.h +++ b/plugins/YAPP/src/message_pump.h @@ -15,7 +15,7 @@ struct PopupData {
int cbSize;
int flags; // OR of PDF_* flags below
- HCONTACT hContact;
+ MCONTACT hContact;
HICON hIcon;
union {
char *pszTitle;
diff --git a/plugins/YAPP/src/options.cpp b/plugins/YAPP/src/options.cpp index 7b11771414..97180ba262 100644 --- a/plugins/YAPP/src/options.cpp +++ b/plugins/YAPP/src/options.cpp @@ -99,7 +99,7 @@ void ShowExamplePopups() pd.ptzText = TranslateT("Thequickbrownfoxjumpedoverthelazydog.");
ShowPopup(pd);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (options.av_layout != PAV_NONE && ServiceExists(MS_AV_DRAWAVATAR)) {
AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)CallService(MS_AV_GETAVATARBITMAP, (WPARAM)hContact, 0);
if (ace && (ace->dwFlags & AVS_BITMAP_VALID)) {
diff --git a/plugins/YAPP/src/popwin.cpp b/plugins/YAPP/src/popwin.cpp index 0ff42ee951..bf37ce97d9 100644 --- a/plugins/YAPP/src/popwin.cpp +++ b/plugins/YAPP/src/popwin.cpp @@ -566,7 +566,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa case PUM_GETCONTACT:
{
- HCONTACT *phContact = (HCONTACT*)wParam;
+ MCONTACT *phContact = (MCONTACT*)wParam;
*phContact = pd->hContact;
if (lParam)
SetEvent((HANDLE)lParam);
@@ -695,7 +695,7 @@ LRESULT CALLBACK PopupWindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPa pd->colorBack = MNotifyGetDWord(pwd->hNotify, NFOPT_BACKCOLOR, colBg);
pd->colorText = MNotifyGetDWord(pwd->hNotify, NFOPT_TEXTCOLOR, colSecondLine);
pd->timeout = MNotifyGetDWord(pwd->hNotify, NFOPT_TIMEOUT, options.default_timeout);
- pd->hContact = (HCONTACT)MNotifyGetDWord(pwd->hNotify, NFOPT_CONTACT, 0);
+ pd->hContact = (MCONTACT)MNotifyGetDWord(pwd->hNotify, NFOPT_CONTACT, 0);
pd->hIcon = (HICON)MNotifyGetDWord(pwd->hNotify, NFOPT_ICON, 0);
const wchar_t *swzName = MNotifyGetWString(pwd->hNotify, NFOPT_TITLEW, 0);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp index 808b184990..128e2ef84d 100644 --- a/plugins/YAPP/src/services.cpp +++ b/plugins/YAPP/src/services.cpp @@ -162,7 +162,7 @@ void ShowPopup(PopupData &pd_in) static INT_PTR GetContact(WPARAM wParam, LPARAM lParam)
{
HWND hwndPop = (HWND)wParam;
- HCONTACT hContact;
+ MCONTACT hContact;
if (GetCurrentThreadId() == message_pump_thread_id)
SendMessage(hwndPop, PUM_GETCONTACT, (WPARAM)&hContact, 0);
else {
diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index 6eee2d60eb..ac57f304e8 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -25,7 +25,7 @@ CLIST_INTERFACE *pcli; HINSTANCE hInst;
int hLangpack;
-HCONTACT hForwardFrom, hForwardTo;
+MCONTACT hForwardFrom, hForwardTo;
TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;
@@ -89,7 +89,7 @@ int ProtoAck(WPARAM wparam,LPARAM lparam) */
static int MessageEventAdded(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HANDLE hDBEvent = (HANDLE)lParam;
// is the message sender accepted for forwarding
@@ -236,8 +236,8 @@ extern "C" int __declspec(dllexport) Load() mir_getCLI();
// Load plugin options from DB
- hForwardFrom = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
- hForwardTo = (HCONTACT)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
+ hForwardFrom = (MCONTACT)db_get_dw(NULL, "yaRelay", "ForwardFrom", 0);
+ hForwardTo = (MCONTACT)db_get_dw(NULL, "yaRelay", "ForwardTo", 0);
iForwardOnStatus = db_get_dw(NULL, "yaRelay", "ForwardOnStatus", STATUS_OFFLINE | STATUS_AWAY | STATUS_NA);
diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index eafc4f93b1..53f4c2badb 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -50,7 +50,7 @@ static void OptionsFrameEnableControls(HWND hwndDlg) */
static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int idx;
switch (uMsg) {
case WM_INITDIALOG:
@@ -144,9 +144,9 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (SendMessage(GetDlgItem(hwndDlg, IDC_RADIO_ALL), BM_GETCHECK, 0, 0) == BST_CHECKED)
hForwardFrom = 0;
else
- hForwardFrom = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
+ hForwardFrom = (MCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_FROM), CB_GETCURSEL, 0, 0), 0);
- hForwardTo = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
+ hForwardTo = (MCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETITEMDATA, SendMessage(GetDlgItem(hwndDlg, IDC_COMBO_TO), CB_GETCURSEL, 0, 0), 0);
iForwardOnStatus = 0;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK1), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_OFFLINE;
if (SendMessage(GetDlgItem(hwndDlg, IDC_CHECK2), BM_GETCHECK, 0, 0) == BST_CHECKED) iForwardOnStatus |= STATUS_ONLINE;
diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h index 248f7fe5f1..5b1543f6c4 100644 --- a/plugins/YARelay/src/stdafx.h +++ b/plugins/YARelay/src/stdafx.h @@ -48,7 +48,7 @@ Features: extern HINSTANCE hInst;
-extern HCONTACT hForwardFrom, hForwardTo;
+extern MCONTACT hForwardFrom, hForwardTo;
extern TCHAR tszForwardTemplate[MAXTEMPLATESIZE];
extern int iSplit, iSplitMaxSize, iSendParts, iMarkRead, iSendAndHistory, iForwardOnStatus;
diff --git a/plugins/YahooGroups/src/services.cpp b/plugins/YahooGroups/src/services.cpp index 104ce5a949..b44cfc53f5 100644 --- a/plugins/YahooGroups/src/services.cpp +++ b/plugins/YahooGroups/src/services.cpp @@ -106,7 +106,7 @@ void AddNewGroup(char *newGroup) availableGroups.Add(_strdup(group + 1));
}
-void AddContactToGroup(HCONTACT hContact, char *group)
+void AddContactToGroup(MCONTACT hContact, char *group)
{
const int MAX_SIZE = 1024;
wchar_t wide[MAX_SIZE] = {0};
@@ -159,13 +159,13 @@ void CreateGroup(char *group) }
}
-void ProcessContacts(void (*callback)(HCONTACT, char *), char *protocol)
+void ProcessContacts(void (*callback)(MCONTACT, char *), char *protocol)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
callback(hContact, protocol);
}
-void YahooMoveCallback(HCONTACT hContact, char *unused)
+void YahooMoveCallback(MCONTACT hContact, char *unused)
{
char protocol[128] = {0};
GetContactProtocol(hContact, protocol, sizeof(protocol));
@@ -182,7 +182,7 @@ void YahooMoveCallback(HCONTACT hContact, char *unused) }
}
-void ResetGroupCallback(HCONTACT hContact, char *protocol)
+void ResetGroupCallback(MCONTACT hContact, char *protocol)
{
char p[128] = {0};
diff --git a/plugins/YahooGroups/src/utils.cpp b/plugins/YahooGroups/src/utils.cpp index 93b84691c8..d938abbab3 100644 --- a/plugins/YahooGroups/src/utils.cpp +++ b/plugins/YahooGroups/src/utils.cpp @@ -132,7 +132,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) i = size;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -163,7 +163,7 @@ int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName return res;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -204,7 +204,7 @@ int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, return GetStringFromDatabase(NULL, ModuleName, szSettingName, szError, szResult, count);
}
-TCHAR *GetContactName(HCONTACT hContact, char *szProto)
+TCHAR *GetContactName(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
char proto[200];
@@ -240,12 +240,12 @@ TCHAR *GetContactName(HCONTACT hContact, char *szProto) return buffer;
}
-void GetContactProtocol(HCONTACT hContact, char *szProto, int size)
+void GetContactProtocol(MCONTACT hContact, char *szProto, int size)
{
GetStringFromDatabase(hContact, "Protocol", "p", NULL, szProto, size);
}
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
char protocol[256];
GetContactProtocol(hContact, protocol, sizeof(protocol));
@@ -253,7 +253,7 @@ TCHAR *GetContactID(HCONTACT hContact) return GetContactID(hContact, protocol);
}
-TCHAR *GetContactID(HCONTACT hContact, char *szProto)
+TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo;
@@ -314,7 +314,7 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) }
}
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
{
TCHAR *szHandle;
TCHAR dispName[1024];
@@ -322,7 +322,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) TCHAR *tmp;
int found = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
GetContactProtocol(hContact, cProtocol, sizeof(cProtocol));
szHandle = GetContactID(hContact, cProtocol);
@@ -343,7 +343,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) #pragma warning (default: 4312)
#pragma warning (disable: 4312)
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
{
char protocol[1024];
WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
diff --git a/plugins/YahooGroups/src/utils.h b/plugins/YahooGroups/src/utils.h index 9e07609dc6..e34a7c6ecd 100644 --- a/plugins/YahooGroups/src/utils.h +++ b/plugins/YahooGroups/src/utils.h @@ -44,17 +44,17 @@ void ScreenToClient(HWND hWnd, LPRECT rect); void AnchorMoveWindow(HWND window, const WINDOWPOS *parentPos, int anchors);
RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int anchors);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size);
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, int size);
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size);
int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult, int count);
-TCHAR *GetContactName(HCONTACT hContact, char *szProto);
-TCHAR *GetContactID(HCONTACT hContact);
-TCHAR *GetContactID(HCONTACT hContact, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
-void GetContactProtocol(HCONTACT hContact, char *szProto, int size);
+TCHAR *GetContactName(MCONTACT hContact, char *szProto);
+TCHAR *GetContactID(MCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
+void GetContactProtocol(MCONTACT hContact, char *szProto, int size);
int MyPUShowMessage(char *lpzText, BYTE kind);
diff --git a/plugins/mTextControl/src/services.cpp b/plugins/mTextControl/src/services.cpp index 0afa1df715..14ecd04c26 100644 --- a/plugins/mTextControl/src/services.cpp +++ b/plugins/mTextControl/src/services.cpp @@ -169,7 +169,7 @@ INT_PTR MText_CreateW(WPARAM wParam, LPARAM lParam) { //---------------------------------------------------------------------------
// allocate text object (advanced)
HANDLE DLL_CALLCONV
-MTI_MTextCreateEx (HANDLE userHandle, HCONTACT hContact, void *text, DWORD flags) {
+MTI_MTextCreateEx (HANDLE userHandle, MCONTACT hContact, void *text, DWORD flags) {
TextObject *result = new TextObject;
result->options = TextUserGetOptions(userHandle);
result->ftd = new CFormattedTextDraw;
diff --git a/plugins/mTextControl/src/services.h b/plugins/mTextControl/src/services.h index d5efb2ac87..7b7faac6ff 100644 --- a/plugins/mTextControl/src/services.h +++ b/plugins/mTextControl/src/services.h @@ -25,7 +25,7 @@ void UnloadServices(); __declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreate (HANDLE userHandle, char *text);
__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreateW (HANDLE userHandle, WCHAR *text);
-__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreateEx (HANDLE userHandle, HCONTACT hContact, void *text, DWORD flags);
+__declspec(dllexport) HANDLE DLL_CALLCONV MTI_MTextCreateEx (HANDLE userHandle, MCONTACT hContact, void *text, DWORD flags);
__declspec(dllexport) int DLL_CALLCONV MTI_MTextMeasure (HDC dc, SIZE *sz, HANDLE text);
__declspec(dllexport) int DLL_CALLCONV MTI_MTextDisplay (HDC dc, POINT pos, SIZE sz, HANDLE text);
__declspec(dllexport) int DLL_CALLCONV MTI_MTextSetParent (HANDLE text, HWND hwnd, RECT rect);
diff --git a/plugins/wbOSD/src/events.cpp b/plugins/wbOSD/src/events.cpp index 647891b5f7..e2db340bc8 100644 --- a/plugins/wbOSD/src/events.cpp +++ b/plugins/wbOSD/src/events.cpp @@ -23,7 +23,7 @@ void showmsgwnd(unsigned int param) CallService(MS_MSG_SENDMESSAGET, (WPARAM)param, 0);
}
-LRESULT ShowOSD(TCHAR *str, int timeout, COLORREF color, HCONTACT user)
+LRESULT ShowOSD(TCHAR *str, int timeout, COLORREF color, MCONTACT user)
{
logmsg("ShowOSD");
@@ -72,7 +72,7 @@ int ProtoAck(WPARAM,LPARAM lparam) int ContactSettingChanged(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
DBCONTACTWRITESETTING *cws=(DBCONTACTWRITESETTING*)lParam;
logmsg("ContactSettingChanged1");
@@ -98,7 +98,7 @@ int ContactSettingChanged(WPARAM wParam,LPARAM lParam) int ContactStatusChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT) wParam;
+ MCONTACT hContact = (MCONTACT) wParam;
WORD oldStatus = LOWORD(lParam);
WORD newStatus = HIWORD(lParam);
DWORD ann=db_get_dw(NULL,THIS_MODULE,"announce", DEFAULT_ANNOUNCE);
@@ -196,7 +196,7 @@ int HookedNewEvent(WPARAM wParam, LPARAM lParam) TCHAR buffer[512];
mir_sntprintf(buffer, SIZEOF(buffer), buf, c1, c2);
- ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), (HCONTACT)wParam);
+ ShowOSD(buffer, 0, db_get_dw(NULL,THIS_MODULE, "clr_msg", DEFAULT_CLRMSG), (MCONTACT)wParam);
mir_free( c1 );
mir_free( c2 );
|