diff options
999 files changed, 6890 insertions, 6886 deletions
diff --git a/include/m_addcontact.h b/include/m_addcontact.h index b4dad7f90c..dd3c691b48 100644 --- a/include/m_addcontact.h +++ b/include/m_addcontact.h @@ -29,7 +29,7 @@ typedef struct{ int handleType; // one of the HANDLE_ constants
union {
HANDLE hDbEvent; // hDbEvent if acs.handleType == HANDLE_EVENT
- HCONTACT hContact; // hContact if acs.handleType == HANDLE_CONTACT
+ MCONTACT hContact; // hContact if acs.handleType == HANDLE_CONTACT
// ignored if acs.handleType == HANDLE_SEARCHRESULT
};
const char *szProto; // ignored if acs.handleType != HANDLE_SEARCHRESULT
diff --git a/include/m_avatars.h b/include/m_avatars.h index 1b03a3f33b..b8cbf5a5ed 100644 --- a/include/m_avatars.h +++ b/include/m_avatars.h @@ -70,9 +70,10 @@ unless AF_FETCHIFPROTONOTVISIBLE is set. #define AVS_OWNAVATAR 128 // is own avatar entry
#define AVS_NOTREADY 4096
-typedef struct avatarCacheEntry {
+typedef struct avatarCacheEntry
+{
DWORD cbSize; // set to sizeof(struct)
- HCONTACT hContact; // contacts handle, 0, if it is a protocol avatar
+ MCONTACT hContact; // contacts handle, 0, if it is a protocol avatar
HBITMAP hbmPic; // bitmap handle of the picutre itself
DWORD dwFlags; // see above for flag values
LONG bmHeight, bmWidth; // bitmap dimensions
@@ -81,7 +82,8 @@ typedef struct avatarCacheEntry { // to implement cache expiration
LPVOID lpDIBSection; // unused field
TCHAR szFilename[MAX_PATH]; // filename of the avatar (absolute path)
-} AVATARCACHEENTRY;
+}
+ AVATARCACHEENTRY;
#define AVDRQ_FALLBACKPROTO 0x0001 // use the protocol picture as fallback (currently not used)
#define AVDRQ_FAILIFNOTCACHED 0x0002 // don't create a cache entry if it doesn't already exist. (currently not working)
@@ -98,21 +100,22 @@ typedef struct avatarCacheEntry { // request to draw a contacts picture. See MS_AV_DRAWAVATAR service description
-typedef struct _avatarDrawRequest {
- DWORD cbSize; // set this to sizeof(AVATARDRAWREQUEST) - mandatory, service will return failure code if
- // cbSize is wrong
- HCONTACT hContact; // the contact for which the avatar should be drawn. set it to 0 to draw a protocol picture
- HDC hTargetDC; // target device context
- RECT rcDraw; // target rectangle. The avatar will be centered within the rectangle and scaled to fit.
- DWORD dwFlags; // flags (see above for valid bitflags)
- DWORD dwReserved; // for future use
- DWORD dwInternal; // don't use it
- COLORREF clrBorder; // color for the border (used with AVDRQ_DRAWBORDER)
- UCHAR radius; // radius (used with AVDRQ_ROUNDEDCORNER)
- UCHAR alpha; // alpha value for semi-transparent avatars (valid values form 1 to 255, if it is set to 0
- // the avatar won't be transparent.
- char *szProto; // only used when AVDRQ_PROTOPICT or AVDRQ_OWNPIC is set
-} AVATARDRAWREQUEST;
+typedef struct _avatarDrawRequest
+{
+ DWORD cbSize; // set this to sizeof(AVATARDRAWREQUEST) - mandatory, service will return failure code if cbSize is wrong
+ MCONTACT hContact; // the contact for which the avatar should be drawn. set it to 0 to draw a protocol picture
+ HDC hTargetDC; // target device context
+ RECT rcDraw; // target rectangle. The avatar will be centered within the rectangle and scaled to fit.
+ DWORD dwFlags; // flags (see above for valid bitflags)
+ DWORD dwReserved; // for future use
+ DWORD dwInternal; // don't use it
+ COLORREF clrBorder; // color for the border (used with AVDRQ_DRAWBORDER)
+ UCHAR radius; // radius (used with AVDRQ_ROUNDEDCORNER)
+ UCHAR alpha; // alpha value for semi-transparent avatars (valid values form 1 to 255, if it is set to 0
+ // the avatar won't be transparent.
+ char *szProto; // only used when AVDRQ_PROTOPICT or AVDRQ_OWNPIC is set
+}
+ AVATARDRAWREQUEST;
#define CACHE_BLOCKSIZE 20
@@ -212,7 +215,7 @@ typedef struct _avatarDrawRequest { typedef struct _contactAvatarChangedNotification {
int cbSize; // sizeof()
- HCONTACT hContact; // this might have to be set by the caller too
+ MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
TCHAR filename[MAX_PATH]; // full path to filename which contains the avatar
TCHAR hash[128]; // avatar hash
diff --git a/include/m_chat.h b/include/m_chat.h index 7f02c687e1..b93a9c9ed1 100644 --- a/include/m_chat.h +++ b/include/m_chat.h @@ -515,7 +515,7 @@ struct GC_INFO int iCount; // count of users in the nicklist
LPSTR pszUsers; // space separated string containing the UID's of the users in the user list.
// NOTE. Use Mirandas mmi_free() on the returned string.
- HCONTACT hContact; // hContact for the session (can be NULL)
+ MCONTACT hContact; // hContact for the session (can be NULL)
};
#define MS_GC_GETINFO "GChat/GetInfo"
diff --git a/include/m_chat_int.h b/include/m_chat_int.h index a3b3c49548..b270cbf4ae 100644 --- a/include/m_chat_int.h +++ b/include/m_chat_int.h @@ -209,7 +209,7 @@ struct GCSessionInfoBase WORD wCommandsNum;
DWORD dwItemData;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwndStatus;
time_t LastTime;
@@ -369,11 +369,11 @@ struct CHAT_MANAGER BOOL (*LM_TrimLog)(LOGINFO** ppLogListStart, LOGINFO** ppLogListEnd, int iCount);
BOOL (*LM_RemoveAll)(LOGINFO** ppLogListStart, LOGINFO** ppLogListEnd);
- HCONTACT (*AddRoom)(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType);
- BOOL (*SetOffline)(HCONTACT hContact, BOOL bHide);
+ MCONTACT (*AddRoom)(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType);
+ BOOL (*SetOffline)(MCONTACT hContact, BOOL bHide);
BOOL (*SetAllOffline)(BOOL bHide, const char *pszModule);
- BOOL (*AddEvent)(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...);
- HCONTACT (*FindRoom)(const char *pszModule, const TCHAR *pszRoom);
+ BOOL (*AddEvent)(MCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...);
+ MCONTACT (*FindRoom)(const char *pszModule, const TCHAR *pszRoom);
char* (*Log_CreateRTF)(LOGSTREAMDATA *streamData);
char* (*Log_CreateRtfHeader)(MODULEINFO *mi);
@@ -386,7 +386,7 @@ struct CHAT_MANAGER BOOL (*DoSoundsFlashPopupTrayStuff)(SESSION_INFO *si, GCEVENT *gce, BOOL bHighlight, int bManyFix);
BOOL (*DoTrayIcon)(SESSION_INFO *si, GCEVENT *gce);
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);
TCHAR* (*GetChatLogsFilename)(SESSION_INFO *si, time_t tTime);
char* (*Log_SetStyle)(int style);
diff --git a/include/m_clist.h b/include/m_clist.h index 31df4f723d..fcc0534d5c 100644 --- a/include/m_clist.h +++ b/include/m_clist.h @@ -237,7 +237,7 @@ lParam = 0 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.
*/
@@ -285,7 +285,7 @@ sense to store all this information in memory, etc. //bypasses the double-click.
typedef struct {
int cbSize; //size in bytes of this structure
- HCONTACT hContact; //handle to the contact to put the icon by
+ MCONTACT hContact; //handle to the contact to put the icon by
HICON hIcon; //icon to flash
DWORD flags; //...of course
union
diff --git a/include/m_clistint.h b/include/m_clistint.h index d72c6738e3..d339fa87f4 100644 --- a/include/m_clistint.h +++ b/include/m_clistint.h @@ -107,7 +107,7 @@ struct ClcContactBase union {
struct {
int iImage;
- HCONTACT hContact;
+ MCONTACT hContact;
};
struct {
WORD groupId;
@@ -244,7 +244,7 @@ typedef struct { typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR* tszName;
TCHAR* tszGroup;
int bIsHidden;
@@ -290,9 +290,9 @@ typedef struct int (*pfnAddInfoItemToGroup)(ClcGroup *group, int flags, const TCHAR *pszText);
int (*pfnAddItemToGroup)(ClcGroup *group, int iAboveItem);
- int (*pfnAddContactToGroup)(struct ClcData *dat, ClcGroup *group, HCONTACT hContact);
- void (*pfnAddContactToTree)(HWND hwnd, struct ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline);
- void (*pfnDeleteItemFromTree)(HWND hwnd, HCONTACT hItem);
+ int (*pfnAddContactToGroup)(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
+ void (*pfnAddContactToTree)(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
+ void (*pfnDeleteItemFromTree)(HWND hwnd, MCONTACT hItem);
void (*pfnRebuildEntireList)(HWND hwnd, struct ClcData *dat);
int (*pfnGetGroupContentsCount)(ClcGroup *group, int visibleOnly);
void (*pfnSortCLC)(HWND hwnd, struct ClcData *dat, int useInsertionSort);
@@ -321,7 +321,7 @@ typedef struct int (*pfnClcStatusToPf2)(int status);
int (*pfnIsHiddenMode)(struct ClcData *dat, int status);
void (*pfnHideInfoTip)(HWND hwnd, struct ClcData *dat);
- void (*pfnNotifyNewContact)(HWND hwnd, HCONTACT hContact);
+ void (*pfnNotifyNewContact)(HWND hwnd, MCONTACT hContact);
DWORD (*pfnGetDefaultExStyle)(void);
void (*pfnGetDefaultFontSetting)(int i, LOGFONT* lf, COLORREF* colour);
void (*pfnGetFontSetting)(int i, LOGFONT* lf, COLORREF* colour);
@@ -337,22 +337,22 @@ typedef struct int (*pfnRowHitTest)(struct ClcData *dat, int y);
/* clistevents.c */
- int (*pfnEventsProcessContactDoubleClick)(HCONTACT hContact);
+ int (*pfnEventsProcessContactDoubleClick)(MCONTACT hContact);
int (*pfnEventsProcessTrayDoubleClick)(int);
/* clistmod.c */
- int (*pfnIconFromStatusMode)(const char *szProto, int status, HCONTACT hContact);
+ int (*pfnIconFromStatusMode)(const char *szProto, int status, MCONTACT hContact);
int (*pfnShowHide)(WPARAM, LPARAM);
TCHAR* (*pfnGetStatusModeDescription)(int mode, int flags);
/* clistsettings.c */
- ClcCacheEntry* (*pfnGetCacheEntry)(HCONTACT hContact);
- ClcCacheEntry* (*pfnCreateCacheItem)(HCONTACT hContact);
+ ClcCacheEntry* (*pfnGetCacheEntry)(MCONTACT hContact);
+ ClcCacheEntry* (*pfnCreateCacheItem)(MCONTACT hContact);
void (*pfnCheckCacheItem)(ClcCacheEntry*);
void (*pfnFreeCacheItem)(ClcCacheEntry*);
- TCHAR* (*pfnGetContactDisplayName)(HCONTACT hContact, int mode);
- void (*pfnInvalidateDisplayNameCacheEntry)(HCONTACT hContact);
+ TCHAR* (*pfnGetContactDisplayName)(MCONTACT hContact, int mode);
+ void (*pfnInvalidateDisplayNameCacheEntry)(MCONTACT hContact);
/* clisttray.c */
void (*pfnTrayIconUpdateWithImageList)(int iImage, const TCHAR *szNewTip, char *szPreferredProto);
@@ -373,7 +373,7 @@ typedef struct void (*pfnOnCreateClc)(void);
/* contact.c */
- void (*pfnChangeContactIcon)(HCONTACT hContact, int iIcon, int add);
+ void (*pfnChangeContactIcon)(MCONTACT hContact, int iIcon, int add);
void (*pfnLoadContactTree)(void);
int (*pfnCompareContacts)(const ClcContact *contact1, const ClcContact *contact2);
void (*pfnSortContacts)(void);
@@ -402,9 +402,9 @@ typedef struct void (*pfnFreeEvent)(struct CListEvent*);
struct CListEvent* (*pfnAddEvent)(CLISTEVENT*);
- CLISTEVENT* (*pfnGetEvent)(HCONTACT hContact, int idx);
+ CLISTEVENT* (*pfnGetEvent)(MCONTACT hContact, int idx);
- int (*pfnRemoveEvent)(HCONTACT hContact, HANDLE hDbEvent);
+ int (*pfnRemoveEvent)(MCONTACT hContact, HANDLE hDbEvent);
int (*pfnGetImlIconIndex)(HICON hIcon);
/*************************************************************************************
@@ -443,7 +443,7 @@ typedef struct TCHAR* szTip;
BOOL bTrayMenuOnScreen;
- HICON (*pfnGetIconFromStatusMode)(HCONTACT hContact, const char *szProto, int status);
+ HICON (*pfnGetIconFromStatusMode)(MCONTACT hContact, const char *szProto, int status);
void (*pfnInitTray)(void);
int (*pfnTrayIconAdd)(HWND hwnd, const char *szProto, const char *szIconProto, int status);
@@ -471,12 +471,12 @@ typedef struct * version 7 additions (0.11.0.x) - extra images
*************************************************************************************/
void (*pfnReloadExtraIcons)(void);
- void (*pfnSetAllExtraIcons)(HCONTACT hContact);
+ void (*pfnSetAllExtraIcons)(MCONTACT hContact);
/*************************************************************************************
* Miranda NG additions
*************************************************************************************/
- int (*pfnGetContactIcon)(HCONTACT hContact);
+ int (*pfnGetContactIcon)(MCONTACT hContact);
int (*pfnTrayCalcChanged)(const char *szChangedProto, int averageMode, int iProtoCount);
int (*pfnGetAverageMode)(int *pNetProtoCount);
diff --git a/include/m_contacts.h b/include/m_contacts.h index c77f18e446..04a25f7d37 100644 --- a/include/m_contacts.h +++ b/include/m_contacts.h @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. typedef struct {
int cbSize;
BYTE dwFlag;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
BYTE type;
union {
diff --git a/include/m_core.h b/include/m_core.h index eeb2707664..d8dc70852d 100644 --- a/include/m_core.h +++ b/include/m_core.h @@ -48,18 +48,18 @@ MIR_CORE_DLL(LPCTSTR) CmdLine_GetOption(LPCTSTR ptszParameter); ///////////////////////////////////////////////////////////////////////////////
// database functions
-typedef UINT32 MCONTACT, HCONTACT;
+typedef UINT32 MCONTACT;
#define INVALID_CONTACT_ID (MCONTACT(-1))
// DBVARIANT: used by db/contact/getsetting and db/contact/writesetting
-#define DBVT_DELETED 0 //this setting just got deleted, no other values are valid
-#define DBVT_BYTE 1 //bVal and cVal are valid
-#define DBVT_WORD 2 //wVal and sVal are valid
-#define DBVT_DWORD 4 //dVal and lVal are valid
-#define DBVT_ASCIIZ 255 //pszVal is valid
-#define DBVT_BLOB 254 //cpbVal and pbVal are valid
-#define DBVT_UTF8 253 //pszVal is valid
-#define DBVT_WCHAR 252 //pszVal is valid
+#define DBVT_DELETED 0 // this setting just got deleted, no other values are valid
+#define DBVT_BYTE 1 // bVal and cVal are valid
+#define DBVT_WORD 2 // wVal and sVal are valid
+#define DBVT_DWORD 4 // dVal and lVal are valid
+#define DBVT_ASCIIZ 255 // pszVal is valid
+#define DBVT_BLOB 254 // cpbVal and pbVal are valid
+#define DBVT_UTF8 253 // pszVal is valid
+#define DBVT_WCHAR 252 // pszVal is valid
#if defined(_UNICODE)
#define DBVT_TCHAR DBVT_WCHAR
#else
@@ -125,9 +125,9 @@ are no contacts in the db. */
#if defined(__cplusplus)
- MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto = NULL);
+ MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto = NULL);
#else
- MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto);
+ MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto);
#endif
/*
@@ -139,9 +139,9 @@ hContact was the last contact in the db or hContact was invalid. */
#if defined(__cplusplus)
- MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto = NULL);
+ MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto = NULL);
#else
- MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto);
+ MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto);
#endif
/******************************************************************************
@@ -170,7 +170,7 @@ db/time/x below with useful stuff for dealing with it. #define EVENTTYPE_AUTHREQUEST 1001 //specific codes, hence the module-
#define EVENTTYPE_FILE 1002 //specific limit has been raised to 2000
-MIR_CORE_DLL(HANDLE) db_event_add(HCONTACT hContact, DBEVENTINFO *dbei);
+MIR_CORE_DLL(HANDLE) db_event_add(MCONTACT hContact, DBEVENTINFO *dbei);
/*
Gets the number of events in the chain belonging to a contact in the database.
@@ -178,7 +178,7 @@ Returns the number of events in the chain owned by hContact or -1 if hContact is invalid. They can be retrieved using the db_event_first/last() services.
*/
-MIR_CORE_DLL(int) db_event_count(HCONTACT hContact);
+MIR_CORE_DLL(int) db_event_count(MCONTACT hContact);
/*
Removes a single event from the database
@@ -187,7 +187,7 @@ Returns 0 on success, or nonzero if hDbEvent was invalid Triggers a db/event/deleted event just *before* the event is deleted
*/
-MIR_CORE_DLL(int) db_event_delete(HCONTACT hContact, HANDLE hDbEvent);
+MIR_CORE_DLL(int) db_event_delete(MCONTACT hContact, HANDLE hDbEvent);
/*
Retrieves a handle to the first event in the chain for hContact
@@ -195,7 +195,7 @@ Returns the handle, or NULL if hContact is invalid or has no events Events in a chain are sorted chronologically automatically
*/
-MIR_CORE_DLL(HANDLE) db_event_first(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_first(MCONTACT hContact);
/*
Retrieves a handle to the first unread event in the chain for hContact
@@ -209,7 +209,7 @@ This service is designed for startup, reloading all the events that remained unread from last time
*/
-MIR_CORE_DLL(HANDLE) db_event_firstUnread(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_firstUnread(MCONTACT hContact);
/*
Retrieves all the information stored in hDbEvent
@@ -246,7 +246,7 @@ This service is exceptionally slow. Use only when you have no other choice at all.
*/
-MIR_CORE_DLL(HCONTACT) db_event_getContact(HANDLE hDbEvent);
+MIR_CORE_DLL(MCONTACT) db_event_getContact(HANDLE hDbEvent);
/*
Retrieves a handle to the last event in the chain for hContact
@@ -254,7 +254,7 @@ Returns the handle, or NULL if hContact is invalid or has no events Events in a chain are sorted chronologically automatically
*/
-MIR_CORE_DLL(HANDLE) db_event_last(HCONTACT hContact);
+MIR_CORE_DLL(HANDLE) db_event_last(MCONTACT hContact);
/*
Changes the flags for an event to mark it as read.
@@ -265,7 +265,7 @@ This is the one database write operation that does not trigger an event. Modules should not save flags states for any length of time.
*/
-MIR_CORE_DLL(int) db_event_markRead(HCONTACT hContact, HANDLE hDbEvent);
+MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, HANDLE hDbEvent);
/*
Retrieves a handle to the next event in a chain after hDbEvent
@@ -287,33 +287,33 @@ MIR_CORE_DLL(HANDLE) db_event_prev(HANDLE hDbEvent); * DATABASE SETTINGS
*/
-MIR_CORE_DLL(INT_PTR) db_get(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
-MIR_CORE_DLL(int) db_get_b(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
-MIR_CORE_DLL(int) db_get_w(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
-MIR_CORE_DLL(DWORD) db_get_dw(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD errorValue);
-MIR_CORE_DLL(char*) db_get_sa(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
-MIR_CORE_DLL(WCHAR*) db_get_wsa(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
+MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
+MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, int errorValue);
+MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD errorValue);
+MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
+MIR_CORE_DLL(WCHAR*) db_get_wsa(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
-MIR_CORE_DLL(int) db_get_static(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
-MIR_CORE_DLL(int) db_get_static_utf(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
-MIR_CORE_DLL(int) db_get_wstatic(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WCHAR *pDest, int cbDest);
+MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
+MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, char *pDest, int cbDest);
+MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WCHAR *pDest, int cbDest);
#if defined(__cplusplus)
- MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ);
+ MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType=DBVT_ASCIIZ);
#else
- MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType);
+ MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv, const int nType);
#endif
-MIR_CORE_DLL(INT_PTR) db_set(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
-MIR_CORE_DLL(INT_PTR) db_set_b(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, BYTE val);
-MIR_CORE_DLL(INT_PTR) db_set_w(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WORD val);
-MIR_CORE_DLL(INT_PTR) db_set_dw(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD val);
-MIR_CORE_DLL(INT_PTR) db_set_s(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
-MIR_CORE_DLL(INT_PTR) db_set_ws(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCWSTR val);
-MIR_CORE_DLL(INT_PTR) db_set_utf(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
-MIR_CORE_DLL(INT_PTR) db_set_blob(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, void *val, unsigned len);
+MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DBVARIANT *dbv);
+MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, BYTE val);
+MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, WORD val);
+MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, DWORD val);
+MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCWSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, LPCSTR val);
+MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting, void *val, unsigned len);
-MIR_CORE_DLL(INT_PTR) db_unset(HCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
+MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, LPCSTR szModule, LPCSTR szSetting);
#if defined(__cplusplus)
MIR_CORE_DLL(BOOL) db_set_resident(LPCSTR szModule, const char *szService, BOOL bEnable=TRUE);
@@ -388,10 +388,10 @@ MIR_CORE_DLL(void) KillModuleServices(HINSTANCE hInst); MIR_CORE_DLL(void) KillObjectServices(void* pObject);
#if defined(_STATIC)
-__declspec(dllexport) INT_PTR CallContactService(HCONTACT, const char *, WPARAM, LPARAM);
+__declspec(dllexport) INT_PTR CallContactService(MCONTACT, const char *, WPARAM, LPARAM);
__declspec(dllexport) INT_PTR CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
#else
-MIR_C_CORE_DLL(INT_PTR) CallContactService(HCONTACT, const char *, WPARAM, LPARAM);
+MIR_C_CORE_DLL(INT_PTR) CallContactService(MCONTACT, const char *, WPARAM, LPARAM);
MIR_C_CORE_DLL(INT_PTR) CallProtoService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
#endif
@@ -614,7 +614,7 @@ MIR_CORE_DLL(int) mir_vsnwprintf(WCHAR *buffer, size_t count, const WCHAR* fm MIR_CORE_DLL(INT_PTR) ProtoCallService(LPCSTR szModule, const char *szService, WPARAM wParam, LPARAM lParam);
MIR_CORE_DLL(int) ProtoServiceExists(LPCSTR szModule, const char *szService);
-MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(LPCSTR szModule, MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
// Call it in the very beginning of your proto's constructor
MIR_CORE_DLL(void) ProtoConstructor(struct PROTO_INTERFACE *pThis, const char *pszModuleName, const TCHAR *ptszUserName);
diff --git a/include/m_database.h b/include/m_database.h index a4891d6a4f..01922171f8 100644 --- a/include/m_database.h +++ b/include/m_database.h @@ -264,9 +264,9 @@ Returns DBEVENTTYPEDESCR* or NULL, if an event isn't found. #define MS_DB_EVENT_GETTYPE "DB/EventType/Get"
-__forceinline HCONTACT DbGetAuthEventContact(DBEVENTINFO* dbei)
+__forceinline MCONTACT DbGetAuthEventContact(DBEVENTINFO* dbei)
{
- return (HCONTACT)(*(DWORD*)&dbei->pBlob[sizeof(DWORD)]);
+ return (MCONTACT)(*(DWORD*)&dbei->pBlob[sizeof(DWORD)]);
}
/* DB/Event/GetText (0.7.0+)
@@ -531,19 +531,19 @@ don't change any of the members. /* inlined range tolerate versions */
-__inline BYTE DBGetContactSettingRangedByte(HCONTACT hContact, const char *szModule, const char *szSetting, BYTE errorValue, BYTE minValue, BYTE maxValue)
+__inline BYTE DBGetContactSettingRangedByte(MCONTACT hContact, const char *szModule, const char *szSetting, BYTE errorValue, BYTE minValue, BYTE maxValue)
{
BYTE bVal = db_get_b(hContact, szModule, szSetting, errorValue);
return (bVal < minValue || bVal > maxValue) ? errorValue : bVal;
}
-__inline WORD DBGetContactSettingRangedWord(HCONTACT hContact, const char *szModule, const char *szSetting, WORD errorValue, WORD minValue, WORD maxValue)
+__inline WORD DBGetContactSettingRangedWord(MCONTACT hContact, const char *szModule, const char *szSetting, WORD errorValue, WORD minValue, WORD maxValue)
{
WORD wVal = db_get_w(hContact, szModule, szSetting, errorValue);
return (wVal < minValue || wVal > maxValue) ? errorValue : wVal;
}
-__inline DWORD DBGetContactSettingRangedDword(HCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue, DWORD minValue, DWORD maxValue)
+__inline DWORD DBGetContactSettingRangedDword(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue, DWORD minValue, DWORD maxValue)
{
DWORD dwVal = db_get_dw(hContact, szModule, szSetting, errorValue);
return (dwVal < minValue || dwVal > maxValue) ? errorValue : dwVal;
diff --git a/include/m_extraicons.h b/include/m_extraicons.h index e67eec4905..3696372d8e 100644 --- a/include/m_extraicons.h +++ b/include/m_extraicons.h @@ -95,14 +95,14 @@ typedef struct { MIRANDAHOOK RebuildIcons;
// Callback to set the icon to clist, calling MS_CLIST_EXTRA_SET_ICON or MS_EXTRAICON_SET_ICON
- // wParam = HCONTACT hContact
+ // wParam = MCONTACT hContact
// lParam = 0
MIRANDAHOOK ApplyIcon;
// Other optional callbacks
// [Optional] Callback called when extra icon was clicked
- // wParam = HCONTACT hContact
+ // wParam = MCONTACT hContact
// lParam = int slot
// param = onClickParam
MIRANDAHOOKPARAM OnClick;
@@ -122,7 +122,7 @@ typedef struct { typedef struct {
int cbSize;
HANDLE hExtraIcon; // Value returned by MS_EXTRAICON_REGISTER
- HCONTACT hContact; // Contact to set the extra icon
+ MCONTACT hContact; // Contact to set the extra icon
union { // The icon to be set. This depends on the type of the extra icon:
HANDLE hImage; // Value returned by MS_CLIST_EXTRA_ADD_ICON (if EXTRAICON_TYPE_CALLBACK)
// or the icolib icon handle (if EXTRAICON_TYPE_ICOLIB)
@@ -185,7 +185,7 @@ static HANDLE ExtraIcon_Register( return (HANDLE) CallService(MS_EXTRAICON_REGISTER, (WPARAM) &ei, hLangpack);
}
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HCONTACT hContact, HANDLE hImage)
+static int ExtraIcon_SetIcon(HANDLE hExtraIcon, MCONTACT hContact, HANDLE hImage)
{
EXTRAICON ei = { sizeof(ei) };
ei.hExtraIcon = hExtraIcon;
@@ -195,7 +195,7 @@ static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HCONTACT hContact, HANDLE hImage return CallService(MS_EXTRAICON_SET_ICON, (WPARAM) &ei, 0);
}
-static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HCONTACT hContact, const char *icoName)
+static int ExtraIcon_SetIcon(HANDLE hExtraIcon, MCONTACT hContact, const char *icoName)
{
EXTRAICON ei = { sizeof(ei) };
ei.hExtraIcon = hExtraIcon;
@@ -205,7 +205,7 @@ static int ExtraIcon_SetIcon(HANDLE hExtraIcon, HCONTACT hContact, const char *i return CallService(MS_EXTRAICON_SET_ICON_BY_NAME, (WPARAM) &ei, 0);
}
-static int ExtraIcon_Clear(HANDLE hExtraIcon, HCONTACT hContact)
+static int ExtraIcon_Clear(HANDLE hExtraIcon, MCONTACT hContact)
{
EXTRAICON ei = { sizeof(ei) };
ei.hExtraIcon = hExtraIcon;
diff --git a/include/m_jabber.h b/include/m_jabber.h index 97489b0d39..a09d95d3e1 100644 --- a/include/m_jabber.h +++ b/include/m_jabber.h @@ -105,10 +105,10 @@ struct IJabberInterface virtual int STDMETHODCALLTYPE CompareJIDs(LPCTSTR jid1, LPCTSTR jid2) = 0;
// Returns contact handle for given JID, or NULL on error.
- virtual HCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid) = 0;
+ virtual MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid) = 0;
// Returns JID of hContact, or NULL on error. You must free the result using mir_free().
- virtual LPTSTR STDMETHODCALLTYPE ContactToJID(HCONTACT hContact) = 0;
+ virtual LPTSTR STDMETHODCALLTYPE ContactToJID(MCONTACT hContact) = 0;
// Returns best resource name for given JID, or NULL on error. You must free the result using mir_free().
virtual LPTSTR STDMETHODCALLTYPE GetBestResourceName(LPCTSTR jid) = 0;
diff --git a/include/m_message.h b/include/m_message.h index 277084e113..cd16d59d58 100644 --- a/include/m_message.h +++ b/include/m_message.h @@ -62,7 +62,7 @@ extern int hLangpack; typedef struct {
int cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwndWindow; // top level window for the contact
const char* szModule; // used to get plugin type (which means you could use local if needed)
unsigned int uType; // see event types above
@@ -90,7 +90,7 @@ typedef struct { typedef struct {
int cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
int uFlags; // see uflags above
} MessageWindowInputData;
@@ -101,7 +101,7 @@ typedef struct { 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
@@ -121,7 +121,7 @@ typedef struct { typedef struct {
int cbSize;
int seq; // number returned by PSS_MESSAGE
- HCONTACT hContact;
+ MCONTACT hContact;
DBEVENTINFO *dbei; // database event written on the basis of message sent
} MessageWindowEvent;
@@ -146,7 +146,7 @@ typedef struct { int cbSize;
unsigned int uType; // see popup types above
unsigned int uFlags; // used to indicate in which window the popup was requested
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwnd; // window where the popup was requested
HMENU hMenu; // The handle to the menu
POINT pt; // The point, in screen coords
@@ -213,7 +213,7 @@ __forceinline void Srmm_RemoveIcon(StatusIconData *sid) // if either hIcon, hIconDisabled or szTooltip is null, they will not be modified
#define MS_MSG_MODIFYICON "MessageAPI/ModifyIcon"
-__forceinline void Srmm_ModifyIcon(HCONTACT hContact, StatusIconData *sid)
+__forceinline void Srmm_ModifyIcon(MCONTACT hContact, StatusIconData *sid)
{ CallService(MS_MSG_MODIFYICON, (WPARAM)hContact, (LPARAM)sid);
}
@@ -222,7 +222,7 @@ __forceinline void Srmm_ModifyIcon(HCONTACT hContact, StatusIconData *sid) // returns (StatusIconData*)icon description filled for the required contact
// don't free this memory.
-__forceinline StatusIconData* Srmm_GetNthIcon(HCONTACT hContact, int index)
+__forceinline StatusIconData* Srmm_GetNthIcon(MCONTACT hContact, int index)
{ return (StatusIconData*)CallService("MessageAPI/GetNthIcon", (WPARAM)hContact, index);
}
diff --git a/include/m_popup.h b/include/m_popup.h index 72f3d11b62..3b4cfc6240 100644 --- a/include/m_popup.h +++ b/include/m_popup.h @@ -32,7 +32,7 @@ mi.position = 0; //You don't need it and it's better if you put it to zero. // Extended popup data
typedef struct
{
- HCONTACT lchContact;
+ MCONTACT lchContact;
HICON lchIcon;
union
{
@@ -55,7 +55,7 @@ typedef struct // Unicode version of POPUPDATA
typedef struct
{
- HCONTACT lchContact;
+ MCONTACT lchContact;
HICON lchIcon;
union
{
@@ -130,9 +130,9 @@ lParam = 0; Returns: the HANDLE of the contact. Can return NULL, meaning it's the main contact. -1 means failure.
*/
#define MS_POPUP_GETCONTACT "Popup/GetContact"
-static HCONTACT __inline PUGetContact(HWND hPopupWindow)
+static MCONTACT __inline PUGetContact(HWND hPopupWindow)
{
- return (HCONTACT)CallService(MS_POPUP_GETCONTACT, (WPARAM)hPopupWindow, 0);
+ return (MCONTACT)CallService(MS_POPUP_GETCONTACT, (WPARAM)hPopupWindow, 0);
}
/* Popup/GetPluginData
@@ -375,7 +375,7 @@ typedef struct { const TCHAR *ptszText;
};
void *PluginData;
- HCONTACT hContact;
+ MCONTACT hContact;
} POPUPDATACLASS;
// wParam = 0
diff --git a/include/m_protocols.h b/include/m_protocols.h index 6907f5197e..041ea2b02b 100644 --- a/include/m_protocols.h +++ b/include/m_protocols.h @@ -37,7 +37,7 @@ struct PROTO_INTERFACE; //returns the value as documented in the PS_ definition (m_protosvc.h)
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
const char *szProtoService; //a PS_ constant
WPARAM wParam;
LPARAM lParam;
@@ -54,7 +54,7 @@ typedef struct { typedef struct {
int cbSize;
const char *szModule; //the name of the protocol module which initiated this ack
- HCONTACT hContact;
+ MCONTACT hContact;
int type; //an ACKTYPE_ constant
int result; //an ACKRESULT_ constant
HANDLE hProcess; //a caller-defined process code
@@ -120,7 +120,7 @@ typedef struct { typedef struct tagPROTOFILETRANSFERSTATUS
{
size_t cbSize;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD flags; // one of PFTS_* constants
union {
@@ -232,7 +232,7 @@ typedef struct { //contact.
#define MS_PROTO_GETCONTACTBASEPROTO "Proto/GetContactBaseProto"
-__forceinline char* GetContactProto(HCONTACT hContact)
+__forceinline char* GetContactProto(MCONTACT hContact)
{ return (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
}
@@ -404,7 +404,7 @@ ProtoBroadcastAck(), listeners must hook ME_PROTO_ACK, note that lParam = ACKDAT typedef struct {
int cbSize; // sizeof()
- HCONTACT hContact; // this might have to be set by the caller too
+ MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
char filename[MAX_PATH]; // full path to filename which contains the avatar
} PROTO_AVATAR_INFORMATION;
@@ -412,7 +412,7 @@ typedef struct { #ifdef _UNICODE
typedef struct {
int cbSize; // sizeof()
- HCONTACT hContact; // this might have to be set by the caller too
+ MCONTACT hContact; // this might have to be set by the caller too
int format; // PA_FORMAT_*
WCHAR filename[MAX_PATH]; // full path to filename which contains the avatar
} PROTO_AVATAR_INFORMATIONW;
diff --git a/include/m_protoint.h b/include/m_protoint.h index 77612e8ee7..250fda3176 100644 --- a/include/m_protoint.h +++ b/include/m_protoint.h @@ -72,68 +72,68 @@ struct PROTO_INTERFACE : public MZeroedObject ProtoLogW(this, wszFormat, args);
}
- __forceinline INT_PTR ProtoBroadcastAck(HCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam) {
+ __forceinline INT_PTR ProtoBroadcastAck(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam) {
return ::ProtoBroadcastAck(m_szModuleName, hContact, type, hResult, hProcess, lParam); }
__forceinline INT_PTR delSetting(const char *name) { return db_unset(NULL, m_szModuleName, name); }
- __forceinline INT_PTR delSetting(HCONTACT hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
+ __forceinline INT_PTR delSetting(MCONTACT hContact, const char *name) { return db_unset(hContact, m_szModuleName, name); }
__forceinline bool getBool(const char *name, bool defaultValue) {
return db_get_b(NULL, m_szModuleName, name, defaultValue) != 0; }
- __forceinline bool getBool(HCONTACT hContact, const char *name, bool defaultValue) {
+ __forceinline bool getBool(MCONTACT hContact, const char *name, bool defaultValue) {
return db_get_b(hContact, m_szModuleName, name, defaultValue) != 0; }
- __forceinline bool isChatRoom(HCONTACT hContact) { return getBool(hContact, "ChatRoom", false); }
+ __forceinline bool isChatRoom(MCONTACT hContact) { return getBool(hContact, "ChatRoom", false); }
__forceinline int getByte(const char *name, BYTE defaultValue) {
return db_get_b(NULL, m_szModuleName, name, defaultValue); }
- __forceinline int getByte(HCONTACT hContact, const char *name, BYTE defaultValue) {
+ __forceinline int getByte(MCONTACT hContact, const char *name, BYTE defaultValue) {
return db_get_b(hContact, m_szModuleName, name, defaultValue); }
__forceinline int getWord(const char *name, WORD defaultValue) {
return db_get_w(NULL, m_szModuleName, name, defaultValue); }
- __forceinline int getWord(HCONTACT hContact, const char *name, WORD defaultValue) {
+ __forceinline int getWord(MCONTACT hContact, const char *name, WORD defaultValue) {
return db_get_w(hContact, m_szModuleName, name, defaultValue); }
__forceinline DWORD getDword(const char *name, DWORD defaultValue) {
return db_get_dw(NULL, m_szModuleName, name, defaultValue); }
- __forceinline DWORD getDword(HCONTACT hContact, const char *name, DWORD defaultValue) {
+ __forceinline DWORD getDword(MCONTACT hContact, const char *name, DWORD defaultValue) {
return db_get_dw(hContact, m_szModuleName, name, defaultValue); }
__forceinline INT_PTR getString(const char *name, DBVARIANT *result) {
return db_get_s(NULL, m_szModuleName, name, result); }
- __forceinline INT_PTR getString(HCONTACT hContact, const char *name, DBVARIANT *result) {
+ __forceinline INT_PTR getString(MCONTACT hContact, const char *name, DBVARIANT *result) {
return db_get_s(hContact, m_szModuleName, name, result); }
__forceinline INT_PTR getWString(const char *name, DBVARIANT *result) {
return db_get_ws(NULL, m_szModuleName, name, result); }
- __forceinline INT_PTR getWString(HCONTACT hContact, const char *name, DBVARIANT *result) {
+ __forceinline INT_PTR getWString(MCONTACT hContact, const char *name, DBVARIANT *result) {
return db_get_ws(hContact, m_szModuleName, name, result); }
__forceinline char* getStringA(const char *name) {
return db_get_sa(NULL, m_szModuleName, name); }
- __forceinline char* getStringA(HCONTACT hContact, const char *name) {
+ __forceinline char* getStringA(MCONTACT hContact, const char *name) {
return db_get_sa(hContact, m_szModuleName, name); }
__forceinline WCHAR* getWStringA(const char *name) {
return db_get_wsa(NULL, m_szModuleName, name); }
- __forceinline WCHAR* getWStringA(HCONTACT hContact, const char *name) {
+ __forceinline WCHAR* getWStringA(MCONTACT hContact, const char *name) {
return db_get_wsa(hContact, m_szModuleName, name); }
__forceinline void setByte(const char *name, BYTE value) { db_set_b(NULL, m_szModuleName, name, value); }
- __forceinline void setByte(HCONTACT hContact, const char *name, BYTE value) { db_set_b(hContact, m_szModuleName, name, value); }
+ __forceinline void setByte(MCONTACT hContact, const char *name, BYTE value) { db_set_b(hContact, m_szModuleName, name, value); }
__forceinline void setWord(const char *name, WORD value) { db_set_w(NULL, m_szModuleName, name, value); }
- __forceinline void setWord(HCONTACT hContact, const char *name, WORD value) { db_set_w(hContact, m_szModuleName, name, value); }
+ __forceinline void setWord(MCONTACT hContact, const char *name, WORD value) { db_set_w(hContact, m_szModuleName, name, value); }
__forceinline void setDword(const char *name, DWORD value) { db_set_dw(NULL, m_szModuleName, name, value); }
- __forceinline void setDword(HCONTACT hContact, const char *name, DWORD value) { db_set_dw(hContact, m_szModuleName, name, value); }
+ __forceinline void setDword(MCONTACT hContact, const char *name, DWORD value) { db_set_dw(hContact, m_szModuleName, name, value); }
__forceinline void setString(const char *name, const char* value) { db_set_s(NULL, m_szModuleName, name, value); }
- __forceinline void setString(HCONTACT hContact, const char *name, const char* value) { db_set_s(hContact, m_szModuleName, name, value); }
+ __forceinline void setString(MCONTACT hContact, const char *name, const char* value) { db_set_s(hContact, m_szModuleName, name, value); }
__forceinline void setWString(const char *name, const WCHAR* value) { db_set_ws(NULL, m_szModuleName, name, value); }
- __forceinline void setWString(HCONTACT hContact, const char *name, const WCHAR* value) { db_set_ws(hContact, m_szModuleName, name, value); }
+ __forceinline void setWString(MCONTACT hContact, const char *name, const WCHAR* value) { db_set_ws(hContact, m_szModuleName, name, value); }
#if defined(_UNICODE)
#define debugLog debugLogW
@@ -150,23 +150,23 @@ struct PROTO_INTERFACE : public MZeroedObject //////////////////////////////////////////////////////////////////////////////////////
// Virtual functions
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0;
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) = 0;
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr) = 0;
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) = 0;
virtual int __cdecl Authorize(HANDLE hDbEvent) = 0;
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason) = 0;
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage) = 0;
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*) = 0;
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage) = 0;
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData) = 0;
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath) = 0;
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer) = 0;
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason) = 0;
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath) = 0;
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer) = 0;
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason) = 0;
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename) = 0;
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL) = 0;
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType) = 0;
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL) = 0;
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType) = 0;
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id) = 0;
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email) = 0;
@@ -174,24 +174,24 @@ struct PROTO_INTERFACE : public MZeroedObject virtual HWND __cdecl SearchAdvanced(HWND owner) = 0;
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner) = 0;
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT*) = 0;
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*) = 0;
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*) = 0;
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*) = 0;
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*) = 0;
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*) = 0;
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) = 0;
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles) = 0;
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg) = 0;
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url) = 0;
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) = 0;
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles) = 0;
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg) = 0;
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url) = 0;
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode) = 0;
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode) = 0;
virtual int __cdecl SetStatus(int iNewStatus) = 0;
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact) = 0;
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt) = 0;
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact) = 0;
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt) = 0;
virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg) = 0;
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type) = 0;
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type) = 0;
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam) = 0;
};
diff --git a/include/m_protomod.h b/include/m_protomod.h index cc10b2707a..fdd07122c6 100644 --- a/include/m_protomod.h +++ b/include/m_protomod.h @@ -101,17 +101,17 @@ __forceinline HANDLE CreateProtoServiceFunction(const char *szModule, const char //differences between threads the functions are in.
#define MS_PROTO_CHAINRECV "Proto/ChainRecv"
-__forceinline INT_PTR ProtoChainRecv(HCONTACT hContact, char *szService, WPARAM wParam, LPARAM lParam)
+__forceinline INT_PTR ProtoChainRecv(MCONTACT hContact, char *szService, WPARAM wParam, LPARAM lParam)
{ CCSDATA ccs = { hContact, szService, wParam, lParam };
return CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
-__forceinline INT_PTR ProtoChainRecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+__forceinline INT_PTR ProtoChainRecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{ CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pre };
return CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
-__forceinline INT_PTR ProtoChainRecvFile(HCONTACT hContact, PROTORECVFILET *pre)
+__forceinline INT_PTR ProtoChainRecvFile(MCONTACT hContact, PROTORECVFILET *pre)
{ CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)pre };
return CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)&ccs);
}
diff --git a/include/m_protosvc.h b/include/m_protosvc.h index 292be2be1e..3b13692b32 100644 --- a/include/m_protosvc.h +++ b/include/m_protosvc.h @@ -740,7 +740,7 @@ Returns the result of db_event_add() #define MS_PROTO_RECVMSG "Proto/RecvMessage"
-__forceinline INT_PTR Proto_RecvMessage(HCONTACT hContact, PROTORECVEVENT *pcre)
+__forceinline INT_PTR Proto_RecvMessage(MCONTACT hContact, PROTORECVEVENT *pcre)
{
CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)pcre };
return CallService(MS_PROTO_RECVMSG, 0, (LPARAM)&ccs );
@@ -777,7 +777,7 @@ typedef struct { #define MS_PROTO_RECVFILET "Proto/RecvFileT"
-__forceinline INT_PTR Proto_RecvFile(HCONTACT hContact, PROTORECVFILET *pcre)
+__forceinline INT_PTR Proto_RecvFile(MCONTACT hContact, PROTORECVFILET *pcre)
{
CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)pcre };
return CallService(MS_PROTO_RECVFILET, 0, ( LPARAM )&ccs);
diff --git a/include/m_timezones.h b/include/m_timezones.h index 8bfb425a73..0072c1ab74 100644 --- a/include/m_timezones.h +++ b/include/m_timezones.h @@ -44,15 +44,15 @@ typedef struct size_t cbSize;
HANDLE (*createByName)(LPCTSTR tszName, DWORD dwFlags);
- HANDLE (*createByContact)(HCONTACT hContact, DWORD dwFlags);
- void (*storeByContact)(HCONTACT hContact, HANDLE hTZ);
+ HANDLE (*createByContact)(MCONTACT hContact, DWORD dwFlags);
+ void (*storeByContact)(MCONTACT hContact, HANDLE hTZ);
int (*printDateTime)(HANDLE hTZ, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
int (*printTimeStamp)(HANDLE hTZ, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags);
- int (*prepareList)(HCONTACT hContact, HWND hWnd, DWORD dwFlags);
- int (*selectListItem)(HCONTACT hContact, HWND hWnd, DWORD dwFlags);
- void (*storeListResults)(HCONTACT hContact, HWND hWnd, DWORD dwFlags);
+ int (*prepareList)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
+ int (*selectListItem)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
+ void (*storeListResults)(MCONTACT hContact, HWND hWnd, DWORD dwFlags);
int (*getTimeZoneTime)(HANDLE hTZ, SYSTEMTIME *st);
mir_time (*timeStampToTimeZoneTimeStamp)(HANDLE hTZ, mir_time ts);
@@ -62,19 +62,19 @@ typedef struct LPCTSTR (*getTzDescription)(LPCTSTR TZname);
#ifdef __cplusplus
- int printDateTimeByContact (HCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
+ int printDateTimeByContact (MCONTACT hContact, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
{ return printDateTime(createByContact(hContact, dwFlags), szFormat, szDest, cbDest, dwFlags); }
- int printTimeStampByContact(HCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
+ int printTimeStampByContact(MCONTACT hContact, mir_time ts, LPCTSTR szFormat, LPTSTR szDest, int cbDest, DWORD dwFlags)
{ return printTimeStamp(createByContact(hContact, dwFlags), ts, szFormat, szDest, cbDest, dwFlags); }
- LPTIME_ZONE_INFORMATION getTziByContact(HCONTACT hContact)
+ LPTIME_ZONE_INFORMATION getTziByContact(MCONTACT hContact)
{ return getTzi(createByContact(hContact, 0)); }
- int getTimeZoneTimeByContact(HCONTACT hContact, SYSTEMTIME *st)
+ int getTimeZoneTimeByContact(MCONTACT hContact, SYSTEMTIME *st)
{ return getTimeZoneTime(createByContact(hContact, 0), st); }
- mir_time timeStampToTimeZoneTimeStampByContact(HCONTACT hContact, mir_time ts)
+ mir_time timeStampToTimeZoneTimeStampByContact(MCONTACT hContact, mir_time ts)
{ return timeStampToTimeZoneTimeStamp(createByContact(hContact, 0), ts); }
#endif
diff --git a/include/m_utils.h b/include/m_utils.h index 10f498609c..eeaa419094 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -160,10 +160,10 @@ __forceinline HANDLE WindowList_Destroy(HANDLE hList) typedef struct {
HANDLE hList;
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
} WINDOWLISTENTRY;
#define MS_UTILS_ADDTOWINDOWLIST "Utils/AddToWindowList"
-__forceinline INT_PTR WindowList_Add(HANDLE hList, HWND hwnd, HCONTACT hContact) {
+__forceinline INT_PTR WindowList_Add(HANDLE hList, HWND hwnd, MCONTACT hContact) {
WINDOWLISTENTRY wle;
wle.hList = hList; wle.hwnd = hwnd; wle.hContact = hContact;
return CallService(MS_UTILS_ADDTOWINDOWLIST, 0, (LPARAM)&wle);
@@ -183,7 +183,7 @@ __forceinline INT_PTR WindowList_Remove(HANDLE hList, HWND hwnd) { // lParam = (WPARAM)(HANDLE)hContact
// returns the window handle on success, or NULL on failure
#define MS_UTILS_FINDWINDOWINLIST "Utils/FindWindowInList"
-__forceinline HWND WindowList_Find(HANDLE hList, HCONTACT hContact) {
+__forceinline HWND WindowList_Find(HANDLE hList, MCONTACT hContact) {
return (HWND)CallService(MS_UTILS_FINDWINDOWINLIST, (WPARAM)hList, (LPARAM)hContact);
}
@@ -236,12 +236,12 @@ __forceinline INT_PTR WindowList_BroadcastAsync(HANDLE hList, UINT message, WPAR //returns 0 on success, nonzero on failure
typedef struct {
HWND hwnd;
- HCONTACT hContact;
+ MCONTACT hContact;
const char *szModule; //module name to store the setting in
const char *szNamePrefix; //text to prefix on "x", "width", etc, to form setting names
} SAVEWINDOWPOS;
#define MS_UTILS_SAVEWINDOWPOSITION "Utils/SaveWindowPos"
-__forceinline INT_PTR Utils_SaveWindowPosition(HWND hwnd, HCONTACT hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_SaveWindowPosition(HWND hwnd, MCONTACT hContact, const char *szModule, const char *szNamePrefix) {
SAVEWINDOWPOS swp;
swp.hwnd = hwnd; swp.hContact = hContact; swp.szModule = szModule; swp.szNamePrefix = szNamePrefix;
return CallService(MS_UTILS_SAVEWINDOWPOSITION, 0, (LPARAM)&swp);
@@ -260,18 +260,18 @@ __forceinline INT_PTR Utils_SaveWindowPosition(HWND hwnd, HCONTACT hContact, con #define RWPF_NOACTIVATE 4 //show but don't activate v0.3.3.0+
#define RWPF_HIDDEN 8 //make it hidden
#define MS_UTILS_RESTOREWINDOWPOSITION "Utils/RestoreWindowPos"
-__forceinline INT_PTR Utils_RestoreWindowPositionEx(HWND hwnd, int flags, HCONTACT hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionEx(HWND hwnd, int flags, MCONTACT hContact, const char *szModule, const char *szNamePrefix) {
SAVEWINDOWPOS swp;
swp.hwnd = hwnd; swp.hContact = hContact; swp.szModule = szModule; swp.szNamePrefix = szNamePrefix;
return CallService(MS_UTILS_RESTOREWINDOWPOSITION, flags, (LPARAM)&swp);
}
-__forceinline INT_PTR Utils_RestoreWindowPosition(HWND hwnd, HCONTACT hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPosition(HWND hwnd, MCONTACT hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, 0, hContact, szModule, szNamePrefix);
}
-__forceinline INT_PTR Utils_RestoreWindowPositionNoSize(HWND hwnd, HCONTACT hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionNoSize(HWND hwnd, MCONTACT hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, RWPF_NOSIZE, hContact, szModule, szNamePrefix);
}
-__forceinline INT_PTR Utils_RestoreWindowPositionNoMove(HWND hwnd, HCONTACT hContact, const char *szModule, const char *szNamePrefix) {
+__forceinline INT_PTR Utils_RestoreWindowPositionNoMove(HWND hwnd, MCONTACT hContact, const char *szModule, const char *szNamePrefix) {
return Utils_RestoreWindowPositionEx(hwnd, RWPF_NOMOVE, hContact, szModule, szNamePrefix);
}
@@ -409,7 +409,7 @@ typedef struct {
int cbSize;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
REPLACEVARSARRAY *variables;
} REPLACEVARSDATA;
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 );
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp index a4617dbd29..a5d6c1cc5d 100644 --- a/protocols/AimOscar/src/avatars.cpp +++ b/protocols/AimOscar/src/avatars.cpp @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void __cdecl CAimProto::avatar_request_thread(void* param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
char *sn = getStringA(hContact, AIM_KEY_SN);
debugLogA("Starting avatar request thread for %s)", sn);
@@ -59,7 +59,7 @@ void __cdecl CAimProto::avatar_upload_thread(void* param) delete req;
}
-void CAimProto::avatar_request_handler(HCONTACT hContact, char* hash, unsigned char type)//checks to see if the avatar needs requested
+void CAimProto::avatar_request_handler(MCONTACT hContact, char* hash, unsigned char type)//checks to see if the avatar needs requested
{
if (hContact == NULL)
{
@@ -121,7 +121,7 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const ProtoBroadcastAck(AI.hContact, ACKTYPE_AVATAR, res ? ACKRESULT_SUCCESS : ACKRESULT_FAILED, &AI, 0);
}
-int CAimProto::get_avatar_filename(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
+int CAimProto::get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
diff --git a/protocols/AimOscar/src/chat.cpp b/protocols/AimOscar/src/chat.cpp index 7ba14d4e84..29b1a202dd 100644 --- a/protocols/AimOscar/src/chat.cpp +++ b/protocols/AimOscar/src/chat.cpp @@ -68,7 +68,7 @@ void CAimProto::chat_event(const char* id, const char* sn, int evt, const TCHAR* TCHAR* idt = mir_a2t(id);
TCHAR* snt = mir_a2t(sn);
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME,
WPARAM(hContact), GCDNF_TCHAR) : snt;
@@ -137,7 +137,7 @@ int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam) case GC_USER_PRIVMESS:
{
char* sn = mir_t2a(gch->ptszUID);
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
mir_free(sn);
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
@@ -160,7 +160,7 @@ int CAimProto::OnGCEvent(WPARAM wParam,LPARAM lParam) case GC_USER_NICKLISTMENU:
{
char *sn = mir_t2a(gch->ptszUID);
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
mir_free(sn);
switch (gch->dwData)
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp index 8d4972e3e4..03871937f8 100644 --- a/protocols/AimOscar/src/file.cpp +++ b/protocols/AimOscar/src/file.cpp @@ -484,7 +484,7 @@ void CAimProto::shutdown_file_transfers(void) ft_list_type::ft_list_type() : OBJLIST <file_transfer>(10) {};
-file_transfer* ft_list_type::find_by_cookie(char* cookie, HCONTACT hContact)
+file_transfer* ft_list_type::find_by_cookie(char* cookie, MCONTACT hContact)
{
for (int i = 0; i < getCount(); ++i)
{
@@ -528,7 +528,7 @@ void ft_list_type::remove_by_ft(file_transfer *ft) }
}
-file_transfer::file_transfer(HCONTACT hCont, char* nick, char* cookie)
+file_transfer::file_transfer(MCONTACT hCont, char* nick, char* cookie)
{
memset(this, 0, sizeof(*this));
diff --git a/protocols/AimOscar/src/file.h b/protocols/AimOscar/src/file.h index 61bc3e9d13..4577f2bb0e 100644 --- a/protocols/AimOscar/src/file.h +++ b/protocols/AimOscar/src/file.h @@ -23,7 +23,7 @@ struct CAimProto; struct file_transfer
{
- HCONTACT hContact;
+ MCONTACT hContact;
char* sn;
char icbm_cookie[8];
@@ -56,7 +56,7 @@ struct file_transfer bool requester;
bool success;
- file_transfer(HCONTACT hCont, char* nick, char* cookie);
+ file_transfer(MCONTACT hCont, char* nick, char* cookie);
~file_transfer();
void listen(CAimProto* ppro);
@@ -68,8 +68,8 @@ struct ft_list_type : OBJLIST <file_transfer> {
ft_list_type();
- file_transfer* find_by_handle(HCONTACT hContact);
- file_transfer* find_by_cookie(char* cookie, HCONTACT hContact);
+ file_transfer* find_by_handle(MCONTACT hContact);
+ file_transfer* find_by_cookie(char* cookie, MCONTACT hContact);
file_transfer* find_by_port(unsigned short port);
bool find_by_ft(file_transfer *ft);
diff --git a/protocols/AimOscar/src/links.cpp b/protocols/AimOscar/src/links.cpp index a4ca30f868..0286e3af93 100644 --- a/protocols/AimOscar/src/links.cpp +++ b/protocols/AimOscar/src/links.cpp @@ -113,7 +113,7 @@ static INT_PTR ServiceParseAimLink(WPARAM /*wParam*/,LPARAM lParam) if (!proto->contact_from_sn(sn)) /* does not yet check if sn is current user */
{
- HCONTACT hContact = proto->contact_from_sn(sn, true);
+ MCONTACT hContact = proto->contact_from_sn(sn, true);
proto->add_contact_to_group(hContact, group && group[0] ? group : AIM_DEFAULT_GROUP);
}
mir_free(group);
@@ -137,7 +137,7 @@ static INT_PTR ServiceParseAimLink(WPARAM /*wParam*/,LPARAM lParam) }
if (sn == NULL) return 1; /* parse failed */
- HCONTACT hContact = proto->contact_from_sn(sn, true, true);
+ MCONTACT hContact = proto->contact_from_sn(sn, true, true);
if (hContact)
CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, (LPARAM)msg);
diff --git a/protocols/AimOscar/src/proto.cpp b/protocols/AimOscar/src/proto.cpp index c7001071cc..fb51b7e3b9 100644 --- a/protocols/AimOscar/src/proto.cpp +++ b/protocols/AimOscar/src/proto.cpp @@ -126,17 +126,17 @@ int CAimProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HCONTACT CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CAimProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (state != 1) return 0;
TCHAR *id = psr->id ? psr->id : psr->nick;
char *sn = psr->flags & PSR_UNICODE ? mir_u2a((wchar_t*)id) : mir_strdup((char*)id);
- HCONTACT hContact = contact_from_sn(sn, true, (flags & PALF_TEMPORARY) != 0);
+ MCONTACT hContact = contact_from_sn(sn, true, (flags & PALF_TEMPORARY) != 0);
mir_free(sn);
return hContact; //See authrequest for serverside addition
}
-HCONTACT __cdecl CAimProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT __cdecl CAimProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
return NULL;
}
@@ -160,7 +160,7 @@ int CAimProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CAimProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt)
+int __cdecl CAimProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
{
return 1;
}
@@ -168,7 +168,7 @@ int __cdecl CAimProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CAimProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CAimProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
//Not a real authrequest- only used b/c we don't know the group until now.
if (state != 1)
@@ -196,7 +196,7 @@ HANDLE __cdecl CAimProto::ChangeInfo(int iInfoType, void* pInfoData) ////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CAimProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CAimProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (ft && ft_list.find_by_ft(ft))
@@ -224,7 +224,7 @@ HANDLE __cdecl CAimProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const P ////////////////////////////////////////////////////////////////////////////////////////
// FileCancel - cancels a file transfer
-int __cdecl CAimProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int __cdecl CAimProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -247,7 +247,7 @@ int __cdecl CAimProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CAimProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
+int __cdecl CAimProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
{
file_transfer *ft = (file_transfer*)hTransfer;
if (!ft_list.find_by_ft(ft)) return 0;
@@ -302,7 +302,7 @@ int __cdecl CAimProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CAimProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CAimProto::GetCaps(int type, MCONTACT hContact)
{
switch (type)
{
@@ -345,7 +345,7 @@ DWORD_PTR __cdecl CAimProto::GetCaps(int type, HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CAimProto::GetInfo(HCONTACT hContact, int infoType)
+int __cdecl CAimProto::GetInfo(MCONTACT hContact, int infoType)
{
return 1;
}
@@ -421,7 +421,7 @@ HWND __cdecl CAimProto::CreateExtendedSearchUI(HWND owner) ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CAimProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT*)
+int __cdecl CAimProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT*)
{
return 1;
}
@@ -429,7 +429,7 @@ int __cdecl CAimProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CAimProto::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+int __cdecl CAimProto::RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -437,7 +437,7 @@ int __cdecl CAimProto::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CAimProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CAimProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
char *omsg = pre->szMessage;
char *bbuf = NULL;
@@ -458,7 +458,7 @@ int __cdecl CAimProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CAimProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*)
+int __cdecl CAimProto::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
{
return 1;
}
@@ -466,7 +466,7 @@ int __cdecl CAimProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CAimProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CAimProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
@@ -474,7 +474,7 @@ int __cdecl CAimProto::SendContacts(HCONTACT hContact, int flags, int nContacts, ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CAimProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE __cdecl CAimProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
if (state != 1) return 0;
@@ -557,7 +557,7 @@ void __cdecl CAimProto::msg_ack_success(void* param) }
-int __cdecl CAimProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CAimProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
if (pszSrc == NULL) return 0;
@@ -626,7 +626,7 @@ int __cdecl CAimProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc) ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CAimProto::SendUrl(HCONTACT hContact, int flags, const char* url)
+int __cdecl CAimProto::SendUrl(MCONTACT hContact, int flags, const char* url)
{
return 1;
}
@@ -634,7 +634,7 @@ int __cdecl CAimProto::SendUrl(HCONTACT hContact, int flags, const char* url) ////////////////////////////////////////////////////////////////////////////////////////
// SetApparentMode - sets the visibility m_iStatus
-int __cdecl CAimProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CAimProto::SetApparentMode(MCONTACT hContact, int mode)
{
return 0;
}
@@ -715,7 +715,7 @@ void __cdecl CAimProto::get_online_msg_thread(void* arg) {
Sleep(150);
- HCONTACT hContact = (HCONTACT)arg;
+ MCONTACT hContact = (MCONTACT)arg;
DBVARIANT dbv;
if (!db_get_ts(hContact, MOD_KEY_CL, OTH_KEY_SM, &dbv)) {
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
@@ -724,7 +724,7 @@ void __cdecl CAimProto::get_online_msg_thread(void* arg) else ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
-HANDLE __cdecl CAimProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CAimProto::GetAwayMsg(MCONTACT hContact)
{
if (state != 1)
return 0;
@@ -746,7 +746,7 @@ HANDLE __cdecl CAimProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CAimProto::RecvAwayMsg(HCONTACT hContact, int statusMode, PROTORECVEVENT* pre)
+int __cdecl CAimProto::RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* pre)
{
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)pre->szMessage);
return 0;
@@ -800,7 +800,7 @@ int __cdecl CAimProto::SetAwayMsg(int status, const TCHAR* msg) /////////////////////////////////////////////////////////////////////////////////////////
// UserIsTyping - sends a UTN notification
-int __cdecl CAimProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CAimProto::UserIsTyping(MCONTACT hContact, int type)
{
if (state != 1) return 0;
diff --git a/protocols/AimOscar/src/proto.h b/protocols/AimOscar/src/proto.h index fa1f999728..9a59176ab0 100644 --- a/protocols/AimOscar/src/proto.h +++ b/protocols/AimOscar/src/proto.h @@ -28,23 +28,23 @@ struct CAimProto : public PROTO<CAimProto> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
@@ -52,24 +52,24 @@ struct CAimProto : public PROTO<CAimProto> virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT* );
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -213,9 +213,9 @@ struct CAimProto : public PROTO<CAimProto> void __cdecl avatar_request_thread( void* param );
void __cdecl avatar_upload_thread( void* param );
- void avatar_request_handler(HCONTACT hContact, char* hash, unsigned char type);
+ void avatar_request_handler(MCONTACT hContact, char* hash, unsigned char type);
void avatar_retrieval_handler(const char* sn, const char* hash, const char* data, int data_len);
- int get_avatar_filename(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext);
+ int get_avatar_filename(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext);
//////////////////////////////////////////////////////////////////////////////////////
// away.cpp
@@ -414,37 +414,37 @@ struct CAimProto : public PROTO<CAimProto> //////////////////////////////////////////////////////////////////////////////////////
// utilities.cpp
- struct msg_ack_param { HCONTACT hContact; const char *msg; int id; bool success; };
+ struct msg_ack_param { MCONTACT hContact; const char *msg; int id; bool success; };
void __cdecl msg_ack_success(void*);
void __cdecl start_connection(void*);
- HCONTACT find_chat_contact(const char * room);
- HCONTACT contact_from_sn(const char* sn, bool addIfNeeded = false, bool temporary = false);
+ MCONTACT find_chat_contact(const char * room);
+ MCONTACT contact_from_sn(const char* sn, bool addIfNeeded = false, bool temporary = false);
void broadcast_status(int status);
bool wait_conn(HANDLE& hConn, HANDLE& hEvent, unsigned short service);
- bool is_my_contact(HCONTACT hContact);
- void add_contact_to_group(HCONTACT hContact, const char* group);
- void set_local_nick(HCONTACT hContact, char* nick, char* note);
+ bool is_my_contact(MCONTACT hContact);
+ void add_contact_to_group(MCONTACT hContact, const char* group);
+ void set_local_nick(MCONTACT hContact, char* nick, char* note);
void upload_nicks(void);
void update_server_group(const char* group, unsigned short group_id);
void offline_contacts(void);
- void offline_contact(HCONTACT hContact, bool remove_settings);
+ void offline_contact(MCONTACT hContact, bool remove_settings);
unsigned short get_default_port(void);
int open_contact_file(const char* sn, const TCHAR* file, const char* mode, TCHAR* &path, bool contact_dir);
void write_away_message(const char* sn, const char* msg, bool utf);
void write_profile(const char* sn, const char* msg, bool utf);
- unsigned short getBuddyId(HCONTACT hContact, int i);
- unsigned short getGroupId(HCONTACT hContact, int i);
- void setBuddyId(HCONTACT hContact, int i, unsigned short id);
- void setGroupId(HCONTACT hContact, int i, unsigned short id);
- int deleteBuddyId(HCONTACT hContact, int i);
- int deleteGroupId(HCONTACT hContact, int i);
+ unsigned short getBuddyId(MCONTACT hContact, int i);
+ unsigned short getGroupId(MCONTACT hContact, int i);
+ void setBuddyId(MCONTACT hContact, int i, unsigned short id);
+ void setGroupId(MCONTACT hContact, int i, unsigned short id);
+ int deleteBuddyId(MCONTACT hContact, int i);
+ int deleteGroupId(MCONTACT hContact, int i);
- unsigned short search_for_free_item_id(HCONTACT hbuddy);
+ unsigned short search_for_free_item_id(MCONTACT hbuddy);
unsigned short* get_members_of_group(unsigned short group_id, unsigned short& size);
void ShowPopup( const char* msg, int flags, char* url = 0 );
diff --git a/protocols/AimOscar/src/server.cpp b/protocols/AimOscar/src/server.cpp index 2702a5af90..4a966254a7 100644 --- a/protocols/AimOscar/src/server.cpp +++ b/protocols/AimOscar/src/server.cpp @@ -238,7 +238,7 @@ void CAimProto::snac_user_online(SNAC &snac)//family 0x0003 unsigned char sn_len = snac.ubyte();
char* sn = snac.part(1, sn_len);
- HCONTACT hContact = contact_from_sn(sn, true);
+ MCONTACT hContact = contact_from_sn(sn, true);
int offset = sn_len + 3;
int tlv_count = snac.ushort(offset);
@@ -618,7 +618,7 @@ void CAimProto::snac_user_offline(SNAC &snac)//family 0x0003 {
unsigned char buddy_length=snac.ubyte();
char* buddy=snac.part(1,buddy_length);
- HCONTACT hContact=contact_from_sn(buddy, true);
+ MCONTACT hContact=contact_from_sn(buddy, true);
if (hContact)
offline_contact(hContact,0);
mir_free(buddy);
@@ -646,7 +646,7 @@ void CAimProto::process_ssi_list(SNAC &snac, int &offset) {
case 0x0000: //buddy record
{
- HCONTACT hContact = contact_from_sn(name, true);
+ MCONTACT hContact = contact_from_sn(name, true);
if (hContact)
{
int i;
@@ -863,7 +863,7 @@ void CAimProto::modify_ssi_list(SNAC &snac, int &offset) {
case 0x0000: //buddy record
{
- HCONTACT hContact = contact_from_sn(name, true);
+ MCONTACT hContact = contact_from_sn(name, true);
if (hContact)
{
for (int tlv_offset = 0; tlv_offset < tlv_size; )
@@ -982,7 +982,7 @@ void CAimProto::delete_ssi_list(SNAC &snac, int &offset) unsigned short item_id=snac.ushort(offset+4+name_length);
unsigned short type=snac.ushort(offset+6+name_length);
- HCONTACT hContact = contact_from_sn(name);
+ MCONTACT hContact = contact_from_sn(name);
switch (type) {
case 0x0000: //buddy record
@@ -1094,7 +1094,7 @@ void CAimProto::snac_message_accepted(SNAC &snac)//family 0x004 unsigned char sn_length=snac.ubyte(10);
char* sn = snac.part(11,sn_length);
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
if (hContact)
{
msg_ack_param *msg_ack = (msg_ack_param*)mir_alloc(sizeof(msg_ack_param));
@@ -1117,7 +1117,7 @@ void CAimProto::snac_received_message(SNAC &snac,HANDLE hServerConn,unsigned sho unsigned char sn_length = snac.ubyte(10);
char* sn = snac.part(11,sn_length);
- HCONTACT hContact = contact_from_sn(sn, true, true), hMsgContact = NULL;
+ MCONTACT hContact = contact_from_sn(sn, true, true), hMsgContact = NULL;
int offset=15+sn_length;
@@ -1476,7 +1476,7 @@ void CAimProto::snac_file_decline(SNAC &snac)//family 0x0004 int sn_len = snac.ubyte(10);
char* sn = snac.part(11, sn_len);
int reason = snac.ushort(11 + sn_len);
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
msg_ack_param *msg_ack = (msg_ack_param*)mir_alloc(sizeof(msg_ack_param));
msg_ack->hContact = hContact;
@@ -1496,7 +1496,7 @@ void CAimProto::snac_file_decline(SNAC &snac)//family 0x0004 if (error == 0x02)
{
debugLogA("File Transfer declied");
- HCONTACT hContact = contact_from_sn(sn);
+ MCONTACT hContact = contact_from_sn(sn);
file_transfer *ft = ft_list.find_by_cookie(icbm_cookie, hContact);
if (ft)
{
@@ -1527,7 +1527,7 @@ void CAimProto::snac_received_info(SNAC &snac)//family 0x0002 char* sn = snac.part(1, sn_length);
unsigned short tlv_count = snac.ushort(3 + sn_length);
offset = 5 + sn_length;
- HCONTACT hContact = contact_from_sn(sn, true, true);
+ MCONTACT hContact = contact_from_sn(sn, true, true);
while (offset < snac.len())
{
@@ -1589,7 +1589,7 @@ void CAimProto::snac_typing_notification(SNAC &snac)//family 0x004 {
unsigned char sn_length=snac.ubyte(10);
char* sn=snac.part(11,sn_length);
- HCONTACT hContact=contact_from_sn(sn);
+ MCONTACT hContact=contact_from_sn(sn);
if (hContact)
{
unsigned short type=snac.ushort(11+sn_length);
@@ -2304,7 +2304,7 @@ void CAimProto::snac_admin_account_confirm(SNAC &snac)//family 0x0007 {
char sn[33];
int sn_length=buf[SNAC_SIZE*2];
- HCONTACT hContact;
+ MCONTACT hContact;
ZeroMemory(sn,sizeof(sn));
memcpy(sn,&buf[SNAC_SIZE*2+1],sn_length);
hContact=find_contact(sn);
diff --git a/protocols/AimOscar/src/services.cpp b/protocols/AimOscar/src/services.cpp index f2646551c0..64ac487fe9 100644 --- a/protocols/AimOscar/src/services.cpp +++ b/protocols/AimOscar/src/services.cpp @@ -91,7 +91,7 @@ INT_PTR CAimProto::GetProfile(WPARAM wParam, LPARAM lParam) return 0;
DBVARIANT dbv;
- if (!getString((HCONTACT)wParam, AIM_KEY_SN, &dbv)) {
+ if (!getString((MCONTACT)wParam, AIM_KEY_SN, &dbv)) {
request_HTML_profile = 1;
aim_query_profile(hServerConn, seqno, dbv.pszVal);
db_free(&dbv);
@@ -105,7 +105,7 @@ INT_PTR CAimProto::GetHTMLAwayMsg(WPARAM wParam, LPARAM /*lParam*/) return 0;
DBVARIANT dbv;
- if (!getString((HCONTACT)wParam, AIM_KEY_SN, &dbv))
+ if (!getString((MCONTACT)wParam, AIM_KEY_SN, &dbv))
{
request_away_message = 1;
aim_query_away_message(hServerConn, seqno, dbv.pszVal);
@@ -119,7 +119,7 @@ int CAimProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam) if (strcmp(cws->szModule, MOD_KEY_CL) == 0 && state == 1 && wParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (strcmp(cws->szSetting, AIM_KEY_NL) == 0)
{
if (cws->value.type == DBVT_DELETED)
@@ -169,7 +169,7 @@ int CAimProto::OnContactDeleted(WPARAM wParam,LPARAM /*lParam*/) {
if (state != 1) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (db_get_b(hContact, MOD_KEY_CL, AIM_KEY_NL, 0))
return 0;
@@ -203,7 +203,7 @@ int CAimProto::OnGroupChange(WPARAM wParam,LPARAM lParam) {
if (state != 1 || !getByte(AIM_KEY_MG, 1)) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -254,7 +254,7 @@ INT_PTR CAimProto::AddToServerList(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (!db_get_utf(hContact, MOD_KEY_CL, OTH_KEY_GP, &dbv) && dbv.pszVal[0])
{
@@ -270,7 +270,7 @@ INT_PTR CAimProto::BlockBuddy(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
unsigned short item_id;
DBVARIANT dbv;
if (getString(hContact, AIM_KEY_SN, &dbv)) return 0;
@@ -328,7 +328,7 @@ INT_PTR CAimProto::OnJoinChat(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
@@ -344,7 +344,7 @@ INT_PTR CAimProto::OnLeaveChat(WPARAM wParam, LPARAM /*lParam*/) {
if (state != 1) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv))
diff --git a/protocols/AimOscar/src/theme.cpp b/protocols/AimOscar/src/theme.cpp index 711dd27b9d..57fdc2a032 100644 --- a/protocols/AimOscar/src/theme.cpp +++ b/protocols/AimOscar/src/theme.cpp @@ -120,7 +120,7 @@ static const char* extra_ES_icon_name[2] = "hiptop",
};
-static void set_AT_icon(CAimProto* ppro, HCONTACT hContact)
+static void set_AT_icon(CAimProto* ppro, MCONTACT hContact)
{
if (ppro->isChatRoom(hContact)) return;
@@ -128,7 +128,7 @@ static void set_AT_icon(CAimProto* ppro, HCONTACT hContact) ExtraIcon_SetIcon(hExtraAT, hContact, (i < 5) ? GetIconHandle(extra_AT_icon_name[i]) : NULL);
}
-static void set_ES_icon(CAimProto* ppro, HCONTACT hContact)
+static void set_ES_icon(CAimProto* ppro, MCONTACT hContact)
{
if (ppro->isChatRoom(hContact)) return;
@@ -136,7 +136,7 @@ static void set_ES_icon(CAimProto* ppro, HCONTACT hContact) ExtraIcon_SetIcon(hExtraAT, hContact, (i < 2) ? GetIconHandle(extra_ES_icon_name[i]) : NULL);
}
-void set_contact_icon(CAimProto* ppro, HCONTACT hContact)
+void set_contact_icon(CAimProto* ppro, MCONTACT hContact)
{
if (!ppro->getByte(AIM_KEY_AT, 0)) set_AT_icon(ppro, hContact);
if (!ppro->getByte(AIM_KEY_ES, 0)) set_ES_icon(ppro, hContact);
@@ -144,27 +144,27 @@ void set_contact_icon(CAimProto* ppro, HCONTACT hContact) void remove_AT_icons(CAimProto* ppro)
{
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
if (!ppro->isChatRoom(hContact))
ExtraIcon_Clear(hExtraAT, hContact);
}
void remove_ES_icons(CAimProto* ppro)
{
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
if (!ppro->isChatRoom(hContact))
ExtraIcon_Clear(hExtraES, hContact);
}
void add_AT_icons(CAimProto* ppro)
{
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
set_AT_icon(ppro, hContact);
}
void add_ES_icons(CAimProto* ppro)
{
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName))
set_ES_icon(ppro, hContact);
}
@@ -179,7 +179,7 @@ void InitExtraIcons(void) int CAimProto::OnPreBuildContactMenu(WPARAM wParam,LPARAM /*lParam*/)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
bool bIsChatRoom = isChatRoom(hContact);
//see if we should add the html away message context menu items
diff --git a/protocols/AimOscar/src/theme.h b/protocols/AimOscar/src/theme.h index c2e8093ce9..e2e6531174 100644 --- a/protocols/AimOscar/src/theme.h +++ b/protocols/AimOscar/src/theme.h @@ -33,6 +33,6 @@ void remove_AT_icons(CAimProto* ppro); void add_ES_icons(CAimProto* ppro);
void remove_ES_icons(CAimProto* ppro);
-void set_contact_icon(CAimProto* ppro, HCONTACT hContact);
+void set_contact_icon(CAimProto* ppro, MCONTACT hContact);
#endif
diff --git a/protocols/AimOscar/src/ui.cpp b/protocols/AimOscar/src/ui.cpp index fd4dba0bea..fbcf065d70 100644 --- a/protocols/AimOscar/src/ui.cpp +++ b/protocols/AimOscar/src/ui.cpp @@ -1326,14 +1326,14 @@ INT_PTR CALLBACK join_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM /////////////////////////////////////////////////////////////////////////////////////////
// Invite to chat dialog
-static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, chat_list_item* item, CAimProto* ppro, char *msg)
+static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, chat_list_item* item, CAimProto* ppro, char *msg)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
clist_chat_invite_send(hItemT, hwndList, item, ppro, msg);
}
@@ -1359,26 +1359,26 @@ static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, chat_list_item }
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
-static void clist_validate_contact(HCONTACT hItem, HWND hwndList, CAimProto* ppro)
+static void clist_validate_contact(MCONTACT hItem, HWND hwndList, CAimProto* ppro)
{
if (!ppro->is_my_contact(hItem) || ppro->isChatRoom(hItem) ||
ppro->getWord(hItem, AIM_KEY_ST, ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE)
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-static void clist_chat_prepare(HCONTACT hItem, HWND hwndList, CAimProto* ppro)
+static void clist_chat_prepare(MCONTACT hItem, HWND hwndList, CAimProto* ppro)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
- HCONTACT hItemN = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
clist_chat_prepare(hItemT, hwndList, ppro);
}
@@ -1423,7 +1423,7 @@ INT_PTR CALLBACK invite_to_chat_dialog(HWND hwndDlg, UINT msg, WPARAM wParam, LP {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- clist_validate_contact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
+ clist_validate_contact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
break;
case CLN_LISTREBUILT:
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp index 7df2eccaaf..119234a93c 100644 --- a/protocols/AimOscar/src/utility.cpp +++ b/protocols/AimOscar/src/utility.cpp @@ -160,15 +160,15 @@ unsigned short CAimProto::get_default_port(void) return getWord(AIM_KEY_PN, getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT);
}
-bool CAimProto::is_my_contact(HCONTACT hContact)
+bool CAimProto::is_my_contact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
}
-HCONTACT CAimProto::find_chat_contact(const char* room)
+MCONTACT CAimProto::find_chat_contact(const char* room)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv)) {
bool found = !strcmp(room, dbv.pszVal);
@@ -180,11 +180,11 @@ HCONTACT CAimProto::find_chat_contact(const char* room) return NULL;
}
-HCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool temporary)
+MCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool temporary)
{
ptrA norm_sn( normalize_name(sn));
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
bool found = !strcmp(norm_sn, dbv.pszVal);
@@ -195,7 +195,7 @@ HCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempo }
if (addIfNeeded) {
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) m_szModuleName) == 0) {
setString(hContact, AIM_KEY_SN, norm_sn);
@@ -234,7 +234,7 @@ void CAimProto::update_server_group(const char* group, unsigned short group_id) mir_free(user_id_array);
}
-void CAimProto::add_contact_to_group(HCONTACT hContact, const char* new_group)
+void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group)
{
if (new_group == NULL) return;
@@ -300,7 +300,7 @@ void CAimProto::add_contact_to_group(HCONTACT hContact, const char* new_group) db_free(&dbv);
}
-void CAimProto::offline_contact(HCONTACT hContact, bool remove_settings)
+void CAimProto::offline_contact(MCONTACT hContact, bool remove_settings)
{
if (remove_settings)
{
@@ -318,7 +318,7 @@ void CAimProto::offline_contact(HCONTACT hContact, bool remove_settings) void CAimProto::offline_contacts(void)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
offline_contact(hContact,true);
allow_list.destroy();
@@ -376,14 +376,14 @@ void create_group(const char *group) mir_free(szGroupName);
}
-unsigned short CAimProto::search_for_free_item_id(HCONTACT hbuddy)//returns a free item id and links the id to the buddy
+unsigned short CAimProto::search_for_free_item_id(MCONTACT hbuddy)//returns a free item id and links the id to the buddy
{
unsigned short id;
retry:
id = get_random();
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
for(int i=1; ;++i) {
unsigned short item_id = getBuddyId(hContact, i);
if (item_id == 0) break;
@@ -402,7 +402,7 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne unsigned short* list = NULL;
size = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
for(int i=1; ;++i) {
unsigned short user_group_id = getGroupId(hContact, i);
if (user_group_id == 0)
@@ -422,7 +422,7 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne void CAimProto::upload_nicks(void)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if ( !db_get_utf(hContact, MOD_KEY_CL, "MyHandle", &dbv)) {
set_local_nick(hContact, dbv.pszVal, NULL);
@@ -431,7 +431,7 @@ void CAimProto::upload_nicks(void) }
}
-void CAimProto::set_local_nick(HCONTACT hContact, char* nick, char* note)
+void CAimProto::set_local_nick(MCONTACT hContact, char* nick, char* note)
{
DBVARIANT dbv;
if (getString(hContact, AIM_KEY_SN, &dbv)) return;
@@ -498,42 +498,42 @@ void BdList::remove_by_id(unsigned short id) /////////////////////////////////////////////////////////////////////////////////////////
-unsigned short CAimProto::getBuddyId(HCONTACT hContact, int i)
+unsigned short CAimProto::getBuddyId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
return getWord(hContact, item, 0);
}
-void CAimProto::setBuddyId(HCONTACT hContact, int i, unsigned short id)
+void CAimProto::setBuddyId(MCONTACT hContact, int i, unsigned short id)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
setWord(hContact, item, id);
}
-int CAimProto::deleteBuddyId(HCONTACT hContact, int i)
+int CAimProto::deleteBuddyId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
return delSetting(hContact, item);
}
-unsigned short CAimProto::getGroupId(HCONTACT hContact, int i)
+unsigned short CAimProto::getGroupId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);
return getWord(hContact, item, 0);
}
-void CAimProto::setGroupId(HCONTACT hContact, int i, unsigned short id)
+void CAimProto::setGroupId(MCONTACT hContact, int i, unsigned short id)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);
setWord(hContact, item, id);
}
-int CAimProto::deleteGroupId(HCONTACT hContact, int i)
+int CAimProto::deleteGroupId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);
diff --git a/protocols/EmLanProto/src/mlan.cpp b/protocols/EmLanProto/src/mlan.cpp index 32bdd1a2da..539c82bf97 100644 --- a/protocols/EmLanProto/src/mlan.cpp +++ b/protocols/EmLanProto/src/mlan.cpp @@ -127,7 +127,7 @@ void CMLan::SetMirandaStatus(u_int status) void CMLan::SetAllOffline()
{
- for (HCONTACT hContact = db_find_first(PROTONAME); hContact; hContact = db_find_next(hContact, PROTONAME)) {
+ for (MCONTACT hContact = db_find_first(PROTONAME); hContact; hContact = db_find_next(hContact, PROTONAME)) {
db_set_w(hContact, PROTONAME, "Status", ID_STATUS_OFFLINE);
db_unset(hContact, PROTONAME, "IP");
}
@@ -204,7 +204,7 @@ void CMLan::Check() if (!cont->m_time)
{
cont->m_status = ID_STATUS_OFFLINE;
- HCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
+ MCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
if (hContact)
{
db_set_w(hContact,PROTONAME,"Status",ID_STATUS_OFFLINE);
@@ -236,9 +236,9 @@ void CMLan::SendPacketExt(TPacket& pak, u_long addr) delete[] buf;
}
-HCONTACT CMLan::FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status)
+MCONTACT CMLan::FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status)
{
- for (HCONTACT res = db_find_first(PROTONAME); res; res = db_find_next(res, PROTONAME)) {
+ for (MCONTACT res = db_find_first(PROTONAME); res; res = db_find_next(res, PROTONAME)) {
u_long caddr = db_get_dw(res, PROTONAME, "ipaddr", -1);
if (caddr==addr.S_un.S_addr) {
if (make_permanent)
@@ -250,7 +250,7 @@ HCONTACT CMLan::FindContact(in_addr addr, const char* nick, bool add_to_list, b }
if (add_to_list) {
- HCONTACT res=(HCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
+ MCONTACT res=(MCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)res,(LPARAM)PROTONAME);
db_set_dw(res,PROTONAME, "ipaddr", addr.S_un.S_addr);
db_set_s(res,PROTONAME, "Nick", nick);
@@ -315,7 +315,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from) cont->m_ver = pak.idVersion;
u_int old_status = cont->m_status;
cont->m_status = pak.idStatus;
- HCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
+ MCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
if (hContact)
{
db_set_w(hContact,PROTONAME, "Status", cont->m_status);
@@ -358,7 +358,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from) if (pak.idAckMessage)
{
- HCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
+ MCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, false, false, false);
if (hContact)
ProtoBroadcastAck(PROTONAME, hContact, pak.flIsUrl?ACKTYPE_URL:ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)pak.idAckMessage, 0);
}
@@ -374,7 +374,7 @@ void CMLan::OnRecvPacket(u_char* mes, int len, in_addr from) if (pak.idReqAwayMessage && cont)
{
- HCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, true, false, false);
+ MCONTACT hContact = FindContact(cont->m_addr, cont->m_nick, true, false, false);
// Removed - it causes that whoisreadingawaymessage plugin was not working
// if (hContact)
// {
@@ -459,7 +459,7 @@ int CMLan::AddToContactList(u_int flags, EMPSEARCHRESULT* psr) bool TempAdd = flags&PALF_TEMPORARY;
- HCONTACT contact = FindContact(addr, psr->hdr.nick, true, !TempAdd, !TempAdd, psr->stat);
+ MCONTACT contact = FindContact(addr, psr->hdr.nick, true, !TempAdd, !TempAdd, psr->stat);
if (contact != NULL) {
db_set_w(contact,PROTONAME,"Status", psr->stat );
db_set_w(contact,PROTONAME,"RemoteVersion", psr->ver );
@@ -568,7 +568,7 @@ void CMLan::SearchExt(TDataHolder* hold) void CMLan::SendMessageExt(TDataHolder* hold)
{
Sleep(0);
- if (db_get_w((HCONTACT)hold->hContact, PROTONAME, "Status", ID_STATUS_OFFLINE)==ID_STATUS_OFFLINE)
+ if (db_get_w((MCONTACT)hold->hContact, PROTONAME, "Status", ID_STATUS_OFFLINE)==ID_STATUS_OFFLINE)
{
Sleep(20);
ProtoBroadcastAck(PROTONAME, hold->hContact, (hold->op==LEXT_SENDURL)?ACKTYPE_URL:ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)hold->id, 0);
@@ -577,7 +577,7 @@ void CMLan::SendMessageExt(TDataHolder* hold) {
TPacket pak;
ZeroMemory(&pak, sizeof(pak));
- u_long addr = db_get_dw((HCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
+ u_long addr = db_get_dw((MCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
pak.strMessage = hold->msg;
pak.idMessage = hold->id;
if (hold->op==LEXT_SENDURL)
@@ -594,7 +594,7 @@ void CMLan::GetAwayMsgExt(TDataHolder* hold) TPacket pak;
ZeroMemory(&pak, sizeof(pak));
pak.idReqAwayMessage = hold->id;
- u_long addr = db_get_dw((HCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
+ u_long addr = db_get_dw((MCONTACT)hold->hContact, PROTONAME, "ipaddr", 0);
SendPacketExt(pak, addr);
ProtoBroadcastAck(PROTONAME, hold->hContact, ACKTYPE_AWAYMSG, ACKRESULT_SENTREQUEST, (HANDLE)hold->id, 0);
diff --git a/protocols/EmLanProto/src/mlan.h b/protocols/EmLanProto/src/mlan.h index 41bde7544b..71d4182dfa 100644 --- a/protocols/EmLanProto/src/mlan.h +++ b/protocols/EmLanProto/src/mlan.h @@ -30,7 +30,7 @@ public: long id;
long op;
- HCONTACT hContact;
+ MCONTACT hContact;
char* const msg;
CMLan* lan;
@@ -101,7 +101,7 @@ private: CRITICAL_SECTION m_csAccessAwayMes;
void RequestStatus(bool answer=false, u_long m_addr=INADDR_BROADCAST);
- HCONTACT FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status = ID_STATUS_ONLINE);
+ MCONTACT FindContact(in_addr addr, const char* nick, bool add_to_list, bool make_permanent, bool make_visible, u_int status = ID_STATUS_ONLINE);
void DeleteCache();
void StartChecking();
@@ -176,7 +176,7 @@ private: int m_cid;
SOCKET m_socket;
u_long m_addr;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
char* m_szDescription;
char** m_szFiles;
diff --git a/protocols/FacebookRM/src/avatars.cpp b/protocols/FacebookRM/src/avatars.cpp index 8e3006a12a..358018219a 100644 --- a/protocols/FacebookRM/src/avatars.cpp +++ b/protocols/FacebookRM/src/avatars.cpp @@ -48,7 +48,7 @@ bool FacebookProto::GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &ai, std::string * return false;
}
-void FacebookProto::CheckAvatarChange(HCONTACT hContact, std::string image_url)
+void FacebookProto::CheckAvatarChange(MCONTACT hContact, std::string image_url)
{
// Facebook contacts always have some avatar - keep avatar in database even if we have loaded empty one (e.g. for 'On Mobile' contacts)
if (image_url.empty())
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 6a4884090c..52b998ca06 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -84,7 +84,7 @@ int FacebookProto::OnGCEvent(WPARAM wParam,LPARAM lParam) case GC_USER_PRIVMESS:
{
char* sn = mir_t2a(hook->ptszUID);
- HCONTACT hContact = ContactIDToHContact(sn);
+ MCONTACT hContact = ContactIDToHContact(sn);
mir_free(sn);
CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, 0);
@@ -112,7 +112,7 @@ int FacebookProto::OnGCEvent(WPARAM wParam,LPARAM lParam) case GC_USER_NICKLISTMENU:
{
char *sn = mir_t2a(hook->ptszUID);
- HCONTACT hContact = ContactIDToHContact(sn);
+ MCONTACT hContact = ContactIDToHContact(sn);
mir_free(sn);
switch (hook->dwData)
@@ -248,7 +248,7 @@ void FacebookProto::AddChat(const TCHAR *tid, const TCHAR *tname) INT_PTR FacebookProto::OnJoinChat(WPARAM wParam,LPARAM suppress)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// TODO: load info from server + old history,...
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 92333f3d1f..544fb3f066 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -1252,7 +1252,7 @@ bool facebook_client::send_message(std::string message_recipient, std::string me case 1356003: // Contact is offline
{
- HCONTACT hContact = parent->ContactIDToHContact(message_recipient);
+ MCONTACT hContact = parent->ContactIDToHContact(message_recipient);
if (hContact != NULL)
parent->setWord(hContact, "Status", ID_STATUS_OFFLINE);
return false;
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index fde9b8f678..84f30411a0 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-void FacebookProto::SaveName(HCONTACT hContact, const facebook_user *fbu)
+void FacebookProto::SaveName(MCONTACT hContact, const facebook_user *fbu)
{
if (fbu->real_name.empty()) {
delSetting(hContact, FACEBOOK_KEY_NICK);
@@ -55,7 +55,7 @@ void FacebookProto::SaveName(HCONTACT hContact, const facebook_user *fbu) }
}
-bool FacebookProto::IsMyContact(HCONTACT hContact, bool include_chat)
+bool FacebookProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
const char *proto = GetContactProto(hContact);
if (proto && !strcmp(m_szModuleName, proto)) {
@@ -66,9 +66,9 @@ bool FacebookProto::IsMyContact(HCONTACT hContact, bool include_chat) return false;
}
-HCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id)
+MCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact, true))
continue;
@@ -80,9 +80,9 @@ HCONTACT FacebookProto::ChatIDToHContact(std::tstring chat_id) return 0;
}
-HCONTACT FacebookProto::ContactIDToHContact(std::string user_id)
+MCONTACT FacebookProto::ContactIDToHContact(std::string user_id)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact))
continue;
@@ -98,7 +98,7 @@ std::string FacebookProto::ThreadIDToContactID(std::string thread_id) {
std::string user_id;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (!IsMyContact(hContact))
continue;
@@ -138,9 +138,9 @@ std::string FacebookProto::ThreadIDToContactID(std::string thread_id) return user_id;
}
-HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, bool dont_check)
+MCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, bool dont_check)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (!dont_check) {
// First, check if this contact exists
@@ -150,7 +150,7 @@ HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b }
// If not, make a new contact!
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
@@ -193,7 +193,7 @@ HCONTACT FacebookProto::AddToContactList(facebook_user* fbu, ContactType type, b void FacebookProto::SetAllContactStatuses(int status)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
@@ -228,7 +228,7 @@ void FacebookProto::DeleteContactFromServer(void *data) if (fbu != NULL)
fbu->deleted = true;
- HCONTACT hContact = ContactIDToHContact(id);
+ MCONTACT hContact = ContactIDToHContact(id);
// If contact wasn't deleted from database
if (hContact != NULL) {
@@ -265,7 +265,7 @@ void FacebookProto::AddContactToServer(void *data) http::response resp = facy.flap(REQUEST_REQUEST_FRIEND, &query);
if (resp.data.find("\"success\":true", 0) != std::string::npos) {
- HCONTACT hContact = ContactIDToHContact(id);
+ MCONTACT hContact = ContactIDToHContact(id);
// If contact wasn't deleted from database
if (hContact != NULL)
@@ -287,7 +287,7 @@ void FacebookProto::ApproveContactToServer(void *data) if (data == NULL)
return;
- HCONTACT hContact = *(HCONTACT*)data;
+ MCONTACT hContact = *(MCONTACT*)data;
delete data;
std::string post_data = "fb_dtsg=" + facy.dtsg_;
@@ -310,7 +310,7 @@ void FacebookProto::CancelFriendsRequest(void *data) if (data == NULL)
return;
- HCONTACT hContact = *(HCONTACT*)data;
+ MCONTACT hContact = *(MCONTACT*)data;
delete data;
std::string query = "phstamp=0&confirmed=1";
@@ -370,7 +370,7 @@ void FacebookProto::SendPokeWorker(void *p) }
-HANDLE FacebookProto::GetAwayMsg(HCONTACT hContact)
+HANDLE FacebookProto::GetAwayMsg(MCONTACT hContact)
{
return 0; // Status messages are disabled
}
diff --git a/protocols/FacebookRM/src/dialogs.cpp b/protocols/FacebookRM/src/dialogs.cpp index e35c52f3b9..76b7f1a100 100644 --- a/protocols/FacebookRM/src/dialogs.cpp +++ b/protocols/FacebookRM/src/dialogs.cpp @@ -120,17 +120,17 @@ void RefreshPrivacy(HWND hwnd, post_status_data *data) SendDlgItemMessage(hwnd, IDC_PRIVACY, CB_SETCURSEL, data->proto->getByte(FACEBOOK_KEY_PRIVACY_TYPE, 0), 0);
}
-void ClistPrepare(FacebookProto *proto, HCONTACT hItem, HWND hwndList)
+void ClistPrepare(FacebookProto *proto, MCONTACT hItem, HWND hwndList)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem)
{
- HCONTACT hItemN = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
ClistPrepare(proto, hItemT, hwndList);
}
@@ -143,14 +143,14 @@ void ClistPrepare(FacebookProto *proto, HCONTACT hItem, HWND hwndList) }
}
-void GetSelectedContacts(FacebookProto *proto, HCONTACT hItem, HWND hwndList, std::vector<facebook_user*> *contacts)
+void GetSelectedContacts(FacebookProto *proto, MCONTACT hItem, HWND hwndList, std::vector<facebook_user*> *contacts)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
GetSelectedContacts(proto, hItemT, hwndList, contacts);
} else {
@@ -161,7 +161,7 @@ void GetSelectedContacts(FacebookProto *proto, HCONTACT hItem, HWND hwndList, st contacts->push_back(fu);
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
diff --git a/protocols/FacebookRM/src/entities.h b/protocols/FacebookRM/src/entities.h index 6909b6d611..14a62ef0eb 100644 --- a/protocols/FacebookRM/src/entities.h +++ b/protocols/FacebookRM/src/entities.h @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. struct facebook_user
{
- HCONTACT handle;
+ MCONTACT handle;
std::string user_id;
std::string real_name;
@@ -164,16 +164,16 @@ struct send_chat struct send_direct
{
- send_direct(HCONTACT hContact,const std::string &msg, HANDLE msgid) : hContact(hContact), msg(msg), msgid(msgid) {}
- HCONTACT hContact;
+ send_direct(MCONTACT hContact,const std::string &msg, HANDLE msgid) : hContact(hContact), msg(msg), msgid(msgid) {}
+ MCONTACT hContact;
std::string msg;
HANDLE msgid;
};
struct send_typing
{
- send_typing(HCONTACT hContact,const int status) : hContact(hContact), status(status) {}
- HCONTACT hContact;
+ send_typing(MCONTACT hContact,const int status) : hContact(hContact), status(status) {}
+ MCONTACT hContact;
int status;
};
diff --git a/protocols/FacebookRM/src/events.cpp b/protocols/FacebookRM/src/events.cpp index 81c54f3fd8..19a9c68701 100644 --- a/protocols/FacebookRM/src/events.cpp +++ b/protocols/FacebookRM/src/events.cpp @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, HCONTACT contact, DWORD flags, std::string *url, std::string *notification_id)
+void FacebookProto::NotifyEvent(TCHAR* title, TCHAR* info, MCONTACT contact, DWORD flags, std::string *url, std::string *notification_id)
{
char name[256];
diff --git a/protocols/FacebookRM/src/json.cpp b/protocols/FacebookRM/src/json.cpp index 7fdbcbe2a8..8add178e11 100644 --- a/protocols/FacebookRM/src/json.cpp +++ b/protocols/FacebookRM/src/json.cpp @@ -424,7 +424,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa participant = chatroom->second.participants.find(reader_id);
if (participant != chatroom->second.participants.end()) {
- HCONTACT hChatContact = proto->ChatIDToHContact(tid);
+ MCONTACT hChatContact = proto->ChatIDToHContact(tid);
const char *participant_name = participant->second.c_str();
if (!chatroom->second.message_readers.empty())
@@ -438,7 +438,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa }
}
} else { // classic contact
- HCONTACT hContact = proto->ContactIDToHContact(json_as_pstring(reader));
+ MCONTACT hContact = proto->ContactIDToHContact(json_as_pstring(reader));
if (hContact) {
TCHAR ttime[64], tstr[100];
_tcsftime(ttime, SIZEOF(ttime), _T("%X"), utils::conversion::fbtime_to_timeinfo(json_as_float(time)));
@@ -519,7 +519,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa }
}
- HCONTACT hChatContact = NULL;
+ MCONTACT hChatContact = NULL;
// RM TODO: better use check if chatroom exists/is in db/is online... no?
/// e.g. HANDLE hChatContact = proto->ChatIDToHContact(thread_id); ?
@@ -627,7 +627,7 @@ int facebook_json_parser::parse_messages(void* data, std::vector< facebook_messa facebook_user fbu;
fbu.user_id = json_as_pstring(from);
- HCONTACT hContact = proto->AddToContactList(&fbu, CONTACT_FRIEND);
+ MCONTACT hContact = proto->AddToContactList(&fbu, CONTACT_FRIEND);
if (proto->isOnline() && proto->getWord(hContact, "Status", 0) == ID_STATUS_OFFLINE)
proto->setWord(hContact, "Status", ID_STATUS_ONLINE);
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 0efbe5ea1c..fd09bfa507 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-int FacebookProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int FacebookProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
ForkThread(&FacebookProto::ReadMessageWorker, (void*)hContact);
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
@@ -74,7 +74,7 @@ void FacebookProto::SendChatMsgWorker(void *p) send_chat *data = static_cast<send_chat*>(p);
std::string err_message = "";
- HCONTACT hContact = ChatIDToHContact(std::tstring(_A2T(data->chat_id.c_str())));
+ MCONTACT hContact = ChatIDToHContact(std::tstring(_A2T(data->chat_id.c_str())));
if (hContact) {
std::string tid;
DBVARIANT dbv;
@@ -105,7 +105,7 @@ void FacebookProto::SendChatMsgWorker(void *p) delete data;
}
-int FacebookProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int FacebookProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
// TODO: msg comes as Unicode (retyped wchar_t*), why should we convert it as ANSI to UTF-8? o_O
if (flags & PREF_UNICODE)
@@ -116,7 +116,7 @@ int FacebookProto::SendMsg(HCONTACT hContact, int flags, const char *msg) return facy.msgid_;
}
-int FacebookProto::UserIsTyping(HCONTACT hContact,int type)
+int FacebookProto::UserIsTyping(MCONTACT hContact,int type)
{
if (hContact && isOnline())
ForkThread(&FacebookProto::SendTypingWorker, new send_typing(hContact, type));
@@ -166,7 +166,7 @@ void FacebookProto::ReadMessageWorker(void *p) if (p == NULL)
return;
- HCONTACT hContact = (HCONTACT)p;
+ MCONTACT hContact = (MCONTACT)p;
if (getBool(FACEBOOK_KEY_KEEP_UNREAD, 0) || getBool(hContact, FACEBOOK_KEY_KEEP_UNREAD, 0))
return;
@@ -184,7 +184,7 @@ void FacebookProto::ReadMessageWorker(void *p) facy.flap(REQUEST_MARK_READ, &data);
}
-void FacebookProto::ParseSmileys(std::string message, HCONTACT hContact)
+void FacebookProto::ParseSmileys(std::string message, MCONTACT hContact)
{
if (!getByte(FACEBOOK_KEY_CUSTOM_SMILEYS, DEFAULT_CUSTOM_SMILEYS))
return;
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 4e0531996a..81db47063d 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -63,7 +63,7 @@ void FacebookProto::ProcessBuddyList(void* data) if (!fbu->deleted)
{
- HCONTACT hContact = fbu->handle;
+ MCONTACT hContact = fbu->handle;
if (!hContact)
hContact = AddToContactList(fbu, CONTACT_FRIEND);
@@ -154,7 +154,7 @@ void FacebookProto::ProcessFriendList(void* data) // Check and update old contacts
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if ( isChatRoom(hContact))
continue;
@@ -243,7 +243,7 @@ void FacebookProto::ProcessFriendList(void* data) facebook_user *fbu = iter->second;
if (!fbu->deleted)
- HCONTACT hContact = AddToContactList(fbu, CONTACT_FRIEND/*, true*/); // This contact is surely new ...am I sure? ...I'm not, so "true" is commented now
+ MCONTACT hContact = AddToContactList(fbu, CONTACT_FRIEND/*, true*/); // This contact is surely new ...am I sure? ...I'm not, so "true" is commented now
delete fbu;
}
@@ -361,7 +361,7 @@ void FacebookProto::ProcessUnreadMessage(void *p) for (std::map<std::string, facebook_chatroom*>::iterator it = chatrooms.begin(); it != chatrooms.end(); ) {
facebook_chatroom *room = it->second;
- HCONTACT hChatContact = NULL;
+ MCONTACT hChatContact = NULL;
if (GetChatUsers(room->thread_id.c_str()) == NULL) {
AddChat(room->thread_id.c_str(), room->chat_name.c_str());
hChatContact = ChatIDToHContact(room->thread_id);
@@ -397,7 +397,7 @@ void FacebookProto::ProcessUnreadMessage(void *p) fbu.real_name = messages[i]->sender_name;
// TODO: optimize this?
- HCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
+ MCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
setString(hContact, FACEBOOK_KEY_MESSAGE_ID, messages[i]->message_id.c_str());
// Save TID if not exists already
@@ -486,7 +486,7 @@ void FacebookProto::ProcessMessages(void* data) fbu.user_id = messages[i]->user_id;
fbu.real_name = messages[i]->sender_name;
- HCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
+ MCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
setString(hContact, FACEBOOK_KEY_MESSAGE_ID, messages[i]->message_id.c_str());
// Save TID if not exists already
@@ -627,7 +627,7 @@ void FacebookProto::ProcessFriendRequests(void*) if (fbu->user_id.length() && fbu->real_name.length())
{
- HCONTACT hContact = AddToContactList(fbu, CONTACT_APPROVE);
+ MCONTACT hContact = AddToContactList(fbu, CONTACT_APPROVE);
setByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, CONTACT_APPROVE);
bool seen = false;
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index ea869c4830..7346774879 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -104,7 +104,7 @@ FacebookProto::~FacebookProto() //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR FacebookProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR FacebookProto::GetCaps(int type, MCONTACT hContact)
{
switch(type)
{
@@ -238,7 +238,7 @@ HANDLE FacebookProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* first return SearchByEmail(arg); // Facebook is using one search method for everything (except IDs)
}
-HCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
ptrA id( mir_t2a_cp(psr->id, CP_UTF8));
ptrA name( mir_t2a_cp(psr->firstName, CP_UTF8));
@@ -261,7 +261,7 @@ HCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return NULL;
}
- HCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
+ MCONTACT hContact = AddToContactList(&fbu, CONTACT_NONE);
if (hContact) {
if (flags & PALF_TEMPORARY) {
db_set_b(hContact, "Clist", "Hidden", 1);
@@ -276,7 +276,7 @@ HCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return hContact;
}
-int FacebookProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
+int FacebookProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message)
{
return RequestFriendship((WPARAM)hContact, NULL);
}
@@ -286,8 +286,8 @@ int FacebookProto::Authorize(HANDLE hDbEvent) if (!hDbEvent || isOffline())
return 1;
- HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
return ApproveFriendship((WPARAM)hContact, NULL);
@@ -298,8 +298,8 @@ int FacebookProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) if (!hDbEvent || isOffline())
return 1;
- HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
// TODO: hide from facebook requests list
@@ -450,7 +450,7 @@ INT_PTR FacebookProto::OnMind(WPARAM wParam, LPARAM lParam) if (!isOnline())
return 1;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
wall_data *wall = new wall_data();
wall->user_id = ptrA(getStringA(hContact, FACEBOOK_KEY_ID));
@@ -504,7 +504,7 @@ INT_PTR FacebookProto::RefreshBuddyList(WPARAM, LPARAM) INT_PTR FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
std::string url = FACEBOOK_URL_PROFILE;
@@ -527,7 +527,7 @@ INT_PTR FacebookProto::VisitProfile(WPARAM wParam,LPARAM lParam) INT_PTR FacebookProto::VisitFriendship(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
if (wParam == 0 || !IsMyContact(hContact))
return 1;
@@ -547,7 +547,7 @@ INT_PTR FacebookProto::Poke(WPARAM wParam,LPARAM lParam) if (wParam == NULL || isOffline())
return 1;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
ptrA id(getStringA(hContact, FACEBOOK_KEY_ID));
if (id == NULL)
@@ -564,7 +564,7 @@ INT_PTR FacebookProto::CancelFriendship(WPARAM wParam,LPARAM lParam) bool deleting = (lParam == 1);
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
// Ignore groupchats and, if deleting, also not-friends
if (isChatRoom(hContact) || (deleting && getByte(hContact, FACEBOOK_KEY_CONTACT_TYPE, 0) != CONTACT_FRIEND))
@@ -601,7 +601,7 @@ INT_PTR FacebookProto::RequestFriendship(WPARAM wParam,LPARAM lParam) if (wParam == NULL || isOffline())
return 1;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
ptrA id(getStringA(hContact, FACEBOOK_KEY_ID));
if (id == NULL)
@@ -633,7 +633,7 @@ INT_PTR FacebookProto::OnCancelFriendshipRequest(WPARAM wParam,LPARAM lParam) return 0;
}
-HCONTACT FacebookProto::HContactFromAuthEvent(HANDLE hEvent)
+MCONTACT FacebookProto::HContactFromAuthEvent(HANDLE hEvent)
{
DWORD body[2];
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -641,13 +641,13 @@ HCONTACT FacebookProto::HContactFromAuthEvent(HANDLE hEvent) dbei.pBlob = (PBYTE)&body;
if (db_event_get(hEvent, &dbei))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (strcmp(dbei.szModule, m_szModuleName))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
}
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index b271f62c8a..27c29883ca 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -54,31 +54,31 @@ public: __forceinline INT_PTR getStringUtf(const char *name, DBVARIANT *result) {
return db_get_utf(NULL, m_szModuleName, name, result); }
- __forceinline INT_PTR getStringUtf(HCONTACT hContact, const char *name, DBVARIANT *result) {
+ __forceinline INT_PTR getStringUtf(MCONTACT hContact, const char *name, DBVARIANT *result) {
return db_get_utf(hContact, m_szModuleName, name, result); }
__forceinline void setStringUtf(const char *name, const char* value) { db_set_utf(NULL, m_szModuleName, name, value); }
- __forceinline void setStringUtf(HCONTACT hContact, const char *name, const char* value) { db_set_utf(hContact, m_szModuleName, name, value); }
+ __forceinline void setStringUtf(MCONTACT hContact, const char *name, const char* value) { db_set_utf(hContact, m_szModuleName, name, value); }
//PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
@@ -86,24 +86,24 @@ public: virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
@@ -185,13 +185,13 @@ public: void __cdecl SendPokeWorker(void*);
// Contacts handling
- bool IsMyContact(HCONTACT, bool include_chat = false);
- HCONTACT ContactIDToHContact(std::string);
- HCONTACT ChatIDToHContact(std::tstring);
+ bool IsMyContact(MCONTACT, bool include_chat = false);
+ MCONTACT ContactIDToHContact(std::string);
+ MCONTACT ChatIDToHContact(std::tstring);
std::string ThreadIDToContactID(std::string thread_id);
- HCONTACT AddToContactList(facebook_user*, ContactType type, bool dont_check = false);
+ MCONTACT AddToContactList(facebook_user*, ContactType type, bool dont_check = false);
void SetAllContactStatuses(int status);
- HCONTACT HContactFromAuthEvent(HANDLE hEvent);
+ MCONTACT HContactFromAuthEvent(HANDLE hEvent);
// Chats handling
void AddChat(const TCHAR *id, const TCHAR *name);
@@ -209,11 +209,11 @@ public: // Helpers
std::tstring GetAvatarFolder();
bool GetDbAvatarInfo(PROTO_AVATAR_INFORMATIONT &ai, std::string *url);
- void CheckAvatarChange(HCONTACT hContact, std::string image_url);
+ void CheckAvatarChange(MCONTACT hContact, std::string image_url);
void ToggleStatusMenuItems(BOOL bEnable);
- void ParseSmileys(std::string message, HCONTACT hContact);
+ void ParseSmileys(std::string message, MCONTACT hContact);
void OpenUrl(std::string url);
- void SaveName(HCONTACT hContact, const facebook_user *fbu);
+ void SaveName(MCONTACT hContact, const facebook_user *fbu);
// Handles, Locks
HGENMENU m_hMenuRoot, m_hMenuServicesRoot, m_hStatusMind;
@@ -227,10 +227,10 @@ public: std::string last_status_msg_;
HANDLE hSmileysFolder_;
- std::vector<HCONTACT> avatar_queue;
+ std::vector<MCONTACT> avatar_queue;
static void CALLBACK APC_callback(ULONG_PTR p);
// Information providing
- void NotifyEvent(TCHAR* title, TCHAR* info, HCONTACT contact, DWORD flags, std::string *url = NULL, std::string *notification_id = NULL);
+ void NotifyEvent(TCHAR* title, TCHAR* info, MCONTACT contact, DWORD flags, std::string *url = NULL, std::string *notification_id = NULL);
};
diff --git a/protocols/FacebookRM/src/stubs.cpp b/protocols/FacebookRM/src/stubs.cpp index eb086a2fa8..8329a78980 100644 --- a/protocols/FacebookRM/src/stubs.cpp +++ b/protocols/FacebookRM/src/stubs.cpp @@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-HCONTACT FacebookProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT FacebookProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
-int FacebookProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
+int FacebookProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
@@ -38,17 +38,17 @@ HANDLE FacebookProto::ChangeInfo(int type,void *info_data) return NULL;
}
-HANDLE FacebookProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
+HANDLE FacebookProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
return NULL;
}
-int FacebookProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
+int FacebookProto::FileCancel(MCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int FacebookProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
+int FacebookProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
return 1;
}
@@ -58,7 +58,7 @@ int FacebookProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **fil return 1;
}
-int FacebookProto::GetInfo(HCONTACT hContact, int infoType)
+int FacebookProto::GetInfo(MCONTACT hContact, int infoType)
{
// TODO: Most probably some ProtoAck should be here instead
return 1;
@@ -74,42 +74,42 @@ HWND FacebookProto::CreateExtendedSearchUI(HWND owner) return NULL;
}
-int FacebookProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
+int FacebookProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int FacebookProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
+int FacebookProto::RecvFile(MCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int FacebookProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
+int FacebookProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int FacebookProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int FacebookProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
-HANDLE FacebookProto::SendFile(HCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE FacebookProto::SendFile(MCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
return NULL;
}
-int FacebookProto::SendUrl(HCONTACT hContact,int flags,const char *url)
+int FacebookProto::SendUrl(MCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int FacebookProto::SetApparentMode(HCONTACT hContact,int mode)
+int FacebookProto::SetApparentMode(MCONTACT hContact,int mode)
{
return 1;
}
-int FacebookProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int FacebookProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
diff --git a/protocols/FacebookRM/src/theme.cpp b/protocols/FacebookRM/src/theme.cpp index 61025d53d3..f9e60078ee 100644 --- a/protocols/FacebookRM/src/theme.cpp +++ b/protocols/FacebookRM/src/theme.cpp @@ -53,7 +53,7 @@ HANDLE GetIconHandle(const char* name) HGENMENU g_hContactMenuItems[CMITEMS_COUNT];
// Helper functions
-static FacebookProto * GetInstanceByHContact(HCONTACT hContact)
+static FacebookProto * GetInstanceByHContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if(!proto)
@@ -69,7 +69,7 @@ static FacebookProto * GetInstanceByHContact(HCONTACT hContact) template<INT_PTR (__cdecl FacebookProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- FacebookProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ FacebookProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
@@ -78,7 +78,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam) for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- FacebookProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ FacebookProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -152,7 +152,7 @@ void UninitContactMenus() int FacebookProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
bool bIsChatroom = isChatRoom(hContact);
Menu_ShowItem(g_hContactMenuItems[CMI_VISIT_PROFILE], true);
diff --git a/protocols/GTalkExt/src/avatar.cpp b/protocols/GTalkExt/src/avatar.cpp index 744b990e96..db6d5af883 100644 --- a/protocols/GTalkExt/src/avatar.cpp +++ b/protocols/GTalkExt/src/avatar.cpp @@ -84,7 +84,7 @@ BOOL SaveAvatar(HANDLE hFile) struct AVACHANGED {
HANDLE hTimer;
- HCONTACT hContact;
+ MCONTACT hContact;
};
VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired)
@@ -107,11 +107,11 @@ VOID CALLBACK CallSetAvatar(PVOID lpParameter, BOOLEAN TimerOrWaitFired) int AvaChanged(WPARAM wParam, LPARAM lParam)
{
- if (!lParam && db_get_b((HCONTACT)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
+ if (!lParam && db_get_b((MCONTACT)wParam, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
BOOL enqueued = FALSE;
AVACHANGED *ach = (AVACHANGED*)malloc(sizeof(AVACHANGED));
__try {
- ach->hContact = (HCONTACT)wParam;
+ ach->hContact = (MCONTACT)wParam;
enqueued = CreateTimerQueueTimer(&ach->hTimer, NULL, CallSetAvatar, ach, SET_AVATAR_INTERVAL, 0, WT_EXECUTEONLYONCE);
}
__finally {
@@ -146,7 +146,7 @@ BOOL InitAvaUnit(BOOL init) }
}
-void SetAvatar(HCONTACT hContact)
+void SetAvatar(MCONTACT hContact)
{
mir_cslock lck(g_csSetAvatar);
diff --git a/protocols/GTalkExt/src/db.cpp b/protocols/GTalkExt/src/db.cpp index 661bce4409..bbda342b2b 100644 --- a/protocols/GTalkExt/src/db.cpp +++ b/protocols/GTalkExt/src/db.cpp @@ -42,7 +42,7 @@ void RenewPseudocontactHandles() db_unset(0, protos[i]->szModuleName, "GMailExtNotifyContact"); // remove this
}
- 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, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
LPCSTR proto = (LPCSTR)GetContactProto(hContact);
db_set_dw(NULL, proto, PSEUDOCONTACT_LINK, (DWORD)hContact);
diff --git a/protocols/GTalkExt/src/handlers.cpp b/protocols/GTalkExt/src/handlers.cpp index 087a38e2aa..6c35356762 100644 --- a/protocols/GTalkExt/src/handlers.cpp +++ b/protocols/GTalkExt/src/handlers.cpp @@ -426,7 +426,7 @@ int OnExtListInit(WPARAM wParam, LPARAM lParam) int OnFilterPopup(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if ( !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
return 0;
diff --git a/protocols/GTalkExt/src/notifications.cpp b/protocols/GTalkExt/src/notifications.cpp index 4e66154ac0..f9dc9e9111 100644 --- a/protocols/GTalkExt/src/notifications.cpp +++ b/protocols/GTalkExt/src/notifications.cpp @@ -42,7 +42,7 @@ struct POPUP_DATA_HEADER {
BOOL MarkRead;
HANDLE hDbEvent;
- HCONTACT hContact;
+ MCONTACT hContact;
LPTSTR jid;
LPTSTR url;
};
@@ -65,7 +65,7 @@ LPCSTR GetJidAcc(LPCTSTR jid) return NULL;
}
-void MarkEventRead(HCONTACT hCnt, HANDLE hEvt)
+void MarkEventRead(MCONTACT hCnt, HANDLE hEvt)
{
DWORD settings = (DWORD)TlsGetValue(itlsSettings);
if ( ReadCheckbox(0, IDC_POPUPSENABLED, settings) &&
@@ -77,7 +77,7 @@ void MarkEventRead(HCONTACT hCnt, HANDLE hEvt) int OnEventDeleted(WPARAM hContact, LPARAM hDbEvent, LPARAM wnd)
{
- if (db_get_b((HCONTACT)hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
+ if (db_get_b((MCONTACT)hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
CallService(MS_CLIST_REMOVEEVENT, hContact, hDbEvent);
PostMessage((HWND)wnd, EVENT_DELETED_MSG, hContact, hDbEvent);
}
@@ -166,11 +166,11 @@ void FormatPseudocontactDisplayName(LPTSTR buff, LPCTSTR jid, LPCTSTR unreadCoun wsprintf(buff, _T("%s"), jid); //!!!!!!!!!!!
}
-HCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName)
+MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName)
{
- HCONTACT result = (HCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0);
+ MCONTACT result = (MCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0);
if (!result || !db_get_b(result, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) {
- result = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ result = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
db_set_dw(0, acc, PSEUDOCONTACT_LINK, (DWORD)result);
db_set_b(result, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 1);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)result, (LPARAM)acc);
@@ -191,7 +191,7 @@ HCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTST return result;
}
-HANDLE AddCListNotification(HCONTACT hContact, LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount)
+HANDLE AddCListNotification(MCONTACT hContact, LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount)
{
mir_ptr<char> szUrl( mir_utf8encodeT(url)), szText( mir_utf8encodeT(data->lptzText));
@@ -216,7 +216,7 @@ BOOL UsePopups() void ShowNotification(LPCSTR acc, POPUPDATAT *data, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount)
{
- HCONTACT hCnt = SetupPseudocontact(jid, unreadCount, acc, &data->lptzContactName[0]);
+ MCONTACT hCnt = SetupPseudocontact(jid, unreadCount, acc, &data->lptzContactName[0]);
HANDLE hEvt = ReadCheckbox(0, IDC_PSEUDOCONTACTENABLED, (DWORD)TlsGetValue(itlsSettings))
? AddCListNotification(hCnt, acc, data, jid, url, unreadCount) : NULL;
@@ -287,7 +287,7 @@ void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unre void ClearNotificationContactHistory(LPCSTR acc)
{
- HCONTACT hContact = (HCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0);
+ MCONTACT hContact = (MCONTACT)db_get_dw(NULL, acc, PSEUDOCONTACT_LINK, 0);
if (!hContact || !db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0))
return;
diff --git a/protocols/GTalkExt/src/notifications.h b/protocols/GTalkExt/src/notifications.h index 43de74607d..c9cf4684af 100644 --- a/protocols/GTalkExt/src/notifications.h +++ b/protocols/GTalkExt/src/notifications.h @@ -40,5 +40,5 @@ void UnreadMailNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unread void UnreadThreadNotification(LPCSTR acc, LPCTSTR jid, LPCTSTR url, LPCTSTR unreadCount, const MAIL_THREAD_NOTIFICATION *mtn);
void CloseNotifications(LPCSTR acc, LPCTSTR url, LPCTSTR jid, BOOL PopupsOnly);
DWORD ReadNotificationSettings(LPCSTR acc);
-HCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName = NULL);
+MCONTACT SetupPseudocontact(LPCTSTR jid, LPCTSTR unreadCount, LPCSTR acc, LPCTSTR displayName = NULL);
LPCSTR GetJidAcc(LPCTSTR jid);
\ No newline at end of file diff --git a/protocols/GTalkExt/src/stdafx.h b/protocols/GTalkExt/src/stdafx.h index fd47c8a964..163db4c0c4 100644 --- a/protocols/GTalkExt/src/stdafx.h +++ b/protocols/GTalkExt/src/stdafx.h @@ -72,5 +72,5 @@ extern HINSTANCE g_hInst;
extern LIST<GoogleTalkAcc> g_accs;
-void SetAvatar(HCONTACT hContact);
+void SetAvatar(MCONTACT hContact);
BOOL InitAvaUnit(BOOL init);
diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index 6cadef414a..3072de1898 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -26,7 +26,7 @@ //////////////////////////////////////////////////////////
// Avatars support
-void GGPROTO::getAvatarFilename(HCONTACT hContact, TCHAR *pszDest, int cbLen)
+void GGPROTO::getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
@@ -142,7 +142,7 @@ char *gg_avatarhash(char *param) return bin2hex(digest, sizeof(digest), result);
}
-void GGPROTO::requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL)
+void GGPROTO::requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL)
{
if (pth_avatar.dwThreadId == NULL) {
debugLogA("requestAvatarTransfer(): Can not list_add element to avatar_transfers list. No pth_avatar.dwThreadId");
@@ -159,7 +159,7 @@ void GGPROTO::requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL) gg_LeaveCriticalSection(&avatar_mutex, "requestAvatarTransfer", 1, 1, "avatar_mutex", 1);
}
-void GGPROTO::requestAvatarInfo(HCONTACT hContact, int iWaitFor)
+void GGPROTO::requestAvatarInfo(MCONTACT hContact, int iWaitFor)
{
if (pth_avatar.dwThreadId == NULL) {
debugLogA("requestAvatarInfo(): Can not list_add element to avatar_requests list. No pth_avatar.dwThreadId");
@@ -192,7 +192,7 @@ void __cdecl GGPROTO::avatarrequestthread(void*) if (avatar_requests.getCount()) {
GGREQUESTAVATARDATA *data = avatar_requests[0];
int iWaitFor = data->iWaitFor;
- HCONTACT hContact = data->hContact;
+ MCONTACT hContact = data->hContact;
avatar_requests.remove(0);
mir_free(data);
gg_LeaveCriticalSection(&avatar_mutex, "avatarrequestthread", 3, 1, "avatar_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 2c210c57a7..c6983d0665 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -628,7 +628,7 @@ retry: const char *__status = gg_pubdir50_get(res, i, GG_PUBDIR50_STATUS);
uin_t uin = __fmnumber ? atoi(__fmnumber) : 0;
- HCONTACT hContact = (res->seq == GG_SEQ_CHINFO) ? NULL : getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = (res->seq == GG_SEQ_CHINFO) ? NULL : getcontact(uin, 0, 0, NULL);
debugLogA("mainthread() (%x): Search result for uin %d, seq %d.", this, uin, res->seq);
if (res->seq == GG_SEQ_SEARCH)
{
@@ -766,7 +766,7 @@ retry: // Status (version >= 6.0)
case GG_EVENT_STATUS60:
{
- HCONTACT hContact = getcontact(e->event.status60.uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.status60.uin, 0, 0, NULL);
int oldstatus = getWord(hContact, GG_KEY_STATUS, (WORD)ID_STATUS_OFFLINE);
uin_t uin = (uin_t)getDword(GG_KEY_UIN, 0);
@@ -991,7 +991,7 @@ retry: // Get rid of empty image
if (e->event.image_reply.size && e->event.image_reply.image)
{
- HCONTACT hContact = getcontact(e->event.image_reply.sender, 1, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.image_reply.sender, 1, 0, NULL);
void *img = (void *)img_loadpicture(e, 0);
if (!img)
@@ -1064,7 +1064,7 @@ retry: pre.tszDescription = filenameT;
pre.ptszFiles = &filenameT;
pre.lParam = (LPARAM)dcc7;
- ProtoChainRecvFile((HCONTACT)dcc7->contact, &pre);
+ ProtoChainRecvFile((MCONTACT)dcc7->contact, &pre);
mir_free(filenameT);
e->event.dcc7_new = NULL;
@@ -1078,7 +1078,7 @@ retry: if (dcc7->type == GG_SESSION_DCC7_SEND)
{
debugLogA("mainthread() (%x): File transfer denied by client %d (reason = %d).", this, dcc7->peer_uin, e->event.dcc7_reject.reason);
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Remove from watches and free
gg_EnterCriticalSection(&ft_mutex, "mainthread", 21, "ft_mutex", 1);
@@ -1139,7 +1139,7 @@ retry: }
if (dcc7->contact)
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free dcc
gg_dcc7_free(dcc7);
@@ -1186,7 +1186,7 @@ retry: case GG_EVENT_TYPING_NOTIFICATION:
{
- HCONTACT hContact = getcontact(e->event.typing_notification.uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(e->event.typing_notification.uin, 0, 0, NULL);
#ifdef DEBUGMODE
debugLogA("mainthread() (%x): Typing notification from %d (%d).", this,
e->event.typing_notification.uin, e->event.typing_notification.length);
@@ -1272,7 +1272,7 @@ void GGPROTO::broadcastnewstatus(int newStatus) // When contact is deleted
int GGPROTO::contactdeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
// Terminate conference if contact is deleted
@@ -1327,7 +1327,7 @@ static TCHAR* sttSettingToTchar( DBVARIANT* value ) int GGPROTO::dbsettingchanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *szProto = NULL;
debugLogA("dbsettingchanged(): fired. szModule=%s szSetting=%s", cws->szModule, cws->szSetting);
@@ -1411,7 +1411,7 @@ void GGPROTO::setalloffline() debugLogA("setalloffline(): started. Setting buddies offline");
setWord(GG_KEY_STATUS, ID_STATUS_OFFLINE);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
setWord(hContact, GG_KEY_STATUS, ID_STATUS_OFFLINE);
// Clear IP and port settings
delSetting(hContact, GG_KEY_CLIENTIP);
@@ -1427,7 +1427,7 @@ void GGPROTO::setalloffline() ////////////////////////////////////////////////////////////
// All users set offline
-void GGPROTO::notifyuser(HCONTACT hContact, int refresh)
+void GGPROTO::notifyuser(MCONTACT hContact, int refresh)
{
uin_t uin;
if (!hContact) return;
@@ -1469,7 +1469,7 @@ void GGPROTO::notifyuser(HCONTACT hContact, int refresh) void GGPROTO::notifyall()
{
- HCONTACT hContact;
+ MCONTACT hContact;
int count = 0, cc = 0;
uin_t *uins;
char *types;
@@ -1522,13 +1522,13 @@ void GGPROTO::notifyall() ////////////////////////////////////////////////////////////
// Get contact by uin
-HCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick)
+MCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick)
{
#ifdef DEBUGMODE
debugLogA("getcontact(): uin=%d create=%d inlist=%d", uin, create, inlist);
#endif
// Look for contact in DB
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if ((uin_t)getDword(hContact, GG_KEY_UIN, 0) == uin && !isChatRoom(hContact)) {
if (inlist) {
db_unset(hContact, "CList", "NotOnList");
@@ -1540,7 +1540,7 @@ HCONTACT GGPROTO::getcontact(uin_t uin, int create, int inlist, TCHAR *szNick) if (!create)
return NULL;
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
debugLog(_T("getcontact(): Failed to create Gadu-Gadu contact %s"), szNick);
return NULL;
@@ -1698,7 +1698,7 @@ void GGPROTO::changecontactstatus(uin_t uin, int status, const TCHAR *idescr, in #ifdef DEBUGMODE
debugLogA("changecontactstatus(): uin=%d status=%d", uin, status);
#endif
- HCONTACT hContact = getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(uin, 0, 0, NULL);
// Check if contact is on list
if (!hContact) return;
diff --git a/protocols/Gadu-Gadu/src/dialogs.cpp b/protocols/Gadu-Gadu/src/dialogs.cpp index e0f39d35dc..b4745e0b8e 100644 --- a/protocols/Gadu-Gadu/src/dialogs.cpp +++ b/protocols/Gadu-Gadu/src/dialogs.cpp @@ -38,7 +38,7 @@ extern INT_PTR CALLBACK gg_userutildlgproc(HWND hwndDlg, UINT msg, WPARAM wParam #define SVS_TIMEZONE 7
#define SVS_GGVERSION 9
-static void SetValue(HWND hwndDlg, int idCtrl, HCONTACT hContact, char *szModule, char *szSetting, int special, int disableIfUndef)
+static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule, char *szSetting, int special, int disableIfUndef)
{
DBVARIANT dbv = {0};
TCHAR str[256];
@@ -688,7 +688,7 @@ static INT_PTR CALLBACK gg_advoptsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, struct GGDETAILSDLGDATA
{
GGPROTO *gg;
- HCONTACT hContact;
+ MCONTACT hContact;
int disableUpdate;
int updating;
};
@@ -704,7 +704,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, TranslateDialogDefault(hwndDlg);
dat = (struct GGDETAILSDLGDATA *)mir_alloc(sizeof(struct GGDETAILSDLGDATA));
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->disableUpdate = FALSE;
dat->updating = FALSE;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
@@ -728,7 +728,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, case PSN_INFOCHANGED:
{
char *szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
GGPROTO *gg = dat->gg;
// Show updated message
@@ -902,7 +902,7 @@ static INT_PTR CALLBACK gg_detailsdlgproc(HWND hwndDlg, UINT msg, WPARAM wParam, int GGPROTO::details_init(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
char* pszTemplate;
if (hContact == NULL){
diff --git a/protocols/Gadu-Gadu/src/filetransfer.cpp b/protocols/Gadu-Gadu/src/filetransfer.cpp index 14d4f6bd62..4426f3c9eb 100644 --- a/protocols/Gadu-Gadu/src/filetransfer.cpp +++ b/protocols/Gadu-Gadu/src/filetransfer.cpp @@ -60,7 +60,7 @@ void GGPROTO::dccstart() void GGPROTO::dccconnect(uin_t uin)
{
struct gg_dcc *local_dcc;
- HCONTACT hContact = getcontact(uin, 0, 0, NULL);
+ MCONTACT hContact = getcontact(uin, 0, 0, NULL);
DWORD ip, myuin; WORD port;
debugLogA("dccconnect(): Connecting to uin %d.", uin);
@@ -89,7 +89,7 @@ void GGPROTO::dccconnect(uin_t uin) // THREAD: File transfer fail
struct ftfaildata
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProcess;
};
@@ -103,7 +103,7 @@ void __cdecl GGPROTO::ftfailthread(void *param) debugLogA("ftfailthread(): end.");
}
-HANDLE ftfail(GGPROTO *gg, HCONTACT hContact)
+HANDLE ftfail(GGPROTO *gg, MCONTACT hContact)
{
ftfaildata *ft = (ftfaildata*)malloc(sizeof(struct ftfaildata));
#ifdef DEBUGMODE
@@ -273,7 +273,7 @@ void __cdecl GGPROTO::dccmainthread(void*) strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc->contact;
+ pfts.hContact = (MCONTACT)local_dcc->contact;
pfts.flags = (local_dcc->type == GG_SESSION_DCC_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -286,7 +286,7 @@ void __cdecl GGPROTO::dccmainthread(void*) pfts.currentFileProgress = local_dcc->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 3, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -304,7 +304,7 @@ void __cdecl GGPROTO::dccmainthread(void*) strncat(filename, (char*)local_dcc->file_info.filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc->contact;
+ pfts.hContact = (MCONTACT)local_dcc->contact;
pfts.flags = (local_dcc->type == GG_SESSION_DCC_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -317,11 +317,11 @@ void __cdecl GGPROTO::dccmainthread(void*) pfts.currentFileProgress = local_dcc->file_info.size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 4, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 5, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -361,7 +361,7 @@ void __cdecl GGPROTO::dccmainthread(void*) {
_close(local_dcc->file_fd); local_dcc->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 6, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -393,7 +393,7 @@ void __cdecl GGPROTO::dccmainthread(void*) pre.lParam = (LPARAM)local_dcc;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 7, "ft_mutex", 1);
- ProtoChainRecvFile((HCONTACT)local_dcc->contact, &pre);
+ ProtoChainRecvFile((MCONTACT)local_dcc->contact, &pre);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
mir_free(filenameT);
@@ -503,7 +503,7 @@ void __cdecl GGPROTO::dccmainthread(void*) strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc7->contact;
+ pfts.hContact = (MCONTACT)local_dcc7->contact;
pfts.flags = (local_dcc7->type == GG_SESSION_DCC7_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -516,7 +516,7 @@ void __cdecl GGPROTO::dccmainthread(void*) pfts.currentFileProgress = local_dcc7->offset;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 9, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
break;
@@ -534,7 +534,7 @@ void __cdecl GGPROTO::dccmainthread(void*) strncat(filename, (char*)local_dcc7->filename, sizeof(filename) - strlen(filename));
memset(&pfts, 0, sizeof(PROTOFILETRANSFERSTATUS));
pfts.cbSize = sizeof(PROTOFILETRANSFERSTATUS);
- pfts.hContact = (HCONTACT)local_dcc7->contact;
+ pfts.hContact = (MCONTACT)local_dcc7->contact;
pfts.flags = (local_dcc7->type == GG_SESSION_DCC7_SEND);
pfts.pszFiles = NULL;
pfts.totalFiles = 1;
@@ -547,11 +547,11 @@ void __cdecl GGPROTO::dccmainthread(void*) pfts.currentFileProgress = local_dcc7->size;
pfts.currentFileTime = 0;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 10, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_DATA, local_dcc7, (LPARAM)&pfts);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
_close(local_dcc7->file_fd); local_dcc7->file_fd = -1;
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 11, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_SUCCESS, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
// Free dcc
@@ -595,7 +595,7 @@ void __cdecl GGPROTO::dccmainthread(void*) if (local_dcc7->contact) {
gg_LeaveCriticalSection(&ft_mutex, "dccmainthread", 37, 12, "ft_mutex", 1);
- ProtoBroadcastAck((HCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)local_dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, local_dcc7, 0);
gg_EnterCriticalSection(&ft_mutex, "dccmainthread", 37, "ft_mutex", 1);
}
@@ -684,7 +684,7 @@ HANDLE GGPROTO::dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath) TCHAR error[512];
mir_sntprintf(error, SIZEOF(error), TranslateT("Cannot create transfer file. ERROR: %d: %s (dcc)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
- ProtoBroadcastAck((HCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck((MCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Free transfer
gg_free_dcc(dcc);
return 0;
@@ -722,7 +722,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath) if (iFtRemoveRes == -1)
{
debugLogA("dcc7fileallow(): File transfer denied.");
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_DENIED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -736,7 +736,7 @@ HANDLE GGPROTO::dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath) mir_sntprintf(error, SIZEOF(error), TranslateT("Cannot create transfer file. ERROR: %d: %s (dcc7)\n%s"), errno, _tcserror(errno), szPath);
showpopup(m_tszUserName, error, GG_POPUP_ERROR);
gg_dcc7_reject(dcc7, GG_DCC7_REJECT_USER);
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Free transfer
gg_dcc7_free(dcc7);
return 0;
@@ -807,7 +807,7 @@ int GGPROTO::dccfilecancel(HANDLE hTransfer) gg_LeaveCriticalSection(&ft_mutex, "dccfilecancel", 44, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck((HCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
+ ProtoBroadcastAck((MCONTACT)dcc->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc, 0);
// Close file
if (dcc->file_fd != -1)
{
@@ -837,7 +837,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer) gg_LeaveCriticalSection(&ft_mutex, "dcc7filecancel", 45, 1, "ft_mutex", 1);
// Send failed info
- ProtoBroadcastAck((HCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
+ ProtoBroadcastAck((MCONTACT)dcc7->contact, ACKTYPE_FILE, ACKRESULT_FAILED, dcc7, 0);
// Close file
if (dcc7->file_fd != -1)
{
@@ -856,7 +856,7 @@ int GGPROTO::dcc7filecancel(HANDLE hTransfer) ////////////////////////////////////////////////////////////
// File receiving allowed
-HANDLE GGPROTO::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE GGPROTO::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -872,7 +872,7 @@ HANDLE GGPROTO::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* ////////////////////////////////////////////////////////////
// File transfer canceled
-int GGPROTO::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int GGPROTO::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -888,7 +888,7 @@ int GGPROTO::FileCancel(HCONTACT hContact, HANDLE hTransfer) ////////////////////////////////////////////////////////////
// File receiving denied
-int GGPROTO::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int GGPROTO::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
// Check if its proper dcc
struct gg_common *c = (struct gg_common *) hTransfer;
@@ -904,7 +904,7 @@ int GGPROTO::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szRe ////////////////////////////////////////////////////////////
// Called when received an file
-int GGPROTO::RecvFile(HCONTACT hContact, PROTOFILEEVENT* pre)
+int GGPROTO::RecvFile(MCONTACT hContact, PROTOFILEEVENT* pre)
{
return Proto_RecvFile(hContact, pre);
}
@@ -912,7 +912,7 @@ int GGPROTO::RecvFile(HCONTACT hContact, PROTOFILEEVENT* pre) ////////////////////////////////////////////////////////////
// Called when user sends a file
-HANDLE GGPROTO::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE GGPROTO::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
char *bslash, *filename;
struct gg_dcc *dcc;
diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index 2945c3c96c..e340b6703b 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -196,7 +196,7 @@ static int gg_modulesloaded(WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////
// Gets protocol instance associated with a contact
-static GGPROTO* gg_getprotoinstance(HCONTACT hContact)
+static GGPROTO* gg_getprotoinstance(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -213,7 +213,7 @@ static GGPROTO* gg_getprotoinstance(HCONTACT hContact) // Handles PrebuildContactMenu event
static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
GGPROTO* gg = gg_getprotoinstance(hContact);
if (gg == NULL)
return 0;
@@ -232,7 +232,7 @@ static int gg_prebuildcontactmenu(WPARAM wParam, LPARAM lParam) // Contact block service function
INT_PTR GGPROTO::blockuser(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
setByte(hContact, GG_KEY_BLOCK, !getByte(hContact, GG_KEY_BLOCK, 0));
notifyuser(hContact, 1);
return 0;
diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h index d5babd7e52..9240ef7e09 100644 --- a/protocols/Gadu-Gadu/src/gg.h +++ b/protocols/Gadu-Gadu/src/gg.h @@ -122,13 +122,13 @@ typedef struct struct GGREQUESTAVATARDATA
{
- HCONTACT hContact;
+ MCONTACT hContact;
int iWaitFor;
};
struct GGGETAVATARDATA
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szAvatarURL;
};
diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 1d8e211195..b6f55e0db7 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -124,24 +124,24 @@ GGPROTO::~GGPROTO() //////////////////////////////////////////////////////////
// Dummies for function that have to be implemented
-HCONTACT GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
+MCONTACT GGPROTO::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
int GGPROTO::Authorize(HANDLE hDbEvent) { return 1; }
int GGPROTO::AuthDeny(HANDLE hDbEvent, const TCHAR *szReason) { return 1; }
-int GGPROTO::AuthRecv(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::AuthRequest(HCONTACT hContact, const TCHAR *szMessage) { return 1; }
+int GGPROTO::AuthRecv(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::AuthRequest(MCONTACT hContact, const TCHAR *szMessage) { return 1; }
HANDLE GGPROTO::ChangeInfo(int iInfoType, void *pInfoData) { return NULL; }
int GGPROTO::FileResume(HANDLE hTransfer, int *action, const PROTOCHAR** szFilename) { return 1; }
HANDLE GGPROTO::SearchByEmail(const PROTOCHAR *email) { return NULL; }
-int GGPROTO::RecvContacts(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::RecvUrl(HCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
-int GGPROTO::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) { return 1; }
-int GGPROTO::SendUrl(HCONTACT hContact, int flags, const char *url) { return 1; }
-int GGPROTO::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
+int GGPROTO::RecvContacts(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::RecvUrl(MCONTACT hContact, PROTORECVEVENT *pre) { return 1; }
+int GGPROTO::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) { return 1; }
+int GGPROTO::SendUrl(MCONTACT hContact, int flags, const char *url) { return 1; }
+int GGPROTO::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 1; }
//////////////////////////////////////////////////////////
// when contact is added to list
-HCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
#ifdef DEBUGMODE
debugLogA("AddToList(): id=%s");
@@ -160,7 +160,7 @@ HCONTACT GGPROTO::AddToList(int flags, PROTOSEARCHRESULT *psr) //////////////////////////////////////////////////////////
// checks proto capabilities
-DWORD_PTR GGPROTO::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR GGPROTO::GetCaps(int type, MCONTACT hContact)
{
switch (type) {
case PFLAGNUM_1:
@@ -190,11 +190,11 @@ void __cdecl GGPROTO::cmdgetinfothread(void *hContact) {
debugLogA("cmdgetinfothread(): started. Failed info retreival.");
gg_sleep(100, FALSE, "cmdgetinfothread", 103, 1);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_FAILED, (HANDLE)1, 0);
debugLogA("cmdgetinfothread(): end.");
}
-int GGPROTO::GetInfo(HCONTACT hContact, int infoType)
+int GGPROTO::GetInfo(MCONTACT hContact, int infoType)
{
gg_pubdir50_t req;
@@ -570,7 +570,7 @@ HWND GGPROTO::CreateExtendedSearchUI(HWND owner) //////////////////////////////////////////////////////////
// when messsage received
-int GGPROTO::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int GGPROTO::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
return Proto_RecvMessage(hContact, pre);
}
@@ -580,7 +580,7 @@ int GGPROTO::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre) typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
int seq;
} GG_SEQ_ACK;
@@ -592,7 +592,7 @@ void __cdecl GGPROTO::sendackthread(void *ack) mir_free(ack);
}
-int GGPROTO::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int GGPROTO::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
uin_t uin = (uin_t)getDword(hContact, GG_KEY_UIN, 0);
if (!isonline() || !uin)
@@ -633,7 +633,7 @@ int GGPROTO::SendMsg(HCONTACT hContact, int flags, const char *msg) //////////////////////////////////////////////////////////
// visible lists
-int GGPROTO::SetApparentMode(HCONTACT hContact, int mode)
+int GGPROTO::SetApparentMode(MCONTACT hContact, int mode)
{
setWord(hContact, GG_KEY_APPARENT, (WORD)mode);
notifyuser(hContact, 1);
@@ -670,18 +670,18 @@ void __cdecl GGPROTO::getawaymsgthread(void *hContact) debugLogA("getawaymsgthread(): started");
gg_sleep(100, FALSE, "getawaymsgthread", 106, 1);
- if (!db_get_s((HCONTACT)hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
+ if (!db_get_s((MCONTACT)hContact, "CList", GG_KEY_STATUSDESCR, &dbv, DBVT_TCHAR))
{
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
debugLog(_T("getawaymsgthread(): Reading away msg <%s>."), dbv.ptszVal);
db_free(&dbv);
} else {
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)NULL);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)NULL);
}
debugLogA("getawaymsgthread(): end");
}
-HANDLE GGPROTO::GetAwayMsg(HCONTACT hContact)
+HANDLE GGPROTO::GetAwayMsg(MCONTACT hContact)
{
#ifdef DEBUGMODE
debugLogA("GetAwayMsg(): ForkThread 17 GGPROTO::getawaymsgthread");
@@ -757,7 +757,7 @@ int GGPROTO::SetAwayMsg(int iStatus, const PROTOCHAR *newMsg) //////////////////////////////////////////////////////////
// sends a notification that the user is typing a message
-int GGPROTO::UserIsTyping(HCONTACT hContact, int type)
+int GGPROTO::UserIsTyping(MCONTACT hContact, int type)
{
uin_t uin = getDword(hContact, GG_KEY_UIN, 0);
if (!uin || !isonline())
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index a993447226..fc34dd0aab 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -31,23 +31,23 @@ struct GGPROTO : public PROTO<GGPROTO> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
@@ -55,24 +55,24 @@ struct GGPROTO : public PROTO<GGPROTO> virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -110,10 +110,10 @@ struct GGPROTO : public PROTO<GGPROTO> void gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging);
/* Global GG functions */
- void notifyuser(HCONTACT hContact, int refresh);
+ void notifyuser(MCONTACT hContact, int refresh);
void setalloffline();
void disconnect();
- HCONTACT getcontact(uin_t uin, int create, int inlist, TCHAR *nick);
+ MCONTACT getcontact(uin_t uin, int create, int inlist, TCHAR *nick);
void __cdecl mainthread(void *empty);
int isonline();
int refreshstatus(int status);
@@ -133,9 +133,9 @@ struct GGPROTO : public PROTO<GGPROTO> void menus_init();
/* Avatar functions */
- void getAvatarFilename(HCONTACT hContact, TCHAR *pszDest, int cbLen);
- void requestAvatarTransfer(HCONTACT hContact, char *szAvatarURL);
- void requestAvatarInfo(HCONTACT hContact, int iWaitFor);
+ void getAvatarFilename(MCONTACT hContact, TCHAR *pszDest, int cbLen);
+ void requestAvatarTransfer(MCONTACT hContact, char *szAvatarURL);
+ void requestAvatarInfo(MCONTACT hContact, int iWaitFor);
void getOwnAvatar();
void setAvatar(const TCHAR *szFilename);
bool getAvatarFileInfo(uin_t uin, char **avatarurl, char **avatarts);
@@ -152,11 +152,11 @@ struct GGPROTO : public PROTO<GGPROTO> void __cdecl setavatarthread(void*);
/* File transfer functions */
- HANDLE fileallow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- int filecancel(HCONTACT hContact, HANDLE hTransfer);
- int filedeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
- int recvfile(HCONTACT hContact, PROTOFILEEVENT* pre);
- HANDLE sendfile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ HANDLE fileallow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ int filecancel(MCONTACT hContact, HANDLE hTransfer);
+ int filedeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ int recvfile(MCONTACT hContact, PROTOFILEEVENT* pre);
+ HANDLE sendfile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
HANDLE dccfileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
HANDLE dcc7fileallow(HANDLE hTransfer, const PROTOCHAR* szPath);
@@ -187,8 +187,8 @@ struct GGPROTO : public PROTO<GGPROTO> int img_sendonrequest(gg_event* e);
BOOL img_opened(uin_t uin);
void *img_loadpicture(gg_event* e, TCHAR *szFileName);
- int img_display(HCONTACT hContact, void *img);
- int img_displayasmsg(HCONTACT hContact, void *img);
+ int img_display(MCONTACT hContact, void *img);
+ int img_displayasmsg(MCONTACT hContact, void *img);
void __cdecl img_dlgcallthread(void *param);
@@ -211,7 +211,7 @@ struct GGPROTO : public PROTO<GGPROTO> int gc_destroy();
TCHAR * gc_getchat(uin_t sender, uin_t *recipients, int recipients_count);
GGGC *gc_lookup(const TCHAR *id);
- int gc_changenick(HCONTACT hContact, TCHAR *ptszNick);
+ int gc_changenick(MCONTACT hContact, TCHAR *ptszNick);
int __cdecl gc_event(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/Gadu-Gadu/src/groupchat.cpp b/protocols/Gadu-Gadu/src/groupchat.cpp index 676b7abbe5..816e1e5d9b 100644 --- a/protocols/Gadu-Gadu/src/groupchat.cpp +++ b/protocols/Gadu-Gadu/src/groupchat.cpp @@ -138,8 +138,8 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam) list_remove(&chats, chat, 1);
// Remove contact from contact list (duh!) should be done by chat.dll !!
- 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);
DBVARIANT dbv;
if (!getTString(hContact, "ChatRoomID", &dbv)) {
if (dbv.ptszVal && !_tcscmp(gch->pDest->ptszID, dbv.ptszVal))
@@ -193,7 +193,7 @@ int GGPROTO::gc_event(WPARAM wParam, LPARAM lParam) // Privmessage selected
if (gch->pDest->iType == GC_USER_PRIVMESS)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if ((uin = _ttoi(gch->ptszUID)) && (hContact = getcontact(uin, 1, 0, NULL)))
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
@@ -369,7 +369,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count // Add contacts
for(i = 0; i < chat->recipients_count; i++) {
- HCONTACT hContact = getcontact(chat->recipients[i], 1, 0, NULL);
+ MCONTACT hContact = getcontact(chat->recipients[i], 1, 0, NULL);
UIN2IDT(chat->recipients[i], id);
if (hContact && (name = pcli->pfnGetContactDisplayName(hContact, 0)) != NULL)
gce.ptszNick = name;
@@ -389,7 +389,7 @@ TCHAR* GGPROTO::gc_getchat(uin_t sender, uin_t *recipients, int recipients_count return chat->id;
}
-static HCONTACT gg_getsubcontact(GGPROTO* gg, HCONTACT hContact)
+static MCONTACT gg_getsubcontact(GGPROTO* gg, MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
char* szMetaProto = (char*)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
@@ -398,7 +398,7 @@ static HCONTACT gg_getsubcontact(GGPROTO* gg, HCONTACT hContact) {
int nSubContacts = (int)CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, 0), i;
for (i = 0; i < nSubContacts; i++) {
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, i);
szProto = GetContactProto(hMetaContact);
if (szProto && !lstrcmpA(szProto, gg->m_szModuleName))
return hMetaContact;
@@ -423,7 +423,7 @@ static void gg_gc_resetclistopts(HWND hwndList) static int gg_gc_countcheckmarks(HWND hwndList)
{
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)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
count++;
@@ -475,10 +475,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa TCHAR* chat;
uin_t* participants = (uin_t*)calloc(count, sizeof(uin_t));
gg->debugLogA("gg_gc_openconfdlg(): WM_COMMAND IDOK Opening new conference for %d contacts.", count);
- for (HCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact && i < count; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETCHECKMARK, (WPARAM)hItem, 0)) {
- HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
participants[i++] = db_get_dw(hMetaContact ? hMetaContact : hContact, gg->m_szModuleName, GG_KEY_UIN, 0);
}
}
@@ -524,10 +524,10 @@ static INT_PTR CALLBACK gg_gc_openconfdlg(HWND hwndDlg, UINT message, WPARAM wPa if (!gg) break;
// Delete non-gg contacts
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- HCONTACT hItem = (HCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ MCONTACT hItem = (MCONTACT)SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) {
- HCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
+ MCONTACT hMetaContact = gg_getsubcontact(gg, hContact); // MetaContacts support
if (hMetaContact) {
szProto = gg->m_szModuleName;
uin = (uin_t)gg->getDword(hMetaContact, GG_KEY_UIN, 0);
@@ -618,7 +618,7 @@ INT_PTR GGPROTO::gc_openconf(WPARAM wParam, LPARAM lParam) return 1;
}
-int GGPROTO::gc_changenick(HCONTACT hContact, TCHAR *ptszNick)
+int GGPROTO::gc_changenick(MCONTACT hContact, TCHAR *ptszNick)
{
list_t l;
uin_t uin = getDword(hContact, GG_KEY_UIN, 0);
diff --git a/protocols/Gadu-Gadu/src/image.cpp b/protocols/Gadu-Gadu/src/image.cpp index 607edfdb37..be57084318 100644 --- a/protocols/Gadu-Gadu/src/image.cpp +++ b/protocols/Gadu-Gadu/src/image.cpp @@ -49,7 +49,7 @@ typedef struct _GGIMAGEENTRY typedef struct
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hEvent;
HWND hWnd;
uin_t uin;
@@ -730,7 +730,7 @@ void __cdecl GGPROTO::img_dlgcallthread(void *param) ////////////////////////////////////////////////////////////////////////////
// Open dialog receive for specified contact
-GGIMAGEDLGDATA *gg_img_recvdlg(GGPROTO *gg, HCONTACT hContact)
+GGIMAGEDLGDATA *gg_img_recvdlg(GGPROTO *gg, MCONTACT hContact)
{
// Create dialog data
GGIMAGEDLGDATA *dat = (GGIMAGEDLGDATA *)calloc(1, sizeof(GGIMAGEDLGDATA));
@@ -804,7 +804,7 @@ TCHAR *gg_img_hasextension(TCHAR *filename) ////////////////////////////////////////////////////////////////////////////////
// Display received image using message with [img] BBCode
-int GGPROTO::img_displayasmsg(HCONTACT hContact, void *img)
+int GGPROTO::img_displayasmsg(MCONTACT hContact, void *img)
{
GGIMAGEENTRY *dat = (GGIMAGEENTRY *)img;
TCHAR szPath[MAX_PATH], path[MAX_PATH], *pImgext, imgext[6];
@@ -896,7 +896,7 @@ BOOL GGPROTO::img_opened(uin_t uin) ////////////////////////////////////////////////////////////////////////////
// Image Module : Looking for window entry, create if not found
-int GGPROTO::img_display(HCONTACT hContact, void *img)
+int GGPROTO::img_display(MCONTACT hContact, void *img)
{
list_t l = imagedlgs;
GGIMAGEDLGDATA *dat;
@@ -1173,7 +1173,7 @@ BOOL GGPROTO::img_sendonrequest(gg_event* e) INT_PTR GGPROTO::img_sendimg(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
GGIMAGEDLGDATA *dat = NULL;
gg_EnterCriticalSection(&img_mutex, "img_sendimg", 64, "img_mutex", 1);
diff --git a/protocols/Gadu-Gadu/src/import.cpp b/protocols/Gadu-Gadu/src/import.cpp index e4954fc14c..5b528ee0ef 100644 --- a/protocols/Gadu-Gadu/src/import.cpp +++ b/protocols/Gadu-Gadu/src/import.cpp @@ -26,7 +26,7 @@ char *gg_makecontacts(GGPROTO *gg, int cr) char *contacts;
// Readup contacts
- for (HCONTACT hContact = db_find_first(gg->m_szModuleName); hContact; hContact = db_find_next(hContact, gg->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(gg->m_szModuleName); hContact; hContact = db_find_next(hContact, gg->m_szModuleName)) {
if (gg->isChatRoom(hContact))
continue;
@@ -210,7 +210,7 @@ void GGPROTO::parsecontacts(char *contacts) // Loadup contact
if (uin && strNick)
{
- HCONTACT hContact = getcontact(uin, 1, 1, _A2T(strNick));
+ MCONTACT hContact = getcontact(uin, 1, 1, _A2T(strNick));
#ifdef DEBUGMODE
debugLogA("parsecontacts(): Found contact %d with nickname \"%s\".", uin, strNick);
#endif
diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index f241938c5a..8b46a68b80 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -99,7 +99,7 @@ static INT_PTR gg_parselink(WPARAM wParam, LPARAM lParam) if (ServiceExists(MS_MSG_SENDMESSAGE))
{
- HCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
+ MCONTACT hContact = gg->getcontact(uin, 1, 0, NULL);
if (hContact != NULL)
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
diff --git a/protocols/Gadu-Gadu/src/services.cpp b/protocols/Gadu-Gadu/src/services.cpp index 4b6d8610df..cac6119d71 100644 --- a/protocols/Gadu-Gadu/src/services.cpp +++ b/protocols/Gadu-Gadu/src/services.cpp @@ -382,7 +382,7 @@ INT_PTR GGPROTO::get_acc_mgr_gui(WPARAM wParam, LPARAM lParam) INT_PTR GGPROTO::leavechat(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 54ade38cac..ff021ea86e 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -24,13 +24,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, unsigned long adr, int port)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR szNick[256];
char szService[256];
bool bFlag = false;
CONTACT usertemp = { (TCHAR*)name.c_str(), NULL, NULL, false, false, true };
- HCONTACT hc = CList_FindContact(&usertemp);
+ MCONTACT hc = CList_FindContact(&usertemp);
if (hc && db_get_b(hc, "CList", "NotOnList", 0) == 0 && db_get_b(hc, "CList", "Hidden", 0) == 0)
bFlag = true;
@@ -80,12 +80,12 @@ BOOL CIrcProto::CList_AddDCCChat(const CMString& name, const CMString& hostmask, return TRUE;
}
-HCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
+MCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline)
{
if (user->name == NULL)
return 0;
- HCONTACT hContact = CList_FindContact(user);
+ MCONTACT hContact = CList_FindContact(user);
if (hContact) {
if (InList)
db_unset(hContact, "CList", "NotOnList");
@@ -97,7 +97,7 @@ HCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline) }
// here we create a new one since no one is to be found
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName);
@@ -116,9 +116,9 @@ HCONTACT CIrcProto::CList_AddContact(CONTACT *user, bool InList, bool SetOnline) return false;
}
-HCONTACT CIrcProto::CList_SetOffline(CONTACT *user)
+MCONTACT CIrcProto::CList_SetOffline(CONTACT *user)
{
- HCONTACT hContact = CList_FindContact(user);
+ MCONTACT hContact = CList_FindContact(user);
if (hContact) {
DBVARIANT dbv;
if (!getTString(hContact, "Default", &dbv)) {
@@ -140,7 +140,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo) DisconnectAllDCCSessions(false);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
@@ -160,7 +160,7 @@ bool CIrcProto::CList_SetAllOffline(BYTE ChatsToo) return true;
}
-HCONTACT CIrcProto::CList_FindContact(CONTACT *user)
+MCONTACT CIrcProto::CList_FindContact(CONTACT *user)
{
if (!user || !user->name)
return 0;
@@ -168,11 +168,11 @@ HCONTACT CIrcProto::CList_FindContact(CONTACT *user) TCHAR* lowercasename = mir_tstrdup(user->name);
CharLower(lowercasename);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
continue;
- HCONTACT hContact_temp = NULL;
+ MCONTACT hContact_temp = NULL;
ptrT DBNick(getTStringA(hContact, "Nick"));
ptrT DBUser(getTStringA(hContact, "UUser"));
ptrT DBHost(getTStringA(hContact, "UHost"));
@@ -183,7 +183,7 @@ HCONTACT CIrcProto::CList_FindContact(CONTACT *user) CharLower(DBWildcard);
if (IsChannel(user->name)) {
if (DBDefault && !lstrcmpi(DBDefault, user->name))
- hContact_temp = (HCONTACT)-1;
+ hContact_temp = (MCONTACT)-1;
}
else if (user->ExactNick && DBNick && !lstrcmpi(DBNick, user->name))
hContact_temp = hContact;
@@ -208,7 +208,7 @@ HCONTACT CIrcProto::CList_FindContact(CONTACT *user) if (hContact_temp != NULL) {
mir_free(lowercasename);
- if (hContact_temp != (HCONTACT)-1)
+ if (hContact_temp != (MCONTACT)-1)
return hContact_temp;
return 0;
}
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp index 41556d434e..52d4b03d20 100644 --- a/protocols/IRCG/src/commandmonitor.cpp +++ b/protocols/IRCG/src/commandmonitor.cpp @@ -140,7 +140,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) if (name.IsEmpty() && name2.IsEmpty()) {
DBVARIANT dbv;
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
if (ppro->isChatRoom(hContact))
continue;
@@ -215,7 +215,7 @@ VOID CALLBACK OnlineNotifTimerProc(HWND, UINT, UINT_PTR idEvent, DWORD) ppro->SetChatTimer(ppro->OnlineNotifTimer, ppro->m_onlineNotificationTime * 1000, OnlineNotifTimerProc);
}
-int CIrcProto::AddOutgoingMessageToDB(HCONTACT hContact, TCHAR* msg)
+int CIrcProto::AddOutgoingMessageToDB(MCONTACT hContact, TCHAR* msg)
{
if (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_CONNECTING)
return 0;
@@ -582,7 +582,7 @@ bool CIrcProto::OnIrc_NICK(const CIrcMessage* pmsg) DoEvent(GC_EVENT_CHUID, NULL, pmsg->prefix.sNick.c_str(), pmsg->parameters[0].c_str(), NULL, NULL, NULL, true, false);
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (hContact) {
if (getWord(hContact, "Status", ID_STATUS_OFFLINE) == ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_ONLINE);
@@ -696,12 +696,12 @@ bool CIrcProto::OnIrc_PRIVMSG(const CIrcMessage* pmsg) return true;
if ((m_ignore && IsIgnored(pmsg->prefix.sNick, pmsg->prefix.sUser, pmsg->prefix.sHost, 'q'))) {
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (!hContact || (hContact && db_get_b(hContact, "CList", "Hidden", 0) == 1))
return true;
}
- HCONTACT hContact = CList_AddContact(&user, false, true);
+ MCONTACT hContact = CList_AddContact(&user, false, true);
PROTORECVEVENT pre = { 0 };
pre.timestamp = (DWORD)time(NULL);
@@ -1066,7 +1066,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) // incoming chat request
if (bIsChat) {
CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), 0, 0, false, false, true };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
// check if it should be ignored
if (m_DCCChatIgnore == 1 ||
@@ -1139,7 +1139,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) if (!CList_FindContact(&user))
return true;
- HCONTACT hContact = CList_AddContact(&user, false, true);
+ MCONTACT hContact = CList_AddContact(&user, false, true);
if (hContact) {
DCCINFO* di = new DCCINFO;
di->hContact = hContact;
@@ -1188,7 +1188,7 @@ bool CIrcProto::IsCTCP(const CIrcMessage* pmsg) //if we got incoming CTCP Version for contact in CList - then write its as MirVer for that contact!
if (pmsg->m_bIncoming && command == _T("version")) {
struct CONTACT user = { (TCHAR*)pmsg->prefix.sNick.c_str(), (TCHAR*)pmsg->prefix.sUser.c_str(), (TCHAR*)pmsg->prefix.sHost.c_str(), false, false, false };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (hContact)
setTString(hContact, "MirVer", DoColorCodes(GetWordAddress(mess.c_str(), 1), TRUE, FALSE));
}
@@ -1688,7 +1688,7 @@ bool CIrcProto::OnIrc_WHOIS_END(const CIrcMessage* pmsg) {
if (pmsg->m_bIncoming && pmsg->parameters.getCount() > 1 && m_manualWhoisCount < 1) {
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, true };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (hContact)
ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)WhoisAwayReply.c_str());
}
@@ -1767,7 +1767,7 @@ bool CIrcProto::OnIrc_WHOIS_NO_USER(const CIrcMessage* pmsg) m_whoisDlg->ShowMessageNoUser(pmsg);
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, false, false };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (hContact) {
AddOutgoingMessageToDB(hContact, (TCHAR*)((CMString)_T("> ") + pmsg->parameters[2] + (CMString)_T(": ") + pmsg->parameters[1]).c_str());
@@ -1949,7 +1949,7 @@ bool CIrcProto::OnIrc_WHO_END(const CIrcMessage* pmsg) const TCHAR* p1 = UserList;
m_whoReply = _T("");
CONTACT user = { (TCHAR*)pmsg->parameters[1].c_str(), NULL, NULL, false, true, false };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
if (hContact && getByte(hContact, "AdvancedMode", 0) == 1) {
ptrT DBHost(getTStringA(hContact, "UHost"));
@@ -2118,7 +2118,7 @@ bool CIrcProto::OnIrc_USERHOST_REPLY(const CIrcMessage* pmsg) finduser.host = (TCHAR*)host.c_str();
finduser.user = (TCHAR*)user.c_str();
- HCONTACT hContact = CList_FindContact(&finduser);
+ MCONTACT hContact = CList_FindContact(&finduser);
if (hContact && getByte(hContact, "AdvancedMode", 0) == 0) {
setWord(hContact, "Status", awaystatus == '-' ? ID_STATUS_AWAY : ID_STATUS_ONLINE);
setTString(hContact, "User", user.c_str());
diff --git a/protocols/IRCG/src/input.cpp b/protocols/IRCG/src/input.cpp index fbc43f7cec..1ad5c203bf 100644 --- a/protocols/IRCG/src/input.cpp +++ b/protocols/IRCG/src/input.cpp @@ -212,7 +212,7 @@ static void __stdcall sttSetTimerOff(void* _pro) ppro->KillChatTimer(ppro->OnlineNotifTimer3);
}
-BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HCONTACT hContact)
+BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, MCONTACT hContact)
{
TCHAR temp[30];
lstrcpyn(temp, GetWord(text.c_str(), 0).c_str(), 29);
@@ -555,7 +555,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HCONTACT hConta return true;
CONTACT user = { (TCHAR*)one.c_str(), NULL, NULL, false, false, false };
- HCONTACT hContact2 = CList_AddContact(&user, false, false);
+ MCONTACT hContact2 = CList_AddContact(&user, false, false);
if (hContact2) {
if (getByte(hContact, "AdvancedMode", 0) == 0)
DoUserhostWithReason(1, (_T("S") + one).c_str(), true, one.c_str());
@@ -628,7 +628,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HCONTACT hConta if (ulAdr) {
CONTACT user = { (TCHAR*)two.c_str(), NULL, NULL, false, false, true };
- HCONTACT hContact = CList_AddContact(&user, false, false);
+ MCONTACT hContact = CList_AddContact(&user, false, false);
if (hContact) {
CMString s;
@@ -679,7 +679,7 @@ BOOL CIrcProto::DoHardcodedCommand(CMString text, TCHAR* window, HCONTACT hConta if (ulAdr) {
CMString contact = two; contact += _T(DCCSTRING);
CONTACT user = { (TCHAR*)contact.c_str(), NULL, NULL, false, false, true };
- HCONTACT hContact = CList_AddContact(&user, false, false);
+ MCONTACT hContact = CList_AddContact(&user, false, false);
setByte(hContact, "DCC", 1);
int iPort = 0;
@@ -805,7 +805,7 @@ bool CIrcProto::PostIrcMessage(const TCHAR* fmt, ...) return PostIrcMessageWnd(NULL, NULL, szBuf);
}
-bool CIrcProto::PostIrcMessageWnd(TCHAR* window, HCONTACT hContact, const TCHAR* szBuf)
+bool CIrcProto::PostIrcMessageWnd(TCHAR* window, MCONTACT hContact, const TCHAR* szBuf)
{
DBVARIANT dbv;
TCHAR windowname[256];
diff --git a/protocols/IRCG/src/irc.h b/protocols/IRCG/src/irc.h index 6a024ad099..bb6f6d7a70 100644 --- a/protocols/IRCG/src/irc.h +++ b/protocols/IRCG/src/irc.h @@ -214,23 +214,23 @@ struct CIrcProto : public PROTO<CIrcProto> // Protocol interface
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
@@ -238,24 +238,24 @@ struct CIrcProto : public PROTO<CIrcProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -389,18 +389,18 @@ struct CIrcProto : public PROTO<CIrcProto> CDlgBase::CreateParam OptCreateAccount, OptCreateConn, OptCreateIgnore, OptCreateOther;
//clist.cpp
- HCONTACT CList_AddContact(CONTACT *user, bool InList, bool SetOnline);
+ MCONTACT CList_AddContact(CONTACT *user, bool InList, bool SetOnline);
bool CList_SetAllOffline(BYTE ChatsToo);
- HCONTACT CList_SetOffline(CONTACT *user);
+ MCONTACT CList_SetOffline(CONTACT *user);
bool CList_AddEvent(CONTACT *user, HICON Icon, HANDLE event, const char *tooltip, int type ) ;
- HCONTACT CList_FindContact(CONTACT *user);
+ MCONTACT CList_FindContact(CONTACT *user);
BOOL CList_AddDCCChat(const CMString &name, const CMString &hostmask, unsigned long adr, int port) ;
//commandmonitor.cpp
UINT_PTR IdentTimer, InitTimer, KeepAliveTimer, OnlineNotifTimer, OnlineNotifTimer3;
- int AddOutgoingMessageToDB(HCONTACT hContact, TCHAR *msg);
+ int AddOutgoingMessageToDB(MCONTACT hContact, TCHAR *msg);
bool DoOnConnect(const CIrcMessage *pmsg);
int DoPerform(const char *event);
void __cdecl ResolveIPThread(void *di);
@@ -412,10 +412,10 @@ struct CIrcProto : public PROTO<CIrcProto> //input.cpp
CMString DoAlias( const TCHAR *text, TCHAR *window);
- BOOL DoHardcodedCommand(CMString text, TCHAR *window, HCONTACT hContact);
+ BOOL DoHardcodedCommand(CMString text, TCHAR *window, MCONTACT hContact);
CMString DoIdentifiers(CMString text, const TCHAR *window);
void FormatMsg(CMString &text);
- bool PostIrcMessageWnd(TCHAR *pszWindow, HCONTACT hContact, const TCHAR *szBuf);
+ bool PostIrcMessageWnd(TCHAR *pszWindow, MCONTACT hContact, const TCHAR *szBuf);
bool PostIrcMessage(const TCHAR *fmt, ...);
// irclib.cpp
@@ -501,12 +501,12 @@ struct CIrcProto : public PROTO<CIrcProto> ////////////////////////////////////////////////////////////////////////////////////////
// former CIrcSession class
- void AddDCCSession(HCONTACT hContact, CDccSession* dcc);
+ void AddDCCSession(MCONTACT hContact, CDccSession* dcc);
void AddDCCSession(DCCINFO* pdci, CDccSession* dcc);
- void RemoveDCCSession(HCONTACT hContact);
+ void RemoveDCCSession(MCONTACT hContact);
void RemoveDCCSession(DCCINFO* pdci);
- CDccSession* FindDCCSession(HCONTACT hContact);
+ CDccSession* FindDCCSession(MCONTACT hContact);
CDccSession* FindDCCSession(DCCINFO* pdci);
CDccSession* FindDCCSendByPort(int iPort);
CDccSession* FindDCCRecvByPortAndName(int iPort, const TCHAR* szName);
diff --git a/protocols/IRCG/src/irclib.cpp b/protocols/IRCG/src/irclib.cpp index b1e97a4212..901834c7e1 100644 --- a/protocols/IRCG/src/irclib.cpp +++ b/protocols/IRCG/src/irclib.cpp @@ -457,7 +457,7 @@ void __cdecl CIrcProto::ThreadProc(void*) m_info.Reset();
}
-void CIrcProto::AddDCCSession(HCONTACT, CDccSession* dcc)
+void CIrcProto::AddDCCSession(MCONTACT, CDccSession* dcc)
{
EnterCriticalSection(&m_dcc);
@@ -479,7 +479,7 @@ void CIrcProto::AddDCCSession(DCCINFO*, CDccSession* dcc) LeaveCriticalSection(&m_dcc);
}
-void CIrcProto::RemoveDCCSession(HCONTACT hContact)
+void CIrcProto::RemoveDCCSession(MCONTACT hContact)
{
EnterCriticalSection(&m_dcc);
@@ -505,7 +505,7 @@ void CIrcProto::RemoveDCCSession(DCCINFO* pdci) LeaveCriticalSection(&m_dcc);
}
-CDccSession* CIrcProto::FindDCCSession(HCONTACT hContact)
+CDccSession* CIrcProto::FindDCCSession(MCONTACT hContact)
{
EnterCriticalSection(&m_dcc);
diff --git a/protocols/IRCG/src/irclib.h b/protocols/IRCG/src/irclib.h index d0efcd6fcf..4fc6c9bff5 100644 --- a/protocols/IRCG/src/irclib.h +++ b/protocols/IRCG/src/irclib.h @@ -48,7 +48,7 @@ struct DCCINFO : public MZeroedObject CMString sFile;
CMString sFileAndPath;
CMString sHostmask;
- HCONTACT hContact;
+ MCONTACT hContact;
CMString sContactName;
};
diff --git a/protocols/IRCG/src/ircproto.cpp b/protocols/IRCG/src/ircproto.cpp index a74fe449da..de66eb369b 100644 --- a/protocols/IRCG/src/ircproto.cpp +++ b/protocols/IRCG/src/ircproto.cpp @@ -318,7 +318,7 @@ int CIrcProto::OnModulesLoaded(WPARAM, LPARAM) ////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
+MCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr)
{
if (m_iStatus == ID_STATUS_OFFLINE || m_iStatus == ID_STATUS_CONNECTING)
return 0;
@@ -327,7 +327,7 @@ HCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) id = psr->flags & PSR_UNICODE ? mir_u2t((wchar_t*)id) : mir_a2t((char*)id);
CONTACT user = { id, NULL, NULL, true, false, false };
- HCONTACT hContact = CList_AddContact(&user, true, false);
+ MCONTACT hContact = CList_AddContact(&user, true, false);
if (hContact) {
DBVARIANT dbv1;
@@ -359,7 +359,7 @@ HCONTACT __cdecl CIrcProto::AddToList(int, PROTOSEARCHRESULT* psr) ////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HCONTACT __cdecl CIrcProto::AddToListByEvent(int, int, HANDLE)
+MCONTACT __cdecl CIrcProto::AddToListByEvent(int, int, HANDLE)
{
return NULL;
}
@@ -383,7 +383,7 @@ int __cdecl CIrcProto::AuthDeny(HANDLE, const TCHAR*) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CIrcProto::AuthRecv(HCONTACT, PROTORECVEVENT*)
+int __cdecl CIrcProto::AuthRecv(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -391,7 +391,7 @@ int __cdecl CIrcProto::AuthRecv(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CIrcProto::AuthRequest(HCONTACT, const TCHAR*)
+int __cdecl CIrcProto::AuthRequest(MCONTACT, const TCHAR*)
{
return 1;
}
@@ -407,7 +407,7 @@ HANDLE __cdecl CIrcProto::ChangeInfo(int, void*) ////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CIrcProto::FileAllow(HCONTACT, HANDLE hTransfer, const TCHAR* szPath)
+HANDLE __cdecl CIrcProto::FileAllow(MCONTACT, HANDLE hTransfer, const TCHAR* szPath)
{
DCCINFO* di = (DCCINFO*)hTransfer;
@@ -428,7 +428,7 @@ HANDLE __cdecl CIrcProto::FileAllow(HCONTACT, HANDLE hTransfer, const TCHAR* szP ////////////////////////////////////////////////////////////////////////////////////////
// FileCancel - cancels a file transfer
-int __cdecl CIrcProto::FileCancel(HCONTACT, HANDLE hTransfer)
+int __cdecl CIrcProto::FileCancel(MCONTACT, HANDLE hTransfer)
{
DCCINFO* di = (DCCINFO*)hTransfer;
@@ -444,7 +444,7 @@ int __cdecl CIrcProto::FileCancel(HCONTACT, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CIrcProto::FileDeny(HCONTACT, HANDLE hTransfer, const TCHAR*)
+int __cdecl CIrcProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR*)
{
DCCINFO* di = (DCCINFO*)hTransfer;
delete di;
@@ -500,7 +500,7 @@ int __cdecl CIrcProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** s ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CIrcProto::GetCaps(int type, HCONTACT)
+DWORD_PTR __cdecl CIrcProto::GetCaps(int type, MCONTACT)
{
switch (type) {
case PFLAGNUM_1:
@@ -531,7 +531,7 @@ DWORD_PTR __cdecl CIrcProto::GetCaps(int type, HCONTACT) ////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CIrcProto::GetInfo(HCONTACT, int)
+int __cdecl CIrcProto::GetInfo(MCONTACT, int)
{
return 1;
}
@@ -599,7 +599,7 @@ HWND __cdecl CIrcProto::SearchAdvanced(HWND) ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CIrcProto::RecvContacts(HCONTACT, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvContacts(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -607,7 +607,7 @@ int __cdecl CIrcProto::RecvContacts(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CIrcProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt)
+int __cdecl CIrcProto::RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -615,7 +615,7 @@ int __cdecl CIrcProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CIrcProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
+int __cdecl CIrcProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
{
return Proto_RecvMessage(hContact, evt);
}
@@ -623,7 +623,7 @@ int __cdecl CIrcProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CIrcProto::RecvUrl(HCONTACT, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvUrl(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -631,7 +631,7 @@ int __cdecl CIrcProto::RecvUrl(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CIrcProto::SendContacts(HCONTACT, int, int, HCONTACT*)
+int __cdecl CIrcProto::SendContacts(MCONTACT, int, int, MCONTACT*)
{
return 1;
}
@@ -639,7 +639,7 @@ int __cdecl CIrcProto::SendContacts(HCONTACT, int, int, HCONTACT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CIrcProto::SendFile(HCONTACT hContact, const TCHAR*, TCHAR** ppszFiles)
+HANDLE __cdecl CIrcProto::SendFile(MCONTACT hContact, const TCHAR*, TCHAR** ppszFiles)
{
DCCINFO* dci = NULL;
int iPort = 0;
@@ -780,22 +780,22 @@ HANDLE __cdecl CIrcProto::SendFile(HCONTACT hContact, const TCHAR*, TCHAR** ppsz struct TFakeAckParam
{
- __inline TFakeAckParam(HCONTACT _hContact, int _msgid) :
+ __inline TFakeAckParam(MCONTACT _hContact, int _msgid) :
hContact(_hContact), msgid(_msgid)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
int msgid;
};
void __cdecl CIrcProto::AckMessageFail(void *info)
{
- ProtoBroadcastAck((HCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
+ ProtoBroadcastAck((MCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The protocol is not online"));
}
void __cdecl CIrcProto::AckMessageFailDcc(void *info)
{
- ProtoBroadcastAck((HCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
+ ProtoBroadcastAck((MCONTACT)info, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)Translate("The dcc chat connection is not active"));
}
void __cdecl CIrcProto::AckMessageSuccess(void *info)
@@ -805,7 +805,7 @@ void __cdecl CIrcProto::AckMessageSuccess(void *info) delete param;
}
-int __cdecl CIrcProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CIrcProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
BYTE bDcc = getByte(hContact, "DCC", 0);
WORD wStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -846,7 +846,7 @@ int __cdecl CIrcProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc) ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CIrcProto::SendUrl(HCONTACT, int, const char*)
+int __cdecl CIrcProto::SendUrl(MCONTACT, int, const char*)
{
return 1;
}
@@ -854,7 +854,7 @@ int __cdecl CIrcProto::SendUrl(HCONTACT, int, const char*) ////////////////////////////////////////////////////////////////////////////////////////
// SetApparentMode - sets the visibility status
-int __cdecl CIrcProto::SetApparentMode(HCONTACT, int)
+int __cdecl CIrcProto::SetApparentMode(MCONTACT, int)
{
return 0;
}
@@ -936,7 +936,7 @@ int CIrcProto::SetStatusInternal(int iNewStatus, bool bIsInternal) ////////////////////////////////////////////////////////////////////////////////////////
// GetAwayMsg - returns a contact's away message
-HANDLE __cdecl CIrcProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CIrcProto::GetAwayMsg(MCONTACT hContact)
{
WhoisAwayReply = _T("");
DBVARIANT dbv;
@@ -963,7 +963,7 @@ HANDLE __cdecl CIrcProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CIrcProto::RecvAwayMsg(HCONTACT, int, PROTORECVEVENT*)
+int __cdecl CIrcProto::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*)
{
return 1;
}
@@ -998,7 +998,7 @@ int __cdecl CIrcProto::SetAwayMsg(int status, const TCHAR* msg) /////////////////////////////////////////////////////////////////////////////////////////
// UserIsTyping - sends a UTN notification
-int __cdecl CIrcProto::UserIsTyping(HCONTACT, int)
+int __cdecl CIrcProto::UserIsTyping(MCONTACT, int)
{
return 0;
}
diff --git a/protocols/IRCG/src/services.cpp b/protocols/IRCG/src/services.cpp index 8e82c02da0..647ece9070 100644 --- a/protocols/IRCG/src/services.cpp +++ b/protocols/IRCG/src/services.cpp @@ -90,7 +90,7 @@ void CIrcProto::InitMainMenus(void) static HGENMENU hUMenuChanSettings, hUMenuWhois, hUMenuDisconnect, hUMenuIgnore;
static HANDLE hMenuChanSettings, hMenuWhois, hMenuDisconnect, hMenuIgnore;
-static CIrcProto* IrcGetInstanceByHContact(HCONTACT hContact)
+static CIrcProto* IrcGetInstanceByHContact(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -105,25 +105,25 @@ static CIrcProto* IrcGetInstanceByHContact(HCONTACT hContact) static INT_PTR IrcMenuChanSettings(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnMenuChanSettings(wParam, lParam) : 0;
}
static INT_PTR IrcMenuWhois(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnMenuWhois(wParam, lParam) : 0;
}
static INT_PTR IrcMenuDisconnect(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnMenuDisconnect(wParam, lParam) : 0;
}
static INT_PTR IrcMenuIgnore(WPARAM wParam, LPARAM lParam)
{
- CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnMenuIgnore(wParam, lParam) : 0;
}
@@ -134,7 +134,7 @@ int IrcPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(hUMenuDisconnect, false);
Menu_ShowItem(hUMenuIgnore, false);
- CIrcProto *ppro = IrcGetInstanceByHContact((HCONTACT)wParam);
+ CIrcProto *ppro = IrcGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnMenuPreBuild(wParam, lParam) : 0;
}
@@ -213,7 +213,7 @@ INT_PTR __cdecl CIrcProto::OnDoubleclicked(WPARAM, LPARAM lParam) int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wp;
+ MCONTACT hContact = (MCONTACT)wp;
if (!hContact)
return 0;
@@ -233,9 +233,9 @@ int __cdecl CIrcProto::OnContactDeleted(WPARAM wp, LPARAM) PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
}
else {
- BYTE bDCC = getByte((HCONTACT)wp, "DCC", 0);
+ BYTE bDCC = getByte((MCONTACT)wp, "DCC", 0);
if (bDCC) {
- CDccSession* dcc = FindDCCSession((HCONTACT)wp);
+ CDccSession* dcc = FindDCCSession((MCONTACT)wp);
if (dcc)
dcc->Disconnect();
}
@@ -252,8 +252,8 @@ INT_PTR __cdecl CIrcProto::OnJoinChat(WPARAM wp, LPARAM) return 0;
DBVARIANT dbv;
- if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
- if (getByte((HCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM)
+ if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
+ if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM)
PostIrcMessage(_T("/JOIN %s"), dbv.ptszVal);
db_free(&dbv);
}
@@ -266,8 +266,8 @@ INT_PTR __cdecl CIrcProto::OnLeaveChat(WPARAM wp, LPARAM) return 0;
DBVARIANT dbv;
- if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
- if (getByte((HCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) {
+ if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
+ if (getByte((MCONTACT)wp, "ChatRoom", 0) == GCW_CHATROOM) {
PostIrcMessage(_T("/PART %s %s"), dbv.ptszVal, m_userInfo);
CMString S = MakeWndID(dbv.ptszVal);
@@ -285,7 +285,7 @@ INT_PTR __cdecl CIrcProto::OnMenuChanSettings(WPARAM wp, LPARAM) if (!wp)
return 0;
- HCONTACT hContact = (HCONTACT)wp;
+ MCONTACT hContact = (MCONTACT)wp;
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
PostIrcMessageWnd(dbv.ptszVal, NULL, _T("/CHANNELMANAGER"));
@@ -301,7 +301,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM) DBVARIANT dbv;
- if (!getTString((HCONTACT)wp, "Nick", &dbv)) {
+ if (!getTString((MCONTACT)wp, "Nick", &dbv)) {
PostIrcMessage(_T("/WHOIS %s %s"), dbv.ptszVal, dbv.ptszVal);
db_free(&dbv);
}
@@ -310,7 +310,7 @@ INT_PTR __cdecl CIrcProto::OnMenuWhois(WPARAM wp, LPARAM) INT_PTR __cdecl CIrcProto::OnMenuDisconnect(WPARAM wp, LPARAM)
{
- CDccSession* dcc = FindDCCSession((HCONTACT)wp);
+ CDccSession* dcc = FindDCCSession((MCONTACT)wp);
if (dcc)
dcc->Disconnect();
return 0;
@@ -321,7 +321,7 @@ INT_PTR __cdecl CIrcProto::OnMenuIgnore(WPARAM wp, LPARAM) if (!wp)
return 0;
- HCONTACT hContact = (HCONTACT)wp;
+ MCONTACT hContact = (MCONTACT)wp;
DBVARIANT dbv;
if (!getTString(hContact, "Nick", &dbv)) {
if (!isChatRoom(hContact)) {
@@ -865,7 +865,7 @@ int __cdecl CIrcProto::GCMenuHook(WPARAM, LPARAM lParam) if (gcmi->Type == MENU_ON_NICKLIST) {
CONTACT user = { (TCHAR*)gcmi->pszUID, NULL, NULL, false, false, false };
- HCONTACT hContact = CList_FindContact(&user);
+ MCONTACT hContact = CList_FindContact(&user);
gcmi->nItems = SIZEOF(nickItems);
gcmi->Item = nickItems;
@@ -934,7 +934,7 @@ int __cdecl CIrcProto::OnPreShutdown(WPARAM, LPARAM) int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -978,7 +978,7 @@ int __cdecl CIrcProto::OnMenuPreBuild(WPARAM wParam, LPARAM) int __cdecl CIrcProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL || !IsConnected())
return 0;
diff --git a/protocols/IRCG/src/ui_utils.cpp b/protocols/IRCG/src/ui_utils.cpp index a62a7fbc5d..feb85074f1 100644 --- a/protocols/IRCG/src/ui_utils.cpp +++ b/protocols/IRCG/src/ui_utils.cpp @@ -629,7 +629,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh) return FALSE;
}
-void CCtrlClc::AddContact(HCONTACT hContact)
+void CCtrlClc::AddContact(MCONTACT hContact)
{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
}
@@ -661,7 +661,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags) { SendMessage(m_hwnd, CLM_EXPAND, (WPARAM)hItem, flags);
}
-HANDLE CCtrlClc::FindContact(HCONTACT hContact)
+HANDLE CCtrlClc::FindContact(MCONTACT hContact)
{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
}
diff --git a/protocols/IRCG/src/ui_utils.h b/protocols/IRCG/src/ui_utils.h index c42ea6a668..ef70439f61 100644 --- a/protocols/IRCG/src/ui_utils.h +++ b/protocols/IRCG/src/ui_utils.h @@ -409,7 +409,7 @@ class CCtrlClc: public CCtrlBase public:
CCtrlClc( CDlgBase* dlg, int ctrlId );
- void AddContact(HCONTACT hContact);
+ void AddContact(MCONTACT hContact);
void AddGroup(HANDLE hGroup);
void AutoRebuild();
void DeleteItem(HANDLE hItem);
@@ -417,7 +417,7 @@ public: void EndEditLabel(bool save);
void EnsureVisible(HANDLE hItem, bool partialOk);
void Expand(HANDLE hItem, DWORD flags);
- HANDLE FindContact(HCONTACT hContact);
+ HANDLE FindContact(MCONTACT hContact);
HANDLE FindGroup(HANDLE hGroup);
COLORREF GetBkColor();
bool GetCheck(HANDLE hItem);
diff --git a/protocols/IRCG/src/userinfo.cpp b/protocols/IRCG/src/userinfo.cpp index dc4a5c8b14..246e6be8e1 100644 --- a/protocols/IRCG/src/userinfo.cpp +++ b/protocols/IRCG/src/userinfo.cpp @@ -26,13 +26,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct UserDetailsDlgProcParam
{
- UserDetailsDlgProcParam(CIrcProto* _pro, HCONTACT _info) :
+ UserDetailsDlgProcParam(CIrcProto* _pro, MCONTACT _info) :
ppro(_pro),
hContact(_info)
{}
CIrcProto *ppro;
- HCONTACT hContact;
+ MCONTACT hContact;
};
#define STR_BASIC LPGEN("Faster! Searches the network for an exact match of the nickname only. The hostmask is optional and provides further security if used. Wildcards (? and *) are allowed.")
@@ -45,7 +45,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM UserDetailsDlgProcParam *p = (UserDetailsDlgProcParam*)GetWindowLongPtr(m_hwnd, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
- p = new UserDetailsDlgProcParam(NULL, (HCONTACT)lParam);
+ p = new UserDetailsDlgProcParam(NULL, (MCONTACT)lParam);
SetWindowLongPtr(m_hwnd, GWLP_USERDATA, (LPARAM)p);
break;
@@ -188,7 +188,7 @@ INT_PTR CALLBACK UserDetailsDlgProc(HWND m_hwnd, UINT msg, WPARAM wParam, LPARAM int __cdecl CIrcProto::OnInitUserInfo(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
char *szProto = GetContactProto(hContact);
if (!hContact || !szProto || lstrcmpiA(szProto, m_szModuleName))
return 0;
diff --git a/protocols/IcqOscarJ/src/UI/askauthentication.cpp b/protocols/IcqOscarJ/src/UI/askauthentication.cpp index 76e290f704..91fe8e75d2 100644 --- a/protocols/IcqOscarJ/src/UI/askauthentication.cpp +++ b/protocols/IcqOscarJ/src/UI/askauthentication.cpp @@ -32,7 +32,7 @@ struct AskAuthParam
{
CIcqProto* ppro;
- HCONTACT hContact;
+ MCONTACT hContact;
};
static INT_PTR CALLBACK AskAuthProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
@@ -90,7 +90,7 @@ static INT_PTR CALLBACK AskAuthProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA INT_PTR CIcqProto::RequestAuthorization(WPARAM wParam, LPARAM lParam)
{
- AskAuthParam param = { this, (HCONTACT)wParam };
+ AskAuthParam param = { this, (MCONTACT)wParam };
DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_ASKAUTH), NULL, AskAuthProc, (LPARAM)¶m);
return 0;
}
diff --git a/protocols/IcqOscarJ/src/UI/userinfotab.cpp b/protocols/IcqOscarJ/src/UI/userinfotab.cpp index 1c0bcb67f4..793aa0d04d 100644 --- a/protocols/IcqOscarJ/src/UI/userinfotab.cpp +++ b/protocols/IcqOscarJ/src/UI/userinfotab.cpp @@ -41,7 +41,7 @@ extern const char *nameXStatus[]; /////////////////////////////////////////////////////////////////////////////////////////
-static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, HCONTACT hContact, char* szModule, char* szSetting, int special)
+static void SetValue(CIcqProto* ppro, HWND hwndDlg, int idCtrl, MCONTACT hContact, char* szModule, char* szSetting, int special)
{
DBVARIANT dbv = {0};
char str[MAX_PATH];
@@ -221,7 +221,7 @@ static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM break;
char* szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL)
szProto = ppro->m_szModuleName;
@@ -284,7 +284,7 @@ static INT_PTR CALLBACK IcqDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM int CIcqProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if ((!IsICQContact((HCONTACT)lParam)) && lParam)
+ if ((!IsICQContact((MCONTACT)lParam)) && lParam)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/protocols/IcqOscarJ/src/capabilities.cpp b/protocols/IcqOscarJ/src/capabilities.cpp index 91e464b561..8a61dc9f44 100644 --- a/protocols/IcqOscarJ/src/capabilities.cpp +++ b/protocols/IcqOscarJ/src/capabilities.cpp @@ -102,14 +102,14 @@ void NetLog_CapabilityChange(CIcqProto *ppro, const char *szChange, DWORD fdwCap // Deletes all oscar capabilities for a given contact
-void CIcqProto::ClearAllContactCapabilities(HCONTACT hContact)
+void CIcqProto::ClearAllContactCapabilities(MCONTACT hContact)
{
setDword(hContact, DBSETTING_CAPABILITIES, 0);
}
// Deletes one or many oscar capabilities for a given contact
-void CIcqProto::ClearContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities)
+void CIcqProto::ClearContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities)
{
// Get current capability flags
DWORD fdwContactCaps = getDword(hContact, DBSETTING_CAPABILITIES, 0);
@@ -129,7 +129,7 @@ void CIcqProto::ClearContactCapabilities(HCONTACT hContact, DWORD fdwCapabilitie // Sets one or many oscar capabilities for a given contact
-void CIcqProto::SetContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities)
+void CIcqProto::SetContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities)
{
// Get current capability flags
DWORD fdwContactCaps = getDword(hContact, DBSETTING_CAPABILITIES, 0);
@@ -149,7 +149,7 @@ void CIcqProto::SetContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities) // Returns true if the given contact supports the requested capabilites
-BOOL CIcqProto::CheckContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities)
+BOOL CIcqProto::CheckContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities)
{
// Get current capability flags
DWORD fdwContactCaps = getDword(hContact, DBSETTING_CAPABILITIES, 0);
@@ -218,7 +218,7 @@ DWORD GetCapabilitiesFromBuffer(BYTE *pBuffer, int nLength) // Scans a binary buffer for oscar capabilities and adds them to the contact.
// You probably want to call ClearAllContactCapabilities() first.
-void CIcqProto::AddCapabilitiesFromBuffer(HCONTACT hContact, BYTE *pBuffer, int nLength)
+void CIcqProto::AddCapabilitiesFromBuffer(MCONTACT hContact, BYTE *pBuffer, int nLength)
{
// Get current capability flags
DWORD fdwContactCaps = getDword(hContact, DBSETTING_CAPABILITIES, 0);
@@ -241,7 +241,7 @@ void CIcqProto::AddCapabilitiesFromBuffer(HCONTACT hContact, BYTE *pBuffer, int // Scans a binary buffer for oscar capabilities and adds them to the contact.
// You probably want to call ClearAllContactCapabilities() first.
-void CIcqProto::SetCapabilitiesFromBuffer(HCONTACT hContact, BYTE *pBuffer, int nLength, BOOL bReset)
+void CIcqProto::SetCapabilitiesFromBuffer(MCONTACT hContact, BYTE *pBuffer, int nLength, BOOL bReset)
{
// Get current capability flags
DWORD fdwContactCaps = bReset ? 0 : getDword(hContact, DBSETTING_CAPABILITIES, 0);
diff --git a/protocols/IcqOscarJ/src/cookies.cpp b/protocols/IcqOscarJ/src/cookies.cpp index f5e7999a77..1419a8f398 100644 --- a/protocols/IcqOscarJ/src/cookies.cpp +++ b/protocols/IcqOscarJ/src/cookies.cpp @@ -50,7 +50,7 @@ void CIcqProto::RemoveExpiredCookies() // Generate and allocate cookie
-DWORD CIcqProto::AllocateCookie(BYTE bType, WORD wIdent, HCONTACT hContact, void *pvExtra)
+DWORD CIcqProto::AllocateCookie(BYTE bType, WORD wIdent, MCONTACT hContact, void *pvExtra)
{
icq_lock l(cookieMutex);
@@ -96,7 +96,7 @@ int CIcqProto::GetCookieType(DWORD dwCookie) }
-int CIcqProto::FindCookie(DWORD dwCookie, HCONTACT *phContact, void **ppvExtra)
+int CIcqProto::FindCookie(DWORD dwCookie, MCONTACT *phContact, void **ppvExtra)
{
icq_lock l(cookieMutex);
@@ -115,7 +115,7 @@ int CIcqProto::FindCookie(DWORD dwCookie, HCONTACT *phContact, void **ppvExtra) }
-int CIcqProto::FindCookieByData(void *pvExtra, DWORD *pdwCookie, HCONTACT *phContact)
+int CIcqProto::FindCookieByData(void *pvExtra, DWORD *pdwCookie, MCONTACT *phContact)
{
icq_lock l(cookieMutex);
@@ -137,7 +137,7 @@ int CIcqProto::FindCookieByData(void *pvExtra, DWORD *pdwCookie, HCONTACT *phCon }
-int CIcqProto::FindCookieByType(BYTE bType, DWORD *pdwCookie, HCONTACT *phContact, void** ppvExtra)
+int CIcqProto::FindCookieByType(BYTE bType, DWORD *pdwCookie, MCONTACT *phContact, void** ppvExtra)
{
icq_lock l(cookieMutex);
@@ -161,7 +161,7 @@ int CIcqProto::FindCookieByType(BYTE bType, DWORD *pdwCookie, HCONTACT *phContac }
-int CIcqProto::FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCookie, HCONTACT *phContact, cookie_message_data **ppvExtra)
+int CIcqProto::FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCookie, MCONTACT *phContact, cookie_message_data **ppvExtra)
{
icq_lock l(cookieMutex);
@@ -277,7 +277,7 @@ cookie_message_data* CIcqProto::CreateMessageCookie(WORD bMsgType, BYTE bAckType }
-cookie_message_data* CIcqProto::CreateMessageCookieData(BYTE bMsgType, HCONTACT hContact, DWORD dwUin, int bUseSrvRelay)
+cookie_message_data* CIcqProto::CreateMessageCookieData(BYTE bMsgType, MCONTACT hContact, DWORD dwUin, int bUseSrvRelay)
{
BYTE bAckType;
WORD wStatus = getContactStatus(hContact);
diff --git a/protocols/IcqOscarJ/src/cookies.h b/protocols/IcqOscarJ/src/cookies.h index a6017d174c..a16f32b837 100644 --- a/protocols/IcqOscarJ/src/cookies.h +++ b/protocols/IcqOscarJ/src/cookies.h @@ -49,7 +49,7 @@ struct CIcqProto; struct icq_cookie_info
{
DWORD dwCookie;
- HCONTACT hContact;
+ MCONTACT hContact;
void *pvExtra;
time_t dwTime;
BYTE bType;
@@ -114,7 +114,7 @@ struct cookie_search struct cookie_avatar
{
DWORD dwUin;
- HCONTACT hContact;
+ MCONTACT hContact;
unsigned int hashlen;
BYTE *hash;
unsigned int cbData;
@@ -124,7 +124,7 @@ struct cookie_avatar struct cookie_reverse_connect: public cookie_message_data
{
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwUin;
int type;
void *ft;
diff --git a/protocols/IcqOscarJ/src/directpackets.cpp b/protocols/IcqOscarJ/src/directpackets.cpp index fa42c76c7b..32a5186511 100644 --- a/protocols/IcqOscarJ/src/directpackets.cpp +++ b/protocols/IcqOscarJ/src/directpackets.cpp @@ -75,7 +75,7 @@ void CIcqProto::icq_sendDirectMsgAck(directconnect* dc, WORD wCookie, BYTE bMsgT }
-DWORD CIcqProto::icq_sendGetAwayMsgDirect(HCONTACT hContact, int type)
+DWORD CIcqProto::icq_sendGetAwayMsgDirect(MCONTACT hContact, int type)
{
icq_packet packet;
DWORD dwCookie;
@@ -123,7 +123,7 @@ void CIcqProto::icq_sendAwayMsgReplyDirect(directconnect* dc, WORD wCookie, BYTE }
-void CIcqProto::icq_sendFileAcceptDirect(HCONTACT hContact, filetransfer* ft)
+void CIcqProto::icq_sendFileAcceptDirect(MCONTACT hContact, filetransfer* ft)
{
// v7 packet
icq_packet packet;
@@ -144,7 +144,7 @@ void CIcqProto::icq_sendFileAcceptDirect(HCONTACT hContact, filetransfer* ft) }
-void CIcqProto::icq_sendFileDenyDirect(HCONTACT hContact, filetransfer *ft, const char *szReason)
+void CIcqProto::icq_sendFileDenyDirect(MCONTACT hContact, filetransfer *ft, const char *szReason)
{
// v7 packet
icq_packet packet;
@@ -233,7 +233,7 @@ int CIcqProto::icq_sendFileSendDirectv8(filetransfer *ft, const char *pszFiles) }
-DWORD CIcqProto::icq_SendDirectMessage(HCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap)
+DWORD CIcqProto::icq_SendDirectMessage(MCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap)
{
icq_packet packet;
DWORD dwCookie = AllocateCookie(CKT_MESSAGE, 0, hContact, (void*)pCookieData);
@@ -257,7 +257,7 @@ DWORD CIcqProto::icq_SendDirectMessage(HCONTACT hContact, const char *szMessage, return 0; // Failure
}
-void CIcqProto::icq_sendXtrazRequestDirect(HCONTACT hContact, DWORD dwCookie, char* szBody, int nBodyLen, WORD wType)
+void CIcqProto::icq_sendXtrazRequestDirect(MCONTACT hContact, DWORD dwCookie, char* szBody, int nBodyLen, WORD wType)
{
icq_packet packet;
@@ -272,7 +272,7 @@ void CIcqProto::icq_sendXtrazRequestDirect(HCONTACT hContact, DWORD dwCookie, ch SendDirectMessage(hContact, &packet);
}
-void CIcqProto::icq_sendXtrazResponseDirect(HCONTACT hContact, WORD wCookie, char* szBody, int nBodyLen, WORD wType)
+void CIcqProto::icq_sendXtrazResponseDirect(MCONTACT hContact, WORD wCookie, char* szBody, int nBodyLen, WORD wType)
{
icq_packet packet;
diff --git a/protocols/IcqOscarJ/src/fam_01service.cpp b/protocols/IcqOscarJ/src/fam_01service.cpp index a2f5ec6ac4..0e18163289 100644 --- a/protocols/IcqOscarJ/src/fam_01service.cpp +++ b/protocols/IcqOscarJ/src/fam_01service.cpp @@ -528,10 +528,10 @@ void CIcqProto::handleServiceFam(BYTE *pBuffer, WORD wBufferLength, snac_header }
-char* CIcqProto::buildUinList(int subtype, WORD wMaxLen, HCONTACT *hContactResume)
+char* CIcqProto::buildUinList(int subtype, WORD wMaxLen, MCONTACT *hContactResume)
{
char* szList;
- HCONTACT hContact;
+ MCONTACT hContact;
WORD wCurrentLen = 0;
DWORD dwUIN;
uid_str szUID;
@@ -611,7 +611,7 @@ char* CIcqProto::buildUinList(int subtype, WORD wMaxLen, HCONTACT *hContactResum void CIcqProto::sendEntireListServ(WORD wFamily, WORD wSubtype, int listType)
{
- HCONTACT hResumeContact = NULL;
+ MCONTACT hResumeContact = NULL;
do
{ // server doesn't seem to be able to cope with packets larger than 8k
diff --git a/protocols/IcqOscarJ/src/fam_02location.cpp b/protocols/IcqOscarJ/src/fam_02location.cpp index af5d7a0fb7..65459c516a 100644 --- a/protocols/IcqOscarJ/src/fam_02location.cpp +++ b/protocols/IcqOscarJ/src/fam_02location.cpp @@ -47,7 +47,7 @@ void CIcqProto::handleLocationFam(BYTE *pBuffer, WORD wBufferLength, snac_header case ICQ_ERROR:
{
WORD wError;
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
cookie_fam15_data *pCookieData;
@@ -124,17 +124,17 @@ void CIcqProto::handleLocationUserInfoReply(BYTE* buf, WORD wLen, DWORD dwCookie wLen -= 2;
// Determine contact
- HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
// Ignore away status if the user is not already on our list
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
#ifdef _DEBUG
debugLogA("Ignoring away reply (%s)", strUID(dwUIN, szUID));
#endif
return;
}
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
if (!FindCookie(dwCookie, &hCookieContact, (void**)&pCookieData)) {
debugLogA("Error: Received unexpected away reply from %s", strUID(dwUIN, szUID));
return;
diff --git a/protocols/IcqOscarJ/src/fam_03buddy.cpp b/protocols/IcqOscarJ/src/fam_03buddy.cpp index 9b1f01444c..c3c8098b98 100644 --- a/protocols/IcqOscarJ/src/fam_03buddy.cpp +++ b/protocols/IcqOscarJ/src/fam_03buddy.cpp @@ -196,8 +196,8 @@ void CIcqProto::handleUserOnline(BYTE *buf, WORD wLen, serverthread_info *info) wLen -= 2;
// Ignore status notification if the user is not already on our list
- HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
+ if (hContact == INVALID_CONTACT_ID)
{
#ifdef _DEBUG
debugLogA("Ignoring user online (%s)", strUID(dwUIN, szUID));
@@ -618,10 +618,10 @@ void CIcqProto::handleUserOffline(BYTE *buf, WORD wLen) }
// Determine contact
- HCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUIN, szUID, NULL);
// Skip contacts that are not already on our list or are already offline
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
WORD wOldStatus = getContactStatus(hContact);
@@ -666,7 +666,7 @@ void CIcqProto::handleUserOffline(BYTE *buf, WORD wLen) }
-void CIcqProto::parseStatusNote(DWORD dwUin, char *szUid, HCONTACT hContact, oscar_tlv_chain *pChain)
+void CIcqProto::parseStatusNote(DWORD dwUin, char *szUid, MCONTACT hContact, oscar_tlv_chain *pChain)
{
DWORD dwStatusNoteTS = time(NULL);
BYTE *pStatusNoteTS, *pStatusNote;
diff --git a/protocols/IcqOscarJ/src/fam_04message.cpp b/protocols/IcqOscarJ/src/fam_04message.cpp index be7d453e55..b9c227d10b 100644 --- a/protocols/IcqOscarJ/src/fam_04message.cpp +++ b/protocols/IcqOscarJ/src/fam_04message.cpp @@ -200,7 +200,7 @@ void CIcqProto::handleRecvServMsg(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef }
-char* CIcqProto::convertMsgToUserSpecificUtf(HCONTACT hContact, const char *szMsg)
+char* CIcqProto::convertMsgToUserSpecificUtf(MCONTACT hContact, const char *szMsg)
{
WORD wCP = getWord(hContact, "CodePage", m_wAnsiCodepage);
char *usMsg = NULL;
@@ -268,7 +268,7 @@ void CIcqProto::handleRecvServMsgType1(BYTE *buf, WORD wLen, DWORD dwUin, char * PROTORECVEVENT pre = {0};
int bAdded;
- HCONTACT hContact = HContactFromUID(dwUin, szUID, &bAdded);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, &bAdded);
while (pMessageTLV = pChain->getTLV(0x0101, wMsgPart))
{ // Loop thru all message parts
@@ -468,7 +468,7 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char * if (CompareGUIDs(q1,q2,q3,q4, MCAP_SRV_RELAY_FMT))
{ // we surely have at least 4 bytes for TLV chain
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (wCommand == 1)
{
@@ -504,7 +504,7 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char * WORD wAckType = chain->getWord(0x0A, 1);
// Update the saved DC info (if contact already exists)
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
DWORD dwIP, dwExternalIP;
WORD wPort;
@@ -575,8 +575,8 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char * unpackLEDWord(&buf, &dwUin);
- HCONTACT hContact = HContactFromUIN(dwUin, NULL);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromUIN(dwUin, NULL);
+ if (hContact == INVALID_CONTACT_ID)
{
debugLogA("Error: %s from unknown contact %u", "Reverse Connect Request", dwUin);
}
@@ -648,7 +648,7 @@ void CIcqProto::handleRecvServMsgType2(BYTE *buf, WORD wLen, DWORD dwUin, char * }
-void CIcqProto::parseServRelayData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType)
+void CIcqProto::parseServRelayData(BYTE *pDataBuf, WORD wLen, MCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType)
{
WORD wId;
@@ -677,7 +677,7 @@ void CIcqProto::parseServRelayData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, unpackLEWord(&pDataBuf, &wVersion);
wLen -= 2;
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
setWord(hContact, "Version", wVersion);
unpackDWord(&pDataBuf, &dwGuid1); // plugin type GUID
@@ -886,7 +886,7 @@ void CIcqProto::parseServRelayData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, }
-void CIcqProto::parseServRelayPluginData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType, BYTE bFlags, WORD wStatus, WORD wCookie, WORD wVersion)
+void CIcqProto::parseServRelayPluginData(BYTE *pDataBuf, WORD wLen, MCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType, BYTE bFlags, WORD wStatus, WORD wCookie, WORD wVersion)
{
int nTypeId;
WORD wFunction;
@@ -1020,7 +1020,7 @@ void CIcqProto::parseServRelayPluginData(BYTE *pDataBuf, WORD wLen, HCONTACT hCo void CIcqProto::handleRecvServMsgContacts(BYTE *buf, WORD wLen, DWORD dwUin, char *szUID, DWORD dwID1, DWORD dwID2, WORD wCommand)
{
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (wCommand == 0)
{ // received contacts
@@ -1231,7 +1231,7 @@ void CIcqProto::handleRecvServMsgContacts(BYTE *buf, WORD wLen, DWORD dwUin, cha else if (wCommand == 2)
{ // acknowledgement
DWORD dwCookie;
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
if (FindMessageCookie(dwID1, dwID2, &dwCookie, &hCookieContact, NULL)) {
if (hCookieContact != hContact)
debugLogA("Warning: Ack Contact does not match Cookie Contact(0x%x != 0x%x)", hContact, hCookieContact);
@@ -1619,9 +1619,9 @@ void packPluginTypeId(icq_packet *packet, int nTypeID) }
-void CIcqProto::handleStatusMsgReply(const char *szPrefix, HCONTACT hContact, DWORD dwUin, WORD wVersion, int bMsgType, WORD wCookie, const char *szMsg, int nMsgFlags)
+void CIcqProto::handleStatusMsgReply(const char *szPrefix, MCONTACT hContact, DWORD dwUin, WORD wVersion, int bMsgType, WORD wCookie, const char *szMsg, int nMsgFlags)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
debugLogA("%sIgnoring status message from unknown contact %u", szPrefix, dwUin);
return;
}
@@ -1649,10 +1649,10 @@ HANDLE CIcqProto::handleMessageAck(DWORD dwUin, char *szUID, WORD wCookie, WORD {
if (bFlags == 3)
{
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
cookie_message_data *pCookieData = NULL;
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (!FindCookie(wCookie, &hCookieContact, (void**)&pCookieData))
{
@@ -1684,7 +1684,7 @@ HANDLE CIcqProto::handleMessageAck(DWORD dwUin, char *szUID, WORD wCookie, WORD /* this function send all acks from handleMessageTypes */
-void CIcqProto::sendMessageTypesAck(HCONTACT hContact, int bUnicode, message_ack_params *pArgs)
+void CIcqProto::sendMessageTypesAck(MCONTACT hContact, int bUnicode, message_ack_params *pArgs)
{
if (pArgs)
{
@@ -1709,7 +1709,7 @@ void CIcqProto::sendMessageTypesAck(HCONTACT hContact, int bUnicode, message_ack /* pMsg points to the beginning of the message */
void CIcqProto::handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp, DWORD dwMsgID, DWORD dwMsgID2, WORD wCookie, WORD wVersion, int type, int flags, WORD wAckType, DWORD dwDataLen, WORD wMsgLen, char *pMsg, int nMsgFlags, message_ack_params *pAckParams)
{
- HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hContact = INVALID_CONTACT_ID;
BOOL bThruDC = (nMsgFlags & MTF_DIRECT) == MTF_DIRECT;
int bAdded;
@@ -2205,12 +2205,12 @@ void CIcqProto::handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD d if (!unpackUID(&buf, &wLen, &dwUin, &szUid)) return;
- HCONTACT hContact = HContactFromUID(dwUin, szUid, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUid, NULL);
buf += 2; // 3. unknown
wLen -= 2;
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
if (!FindMessageCookie(dwMsgID1, dwMsgID2, &dwCookie, &hCookieContact, &pCookieData)) {
debugLogA("SNAC(4.B) Received an ack that I did not ask for from (%u)", dwUin);
return;
@@ -2307,7 +2307,7 @@ void CIcqProto::handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD d // An ack of some kind
int ackType;
- if (hContact == NULL || hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == NULL || hContact == INVALID_CONTACT_ID) {
debugLogA("SNAC(4.B) Message from unknown contact (%u)", dwUin);
ReleaseCookie(dwCookie); // This could be a bad idea, but I think it is safe
return;
@@ -2522,7 +2522,7 @@ void CIcqProto::handleRecvServMsgError(BYTE *buf, WORD wLen, WORD wFlags, DWORD {
WORD wError;
char *pszErrorMessage;
- HCONTACT hContact;
+ MCONTACT hContact;
cookie_message_data *pCookieData = NULL;
int nMessageType;
@@ -2690,7 +2690,7 @@ void CIcqProto::handleServerAck(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwSeque // Sender
if (!unpackUID(&buf, &wLen, &dwUin, &szUID)) return;
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (FindCookie((WORD)dwSequence, NULL, (void**)&pCookieData))
{
@@ -2698,7 +2698,7 @@ void CIcqProto::handleServerAck(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwSeque // server ack should be ignored here.
if (pCookieData && (pCookieData->nAckType == ACKTYPE_SERVER))
{
- if ((hContact != NULL) && (hContact != (HCONTACT)INVALID_HANDLE_VALUE))
+ if ((hContact != NULL) && (hContact != INVALID_CONTACT_ID))
{
int ackType;
int ackRes = ACKRESULT_SUCCESS;
@@ -2889,9 +2889,9 @@ void CIcqProto::handleTypingNotification(BYTE *buf, WORD wLen, WORD wFlags, DWOR // Sender
if (!unpackUID(&buf, &wLen, &dwUin, &szUid)) return;
- HCONTACT hContact = HContactFromUID(dwUin, szUid, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUid, NULL);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) return;
+ if (hContact == INVALID_CONTACT_ID) return;
// Typing notification code
unpackWord(&buf, &wNotification);
@@ -2934,7 +2934,7 @@ void CIcqProto::handleTypingNotification(BYTE *buf, WORD wLen, WORD wFlags, DWOR }
-void CIcqProto::sendTypingNotification(HCONTACT hContact, WORD wMTNCode)
+void CIcqProto::sendTypingNotification(MCONTACT hContact, WORD wMTNCode)
{
_ASSERTE((wMTNCode == MTN_FINISHED) || (wMTNCode == MTN_TYPED) || (wMTNCode == MTN_BEGUN) || (wMTNCode == MTN_WINDOW_CLOSED));
diff --git a/protocols/IcqOscarJ/src/fam_09bos.cpp b/protocols/IcqOscarJ/src/fam_09bos.cpp index 203ba13b00..98c0f58126 100644 --- a/protocols/IcqOscarJ/src/fam_09bos.cpp +++ b/protocols/IcqOscarJ/src/fam_09bos.cpp @@ -85,7 +85,7 @@ void CIcqProto::handlePrivacyRightsReply(unsigned char *pBuffer, WORD wBufferLen debugLogA("Warning: Malformed SRV_PRIVACY_RIGHTS_REPLY");
}
-void CIcqProto::makeContactTemporaryVisible(HCONTACT hContact)
+void CIcqProto::makeContactTemporaryVisible(MCONTACT hContact)
{
DWORD dwUin;
uid_str szUid;
diff --git a/protocols/IcqOscarJ/src/fam_13servclist.cpp b/protocols/IcqOscarJ/src/fam_13servclist.cpp index fe15da519c..a0d238cb99 100644 --- a/protocols/IcqOscarJ/src/fam_13servclist.cpp +++ b/protocols/IcqOscarJ/src/fam_13servclist.cpp @@ -772,9 +772,9 @@ void CIcqProto::handleServerCListAck(cookie_servlist_action* sc, WORD wError) }
-HCONTACT CIcqProto::HContactFromRecordName(const char* szRecordName, int *bAdded)
+MCONTACT CIcqProto::HContactFromRecordName(const char* szRecordName, int *bAdded)
{
- HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hContact = INVALID_CONTACT_ID;
if (!IsStringUIN(szRecordName))
{ // probably AIM contact
@@ -904,12 +904,12 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server case SSI_ITEM_BUDDY:
{
/* this is a contact */
- HCONTACT hContact;
+ MCONTACT hContact;
int bAdded;
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
int bRegroup = 0;
int bNicked = 0;
@@ -1172,12 +1172,12 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server /* item on visible list */
/* wItemId not related to contact ID */
/* pszRecordName is the UIN */
- HCONTACT hContact;
+ MCONTACT hContact;
int bAdded;
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
if (bAdded)
{
@@ -1211,12 +1211,12 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server /* Item on invisible list */
/* wItemId not related to contact ID */
/* pszRecordName is the UIN */
- HCONTACT hContact;
+ MCONTACT hContact;
int bAdded;
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
if (bAdded)
{
@@ -1269,12 +1269,12 @@ void CIcqProto::handleServerCListReply(BYTE *buf, WORD wLen, WORD wFlags, server /* item on ignore list */
/* wItemId not related to contact ID */
/* pszRecordName is the UIN */
- HCONTACT hContact;
+ MCONTACT hContact;
int bAdded;
hContact = HContactFromRecordName(szRecordName, &bAdded);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID)
{
if (bAdded)
{
@@ -1471,9 +1471,9 @@ void CIcqProto::handleServerCListItemAdd(const char *szRecordName, WORD wGroupId void CIcqProto::handleServerCListItemUpdate(const char *szRecordName, WORD wGroupId, WORD wItemId, WORD wItemType, oscar_tlv_chain *pItemData)
{
- HCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
+ MCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
+ if (hContact != INVALID_CONTACT_ID && wItemType == SSI_ITEM_BUDDY)
{ // a contact was updated on server
if (pItemData)
{
@@ -1586,9 +1586,9 @@ void CIcqProto::handleServerCListItemUpdate(const char *szRecordName, WORD wGrou void CIcqProto::handleServerCListItemDelete(const char *szRecordName, WORD wGroupId, WORD wItemId, WORD wItemType, oscar_tlv_chain *pItemData)
{
- HCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
+ MCONTACT hContact = (wItemType == SSI_ITEM_BUDDY || wItemType == SSI_ITEM_DENY || wItemType == SSI_ITEM_PERMIT || wItemType == SSI_ITEM_IGNORE) ? HContactFromRecordName(szRecordName, NULL) : NULL;
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && wItemType == SSI_ITEM_BUDDY)
+ if (hContact != INVALID_CONTACT_ID && wItemType == SSI_ITEM_BUDDY)
{ // a contact was removed from our list
if (getWord(hContact, DBSETTING_SERVLIST_ID, 0) == wItemId)
{
@@ -1632,7 +1632,7 @@ void CIcqProto::handleRecvAuthRequest(unsigned char *buf, WORD wLen) if (wReasonLen > wLen)
return;
- HCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
+ MCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
PROTORECVEVENT pre = { 0 };
pre.timestamp = time(NULL);
@@ -1720,7 +1720,7 @@ void CIcqProto::handleRecvAdded(unsigned char *buf, WORD wLen) return;
}
- HCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
+ MCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
cbBlob=sizeof(DWORD)*2+4;
@@ -1782,8 +1782,8 @@ void CIcqProto::handleRecvAuthResponse(unsigned char *buf, WORD wLen) return;
}
- HCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromUID(dwUin, szUid, &bAdded);
+ if (hContact != INVALID_CONTACT_ID)
szNick = NickFromHandle(hContact);
if (wLen > 0)
diff --git a/protocols/IcqOscarJ/src/fam_15icqserver.cpp b/protocols/IcqOscarJ/src/fam_15icqserver.cpp index bedd63885b..b120bc0fb0 100644 --- a/protocols/IcqOscarJ/src/fam_15icqserver.cpp +++ b/protocols/IcqOscarJ/src/fam_15icqserver.cpp @@ -88,7 +88,7 @@ void CIcqProto::handleExtensionError(BYTE *buf, WORD wPackLen) // more sofisticated detection, send ack
if (wSubType == META_REQUEST_FULL_INFO)
{
- HCONTACT hContact;
+ MCONTACT hContact;
cookie_fam15_data *pCookieData = NULL;
int foundCookie = FindCookie(wCookie, &hContact, (void**)&pCookieData);
@@ -578,7 +578,7 @@ UserInfoRecordItem rInterest[] = { };
-int CIcqProto::parseUserInfoRecord(HCONTACT hContact, oscar_tlv *pData, UserInfoRecordItem pRecordDef[], int nRecordDef, int nMaxRecords)
+int CIcqProto::parseUserInfoRecord(MCONTACT hContact, oscar_tlv *pData, UserInfoRecordItem pRecordDef[], int nRecordDef, int nMaxRecords)
{
int nRecords = 0;
@@ -648,7 +648,7 @@ void CIcqProto::handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WOR }
cookie_directory_data *pCookieData;
- HCONTACT hContact;
+ MCONTACT hContact;
// check request cookie
if (!FindCookie(wCookie, &hContact, (void**)&pCookieData) || !pCookieData)
{
@@ -843,7 +843,7 @@ static int calcAgeFromBirthDate(double dDate) }
-void CIcqProto::parseDirectoryUserDetailsData(HCONTACT hContact, oscar_tlv_chain *cDetails, DWORD dwCookie, cookie_directory_data *pCookieData, WORD wReplySubType)
+void CIcqProto::parseDirectoryUserDetailsData(MCONTACT hContact, oscar_tlv_chain *cDetails, DWORD dwCookie, cookie_directory_data *pCookieData, WORD wReplySubType)
{
oscar_tlv *pTLV;
WORD wRecordCount;
@@ -862,7 +862,7 @@ void CIcqProto::parseDirectoryUserDetailsData(HCONTACT hContact, oscar_tlv_chain dwUin = atoi(szUid);
hContact = HContactFromUID(dwUin, szUid, NULL);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
{
debugLogA("Error: Received details for unknown contact \"%s\"", szUid);
SAFE_FREE(&szUid);
@@ -1152,7 +1152,7 @@ void CIcqProto::handleDirectoryUpdateResponse(BYTE *databuf, WORD wPacketLen, WO }
cookie_directory_data *pCookieData;
- HCONTACT hContact;
+ MCONTACT hContact;
// check request cookie
if (!FindCookie(wCookie, &hContact, (void**)&pCookieData) || !pCookieData)
{
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index a8eba258f9..aa3ee36ba9 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -205,7 +205,7 @@ BYTE* calcMD5HashOfFile(const TCHAR *tszFile) }
-int CIcqProto::IsAvatarChanged(HCONTACT hContact, const BYTE *pHash, int nHashLen)
+int CIcqProto::IsAvatarChanged(MCONTACT hContact, const BYTE *pHash, int nHashLen)
{
DBVARIANT dbvSaved = {0};
@@ -451,7 +451,7 @@ void CIcqProto::handleAvatarOwnerHash(WORD wItemID, BYTE bFlags, BYTE *pData, BY // handle Contact's avatar hash
-void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HCONTACT hContact, BYTE *pHash, int nHashLen, WORD wOldStatus)
+void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, MCONTACT hContact, BYTE *pHash, int nHashLen, WORD wOldStatus)
{
int bJob = FALSE;
BOOL avatarInfoPresent = FALSE;
@@ -696,7 +696,7 @@ void CIcqProto::handleAvatarContactHash(DWORD dwUIN, char *szUID, HCONTACT hCont // request avatar data from server
-int CIcqProto::GetAvatarData(HCONTACT hContact, DWORD dwUin, const char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file)
+int CIcqProto::GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file)
{
uid_str szUidData;
char *pszUid = NULL;
@@ -803,7 +803,7 @@ int CIcqProto::GetAvatarData(HCONTACT hContact, DWORD dwUin, const char *szUid, // upload avatar data to server
-int CIcqProto::SetAvatarData(HCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen)
+int CIcqProto::SetAvatarData(MCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen)
{
m_avatarsMutex->Enter();
@@ -958,7 +958,7 @@ void avatars_server_connection::shutdownConnection() Netlib_Shutdown(hConnection);
}
-DWORD avatars_server_connection::sendGetAvatarRequest(HCONTACT hContact, DWORD dwUin, char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file)
+DWORD avatars_server_connection::sendGetAvatarRequest(MCONTACT hContact, DWORD dwUin, char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file)
{
int i;
DWORD dwNow = GetTickCount();
@@ -1055,7 +1055,7 @@ DWORD avatars_server_connection::sendGetAvatarRequest(HCONTACT hContact, DWORD d }
-DWORD avatars_server_connection::sendUploadAvatarRequest(HCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen)
+DWORD avatars_server_connection::sendUploadAvatarRequest(MCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen)
{
cookie_avatar *ack = (cookie_avatar*)SAFE_MALLOC(sizeof(cookie_avatar));
if (!ack) return 0; // Failure: out of memory
diff --git a/protocols/IcqOscarJ/src/icq_avatar.h b/protocols/IcqOscarJ/src/icq_avatar.h index 4323ffda8b..899521929e 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.h +++ b/protocols/IcqOscarJ/src/icq_avatar.h @@ -69,7 +69,7 @@ protected: rates *m_rates;
icq_critical_section *m_ratesMutex;
- HCONTACT runContact[4];
+ MCONTACT runContact[4];
DWORD runTime[4];
int runCount;
void checkRequestQueue();
@@ -85,8 +85,8 @@ public: __inline BOOL isPending() { return !isLoggedIn; };
__inline BOOL isReady() { return isLoggedIn && isActive && !stopThread; };
- DWORD sendGetAvatarRequest(HCONTACT hContact, DWORD dwUin, char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file);
- DWORD sendUploadAvatarRequest(HCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen);
+ DWORD sendGetAvatarRequest(MCONTACT hContact, DWORD dwUin, char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file);
+ DWORD sendUploadAvatarRequest(MCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen);
};
__inline static void SAFE_DELETE(avatars_server_connection **p) { SAFE_DELETE((lockable_struct**)p); };
@@ -95,7 +95,7 @@ __inline static void SAFE_DELETE(avatars_server_connection **p) { SAFE_DELETE((l struct avatars_request : public MZeroedObject
{
int type;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwUin;
uid_str szUid;
BYTE *hash;
diff --git a/protocols/IcqOscarJ/src/icq_clients.cpp b/protocols/IcqOscarJ/src/icq_clients.cpp index 2ea61ae5e2..198bbd2ade 100644 --- a/protocols/IcqOscarJ/src/icq_clients.cpp +++ b/protocols/IcqOscarJ/src/icq_clients.cpp @@ -186,7 +186,7 @@ const char* cliQip = "QIP %s"; const char* cliIM2 = "IM2";
const char* cliSpamBot = "Spam Bot";
-const char* CIcqProto::detectUserClient(HCONTACT hContact, int nIsICQ, WORD wUserClass, DWORD dwOnlineSince, const char *szCurrentClient,
+const char* CIcqProto::detectUserClient(MCONTACT hContact, int nIsICQ, WORD wUserClass, DWORD dwOnlineSince, const char *szCurrentClient,
WORD wVersion, DWORD dwFT1, DWORD dwFT2, DWORD dwFT3, BYTE bDirectFlag, DWORD dwDirectCookie, DWORD dwWebPort, /* ICQ specific */
BYTE *caps, WORD wLen, /* Client capabilities */
BYTE *bClientId, /* Output: detected client-type */
diff --git a/protocols/IcqOscarJ/src/icq_db.cpp b/protocols/IcqOscarJ/src/icq_db.cpp index c54d389a53..f605d7605d 100644 --- a/protocols/IcqOscarJ/src/icq_db.cpp +++ b/protocols/IcqOscarJ/src/icq_db.cpp @@ -29,12 +29,12 @@ // -----------------------------------------------------------------------------
#include "icqoscar.h"
-int CIcqProto::getSetting(HCONTACT hContact, const char *szSetting, DBVARIANT *dbv)
+int CIcqProto::getSetting(MCONTACT hContact, const char *szSetting, DBVARIANT *dbv)
{
return db_get_s(hContact, m_szModuleName, szSetting, dbv, 0);
}
-double CIcqProto::getSettingDouble(HCONTACT hContact, const char *szSetting, double dDef)
+double CIcqProto::getSettingDouble(MCONTACT hContact, const char *szSetting, double dDef)
{
DBVARIANT dbv = {DBVT_DELETED};
double dRes;
@@ -51,12 +51,12 @@ double CIcqProto::getSettingDouble(HCONTACT hContact, const char *szSetting, dou return dRes;
}
-DWORD CIcqProto::getContactUin(HCONTACT hContact)
+DWORD CIcqProto::getContactUin(MCONTACT hContact)
{
return getDword(hContact, UNIQUEIDSETTING, 0);
}
-int CIcqProto::getContactUid(HCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid)
+int CIcqProto::getContactUid(MCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid)
{
DBVARIANT dbv = {DBVT_DELETED};
int iRes = 1;
@@ -82,7 +82,7 @@ int CIcqProto::getContactUid(HCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid) return iRes;
}
-char* CIcqProto::getSettingStringUtf(HCONTACT hContact, const char *szModule, const char *szSetting, char *szDef)
+char* CIcqProto::getSettingStringUtf(MCONTACT hContact, const char *szModule, const char *szSetting, char *szDef)
{
DBVARIANT dbv = {DBVT_DELETED};
if ( db_get_utf(hContact, szModule, szSetting, &dbv)) {
@@ -95,17 +95,17 @@ char* CIcqProto::getSettingStringUtf(HCONTACT hContact, const char *szModule, co return szRes;
}
-char* CIcqProto::getSettingStringUtf(HCONTACT hContact, const char *szSetting, char *szDef)
+char* CIcqProto::getSettingStringUtf(MCONTACT hContact, const char *szSetting, char *szDef)
{
return getSettingStringUtf(hContact, m_szModuleName, szSetting, szDef);
}
-WORD CIcqProto::getContactStatus(HCONTACT hContact)
+WORD CIcqProto::getContactStatus(MCONTACT hContact)
{
return getWord(hContact, "Status", ID_STATUS_OFFLINE);
}
-int CIcqProto::getSettingStringStatic(HCONTACT hContact, const char *szSetting, char *dest, int dest_len)
+int CIcqProto::getSettingStringStatic(MCONTACT hContact, const char *szSetting, char *dest, int dest_len)
{
if (!db_get_static(hContact, m_szModuleName, szSetting, dest, dest_len))
return 0;
@@ -113,17 +113,17 @@ int CIcqProto::getSettingStringStatic(HCONTACT hContact, const char *szSetting, return db_get_static_utf(hContact, m_szModuleName, szSetting, dest, dest_len);
}
-int CIcqProto::setSettingDouble(HCONTACT hContact, const char *szSetting, double dValue)
+int CIcqProto::setSettingDouble(MCONTACT hContact, const char *szSetting, double dValue)
{
return setSettingBlob(hContact, szSetting, (BYTE*)&dValue, sizeof(double));
}
-int CIcqProto::setSettingBlob(HCONTACT hContact, const char *szSetting, const BYTE *pValue, const int cbValue)
+int CIcqProto::setSettingBlob(MCONTACT hContact, const char *szSetting, const BYTE *pValue, const int cbValue)
{
return db_set_blob(hContact, m_szModuleName, szSetting, (void*)pValue, cbValue);
}
-int CIcqProto::setContactHidden(HCONTACT hContact, BYTE bHidden)
+int CIcqProto::setContactHidden(MCONTACT hContact, BYTE bHidden)
{
int nResult = db_set_b(hContact, "CList", "Hidden", bHidden);
if (!bHidden) // clear zero setting
@@ -132,7 +132,7 @@ int CIcqProto::setContactHidden(HCONTACT hContact, BYTE bHidden) return nResult;
}
-void CIcqProto::setStatusMsgVar(HCONTACT hContact, char* szStatusMsg, bool isAnsi)
+void CIcqProto::setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAnsi)
{
if (szStatusMsg && szStatusMsg[0]) {
if (isAnsi) {
@@ -171,14 +171,14 @@ void CIcqProto::setStatusMsgVar(HCONTACT hContact, char* szStatusMsg, bool isAns else db_unset(hContact, "CList", "StatusMsg");
}
-int CIcqProto::IsICQContact(HCONTACT hContact)
+int CIcqProto::IsICQContact(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
return !strcmpnull(szProto, m_szModuleName);
}
-HANDLE CIcqProto::AddEvent(HCONTACT hContact, WORD wType, DWORD dwTime, DWORD flags, DWORD cbBlob, PBYTE pBlob)
+HANDLE CIcqProto::AddEvent(MCONTACT hContact, WORD wType, DWORD dwTime, DWORD flags, DWORD cbBlob, PBYTE pBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
@@ -190,9 +190,9 @@ HANDLE CIcqProto::AddEvent(HCONTACT hContact, WORD wType, DWORD dwTime, DWORD fl return db_event_add(hContact, &dbei);
}
-HCONTACT CIcqProto::FindFirstContact()
+MCONTACT CIcqProto::FindFirstContact()
{
- HCONTACT hContact = db_find_first(m_szModuleName);
+ MCONTACT hContact = db_find_first(m_szModuleName);
if (IsICQContact(hContact))
return hContact;
@@ -200,7 +200,7 @@ HCONTACT CIcqProto::FindFirstContact() return FindNextContact(hContact);
}
-HCONTACT CIcqProto::FindNextContact(HCONTACT hContact)
+MCONTACT CIcqProto::FindNextContact(MCONTACT hContact)
{
hContact = db_find_next(hContact, m_szModuleName);
while (hContact != NULL)
@@ -212,7 +212,7 @@ HCONTACT CIcqProto::FindNextContact(HCONTACT hContact) return hContact;
}
-char* CIcqProto::getContactCListGroup(HCONTACT hContact)
+char* CIcqProto::getContactCListGroup(MCONTACT hContact)
{
return getSettingStringUtf(hContact, "CList", "Group", NULL);
}
diff --git a/protocols/IcqOscarJ/src/icq_direct.cpp b/protocols/IcqOscarJ/src/icq_direct.cpp index 095ad7734e..0369bdd8b9 100644 --- a/protocols/IcqOscarJ/src/icq_direct.cpp +++ b/protocols/IcqOscarJ/src/icq_direct.cpp @@ -34,7 +34,7 @@ struct directthreadstartinfo int type; // Only valid for outgoing connections
int incoming; // 1=incoming, 0=outgoing
HANDLE hConnection; // only valid for incoming connections, handle to the connection
- HCONTACT hContact; // Only valid for outgoing connections
+ MCONTACT hContact; // Only valid for outgoing connections
void* pvExtra; // Only valid for outgoing connections
};
@@ -48,7 +48,7 @@ static char client_check_data[] = { "ICQ Service and Information may\0"
};
-void CIcqProto::CloseContactDirectConns(HCONTACT hContact)
+void CIcqProto::CloseContactDirectConns(MCONTACT hContact)
{
icq_lock l(directConnListMutex);
@@ -116,7 +116,7 @@ int CIcqProto::sendDirectPacket(directconnect* dc, icq_packet* pkt) return nResult;
}
-directthreadstartinfo* CreateDTSI(HCONTACT hContact, HANDLE hConnection, int type)
+directthreadstartinfo* CreateDTSI(MCONTACT hContact, HANDLE hConnection, int type)
{
directthreadstartinfo* dtsi = (directthreadstartinfo*)SAFE_MALLOC(sizeof(directthreadstartinfo));
dtsi->hContact = hContact;
@@ -131,7 +131,7 @@ directthreadstartinfo* CreateDTSI(HCONTACT hContact, HANDLE hConnection, int typ // Check if we have an open and initialized DC with type
// 'type' to the specified contact
-BOOL CIcqProto::IsDirectConnectionOpen(HCONTACT hContact, int type, int bPassive)
+BOOL CIcqProto::IsDirectConnectionOpen(MCONTACT hContact, int type, int bPassive)
{
BOOL bIsOpen = FALSE, bIsCreated = FALSE;
@@ -182,7 +182,7 @@ void icq_newConnectionReceived(HANDLE hNewConnection, DWORD dwRemoteIP, void *pE }
// Opens direct connection of specified type to specified contact
-void CIcqProto::OpenDirectConnection(HCONTACT hContact, int type, void* pvExtra)
+void CIcqProto::OpenDirectConnection(MCONTACT hContact, int type, void* pvExtra)
{
// Create a new connection
directthreadstartinfo* dtsi = CreateDTSI(hContact, NULL, type);
@@ -596,7 +596,7 @@ void CIcqProto::handleDirectPacket(directconnect* dc, PBYTE buf, WORD wLen) DWORD dwUin;
DWORD dwPort;
DWORD dwCookie;
- HCONTACT hContact;
+ MCONTACT hContact;
if (wLen != 0x30)
{
@@ -639,7 +639,7 @@ void CIcqProto::handleDirectPacket(directconnect* dc, PBYTE buf, WORD wLen) if (dc->dwRemoteUin || !dc->dwReqId)
{ // OMG! Licq sends on reverse connection empty uin
hContact = HContactFromUIN(dc->dwRemoteUin, NULL);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
{
NetLog_Direct("Error: Received PEER_INIT from %u not on my list", dwUin);
CloseDirectConnection(dc);
@@ -1009,7 +1009,7 @@ int DecryptDirectPacket(directconnect* dc, PBYTE buf, WORD wLen) }
// This should be called only if connection already exists
-int CIcqProto::SendDirectMessage(HCONTACT hContact, icq_packet *pkt)
+int CIcqProto::SendDirectMessage(MCONTACT hContact, icq_packet *pkt)
{
icq_lock l(directConnListMutex);
diff --git a/protocols/IcqOscarJ/src/icq_direct.h b/protocols/IcqOscarJ/src/icq_direct.h index 76ccd0d2dc..bb8c38d29f 100644 --- a/protocols/IcqOscarJ/src/icq_direct.h +++ b/protocols/IcqOscarJ/src/icq_direct.h @@ -39,7 +39,7 @@ struct filetransfer: public basic_filetransfer DWORD dwCookie;
DWORD dwUin;
DWORD dwRemotePort;
- HCONTACT hContact;
+ MCONTACT hContact;
char *szFilename;
char *szDescription;
char *szSavePath;
@@ -68,7 +68,7 @@ struct filetransfer: public basic_filetransfer struct directconnect
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hConnection;
DWORD dwConnectionCookie;
int type;
diff --git a/protocols/IcqOscarJ/src/icq_directmsg.cpp b/protocols/IcqOscarJ/src/icq_directmsg.cpp index d5a4ccdced..df34189cb0 100644 --- a/protocols/IcqOscarJ/src/icq_directmsg.cpp +++ b/protocols/IcqOscarJ/src/icq_directmsg.cpp @@ -165,7 +165,7 @@ void CIcqProto::handleDirectMessage(directconnect* dc, PBYTE buf, WORD wLen) }
else
{
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
cookie_message_data *pCookieData = NULL;
if (!FindCookie(wCookie, &hCookieContact, (void**)&pCookieData))
@@ -303,7 +303,7 @@ void CIcqProto::handleDirectGreetingMessage(directconnect* dc, PBYTE buf, WORD w }
else if (typeId && wCommand == DIRECT_ACK)
{
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
cookie_message_data *pCookieData = NULL;
if (!FindCookie(wCookie, &hCookieContact, (void**)&pCookieData))
diff --git a/protocols/IcqOscarJ/src/icq_filerequests.cpp b/protocols/IcqOscarJ/src/icq_filerequests.cpp index fa4c3942d1..eeb0f7313d 100644 --- a/protocols/IcqOscarJ/src/icq_filerequests.cpp +++ b/protocols/IcqOscarJ/src/icq_filerequests.cpp @@ -33,7 +33,7 @@ void CIcqProto::handleFileAck(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, {
char* pszFileName = NULL;
DWORD dwFileSize;
- HCONTACT hCookieContact;
+ MCONTACT hCookieContact;
WORD wPort;
WORD wFilenameLength;
filetransfer* ft;
@@ -107,7 +107,7 @@ void CIcqProto::handleFileAck(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, OpenDirectConnection(ft->hContact, DIRECTCONN_FILE, ft);
}
-filetransfer* CIcqProto::CreateFileTransfer(HCONTACT hContact, DWORD dwUin, int nVersion)
+filetransfer* CIcqProto::CreateFileTransfer(MCONTACT hContact, DWORD dwUin, int nVersion)
{
filetransfer *ft = CreateIcqFileTransfer();
@@ -154,7 +154,7 @@ void CIcqProto::handleFileRequest(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCoo wLen -= 4;
int bAdded;
- HCONTACT hContact = HContactFromUIN(dwUin, &bAdded);
+ MCONTACT hContact = HContactFromUIN(dwUin, &bAdded);
// Initialize a filetransfer struct
filetransfer *ft = CreateFileTransfer(hContact, dwUin, nVersion);
@@ -191,7 +191,7 @@ void CIcqProto::handleDirectCancel(directconnect *dc, PBYTE buf, WORD wLen, WORD // *******************************************************************************
-void CIcqProto::icq_CancelFileTransfer(HCONTACT hContact, filetransfer* ft)
+void CIcqProto::icq_CancelFileTransfer(MCONTACT hContact, filetransfer* ft)
{
DWORD dwCookie;
diff --git a/protocols/IcqOscarJ/src/icq_infoupdate.cpp b/protocols/IcqOscarJ/src/icq_infoupdate.cpp index 969607b6be..3771044872 100644 --- a/protocols/IcqOscarJ/src/icq_infoupdate.cpp +++ b/protocols/IcqOscarJ/src/icq_infoupdate.cpp @@ -55,7 +55,7 @@ void CIcqProto::icq_InitInfoUpdate(void) // Returns TRUE if user was queued
// Returns FALSE if the list was full
-BOOL CIcqProto::icq_QueueUser(HCONTACT hContact)
+BOOL CIcqProto::icq_QueueUser(MCONTACT hContact)
{
if ( !infoUpdateMutex )
return FALSE;
@@ -155,7 +155,7 @@ void CIcqProto::icq_RescanInfoUpdate() bInfoUpdateEnabled = 0; // freeze thread
// Queue all outdated users
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact != NULL)
{
if (IsMetaInfoChanged(hContact))
diff --git a/protocols/IcqOscarJ/src/icq_menu.cpp b/protocols/IcqOscarJ/src/icq_menu.cpp index 5538103a41..f06e5eea20 100644 --- a/protocols/IcqOscarJ/src/icq_menu.cpp +++ b/protocols/IcqOscarJ/src/icq_menu.cpp @@ -39,7 +39,7 @@ static int sttCompareProtocols(const CIcqProto *p1, const CIcqProto *p2) LIST<CIcqProto> g_Instances(1, sttCompareProtocols);
-static CIcqProto* IcqGetInstanceByHContact(HCONTACT hContact)
+static CIcqProto* IcqGetInstanceByHContact(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -54,37 +54,37 @@ static CIcqProto* IcqGetInstanceByHContact(HCONTACT hContact) static INT_PTR IcqMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->RequestAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->GrantAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->RevokeAuthorization(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleAddServContact(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->AddServerContact(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleXStatusDetails(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->ShowXStatusDetails(wParam, lParam) : 0;
}
static INT_PTR IcqMenuHandleOpenProfile(WPARAM wParam, LPARAM lParam)
{
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OpenWebProfile(wParam, lParam) : 0;
}
@@ -97,7 +97,7 @@ static int IcqPrebuildContactMenu( WPARAM wParam, LPARAM lParam ) Menu_ShowItem(g_hContactMenuItems[ICMI_XSTATUS_DETAILS], FALSE);
Menu_ShowItem(g_hContactMenuItems[ICMI_OPEN_PROFILE], FALSE);
- CIcqProto* ppro = IcqGetInstanceByHContact((HCONTACT)wParam);
+ CIcqProto* ppro = IcqGetInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->OnPreBuildContactMenu(wParam, lParam) : 0;
}
@@ -177,7 +177,7 @@ void g_MenuUninit(void) INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DWORD dwUin = getContactUin(hContact);
char url[256];
mir_snprintf(url, sizeof(url), "http://www.icq.com/people/%d",dwUin);
@@ -187,7 +187,7 @@ INT_PTR CIcqProto::OpenWebProfile(WPARAM wParam, LPARAM lParam) int CIcqProto::OnPreBuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
diff --git a/protocols/IcqOscarJ/src/icq_popups.cpp b/protocols/IcqOscarJ/src/icq_popups.cpp index ba3572b61f..b34a8b780a 100644 --- a/protocols/IcqOscarJ/src/icq_popups.cpp +++ b/protocols/IcqOscarJ/src/icq_popups.cpp @@ -200,7 +200,7 @@ INT_PTR CALLBACK DlgProcIcqPopupOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR return FALSE;
}
-int CIcqProto::ShowPopupMsg(HCONTACT hContact, const char *szTitle, const char *szMsg, BYTE bType)
+int CIcqProto::ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *szMsg, BYTE bType)
{
if (bPopupService && getByte("PopupsEnabled", DEFAULT_POPUPS_ENABLED))
{
diff --git a/protocols/IcqOscarJ/src/icq_proto.cpp b/protocols/IcqOscarJ/src/icq_proto.cpp index 6754e296c8..bfe5e66277 100644 --- a/protocols/IcqOscarJ/src/icq_proto.cpp +++ b/protocols/IcqOscarJ/src/icq_proto.cpp @@ -291,7 +291,7 @@ int CIcqProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam) ModuleLoad(0, 0);
InitXStatusItems(FALSE);
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact != NULL) {
DWORD bXStatus = getContactXStatus(hContact);
if (bXStatus > 0)
@@ -316,7 +316,7 @@ int CIcqProto::OnPreShutdown(WPARAM wParam, LPARAM lParam) ////////////////////////////////////////////////////////////////////////////////////////
// PS_AddToList - adds a contact to the contact list
-HCONTACT CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (psr) {
if (psr->cbSize == sizeof(ICQSEARCHRESULT)) {
@@ -354,7 +354,7 @@ HCONTACT CIcqProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return 0; // Failure
}
-HCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DWORD uin = 0;
uid_str uid = { 0 };
@@ -420,8 +420,8 @@ HCONTACT __cdecl CIcqProto::AddToListByEvent(int flags, int iContact, HANDLE hDb int CIcqProto::Authorize(HANDLE hDbEvent)
{
if (icqOnline() && hDbEvent) {
- HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
DWORD uin;
@@ -446,8 +446,8 @@ int CIcqProto::Authorize(HANDLE hDbEvent) int CIcqProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason)
{
if (icqOnline() && hDbEvent) {
- HCONTACT hContact = HContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = HContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
DWORD uin;
@@ -470,7 +470,7 @@ int CIcqProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CIcqProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CIcqProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
setContactHidden(hContact, 0);
ICQAddRecvEvent(NULL, EVENTTYPE_AUTHREQUEST, pre, pre->lParam, (PBYTE)pre->szMessage, 0);
@@ -480,7 +480,7 @@ int __cdecl CIcqProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CIcqProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CIcqProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
if (!icqOnline())
return 1;
@@ -515,7 +515,7 @@ HANDLE __cdecl CIcqProto::ChangeInfo(int iInfoType, void* pInfoData) ////////////////////////////////////////////////////////////////////////////////////////
// PS_FileAllow - starts a file transfer
-HANDLE __cdecl CIcqProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
+HANDLE __cdecl CIcqProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath)
{
DWORD dwUin;
uid_str szUid;
@@ -558,7 +558,7 @@ HANDLE __cdecl CIcqProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const T ////////////////////////////////////////////////////////////////////////////////////////
// PS_FileCancel - cancels a file transfer
-int __cdecl CIcqProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int __cdecl CIcqProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
DWORD dwUin;
uid_str szUid;
@@ -588,7 +588,7 @@ int __cdecl CIcqProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// PS_FileDeny - denies a file transfer
-int __cdecl CIcqProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
+int __cdecl CIcqProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason)
{
int nReturnValue = 1;
DWORD dwUin;
@@ -657,7 +657,7 @@ int __cdecl CIcqProto::FileResume(HANDLE hTransfer, int* action, const TCHAR** s ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CIcqProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CIcqProto::GetCaps(int type, MCONTACT hContact)
{
DWORD_PTR nReturn = 0;
@@ -742,7 +742,7 @@ DWORD_PTR __cdecl CIcqProto::GetCaps(int type, HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CIcqProto::GetInfo(HCONTACT hContact, int infoType)
+int __cdecl CIcqProto::GetInfo(MCONTACT hContact, int infoType)
{
if (icqOnline()) {
DWORD dwUin;
@@ -923,7 +923,7 @@ HWND __cdecl CIcqProto::SearchAdvanced(HWND hwndDlg) ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CIcqProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CIcqProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
ICQSEARCHRESULT **isrList = (ICQSEARCHRESULT**)pre->szMessage;
int i;
@@ -974,7 +974,7 @@ int __cdecl CIcqProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CIcqProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt)
+int __cdecl CIcqProto::RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -983,7 +983,7 @@ int __cdecl CIcqProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CIcqProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CIcqProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
DWORD cbBlob;
DWORD flags = 0;
@@ -1009,7 +1009,7 @@ int __cdecl CIcqProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CIcqProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*)
+int __cdecl CIcqProto::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
{
return 1;
}
@@ -1018,7 +1018,7 @@ int __cdecl CIcqProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CIcqProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CIcqProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
if (hContact && hContactsList) {
int i;
@@ -1289,7 +1289,7 @@ int __cdecl CIcqProto::SendContacts(HCONTACT hContact, int flags, int nContacts, ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CIcqProto::SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
+HANDLE __cdecl CIcqProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
if (!icqOnline())
return 0;
@@ -1391,7 +1391,7 @@ HANDLE __cdecl CIcqProto::SendFile(HCONTACT hContact, const TCHAR* szDescription ////////////////////////////////////////////////////////////////////////////////////////
// PS_SendMessage - sends a message
-int __cdecl CIcqProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CIcqProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
if (hContact == NULL || pszSrc == NULL)
return NULL;
@@ -1581,7 +1581,7 @@ int __cdecl CIcqProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc) ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CIcqProto::SendUrl(HCONTACT hContact, int flags, const char* url)
+int __cdecl CIcqProto::SendUrl(MCONTACT hContact, int flags, const char* url)
{
if (hContact == NULL || url == NULL)
return 0;
@@ -1646,7 +1646,7 @@ int __cdecl CIcqProto::SendUrl(HCONTACT hContact, int flags, const char* url) ////////////////////////////////////////////////////////////////////////////////////////
// PS_SetApparentMode - sets the visibility status
-int __cdecl CIcqProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CIcqProto::SetApparentMode(MCONTACT hContact, int mode)
{
DWORD uin;
uid_str uid;
@@ -1840,7 +1840,7 @@ int __cdecl CIcqProto::SetStatus(int iNewStatus) struct status_message_thread_data
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szMessage;
HANDLE hProcess;
};
@@ -1866,7 +1866,7 @@ void __cdecl CIcqProto::GetAwayMsgThread(void *pStatusData) ////////////////////////////////////////////////////////////////////////////////////////
// PS_GetAwayMsg - returns a contact's away message
-HANDLE __cdecl CIcqProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CIcqProto::GetAwayMsg(MCONTACT hContact)
{
DWORD dwUin;
uid_str szUID;
@@ -1949,7 +1949,7 @@ HANDLE __cdecl CIcqProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG - processes received status mode message
-int __cdecl CIcqProto::RecvAwayMsg(HCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
+int __cdecl CIcqProto::RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
{
if (evt->flags & PREF_UTF) {
setStatusMsgVar(hContact, evt->szMessage, false);
@@ -2039,7 +2039,7 @@ INT_PTR CIcqProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// PS_UserIsTyping - sends a UTN notification
-int __cdecl CIcqProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CIcqProto::UserIsTyping(MCONTACT hContact, int type)
{
if (hContact && icqOnline()) {
if (CheckContactCapabilities(hContact, CAPF_TYPING)) {
diff --git a/protocols/IcqOscarJ/src/icq_proto.h b/protocols/IcqOscarJ/src/icq_proto.h index 44e23e627f..1f8e28dcdf 100644 --- a/protocols/IcqOscarJ/src/icq_proto.h +++ b/protocols/IcqOscarJ/src/icq_proto.h @@ -41,7 +41,7 @@ struct userinfo
{
DWORD dwUin;
- HCONTACT hContact;
+ MCONTACT hContact;
time_t queued;
};
@@ -54,23 +54,23 @@ struct CIcqProto : public PROTO<CIcqProto> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT *psr);
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT *psr);
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void *pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
virtual int __cdecl FileResume( HANDLE hTransfer, int *action, const TCHAR **szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR *id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR *email);
@@ -78,24 +78,24 @@ struct CIcqProto : public PROTO<CIcqProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -127,7 +127,7 @@ struct CIcqProto : public PROTO<CIcqProto> INT_PTR __cdecl OnCreateAccMgrUI(WPARAM, LPARAM);
//====| Events |======================================================================
- void __cdecl OnAddContactForever(DBCONTACTWRITESETTING *cws, HCONTACT hContact);
+ void __cdecl OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONTACT hContact);
int __cdecl OnIdleChanged(WPARAM, LPARAM);
int __cdecl OnModernOptInit(WPARAM, LPARAM);
int __cdecl OnModulesLoaded(WPARAM, LPARAM);
@@ -138,8 +138,8 @@ struct CIcqProto : public PROTO<CIcqProto> int __cdecl OnProcessSrmmIconClick(WPARAM, LPARAM);
int __cdecl OnProcessSrmmEvent(WPARAM, LPARAM);
int __cdecl OnReloadIcons(WPARAM, LPARAM);
- void __cdecl OnRenameContact(DBCONTACTWRITESETTING *cws, HCONTACT hContact);
- void __cdecl OnRenameGroup( DBCONTACTWRITESETTING *cws, HCONTACT hContact);
+ void __cdecl OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT hContact);
+ void __cdecl OnRenameGroup( DBCONTACTWRITESETTING *cws, MCONTACT hContact);
int __cdecl OnUserInfoInit(WPARAM, LPARAM);
int __cdecl OnPreBuildStatusMenu(WPARAM, LPARAM);
@@ -182,22 +182,22 @@ struct CIcqProto : public PROTO<CIcqProto> //----| capabilities.cpp |------------------------------------------------------------
// Deletes all oscar capabilities for a given contact.
- void ClearAllContactCapabilities(HCONTACT hContact);
+ void ClearAllContactCapabilities(MCONTACT hContact);
// Deletes one or many oscar capabilities for a given contact.
- void ClearContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities);
+ void ClearContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities);
// Sets one or many oscar capabilities for a given contact.
- void SetContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities);
+ void SetContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities);
// Returns true if the given contact supports the requested capabilites.
- BOOL CheckContactCapabilities(HCONTACT hContact, DWORD fdwCapabilities);
+ BOOL CheckContactCapabilities(MCONTACT hContact, DWORD fdwCapabilities);
// Scans a binary buffer for oscar capabilities and adds them to the contact.
- void AddCapabilitiesFromBuffer(HCONTACT hContact, BYTE *pBuffer, int nLength);
+ void AddCapabilitiesFromBuffer(MCONTACT hContact, BYTE *pBuffer, int nLength);
// Scans a binary buffer for oscar capabilities and sets them to the contact.
- void SetCapabilitiesFromBuffer(HCONTACT hContact, BYTE *pBuffer, int nLength, BOOL bReset);
+ void SetCapabilitiesFromBuffer(MCONTACT hContact, BYTE *pBuffer, int nLength, BOOL bReset);
//----| chan_01login.cpp |------------------------------------------------------------
void handleLoginChannel(BYTE *buf, WORD datalen, serverthread_info *info);
@@ -231,7 +231,7 @@ struct CIcqProto : public PROTO<CIcqProto> LIST<icq_cookie_info> cookies;
WORD wCookieSeq;
- DWORD AllocateCookie(BYTE bType, WORD wIdent, HCONTACT hContact, void *pvExtra);
+ DWORD AllocateCookie(BYTE bType, WORD wIdent, MCONTACT hContact, void *pvExtra);
void FreeCookie(DWORD dwCookie);
void FreeCookieByData(BYTE bType, void *pvExtra);
void ReleaseCookie(DWORD dwCookie);
@@ -239,32 +239,32 @@ struct CIcqProto : public PROTO<CIcqProto> int GetCookieType(DWORD dwCookie);
- int FindCookie(DWORD wCookie, HCONTACT *phContact, void **ppvExtra);
- int FindCookieByData(void *pvExtra, DWORD *pdwCookie, HCONTACT *phContact);
- int FindCookieByType(BYTE bType, DWORD *pdwCookie, HCONTACT *phContact, void **ppvExtra);
- int FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCookie, HCONTACT *phContact, cookie_message_data **ppvExtra);
+ int FindCookie(DWORD wCookie, MCONTACT *phContact, void **ppvExtra);
+ int FindCookieByData(void *pvExtra, DWORD *pdwCookie, MCONTACT *phContact);
+ int FindCookieByType(BYTE bType, DWORD *pdwCookie, MCONTACT *phContact, void **ppvExtra);
+ int FindMessageCookie(DWORD dwMsgID1, DWORD dwMsgID2, DWORD *pdwCookie, MCONTACT *phContact, cookie_message_data **ppvExtra);
void InitMessageCookie(cookie_message_data *pCookie);
cookie_message_data* CreateMessageCookie(WORD bMsgType, BYTE bAckType);
- cookie_message_data* CreateMessageCookieData(BYTE bMsgType, HCONTACT hContact, DWORD dwUin, int bUseSrvRelay);
+ cookie_message_data* CreateMessageCookieData(BYTE bMsgType, MCONTACT hContact, DWORD dwUin, int bUseSrvRelay);
void RemoveExpiredCookies(void);
//----| directpackets.cpp |-----------------------------------------------------------
void icq_sendDirectMsgAck(directconnect* dc, WORD wCookie, BYTE bMsgType, BYTE bMsgFlags, char* szCap);
- DWORD icq_sendGetAwayMsgDirect(HCONTACT hContact, int type);
+ DWORD icq_sendGetAwayMsgDirect(MCONTACT hContact, int type);
void icq_sendAwayMsgReplyDirect(directconnect *dc, WORD wCookie, BYTE msgType, const char** szMsg);
- void icq_sendFileAcceptDirect(HCONTACT hContact, filetransfer *ft);
- void icq_sendFileDenyDirect(HCONTACT hContact, filetransfer *ft, const char *szReason);
+ void icq_sendFileAcceptDirect(MCONTACT hContact, filetransfer *ft);
+ void icq_sendFileDenyDirect(MCONTACT hContact, filetransfer *ft, const char *szReason);
int icq_sendFileSendDirectv7(filetransfer *ft, const char *pszFiles);
int icq_sendFileSendDirectv8(filetransfer *ft, const char *pszFiles);
- DWORD icq_SendDirectMessage(HCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap);
- void icq_sendXtrazRequestDirect(HCONTACT hContact, DWORD dwCookie, char* szBody, int nBodyLen, WORD wType);
- void icq_sendXtrazResponseDirect(HCONTACT hContact, WORD wCookie, char* szBody, int nBodyLen, WORD wType);
+ DWORD icq_SendDirectMessage(MCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap);
+ void icq_sendXtrazRequestDirect(MCONTACT hContact, DWORD dwCookie, char* szBody, int nBodyLen, WORD wType);
+ void icq_sendXtrazResponseDirect(MCONTACT hContact, WORD wCookie, char* szBody, int nBodyLen, WORD wType);
//----| fam_01service.cpp |-----------------------------------------------------------
void handleServiceFam(BYTE *pBuffer, WORD wBufferLength, snac_header *pSnacHeader, serverthread_info *info);
- char* buildUinList(int subtype, WORD wMaxLen, HCONTACT *hContactResume);
+ char* buildUinList(int subtype, WORD wMaxLen, MCONTACT *hContactResume);
void sendEntireListServ(WORD wFamily, WORD wSubtype, int listType);
void setUserInfo(void);
void handleServUINSettings(int nPort, serverthread_info *info);
@@ -278,7 +278,7 @@ struct CIcqProto : public PROTO<CIcqProto> void handleReplyBuddy(BYTE *buf, WORD wPackLen);
void handleUserOffline(BYTE *buf, WORD wPackLen);
void handleUserOnline(BYTE *buf, WORD wPackLen, serverthread_info *info);
- void parseStatusNote(DWORD dwUin, char *szUid, HCONTACT hContact, oscar_tlv_chain *pChain);
+ void parseStatusNote(DWORD dwUin, char *szUid, MCONTACT hContact, oscar_tlv_chain *pChain);
void handleNotifyRejected(BYTE *buf, WORD wPackLen);
//----| fam_04message.cpp |-----------------------------------------------------------
@@ -296,29 +296,29 @@ struct CIcqProto : public PROTO<CIcqProto> void handleRecvServMsgError(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
void handleRecvMsgResponse(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
void handleServerAck(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
- void handleStatusMsgReply(const char *szPrefix, HCONTACT hContact, DWORD dwUin, WORD wVersion, int bMsgType, WORD wCookie, const char *szMsg, int nMsgFlags);
+ void handleStatusMsgReply(const char *szPrefix, MCONTACT hContact, DWORD dwUin, WORD wVersion, int bMsgType, WORD wCookie, const char *szMsg, int nMsgFlags);
void handleTypingNotification(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
void handleMissedMsg(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
void handleOffineMessagesReply(BYTE *buf, WORD wLen, WORD wFlags, DWORD dwRef);
void handleRecvServMsgContacts(BYTE *buf, WORD wLen, DWORD dwUin, char *szUID, DWORD dwID1, DWORD dwID2, WORD wCommand);
void handleRuntimeError(WORD wError);
- void parseServRelayData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType);
- void parseServRelayPluginData(BYTE *pDataBuf, WORD wLen, HCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType, BYTE bFlags, WORD wStatus, WORD wCookie, WORD wVersion);
+ void parseServRelayData(BYTE *pDataBuf, WORD wLen, MCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType);
+ void parseServRelayPluginData(BYTE *pDataBuf, WORD wLen, MCONTACT hContact, DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wAckType, BYTE bFlags, WORD wStatus, WORD wCookie, WORD wVersion);
HANDLE handleMessageAck(DWORD dwUin, char *szUID, WORD wCookie, WORD wVersion, int type, WORD wMsgLen, PBYTE buf, BYTE bFlags, int nMsgFlags);
void handleMessageTypes(DWORD dwUin, char *szUID, DWORD dwTimestamp, DWORD dwMsgID, DWORD dwMsgID2, WORD wCookie, WORD wVersion, int type, int flags, WORD wAckType, DWORD dwDataLen, WORD wMsgLen, char *pMsg, int nMsgFlags, message_ack_params *pAckParams);
- void sendMessageTypesAck(HCONTACT hContact, int bUnicode, message_ack_params *pArgs);
- void sendTypingNotification(HCONTACT hContact, WORD wMTNCode);
+ void sendMessageTypesAck(MCONTACT hContact, int bUnicode, message_ack_params *pArgs);
+ void sendTypingNotification(MCONTACT hContact, WORD wMTNCode);
int unpackPluginTypeId(BYTE **pBuffer, WORD *pwLen, int *pTypeId, WORD *pFunctionId, BOOL bThruDC);
- char* convertMsgToUserSpecificUtf(HCONTACT hContact, const char *szMsg);
+ char* convertMsgToUserSpecificUtf(MCONTACT hContact, const char *szMsg);
//----| fam_09bos.cpp |---------------------------------------------------------------
void handleBosFam(unsigned char *pBuffer, WORD wBufferLength, snac_header* pSnacHeader);
void handlePrivacyRightsReply(unsigned char *pBuffer, WORD wBufferLength);
- void makeContactTemporaryVisible(HCONTACT hContact);
+ void makeContactTemporaryVisible(MCONTACT hContact);
//----| fam_0alookup.cpp |------------------------------------------------------------
void handleLookupFam(unsigned char *pBuffer, WORD wBufferLength, snac_header* pSnacHeader);
@@ -347,7 +347,7 @@ struct CIcqProto : public PROTO<CIcqProto> void handleRecvAuthResponse(BYTE *buf, WORD wLen);
void handleRecvAdded(BYTE *buf, WORD wLen);
- HCONTACT HContactFromRecordName(const char *szRecordName, int *bAdded);
+ MCONTACT HContactFromRecordName(const char *szRecordName, int *bAdded);
void processCListReply(const char *szRecordName, WORD wGroupId, WORD wItemId, WORD wItemType, oscar_tlv_chain *pItemData);
@@ -367,12 +367,12 @@ struct CIcqProto : public PROTO<CIcqProto> void handleExtensionServerInfo(BYTE *buf, WORD wPackLen, WORD wFlags);
void handleExtensionMetaResponse(BYTE *databuf, WORD wPacketLen, WORD wCookie, WORD wFlags);
- int parseUserInfoRecord(HCONTACT hContact, oscar_tlv *pData, UserInfoRecordItem pRecordDef[], int nRecordDef, int nMaxRecords);
+ int parseUserInfoRecord(MCONTACT hContact, oscar_tlv *pData, UserInfoRecordItem pRecordDef[], int nRecordDef, int nMaxRecords);
void handleDirectoryQueryResponse(BYTE *databuf, WORD wPacketLen, WORD wCookie, WORD wReplySubtype, WORD wFlags);
void handleDirectoryUpdateResponse(BYTE *databuf, WORD wPacketLen, WORD wCookie, WORD wReplySubtype);
- void parseDirectoryUserDetailsData(HCONTACT hContact, oscar_tlv_chain *cDetails, DWORD dwCookie, cookie_directory_data *pCookieData, WORD wReplySubType);
+ void parseDirectoryUserDetailsData(MCONTACT hContact, oscar_tlv_chain *cDetails, DWORD dwCookie, cookie_directory_data *pCookieData, WORD wReplySubType);
void parseDirectorySearchData(oscar_tlv_chain *cDetails, DWORD dwCookie, cookie_directory_data *pCookieData, WORD wReplySubType);
void parseSearchReplies(unsigned char *databuf, WORD wPacketLen, WORD wCookie, WORD wReplySubtype, BYTE bResultCode);
@@ -397,45 +397,45 @@ struct CIcqProto : public PROTO<CIcqProto> void __cdecl AvatarThread(avatars_server_connection *pInfo);
void handleAvatarOwnerHash(WORD wItemID, BYTE bFlags, BYTE *pData, BYTE nDataLen);
- void handleAvatarContactHash(DWORD dwUIN, char *szUID, HCONTACT hContact, BYTE *pHash, int nHashLen, WORD wOldStatus);
+ void handleAvatarContactHash(DWORD dwUIN, char *szUID, MCONTACT hContact, BYTE *pHash, int nHashLen, WORD wOldStatus);
avatars_request *ReleaseAvatarRequestInQueue(avatars_request *request);
TCHAR* GetOwnAvatarFileName();
void GetFullAvatarFileName(int dwUin, const char *szUid, int dwFormat, TCHAR *pszDest, int cbLen);
void GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, int cbLen);
- int IsAvatarChanged(HCONTACT hContact, const BYTE *pHash, int nHashLen);
+ int IsAvatarChanged(MCONTACT hContact, const BYTE *pHash, int nHashLen);
- int GetAvatarData(HCONTACT hContact, DWORD dwUin, const char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file);
- int SetAvatarData(HCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen);
+ int GetAvatarData(MCONTACT hContact, DWORD dwUin, const char *szUid, const BYTE *hash, unsigned int hashlen, const TCHAR *file);
+ int SetAvatarData(MCONTACT hContact, WORD wRef, const BYTE *data, unsigned int datalen);
void StartAvatarThread(HANDLE hConn, char* cookie, WORD cookieLen);
void StopAvatarThread();
//----| icq_clients.cpp |-------------------------------------------------------------
- const char* detectUserClient(HCONTACT hContact, int nIsICQ, WORD wUserClass, DWORD dwOnlineSince, const char *szCurrentClient, WORD wVersion, DWORD dwFT1, DWORD dwFT2, DWORD dwFT3, BYTE bDirectFlag, DWORD dwDirectCookie, DWORD dwWebPort, BYTE *caps, WORD wLen, BYTE *bClientId, char *szClientBuf);
+ const char* detectUserClient(MCONTACT hContact, int nIsICQ, WORD wUserClass, DWORD dwOnlineSince, const char *szCurrentClient, WORD wVersion, DWORD dwFT1, DWORD dwFT2, DWORD dwFT3, BYTE bDirectFlag, DWORD dwDirectCookie, DWORD dwWebPort, BYTE *caps, WORD wLen, BYTE *bClientId, char *szClientBuf);
//----| icq_db.cpp |------------------------------------------------------------------
- HANDLE AddEvent(HCONTACT hContact, WORD wType, DWORD dwTime, DWORD flags, DWORD cbBlob, PBYTE pBlob);
- int IsICQContact(HCONTACT hContact);
-
- HCONTACT FindFirstContact();
- HCONTACT FindNextContact(HCONTACT hContact);
-
- int getSetting(HCONTACT hContact, const char *szSetting, DBVARIANT *dbv);
- double getSettingDouble(HCONTACT hContact, const char *szSetting, double dDef);
- int getSettingStringStatic(HCONTACT hContact, const char *szSetting, char *dest, int dest_len);
- char* getSettingStringUtf(HCONTACT hContact, const char *szModule, const char *szSetting, char *szDef);
- char* getSettingStringUtf(HCONTACT hContact, const char *szSetting, char *szDef);
- int getContactUid(HCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid);
- DWORD getContactUin(HCONTACT hContact);
- WORD getContactStatus(HCONTACT hContact);
- char* getContactCListGroup(HCONTACT hContact);
-
- int setSettingDouble(HCONTACT hContact, const char *szSetting, double dValue);
- int setSettingBlob(HCONTACT hContact, const char *szSetting, const BYTE *pValue, const int cbValue);
- int setContactHidden(HCONTACT hContact, BYTE bHidden);
- void setStatusMsgVar(HCONTACT hContact, char* szStatusMsg, bool isAnsi);
+ HANDLE AddEvent(MCONTACT hContact, WORD wType, DWORD dwTime, DWORD flags, DWORD cbBlob, PBYTE pBlob);
+ int IsICQContact(MCONTACT hContact);
+
+ MCONTACT FindFirstContact();
+ MCONTACT FindNextContact(MCONTACT hContact);
+
+ int getSetting(MCONTACT hContact, const char *szSetting, DBVARIANT *dbv);
+ double getSettingDouble(MCONTACT hContact, const char *szSetting, double dDef);
+ int getSettingStringStatic(MCONTACT hContact, const char *szSetting, char *dest, int dest_len);
+ char* getSettingStringUtf(MCONTACT hContact, const char *szModule, const char *szSetting, char *szDef);
+ char* getSettingStringUtf(MCONTACT hContact, const char *szSetting, char *szDef);
+ int getContactUid(MCONTACT hContact, DWORD *pdwUin, uid_str *ppszUid);
+ DWORD getContactUin(MCONTACT hContact);
+ WORD getContactStatus(MCONTACT hContact);
+ char* getContactCListGroup(MCONTACT hContact);
+
+ int setSettingDouble(MCONTACT hContact, const char *szSetting, double dValue);
+ int setSettingBlob(MCONTACT hContact, const char *szSetting, const BYTE *pValue, const int cbValue);
+ int setContactHidden(MCONTACT hContact, BYTE bHidden);
+ void setStatusMsgVar(MCONTACT hContact, char* szStatusMsg, bool isAnsi);
//----| icq_direct.cpp |--------------------------------------------------------------
icq_critical_section *directConnListMutex;
@@ -453,29 +453,29 @@ struct CIcqProto : public PROTO<CIcqProto> void sendPeerFileInit(directconnect* dc);
int sendDirectPacket(directconnect* dc, icq_packet* pkt);
- void CloseContactDirectConns(HCONTACT hContact);
+ void CloseContactDirectConns(MCONTACT hContact);
directconnect* FindFileTransferDC(filetransfer* ft);
filetransfer* FindExpectedFileRecv(DWORD dwUin, DWORD dwTotalSize);
- BOOL IsDirectConnectionOpen(HCONTACT hContact, int type, int bPassive);
- void OpenDirectConnection(HCONTACT hContact, int type, void* pvExtra);
+ BOOL IsDirectConnectionOpen(MCONTACT hContact, int type, int bPassive);
+ void OpenDirectConnection(MCONTACT hContact, int type, void* pvExtra);
void CloseDirectConnection(directconnect *dc);
- int SendDirectMessage(HCONTACT hContact, icq_packet *pkt);
+ int SendDirectMessage(MCONTACT hContact, icq_packet *pkt);
//----| icq_directmsg.cpp |-----------------------------------------------------------
void handleDirectMessage(directconnect* dc, PBYTE buf, WORD wLen);
void handleDirectGreetingMessage(directconnect* dc, PBYTE buf, WORD wLen, WORD wCommand, WORD wCookie, BYTE bMsgType, BYTE bMsgFlags, WORD wStatus, WORD wFlags, char* pszText);
//----| icq_filerequests.cpp |--------------------------------------------------------
- filetransfer* CreateFileTransfer(HCONTACT hContact, DWORD dwUin, int nVersion);
+ filetransfer* CreateFileTransfer(MCONTACT hContact, DWORD dwUin, int nVersion);
void handleFileAck(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, WORD wStatus, char* pszText);
void handleFileRequest(PBYTE buf, WORD wLen, DWORD dwUin, DWORD dwCookie, DWORD dwID1, DWORD dwID2, char* pszDescription, int nVersion, BOOL bDC);
void handleDirectCancel(directconnect *dc, PBYTE buf, WORD wLen, WORD wCommand, DWORD dwCookie, WORD wMessageType, WORD wStatus, WORD wFlags, char* pszText);
- void icq_CancelFileTransfer(HCONTACT hContact, filetransfer* ft);
+ void icq_CancelFileTransfer(MCONTACT hContact, filetransfer* ft);
//----| icq_filetransfer.cpp |--------------------------------------------------------
- void icq_AcceptFileTransfer(HCONTACT hContact, filetransfer *ft);
+ void icq_AcceptFileTransfer(MCONTACT hContact, filetransfer *ft);
void icq_sendFileResume(filetransfer *ft, int action, const char *szFilename);
void icq_InitFileSend(filetransfer *ft);
@@ -496,7 +496,7 @@ struct CIcqProto : public PROTO<CIcqProto> void __cdecl InfoUpdateThread(void*);
void icq_InitInfoUpdate(void); // Queues all outdated users
- BOOL icq_QueueUser(HCONTACT hContact); // Queue one UIN to the list for updating
+ BOOL icq_QueueUser(MCONTACT hContact); // Queue one UIN to the list for updating
void icq_DequeueUser(DWORD dwUin); // Remove one UIN from the list
void icq_RescanInfoUpdate(); // Add all outdated contacts to the list
void icq_InfoUpdateCleanup(void); // Clean up on exit
@@ -526,7 +526,7 @@ struct CIcqProto : public PROTO<CIcqProto> BOOL unpackUID(BYTE **ppBuf, WORD *pwLen, DWORD *pdwUIN, uid_str *ppszUID);
//----| icq_popups.cpp |--------------------------------------------------------------
- int ShowPopupMsg(HCONTACT hContact, const char *szTitle, const char *szMsg, BYTE bType);
+ int ShowPopupMsg(MCONTACT hContact, const char *szTitle, const char *szMsg, BYTE bType);
//----| icq_proto.cpp |--------------------------------------------------------------
void __cdecl CheekySearchThread( void* );
@@ -605,25 +605,25 @@ struct CIcqProto : public PROTO<CIcqProto> int servlistPendingSize;
servlistpendingitem** servlistPendingList;
- int servlistPendingFindItem(int nType, HCONTACT hContact, const char *pszGroup);
+ int servlistPendingFindItem(int nType, MCONTACT hContact, const char *pszGroup);
void servlistPendingAddItem(servlistpendingitem* pItem);
- servlistpendingitem* servlistPendingRemoveItem(int nType, HCONTACT hContact, const char *pszGroup);
+ servlistpendingitem* servlistPendingRemoveItem(int nType, MCONTACT hContact, const char *pszGroup);
- void servlistPendingAddContactOperation(HCONTACT hContact, LPARAM param, PENDING_CONTACT_CALLBACK callback, DWORD flags);
+ void servlistPendingAddContactOperation(MCONTACT hContact, LPARAM param, PENDING_CONTACT_CALLBACK callback, DWORD flags);
void servlistPendingAddGroupOperation(const char *pszGroup, LPARAM param, PENDING_GROUP_CALLBACK callback, DWORD flags);
- int servlistPendingAddContact(HCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM param, PENDING_CONTACT_CALLBACK callback, int bDoInline, LPARAM operationParam = 0, PENDING_CONTACT_CALLBACK operationCallback = NULL);
+ int servlistPendingAddContact(MCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM param, PENDING_CONTACT_CALLBACK callback, int bDoInline, LPARAM operationParam = 0, PENDING_CONTACT_CALLBACK operationCallback = NULL);
int servlistPendingAddGroup(const char *pszGroup, WORD wGroupID, LPARAM param, PENDING_GROUP_CALLBACK callback, int bDoInline, LPARAM operationParam = 0, PENDING_GROUP_CALLBACK operationCallback = NULL);
- void servlistPendingRemoveContact(HCONTACT hContact, WORD wContactID, WORD wGroupID, int nResult);
+ void servlistPendingRemoveContact(MCONTACT hContact, WORD wContactID, WORD wGroupID, int nResult);
void servlistPendingRemoveGroup(const char *pszGroup, WORD wGroupID, int nResult);
void servlistPendingFlushOperations();
// server-list support functions
int nJustAddedCount;
int nJustAddedSize;
- HCONTACT* pdwJustAddedList;
+ MCONTACT* pdwJustAddedList;
- void AddJustAddedContact(HCONTACT hContact);
- BOOL IsContactJustAdded(HCONTACT hContact);
+ void AddJustAddedContact(MCONTACT hContact);
+ BOOL IsContactJustAdded(MCONTACT hContact);
void FlushJustAddedContacts();
WORD GenerateServerID(int bGroupType, int bFlags, int wCount = 0);
@@ -649,18 +649,18 @@ struct CIcqProto : public PROTO<CIcqProto> void servlistCreateGroup(const char *szGroupPath, LPARAM param, PENDING_GROUP_CALLBACK callback);
int __cdecl servlistAddContact_gotGroup(const char *szGroup, WORD wGroupID, LPARAM lParam, int nResult);
- int __cdecl servlistAddContact_Ready(HCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM lParam, int nResult);
- void servlistAddContact(HCONTACT hContact, const char *pszGroup);
+ int __cdecl servlistAddContact_Ready(MCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM lParam, int nResult);
+ void servlistAddContact(MCONTACT hContact, const char *pszGroup);
- int __cdecl servlistRemoveContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
- void servlistRemoveContact(HCONTACT hContact);
+ int __cdecl servlistRemoveContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
+ void servlistRemoveContact(MCONTACT hContact);
int __cdecl servlistMoveContact_gotTargetGroup(const char *szGroup, WORD wNewGroupID, LPARAM lParam, int nResult);
- int __cdecl servlistMoveContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
- void servlistMoveContact(HCONTACT hContact, const char *pszNewGroup);
+ int __cdecl servlistMoveContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
+ void servlistMoveContact(MCONTACT hContact, const char *pszNewGroup);
- int __cdecl servlistUpdateContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
- void servlistUpdateContact(HCONTACT hContact);
+ int __cdecl servlistUpdateContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult);
+ void servlistUpdateContact(MCONTACT hContact);
int __cdecl servlistRenameGroup_Ready(const char *szGroup, WORD wGroupID, LPARAM lParam, int nResult);
void servlistRenameGroup(char *szGroup, WORD wGroupId, char *szNewGroup);
@@ -671,20 +671,20 @@ struct CIcqProto : public PROTO<CIcqProto> void removeGroupPathLinks(WORD wGroupID);
int getServListGroupLevel(WORD wGroupId);
- void resetServContactAuthState(HCONTACT hContact, DWORD dwUin);
+ void resetServContactAuthState(MCONTACT hContact, DWORD dwUin);
void FlushSrvGroupsCache();
int getCListGroupExists(const char *szGroup);
- int moveContactToCListGroup(HCONTACT hContact, const char *szGroup); /// TODO: this should be DB function
+ int moveContactToCListGroup(MCONTACT hContact, const char *szGroup); /// TODO: this should be DB function
DWORD icq_sendServerItem(DWORD dwCookie, WORD wAction, WORD wGroupId, WORD wItemId, const char *szName, BYTE *pTLVs, int nTlvLength, WORD wItemType, DWORD dwOperation, DWORD dwTimeout, void **doubleObject);
- DWORD icq_sendServerContact(HCONTACT hContact, DWORD dwCookie, WORD wAction, WORD wGroupId, WORD wContactId, DWORD dwOperation, DWORD dwTimeout, void **doubleObject);
+ DWORD icq_sendServerContact(MCONTACT hContact, DWORD dwCookie, WORD wAction, WORD wGroupId, WORD wContactId, DWORD dwOperation, DWORD dwTimeout, void **doubleObject);
DWORD icq_sendSimpleItem(DWORD dwCookie, WORD wAction, DWORD dwUin, char* szUID, WORD wGroupId, WORD wItemId, WORD wItemType, DWORD dwOperation, DWORD dwTimeout);
DWORD icq_sendServerGroup(DWORD dwCookie, WORD wAction, WORD wGroupId, const char *szName, void *pContent, int cbContent, DWORD dwOperationFlags);
- DWORD icq_modifyServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wAction, DWORD dwOperation, WORD wItemId, WORD wType);
- DWORD icq_removeServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType);
- DWORD icq_addServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType);
+ DWORD icq_modifyServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wAction, DWORD dwOperation, WORD wItemId, WORD wType);
+ DWORD icq_removeServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType);
+ DWORD icq_addServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType);
int __cdecl ServListDbSettingChanged(WPARAM wParam, LPARAM lParam);
int __cdecl ServListDbContactDeleted(WPARAM wParam, LPARAM lParam);
@@ -697,11 +697,11 @@ struct CIcqProto : public PROTO<CIcqProto> void icq_setidle(int bAllow);
void icq_setstatus(WORD wStatus, const char *szStatusNote = NULL);
- DWORD icq_sendGetInfoServ(HCONTACT hContact, DWORD, int);
- DWORD icq_sendGetAimProfileServ(HCONTACT hContact, char *szUid);
- DWORD icq_sendGetAwayMsgServ(HCONTACT hContact, DWORD, int, WORD);
- DWORD icq_sendGetAwayMsgServExt(HCONTACT hContact, DWORD dwUin, char *szUID, int type, WORD wVersion);
- DWORD icq_sendGetAimAwayMsgServ(HCONTACT hContact, char *szUID, int type);
+ DWORD icq_sendGetInfoServ(MCONTACT hContact, DWORD, int);
+ DWORD icq_sendGetAimProfileServ(MCONTACT hContact, char *szUid);
+ DWORD icq_sendGetAwayMsgServ(MCONTACT hContact, DWORD, int, WORD);
+ DWORD icq_sendGetAwayMsgServExt(MCONTACT hContact, DWORD dwUin, char *szUID, int type, WORD wVersion);
+ DWORD icq_sendGetAimAwayMsgServ(MCONTACT hContact, char *szUID, int type);
void icq_sendSetAimAwayMsgServ(const char *szMsg);
void icq_sendFileSendServv7(filetransfer* ft, const char *szFiles);
@@ -719,7 +719,7 @@ struct CIcqProto : public PROTO<CIcqProto> void icq_sendGenericContact(DWORD dwUin, const char *szUid, WORD wFamily, WORD wSubType);
void icq_sendNewContact(DWORD dwUin, const char *szUid);
void icq_sendRemoveContact(DWORD dwUin, const char *szUid);
- void icq_sendChangeVisInvis(HCONTACT hContact, DWORD dwUin, char* szUID, int list, int add);
+ void icq_sendChangeVisInvis(MCONTACT hContact, DWORD dwUin, char* szUID, int list, int add);
void icq_sendEntireVisInvisList(int);
void icq_sendAwayMsgReplyServ(DWORD, DWORD, DWORD, WORD, WORD, BYTE, char **);
void icq_sendAwayMsgReplyServExt(DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wCookie, WORD wVersion, BYTE msgType, char **szMsg);
@@ -737,11 +737,11 @@ struct CIcqProto : public PROTO<CIcqProto> void sendOwnerInfoRequest(void);
DWORD sendUserInfoMultiRequest(BYTE *pRequestData, WORD wDataLen, int nItems);
- DWORD icq_SendChannel1Message(DWORD dwUin, char *szUID, HCONTACT hContact, char *pszText, cookie_message_data *pCookieData);
- DWORD icq_SendChannel1MessageW(DWORD dwUin, char *szUID, HCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData); // UTF-16
- DWORD icq_SendChannel2Message(DWORD dwUin, HCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap);
- DWORD icq_SendChannel2Contacts(DWORD dwUin, char *szUid, HCONTACT hContact, const char *pData, WORD wDataLen, const char *pNames, WORD wNamesLen, cookie_message_data *pCookieData);
- DWORD icq_SendChannel4Message(DWORD dwUin, HCONTACT hContact, BYTE bMsgType, WORD wMsgLen, const char *szMsg, cookie_message_data *pCookieData);
+ DWORD icq_SendChannel1Message(DWORD dwUin, char *szUID, MCONTACT hContact, char *pszText, cookie_message_data *pCookieData);
+ DWORD icq_SendChannel1MessageW(DWORD dwUin, char *szUID, MCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData); // UTF-16
+ DWORD icq_SendChannel2Message(DWORD dwUin, MCONTACT hContact, const char *szMessage, int nBodyLength, WORD wPriority, cookie_message_data *pCookieData, char *szCap);
+ DWORD icq_SendChannel2Contacts(DWORD dwUin, char *szUid, MCONTACT hContact, const char *pData, WORD wDataLen, const char *pNames, WORD wNamesLen, cookie_message_data *pCookieData);
+ DWORD icq_SendChannel4Message(DWORD dwUin, MCONTACT hContact, BYTE bMsgType, WORD wMsgLen, const char *szMsg, cookie_message_data *pCookieData);
void icq_sendAdvancedMsgAck(DWORD, DWORD, DWORD, WORD, BYTE, BYTE);
void icq_sendContactsAck(DWORD dwUin, char *szUid, DWORD dwMsgID1, DWORD dwMsgID2);
@@ -766,10 +766,10 @@ struct CIcqProto : public PROTO<CIcqProto> void oft_sendFileRedirect(DWORD dwUin, char *szUid, oscar_filetransfer *ft, DWORD dwIP, WORD wPort, int bProxy);
//---- | icq_svcs.cpp |----------------------------------------------------------------
- HCONTACT AddToListByUIN(DWORD dwUin, DWORD dwFlags);
- HCONTACT AddToListByUID(const char *szUID, DWORD dwFlags);
+ MCONTACT AddToListByUIN(DWORD dwUin, DWORD dwFlags);
+ MCONTACT AddToListByUID(const char *szUID, DWORD dwFlags);
- void ICQAddRecvEvent(HCONTACT hContact, WORD wType, PROTORECVEVENT* pre, DWORD cbBlob, PBYTE pBlob, DWORD flags);
+ void ICQAddRecvEvent(MCONTACT hContact, WORD wType, PROTORECVEVENT* pre, DWORD cbBlob, PBYTE pBlob, DWORD flags);
INT_PTR __cdecl IcqAddCapability(WPARAM wParam, LPARAM lParam);
INT_PTR __cdecl IcqCheckCapability(WPARAM wParam, LPARAM lParam);
@@ -788,22 +788,22 @@ struct CIcqProto : public PROTO<CIcqProto> HGENMENU hXStatusItems[XSTATUS_COUNT + 1];
void InitXStatusItems(BOOL bAllowStatus);
- BYTE getContactXStatus(HCONTACT hContact);
- DWORD sendXStatusDetailsRequest(HCONTACT hContact, int bForced);
- DWORD requestXStatusDetails(HCONTACT hContact, BOOL bAllowDelay);
+ BYTE getContactXStatus(MCONTACT hContact);
+ DWORD sendXStatusDetailsRequest(MCONTACT hContact, int bForced);
+ DWORD requestXStatusDetails(MCONTACT hContact, BOOL bAllowDelay);
HICON getXStatusIcon(int bStatus, UINT flags);
void setXStatusEx(BYTE bXStatus, BYTE bQuiet);
- void handleXStatusCaps(DWORD dwUIN, char *szUID, HCONTACT hContact, BYTE *caps, int capsize, char *moods, int moodsize);
+ void handleXStatusCaps(DWORD dwUIN, char *szUID, MCONTACT hContact, BYTE *caps, int capsize, char *moods, int moodsize);
void updateServerCustomStatus(int fullUpdate);
//----| icq_xtraz.cpp |---------------------------------------------------------------
void handleXtrazNotify(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szMsg, int nMsgLen, BOOL bThruDC);
- void handleXtrazNotifyResponse(DWORD dwUin, HCONTACT hContact, WORD wCookie, char* szMsg, int nMsgLen);
+ void handleXtrazNotifyResponse(DWORD dwUin, MCONTACT hContact, WORD wCookie, char* szMsg, int nMsgLen);
void handleXtrazInvitation(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szMsg, int nMsgLen, BOOL bThruDC);
void handleXtrazData(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szMsg, int nMsgLen, BOOL bThruDC);
- DWORD SendXtrazNotifyRequest(HCONTACT hContact, char* szQuery, char* szNotify, int bForced);
+ DWORD SendXtrazNotifyRequest(MCONTACT hContact, char* szQuery, char* szNotify, int bForced);
void SendXtrazNotifyResponse(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szResponse, int nResponseLen, BOOL bThruDC);
//----| init.cpp |--------------------------------------------------------------------
@@ -821,12 +821,12 @@ struct CIcqProto : public PROTO<CIcqProto> filetransfer *CreateIcqFileTransfer();
void ReleaseFileTransfer(void *ft);
void SafeReleaseFileTransfer(void **ft);
- oscar_filetransfer* FindOscarTransfer(HCONTACT hContact, DWORD dwID1, DWORD dwID2);
+ oscar_filetransfer* FindOscarTransfer(MCONTACT hContact, DWORD dwID1, DWORD dwID2);
oscar_listener* CreateOscarListener(oscar_filetransfer *ft, NETLIBNEWCONNECTIONPROC_V2 handler);
void ReleaseOscarListener(oscar_listener **pListener);
- void OpenOscarConnection(HCONTACT hContact, oscar_filetransfer *ft, int type);
+ void OpenOscarConnection(MCONTACT hContact, oscar_filetransfer *ft, int type);
void CloseOscarConnection(oscar_connection *oc);
int CreateOscarProxyConnection(oscar_connection *oc);
@@ -837,10 +837,10 @@ struct CIcqProto : public PROTO<CIcqProto> void handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *szUID, DWORD dwID1, DWORD dwID2, WORD wCommand);
void handleRecvServResponseOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *szUID, void* ft);
- HANDLE oftInitTransfer(HCONTACT hContact, DWORD dwUin, char *szUid, const TCHAR **pszFiles, const TCHAR *szDescription);
- HANDLE oftFileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- DWORD oftFileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
- DWORD oftFileCancel(HCONTACT hContact, HANDLE hTransfer);
+ HANDLE oftInitTransfer(MCONTACT hContact, DWORD dwUin, char *szUid, const TCHAR **pszFiles, const TCHAR *szDescription);
+ HANDLE oftFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ DWORD oftFileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ DWORD oftFileCancel(MCONTACT hContact, HANDLE hTransfer);
void oftFileResume(oscar_filetransfer *ft, int action, const TCHAR *szFilename);
void sendOscarPacket(oscar_connection *oc, icq_packet *packet);
@@ -864,17 +864,17 @@ struct CIcqProto : public PROTO<CIcqProto> int StringToListItemId(const char *szSetting,int def);
//----| utilities.cpp |---------------------------------------------------------------
- char* ConvertMsgToUserSpecificAnsi(HCONTACT hContact, const char* szMsg);
+ char* ConvertMsgToUserSpecificAnsi(MCONTACT hContact, const char* szMsg);
char* GetUserStoredPassword(char *szBuffer, int cbSize);
char* GetUserPassword(BOOL bAlways);
WORD GetMyStatusFlags();
- DWORD ReportGenericSendError(HCONTACT hContact, int nType, const char* szErrorMsg);
+ DWORD ReportGenericSendError(MCONTACT hContact, int nType, const char* szErrorMsg);
void SetCurrentStatus(int nStatus);
void __cdecl ProtocolAckThread(icq_ack_args* pArguments);
- void SendProtoAck(HCONTACT hContact, DWORD dwCookie, int nAckResult, int nAckType, char* pszMessage);
+ void SendProtoAck(MCONTACT hContact, DWORD dwCookie, int nAckResult, int nAckType, char* pszMessage);
int NetLog_Direct(const char *fmt,...);
int NetLog_Uni(BOOL bDC, const char *fmt,...);
@@ -882,8 +882,8 @@ struct CIcqProto : public PROTO<CIcqProto> icq_critical_section *contactsCacheMutex;
LIST<icq_contacts_cache> contactsCache;
- void AddToContactsCache(HCONTACT hContact, DWORD dwUin, const char *szUid);
- void DeleteFromContactsCache(HCONTACT hContact);
+ void AddToContactsCache(MCONTACT hContact, DWORD dwUin, const char *szUid);
+ void DeleteFromContactsCache(MCONTACT hContact);
void InitContactsCache();
void UninitContactsCache();
@@ -892,38 +892,38 @@ struct CIcqProto : public PROTO<CIcqProto> HANDLE NetLib_BindPort(NETLIBNEWCONNECTIONPROC_V2 pFunc, void* lParam, WORD* pwPort, DWORD* pdwIntIP);
- HCONTACT HandleFromCacheByUid(DWORD dwUin, const char *szUid);
- HCONTACT HContactFromUIN(DWORD dwUin, int *Added);
- HCONTACT HContactFromUID(DWORD dwUin, const char *szUid, int *Added);
- HCONTACT HContactFromAuthEvent(HANDLE hEvent);
+ MCONTACT HandleFromCacheByUid(DWORD dwUin, const char *szUid);
+ MCONTACT HContactFromUIN(DWORD dwUin, int *Added);
+ MCONTACT HContactFromUID(DWORD dwUin, const char *szUid, int *Added);
+ MCONTACT HContactFromAuthEvent(HANDLE hEvent);
void ResetSettingsOnListReload();
void ResetSettingsOnConnect();
void ResetSettingsOnLoad();
- int IsMetaInfoChanged(HCONTACT hContact);
+ int IsMetaInfoChanged(MCONTACT hContact);
char *setStatusNoteText, *setStatusMoodData;
void __cdecl SetStatusNoteThread(void *pArguments);
int SetStatusNote(const char *szStatusNote, DWORD dwDelay, int bForced);
int SetStatusMood(const char *szMoodData, DWORD dwDelay);
- BOOL writeDbInfoSettingString(HCONTACT hContact, const char* szSetting, char** buf, WORD* pwLength);
- BOOL writeDbInfoSettingWord(HCONTACT hContact, const char *szSetting, char **buf, WORD* pwLength);
- BOOL writeDbInfoSettingWordWithTable(HCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength);
- BOOL writeDbInfoSettingByte(HCONTACT hContact, const char *pszSetting, char **buf, WORD* pwLength);
- BOOL writeDbInfoSettingByteWithTable(HCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength);
+ BOOL writeDbInfoSettingString(MCONTACT hContact, const char* szSetting, char** buf, WORD* pwLength);
+ BOOL writeDbInfoSettingWord(MCONTACT hContact, const char *szSetting, char **buf, WORD* pwLength);
+ BOOL writeDbInfoSettingWordWithTable(MCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength);
+ BOOL writeDbInfoSettingByte(MCONTACT hContact, const char *pszSetting, char **buf, WORD* pwLength);
+ BOOL writeDbInfoSettingByteWithTable(MCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength);
- void writeDbInfoSettingTLVStringUtf(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
- void writeDbInfoSettingTLVWord(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
- void writeDbInfoSettingTLVByte(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
- void writeDbInfoSettingTLVDouble(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
- void writeDbInfoSettingTLVDate(HCONTACT hContact, const char *szSettingYear, const char *szSettingMonth, const char *szSettingDay, oscar_tlv_chain *chain, WORD wTlv);
- void writeDbInfoSettingTLVBlob(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVStringUtf(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVWord(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVByte(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVDouble(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVDate(MCONTACT hContact, const char *szSettingYear, const char *szSettingMonth, const char *szSettingDay, oscar_tlv_chain *chain, WORD wTlv);
+ void writeDbInfoSettingTLVBlob(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv);
char** MirandaStatusToAwayMsg(int nStatus);
- bool validateStatusMessageRequest(HCONTACT hContact, WORD byMessageType);
+ bool validateStatusMessageRequest(MCONTACT hContact, WORD byMessageType);
};
#endif
diff --git a/protocols/IcqOscarJ/src/icq_rates.h b/protocols/IcqOscarJ/src/icq_rates.h index 7583bf9cb7..60c7ad6769 100644 --- a/protocols/IcqOscarJ/src/icq_rates.h +++ b/protocols/IcqOscarJ/src/icq_rates.h @@ -108,7 +108,7 @@ public: virtual void execute();
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwUin;
char *szUid;
};
diff --git a/protocols/IcqOscarJ/src/icq_server.cpp b/protocols/IcqOscarJ/src/icq_server.cpp index 3de47b821b..e5691b1215 100644 --- a/protocols/IcqOscarJ/src/icq_server.cpp +++ b/protocols/IcqOscarJ/src/icq_server.cpp @@ -192,7 +192,7 @@ void __cdecl CIcqProto::ServerThread(serverthread_start_info *infoParam) StopAvatarThread();
// Offline all contacts
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact)
{
DWORD dwUIN;
diff --git a/protocols/IcqOscarJ/src/icq_servlist.cpp b/protocols/IcqOscarJ/src/icq_servlist.cpp index df7fdc753f..e103094c57 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.cpp +++ b/protocols/IcqOscarJ/src/icq_servlist.cpp @@ -463,7 +463,7 @@ void CIcqProto::servlistProcessLogin() #define SPOF_AUTO_CREATE_ITEM 0x01
-int CIcqProto::servlistPendingFindItem(int nType, HCONTACT hContact, const char *pszGroup)
+int CIcqProto::servlistPendingFindItem(int nType, MCONTACT hContact, const char *pszGroup)
{
if (servlistPendingList)
for (int i = 0; i < servlistPendingCount; i++)
@@ -489,7 +489,7 @@ void CIcqProto::servlistPendingAddItem(servlistpendingitem *pItem) }
-servlistpendingitem* CIcqProto::servlistPendingRemoveItem(int nType, HCONTACT hContact, const char *pszGroup)
+servlistpendingitem* CIcqProto::servlistPendingRemoveItem(int nType, MCONTACT hContact, const char *pszGroup)
{ // unregister pending item, trigger pending operations
int iItem;
servlistpendingitem *pItem = NULL;
@@ -546,7 +546,7 @@ servlistpendingitem* CIcqProto::servlistPendingRemoveItem(int nType, HCONTACT hC }
-void CIcqProto::servlistPendingAddContactOperation(HCONTACT hContact, LPARAM param, PENDING_CONTACT_CALLBACK callback, DWORD flags)
+void CIcqProto::servlistPendingAddContactOperation(MCONTACT hContact, LPARAM param, PENDING_CONTACT_CALLBACK callback, DWORD flags)
{ // add postponed operation (add contact, update contact, regroup resume, etc.)
// - after contact is added
int iItem;
@@ -599,7 +599,7 @@ void CIcqProto::servlistPendingAddGroupOperation(const char *pszGroup, LPARAM pa }
-int CIcqProto::servlistPendingAddContact(HCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM param, PENDING_CONTACT_CALLBACK callback, int bDoInline, LPARAM operationParam, PENDING_CONTACT_CALLBACK operationCallback)
+int CIcqProto::servlistPendingAddContact(MCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM param, PENDING_CONTACT_CALLBACK callback, int bDoInline, LPARAM operationParam, PENDING_CONTACT_CALLBACK operationCallback)
{
int iItem;
servlistpendingitem *pItem = NULL;
@@ -700,7 +700,7 @@ int CIcqProto::servlistPendingAddGroup(const char *pszGroup, WORD wGroupID, LPAR }
-void CIcqProto::servlistPendingRemoveContact(HCONTACT hContact, WORD wContactID, WORD wGroupID, int nResult)
+void CIcqProto::servlistPendingRemoveContact(MCONTACT hContact, WORD wContactID, WORD wGroupID, int nResult)
{
#ifdef _DEBUG
debugLogA("Server-List: %s contact %x operation.", (nResult != PENDING_RESULT_PURGE) ? "Ending" : "Purging", hContact);
@@ -800,14 +800,14 @@ void CIcqProto::servlistPendingFlushOperations() // used for adding new contacts to list - sync with visible items
-void CIcqProto::AddJustAddedContact(HCONTACT hContact)
+void CIcqProto::AddJustAddedContact(MCONTACT hContact)
{
icq_lock l(servlistMutex);
if (nJustAddedCount >= nJustAddedSize)
{
nJustAddedSize += 10;
- pdwJustAddedList = (HCONTACT*)SAFE_REALLOC(pdwJustAddedList, nJustAddedSize * sizeof(HCONTACT));
+ pdwJustAddedList = (MCONTACT*)SAFE_REALLOC(pdwJustAddedList, nJustAddedSize * sizeof(MCONTACT));
}
pdwJustAddedList[nJustAddedCount] = hContact;
@@ -816,7 +816,7 @@ void CIcqProto::AddJustAddedContact(HCONTACT hContact) // was the contact added during this serv-list load
-BOOL CIcqProto::IsContactJustAdded(HCONTACT hContact)
+BOOL CIcqProto::IsContactJustAdded(MCONTACT hContact)
{
icq_lock l(servlistMutex);
@@ -975,7 +975,7 @@ void CIcqProto::LoadServerIDs() nGroups = nServerIDListCount - nStart;
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact)
{ // search all our contacts, reserve their server IDs
@@ -1147,7 +1147,7 @@ DWORD CIcqProto::icq_sendServerItem(DWORD dwCookie, WORD wAction, WORD wGroupId, }
-DWORD CIcqProto::icq_sendServerContact(HCONTACT hContact, DWORD dwCookie, WORD wAction, WORD wGroupId, WORD wContactId, DWORD dwOperation, DWORD dwTimeout, void **doubleObject)
+DWORD CIcqProto::icq_sendServerContact(MCONTACT hContact, DWORD dwCookie, WORD wAction, WORD wGroupId, WORD wContactId, DWORD dwOperation, DWORD dwTimeout, void **doubleObject)
{
DWORD dwUin;
uid_str szUid;
@@ -1286,7 +1286,7 @@ DWORD CIcqProto::icq_sendServerGroup(DWORD dwCookie, WORD wAction, WORD wGroupId }
-DWORD CIcqProto::icq_modifyServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wAction, DWORD dwOperation, WORD wItemId, WORD wType)
+DWORD CIcqProto::icq_modifyServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wAction, DWORD dwOperation, WORD wItemId, WORD wType)
{
cookie_servlist_action *ack = (cookie_servlist_action*)SAFE_MALLOC(sizeof(cookie_servlist_action));
DWORD dwCookie;
@@ -1306,13 +1306,13 @@ DWORD CIcqProto::icq_modifyServerPrivacyItem(HCONTACT hContact, DWORD dwUin, cha }
-DWORD CIcqProto::icq_removeServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType)
+DWORD CIcqProto::icq_removeServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType)
{
return icq_modifyServerPrivacyItem(hContact, dwUin, szUid, ICQ_LISTS_REMOVEFROMLIST, SSA_PRIVACY_REMOVE, wItemId, wType);
}
-DWORD CIcqProto::icq_addServerPrivacyItem(HCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType)
+DWORD CIcqProto::icq_addServerPrivacyItem(MCONTACT hContact, DWORD dwUin, char *szUid, WORD wItemId, WORD wType)
{
return icq_modifyServerPrivacyItem(hContact, dwUin, szUid, ICQ_LISTS_ADDTOLIST, SSA_PRIVACY_ADD, wItemId, wType);
}
@@ -1360,7 +1360,7 @@ void* CIcqProto::collectBuddyGroup(WORD wGroupID, int *count) {
WORD* buf = NULL;
int cnt = 0;
- HCONTACT hContact;
+ MCONTACT hContact;
WORD wItemID;
hContact = FindFirstContact();
@@ -1395,7 +1395,7 @@ void* CIcqProto::collectGroups(int *count) WORD* buf = NULL;
int cnt = 0;
int i;
- HCONTACT hContact;
+ MCONTACT hContact;
WORD wGroupID;
hContact = FindFirstContact();
@@ -1578,7 +1578,7 @@ int CIcqProto::getCListGroupExists(const char *szGroup) }
-int CIcqProto::moveContactToCListGroup(HCONTACT hContact, const char *szGroup)
+int CIcqProto::moveContactToCListGroup(MCONTACT hContact, const char *szGroup)
{
HANDLE hGroup = Clist_CreateGroup(0, ptrT( mir_utf8decodeT(szGroup)));
@@ -2009,7 +2009,7 @@ int CIcqProto::servlistAddContact_gotGroup(const char *szGroup, WORD wGroupID, L // Need to be called when Pending Contact is active
-int CIcqProto::servlistAddContact_Ready(HCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM lParam, int nResult)
+int CIcqProto::servlistAddContact_Ready(MCONTACT hContact, WORD wContactID, WORD wGroupID, LPARAM lParam, int nResult)
{
cookie_servlist_action* ack = (cookie_servlist_action*)lParam;
@@ -2039,7 +2039,7 @@ int CIcqProto::servlistAddContact_Ready(HCONTACT hContact, WORD wContactID, WORD // Called when contact should be added to server list, if group does not exist, create one
-void CIcqProto::servlistAddContact(HCONTACT hContact, const char *pszGroup)
+void CIcqProto::servlistAddContact(MCONTACT hContact, const char *pszGroup)
{
DWORD dwUin;
uid_str szUid;
@@ -2068,7 +2068,7 @@ void CIcqProto::servlistAddContact(HCONTACT hContact, const char *pszGroup) }
-int CIcqProto::servlistRemoveContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
+int CIcqProto::servlistRemoveContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
{
WORD wGroupID;
WORD wItemID;
@@ -2115,7 +2115,7 @@ int CIcqProto::servlistRemoveContact_Ready(HCONTACT hContact, WORD contactID, WO // Called when contact should be removed from server list, remove group if it remain empty
-void CIcqProto::servlistRemoveContact(HCONTACT hContact)
+void CIcqProto::servlistRemoveContact(MCONTACT hContact)
{
DWORD dwUin;
uid_str szUid;
@@ -2201,7 +2201,7 @@ int CIcqProto::servlistMoveContact_gotTargetGroup(const char *szGroup, WORD wNew }
-int CIcqProto::servlistMoveContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
+int CIcqProto::servlistMoveContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
{
cookie_servlist_action *ack = (cookie_servlist_action*)lParam;
@@ -2233,7 +2233,7 @@ int CIcqProto::servlistMoveContact_Ready(HCONTACT hContact, WORD contactID, WORD // Called when contact should be moved from one group to another, create new, remove empty
-void CIcqProto::servlistMoveContact(HCONTACT hContact, const char *pszNewGroup)
+void CIcqProto::servlistMoveContact(MCONTACT hContact, const char *pszNewGroup)
{
DWORD dwUin;
uid_str szUid;
@@ -2277,7 +2277,7 @@ void CIcqProto::servlistMoveContact(HCONTACT hContact, const char *pszNewGroup) }
-int CIcqProto::servlistUpdateContact_Ready(HCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
+int CIcqProto::servlistUpdateContact_Ready(MCONTACT hContact, WORD contactID, WORD groupID, LPARAM lParam, int nResult)
{
cookie_servlist_action *ack = (cookie_servlist_action*)lParam;
@@ -2326,7 +2326,7 @@ int CIcqProto::servlistUpdateContact_Ready(HCONTACT hContact, WORD contactID, WO // Is called when a contact' details has been changed locally to update
// the server side details.
-void CIcqProto::servlistUpdateContact(HCONTACT hContact)
+void CIcqProto::servlistUpdateContact(MCONTACT hContact)
{
DWORD dwUin;
uid_str szUid;
@@ -2533,7 +2533,7 @@ void CIcqProto::servlistRemoveGroup(const char *szGroup, WORD wGroupId) }*/
-void CIcqProto::resetServContactAuthState(HCONTACT hContact, DWORD dwUin)
+void CIcqProto::resetServContactAuthState(MCONTACT hContact, DWORD dwUin)
{
WORD wContactId = getWord(hContact, DBSETTING_SERVLIST_ID, 0);
WORD wGroupId = getWord(hContact, DBSETTING_SERVLIST_GROUP, 0);
@@ -2593,14 +2593,14 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmpnull(cws->szSetting, "MyHandle") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Update contact's details in server-list
- servlistUpdateContact((HCONTACT)wParam);
+ servlistUpdateContact((MCONTACT)wParam);
}
// Has contact been moved to another group?
if (!strcmpnull(cws->szSetting, "Group") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Read group from DB
- char* szNewGroup = getContactCListGroup((HCONTACT)wParam);
+ char* szNewGroup = getContactCListGroup((MCONTACT)wParam);
SAFE_FREE(&szNewGroup);
}
@@ -2610,7 +2610,7 @@ int CIcqProto::ServListDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmpnull(cws->szSetting, "MyNotes") &&
getByte("StoreServerDetails", DEFAULT_SS_STORE))
{ // Update contact's details in server-list
- servlistUpdateContact((HCONTACT)wParam);
+ servlistUpdateContact((MCONTACT)wParam);
}
}
@@ -2624,17 +2624,17 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam) debugLogA("DB-Events: Contact %x deleted.", wParam);
#endif
- DeleteFromContactsCache((HCONTACT)wParam);
+ DeleteFromContactsCache((MCONTACT)wParam);
if ( !icqOnline() && m_bSsiEnabled)
{ // contact was deleted only locally - retrieve full list on next connect
- setWord((HCONTACT)wParam, "SrvRecordCount", 0);
+ setWord((MCONTACT)wParam, "SrvRecordCount", 0);
}
if ( !icqOnline() || !m_bSsiEnabled)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// we need all server contacts on local buddy list
DWORD dwUIN;
@@ -2674,7 +2674,7 @@ int CIcqProto::ServListDbContactDeleted(WPARAM wParam, LPARAM lParam) int CIcqProto::ServListCListGroupChange(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CLISTGROUPCHANGE *grpchg = (CLISTGROUPCHANGE*)lParam;
if (!icqOnline() || !m_bSsiEnabled || bIsSyncingCL)
diff --git a/protocols/IcqOscarJ/src/icq_servlist.h b/protocols/IcqOscarJ/src/icq_servlist.h index 3325a16538..8da1f32cf4 100644 --- a/protocols/IcqOscarJ/src/icq_servlist.h +++ b/protocols/IcqOscarJ/src/icq_servlist.h @@ -53,12 +53,12 @@ struct CIcqProto;
// callback prototypes for pending operation mechanism:
typedef int (__cdecl CIcqProto::*PENDING_GROUP_CALLBACK)(const char* pszGroup, WORD wGroupId, LPARAM lParam, int nResult);
-typedef int (__cdecl CIcqProto::*PENDING_CONTACT_CALLBACK)(HCONTACT hContact, WORD wContactId, WORD wGroupId, LPARAM lParam, int nResult);
+typedef int (__cdecl CIcqProto::*PENDING_CONTACT_CALLBACK)(MCONTACT hContact, WORD wContactId, WORD wGroupId, LPARAM lParam, int nResult);
// cookie struct for SSI actions
struct cookie_servlist_action
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *szGroup;
WORD wContactId;
WORD wGroupId;
@@ -159,7 +159,7 @@ struct servlistpendingoperation struct servlistpendingitem
{
int nType;
- HCONTACT hContact;
+ MCONTACT hContact;
char* szGroup;
WORD wContactID;
WORD wGroupID;
diff --git a/protocols/IcqOscarJ/src/icq_uploadui.cpp b/protocols/IcqOscarJ/src/icq_uploadui.cpp index ac6b56a295..9f6a5d2080 100644 --- a/protocols/IcqOscarJ/src/icq_uploadui.cpp +++ b/protocols/IcqOscarJ/src/icq_uploadui.cpp @@ -62,7 +62,7 @@ static void UpdateAllContactsCheckmark(HWND hwndList, CIcqProto* ppro, HANDLE ph {
int check = 1;
- HCONTACT hContact = ppro->FindFirstContact();
+ MCONTACT hContact = ppro->FindFirstContact();
while (hContact)
{
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
@@ -87,7 +87,7 @@ static int UpdateCheckmarks(HWND hwndList, CIcqProto* ppro, HANDLE phItemAll) int bAll = 1;
bListInit = 1; // lock CLC events
- HCONTACT hContact = ppro->FindFirstContact();
+ MCONTACT hContact = ppro->FindFirstContact();
while (hContact)
{
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
@@ -112,7 +112,7 @@ static int UpdateCheckmarks(HWND hwndList, CIcqProto* ppro, HANDLE phItemAll) static void DeleteOtherContactsFromControl(HWND hCtrl, CIcqProto* ppro)
{
- 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(hCtrl, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem)
if (!ppro->IsICQContact(hContact))
@@ -191,7 +191,7 @@ static DWORD sendUploadGroup(CIcqProto* ppro, WORD wAction, WORD wGroupId, char* return 0;
}
-static DWORD sendUploadBuddy(CIcqProto* ppro, HCONTACT hContact, WORD wAction, DWORD dwUin, char *szUID, WORD wContactId, WORD wGroupId, WORD wItemType)
+static DWORD sendUploadBuddy(CIcqProto* ppro, MCONTACT hContact, WORD wAction, DWORD dwUin, char *szUID, WORD wContactId, WORD wGroupId, WORD wItemType)
{
DWORD dwCookie;
cookie_servlist_action* ack;
@@ -260,7 +260,7 @@ static INT_PTR CALLBACK DlgProcUploadList(HWND hwndDlg,UINT message,WPARAM wPara static int currentSequence;
static int currentAction;
static int currentState;
- static HCONTACT hCurrentContact;
+ static MCONTACT hCurrentContact;
static int lastAckResult = 0;
static WORD wNewContactId;
static WORD wNewGroupId;
@@ -511,7 +511,7 @@ static INT_PTR CALLBACK DlgProcUploadList(HWND hwndDlg,UINT message,WPARAM wPara // and every time an ack from the server has been taken care of.
case M_UPLOADMORE:
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hItem;
DWORD dwUin;
uid_str szUid;
@@ -933,7 +933,7 @@ static INT_PTR CALLBACK DlgProcUploadList(HWND hwndDlg,UINT message,WPARAM wPara case CLN_CHECKCHANGED:
{
NMCLISTCONTROL *nm = (NMCLISTCONTROL*)lParam;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hItem;
if (bListInit) break;
diff --git a/protocols/IcqOscarJ/src/icq_xstatus.cpp b/protocols/IcqOscarJ/src/icq_xstatus.cpp index 612b970c50..231293a139 100644 --- a/protocols/IcqOscarJ/src/icq_xstatus.cpp +++ b/protocols/IcqOscarJ/src/icq_xstatus.cpp @@ -42,7 +42,7 @@ int OnReloadIcons(WPARAM wParam, LPARAM lParam) return 0;
}
-BYTE CIcqProto::getContactXStatus(HCONTACT hContact)
+BYTE CIcqProto::getContactXStatus(MCONTACT hContact)
{
if (!m_bXStatusEnabled && !m_bMoodsEnabled)
return 0;
@@ -51,7 +51,7 @@ BYTE CIcqProto::getContactXStatus(HCONTACT hContact) return (bXStatus < 1 || bXStatus > XSTATUS_COUNT) ? 0 : bXStatus;
}
-DWORD CIcqProto::sendXStatusDetailsRequest(HCONTACT hContact, int bForced)
+DWORD CIcqProto::sendXStatusDetailsRequest(MCONTACT hContact, int bForced)
{
DWORD dwCookie = 0;
@@ -67,7 +67,7 @@ DWORD CIcqProto::sendXStatusDetailsRequest(HCONTACT hContact, int bForced) return dwCookie;
}
-DWORD CIcqProto::requestXStatusDetails(HCONTACT hContact, BOOL bAllowDelay)
+DWORD CIcqProto::requestXStatusDetails(MCONTACT hContact, BOOL bAllowDelay)
{
if (!validateStatusMessageRequest(hContact, MTYPE_SCRIPT_NOTIFY))
return 0; // apply privacy rules
@@ -169,7 +169,7 @@ HICON CIcqProto::getXStatusIcon(int bStatus, UINT flags) return (flags & LR_SHARED || !icon) ? icon : CopyIcon(icon);
}
-void setContactExtraIcon(HCONTACT hContact, int xstatus)
+void setContactExtraIcon(MCONTACT hContact, int xstatus)
{
ExtraIcon_SetIcon(hExtraXStatus, hContact, (xstatus > 0) ? hXStatusIcons[xstatus-1] : NULL);
}
@@ -393,7 +393,7 @@ const int moodXStatus[XSTATUS_COUNT] = { 81,
84};
-void CIcqProto::handleXStatusCaps(DWORD dwUIN, char *szUID, HCONTACT hContact, BYTE *caps, int capsize, char *moods, int moodsize)
+void CIcqProto::handleXStatusCaps(DWORD dwUIN, char *szUID, MCONTACT hContact, BYTE *caps, int capsize, char *moods, int moodsize)
{
int bChanged = FALSE;
int nCustomStatusID = 0, nMoodID = 0;
@@ -579,7 +579,7 @@ struct SetXStatusData CIcqProto* ppro;
BYTE bAction;
BYTE bXStatus;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hEvent;
DWORD iEvent;
int countdown;
@@ -593,7 +593,7 @@ struct InitXStatusData BYTE bXStatus;
char* szXStatusName;
char* szXStatusMsg;
- HCONTACT hContact;
+ MCONTACT hContact;
};
#define HM_PROTOACK (WM_USER+10)
@@ -912,7 +912,7 @@ INT_PTR CIcqProto::ShowXStatusDetails(WPARAM wParam, LPARAM lParam) InitXStatusData init;
init.ppro = this;
init.bAction = 1; // retrieve
- init.hContact = (HCONTACT)wParam;
+ init.hContact = (MCONTACT)wParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_SETXSTATUS), NULL, SetXStatusDlgProc, (LPARAM)&init);
return 0;
@@ -971,7 +971,7 @@ INT_PTR CIcqProto::SetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::GetXStatusEx(WPARAM wParam, LPARAM lParam)
{
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!m_bXStatusEnabled && !m_bMoodsEnabled) return 1;
@@ -1088,7 +1088,7 @@ INT_PTR CIcqProto::GetXStatusIcon(WPARAM wParam, LPARAM lParam) INT_PTR CIcqProto::RequestXStatusDetails(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!m_bXStatusEnabled)
return 0;
@@ -1105,7 +1105,7 @@ INT_PTR CIcqProto::RequestAdvStatusIconIdx(WPARAM wParam, LPARAM lParam) if (!m_bXStatusEnabled && !m_bMoodsEnabled)
return -1;
- BYTE bXStatus = getContactXStatus((HCONTACT)wParam);
+ BYTE bXStatus = getContactXStatus((MCONTACT)wParam);
if (bXStatus) {
if (!bXStatusCListIconsValid[bXStatus-1]) { // adding icon
int idx = hXStatusCListIcons[bXStatus-1];
diff --git a/protocols/IcqOscarJ/src/icq_xtraz.cpp b/protocols/IcqOscarJ/src/icq_xtraz.cpp index 68bf447e3f..ff4d2a543f 100644 --- a/protocols/IcqOscarJ/src/icq_xtraz.cpp +++ b/protocols/IcqOscarJ/src/icq_xtraz.cpp @@ -35,7 +35,7 @@ void CIcqProto::handleXtrazNotify(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD w char *szNotify = strstrnull(szMsg, "<NOTIFY>");
char *szQuery = strstrnull(szMsg, "<QUERY>");
- HCONTACT hContact = HContactFromUIN(dwUin, NULL);
+ MCONTACT hContact = HContactFromUIN(dwUin, NULL);
if (hContact) // user sent us xtraz, he supports it
SetContactCapabilities(hContact, CAPF_XTRAZ);
@@ -174,7 +174,7 @@ void CIcqProto::handleXtrazNotify(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD w }
-void CIcqProto::handleXtrazNotifyResponse(DWORD dwUin, HCONTACT hContact, WORD wCookie, char* szMsg, int nMsgLen)
+void CIcqProto::handleXtrazNotifyResponse(DWORD dwUin, MCONTACT hContact, WORD wCookie, char* szMsg, int nMsgLen)
{
char *szMem, *szRes, *szEnd;
int nResLen;
@@ -294,7 +294,7 @@ static char* getXmlPidItem(const char* szData, int nLen) void CIcqProto::handleXtrazInvitation(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szMsg, int nMsgLen, BOOL bThruDC)
{
- HCONTACT hContact = HContactFromUIN(dwUin, NULL);
+ MCONTACT hContact = HContactFromUIN(dwUin, NULL);
if (hContact) // user sent us xtraz, he supports it
SetContactCapabilities(hContact, CAPF_XTRAZ);
@@ -310,7 +310,7 @@ void CIcqProto::handleXtrazInvitation(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WO void CIcqProto::handleXtrazData(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCookie, char* szMsg, int nMsgLen, BOOL bThruDC)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char* szPluginID;
hContact = HContactFromUIN(dwUin, NULL);
@@ -367,7 +367,7 @@ void CIcqProto::handleXtrazData(DWORD dwUin, DWORD dwMID, DWORD dwMID2, WORD wCo // Functions really sending Xtraz stuff
-DWORD CIcqProto::SendXtrazNotifyRequest(HCONTACT hContact, char* szQuery, char* szNotify, int bForced)
+DWORD CIcqProto::SendXtrazNotifyRequest(MCONTACT hContact, char* szQuery, char* szNotify, int bForced)
{
char *szQueryBody;
char *szNotifyBody;
@@ -409,9 +409,9 @@ void CIcqProto::SendXtrazNotifyResponse(DWORD dwUin, DWORD dwMID, DWORD dwMID2, char *szResBody = MangleXml(szResponse, nResponseLen);
int nBodyLen = strlennull(szResBody) + 21;
char *szBody = (char*)_alloca(nBodyLen);
- HCONTACT hContact = HContactFromUIN(dwUin, NULL);
+ MCONTACT hContact = HContactFromUIN(dwUin, NULL);
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && !CheckContactCapabilities(hContact, CAPF_XTRAZ)) {
+ if (hContact != INVALID_CONTACT_ID && !CheckContactCapabilities(hContact, CAPF_XTRAZ)) {
SAFE_FREE(&szResBody);
return; // Contact does not support xtraz, do not send anything
}
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index d8b59e2ff4..69df16b526 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -38,12 +38,12 @@ INT_PTR CIcqProto::AddServerContact(WPARAM wParam, LPARAM lParam) if (!m_bSsiEnabled) return 0;
// Does this contact have a UID?
- if (!getContactUid((HCONTACT)wParam, &dwUin, &szUid) && !getWord((HCONTACT)wParam, DBSETTING_SERVLIST_ID, 0) && !getWord((HCONTACT)wParam, DBSETTING_SERVLIST_IGNORE, 0))
+ if (!getContactUid((MCONTACT)wParam, &dwUin, &szUid) && !getWord((MCONTACT)wParam, DBSETTING_SERVLIST_ID, 0) && !getWord((MCONTACT)wParam, DBSETTING_SERVLIST_IGNORE, 0))
{ /// TODO: remove possible 0x6A TLV in contact server-list data!!!
// Read group from DB
- char *pszGroup = getContactCListGroup((HCONTACT)wParam);
+ char *pszGroup = getContactCListGroup((MCONTACT)wParam);
- servlistAddContact((HCONTACT)wParam, pszGroup);
+ servlistAddContact((MCONTACT)wParam, pszGroup);
SAFE_FREE((void**)&pszGroup);
}
return 0;
@@ -88,7 +88,7 @@ INT_PTR CIcqProto::GetInfoSetting(WPARAM wParam, LPARAM lParam) {
DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam;
BYTE type = cgs->pValue->type;
- INT_PTR rc = db_get_s((HCONTACT)wParam, cgs->szModule, cgs->szSetting, cgs->pValue, 0);
+ INT_PTR rc = db_get_s((MCONTACT)wParam, cgs->szModule, cgs->szSetting, cgs->pValue, 0);
if (rc)
return rc;
@@ -458,13 +458,13 @@ INT_PTR CIcqProto::GrantAuthorization(WPARAM wParam, LPARAM lParam) DWORD dwUin;
uid_str szUid;
- if (getContactUid((HCONTACT)wParam, &dwUin, &szUid))
+ if (getContactUid((MCONTACT)wParam, &dwUin, &szUid))
return 0; // Invalid contact
// send without reason, do we need any ?
icq_sendGrantAuthServ(dwUin, szUid, NULL);
// auth granted, remove contact menu item
- delSetting((HCONTACT)wParam, "Grant");
+ delSetting((MCONTACT)wParam, "Grant");
}
return 0;
@@ -494,7 +494,7 @@ INT_PTR CIcqProto::RevokeAuthorization(WPARAM wParam, LPARAM lParam) DWORD dwUin;
uid_str szUid;
- if (getContactUid((HCONTACT)wParam, &dwUin, &szUid))
+ if (getContactUid((MCONTACT)wParam, &dwUin, &szUid))
return 0; // Invalid contact
if (MessageBox(NULL, TranslateT("Are you sure you want to revoke user's authorization?\nThis will remove you from his/her list on some clients."), TranslateT("Confirmation"), MB_ICONQUESTION | MB_YESNO) != IDYES)
@@ -633,10 +633,10 @@ INT_PTR CIcqProto::SetPassword(WPARAM wParam, LPARAM lParam) // TODO: Adding needs some more work in general
-HCONTACT CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags)
+MCONTACT CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags)
{
int bAdded;
- HCONTACT hContact = HContactFromUIN(dwUin, &bAdded);
+ MCONTACT hContact = HContactFromUIN(dwUin, &bAdded);
if (hContact)
{
if (!(dwFlags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 0))
@@ -652,10 +652,10 @@ HCONTACT CIcqProto::AddToListByUIN(DWORD dwUin, DWORD dwFlags) }
-HCONTACT CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags)
+MCONTACT CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags)
{
int bAdded;
- HCONTACT hContact = HContactFromUID(0, szUID, &bAdded);
+ MCONTACT hContact = HContactFromUID(0, szUID, &bAdded);
if (hContact)
{
if (!(dwFlags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 0))
@@ -673,7 +673,7 @@ HCONTACT CIcqProto::AddToListByUID(const char *szUID, DWORD dwFlags) /////////////////////////////////////////////////////////////////////////////////////////
-void CIcqProto::ICQAddRecvEvent(HCONTACT hContact, WORD wType, PROTORECVEVENT* pre, DWORD cbBlob, PBYTE pBlob, DWORD flags)
+void CIcqProto::ICQAddRecvEvent(MCONTACT hContact, WORD wType, PROTORECVEVENT* pre, DWORD cbBlob, PBYTE pBlob, DWORD flags)
{
if (pre->flags & PREF_CREATEREAD)
flags |= DBEF_READ;
@@ -714,7 +714,7 @@ INT_PTR __cdecl CIcqProto::IcqCheckCapability(WPARAM wParam, LPARAM lParam) {
int res = 0;
DBVARIANT dbvariant;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ICQ_CUSTOMCAP *icqCustomCap = (ICQ_CUSTOMCAP *)lParam;
db_get(hContact, m_szModuleName, "CapBuf", &dbvariant);
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp index b9d112dff3..5643c5ceae 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.cpp +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.cpp @@ -33,7 +33,7 @@ struct oscarthreadstartinfo {
int type;
int incoming;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hConnection;
DWORD dwRemoteIP;
oscar_filetransfer *ft;
@@ -171,7 +171,7 @@ int CIcqProto::IsValidOscarTransfer(void *ft) }
-oscar_filetransfer* CIcqProto::FindOscarTransfer(HCONTACT hContact, DWORD dwID1, DWORD dwID2)
+oscar_filetransfer* CIcqProto::FindOscarTransfer(MCONTACT hContact, DWORD dwID1, DWORD dwID2)
{
icq_lock l(oftMutex);
@@ -377,7 +377,7 @@ void CIcqProto::ReleaseOscarListener(oscar_listener **pListener) void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *szUID, DWORD dwID1, DWORD dwID2, WORD wCommand)
{
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (wCommand == 0)
{ // this is OFT request
@@ -559,7 +559,7 @@ void CIcqProto::handleRecvServMsgOFT(BYTE *buf, WORD wLen, DWORD dwUin, char *sz }
}
int bAdded;
- HCONTACT hContact = HContactFromUID(dwUin, szUID, &bAdded);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, &bAdded);
ft->hContact = hContact;
ft->fileId = -1;
@@ -838,7 +838,7 @@ static char *oftGetFileContainer(oscar_filetransfer* oft, const char** files, in }
-HANDLE CIcqProto::oftInitTransfer(HCONTACT hContact, DWORD dwUin, char* szUid, const TCHAR** files, const TCHAR* pszDesc)
+HANDLE CIcqProto::oftInitTransfer(MCONTACT hContact, DWORD dwUin, char* szUid, const TCHAR** files, const TCHAR* pszDesc)
{
int i, filesCount;
struct _stati64 statbuf;
@@ -992,7 +992,7 @@ HANDLE CIcqProto::oftInitTransfer(HCONTACT hContact, DWORD dwUin, char* szUid, c }
-HANDLE CIcqProto::oftFileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
+HANDLE CIcqProto::oftFileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
{
oscar_filetransfer *ft = (oscar_filetransfer*)hTransfer;
DWORD dwUin;
@@ -1025,7 +1025,7 @@ HANDLE CIcqProto::oftFileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR }
-DWORD CIcqProto::oftFileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason)
+DWORD CIcqProto::oftFileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason)
{
oscar_filetransfer *ft = (oscar_filetransfer*)hTransfer;
DWORD dwUin;
@@ -1054,7 +1054,7 @@ DWORD CIcqProto::oftFileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *s }
-DWORD CIcqProto::oftFileCancel(HCONTACT hContact, HANDLE hTransfer)
+DWORD CIcqProto::oftFileCancel(MCONTACT hContact, HANDLE hTransfer)
{
oscar_filetransfer* ft = (oscar_filetransfer*)hTransfer;
DWORD dwUin;
@@ -1231,7 +1231,7 @@ void CIcqProto::CloseOscarConnection(oscar_connection *oc) /////////////////////////////////////////////////////////////////////////////////////////
-void CIcqProto::OpenOscarConnection(HCONTACT hContact, oscar_filetransfer *ft, int type)
+void CIcqProto::OpenOscarConnection(MCONTACT hContact, oscar_filetransfer *ft, int type)
{
oscarthreadstartinfo *otsi = (oscarthreadstartinfo*)SAFE_MALLOC(sizeof(oscarthreadstartinfo));
diff --git a/protocols/IcqOscarJ/src/oscar_filetransfer.h b/protocols/IcqOscarJ/src/oscar_filetransfer.h index bf4162b50b..36a7c738de 100644 --- a/protocols/IcqOscarJ/src/oscar_filetransfer.h +++ b/protocols/IcqOscarJ/src/oscar_filetransfer.h @@ -62,7 +62,7 @@ char *FindFilePathContainer(const char **files, int iFile, char *szContainer); struct oscar_filetransfer: public basic_filetransfer
{
- HCONTACT hContact;
+ MCONTACT hContact;
int flags; // combination of OFTF_*
int containerCount;
char **file_containers;
@@ -123,7 +123,7 @@ void SafeReleaseFileTransfer(void **ft); struct oscar_connection
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hConnection;
int status;
DWORD dwUin;
diff --git a/protocols/IcqOscarJ/src/stdpackets.cpp b/protocols/IcqOscarJ/src/stdpackets.cpp index eb36b3277c..a502a09005 100644 --- a/protocols/IcqOscarJ/src/stdpackets.cpp +++ b/protocols/IcqOscarJ/src/stdpackets.cpp @@ -310,7 +310,7 @@ void CIcqProto::icq_setstatus(WORD wStatus, const char *szStatusNote) }
-DWORD CIcqProto::icq_SendChannel1Message(DWORD dwUin, char *szUID, HCONTACT hContact, char *pszText, cookie_message_data *pCookieData)
+DWORD CIcqProto::icq_SendChannel1Message(DWORD dwUin, char *szUID, MCONTACT hContact, char *pszText, cookie_message_data *pCookieData)
{
icq_packet packet;
WORD wPacketLength;
@@ -355,7 +355,7 @@ DWORD CIcqProto::icq_SendChannel1Message(DWORD dwUin, char *szUID, HCONTACT hCon }
-DWORD CIcqProto::icq_SendChannel1MessageW(DWORD dwUin, char *szUID, HCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData)
+DWORD CIcqProto::icq_SendChannel1MessageW(DWORD dwUin, char *szUID, MCONTACT hContact, WCHAR *pszText, cookie_message_data *pCookieData)
{
icq_packet packet;
WORD wMessageLen;
@@ -405,7 +405,7 @@ DWORD CIcqProto::icq_SendChannel1MessageW(DWORD dwUin, char *szUID, HCONTACT hCo }
-DWORD CIcqProto::icq_SendChannel2Message(DWORD dwUin, HCONTACT hContact, const char *szMessage, int nBodyLen, WORD wPriority, cookie_message_data *pCookieData, char *szCap)
+DWORD CIcqProto::icq_SendChannel2Message(DWORD dwUin, MCONTACT hContact, const char *szMessage, int nBodyLen, WORD wPriority, cookie_message_data *pCookieData, char *szCap)
{
icq_packet packet;
@@ -433,7 +433,7 @@ DWORD CIcqProto::icq_SendChannel2Message(DWORD dwUin, HCONTACT hContact, const c }
-DWORD CIcqProto::icq_SendChannel2Contacts(DWORD dwUin, char *szUid, HCONTACT hContact, const char *pData, WORD wDataLen, const char *pNames, WORD wNamesLen, cookie_message_data *pCookieData)
+DWORD CIcqProto::icq_SendChannel2Contacts(DWORD dwUin, char *szUid, MCONTACT hContact, const char *pData, WORD wDataLen, const char *pNames, WORD wNamesLen, cookie_message_data *pCookieData)
{
icq_packet packet;
@@ -462,7 +462,7 @@ DWORD CIcqProto::icq_SendChannel2Contacts(DWORD dwUin, char *szUid, HCONTACT hCo }
-DWORD CIcqProto::icq_SendChannel4Message(DWORD dwUin, HCONTACT hContact, BYTE bMsgType, WORD wMsgLen, const char *szMsg, cookie_message_data *pCookieData)
+DWORD CIcqProto::icq_SendChannel4Message(DWORD dwUin, MCONTACT hContact, BYTE bMsgType, WORD wMsgLen, const char *szMsg, cookie_message_data *pCookieData)
{
icq_packet packet;
WORD wPacketLength;
@@ -552,7 +552,7 @@ DWORD CIcqProto::sendUserInfoMultiRequest(BYTE *pRequestData, WORD wDataLen, int }
-DWORD CIcqProto::icq_sendGetInfoServ(HCONTACT hContact, DWORD dwUin, int bManual)
+DWORD CIcqProto::icq_sendGetInfoServ(MCONTACT hContact, DWORD dwUin, int bManual)
{
icq_packet packet;
DWORD dwCookie = 0;
@@ -607,7 +607,7 @@ DWORD CIcqProto::icq_sendGetInfoServ(HCONTACT hContact, DWORD dwUin, int bManual }
-DWORD CIcqProto::icq_sendGetAimProfileServ(HCONTACT hContact, char* szUid)
+DWORD CIcqProto::icq_sendGetAimProfileServ(MCONTACT hContact, char* szUid)
{
icq_packet packet;
BYTE bUIDlen = strlennull(szUid);
@@ -632,7 +632,7 @@ DWORD CIcqProto::icq_sendGetAimProfileServ(HCONTACT hContact, char* szUid) }
-DWORD CIcqProto::icq_sendGetAwayMsgServ(HCONTACT hContact, DWORD dwUin, int type, WORD wVersion)
+DWORD CIcqProto::icq_sendGetAwayMsgServ(MCONTACT hContact, DWORD dwUin, int type, WORD wVersion)
{
icq_packet packet;
@@ -650,7 +650,7 @@ DWORD CIcqProto::icq_sendGetAwayMsgServ(HCONTACT hContact, DWORD dwUin, int type }
-DWORD CIcqProto::icq_sendGetAwayMsgServExt(HCONTACT hContact, DWORD dwUin, char *szUID, int type, WORD wVersion)
+DWORD CIcqProto::icq_sendGetAwayMsgServExt(MCONTACT hContact, DWORD dwUin, char *szUID, int type, WORD wVersion)
{
icq_packet packet;
@@ -684,7 +684,7 @@ DWORD CIcqProto::icq_sendGetAwayMsgServExt(HCONTACT hContact, DWORD dwUin, char }
-DWORD CIcqProto::icq_sendGetAimAwayMsgServ(HCONTACT hContact, char *szUID, int type)
+DWORD CIcqProto::icq_sendGetAimAwayMsgServ(MCONTACT hContact, char *szUID, int type)
{
icq_packet packet;
BYTE bUIDlen = strlennull(szUID);
@@ -988,7 +988,7 @@ void CIcqProto::icq_sendFileDenyServ(DWORD dwUin, filetransfer *ft, const char * void CIcqProto::icq_sendAwayMsgReplyServ(DWORD dwUin, DWORD dwMsgID1, DWORD dwMsgID2, WORD wCookie, WORD wVersion, BYTE msgType, char** szMsg)
{
- HCONTACT hContact = HContactFromUIN(dwUin, NULL);
+ MCONTACT hContact = HContactFromUIN(dwUin, NULL);
if (validateStatusMessageRequest(hContact, msgType)) {
NotifyEventHooks(m_modeMsgsEvent, (WPARAM)msgType, (LPARAM)dwUin);
@@ -1032,7 +1032,7 @@ void CIcqProto::icq_sendAwayMsgReplyServ(DWORD dwUin, DWORD dwMsgID1, DWORD dwMs void CIcqProto::icq_sendAwayMsgReplyServExt(DWORD dwUin, char *szUID, DWORD dwMsgID1, DWORD dwMsgID2, WORD wCookie, WORD wVersion, BYTE msgType, char **szMsg)
{
- HCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
+ MCONTACT hContact = HContactFromUID(dwUin, szUID, NULL);
if (validateStatusMessageRequest(hContact, msgType)) {
NotifyEventHooks(m_modeMsgsEvent, (WPARAM)msgType, (LPARAM)dwUin);
@@ -1551,7 +1551,7 @@ void CIcqProto::icq_sendRemoveContact(DWORD dwUin, const char *szUid) // list==0: visible list
// list==1: invisible list
-void CIcqProto::icq_sendChangeVisInvis(HCONTACT hContact, DWORD dwUin, char* szUID, int list, int add)
+void CIcqProto::icq_sendChangeVisInvis(MCONTACT hContact, DWORD dwUin, char* szUID, int list, int add)
{ // TODO: This needs grouping & rate management
// Tell server to change our server-side contact visbility list
if (m_bSsiEnabled) {
diff --git a/protocols/IcqOscarJ/src/utilities.cpp b/protocols/IcqOscarJ/src/utilities.cpp index 2c38bcd74a..deafab4806 100644 --- a/protocols/IcqOscarJ/src/utilities.cpp +++ b/protocols/IcqOscarJ/src/utilities.cpp @@ -340,7 +340,7 @@ BOOL CIcqProto::IsOnSpammerList(DWORD dwUIN) // ICQ contacts cache
-void CIcqProto::AddToContactsCache(HCONTACT hContact, DWORD dwUin, const char *szUid)
+void CIcqProto::AddToContactsCache(MCONTACT hContact, DWORD dwUin, const char *szUid)
{
if (!hContact || (!dwUin && !szUid))
return;
@@ -372,7 +372,7 @@ void CIcqProto::InitContactsCache() // build cache
icq_lock l(contactsCacheMutex);
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact) {
DWORD dwUin;
@@ -411,7 +411,7 @@ void CIcqProto::UninitContactsCache(void) }
-void CIcqProto::DeleteFromContactsCache(HCONTACT hContact)
+void CIcqProto::DeleteFromContactsCache(MCONTACT hContact)
{
icq_lock l(contactsCacheMutex);
@@ -432,7 +432,7 @@ void CIcqProto::DeleteFromContactsCache(HCONTACT hContact) }
-HCONTACT CIcqProto::HandleFromCacheByUid(DWORD dwUin, const char *szUid)
+MCONTACT CIcqProto::HandleFromCacheByUid(DWORD dwUin, const char *szUid)
{
icq_contacts_cache cache_item = { NULL, dwUin, szUid };
@@ -446,11 +446,11 @@ HCONTACT CIcqProto::HandleFromCacheByUid(DWORD dwUin, const char *szUid) }
-HCONTACT CIcqProto::HContactFromUIN(DWORD dwUin, int *Added)
+MCONTACT CIcqProto::HContactFromUIN(DWORD dwUin, int *Added)
{
if (Added) *Added = 0;
- HCONTACT hContact = HandleFromCacheByUid(dwUin, NULL);
+ MCONTACT hContact = HandleFromCacheByUid(dwUin, NULL);
if (hContact)
return hContact;
@@ -469,17 +469,17 @@ HCONTACT CIcqProto::HContactFromUIN(DWORD dwUin, int *Added) //not present: add
if (Added) {
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (!hContact) {
debugLogA("Failed to create ICQ contact %u", dwUin);
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
}
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName) != 0) {
// For some reason we failed to register the protocol to this contact
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
debugLogA("Failed to register ICQ contact %u", dwUin);
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
}
setDword(hContact, UNIQUEIDSETTING, dwUin);
@@ -505,11 +505,11 @@ HCONTACT CIcqProto::HContactFromUIN(DWORD dwUin, int *Added) if (getContactUin(NULL) == dwUin)
return NULL;
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
}
-HCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added)
+MCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added)
{
if (dwUin)
return HContactFromUIN(dwUin, Added);
@@ -517,9 +517,9 @@ HCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added) if (Added) *Added = 0;
if (!m_bAimEnabled)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
- HCONTACT hContact = HandleFromCacheByUid(dwUin, szUid);
+ MCONTACT hContact = HandleFromCacheByUid(dwUin, szUid);
if (hContact) return hContact;
hContact = FindFirstContact();
@@ -540,7 +540,7 @@ HCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added) //not present: add
if (Added) {
- 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)m_szModuleName);
setString(hContact, UNIQUEIDSETTING, szUid);
@@ -560,11 +560,11 @@ HCONTACT CIcqProto::HContactFromUID(DWORD dwUin, const char *szUid, int *Added) return hContact;
}
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
}
-HCONTACT CIcqProto::HContactFromAuthEvent(HANDLE hEvent)
+MCONTACT CIcqProto::HContactFromAuthEvent(HANDLE hEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
DWORD body[3];
@@ -573,28 +573,28 @@ HCONTACT CIcqProto::HContactFromAuthEvent(HANDLE hEvent) dbei.pBlob = (PBYTE)&body;
if (db_event_get(hEvent, &dbei))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (strcmpnull(dbei.szModule, m_szModuleName))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
return DbGetAuthEventContact(&dbei);
}
-char *NickFromHandle(HCONTACT hContact)
+char *NickFromHandle(MCONTACT hContact)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
return null_strdup(Translate("<invalid>"));
return null_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
}
-char *NickFromHandleUtf(HCONTACT hContact)
+char *NickFromHandleUtf(MCONTACT hContact)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
return ICQTranslateUtf(LPGEN("<invalid>"));
return tchar_to_utf8((TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
@@ -888,7 +888,7 @@ void CIcqProto::ResetSettingsOnListReload() setWord("SrvRecordCount", 0);
delSetting(DBSETTING_SERVLIST_UNHANDLED);
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact) {
// All these values will be restored during the serv-list receive
@@ -912,7 +912,7 @@ void CIcqProto::ResetSettingsOnConnect() setByte("SrvVisibility", 0);
setDword("IdleTS", 0);
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact) {
setDword(hContact, "LogonTS", 0);
@@ -933,7 +933,7 @@ void CIcqProto::ResetSettingsOnLoad() setDword("IdleTS", 0);
setDword("LogonTS", 0);
- HCONTACT hContact = FindFirstContact();
+ MCONTACT hContact = FindFirstContact();
while (hContact) {
setDword(hContact, "LogonTS", 0);
@@ -989,7 +989,7 @@ void __cdecl CIcqProto::ProtocolAckThread(icq_ack_args* pArguments) SAFE_FREE((void**)&pArguments);
}
-void CIcqProto::SendProtoAck(HCONTACT hContact, DWORD dwCookie, int nAckResult, int nAckType, char* pszMessage)
+void CIcqProto::SendProtoAck(MCONTACT hContact, DWORD dwCookie, int nAckResult, int nAckType, char* pszMessage)
{
icq_ack_args* pArgs = (icq_ack_args*)SAFE_MALLOC(sizeof(icq_ack_args)); // This will be freed in the new thread
pArgs->hContact = hContact;
@@ -1010,7 +1010,7 @@ void CIcqProto::SetCurrentStatus(int nStatus) }
-int CIcqProto::IsMetaInfoChanged(HCONTACT hContact)
+int CIcqProto::IsMetaInfoChanged(MCONTACT hContact)
{
DBVARIANT infoToken = { DBVT_DELETED };
int res = 0;
@@ -1250,7 +1250,7 @@ int CIcqProto::SetStatusMood(const char *szMoodData, DWORD dwDelay) }
-void CIcqProto::writeDbInfoSettingTLVStringUtf(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVStringUtf(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
oscar_tlv *pTLV = chain->getTLV(wTlv, 1);
@@ -1265,7 +1265,7 @@ void CIcqProto::writeDbInfoSettingTLVStringUtf(HCONTACT hContact, const char *sz }
-void CIcqProto::writeDbInfoSettingTLVWord(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVWord(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
int num = chain->getNumber(wTlv, 1);
if (num > 0)
@@ -1275,7 +1275,7 @@ void CIcqProto::writeDbInfoSettingTLVWord(HCONTACT hContact, const char *szSetti }
-void CIcqProto::writeDbInfoSettingTLVByte(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVByte(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
int num = chain->getNumber(wTlv, 1);
@@ -1286,7 +1286,7 @@ void CIcqProto::writeDbInfoSettingTLVByte(HCONTACT hContact, const char *szSetti }
-void CIcqProto::writeDbInfoSettingTLVDouble(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVDouble(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
double num = chain->getDouble(wTlv, 1);
if (num > 0)
@@ -1295,7 +1295,7 @@ void CIcqProto::writeDbInfoSettingTLVDouble(HCONTACT hContact, const char *szSet delSetting(hContact, szSetting);
}
-void CIcqProto::writeDbInfoSettingTLVDate(HCONTACT hContact, const char* szSettingYear, const char* szSettingMonth, const char* szSettingDay, oscar_tlv_chain* chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVDate(MCONTACT hContact, const char* szSettingYear, const char* szSettingMonth, const char* szSettingDay, oscar_tlv_chain* chain, WORD wTlv)
{
double time = chain->getDouble(wTlv, 1);
@@ -1320,7 +1320,7 @@ void CIcqProto::writeDbInfoSettingTLVDate(HCONTACT hContact, const char* szSetti }
-void CIcqProto::writeDbInfoSettingTLVBlob(HCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
+void CIcqProto::writeDbInfoSettingTLVBlob(MCONTACT hContact, const char *szSetting, oscar_tlv_chain *chain, WORD wTlv)
{
oscar_tlv *pTLV = chain->getTLV(wTlv, 1);
@@ -1331,7 +1331,7 @@ void CIcqProto::writeDbInfoSettingTLVBlob(HCONTACT hContact, const char *szSetti }
-BOOL CIcqProto::writeDbInfoSettingString(HCONTACT hContact, const char* szSetting, char** buf, WORD* pwLength)
+BOOL CIcqProto::writeDbInfoSettingString(MCONTACT hContact, const char* szSetting, char** buf, WORD* pwLength)
{
if (*pwLength < 2)
return FALSE;
@@ -1364,7 +1364,7 @@ BOOL CIcqProto::writeDbInfoSettingString(HCONTACT hContact, const char* szSettin return TRUE;
}
-BOOL CIcqProto::writeDbInfoSettingWord(HCONTACT hContact, const char *szSetting, char **buf, WORD* pwLength)
+BOOL CIcqProto::writeDbInfoSettingWord(MCONTACT hContact, const char *szSetting, char **buf, WORD* pwLength)
{
if (*pwLength < 2)
return FALSE;
@@ -1381,7 +1381,7 @@ BOOL CIcqProto::writeDbInfoSettingWord(HCONTACT hContact, const char *szSetting, return TRUE;
}
-BOOL CIcqProto::writeDbInfoSettingWordWithTable(HCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength)
+BOOL CIcqProto::writeDbInfoSettingWordWithTable(MCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength)
{
if (*pwLength < 2)
return FALSE;
@@ -1400,7 +1400,7 @@ BOOL CIcqProto::writeDbInfoSettingWordWithTable(HCONTACT hContact, const char *s return TRUE;
}
-BOOL CIcqProto::writeDbInfoSettingByte(HCONTACT hContact, const char *pszSetting, char **buf, WORD* pwLength)
+BOOL CIcqProto::writeDbInfoSettingByte(MCONTACT hContact, const char *pszSetting, char **buf, WORD* pwLength)
{
if (*pwLength < 1)
return FALSE;
@@ -1417,7 +1417,7 @@ BOOL CIcqProto::writeDbInfoSettingByte(HCONTACT hContact, const char *pszSetting return TRUE;
}
-BOOL CIcqProto::writeDbInfoSettingByteWithTable(HCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength)
+BOOL CIcqProto::writeDbInfoSettingByteWithTable(MCONTACT hContact, const char *szSetting, const FieldNamesItem *table, char **buf, WORD* pwLength)
{
if (*pwLength < 1)
return FALSE;
@@ -1450,12 +1450,12 @@ char* time2text(time_t time) }
-bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageType)
+bool CIcqProto::validateStatusMessageRequest(MCONTACT hContact, WORD byMessageType)
{
// Privacy control
if (getByte("StatusMsgReplyCList", 0)) {
// Don't send statusmessage to unknown contacts
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact == INVALID_CONTACT_ID)
return false;
// Don't send statusmessage to temporary contacts or hidden contacts
@@ -1472,7 +1472,7 @@ bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageTy }
// Dont send messages to people you are hiding from
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE &&
+ if (hContact != INVALID_CONTACT_ID &&
getWord(hContact, "ApparentMode", 0) == ID_STATUS_OFFLINE) {
return false;
}
@@ -1487,7 +1487,7 @@ bool CIcqProto::validateStatusMessageRequest(HCONTACT hContact, WORD byMessageTy return false;
}
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && m_iStatus == ID_STATUS_INVISIBLE &&
+ if (hContact != INVALID_CONTACT_ID && m_iStatus == ID_STATUS_INVISIBLE &&
getWord(hContact, "ApparentMode", 0) != ID_STATUS_ONLINE) {
if (!getByte(hContact, "TemporaryVisible", 0)) { // Allow request to temporary visible contacts
return false;
@@ -1904,7 +1904,7 @@ int MessageBoxUtf(HWND hWnd, const char *szText, const char *szCaption, UINT uTy return res;
}
-char* CIcqProto::ConvertMsgToUserSpecificAnsi(HCONTACT hContact, const char* szMsg)
+char* CIcqProto::ConvertMsgToUserSpecificAnsi(MCONTACT hContact, const char* szMsg)
{ // this takes utf-8 encoded message
WORD wCP = getWord(hContact, "CodePage", m_wAnsiCodepage);
char* szAnsi = NULL;
@@ -1917,7 +1917,7 @@ char* CIcqProto::ConvertMsgToUserSpecificAnsi(HCONTACT hContact, const char* szM }
// just broadcast generic send error with dummy cookie and return that cookie
-DWORD CIcqProto::ReportGenericSendError(HCONTACT hContact, int nType, const char* szErrorMsg)
+DWORD CIcqProto::ReportGenericSendError(MCONTACT hContact, int nType, const char* szErrorMsg)
{
DWORD dwCookie = GenerateCookie(0);
SendProtoAck(hContact, dwCookie, ACKRESULT_FAILED, nType, Translate(szErrorMsg));
diff --git a/protocols/IcqOscarJ/src/utilities.h b/protocols/IcqOscarJ/src/utilities.h index c229feac2a..b9f063ee74 100644 --- a/protocols/IcqOscarJ/src/utilities.h +++ b/protocols/IcqOscarJ/src/utilities.h @@ -33,7 +33,7 @@ struct icq_ack_args
{
- HCONTACT hContact;
+ MCONTACT hContact;
int nAckType;
int nAckResult;
HANDLE hSequence;
@@ -42,7 +42,7 @@ struct icq_ack_args struct icq_contacts_cache
{
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwUin;
const char *szUid;
};
@@ -66,8 +66,8 @@ void SetGatewayIndex(HANDLE hConn, DWORD dwIndex); DWORD GetGatewayIndex(HANDLE hConn);
void FreeGatewayIndex(HANDLE hConn);
-char *NickFromHandle(HCONTACT hContact);
-char *NickFromHandleUtf(HCONTACT hContact);
+char *NickFromHandle(MCONTACT hContact);
+char *NickFromHandleUtf(MCONTACT hContact);
char *strUID(DWORD dwUIN, char *pszUID);
int __fastcall strlennull(const char *string);
@@ -181,7 +181,7 @@ int ListBoxAddStringUtf(HWND hList, const char *szString); int MessageBoxUtf(HWND hWnd, const char *szText, const char *szCaption, UINT uType);
void InitXStatusIcons();
-void setContactExtraIcon(HCONTACT hContact, int xstatus);
+void setContactExtraIcon(MCONTACT hContact, int xstatus);
int OnReloadIcons(WPARAM wParam, LPARAM lParam);
#endif /* __UTILITIES_H */
diff --git a/protocols/JabberG/src/jabber.h b/protocols/JabberG/src/jabber.h index bf7839a11e..04634dce2c 100644 --- a/protocols/JabberG/src/jabber.h +++ b/protocols/JabberG/src/jabber.h @@ -363,7 +363,7 @@ struct ThreadData // for nick names resolving
int resolveID;
- HCONTACT resolveContact;
+ MCONTACT resolveContact;
// features & registration
HWND reg_hwndDlg;
@@ -760,7 +760,7 @@ void strdel(char* parBuffer, int len); //---- jabber_userinfo.cpp --------------------------------------------------------------
-void JabberUserInfoUpdate(HCONTACT hContact);
+void JabberUserInfoUpdate(MCONTACT hContact);
//---- jabber_iq_handlers.cpp
BOOL GetOSDisplayString(LPTSTR pszOS, int BUFSIZE);
diff --git a/protocols/JabberG/src/jabber_adhoc.cpp b/protocols/JabberG/src/jabber_adhoc.cpp index f3777d0ff9..2e0df413f3 100644 --- a/protocols/JabberG/src/jabber_adhoc.cpp +++ b/protocols/JabberG/src/jabber_adhoc.cpp @@ -510,7 +510,7 @@ static INT_PTR CALLBACK JabberAdHoc_CommandDlgProc(HWND hwndDlg, UINT msg, WPARA int __cdecl CJabberProto::ContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int res = -1;
if ((hContact != NULL || lParam != 0) && m_bJabberOnline) {
diff --git a/protocols/JabberG/src/jabber_api.cpp b/protocols/JabberG/src/jabber_api.cpp index fa057d002b..208076acf3 100644 --- a/protocols/JabberG/src/jabber_api.cpp +++ b/protocols/JabberG/src/jabber_api.cpp @@ -56,13 +56,13 @@ int CJabberProto::CompareJIDs(LPCTSTR jid1, LPCTSTR jid2) return JabberCompareJids(jid1, jid2);
}
-HCONTACT CJabberProto::ContactFromJID(LPCTSTR jid)
+MCONTACT CJabberProto::ContactFromJID(LPCTSTR jid)
{
if (jid == NULL) return NULL;
return HContactFromJID(jid);
}
-LPTSTR CJabberProto::ContactToJID(HCONTACT hContact)
+LPTSTR CJabberProto::ContactToJID(MCONTACT hContact)
{
return getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid");
}
diff --git a/protocols/JabberG/src/jabber_archive.cpp b/protocols/JabberG/src/jabber_archive.cpp index 11c972ca3b..ae4e61ad05 100644 --- a/protocols/JabberG/src/jabber_archive.cpp +++ b/protocols/JabberG/src/jabber_archive.cpp @@ -32,7 +32,7 @@ void CJabberProto::EnableArchive(bool bEnable) << XCHILDNS( _T("auto"), JABBER_FEAT_ARCHIVE) << XATTR(_T("save"), (bEnable) ? _T("true") : _T("false")));
}
-void CJabberProto::RetrieveMessageArchive(HCONTACT hContact, JABBER_LIST_ITEM *pItem)
+void CJabberProto::RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem)
{
if (pItem->bHistoryRead)
return;
@@ -60,7 +60,7 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*) if (!list || lstrcmp( xmlGetAttrValue(list, _T("xmlns")), JABBER_FEAT_ARCHIVE))
return;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
time_t tmLast = 0;
for (int nodeIdx = 1; ; nodeIdx++) {
@@ -95,11 +95,11 @@ void CJabberProto::OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*) /////////////////////////////////////////////////////////////////////////////////////////
static DWORD dwPreviousTimeStamp = -1;
-static HCONTACT hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+static MCONTACT hPreviousContact = INVALID_CONTACT_ID;
static HANDLE hPreviousDbEvent = NULL;
// Returns TRUE if the event already exist in the database
-BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO& dbei)
+BOOL IsDuplicateEvent(MCONTACT hContact, DBEVENTINFO& dbei)
{
HANDLE hExistingDbEvent;
DWORD dwEventTimeStamp;
@@ -240,7 +240,7 @@ BOOL IsDuplicateEvent(HCONTACT hContact, DBEVENTINFO& dbei) }
}
// reset last event
- hPreviousContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ hPreviousContact = INVALID_CONTACT_ID;
return FALSE;
}
@@ -258,7 +258,7 @@ void CJabberProto::OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*) if (!start || !with)
return;
- HCONTACT hContact = HContactFromJID(with);
+ MCONTACT hContact = HContactFromJID(with);
time_t tmStart = str2time(start);
if (hContact == 0 || tmStart == 0)
return;
diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index 4e1ce74aa6..f11323d14a 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -132,7 +132,7 @@ int CJabberProto::GcInit(JABBER_LIST_ITEM *item) gcw.ptszID = item->jid;
CallServiceSync(MS_GC_NEWSESSION, NULL, (LPARAM)&gcw);
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL) {
if (JABBER_LIST_ITEM *bookmark = ListGetItemPtr(LIST_BOOKMARK, item->jid))
if (bookmark->name) {
@@ -600,7 +600,7 @@ int CJabberProto::JabberGcMenuHook(WPARAM, LPARAM lParam) mir_sntprintf(sttRJidBuf, SIZEOF(sttRJidBuf), TranslateT("Real &JID: %s"), him->m_tszRealJid);
if (TCHAR *tmp = _tcschr(sttRJidBuf, _T('/'))) *tmp = 0;
- if (HCONTACT hContact = HContactFromJID(him->m_tszRealJid)) {
+ if (MCONTACT hContact = HContactFromJID(him->m_tszRealJid)) {
gcmi->Item[3].uType = MENU_HMENU;
gcmi->Item[3].dwID = CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
sttShowGcMenuItems(gcmi, sttRJidItems, 0);
@@ -662,7 +662,7 @@ class CGroupchatInviteDlg : public CJabberDlgBase void FilterList(CCtrlClc *)
{
- 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 (lstrcmpA(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
if (HANDLE hItem = m_clc.FindContact(hContact))
@@ -740,7 +740,7 @@ public: m_txtNewJid.GetText(buf, SIZEOF(buf));
m_txtNewJid.SetTextA("");
- HCONTACT hContact = m_proto->HContactFromJID(buf);
+ MCONTACT hContact = m_proto->HContactFromJID(buf);
if (hContact)
{
int hItem = SendDlgItemMessage(m_hwnd, IDC_CLIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
@@ -776,7 +776,7 @@ public: HWND hwndList = GetDlgItem(m_hwnd, IDC_CLIST);
// invite users from roster
- for (HCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
if (m_proto->isChatRoom(hContact))
continue;
@@ -1003,7 +1003,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if ((gch->dwData >= CLISTMENUIDMIN) && (gch->dwData <= CLISTMENUIDMAX)) {
if (him->m_tszRealJid && *him->m_tszRealJid)
- if (HCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
+ if (MCONTACT hContact = ppro->HContactFromJID(him->m_tszRealJid))
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(gch->dwData, MPCF_CONTACTMENU), (LPARAM)hContact);
return;
}
@@ -1039,7 +1039,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* JABBER_LIST_ITEM *item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- HCONTACT hContact = (HCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ MCONTACT hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
}
break;
@@ -1202,7 +1202,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* case IDM_RJID_VCARD:
if (him->m_tszRealJid && *him->m_tszRealJid) {
- HCONTACT hContact;
+ MCONTACT hContact;
JABBER_SEARCH_RESULT jsr = { 0 };
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), him->m_tszRealJid);
@@ -1211,7 +1211,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* JABBER_LIST_ITEM *item = ppro->ListAdd(LIST_VCARD_TEMP, jsr.jid);
ppro->ListAddResource(LIST_VCARD_TEMP, jsr.jid, him->m_iStatus, him->m_tszStatusMessage, him->m_iPriority);
- hContact = (HCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ hContact = (MCONTACT)CallProtoService(ppro->m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
}
break;
@@ -1305,7 +1305,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g item = ppro->ListGetItemPtr(LIST_CHATROOM, gch->pDest->ptszID);
if (item != NULL) {
item->type = _T("conference");
- HCONTACT hContact = ppro->HContactFromJID(item->jid);
+ MCONTACT hContact = ppro->HContactFromJID(item->jid);
item->name = pcli->pfnGetContactDisplayName(hContact, 0);
ppro->AddEditBookmark(item);
}
@@ -1328,7 +1328,7 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g case IDM_PRESENCE_NA:
case IDM_PRESENCE_DND:
case IDM_PRESENCE_FREE4CHAT:
- if (HCONTACT h = ppro->HContactFromJID(item->jid))
+ if (MCONTACT h = ppro->HContactFromJID(item->jid))
ppro->OnMenuHandleDirectPresence((WPARAM)h, 0, gch->dwData);
break;
@@ -1369,7 +1369,7 @@ static void sttSendPrivateMessage(CJabberProto *ppro, JABBER_LIST_ITEM *item, co {
TCHAR szFullJid[JABBER_MAX_JID_LEN];
mir_sntprintf(szFullJid, SIZEOF(szFullJid), _T("%s/%s"), item->jid, nick);
- HCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
+ MCONTACT hContact = ppro->DBCreateContact(szFullJid, NULL, TRUE, FALSE);
if (hContact != NULL) {
pResourceStatus r(item->findResource(nick));
if (r)
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index 1453e9f40f..b4722a2b2b 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -406,7 +406,7 @@ void CJabberProto::PerformBrowse(HWND hwndDlg) {
if ((item=ListGetItemPtrFromIndex(i)) != NULL) {
if (_tcschr(item->jid, '@') == NULL && _tcschr(item->jid, '/') == NULL && item->subscription!=SUB_NONE) {
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL)
setByte(hContact, "IsTransport", TRUE);
@@ -1237,7 +1237,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM if (!items[i].feature) {
if (items[i].title) {
- HCONTACT hContact;
+ MCONTACT hContact;
if ((items[i].action == SD_ACT_USERMENU) && (hContact = HContactFromJID(pNode->GetJid()))) {
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
AppendMenu(hMenu, MF_STRING|MF_POPUP, (UINT_PTR)hContactMenu, TranslateTS(items[i].title));
@@ -1397,7 +1397,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_USERMENU:
{
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (!hContact) {
hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), TRUE, FALSE);
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
@@ -1413,12 +1413,12 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_VCARD:
{
TCHAR *jid = pNode->GetJid();
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (!hContact) {
JABBER_SEARCH_RESULT jsr={0};
mir_sntprintf(jsr.jid, SIZEOF(jsr.jid), _T("%s"), jid);
jsr.hdr.cbSize = sizeof(JABBER_SEARCH_RESULT);
- hContact = (HCONTACT)CallProtoService(m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
+ hContact = (MCONTACT)CallProtoService(m_szModuleName, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&jsr);
}
if (ListGetItemPtr(LIST_VCARD_TEMP, pNode->GetJid()) == NULL) {
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
@@ -1432,7 +1432,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM case SD_ACT_ROSTER:
{
- HCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
+ MCONTACT hContact = DBCreateContact(pNode->GetJid(), pNode->GetName(), FALSE, FALSE);
db_unset(hContact, "CList", "NotOnList");
JABBER_LIST_ITEM *item = ListAdd(LIST_VCARD_TEMP, pNode->GetJid());
item->bUseResource = TRUE;
@@ -1453,7 +1453,7 @@ void CJabberProto::ServiceDiscoveryShowMenu(CJabberSDNode *pNode, HTREELISTITEM default:
if ((res >= CLISTMENUIDMIN) && (res <= CLISTMENUIDMAX)) {
- HCONTACT hContact = HContactFromJID(pNode->GetJid());
+ MCONTACT hContact = HContactFromJID(pNode->GetJid());
if (hContact)
CallService(MS_CLIST_MENUPROCESSCOMMAND, MAKEWPARAM(res, MPCF_CONTACTMENU), (LPARAM)hContact);
}
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index f9795c7ac9..4fb8a4a3c1 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -36,7 +36,7 @@ int CJabberProto::OnContactDeleted(WPARAM wParam, LPARAM) if (!m_bJabberOnline) // should never happen
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid(getTStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
if (jid == NULL)
return 0;
@@ -75,7 +75,7 @@ static TCHAR* sttSettingToTchar(DBCONTACTWRITESETTING *cws) return NULL;
}
-void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT(getTStringA(hContact, "jid")));
if (item == NULL)
@@ -106,7 +106,7 @@ void __cdecl CJabberProto::OnRenameGroup(DBCONTACTWRITESETTING *cws, HCONTACT hC }
}
-void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, ptrT( getTStringA(hContact, "jid")));
if (item == NULL)
@@ -126,7 +126,7 @@ void __cdecl CJabberProto::OnRenameContact(DBCONTACTWRITESETTING *cws, HCONTACT }
}
-void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, HCONTACT hContact)
+void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, MCONTACT hContact)
{
if (cws->value.type != DBVT_DELETED && !(cws->value.type == DBVT_BYTE && cws->value.bVal == 0))
return;
@@ -159,7 +159,7 @@ void __cdecl CJabberProto::OnAddContactForever(DBCONTACTWRITESETTING *cws, HCONT int __cdecl CJabberProto::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL || !m_bJabberOnline)
return 0;
diff --git a/protocols/JabberG/src/jabber_groupchat.cpp b/protocols/JabberG/src/jabber_groupchat.cpp index c36d2cdc77..bbf4cae4f7 100644 --- a/protocols/JabberG/src/jabber_groupchat.cpp +++ b/protocols/JabberG/src/jabber_groupchat.cpp @@ -185,7 +185,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleJoinGroupchat(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid( getTStringA(hContact, "ChatRoomID"));
if (jid == NULL)
return 0;
@@ -210,7 +210,7 @@ INT_PTR __cdecl CJabberProto::OnJoinChat(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid(getTStringA(hContact, "ChatRoomID"));
if (jid != NULL) {
if (getWord(hContact, "Status", 0) != ID_STATUS_OFFLINE) {
@@ -791,7 +791,7 @@ void CJabberProto::RenameParticipantNick(JABBER_LIST_ITEM *item, const TCHAR *ol if (!lstrcmp(item->nick, oldNick)) {
replaceStrT(item->nick, newNick);
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact != NULL)
setTString(hContact, "MyNick", newNick);
}
@@ -931,7 +931,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) if (r && bRoleChanged) GcLogShowInformation(item, r, INFO_ROLE);
// update clist status
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setWord(hContact, "Status", status);
@@ -992,7 +992,7 @@ void CJabberProto::GroupchatProcessPresence(HXML node) GcLogUpdateMemberStatus(item, resource, nick, str, GC_EVENT_PART, statusNode);
ListRemoveResource(LIST_CHATROOM, from);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
}
diff --git a/protocols/JabberG/src/jabber_icolib.cpp b/protocols/JabberG/src/jabber_icolib.cpp index 8c36b3d02b..53491363bd 100644 --- a/protocols/JabberG/src/jabber_icolib.cpp +++ b/protocols/JabberG/src/jabber_icolib.cpp @@ -384,7 +384,7 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// Prototype for Jabber and other protocols to return index of Advanced status
-// wParam - HCONTACT of called protocol
+// wParam - MCONTACT of called protocol
// lParam - should be 0 (reserverd for futher usage)
// return value: -1 - no Advanced status
// : other - index of icons in clcimagelist.
@@ -393,7 +393,7 @@ int CJabberProto::OnReloadIcons(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return -1;
@@ -415,7 +415,7 @@ INT_PTR __cdecl CJabberProto::JGetAdvancedStatusIcon(WPARAM wParam, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// Transport check functions
-BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hContact)
+BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, MCONTACT hContact)
{
// check if transport is already set
if (!jid || !hContact)
@@ -455,7 +455,7 @@ BOOL CJabberProto::DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hConta void CJabberProto::CheckAllContactsAreTransported()
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid)
DBCheckIsTransportedContact(jid, hContact);
diff --git a/protocols/JabberG/src/jabber_iq.h b/protocols/JabberG/src/jabber_iq.h index 3eece1ec6e..cd229247ca 100644 --- a/protocols/JabberG/src/jabber_iq.h +++ b/protocols/JabberG/src/jabber_iq.h @@ -70,7 +70,7 @@ public: TCHAR *m_szChildTagXmlns;
TCHAR *m_szChildTagName;
HXML m_pChildNode;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
TCHAR *m_szTo;
TCHAR *m_szId;
@@ -117,7 +117,7 @@ public: __forceinline TCHAR* GetIdStr()
{ return m_szId;
}
- __forceinline HCONTACT GetHContact()
+ __forceinline MCONTACT GetHContact()
{ return m_hContact;
}
__forceinline HXML GetChildNode()
diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index bd360cd167..d783fb189c 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -525,7 +525,7 @@ BOOL CJabberProto::OnRosterPushRequest(HXML, CJabberIqInfo *pInfo) }
JABBER_LIST_ITEM *item;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
const TCHAR *jid, *str, *name;
TCHAR *nick;
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index 04f05dd3e8..acb1ce6fe6 100644 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -313,7 +313,7 @@ void CJabberProto::OnIqResultSession(HXML iqNode, CJabberIqInfo *pInfo) OnLoggedIn();
}
-void CJabberProto::GroupchatJoinByHContact(HCONTACT hContact, bool autojoin)
+void CJabberProto::GroupchatJoinByHContact(MCONTACT hContact, bool autojoin)
{
ptrT roomjid( getTStringA(hContact, "ChatRoomID"));
if (roomjid == NULL)
@@ -425,7 +425,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) }
}
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact == NULL) {
// Received roster has a new JID.
// Add the jid (with empty resource) to Miranda contact list.
@@ -496,8 +496,8 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) // Delete orphaned contacts (if roster sync is enabled)
if (m_options.RosterSync == TRUE) {
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
- HCONTACT hNext = db_find_next(hContact, m_szModuleName);
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact, m_szModuleName);
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL && !ListGetItemPtr(LIST_ROSTER, jid)) {
debugLogA("Syncing roster: preparing to delete %S (hContact=0x%x)", jid, hContact);
@@ -515,7 +515,7 @@ void CJabberProto::OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo) if (m_options.AutoJoinConferences)
for (i=0; i < chatRooms.getCount(); i++)
- GroupchatJoinByHContact((HCONTACT)chatRooms[i], true);
+ GroupchatJoinByHContact((MCONTACT)chatRooms[i], true);
//UI_SAFE_NOTIFY(m_pDlgJabberJoinGroupchat, WM_JABBER_CHECK_ONLINE);
//UI_SAFE_NOTIFY(m_pDlgBookmarks, WM_JABBER_CHECK_ONLINE);
@@ -565,7 +565,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) if ((from = xmlGetAttrValue(iqNode, _T("from"))) == NULL) return;
if (!lstrcmp(type, _T("result"))) {
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact != NULL)
setByte(hContact, "IsTransport", TRUE);
@@ -583,7 +583,7 @@ void CJabberProto::OnIqResultSetRegister(HXML iqNode, CJabberIqInfo*) /////////////////////////////////////////////////////////////////////////////////////////
// JabberIqResultGetVcard - processes the server-side v-card
-void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, HCONTACT hContact, bool &hasPhoto)
+void CJabberProto::OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hContact, bool &hasPhoto)
{
debugLogA("JabberIqResultGetVcardPhoto: %d", hasPhoto);
if (hasPhoto)
@@ -661,7 +661,7 @@ void CJabberProto::OnIqResultGetVcard(HXML iqNode, CJabberIqInfo*) {
HXML vCardNode, m, n, o;
const TCHAR *type, *jid;
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR text[128];
DBVARIANT dbv;
@@ -1284,7 +1284,7 @@ void CJabberProto::OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo*) if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1324,7 +1324,7 @@ void CJabberProto::OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo*) const TCHAR *from = xmlGetAttrValue(iqNode, _T("from"));
if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1363,7 +1363,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo) if (from == NULL)
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact == NULL)
return;
@@ -1396,7 +1396,7 @@ void CJabberProto::OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo) }
-void CJabberProto::OnIqResultGotAvatar(HCONTACT hContact, HXML n, const TCHAR *mimeType)
+void CJabberProto::OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *mimeType)
{
unsigned resultLen;
ptrA body((char*)mir_base64_decode( _T2A(xmlGetText(n)), &resultLen));
diff --git a/protocols/JabberG/src/jabber_list.h b/protocols/JabberG/src/jabber_list.h index eaddb149eb..081da8675f 100644 --- a/protocols/JabberG/src/jabber_list.h +++ b/protocols/JabberG/src/jabber_list.h @@ -212,9 +212,9 @@ struct JABBER_LIST_ITEM : public MZeroedObject struct JABBER_HTTP_AVATARS
{
char * Url;
- HCONTACT hContact;
+ MCONTACT hContact;
- JABBER_HTTP_AVATARS(const TCHAR *tUrl, HCONTACT thContact)
+ JABBER_HTTP_AVATARS(const TCHAR *tUrl, MCONTACT thContact)
: Url(mir_t2a(tUrl)), hContact(thContact) {}
~JABBER_HTTP_AVATARS() { mir_free(Url); }
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index b644efbbd8..c816f155e1 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -73,7 +73,7 @@ static INT_PTR JabberMenuChooseService(WPARAM wParam, LPARAM lParam) return 0;
}
-static CJabberProto* JabberGetInstanceByHContact(HCONTACT hContact)
+static CJabberProto* JabberGetInstanceByHContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -88,73 +88,73 @@ static CJabberProto* JabberGetInstanceByHContact(HCONTACT hContact) static INT_PTR JabberMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleRequestAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleGrantAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRevokeAuth(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuRevokeAuth(wParam, lParam) : 0;
}
static INT_PTR JabberMenuConvertChatContact(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuConvertChatContact(wParam, lParam) : 0;
}
static INT_PTR JabberMenuRosterAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuRosterAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuBookmarkAdd(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuBookmarkAdd(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportLogin(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuTransportLogin(wParam, lParam) : 0;
}
static INT_PTR JabberMenuTransportResolve(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuTransportResolve(wParam, lParam) : 0;
}
static INT_PTR JabberContactMenuRunCommands(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->ContactMenuRunCommands(wParam, lParam) : 0;
}
static INT_PTR JabberMenuSendNote(WPARAM wParam, LPARAM lParam)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuSendNote(wParam, lParam) : 0;
}
static INT_PTR JabberMenuHandleResource(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleResource(wParam, lParam, lRes) : 0;
}
static INT_PTR JabberMenuHandleDirectPresence(WPARAM wParam, LPARAM lParam, LPARAM lRes)
{
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnMenuHandleDirectPresence(wParam, lParam, lRes) : 0;
}
@@ -173,7 +173,7 @@ static int JabberPrebuildContactMenu(WPARAM wParam, LPARAM lParam) Menu_ShowItem(g_hMenuResourcesRoot, FALSE);
Menu_ShowItem(g_hMenuDirectPresence[0], FALSE);
- CJabberProto *ppro = JabberGetInstanceByHContact((HCONTACT)wParam);
+ CJabberProto *ppro = JabberGetInstanceByHContact((MCONTACT)wParam);
return(ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
}
@@ -347,7 +347,7 @@ void g_MenuUninit(void) int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -479,7 +479,7 @@ int CJabberProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
BYTE bIsChatRoom = isChatRoom(hContact);
const char *szSetting = (bIsChatRoom) ? "ChatRoomID" : "jid";
@@ -494,7 +494,7 @@ INT_PTR __cdecl CJabberProto::OnMenuConvertChatContact(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -524,7 +524,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRosterAdd(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -535,7 +535,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleRequestAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -546,7 +546,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleGrantAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && m_bJabberOnline) {
ptrT jid(getTStringA(hContact, "jid"));
if (jid != NULL)
@@ -557,7 +557,7 @@ INT_PTR __cdecl CJabberProto::OnMenuRevokeAuth(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -573,7 +573,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportLogin(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!getByte(hContact, "IsTransport", 0))
return 0;
@@ -585,7 +585,7 @@ INT_PTR __cdecl CJabberProto::OnMenuTransportResolve(WPARAM wParam, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuBookmarkAdd(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0; // we do not add ourself to the roster. (buggy situation - should not happen)
@@ -977,7 +977,7 @@ void CJabberProto::MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item) if (item->list != LIST_ROSTER)
return;
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (!hContact)
return;
@@ -1043,7 +1043,7 @@ int CJabberProto::OnProcessSrmmIconClick(WPARAM wParam, LPARAM lParam) if (lstrcmpA(sicd->szModule, m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -1097,7 +1097,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleResource(WPARAM wParam, LPARAM, LPARAM if (!m_bJabberOnline || !wParam)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT tszJid(getTStringA(hContact, "jid"));
if (tszJid == NULL)
return 0;
@@ -1129,7 +1129,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleDirectPresence(WPARAM wParam, LPARAM l if (!m_bJabberOnline || !wParam)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
TCHAR *jid, text[1024];
ptrT tszJid(getTStringA(hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index e2bc848e2b..ab12cf7ca7 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -57,7 +57,7 @@ public: LPCTSTR m_szChildTagXmlns;
LPCTSTR m_szChildTagName;
HXML m_hChildNode;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
LPCTSTR m_szTo;
LPCTSTR m_szId;
@@ -77,7 +77,7 @@ public: __forceinline LPCTSTR GetIdStr()
{ return m_szId;
}
- __forceinline HCONTACT GetHContact()
+ __forceinline MCONTACT GetHContact()
{ return m_hContact;
}
__forceinline HXML GetChildNode()
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 04af56aec0..e3b56f08b5 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -70,7 +70,7 @@ int JabberCompareJids(const TCHAR *jid1, const TCHAR *jid2) void CJabberProto::DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick)
{
- HCONTACT hContact = DBCreateContact(jid, nick, TRUE, TRUE);
+ MCONTACT hContact = DBCreateContact(jid, nick, TRUE, TRUE);
delSetting(hContact, "Hidden");
char* szJid = mir_utf8encodeT(jid);
@@ -103,7 +103,7 @@ void CJabberProto::DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick) ///////////////////////////////////////////////////////////////////////////////
// JabberDBCreateContact()
-HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource)
+MCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource)
{
if (jid == NULL || jid[0]=='\0')
return NULL;
@@ -120,7 +120,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL // We can't use JabberHContactFromJID() here because of the stripResource option
size_t len = _tcslen(s);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
continue;
@@ -130,7 +130,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL return hContact;
}
- HCONTACT hNewContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hNewContact, (LPARAM)m_szModuleName);
setTString(hNewContact, "jid", s);
if (nick != NULL && *nick != '\0')
@@ -144,7 +144,7 @@ HCONTACT CJabberProto::DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL return hNewContact;
}
-BOOL CJabberProto::AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType)
+BOOL CJabberProto::AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType)
{
if (!hContact)
return FALSE;
@@ -179,7 +179,7 @@ BOOL CJabberProto::AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType) ///////////////////////////////////////////////////////////////////////////////
// JabberGetAvatarFileName() - gets a file name for the avatar image
-void CJabberProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen)
+void CJabberProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -219,7 +219,7 @@ void CJabberProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t c void CJabberProto::ResolveTransportNicks(const TCHAR *jid)
{
// Set all contacts to offline
- HCONTACT hContact = m_ThreadInfo->resolveContact;
+ MCONTACT hContact = m_ThreadInfo->resolveContact;
if (hContact == NULL)
hContact = db_find_first(m_szModuleName);
@@ -320,7 +320,7 @@ static sttCapsNodeToName_Map[] = void CJabberProto::UpdateMirVer(JABBER_LIST_ITEM *item)
{
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (!hContact)
return;
@@ -396,7 +396,7 @@ void CJabberProto::FormatMirVer(pResourceStatus &resource, CMString &res) }
-void CJabberProto::UpdateMirVer(HCONTACT hContact, pResourceStatus &resource)
+void CJabberProto::UpdateMirVer(MCONTACT hContact, pResourceStatus &resource)
{
CMString tszMirVer;
FormatMirVer(resource, tszMirVer);
@@ -415,7 +415,7 @@ void CJabberProto::UpdateMirVer(HCONTACT hContact, pResourceStatus &resource) setTString(hContact, DBSETTING_DISPLAY_UID, szFullJid);
}
-void CJabberProto::UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *item)
+void CJabberProto::UpdateSubscriptionInfo(MCONTACT hContact, JABBER_LIST_ITEM *item)
{
switch (item->subscription) {
case SUB_TO:
@@ -445,7 +445,7 @@ void CJabberProto::UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *i }
}
-void CJabberProto::SetContactOfflineStatus(HCONTACT hContact)
+void CJabberProto::SetContactOfflineStatus(MCONTACT hContact)
{
if (getWord(hContact, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
setWord(hContact, "Status", ID_STATUS_OFFLINE);
@@ -482,7 +482,7 @@ void CJabberProto::InitPopups(void) Skin_ReleaseIcon(ppc.hIcon);
}
-void CJabberProto::MsgPopup(HCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle)
+void CJabberProto::MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle)
{
if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) {
char name[256];
diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index db49f4d08e..9a9f88f1b0 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -813,7 +813,7 @@ INT_PTR __cdecl CJabberProto::OnMenuHandleNotes(WPARAM, LPARAM) INT_PTR __cdecl CJabberProto::OnMenuSendNote(WPARAM wParam, LPARAM)
{
if (wParam) {
- CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA((HCONTACT)wParam, "jid")));
+ CNoteItem *pItem = new CNoteItem(NULL, ptrT(getTStringA((MCONTACT)wParam, "jid")));
CJabberDlgBase *pDlg = new CJabberDlgNoteItem(this, pItem, &CJabberProto::ProcessOutgoingNote);
pDlg->Show();
}
diff --git a/protocols/JabberG/src/jabber_opt.cpp b/protocols/JabberG/src/jabber_opt.cpp index d6720c5a84..a1978f2c89 100644 --- a/protocols/JabberG/src/jabber_opt.cpp +++ b/protocols/JabberG/src/jabber_opt.cpp @@ -858,7 +858,7 @@ public: JABBER_LIST_ITEM *item = m_proto->ListGetItemPtrFromIndex(index);
if (item != NULL) {
if (_tcschr(item->jid, '@') == NULL) {
- HCONTACT hContact = m_proto->HContactFromJID(item->jid);
+ MCONTACT hContact = m_proto->HContactFromJID(item->jid);
if (hContact != NULL) {
if (bChecked) {
if (item->getTemp()->m_iStatus != m_proto->getWord(hContact, "Status", ID_STATUS_OFFLINE)) {
@@ -1039,7 +1039,7 @@ void CJabberProto::_RosterHandleGetRequest(HXML node, CJabberIqInfo*) }
// now it is require to process whole contact list to add not in roster contacts
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT tszJid( getTStringA(hContact, "jid"));
if (tszJid == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_privacy.cpp b/protocols/JabberG/src/jabber_privacy.cpp index f5cb1785c9..e3ecbe6c74 100644 --- a/protocols/JabberG/src/jabber_privacy.cpp +++ b/protocols/JabberG/src/jabber_privacy.cpp @@ -418,7 +418,7 @@ public: SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_RESETCONTENT, 0, 0);
{
- for (HCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_proto->m_szModuleName); hContact; hContact = db_find_next(hContact, m_proto->m_szModuleName)) {
ptrT jid( m_proto->getTStringA(hContact, "jid"));
if (jid != NULL)
SendDlgItemMessage(m_hwnd, IDC_COMBO_VALUES, CB_ADDSTRING, 0, jid);
@@ -1153,7 +1153,7 @@ void CJabberDlgPrivacyLists::DrawRulesList(LPDRAWITEMSTRUCT lpdis) DrawNextRulePart(lpdis->hDC, clLine1, pRule->GetValue(), &rc);
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT("'"), &rc);
- if (HCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
+ if (MCONTACT hContact = m_proto->HContactFromJID(pRule->GetValue())) {
TCHAR *szName = pcli->pfnGetContactDisplayName(hContact, 0);
if (szName) {
DrawNextRulePart(lpdis->hDC, clLine2, TranslateT(" (nickname: "), &rc);
@@ -1300,7 +1300,7 @@ void CJabberDlgPrivacyLists::CListResetOptions(HWND) void CJabberDlgPrivacyLists::CListFilter(HWND)
{
- 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 || lstrcmpA(proto, m_proto->m_szModuleName))
if (HANDLE hItem = m_clcClist.FindContact(hContact))
@@ -1322,7 +1322,7 @@ void CJabberDlgPrivacyLists::CListSetupIcons(HWND, HANDLE hItem, int iSlot, DWOR HANDLE CJabberDlgPrivacyLists::CListAddContact(HWND hwndList, TCHAR *jid)
{
- HCONTACT hContact = m_proto->HContactFromJID(jid);
+ MCONTACT hContact = m_proto->HContactFromJID(jid);
if (hContact)
return m_clcClist.FindContact(hContact);
@@ -1357,7 +1357,7 @@ void CJabberDlgPrivacyLists::CListApplyList(HWND hwndList, CPrivacyList *pList) CListResetIcons(hwndList, hItem, bHideIcons);
}
- 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 = m_clcClist.FindContact(hContact);
if (hItem)
CListResetIcons(hwndList, hItem, bHideIcons);
@@ -1455,7 +1455,7 @@ void CJabberDlgPrivacyLists::CListBuildList(HWND hwndList, CPrivacyList *pList) pList->AddRule(Jid, szJid, FALSE, dwOrder++, dwPackets);
}
- 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 = m_clcClist.FindContact(hContact);
ptrT jid( m_proto->getTStringA(hContact, "jid"));
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index fc34abf429..b380fa7276 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -257,7 +257,7 @@ int CJabberProto::OnModulesLoadedEx(WPARAM, LPARAM) ConvertPasswords();
// Set all contacts to offline
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
SetContactOfflineStatus(hContact);
if (!getByte(hContact, "IsTransport", 0))
@@ -314,9 +314,9 @@ int __cdecl CJabberProto::OnPreShutdown(WPARAM, LPARAM) ////////////////////////////////////////////////////////////////////////////////////////
// JabberAddToList - adds a contact to the contact list
-HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
+MCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *jid, *nick;
debugLogA("AddToListByJID jid = %S", newJid);
@@ -325,7 +325,7 @@ HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) // not already there: add
jid = mir_tstrdup(newJid);
debugLogA("Add new jid to contact jid = %S", jid);
- 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)m_szModuleName);
setTString(hContact, "jid", jid);
if ((nick=JabberNickFromJID(newJid)) == NULL)
@@ -358,7 +358,7 @@ HCONTACT CJabberProto::AddToListByJID(const TCHAR *newJid, DWORD flags) return hContact;
}
-HCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
if (psr->cbSize != sizeof(JABBER_SEARCH_RESULT) && psr->id == NULL)
return NULL;
@@ -368,7 +368,7 @@ HCONTACT CJabberProto::AddToList(int flags, PROTOSEARCHRESULT* psr) return AddToListByJID(jid, flags);
}
-HCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
+MCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HANDLE hDbEvent)
{
debugLogA("AddToListByEvent");
@@ -398,7 +398,7 @@ HCONTACT __cdecl CJabberProto::AddToListByEvent(int flags, int /*iContact*/, HAN char *jid = lastName + strlen(lastName) + 1;
TCHAR *newJid = (dbei.flags & DBEF_UTF) ? mir_utf8decodeT(jid) : mir_a2t(jid);
- HCONTACT hContact = (HCONTACT)AddToListByJID(newJid, flags);
+ MCONTACT hContact = (MCONTACT)AddToListByJID(newJid, flags);
mir_free(newJid);
return hContact;
}
@@ -440,7 +440,7 @@ int CJabberProto::Authorize(HANDLE hDbEvent) if ((item = ListGetItemPtr(LIST_ROSTER, newJid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
debugLogA("Try adding contact automatically jid = %S", jid);
- if (HCONTACT hContact = AddToListByJID(newJid, 0)) {
+ if (MCONTACT hContact = AddToListByJID(newJid, 0)) {
// Trigger actual add by removing the "NotOnList" added by AddToListByJID()
// See AddToListByJID() and JabberDbSettingChanged().
db_unset(hContact, "CList", "NotOnList");
@@ -492,7 +492,7 @@ int CJabberProto::AuthDeny(HANDLE hDbEvent, const TCHAR*) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CJabberProto::AuthRecv(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::AuthRecv(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -500,7 +500,7 @@ int __cdecl CJabberProto::AuthRecv(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CJabberProto::AuthRequest(HCONTACT, const TCHAR*)
+int __cdecl CJabberProto::AuthRequest(MCONTACT, const TCHAR*)
{
return 1;
}
@@ -516,7 +516,7 @@ HANDLE __cdecl CJabberProto::ChangeInfo(int /*iInfoType*/, void*) ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileAllow - starts a file transfer
-HANDLE __cdecl CJabberProto::FileAllow(HCONTACT /*hContact*/, HANDLE hTransfer, const TCHAR *szPath)
+HANDLE __cdecl CJabberProto::FileAllow(MCONTACT /*hContact*/, HANDLE hTransfer, const TCHAR *szPath)
{
if (!m_bJabberOnline)
return 0;
@@ -544,7 +544,7 @@ HANDLE __cdecl CJabberProto::FileAllow(HCONTACT /*hContact*/, HANDLE hTransfer, ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileCancel - cancels a file transfer
-int __cdecl CJabberProto::FileCancel(HCONTACT, HANDLE hTransfer)
+int __cdecl CJabberProto::FileCancel(MCONTACT, HANDLE hTransfer)
{
filetransfer *ft = (filetransfer*)hTransfer;
HANDLE hEvent;
@@ -572,7 +572,7 @@ int __cdecl CJabberProto::FileCancel(HCONTACT, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// JabberFileDeny - denies a file transfer
-int __cdecl CJabberProto::FileDeny(HCONTACT, HANDLE hTransfer, const TCHAR *)
+int __cdecl CJabberProto::FileDeny(MCONTACT, HANDLE hTransfer, const TCHAR *)
{
if (!m_bJabberOnline)
return 1;
@@ -616,7 +616,7 @@ int __cdecl CJabberProto::FileResume(HANDLE hTransfer, int *action, const TCHAR ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CJabberProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CJabberProto::GetCaps(int type, MCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
@@ -644,7 +644,7 @@ DWORD_PTR __cdecl CJabberProto::GetCaps(int type, HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// GetInfo - retrieves a contact info
-int __cdecl CJabberProto::GetInfo(HCONTACT hContact, int /*infoType*/)
+int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/)
{
if (!m_bJabberOnline || isChatRoom(hContact))
return 1;
@@ -858,7 +858,7 @@ HANDLE __cdecl CJabberProto::SearchByName(const TCHAR *nick, const TCHAR *firstN ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CJabberProto::RecvContacts(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvContacts(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -866,7 +866,7 @@ int __cdecl CJabberProto::RecvContacts(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CJabberProto::RecvFile(HCONTACT hContact, PROTORECVFILET *evt)
+int __cdecl CJabberProto::RecvFile(MCONTACT hContact, PROTORECVFILET *evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -874,7 +874,7 @@ int __cdecl CJabberProto::RecvFile(HCONTACT hContact, PROTORECVFILET *evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CJabberProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *evt)
+int __cdecl CJabberProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *evt)
{
ptrA szResUtf( mir_utf8encodeT((LPCTSTR)evt->lParam));
evt->pCustomData = szResUtf;
@@ -886,7 +886,7 @@ int __cdecl CJabberProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CJabberProto::RecvUrl(HCONTACT, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvUrl(MCONTACT, PROTORECVEVENT*)
{
return 1;
}
@@ -894,7 +894,7 @@ int __cdecl CJabberProto::RecvUrl(HCONTACT, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CJabberProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CJabberProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
if (!m_bJabberOnline)
return 0;
@@ -924,7 +924,7 @@ int __cdecl CJabberProto::SendContacts(HCONTACT hContact, int flags, int nContac ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CJabberProto::SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR** ppszFiles)
+HANDLE __cdecl CJabberProto::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR** ppszFiles)
{
if (!m_bJabberOnline) return 0;
@@ -1011,10 +1011,10 @@ HANDLE __cdecl CJabberProto::SendFile(HCONTACT hContact, const TCHAR *szDescript struct TFakeAckParams
{
- inline TFakeAckParams(HCONTACT _hContact, const char* _msg, int _msgid = 0)
+ inline TFakeAckParams(MCONTACT _hContact, const char* _msg, int _msgid = 0)
: hContact(_hContact), msg(_msg), msgid(_msgid) {}
- HCONTACT hContact;
+ MCONTACT hContact;
const char *msg;
int msgid;
};
@@ -1034,7 +1034,7 @@ void __cdecl CJabberProto::SendMessageAckThread(void* param) static char PGP_PROLOG[] = "-----BEGIN PGP MESSAGE-----\r\n\r\n";
static char PGP_EPILOG[] = "\r\n-----END PGP MESSAGE-----\r\n";
-int __cdecl CJabberProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CJabberProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
TCHAR szClientJid[JABBER_MAX_JID_LEN];
if (!m_bJabberOnline || !GetClientJID(hContact, szClientJid, SIZEOF(szClientJid))) {
@@ -1134,7 +1134,7 @@ int __cdecl CJabberProto::SendMsg(HCONTACT hContact, int flags, const char* pszS ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CJabberProto::SendUrl(HCONTACT, int /*flags*/, const char* /*url*/)
+int __cdecl CJabberProto::SendUrl(MCONTACT, int /*flags*/, const char* /*url*/)
{
return 1;
}
@@ -1142,7 +1142,7 @@ int __cdecl CJabberProto::SendUrl(HCONTACT, int /*flags*/, const char* /*url*/) ////////////////////////////////////////////////////////////////////////////////////////
// JabberSetApparentMode - sets the visibility status
-int __cdecl CJabberProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CJabberProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (mode != 0 && mode != ID_STATUS_ONLINE && mode != ID_STATUS_OFFLINE)
return 1;
@@ -1224,7 +1224,7 @@ int __cdecl CJabberProto::SetStatus(int iNewStatus) void __cdecl CJabberProto::GetAwayMsgThread(void *param)
{
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
ptrT jid( getTStringA(hContact, "jid"));
if (jid != NULL) {
@@ -1272,7 +1272,7 @@ void __cdecl CJabberProto::GetAwayMsgThread(void *param) ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)0);
}
-HANDLE __cdecl CJabberProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CJabberProto::GetAwayMsg(MCONTACT hContact)
{
debugLogA("GetAwayMsg called, hContact=%08X", hContact);
@@ -1283,7 +1283,7 @@ HANDLE __cdecl CJabberProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CJabberProto::RecvAwayMsg(HCONTACT, int /*statusMode*/, PROTORECVEVENT*)
+int __cdecl CJabberProto::RecvAwayMsg(MCONTACT, int /*statusMode*/, PROTORECVEVENT*)
{
return 1;
}
@@ -1344,7 +1344,7 @@ int __cdecl CJabberProto::SetAwayMsg(int status, const TCHAR *msg) /////////////////////////////////////////////////////////////////////////////////////////
// JabberUserIsTyping - sends a UTN notification
-int __cdecl CJabberProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CJabberProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!m_bJabberOnline) return 0;
@@ -1426,7 +1426,7 @@ void CJabberProto::InfoFrame_OnSetup(CJabberInfoFrame_Event*) void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt)
{
if (evt->m_event == CJabberInfoFrame_Event::CLICK) {
- HCONTACT hContact = (HCONTACT)evt->m_pUserData;
+ MCONTACT hContact = (MCONTACT)evt->m_pUserData;
HMENU hContactMenu = (HMENU)CallService(MS_CLIST_MENUBUILDCONTACT, (WPARAM)hContact, 0);
POINT pt;
GetCursorPos(&pt);
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 80b206ce71..84533eb9da 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -82,23 +82,23 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
@@ -106,24 +106,24 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char *msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char *url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char *msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char *url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -132,7 +132,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
//====| Events |======================================================================
- void __cdecl OnAddContactForever(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
+ void __cdecl OnAddContactForever(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
int __cdecl OnContactDeleted(WPARAM, LPARAM);
int __cdecl OnDbSettingChanged(WPARAM, LPARAM);
int __cdecl OnIdleChanged(WPARAM, LPARAM);
@@ -145,8 +145,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface int __cdecl OnProcessSrmmIconClick(WPARAM, LPARAM);
int __cdecl OnProcessSrmmEvent(WPARAM, LPARAM);
int __cdecl OnReloadIcons(WPARAM, LPARAM);
- void __cdecl OnRenameContact(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
- void __cdecl OnRenameGroup(DBCONTACTWRITESETTING* cws, HCONTACT hContact);
+ void __cdecl OnRenameContact(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
+ void __cdecl OnRenameGroup(DBCONTACTWRITESETTING* cws, MCONTACT hContact);
int __cdecl OnUserInfoInit(WPARAM, LPARAM);
int __cdecl JabberGcEventHook(WPARAM, LPARAM);
@@ -294,7 +294,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_archive.c --------------------------------------------------------------
void EnableArchive(bool bEnable);
- void RetrieveMessageArchive(HCONTACT hContact, JABBER_LIST_ITEM *pItem);
+ void RetrieveMessageArchive(MCONTACT hContact, JABBER_LIST_ITEM *pItem);
void OnIqResultGetCollection(HXML iqNode, CJabberIqInfo*);
void OnIqResultGetCollectionList(HXML iqNode, CJabberIqInfo*);
@@ -451,7 +451,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface int LoadAdvancedIcons(int iID);
int GetTransportProtoID(TCHAR* TransportDomain);
int GetTransportStatusIconIndex(int iID, int Status);
- BOOL DBCheckIsTransportedContact(const TCHAR *jid, HCONTACT hContact);
+ BOOL DBCheckIsTransportedContact(const TCHAR *jid, MCONTACT hContact);
void CheckAllContactsAreTransported(void);
INT_PTR __cdecl JGetAdvancedStatusIcon(WPARAM wParam, LPARAM lParam);
@@ -472,7 +472,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnIqResultGetVCardAvatar(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetClientAvatar(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetServerAvatar(HXML iqNode, CJabberIqInfo *pInfo);
- void OnIqResultGotAvatar(HCONTACT hContact, HXML n, const TCHAR *mimeType);
+ void OnIqResultGotAvatar(MCONTACT hContact, HXML n, const TCHAR *mimeType);
void OnIqResultGetMuc(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetRegister(HXML iqNode, CJabberIqInfo *pInfo);
void OnIqResultGetRoster(HXML iqNode, CJabberIqInfo *pInfo);
@@ -528,7 +528,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_iqid.cpp ---------------------------------------------------------------
- void GroupchatJoinByHContact(HCONTACT hContact, bool autojoin=false);
+ void GroupchatJoinByHContact(MCONTACT hContact, bool autojoin=false);
//---- jabber_message_handlers.cpp ---------------------------------------------------
@@ -560,7 +560,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnIqResultMucGetJidList(HXML iqNode, JABBER_MUC_JIDLIST_TYPE listType);
void OnIqResultServerDiscoInfo(HXML iqNode, CJabberIqInfo *pInfo);
- void OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, HCONTACT hContact, bool &hasPhoto);
+ void OnIqResultGetVcardPhoto(const TCHAR *jid, HXML n, MCONTACT hContact, bool &hasPhoto);
void SetBookmarkRequest (XmlNodeIq& iqId);
//---- jabber_menu.cpp ---------------------------------------------------------------
@@ -584,7 +584,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void MenuInit(void);
void MenuUpdateSrmmIcon(JABBER_LIST_ITEM *item);
- void AuthWorker(HCONTACT hContact, char* authReqType);
+ void AuthWorker(MCONTACT hContact, char* authReqType);
void UpdatePriorityMenu(short priority);
@@ -599,18 +599,18 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void AddContactToRoster(const TCHAR *jid, const TCHAR *nick, const TCHAR *grpName);
void DBAddAuthRequest(const TCHAR *jid, const TCHAR *nick);
- BOOL AddDbPresenceEvent(HCONTACT hContact, BYTE btEventType);
- HCONTACT DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource);
- void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen);
+ BOOL AddDbPresenceEvent(MCONTACT hContact, BYTE btEventType);
+ MCONTACT DBCreateContact(const TCHAR *jid, const TCHAR *nick, BOOL temporary, BOOL stripResource);
+ void GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen);
void ResolveTransportNicks(const TCHAR *jid);
void SetServerStatus(int iNewStatus);
void FormatMirVer(pResourceStatus &resource, CMString&);
void UpdateMirVer(JABBER_LIST_ITEM *item);
- void UpdateMirVer(HCONTACT hContact, pResourceStatus &resource);
- void UpdateSubscriptionInfo(HCONTACT hContact, JABBER_LIST_ITEM *item);
- void SetContactOfflineStatus(HCONTACT hContact);
+ void UpdateMirVer(MCONTACT hContact, pResourceStatus &resource);
+ void UpdateSubscriptionInfo(MCONTACT hContact, JABBER_LIST_ITEM *item);
+ void SetContactOfflineStatus(MCONTACT hContact);
void InitPopups(void);
- void MsgPopup(HCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle);
+ void MsgPopup(MCONTACT hContact, const TCHAR *szMsg, const TCHAR *szTitle);
//---- jabber_opt.cpp ----------------------------------------------------------------
@@ -653,7 +653,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void __cdecl GetAwayMsgThread(void* hContact);
void __cdecl SendMessageAckThread(void* hContact);
- HCONTACT AddToListByJID(const TCHAR *newJid, DWORD flags);
+ MCONTACT AddToListByJID(const TCHAR *newJid, DWORD flags);
void WindowSubscribe(HWND hwnd);
void WindowUnsubscribe(HWND hwnd);
void WindowNotify(UINT msg, bool async = false);
@@ -739,7 +739,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void OnProcessProtocol(HXML node, ThreadData *info);
void UpdateJidDbSettings(const TCHAR *jid);
- HCONTACT CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem);
+ MCONTACT CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem);
void PerformRegistration(ThreadData* info);
void PerformIqAuth(ThreadData* info);
@@ -759,8 +759,8 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface //---- jabber_util.c -----------------------------------------------------------------
pResourceStatus ResourceInfoFromJID(const TCHAR *jid);
- HCONTACT HContactFromJID(const TCHAR *jid, BOOL bStripResource = 3);
- HCONTACT ChatRoomHContactFromJID(const TCHAR *jid);
+ MCONTACT HContactFromJID(const TCHAR *jid, BOOL bStripResource = 3);
+ MCONTACT ChatRoomHContactFromJID(const TCHAR *jid);
void SendVisibleInvisiblePresence(BOOL invisible);
void SendPresenceTo(int status, const TCHAR* to, HXML extra, const TCHAR *msg = NULL);
void SendPresence(int m_iStatus, bool bSendToAll);
@@ -768,7 +768,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void RebuildInfoFrame(void);
// returns buf or NULL on error
- TCHAR* GetClientJID(HCONTACT hContact, TCHAR *dest, size_t destLen);
+ TCHAR* GetClientJID(MCONTACT hContact, TCHAR *dest, size_t destLen);
TCHAR* GetClientJID(const TCHAR *jid, TCHAR *dest, size_t destLen);
void ComboLoadRecentStrings(HWND hwndDlg, UINT idcCombo, char *param, int recentCount=JABBER_DEFAULT_RECENT_COUNT);
@@ -819,16 +819,16 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface HICON GetXStatusIcon(int bStatus, UINT flags);
void RegisterAdvStatusSlot(const char *pszSlot);
- void ResetAdvStatus(HCONTACT hContact, const char *pszSlot);
- void WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText);
- char* ReadAdvStatusA(HCONTACT hContact, const char *pszSlot, const char *pszValue);
- TCHAR* ReadAdvStatusT(HCONTACT hContact, const char *pszSlot, const char *pszValue);
+ void ResetAdvStatus(MCONTACT hContact, const char *pszSlot);
+ void WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText);
+ char* ReadAdvStatusA(MCONTACT hContact, const char *pszSlot, const char *pszValue);
+ TCHAR* ReadAdvStatusT(MCONTACT hContact, const char *pszSlot, const char *pszValue);
BOOL SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource, TCHAR* szTitle, TCHAR* szTrack, TCHAR* szUri);
void XStatusInit(void);
- void SetContactTune(HCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack);
+ void SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack);
void InfoFrame_OnUserMood(CJabberInfoFrame_Event *evt);
void InfoFrame_OnUserActivity(CJabberInfoFrame_Event *evt);
@@ -857,8 +857,8 @@ public: DWORD STDMETHODCALLTYPE GetJabberVersion() const; // Returns Jabber plugin version.
int STDMETHODCALLTYPE CompareJIDs(LPCTSTR jid1, LPCTSTR jid2); // Strips resource names from given JIDs and returns result of comparison for these JIDs.
- HCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid); // Returns contact handle for given JID.
- LPTSTR STDMETHODCALLTYPE ContactToJID(HCONTACT hContact); // Returns JID of hContact. You must free the result using mir_free().
+ MCONTACT STDMETHODCALLTYPE ContactFromJID(LPCTSTR jid); // Returns contact handle for given JID.
+ LPTSTR STDMETHODCALLTYPE ContactToJID(MCONTACT hContact); // Returns JID of hContact. You must free the result using mir_free().
LPTSTR STDMETHODCALLTYPE GetBestResourceName(LPCTSTR jid); // Returns best resource name for given JID. You must free the result using mir_free().
LPTSTR STDMETHODCALLTYPE GetResourceList(LPCTSTR jid); // Returns all resource names for a given JID in format "resource1\0resource2\0resource3\0\0" (all resources are separated by \0 character and the whole string is terminated with two \0 characters). You must free the string using mir_free().
char* STDMETHODCALLTYPE GetModuleName() const; // Returns Jabber module name.
diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 5df492cb82..a4cbc67229 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -466,7 +466,7 @@ int CJabberProto::AdhocOptionsHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe int CJabberProto::RcGetUnreadEventsCount()
{
int nEventsSent = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL) continue;
@@ -552,7 +552,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe m_options.RcMarkMessagesAsRead = bRemoveCListEvents ? 1 : 0;
int nEventsSent = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT tszJid( getTStringA(hContact, "jid"));
if (tszJid == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_std.cpp b/protocols/JabberG/src/jabber_std.cpp index 985030607f..1d633787eb 100644 --- a/protocols/JabberG/src/jabber_std.cpp +++ b/protocols/JabberG/src/jabber_std.cpp @@ -41,7 +41,7 @@ void __forceinline sttCryptString(char *str) }
}
-static TCHAR* JSetStringCrypt(LPCSTR szModule, HCONTACT hContact, char *valueName)
+static TCHAR* JSetStringCrypt(LPCSTR szModule, MCONTACT hContact, char *valueName)
{
DBVARIANT dbv;
if (db_get_s(hContact, szModule, valueName, &dbv))
@@ -62,7 +62,7 @@ void CJabberProto::ConvertPasswords() setTString("Password", passw);
delSetting("LoginPassword");
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if ((passw = JSetStringCrypt(m_szModuleName, hContact, "LoginPassword")) == NULL)
continue;
diff --git a/protocols/JabberG/src/jabber_svc.cpp b/protocols/JabberG/src/jabber_svc.cpp index 6741a69007..d1e828ea2c 100644 --- a/protocols/JabberG/src/jabber_svc.cpp +++ b/protocols/JabberG/src/jabber_svc.cpp @@ -449,7 +449,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) return 1;
TCHAR *szMsgBody = NULL;
- HCONTACT hContact = HContactFromJID(szJid, TRUE);
+ MCONTACT hContact = HContactFromJID(szJid, TRUE);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
if (hContact == NULL)
@@ -520,7 +520,7 @@ INT_PTR __cdecl CJabberProto::JabberServiceParseXmppURI(WPARAM, LPARAM lParam) if (!ServiceExists(MS_FILE_SENDFILE))
return 1;
- HCONTACT hContact = HContactFromJID(szJid, TRUE);
+ MCONTACT hContact = HContactFromJID(szJid, TRUE);
if (hContact == NULL)
hContact = DBCreateContact(szJid, szJid, TRUE, TRUE);
if (hContact == NULL)
@@ -538,7 +538,7 @@ INT_PTR __cdecl CJabberProto::JabberSendNudge(WPARAM wParam, LPARAM) if (!m_bJabberOnline)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
ptrT jid( getTStringA(hContact, "jid"));
if (jid == NULL)
return 0;
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index eed8b47784..41c7238f64 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -559,7 +559,7 @@ recvRest: ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)oldStatus, m_iStatus);
// Set all contacts to offline
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
SetContactOfflineStatus(hContact);
mir_free(m_szJabberJID);
@@ -995,7 +995,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) m_pepServices.ProcessEvent(from, eventNode);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (!hContact)
return;
@@ -1030,7 +1030,7 @@ void CJabberProto::OnProcessPubsubEvent(HXML node) }
// returns 0, if error or no events
-DWORD JabberGetLastContactMessageTime(HCONTACT hContact)
+DWORD JabberGetLastContactMessageTime(MCONTACT hContact)
{
// TODO: time cache can improve performance
HANDLE hDbEvent = db_event_last(hContact);
@@ -1051,9 +1051,9 @@ DWORD JabberGetLastContactMessageTime(HCONTACT hContact) return dwTime;
}
-HCONTACT CJabberProto::CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem)
+MCONTACT CJabberProto::CreateTemporaryContact(const TCHAR *szJid, JABBER_LIST_ITEM* chatItem)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (chatItem) {
const TCHAR *p = _tcschr(szJid, '/');
if (p != NULL && p[1] != '\0')
@@ -1101,7 +1101,7 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) if (m_messageManager.HandleMessagePermanent(node, info))
return;
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
JABBER_LIST_ITEM *chatItem = ListGetItemPtr(LIST_CHATROOM, from);
if (chatItem) {
HXML xCaptcha = xmlGetChild(node, "captcha");
@@ -1353,12 +1353,12 @@ void CJabberProto::OnProcessMessage(HXML node, ThreadData* info) const TCHAR *group = xmlGetText(xmlGetChild(iNode, _T("group")));
if (action && jid && _tcsstr(jid, chkJID)) {
if (!_tcscmp(action, _T("add"))) {
- HCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
+ MCONTACT hContact = DBCreateContact(jid, nick, FALSE, FALSE);
if (group)
db_set_ts(hContact, "CList", "Group", group);
}
else if (!_tcscmp(action, _T("delete"))) {
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact)
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
@@ -1462,7 +1462,7 @@ void CJabberProto::OnProcessPresenceCapabilites(HXML node) r->m_tszCapsNode = mir_tstrdup(szNode);
r->m_tszCapsVer = mir_tstrdup(szVer);
r->m_tszCapsExt = mir_tstrdup(szExt);
- HCONTACT hContact = HContactFromJID(from);
+ MCONTACT hContact = HContactFromJID(from);
if (hContact)
UpdateMirVer(hContact, r);
}
@@ -1477,7 +1477,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_ROSTER, jid);
if (item == NULL)
return;
- HCONTACT hContact = HContactFromJID(jid);
+ MCONTACT hContact = HContactFromJID(jid);
if (hContact == NULL)
return;
@@ -1535,7 +1535,7 @@ void CJabberProto::UpdateJidDbSettings(const TCHAR *jid) void CJabberProto::OnProcessPresence(HXML node, ThreadData* info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
HXML showNode;
JABBER_LIST_ITEM *item;
LPCTSTR from, show;
diff --git a/protocols/JabberG/src/jabber_userinfo.cpp b/protocols/JabberG/src/jabber_userinfo.cpp index adb80356f6..68eaaf10c0 100644 --- a/protocols/JabberG/src/jabber_userinfo.cpp +++ b/protocols/JabberG/src/jabber_userinfo.cpp @@ -74,7 +74,7 @@ struct UserInfoStringBuf struct JabberUserInfoDlgData
{
- HCONTACT hContact;
+ MCONTACT hContact;
CJabberProto *ppro;
JABBER_LIST_ITEM *item;
int resourcesCount;
@@ -311,7 +311,7 @@ static void sttFillResourceInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM hti sttFillInfoLine(hwndTree, htiSoftwareInfo, NULL, TranslateT("Miranda core version"), r->m_tszXMirandaCoreVersion, sttInfoLineId(resource, INFOLINE_SOFTWARE_INFORMATION, nLineId++));
}
-static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, HCONTACT hContact, TCHAR *szTitle, char *pszSlot)
+static void sttFillAdvStatusInfo(CJabberProto *ppro, HWND hwndTree, HTREEITEM htiRoot, DWORD dwInfoLine, MCONTACT hContact, TCHAR *szTitle, char *pszSlot)
{
char *szAdvStatusIcon = ppro->ReadAdvStatusA(hContact, pszSlot, ADVSTATUS_VAL_ICON);
TCHAR *szAdvStatusTitle = ppro->ReadAdvStatusT(hContact, pszSlot, ADVSTATUS_VAL_TITLE);
@@ -340,7 +340,7 @@ static void sttFillUserInfo(CJabberProto *ppro, HWND hwndTree, JABBER_LIST_ITEM HTREEITEM htiRoot = sttFillInfoLine(hwndTree, NULL, ppro->LoadIconEx("main"), _T("JID"), item->jid, sttInfoLineId(0, INFOLINE_NAME), true);
TCHAR buf[256];
- if (HCONTACT hContact = ppro->HContactFromJID(item->jid)) {
+ if (MCONTACT hContact = ppro->HContactFromJID(item->jid)) {
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_MOOD), hContact, TranslateT("Mood"), ADVSTATUS_MOOD);
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_ACTIVITY), hContact, TranslateT("Activity"), ADVSTATUS_ACTIVITY);
sttFillAdvStatusInfo(ppro, hwndTree, htiRoot, sttInfoLineId(0, INFOLINE_TUNE), hContact, TranslateT("Tune"), ADVSTATUS_TUNE);
@@ -445,7 +445,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa dat->resourcesCount = -1;
if (CallService(MS_DB_CONTACT_IS, (WPARAM)lParam, 0))
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
else if (!IsBadReadPtr((void*)lParam, sizeof(JABBER_LIST_ITEM))) {
dat->hContact = NULL;
dat->item = (JABBER_LIST_ITEM *)lParam;
@@ -550,7 +550,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
SendMessage(hwndDlg, WM_JABBER_REFRESH, 0, (LPARAM)hContact);
}
break;
@@ -589,7 +589,7 @@ static INT_PTR CALLBACK JabberUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPa struct USER_PHOTO_INFO
{
- HCONTACT hContact;
+ MCONTACT hContact;
HBITMAP hBitmap;
CJabberProto *ppro;
};
@@ -605,7 +605,7 @@ static INT_PTR CALLBACK JabberUserPhotoDlgProc(HWND hwndDlg, UINT msg, WPARAM wP // lParam is hContact
TranslateDialogDefault(hwndDlg);
photoInfo = (USER_PHOTO_INFO *) mir_alloc(sizeof(USER_PHOTO_INFO));
- photoInfo->hContact = (HCONTACT)lParam;
+ photoInfo->hContact = (MCONTACT)lParam;
photoInfo->ppro = NULL;
photoInfo->hBitmap = NULL;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR) photoInfo);
@@ -800,7 +800,7 @@ int CJabberProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
if (hContact == NULL) {
// Show our vcard
OnUserInfoInit_VCard(wParam, lParam);
@@ -844,7 +844,7 @@ void JabberUserInfoUninit() /////////////////////////////////////////////////////////////////////////////////////////
// JabberUserInfoUpdate
-void JabberUserInfoUpdate(HCONTACT hContact)
+void JabberUserInfoUpdate(MCONTACT hContact)
{
if (!hContact)
WindowList_BroadcastAsync(hUserInfoList, WM_JABBER_REFRESH, 0, 0);
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 9a881deafb..a93186ee14 100644 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -32,14 +32,14 @@ int CJabberProto::SerialNext(void) }
///////////////////////////////////////////////////////////////////////////////
-// JabberChatRoomHContactFromJID - looks for the char room HCONTACT with required JID
+// JabberChatRoomHContactFromJID - looks for the char room MCONTACT with required JID
-HCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
+MCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid)
{
if (jid == NULL)
return NULL;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
ptrT dbJid( getTStringA(hContact, "ChatRoomID"));
if (dbJid == NULL)
if ((dbJid = getTStringA(hContact, "jid")) == NULL)
@@ -53,16 +53,16 @@ HCONTACT CJabberProto::ChatRoomHContactFromJID(const TCHAR *jid) }
///////////////////////////////////////////////////////////////////////////////
-// JabberHContactFromJID - looks for the HCONTACT with required JID
+// JabberHContactFromJID - looks for the MCONTACT with required JID
-HCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
+MCONTACT CJabberProto::HContactFromJID(const TCHAR *jid, BOOL bStripResource)
{
if (jid == NULL)
return NULL;
JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_CHATROOM, jid);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
bool bIsChat = isChatRoom(hContact);
ptrT dbJid( getTStringA(hContact, bIsChat ? "ChatRoomID" : "jid"));
@@ -513,7 +513,7 @@ void CJabberProto::SendVisibleInvisiblePresence(BOOL invisible) if (item == NULL)
continue;
- HCONTACT hContact = HContactFromJID(item->jid);
+ MCONTACT hContact = HContactFromJID(item->jid);
if (hContact == NULL)
continue;
@@ -727,7 +727,7 @@ int __stdcall JabberGetPacketID(HXML n) ///////////////////////////////////////////////////////////////////////////////
// JabberGetClientJID - adds a resource postfix to a JID
-TCHAR* CJabberProto::GetClientJID(HCONTACT hContact, TCHAR *dest, size_t destLen)
+TCHAR* CJabberProto::GetClientJID(MCONTACT hContact, TCHAR *dest, size_t destLen)
{
if (hContact == NULL)
return NULL;
@@ -932,7 +932,7 @@ static VOID CALLBACK sttRebuildInfoFrameApcProc(void* param) {
if ((item=ppro->ListGetItemPtrFromIndex(i)) != NULL) {
if (_tcschr(item->jid, '@') == NULL && _tcschr(item->jid, '/') == NULL && item->subscription!=SUB_NONE) {
- HCONTACT hContact = ppro->HContactFromJID(item->jid);
+ MCONTACT hContact = ppro->HContactFromJID(item->jid);
if (hContact == NULL) continue;
char name[128];
diff --git a/protocols/JabberG/src/jabber_xstatus.cpp b/protocols/JabberG/src/jabber_xstatus.cpp index 28d8b2a416..4843701d63 100644 --- a/protocols/JabberG/src/jabber_xstatus.cpp +++ b/protocols/JabberG/src/jabber_xstatus.cpp @@ -616,7 +616,7 @@ CPepMood::~CPepMood() void CPepMood::ProcessItems(const TCHAR *from, HXML itemsNode)
{
- HCONTACT hContact = NULL, hSelfContact = NULL;
+ MCONTACT hContact = NULL, hSelfContact = NULL;
if (!m_proto->IsMyOwnJID(from)) {
hContact = m_proto->HContactFromJID(from);
if (!hContact) return;
@@ -659,19 +659,19 @@ void CPepMood::CreateData(HXML n) moodNode << XCHILD(_T("text"), m_text);
}
-void CPepMood::ResetExtraIcon(HCONTACT hContact)
+void CPepMood::ResetExtraIcon(MCONTACT hContact)
{
char *szMood = m_proto->ReadAdvStatusA(hContact, ADVSTATUS_MOOD, "id");
SetExtraIcon(hContact, szMood);
mir_free(szMood);
}
-void CPepMood::SetExtraIcon(HCONTACT hContact, char *szMood)
+void CPepMood::SetExtraIcon(MCONTACT hContact, char *szMood)
{
ExtraIcon_SetIcon(hExtraMood, hContact, szMood == NULL ? NULL : g_MoodIcons.GetIcolibHandle(szMood));
}
-void CPepMood::SetMood(HCONTACT hContact, const TCHAR *szMood, const TCHAR *szText)
+void CPepMood::SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szText)
{
int mood = -1;
if (szMood) {
@@ -994,7 +994,7 @@ CPepActivity::~CPepActivity() void CPepActivity::ProcessItems(const TCHAR *from, HXML itemsNode)
{
- HCONTACT hContact = NULL, hSelfContact = NULL;
+ MCONTACT hContact = NULL, hSelfContact = NULL;
if (!m_proto->IsMyOwnJID(from)) {
hContact = m_proto->HContactFromJID(from);
if (!hContact) return;
@@ -1051,19 +1051,19 @@ void CPepActivity::CreateData(HXML n) activityNode << XCHILD(_T("text"), m_text);
}
-void CPepActivity::ResetExtraIcon(HCONTACT hContact)
+void CPepActivity::ResetExtraIcon(MCONTACT hContact)
{
char *szActivity = m_proto->ReadAdvStatusA(hContact, ADVSTATUS_ACTIVITY, "id");
SetExtraIcon(hContact, szActivity);
mir_free(szActivity);
}
-void CPepActivity::SetExtraIcon(HCONTACT hContact, char *szActivity)
+void CPepActivity::SetExtraIcon(MCONTACT hContact, char *szActivity)
{
ExtraIcon_SetIcon(hExtraActivity, hContact, szActivity == NULL ? NULL : g_ActivityIcons.GetIcolibHandle(szActivity));
}
-void CPepActivity::SetActivity(HCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText)
+void CPepActivity::SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText)
{
int activity = -1;
if (szFirst || szSecond) {
@@ -1194,7 +1194,7 @@ BOOL CJabberProto::SendPepTune(TCHAR* szArtist, TCHAR* szLength, TCHAR* szSource return TRUE;
}
-void CJabberProto::SetContactTune(HCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack)
+void CJabberProto::SetContactTune(MCONTACT hContact, LPCTSTR szArtist, LPCTSTR szLength, LPCTSTR szSource, LPCTSTR szTitle, LPCTSTR szTrack)
{
if (!szArtist && !szTitle) {
delSetting(hContact, "ListeningTo");
@@ -1342,7 +1342,7 @@ INT_PTR __cdecl CJabberProto::OnGetXStatusEx(WPARAM wParam, LPARAM lParam) if (pepMood == NULL)
return 1;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// fill status member
if (pData->flags & CSSF_MASK_STATUS)
@@ -1451,7 +1451,7 @@ void CJabberProto::RegisterAdvStatusSlot(const char *pszSlot) db_set_resident(szSetting, "text");
}
-void CJabberProto::ResetAdvStatus(HCONTACT hContact, const char *pszSlot)
+void CJabberProto::ResetAdvStatus(MCONTACT hContact, const char *pszSlot)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/id", m_szModuleName, pszSlot);
@@ -1467,7 +1467,7 @@ void CJabberProto::ResetAdvStatus(HCONTACT hContact, const char *pszSlot) db_unset(hContact, "AdvStatus", szSetting);
}
-void CJabberProto::WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText)
+void CJabberProto::WriteAdvStatus(MCONTACT hContact, const char *pszSlot, const TCHAR *pszMode, const char *pszIcon, const TCHAR *pszTitle, const TCHAR *pszText)
{
char szSetting[128];
@@ -1490,14 +1490,14 @@ void CJabberProto::WriteAdvStatus(HCONTACT hContact, const char *pszSlot, const }
}
-char* CJabberProto::ReadAdvStatusA(HCONTACT hContact, const char *pszSlot, const char *pszValue)
+char* CJabberProto::ReadAdvStatusA(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
return db_get_sa(hContact, "AdvStatus", szSetting);
}
-TCHAR* CJabberProto::ReadAdvStatusT(HCONTACT hContact, const char *pszSlot, const char *pszValue)
+TCHAR* CJabberProto::ReadAdvStatusT(MCONTACT hContact, const char *pszSlot, const char *pszValue)
{
char szSetting[128];
mir_snprintf(szSetting, SIZEOF(szSetting), "%s/%s/%s", m_szModuleName, pszSlot, pszValue);
diff --git a/protocols/JabberG/src/jabber_xstatus.h b/protocols/JabberG/src/jabber_xstatus.h index f0ebf5429a..cbe77aae6f 100644 --- a/protocols/JabberG/src/jabber_xstatus.h +++ b/protocols/JabberG/src/jabber_xstatus.h @@ -45,7 +45,7 @@ public: virtual void InitGui() {}
virtual void RebuildMenu() {}
- virtual void ResetExtraIcon(HCONTACT) {}
+ virtual void ResetExtraIcon(MCONTACT) {}
virtual bool LaunchSetGui() { return false; }
protected:
@@ -88,7 +88,7 @@ public: (*this)[i].RebuildMenu();
}
- void ResetExtraIcon(HCONTACT hContact)
+ void ResetExtraIcon(MCONTACT hContact)
{
for (int i=0; i < getCount(); i++)
(*this)[i].ResetExtraIcon(hContact);
@@ -152,7 +152,7 @@ public: CPepMood(CJabberProto *proto);
~CPepMood();
void ProcessItems(const TCHAR *from, HXML items);
- void ResetExtraIcon(HCONTACT hContact);
+ void ResetExtraIcon(MCONTACT hContact);
public:
TCHAR *m_text;
@@ -161,9 +161,9 @@ public: protected:
void CreateData(HXML);
void ShowSetDialog(BYTE bQuiet);
- void SetExtraIcon(HCONTACT hContact, char *szMood);
+ void SetExtraIcon(MCONTACT hContact, char *szMood);
- void SetMood(HCONTACT hContact, const TCHAR *szMood, const TCHAR *szText);
+ void SetMood(MCONTACT hContact, const TCHAR *szMood, const TCHAR *szText);
};
class CPepActivity: public CPepGuiService
@@ -173,7 +173,7 @@ public: CPepActivity(CJabberProto *proto);
~CPepActivity();
void ProcessItems(const TCHAR *from, HXML items);
- void ResetExtraIcon(HCONTACT hContact);
+ void ResetExtraIcon(MCONTACT hContact);
protected:
TCHAR *m_text;
@@ -181,9 +181,9 @@ protected: void CreateData(HXML);
void ShowSetDialog(BYTE bQuiet);
- void SetExtraIcon(HCONTACT hContact, char *szActivity);
+ void SetExtraIcon(MCONTACT hContact, char *szActivity);
- void SetActivity(HCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText);
+ void SetActivity(MCONTACT hContact, LPCTSTR szFirst, LPCTSTR szSecond, LPCTSTR szText);
};
#endif // _JABBER_XSTATUS_H_
diff --git a/protocols/JabberG/src/ui_utils.cpp b/protocols/JabberG/src/ui_utils.cpp index d48e881578..45303df0bc 100644 --- a/protocols/JabberG/src/ui_utils.cpp +++ b/protocols/JabberG/src/ui_utils.cpp @@ -601,7 +601,7 @@ BOOL CCtrlClc::OnNotify(int, NMHDR *pnmh) return FALSE;
}
-void CCtrlClc::AddContact(HCONTACT hContact)
+void CCtrlClc::AddContact(MCONTACT hContact)
{ SendMessage(m_hwnd, CLM_ADDCONTACT, (WPARAM)hContact, 0);
}
@@ -633,7 +633,7 @@ void CCtrlClc::Expand(HANDLE hItem, DWORD flags) { SendMessage(m_hwnd, CLM_EXPAND, (WPARAM)hItem, flags);
}
-HANDLE CCtrlClc::FindContact(HCONTACT hContact)
+HANDLE CCtrlClc::FindContact(MCONTACT hContact)
{ return (HANDLE)SendMessage(m_hwnd, CLM_FINDCONTACT, (WPARAM)hContact, 0);
}
diff --git a/protocols/JabberG/src/ui_utils.h b/protocols/JabberG/src/ui_utils.h index 7e0b4792ad..2bc6b2d0e6 100644 --- a/protocols/JabberG/src/ui_utils.h +++ b/protocols/JabberG/src/ui_utils.h @@ -458,7 +458,7 @@ class CCtrlClc: public CCtrlBase public:
CCtrlClc(CDlgBase* dlg, int ctrlId);
- void AddContact(HCONTACT hContact);
+ void AddContact(MCONTACT hContact);
void AddGroup(HANDLE hGroup);
void AutoRebuild();
void DeleteItem(HANDLE hItem);
@@ -466,7 +466,7 @@ public: void EndEditLabel(bool save);
void EnsureVisible(HANDLE hItem, bool partialOk);
void Expand(HANDLE hItem, DWORD flags);
- HANDLE FindContact(HCONTACT hContact);
+ HANDLE FindContact(MCONTACT hContact);
HANDLE FindGroup(HANDLE hGroup);
COLORREF GetBkColor();
bool GetCheck(HANDLE hItem);
diff --git a/protocols/MRA/src/Mra.h b/protocols/MRA/src/Mra.h index 59063cbba3..c76e9cc70c 100644 --- a/protocols/MRA/src/Mra.h +++ b/protocols/MRA/src/Mra.h @@ -146,16 +146,16 @@ __forceinline BinBuffer& operator >>(BinBuffer& buf, CMStringW &sVar) { buf.get /////////////////////////////////////////////////////////////////////////////
-bool DB_GetStaticStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
-bool DB_GetStaticStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPWSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
+bool DB_GetStaticStringA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
+bool DB_GetStaticStringW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPWSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
-bool DB_GetStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringA &Ret);
-bool DB_GetStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringW &Ret);
+bool DB_GetStringA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringA &Ret);
+bool DB_GetStringW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringW &Ret);
-bool DB_SetStringExA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringA &value);
-bool DB_SetStringExW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringW &value);
+bool DB_SetStringExA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringA &value);
+bool DB_SetStringExW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringW &value);
-bool DB_GetContactSettingBlob(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPVOID lpRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
+bool DB_GetContactSettingBlob(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPVOID lpRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize);
#include "MraConstans.h"
#include "MraProto.h"
@@ -227,16 +227,16 @@ CMStringW DecodeXML(const CMStringW &lptszMessage); CMStringW EncodeXML(const CMStringW &lptszMessage);
bool IsHTTPSProxyUsed(HANDLE m_hNetlibUser);
-bool IsContactMraProto(HCONTACT hContact);
+bool IsContactMraProto(MCONTACT hContact);
bool IsEMailMR(const CMStringA& szEmail);
bool GetEMailFromString(const CMStringA& szBuff, CMStringA& szEmail);
bool IsPhone(LPSTR lpszString, size_t dwStringSize);
-bool IsContactPhone(HCONTACT hContact, LPSTR lpszPhone, size_t dwPhoneSize);
+bool IsContactPhone(MCONTACT hContact, LPSTR lpszPhone, size_t dwPhoneSize);
HANDLE MraHContactFromPhone(LPSTR lpszPhone, size_t dwPhoneSize, BOOL bAddIfNeeded, BOOL bTemporary, BOOL *pbAdded);
void EnableControlsArray(HWND hWndDlg, WORD *pwControlsList, size_t dwControlsListCount, BOOL bEnabled);
bool MraRequestXStatusDetails(DWORD dwXStatus);
-bool MraSendReplyBlogStatus(HCONTACT hContact);
+bool MraSendReplyBlogStatus(MCONTACT hContact);
DWORD GetYears(CONST PSYSTEMTIME pcstSystemTime);
DWORD FindFile(LPWSTR lpszFolder, DWORD dwFolderLen, LPWSTR lpszFileName, DWORD dwFileNameLen, LPWSTR lpszRetFilePathName, DWORD dwRetFilePathLen, DWORD *pdwRetFilePathLen);
DWORD MemFillRandom(LPVOID lpBuff, size_t dwBuffSize);
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 9ae3ee41dc..da45ef5852 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -30,7 +30,7 @@ struct MRA_AVATARS_QUEUE_ITEM : public FIFO_MT_ITEM {
DWORD dwAvatarsQueueID;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
};
#define FILETIME_SECOND ((DWORDLONG)10000000)
@@ -137,7 +137,7 @@ void CMraProto::MraAvatarsQueueDestroy(HANDLE hAvatarsQueueHandle) mir_free(pmraaqAvatarsQueue);
}
-DWORD CMraProto::MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD *pdwAvatarsQueueID)
+DWORD CMraProto::MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID)
{
if (!hAvatarsQueueHandle)
return ERROR_INVALID_HANDLE;
@@ -453,7 +453,7 @@ DWORD MraAvatarsHttpTransaction(HANDLE m_hConnection, DWORD dwRequestType, LPCST return 0;
}
-bool CMraProto::MraAvatarsGetContactTime(HCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime)
+bool CMraProto::MraAvatarsGetContactTime(MCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime)
{
if (lpszValueName && pstTime) {
INTERNET_TIME itAvatarLastModifiedTimeLocal;
@@ -468,7 +468,7 @@ bool CMraProto::MraAvatarsGetContactTime(HCONTACT hContact, LPSTR lpszValueName, }
-void CMraProto::MraAvatarsSetContactTime(HCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime)
+void CMraProto::MraAvatarsSetContactTime(MCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime)
{
if (!lpszValueName)
return;
@@ -486,7 +486,7 @@ void CMraProto::MraAvatarsSetContactTime(HCONTACT hContact, LPSTR lpszValueName, delSetting(hContact, lpszValueName);
}
-DWORD CMraProto::MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HCONTACT hContact, DWORD dwFormat, CMStringW &res)
+DWORD CMraProto::MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, MCONTACT hContact, DWORD dwFormat, CMStringW &res)
{
res.Empty();
if (hAvatarsQueueHandle == NULL)
@@ -523,7 +523,7 @@ DWORD CMraProto::MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HCONTACT hCon return ERROR_INSUFFICIENT_BUFFER;
}
-DWORD CMraProto::MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD *pdwAvatarsQueueID, DWORD *pdwFormat, LPTSTR lpszPath)
+DWORD CMraProto::MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID, DWORD *pdwFormat, LPTSTR lpszPath)
{
DWORD dwRetCode = GAIR_NOAVATAR;
@@ -570,7 +570,7 @@ DWORD CMraProto::MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFl return dwRetCode;
}
-DWORD CMraProto::MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwSourceID)
+DWORD CMraProto::MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwSourceID)
{
DWORD dwRetCode = GAIR_NOAVATAR;
@@ -662,7 +662,7 @@ INT_PTR CALLBACK MraAvatarsQueueDlgProcOpts(HWND hWndDlg, UINT msg, WPARAM wPara }
-DWORD CMraProto::MraAvatarsDeleteContactAvatarFile(HANDLE hAvatarsQueueHandle, HCONTACT hContact)
+DWORD CMraProto::MraAvatarsDeleteContactAvatarFile(HANDLE hAvatarsQueueHandle, MCONTACT hContact)
{
if (hAvatarsQueueHandle == NULL)
return ERROR_INVALID_HANDLE;
diff --git a/protocols/MRA/src/MraChat.cpp b/protocols/MRA/src/MraChat.cpp index 4c95f5ec38..209d14c71c 100644 --- a/protocols/MRA/src/MraChat.cpp +++ b/protocols/MRA/src/MraChat.cpp @@ -27,7 +27,7 @@ bool CMraProto::MraChatRegister() return TRUE;
}
-INT_PTR CMraProto::MraChatSessionNew(HCONTACT hContact)
+INT_PTR CMraProto::MraChatSessionNew(MCONTACT hContact)
{
if (bChatExists)
if (hContact) {
@@ -63,7 +63,7 @@ INT_PTR CMraProto::MraChatSessionNew(HCONTACT hContact) return 1;
}
-void CMraProto::MraChatSessionDestroy(HCONTACT hContact)
+void CMraProto::MraChatSessionDestroy(MCONTACT hContact)
{
if (!bChatExists || hContact == NULL)
return;
@@ -79,7 +79,7 @@ void CMraProto::MraChatSessionDestroy(HCONTACT hContact) CallServiceSync(MS_GC_EVENT, WINDOW_CLEARLOG, (LPARAM)&gce);
}
-INT_PTR CMraProto::MraChatSessionEventSendByHandle(HCONTACT hContactChatSession, DWORD dwType, DWORD dwFlags, const CMStringA &lpszUID, LPCWSTR lpwszStatus, LPCWSTR lpwszMessage, DWORD_PTR dwItemData, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionEventSendByHandle(MCONTACT hContactChatSession, DWORD dwType, DWORD dwFlags, const CMStringA &lpszUID, LPCWSTR lpwszStatus, LPCWSTR lpwszMessage, DWORD_PTR dwItemData, DWORD dwTime)
{
if (!bChatExists)
return 1;
@@ -111,7 +111,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(HCONTACT hContactChatSession, gce.ptszNick = wszNick;
}
else {
- HCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
+ MCONTACT hContactSender = MraHContactFromEmail(lpszUID, FALSE, TRUE, NULL);
wszUID = lpszUID;
if (hContactSender)
gce.ptszNick = GetContactNameW(hContactSender);
@@ -122,7 +122,7 @@ INT_PTR CMraProto::MraChatSessionEventSendByHandle(HCONTACT hContactChatSession, return CallServiceSync(MS_GC_EVENT, NULL, (LPARAM)&gce);
}
-INT_PTR CMraProto::MraChatSessionInvite(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionInvite(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
{
if (!hContactChatSession)
return 1;
@@ -132,7 +132,7 @@ INT_PTR CMraProto::MraChatSessionInvite(HCONTACT hContactChatSession, const CMSt return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_ACTION, GCEF_ADDTOLOG, lpszEMailInMultiChat, NULL, wszBuff, 0, dwTime);
}
-INT_PTR CMraProto::MraChatSessionMembersAdd(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionMembersAdd(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
{
if (!hContactChatSession)
return 1;
@@ -142,7 +142,7 @@ INT_PTR CMraProto::MraChatSessionMembersAdd(HCONTACT hContactChatSession, const return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_ACTION, GCEF_ADDTOLOG, lpszEMailInMultiChat, NULL, wszBuff, 0, dwTime);
}
-INT_PTR CMraProto::MraChatSessionJoinUser(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionJoinUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
{
if (hContactChatSession)
return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_JOIN, GCEF_ADDTOLOG, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_VISITOR], _T(""), 0, dwTime);
@@ -150,7 +150,7 @@ INT_PTR CMraProto::MraChatSessionJoinUser(HCONTACT hContactChatSession, const CM return 1;
}
-INT_PTR CMraProto::MraChatSessionLeftUser(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionLeftUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime)
{
if (hContactChatSession)
return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_PART, GCEF_ADDTOLOG, lpszEMailInMultiChat, NULL, NULL, 0, dwTime);
@@ -158,7 +158,7 @@ INT_PTR CMraProto::MraChatSessionLeftUser(HCONTACT hContactChatSession, const CM return 1;
}
-INT_PTR CMraProto::MraChatSessionSetIviter(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat)
+INT_PTR CMraProto::MraChatSessionSetIviter(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat)
{
if (hContactChatSession && !lpszEMailInMultiChat.IsEmpty())
return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_ADDSTATUS, 0, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_INVITER], NULL, 0, 0);
@@ -166,7 +166,7 @@ INT_PTR CMraProto::MraChatSessionSetIviter(HCONTACT hContactChatSession, const C return 1;
}
-INT_PTR CMraProto::MraChatSessionSetOwner(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat)
+INT_PTR CMraProto::MraChatSessionSetOwner(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat)
{
if (hContactChatSession && !lpszEMailInMultiChat.IsEmpty())
return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_ADDSTATUS, 0, lpszEMailInMultiChat, lpwszStatuses[MRA_CHAT_STATUS_OWNER], NULL, 0, 0);
@@ -175,7 +175,7 @@ INT_PTR CMraProto::MraChatSessionSetOwner(HCONTACT hContactChatSession, const CM }
-INT_PTR CMraProto::MraChatSessionMessageAdd(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, const CMStringW &lpwszMessage, DWORD dwTime)
+INT_PTR CMraProto::MraChatSessionMessageAdd(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, const CMStringW &lpwszMessage, DWORD dwTime)
{
if (hContactChatSession)
return MraChatSessionEventSendByHandle(hContactChatSession, GC_EVENT_MESSAGE, GCEF_ADDTOLOG, lpszEMailInMultiChat, NULL, lpwszMessage, 0, dwTime);
@@ -195,7 +195,7 @@ int CMraProto::MraChatGcEventHook(WPARAM, LPARAM lParam) if (gch->ptszText && lstrlen(gch->ptszText)) {
size_t dwMessageSize = lstrlenW(gch->ptszText);
CMStringA szEmail = gch->pDest->ptszID;
- HCONTACT hContact = MraHContactFromEmail(szEmail, FALSE, TRUE, NULL);
+ MCONTACT hContact = MraHContactFromEmail(szEmail, FALSE, TRUE, NULL);
BOOL bSlowSend = getByte("SlowSend", MRA_DEFAULT_SLOW_SEND);
DWORD dwFlags = 0;
@@ -236,7 +236,7 @@ int CMraProto::MraChatGcEventHook(WPARAM, LPARAM lParam) void CMraProto::MraChatSendPrivateMessage(LPSTR lpszEMail)
{
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(lpszEMail, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(lpszEMail, TRUE, TRUE, &bAdded);
if (bAdded)
db_set_b(hContact, "CList", "Hidden", 1);
diff --git a/protocols/MRA/src/MraFilesQueue.cpp b/protocols/MRA/src/MraFilesQueue.cpp index 3f4ec7213f..418f5cf060 100644 --- a/protocols/MRA/src/MraFilesQueue.cpp +++ b/protocols/MRA/src/MraFilesQueue.cpp @@ -27,7 +27,7 @@ struct MRA_FILES_QUEUE_ITEM : public LIST_MT_ITEM CMraProto *ppro;
DWORD dwIDRequest;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORDLONG dwFilesCount;
DWORDLONG dwFilesTotalSize;
MRA_FILES_QUEUE_FILE *pmfqfFiles;
@@ -622,7 +622,7 @@ void MraFilesQueueConnectionReceived(HANDLE hNewConnection, DWORD dwRemoteIP, vo /////////////////////////////////////////////////////////////////////////////////////////
// Receive files
-DWORD CMraProto::MraFilesQueueAddReceive(HANDLE hFilesQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwIDRequest, const CMStringW &lpwszFiles, const CMStringA &szAddresses)
+DWORD CMraProto::MraFilesQueueAddReceive(HANDLE hFilesQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwIDRequest, const CMStringW &lpwszFiles, const CMStringA &szAddresses)
{
if (!hFilesQueueHandle || !dwIDRequest)
return ERROR_INVALID_HANDLE;
@@ -919,7 +919,7 @@ void CMraProto::MraFilesQueueRecvThreadProc(LPVOID lpParameter) /////////////////////////////////////////////////////////////////////////////////////////
// Send files
-DWORD CMraProto::MraFilesQueueAddSend(HANDLE hFilesQueueHandle, DWORD dwFlags, HCONTACT hContact, LPWSTR *plpwszFiles, size_t dwFilesCount, DWORD *pdwIDRequest)
+DWORD CMraProto::MraFilesQueueAddSend(HANDLE hFilesQueueHandle, DWORD dwFlags, MCONTACT hContact, LPWSTR *plpwszFiles, size_t dwFilesCount, DWORD *pdwIDRequest)
{
if (!hFilesQueueHandle)
return ERROR_INVALID_HANDLE;
diff --git a/protocols/MRA/src/MraPopUp.cpp b/protocols/MRA/src/MraPopUp.cpp index 29da89b58f..94fe71dc8e 100644 --- a/protocols/MRA/src/MraPopUp.cpp +++ b/protocols/MRA/src/MraPopUp.cpp @@ -198,7 +198,7 @@ LRESULT CALLBACK MraPopupDlgProc(HWND hWndDlg, UINT msg, WPARAM wParam, LPARAM l return DefWindowProc(hWndDlg, msg, wParam, lParam);
}
-void CMraProto::MraPopupShowFromContactW(HCONTACT hContact, DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage)
+void CMraProto::MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage)
{
WCHAR szTitle[MAX_CONTACTNAME];
CMStringW szNick, szEmail;
@@ -212,7 +212,7 @@ void CMraProto::MraPopupShowFromContactW(HCONTACT hContact, DWORD dwType, DWORD MraPopupShowW(hContact, dwType, dwFlags, szTitle, lpszMessage);
}
-void CMraProto::MraPopupShowW(HCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage)
+void CMraProto::MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage)
{
if (getByte("PopupsEnabled", MRA_DEFAULT_POPUPS_ENABLED))
if (GetBit(getDword("PopupsEventFilter", MRA_DEFAULT_POPUPS_EVENT_FILTER), dwType))
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp index f6ea74dbff..0bb77b16bd 100644 --- a/protocols/MRA/src/MraProto.cpp +++ b/protocols/MRA/src/MraProto.cpp @@ -93,7 +93,7 @@ int CMraProto::OnModulesLoaded(WPARAM, LPARAM) HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMraProto::OnGroupChanged);
// âñåõ â offline // òê unsaved values ñîõðàíÿþòñÿ èõ íóæíî èíèöèàëèçèðîâàòü
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName))
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0);
// unsaved values
@@ -126,13 +126,13 @@ int CMraProto::OnPreShutdown(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
-HCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
+MCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags)
{
if (!plpsEMail)
return NULL;
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(plpsEMail, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(plpsEMail, TRUE, TRUE, &bAdded);
if (hContact == NULL)
return NULL;
@@ -153,7 +153,7 @@ HCONTACT CMraProto::AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTST return hContact;
}
-HCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
if (psr->cbSize != sizeof(PROTOSEARCHRESULT))
return 0;
@@ -161,7 +161,7 @@ HCONTACT CMraProto::AddToList(int flags, PROTOSEARCHRESULT *psr) return AddToListByEmail(psr->email, psr->nick, psr->firstName, psr->lastName, flags);
}
-HCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -186,9 +186,9 @@ HCONTACT CMraProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) HANDLE CMraProto::ChangeInfo(int, void*) { return NULL; }
int CMraProto::FileResume(HANDLE, int*, const TCHAR**) { return 1; }
-int CMraProto::RecvAwayMsg(HCONTACT, int, PROTORECVEVENT*) { return 1; }
-int CMraProto::RecvUrl(HCONTACT, PROTORECVEVENT*) { return 1; }
-int CMraProto::SendUrl(HCONTACT, int, const char*) { return 1; }
+int CMraProto::RecvAwayMsg(MCONTACT, int, PROTORECVEVENT*) { return 1; }
+int CMraProto::RecvUrl(MCONTACT, PROTORECVEVENT*) { return 1; }
+int CMraProto::SendUrl(MCONTACT, int, const char*) { return 1; }
/////////////////////////////////////////////////////////////////////////////////////////
@@ -234,20 +234,20 @@ int CMraProto::AuthDeny(HANDLE hDBEvent, const TCHAR* szReason) return 0;
}
-int CMraProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int CMraProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
Proto_AuthRecv(m_szModuleName, pre);
return 0;
}
-int CMraProto::AuthRequest(HCONTACT hContact, const TCHAR *lptszMessage)
+int CMraProto::AuthRequest(MCONTACT hContact, const TCHAR *lptszMessage)
{
return 1;
}
/////////////////////////////////////////////////////////////////////////////////////////
-HANDLE CMraProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
+HANDLE CMraProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath)
{
if (szPath != NULL)
if ( MraFilesQueueAccept(hFilesQueueHandle, (DWORD)hTransfer, szPath, lstrlen(szPath)) == NO_ERROR)
@@ -256,7 +256,7 @@ HANDLE CMraProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *sz return NULL;
}
-int CMraProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int CMraProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
if (hContact && hTransfer) {
MraFilesQueueCancel(hFilesQueueHandle, (DWORD)hTransfer, TRUE);
@@ -266,14 +266,14 @@ int CMraProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) return 1;
}
-int CMraProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR*)
+int CMraProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR*)
{
return FileCancel(hContact, hTransfer);
}
/////////////////////////////////////////////////////////////////////////////////////////
-DWORD_PTR CMraProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR CMraProto::GetCaps(int type, MCONTACT hContact)
{
switch ( type ) {
case PFLAGNUM_1:
@@ -310,7 +310,7 @@ DWORD_PTR CMraProto::GetCaps(int type, HCONTACT hContact) }
}
-int CMraProto::GetInfo(HCONTACT hContact, int infoType)
+int CMraProto::GetInfo(MCONTACT hContact, int infoType)
{
return MraUpdateContactInfo(hContact) != 0;
}
@@ -347,7 +347,7 @@ HANDLE CMraProto::SearchByName(const TCHAR *pszNick, const TCHAR *pszFirstName, /////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
+int CMraProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = m_szModuleName;
@@ -360,19 +360,19 @@ int CMraProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre) return 0;
}
-int CMraProto::RecvFile(HCONTACT hContact, PROTORECVFILET *pre)
+int CMraProto::RecvFile(MCONTACT hContact, PROTORECVFILET *pre)
{
return Proto_RecvFile(hContact, pre);
}
-int CMraProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int CMraProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
return Proto_RecvMessage(hContact, pre);
}
/////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int CMraProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
INT_PTR iRet = 0;
@@ -398,7 +398,7 @@ int CMraProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTAC return iRet;
}
-HANDLE CMraProto::SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
+HANDLE CMraProto::SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles)
{
INT_PTR iRet = 0;
@@ -410,7 +410,7 @@ HANDLE CMraProto::SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR* return (HANDLE)iRet;
}
-int CMraProto::SendMsg(HCONTACT hContact, int flags, const char *lpszMessage)
+int CMraProto::SendMsg(MCONTACT hContact, int flags, const char *lpszMessage)
{
if (!m_bLoggedIn) {
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, NULL, (LPARAM)"You cannot send when you are offline.");
@@ -450,7 +450,7 @@ int CMraProto::SendMsg(HCONTACT hContact, int flags, const char *lpszMessage) /////////////////////////////////////////////////////////////////////////////////////////
-int CMraProto::SetApparentMode(HCONTACT hContact, int mode)
+int CMraProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (!m_bLoggedIn || !hContact)
return 1;
@@ -509,7 +509,7 @@ int CMraProto::SetStatus(int iNewStatus) // âñåõ â offline, òîëüêî åñëè ìû áûâàëè ïîäêëþ÷åíû
if (dwOldStatusMode > ID_STATUS_OFFLINE)
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID|SCBIF_GROUP_ID|SCBIF_SERVER_FLAG|SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0);
Netlib_CloseHandle(m_hConnection);
@@ -547,7 +547,7 @@ int CMraProto::SetStatus(int iNewStatus) return 0;
}
-HANDLE CMraProto::GetAwayMsg(HCONTACT hContact)
+HANDLE CMraProto::GetAwayMsg(MCONTACT hContact)
{
if (!m_bLoggedIn || ! hContact)
return 0;
@@ -589,7 +589,7 @@ int CMraProto::SetAwayMsg(int m_iStatus, const TCHAR* msg) return 0;
}
-int CMraProto::UserIsTyping(HCONTACT hContact, int type)
+int CMraProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!m_bLoggedIn || !hContact || type == PROTOTYPE_SELFTYPING_OFF)
return 1;
diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h index 3ac3f5cfc9..9377aafc9b 100644 --- a/protocols/MRA/src/MraProto.h +++ b/protocols/MRA/src/MraProto.h @@ -38,23 +38,23 @@ struct CMraProto : public PROTO<CMraProto> // PROTO_INTERFACE
// ====================================================================================
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDBEvent);
virtual int __cdecl AuthDeny(HANDLE hDBEvent, const TCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const TCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const TCHAR* email);
@@ -62,56 +62,56 @@ struct CMraProto : public PROTO<CMraProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
void ShowFormattedErrorMessage(LPWSTR lpwszErrText, DWORD dwErrorCode);
- void MraPopupShowW(HCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage);
- void MraPopupShowFromContactW(HCONTACT hContact, DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage);
+ void MraPopupShowW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPWSTR lpszTitle, LPCWSTR lpszMessage);
+ void MraPopupShowFromContactW(MCONTACT hContact, DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage);
__forceinline void MraPopupShowFromAgentW(DWORD dwType, DWORD dwFlags, LPCWSTR lpszMessage) {
MraPopupShowFromContactW(NULL, dwType, dwFlags, lpszMessage); }
- __forceinline bool mraGetStaticStringA(HCONTACT Contact, const char *ValueName, char *Ret, size_t RetBuffSize, size_t *pRetBuffSize) {
+ __forceinline bool mraGetStaticStringA(MCONTACT Contact, const char *ValueName, char *Ret, size_t RetBuffSize, size_t *pRetBuffSize) {
return DB_GetStaticStringA(Contact, m_szModuleName, ValueName, Ret, RetBuffSize, pRetBuffSize); }
- __forceinline bool mraGetStaticStringW(HCONTACT Contact, const char *ValueName, WCHAR *Ret, size_t RetBuffSize, size_t *pRetBuffSize) {
+ __forceinline bool mraGetStaticStringW(MCONTACT Contact, const char *ValueName, WCHAR *Ret, size_t RetBuffSize, size_t *pRetBuffSize) {
return DB_GetStaticStringW(Contact, m_szModuleName, ValueName, Ret, RetBuffSize, pRetBuffSize); }
- __forceinline bool mraGetStringA(HCONTACT Contact, const char *ValueName, CMStringA &Ret) {
+ __forceinline bool mraGetStringA(MCONTACT Contact, const char *ValueName, CMStringA &Ret) {
return DB_GetStringA(Contact, m_szModuleName, ValueName, Ret); }
- __forceinline bool mraGetStringW(HCONTACT Contact, const char *ValueName, CMStringW &Ret) {
+ __forceinline bool mraGetStringW(MCONTACT Contact, const char *ValueName, CMStringW &Ret) {
return DB_GetStringW(Contact, m_szModuleName, ValueName, Ret); }
- __forceinline bool mraSetStringA(HCONTACT Contact, const char *valueName, const CMStringA &parValue) {
+ __forceinline bool mraSetStringA(MCONTACT Contact, const char *valueName, const CMStringA &parValue) {
return DB_SetStringExA(Contact, m_szModuleName, valueName, parValue); }
- __forceinline bool mraSetStringW(HCONTACT Contact, const char *valueName, const CMStringW &parValue) {
+ __forceinline bool mraSetStringW(MCONTACT Contact, const char *valueName, const CMStringW &parValue) {
return DB_SetStringExW(Contact, m_szModuleName, valueName, parValue); }
- __forceinline bool mraSetStringExA(HCONTACT Contact, const char *valueName, const CMStringA &parValue) {
+ __forceinline bool mraSetStringExA(MCONTACT Contact, const char *valueName, const CMStringA &parValue) {
return DB_SetStringExA(Contact, m_szModuleName, valueName, parValue); }
- __forceinline bool mraSetStringExW(HCONTACT Contact, const char *valueName, const CMStringW &parValue) {
+ __forceinline bool mraSetStringExW(MCONTACT Contact, const char *valueName, const CMStringW &parValue) {
return DB_SetStringExW(Contact, m_szModuleName, valueName, parValue); }
- __forceinline bool mraWriteContactSettingBlob(HCONTACT hContact, const char *lpszValueName, LPVOID lpbValue, size_t dwValueSize) {
+ __forceinline bool mraWriteContactSettingBlob(MCONTACT hContact, const char *lpszValueName, LPVOID lpbValue, size_t dwValueSize) {
return db_set_blob(hContact, m_szModuleName, lpszValueName, lpbValue, dwValueSize) != 0; }
- __forceinline bool mraGetContactSettingBlob(HCONTACT hContact, const char *lpszValueName, LPVOID lpbRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize) {
+ __forceinline bool mraGetContactSettingBlob(MCONTACT hContact, const char *lpszValueName, LPVOID lpbRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize) {
return DB_GetContactSettingBlob(hContact, m_szModuleName, lpszValueName, lpbRet, dwRetBuffSize, pdwRetBuffSize); }
// ====| Services |====================================================================
@@ -196,56 +196,56 @@ struct CMraProto : public PROTO<CMraProto> CRITICAL_SECTION csCriticalSectionSend;
- HCONTACT AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags);
+ MCONTACT AddToListByEmail(LPCTSTR plpsEMail, LPCTSTR plpsNick, LPCTSTR plpsFirstName, LPCTSTR plpsLastName, DWORD dwFlags);
- DWORD MraMessage(BOOL bAddToQueue, HCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &wszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize);
+ DWORD MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &wszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize);
DWORD MraMessageAsk(DWORD dwMsgID, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &wszMessage, const CMStringW &wszMessageRTF);
DWORD MraMessageRecv(const CMStringA &szFrom, DWORD dwMsgID);
- DWORD MraAddContact(HCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones = 0, const CMStringW *wszAuthMessage = 0);
- DWORD MraModifyContact(HCONTACT hContact, DWORD *pdwID = 0, DWORD *pdwContactFlag = 0, DWORD *pdwGroupID = 0, const CMStringA *pszEmail = 0, const CMStringW *pwszCustomName = 0, const CMStringA *pszPhones = 0);
+ DWORD MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones = 0, const CMStringW *wszAuthMessage = 0);
+ DWORD MraModifyContact(MCONTACT hContact, DWORD *pdwID = 0, DWORD *pdwContactFlag = 0, DWORD *pdwGroupID = 0, const CMStringA *pszEmail = 0, const CMStringW *pwszCustomName = 0, const CMStringA *pszPhones = 0);
DWORD MraOfflineMessageDel(DWORDLONG dwMsgUIDL);
- DWORD MraMoveContactToGroup(HCONTACT hContact, DWORD dwGroupID, LPCTSTR ptszGroup);
+ DWORD MraMoveContactToGroup(MCONTACT hContact, DWORD dwGroupID, LPCTSTR ptszGroup);
DWORD MraAuthorize(const CMStringA &szEmail);
DWORD MraChangeStatus(DWORD dwStatus, const CMStringA &szStatusUri, const CMStringW &wszStatusTitle, const CMStringW &wszStatusDesc, DWORD dwFutureFlags);
DWORD MraFileTransfer(const CMStringA &szEmail, DWORD dwIdRequest, DWORD dwFilesTotalSize, const CMStringW &lpwszFiles, const CMStringA &szAddresses);
DWORD MraFileTransferAck(DWORD dwStatus, const CMStringA &szEmail, DWORD dwIdRequest, LPBYTE lpbDescription, size_t dwDescriptionSize);
- HANDLE MraWPRequestW(HCONTACT hContact, DWORD dwAckType, DWORD dwRequestFlags, const CMStringA &szUser, const CMStringA &szDomain, const CMStringW &wszNickName, const CMStringW &wszFirstName, const CMStringW &wszLastName, DWORD dwSex, DWORD dwDate1, DWORD dwDate2, DWORD dwCityID, DWORD dwZodiak, DWORD dwBirthdayMonth, DWORD dwBirthdayDay, DWORD dwCountryID, DWORD dwOnline);
- HANDLE MraWPRequestByEMail(HCONTACT hContact, DWORD dwAckType, CMStringA &szEmail);
+ HANDLE MraWPRequestW(MCONTACT hContact, DWORD dwAckType, DWORD dwRequestFlags, const CMStringA &szUser, const CMStringA &szDomain, const CMStringW &wszNickName, const CMStringW &wszFirstName, const CMStringW &wszLastName, DWORD dwSex, DWORD dwDate1, DWORD dwDate2, DWORD dwCityID, DWORD dwZodiak, DWORD dwBirthdayMonth, DWORD dwBirthdayDay, DWORD dwCountryID, DWORD dwOnline);
+ HANDLE MraWPRequestByEMail(MCONTACT hContact, DWORD dwAckType, CMStringA &szEmail);
DWORD MraGame(const CMStringA &szEmail, DWORD dwGameSessionID, DWORD dwGameMsg, DWORD dwGameMsgID, const CMStringA &lpszData);
DWORD MraLogin2W(CMStringA &szLogin, CMStringA &szPassword, DWORD dwStatus, CMStringA &szStatusUri, CMStringW &wszStatusTitle, CMStringW &wszStatusDesc, DWORD dwFutureFlags, CMStringA &szUserAgentFormatted, CMStringA &szUserAgent);
- DWORD MraSMSW(HCONTACT hContact, const CMStringA &lpszPhone, const CMStringW &lpwszMessage);
+ DWORD MraSMSW(MCONTACT hContact, const CMStringA &lpszPhone, const CMStringW &lpwszMessage);
DWORD MraProxy(const CMStringA &szEmail, DWORD dwIDRequest, DWORD dwDataType, const CMStringA &lpszData, const CMStringA &szAddresses, MRA_GUID mguidSessionID);
DWORD MraProxyAck(DWORD dwStatus, const CMStringA &szEmail, DWORD dwIDRequest, DWORD dwDataType, const CMStringA &lpszData, const CMStringA &szAddresses, MRA_GUID mguidSessionID);
DWORD MraChangeUserBlogStatus(DWORD dwFlags, const CMStringW &wszText, DWORDLONG dwBlogStatusID);
DWORD MraSendPacket(HANDLE m_hConnection, DWORD dwCMDNum, DWORD dwType, LPVOID lpData, size_t dwDataSize);
DWORD MraSendCMD(DWORD dwType, LPVOID lpData, size_t dwDataSize);
- DWORD MraSendQueueCMD(HANDLE hSendQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwAckType, LPBYTE lpbDataQueue, size_t dwDataQueueSize, DWORD dwType, LPVOID lpData, size_t dwDataSize);
+ DWORD MraSendQueueCMD(HANDLE hSendQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwAckType, LPBYTE lpbDataQueue, size_t dwDataQueueSize, DWORD dwType, LPVOID lpData, size_t dwDataSize);
DWORD MraSendNewStatus(DWORD dwStatusMir, DWORD dwXStatusMir, const CMStringW &wszStatusTitle, const CMStringW &wszStatusDesc);
- void MraAddrListStoreToContact(HCONTACT hContact, MRA_ADDR_LIST *pmalAddrList);
+ void MraAddrListStoreToContact(MCONTACT hContact, MRA_ADDR_LIST *pmalAddrList);
- DWORD GetContactFlags(HCONTACT hContact);
- DWORD SetContactFlags(HCONTACT hContact, DWORD dwContactFlag);
- DWORD GetContactBasicInfoW(HCONTACT hContact, DWORD *pdwID, DWORD *pdwGroupID, DWORD *pdwContactFlag, DWORD *pdwContactSeverFlags, DWORD *pdwStatus, CMStringA *szEmail, CMStringW *wszNick, CMStringA *szPhones);
- DWORD SetContactBasicInfoW(HCONTACT hContact, DWORD dwSetInfoFlags, DWORD dwFlags, DWORD dwID, DWORD dwGroupID, DWORD dwContactFlag, DWORD dwContactSeverFlags, DWORD dwStatus, const CMStringA *szEmail, const CMStringW *wszNick, const CMStringA *szPhones);
+ DWORD GetContactFlags(MCONTACT hContact);
+ DWORD SetContactFlags(MCONTACT hContact, DWORD dwContactFlag);
+ DWORD GetContactBasicInfoW(MCONTACT hContact, DWORD *pdwID, DWORD *pdwGroupID, DWORD *pdwContactFlag, DWORD *pdwContactSeverFlags, DWORD *pdwStatus, CMStringA *szEmail, CMStringW *wszNick, CMStringA *szPhones);
+ DWORD SetContactBasicInfoW(MCONTACT hContact, DWORD dwSetInfoFlags, DWORD dwFlags, DWORD dwID, DWORD dwGroupID, DWORD dwContactFlag, DWORD dwContactSeverFlags, DWORD dwStatus, const CMStringA *szEmail, const CMStringW *wszNick, const CMStringA *szPhones);
- DWORD GetContactEMailCount(HCONTACT hContact, BOOL bMRAOnly);
- bool GetContactFirstEMail(HCONTACT hContact, BOOL bMRAOnly, CMStringA &szRetBuff);
+ DWORD GetContactEMailCount(MCONTACT hContact, BOOL bMRAOnly);
+ bool GetContactFirstEMail(MCONTACT hContact, BOOL bMRAOnly, CMStringA &szRetBuff);
- bool IsContactMra(HCONTACT hContact);
+ bool IsContactMra(MCONTACT hContact);
bool IsEMailMy(const CMStringA &szEmail);
bool IsEMailChatAgent(const CMStringA &szEmail);
- bool IsContactChatAgent(HCONTACT hContact);
+ bool IsContactChatAgent(MCONTACT hContact);
- HCONTACT MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNeeded, BOOL bTemporary, BOOL *pbAdded);
- bool MraUpdateContactInfo(HCONTACT hContact);
+ MCONTACT MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNeeded, BOOL bTemporary, BOOL *pbAdded);
+ bool MraUpdateContactInfo(MCONTACT hContact);
DWORD MraSetXStatusInternal(DWORD dwXStatus);
- DWORD MraGetContactStatus(HCONTACT hContact);
- DWORD MraSetContactStatus(HCONTACT hContact, DWORD dwNewStatus);
- DWORD MraContactCapabilitiesGet(HCONTACT hContact);
- void MraContactCapabilitiesSet(HCONTACT hContact, DWORD dwFutureFlags);
+ DWORD MraGetContactStatus(MCONTACT hContact);
+ DWORD MraSetContactStatus(MCONTACT hContact, DWORD dwNewStatus);
+ DWORD MraContactCapabilitiesGet(MCONTACT hContact);
+ void MraContactCapabilitiesSet(MCONTACT hContact, DWORD dwFutureFlags);
void MraUpdateEmailStatus(const CMStringA &szFrom, const CMStringA &szSubject, DWORD dwDate, DWORD dwUIDL);
DWORD MraConvertToRTFW(const CMStringW &wszMessage, CMStringA &szMessageRTF);
@@ -278,19 +278,19 @@ struct CMraProto : public PROTO<CMraProto> DWORD MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA &plpsFrom, CMStringA &plpsText, CMStringA &plpsRFTText, CMStringA &plpsMultiChatData);
- void SetExtraIcons(HCONTACT hContact);
+ void SetExtraIcons(MCONTACT hContact);
void InitMenus(void);
HGENMENU CListCreateMenu(LONG lPosition, LONG lPopupPosition, BOOL bIsStatus, const IconItem *pgdiItems, size_t dwCount, HGENMENU *hResult);
- DWORD ProtoBroadcastAckAsync(HCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam);
- CMStringA CreateBlobFromContact(HCONTACT hContact, const CMStringW &wszRequestReason);
+ DWORD ProtoBroadcastAckAsync(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam);
+ CMStringA CreateBlobFromContact(MCONTACT hContact, const CMStringW &wszRequestReason);
bool GetPassDB(CMStringA& pass);
bool MraRequestXStatusDetails(DWORD dwXStatus);
- bool MraSendReplyBlogStatus(HCONTACT hContact);
- DWORD MraSelectEMailDlgShow(HCONTACT hContact, DWORD dwType);
+ bool MraSendReplyBlogStatus(MCONTACT hContact);
+ DWORD MraSelectEMailDlgShow(MCONTACT hContact, DWORD dwType);
DWORD MraMrimProxyConnect(HANDLE hMraMrimProxyData, HANDLE *phConnection);
@@ -300,8 +300,8 @@ struct CMraProto : public PROTO<CMraProto> void MraMPopSessionQueueFlush(HANDLE hMPopSessionQueue);
size_t MraFilesQueueGetLocalAddressesList(LPSTR lpszBuff, size_t dwBuffSize, DWORD dwPort);
- DWORD MraFilesQueueAddReceive(HANDLE hFilesQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwIDRequest, const CMStringW &wszFiles, const CMStringA &szAddresses);
- DWORD MraFilesQueueAddSend(HANDLE hFilesQueueHandle, DWORD dwFlags, HCONTACT hContact, LPWSTR *plpwszFiles, size_t dwFilesCount, DWORD *pdwIDRequest);
+ DWORD MraFilesQueueAddReceive(HANDLE hFilesQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwIDRequest, const CMStringW &wszFiles, const CMStringA &szAddresses);
+ DWORD MraFilesQueueAddSend(HANDLE hFilesQueueHandle, DWORD dwFlags, MCONTACT hContact, LPWSTR *plpwszFiles, size_t dwFilesCount, DWORD *pdwIDRequest);
DWORD MraFilesQueueCancel(HANDLE hFilesQueueHandle, DWORD dwIDRequest, BOOL bSendDecline);
DWORD MraFilesQueueStartMrimProxy(HANDLE hFilesQueueHandle, DWORD dwIDRequest);
DWORD MraFilesQueueSendMirror(HANDLE hFilesQueueHandle, DWORD dwIDRequest, const CMStringA &szAddresses);
@@ -316,30 +316,30 @@ struct CMraProto : public PROTO<CMraProto> bool bChatExists;
void MraChatDllError();
bool MraChatRegister();
- INT_PTR MraChatSessionNew(HCONTACT hContactChatSession);
- void MraChatSessionDestroy(HCONTACT hContactChatSession);
+ INT_PTR MraChatSessionNew(MCONTACT hContactChatSession);
+ void MraChatSessionDestroy(MCONTACT hContactChatSession);
void MraChatSendPrivateMessage(LPSTR lpwszEMail);
- INT_PTR MraChatSessionEventSendByHandle(HCONTACT hContactChatSession, DWORD dwType, DWORD dwFlags, const CMStringA &szUID, LPCWSTR lpwszStatus, LPCWSTR lpwszMessage, DWORD_PTR dwItemData, DWORD dwTime);
- INT_PTR MraChatSessionInvite(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
- INT_PTR MraChatSessionMembersAdd(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
- INT_PTR MraChatSessionJoinUser(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
- INT_PTR MraChatSessionLeftUser(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
- INT_PTR MraChatSessionSetIviter(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat);
- INT_PTR MraChatSessionSetOwner(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat);
- INT_PTR MraChatSessionMessageAdd(HCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, const CMStringW &wszMessage, DWORD dwTime);
+ INT_PTR MraChatSessionEventSendByHandle(MCONTACT hContactChatSession, DWORD dwType, DWORD dwFlags, const CMStringA &szUID, LPCWSTR lpwszStatus, LPCWSTR lpwszMessage, DWORD_PTR dwItemData, DWORD dwTime);
+ INT_PTR MraChatSessionInvite(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
+ INT_PTR MraChatSessionMembersAdd(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
+ INT_PTR MraChatSessionJoinUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
+ INT_PTR MraChatSessionLeftUser(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, DWORD dwTime);
+ INT_PTR MraChatSessionSetIviter(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat);
+ INT_PTR MraChatSessionSetOwner(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat);
+ INT_PTR MraChatSessionMessageAdd(MCONTACT hContactChatSession, const CMStringA &lpszEMailInMultiChat, const CMStringW &wszMessage, DWORD dwTime);
DWORD MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle);
void MraAvatarsQueueClear(HANDLE hAvatarsQueueHandle);
void MraAvatarsQueueSuspend(HANDLE hAvatarsQueueHandle);
void MraAvatarsQueueDestroy(HANDLE hAvatarsQueueHandle);
- DWORD MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD *pdwAvatarsQueueID);
- bool MraAvatarsGetContactTime (HCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime);
- void MraAvatarsSetContactTime (HCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime);
- DWORD MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HCONTACT hContact, DWORD dwFormat, CMStringW &res);
- DWORD MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD *pdwAvatarsQueueID, DWORD *pdwFormat, LPTSTR lpszPath);
- DWORD MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwSourceID);
- DWORD MraAvatarsDeleteContactAvatarFile(HANDLE hAvatarsQueueHandle, HCONTACT hContact);
+ DWORD MraAvatarsQueueAdd(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID);
+ bool MraAvatarsGetContactTime (MCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime);
+ void MraAvatarsSetContactTime (MCONTACT hContact, LPSTR lpszValueName, SYSTEMTIME *pstTime);
+ DWORD MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, MCONTACT hContact, DWORD dwFormat, CMStringW &res);
+ DWORD MraAvatarsQueueGetAvatar(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD *pdwAvatarsQueueID, DWORD *pdwFormat, LPTSTR lpszPath);
+ DWORD MraAvatarsQueueGetAvatarSimple(HANDLE hAvatarsQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwSourceID);
+ DWORD MraAvatarsDeleteContactAvatarFile(HANDLE hAvatarsQueueHandle, MCONTACT hContact);
void __cdecl MraAvatarsThreadProc(LPVOID lpParameter);
};
diff --git a/protocols/MRA/src/MraSelectEMail.cpp b/protocols/MRA/src/MraSelectEMail.cpp index fc889d5058..bfe205f2e0 100644 --- a/protocols/MRA/src/MraSelectEMail.cpp +++ b/protocols/MRA/src/MraSelectEMail.cpp @@ -4,11 +4,11 @@ struct MraSelectEMailDlgData
{
CMraProto *ppro;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwType;
};
-void AddContactEMailToListParam(HCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName, HWND hWndList)
+void AddContactEMailToListParam(MCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName, HWND hWndList)
{
CMStringA szEmail;
if (DB_GetStringA(hContact, lpszModule, lpszValueName, szEmail)) {
@@ -139,7 +139,7 @@ INT_PTR CALLBACK MraSelectEMailDlgProc(HWND hWndDlg, UINT message, WPARAM wParam return FALSE;
}
-DWORD CMraProto::MraSelectEMailDlgShow(HCONTACT hContact, DWORD dwType)
+DWORD CMraProto::MraSelectEMailDlgShow(MCONTACT hContact, DWORD dwType)
{
MraSelectEMailDlgData *dat = (MraSelectEMailDlgData*)mir_calloc(sizeof(MraSelectEMailDlgData));
if (dat) {
diff --git a/protocols/MRA/src/MraSendCommand.cpp b/protocols/MRA/src/MraSendCommand.cpp index e673e2e4b8..27bd038607 100644 --- a/protocols/MRA/src/MraSendCommand.cpp +++ b/protocols/MRA/src/MraSendCommand.cpp @@ -71,7 +71,7 @@ public: /////////////////////////////////////////////////////////////////////////////////////////
-DWORD CMraProto::MraMessage(BOOL bAddToQueue, HCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &lpwszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize)
+DWORD CMraProto::MraMessage(BOOL bAddToQueue, MCONTACT hContact, DWORD dwAckType, DWORD dwFlags, const CMStringA &szEmail, const CMStringW &lpwszMessage, LPBYTE lpbMultiChatData, size_t dwMultiChatDataSize)
{
debugLogA("Sending message: flags %08x, to '%S', message '%S'\n", dwFlags, szEmail, lpwszMessage);
@@ -184,7 +184,7 @@ DWORD CMraProto::MraMessageRecv(const CMStringA &szFrom, DWORD dwMsgID) }
// Adds new contact
-DWORD CMraProto::MraAddContact(HCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMString* wszAuthMessage)
+DWORD CMraProto::MraAddContact(MCONTACT hContact, DWORD dwContactFlag, DWORD dwGroupID, const CMStringA &szEmail, const CMStringW &wszCustomName, const CMStringA *szPhones, const CMString* wszAuthMessage)
{
if (szEmail.GetLength() <= 4 && !(dwContactFlag & CONTACT_FLAG_GROUP))
return 0;
@@ -213,7 +213,7 @@ DWORD CMraProto::MraAddContact(HCONTACT hContact, DWORD dwContactFlag, DWORD dwG }
// change contact
-DWORD CMraProto::MraModifyContact(HCONTACT hContact, DWORD *pdwID, DWORD *pdwContactFlag, DWORD *pdwGroupID, const CMStringA *pszEmail, const CMStringW *pwszCustomName, const CMStringA *pszPhones)
+DWORD CMraProto::MraModifyContact(MCONTACT hContact, DWORD *pdwID, DWORD *pdwContactFlag, DWORD *pdwGroupID, const CMStringA *pszEmail, const CMStringW *pwszCustomName, const CMStringA *pszPhones)
{
CMStringA szEmail, szPhones;
CMStringW wszNick, wszCustomName;
@@ -312,7 +312,7 @@ DWORD CMraProto::MraFileTransferAck(DWORD dwStatus, const CMStringA &szEmail, DW }
// Ïîèñê êîíòàêòà
-HANDLE CMraProto::MraWPRequestW(HCONTACT hContact, DWORD dwAckType, DWORD dwRequestFlags, const CMStringA &szUser, const CMStringA &szDomain, const CMStringW &wszNickName, const CMStringW &wszFirstName, const CMStringW &wszLastName, DWORD dwSex, DWORD dwDate1, DWORD dwDate2, DWORD dwCityID, DWORD dwZodiak, DWORD dwBirthdayMonth, DWORD dwBirthdayDay, DWORD dwCountryID, DWORD dwOnline)
+HANDLE CMraProto::MraWPRequestW(MCONTACT hContact, DWORD dwAckType, DWORD dwRequestFlags, const CMStringA &szUser, const CMStringA &szDomain, const CMStringW &wszNickName, const CMStringW &wszFirstName, const CMStringW &wszLastName, DWORD dwSex, DWORD dwDate1, DWORD dwDate2, DWORD dwCityID, DWORD dwZodiak, DWORD dwBirthdayMonth, DWORD dwBirthdayDay, DWORD dwCountryID, DWORD dwOnline)
{
OutBuffer buf;
CMStringA tmp;
@@ -381,7 +381,7 @@ HANDLE CMraProto::MraWPRequestW(HCONTACT hContact, DWORD dwAckType, DWORD dwRequ }
// Ïîèñê êîíòàêòà ïî EMail
-HANDLE CMraProto::MraWPRequestByEMail(HCONTACT hContact, DWORD dwAckType, CMStringA &szEmail)
+HANDLE CMraProto::MraWPRequestByEMail(MCONTACT hContact, DWORD dwAckType, CMStringA &szEmail)
{
if (szEmail.GetLength() <= 4)
return 0;
@@ -439,7 +439,7 @@ DWORD CMraProto::MraLogin2W(CMStringA &szLogin, CMStringA &szPassword, DWORD dwS }
// Îòïðàâêà SMS
-DWORD CMraProto::MraSMSW(HCONTACT hContact, const CMStringA &lpszPhone, const CMStringW &lpwszMessage)
+DWORD CMraProto::MraSMSW(MCONTACT hContact, const CMStringA &lpszPhone, const CMStringW &lpwszMessage)
{
CMStringA szPhoneLocal = "+" + CopyNumber(lpszPhone);
@@ -523,7 +523,7 @@ DWORD CMraProto::MraSendCMD(DWORD dwType, LPVOID lpData, size_t dwDataSize) }
-DWORD CMraProto::MraSendQueueCMD(HANDLE hSendQueueHandle, DWORD dwFlags, HCONTACT hContact, DWORD dwAckType, LPBYTE lpbDataQueue, size_t dwDataQueueSize, DWORD dwType, LPVOID lpData, size_t dwDataSize)
+DWORD CMraProto::MraSendQueueCMD(HANDLE hSendQueueHandle, DWORD dwFlags, MCONTACT hContact, DWORD dwAckType, LPBYTE lpbDataQueue, size_t dwDataQueueSize, DWORD dwType, LPVOID lpData, size_t dwDataSize)
{
DWORD dwRet = InterlockedIncrement((LONG volatile*)&dwCMDNum);
if ( !MraSendQueueAdd(hSendQueueHandle, dwRet, dwFlags, hContact, dwAckType, lpbDataQueue, dwDataQueueSize)) {
diff --git a/protocols/MRA/src/MraSendQueue.cpp b/protocols/MRA/src/MraSendQueue.cpp index 08146fe8b2..41a90c55bc 100644 --- a/protocols/MRA/src/MraSendQueue.cpp +++ b/protocols/MRA/src/MraSendQueue.cpp @@ -14,7 +14,7 @@ struct MRA_SEND_QUEUE_ITEM : public LIST_MT_ITEM // external
DWORD dwCMDNum;
DWORD dwFlags;
- HCONTACT hContact;
+ MCONTACT hContact;
DWORD dwAckType;
LPBYTE lpbData;
size_t dwDataSize;
@@ -59,7 +59,7 @@ void MraSendQueueDestroy(HANDLE hSendQueueHandle) }
-DWORD MraSendQueueAdd(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD dwFlags, HCONTACT hContact, DWORD dwAckType, LPBYTE lpbData, size_t dwDataSize)
+DWORD MraSendQueueAdd(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD dwFlags, MCONTACT hContact, DWORD dwAckType, LPBYTE lpbData, size_t dwDataSize)
{
if (!hSendQueueHandle || !dwCMDNum)
return ERROR_INVALID_HANDLE;
@@ -108,7 +108,7 @@ DWORD MraSendQueueFree(HANDLE hSendQueueHandle, DWORD dwCMDNum) return ERROR_NOT_FOUND;
}
-DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, HCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize)
+DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, MCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize)
{
if (!hSendQueueHandle)
return ERROR_INVALID_HANDLE;
@@ -135,7 +135,7 @@ DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, return ERROR_NOT_FOUND;
}
-DWORD MraSendQueueFindOlderThan(HANDLE hSendQueueHandle, DWORD dwTime, DWORD *pdwCMDNum, DWORD *pdwFlags, HCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize)
+DWORD MraSendQueueFindOlderThan(HANDLE hSendQueueHandle, DWORD dwTime, DWORD *pdwCMDNum, DWORD *pdwFlags, MCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize)
{
if (!hSendQueueHandle)
return ERROR_INVALID_HANDLE;
diff --git a/protocols/MRA/src/MraSendQueue.h b/protocols/MRA/src/MraSendQueue.h index e75038cfd9..cb3a62b4e3 100644 --- a/protocols/MRA/src/MraSendQueue.h +++ b/protocols/MRA/src/MraSendQueue.h @@ -7,10 +7,10 @@ DWORD MraSendQueueInitialize(DWORD dwSendTimeOutInterval, HANDLE *phSendQueueHandle);
void MraSendQueueDestroy(HANDLE hSendQueueHandle);
-DWORD MraSendQueueAdd(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD dwFlags, HCONTACT hContact, DWORD dwAckType, LPBYTE lpbData, size_t dwDataSize);
+DWORD MraSendQueueAdd(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD dwFlags, MCONTACT hContact, DWORD dwAckType, LPBYTE lpbData, size_t dwDataSize);
DWORD MraSendQueueFree(HANDLE hSendQueueHandle, DWORD dwCMDNum);
-DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, HCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize);
-DWORD MraSendQueueFindOlderThan(HANDLE hSendQueueHandle, DWORD dwTime, DWORD *pdwCMDNum, DWORD *pdwFlags, HCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize);
+DWORD MraSendQueueFind(HANDLE hSendQueueHandle, DWORD dwCMDNum, DWORD *pdwFlags, MCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize);
+DWORD MraSendQueueFindOlderThan(HANDLE hSendQueueHandle, DWORD dwTime, DWORD *pdwCMDNum, DWORD *pdwFlags, MCONTACT *phContact, DWORD *pdwAckType, LPBYTE *plpbData, size_t *pdwDataSize);
#endif // !defined(AFX_MRA_SENDQUEUE_H__F58D13FF_F6F2_476C_B8F0_7B9E9357CF48__INCLUDED_)
diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 5864886814..7d52e201ac 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -13,7 +13,7 @@ struct SetXStatusData struct SetBlogStatusData
{
CMraProto *ppro;
- HCONTACT hContact;
+ MCONTACT hContact;
};
#define RECURSION_DATA_STACK_ITEMS_MIN 128
@@ -157,7 +157,7 @@ CMStringA MraAddrListGetToBuff(MRA_ADDR_LIST *pmalAddrList) return res;
}
-void CMraProto::MraAddrListStoreToContact(HCONTACT hContact, MRA_ADDR_LIST *pmalAddrList)
+void CMraProto::MraAddrListStoreToContact(MCONTACT hContact, MRA_ADDR_LIST *pmalAddrList)
{
if (!hContact || !pmalAddrList)
return;
@@ -181,7 +181,7 @@ void MraAddrListFree(MRA_ADDR_LIST *pmalAddrList) }
}
-bool DB_GetStaticStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
+bool DB_GetStaticStringA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPSTR lpszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
{
bool bRet = false;
size_t dwReadedStringLen, dwRetBuffSizeLocal;
@@ -209,7 +209,7 @@ bool DB_GetStaticStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueN }
// sizes in wchars
-bool DB_GetStaticStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPWSTR lpwszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
+bool DB_GetStaticStringW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPWSTR lpwszRetBuff, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
{
bool bRet = false;
size_t dwReadedStringLen;
@@ -235,7 +235,7 @@ bool DB_GetStaticStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueN return bRet;
}
-bool DB_GetStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringA& res)
+bool DB_GetStringA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringA& res)
{
char *szRes = db_get_sa(hContact, lpszModule, lpszValueName);
if (szRes) {
@@ -249,7 +249,7 @@ bool DB_GetStringA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, C }
-bool DB_GetStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringW& res)
+bool DB_GetStringW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, CMStringW& res)
{
WCHAR *szRes = db_get_wsa(hContact, lpszModule, lpszValueName);
if (szRes) {
@@ -262,7 +262,7 @@ bool DB_GetStringW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, C return false;
}
-bool DB_SetStringExA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringA &szValue)
+bool DB_SetStringExA(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringA &szValue)
{
if (szValue.IsEmpty()) {
db_unset(hContact, lpszModule, lpszValueName);
@@ -272,7 +272,7 @@ bool DB_SetStringExA(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, return db_set_s(hContact, lpszModule, lpszValueName, szValue) != 0;
}
-bool DB_SetStringExW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringW &szValue)
+bool DB_SetStringExW(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, const CMStringW &szValue)
{
if (szValue.IsEmpty()) {
db_unset(hContact, lpszModule, lpszValueName);
@@ -282,7 +282,7 @@ bool DB_SetStringExW(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, return db_set_ws(hContact, lpszModule, lpszValueName, szValue) != 0;
}
-bool DB_GetContactSettingBlob(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPVOID lpRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
+bool DB_GetContactSettingBlob(MCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszValueName, LPVOID lpRet, size_t dwRetBuffSize, size_t *pdwRetBuffSize)
{
bool bRet = false;
DBVARIANT dbv;
@@ -303,7 +303,7 @@ bool DB_GetContactSettingBlob(HCONTACT hContact, LPCSTR lpszModule, LPCSTR lpszV return bRet;
}
-DWORD CMraProto::MraMoveContactToGroup(HCONTACT hContact, DWORD dwGroupID, LPCTSTR ptszName)
+DWORD CMraProto::MraMoveContactToGroup(MCONTACT hContact, DWORD dwGroupID, LPCTSTR ptszName)
{
MraGroupItem *p = NULL;
@@ -335,7 +335,7 @@ DWORD CMraProto::MraMoveContactToGroup(HCONTACT hContact, DWORD dwGroupID, LPCTS return p->m_id;
}
-DWORD CMraProto::GetContactFlags(HCONTACT hContact)
+DWORD CMraProto::GetContactFlags(MCONTACT hContact)
{
DWORD dwRet = 0;
@@ -366,7 +366,7 @@ DWORD CMraProto::GetContactFlags(HCONTACT hContact) return(dwRet);
}
-DWORD CMraProto::SetContactFlags(HCONTACT hContact, DWORD dwContactFlag)
+DWORD CMraProto::SetContactFlags(MCONTACT hContact, DWORD dwContactFlag)
{
if (!IsContactMra(hContact))
return ERROR_INVALID_HANDLE;
@@ -398,7 +398,7 @@ DWORD CMraProto::SetContactFlags(HCONTACT hContact, DWORD dwContactFlag) return 0;
}
-DWORD CMraProto::GetContactBasicInfoW(HCONTACT hContact, DWORD *pdwID, DWORD *pdwGroupID, DWORD *pdwContactFlag, DWORD *pdwContactSeverFlags, DWORD *pdwStatus, CMStringA *szEmail, CMStringW *wszNick, CMStringA *szPhones)
+DWORD CMraProto::GetContactBasicInfoW(MCONTACT hContact, DWORD *pdwID, DWORD *pdwGroupID, DWORD *pdwContactFlag, DWORD *pdwContactSeverFlags, DWORD *pdwStatus, CMStringA *szEmail, CMStringW *wszNick, CMStringA *szPhones)
{
if (!IsContactMra(hContact))
return ERROR_INVALID_HANDLE;
@@ -434,7 +434,7 @@ DWORD CMraProto::GetContactBasicInfoW(HCONTACT hContact, DWORD *pdwID, DWORD *pd return 0;
}
-DWORD CMraProto::SetContactBasicInfoW(HCONTACT hContact, DWORD dwSetInfoFlags, DWORD dwFlags, DWORD dwID, DWORD dwGroupID, DWORD dwContactFlag, DWORD dwContactSeverFlags, DWORD dwStatus, const CMStringA *szEmail, const CMStringW *wszNick, const CMStringA *szPhones)
+DWORD CMraProto::SetContactBasicInfoW(MCONTACT hContact, DWORD dwSetInfoFlags, DWORD dwFlags, DWORD dwID, DWORD dwGroupID, DWORD dwContactFlag, DWORD dwContactSeverFlags, DWORD dwStatus, const CMStringA *szEmail, const CMStringW *wszNick, const CMStringA *szPhones)
{
if (!IsContactMra(hContact))
return ERROR_INVALID_HANDLE;
@@ -496,12 +496,12 @@ DWORD CMraProto::SetContactBasicInfoW(HCONTACT hContact, DWORD dwSetInfoFlags, D return 0;
}
-HCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNeeded, BOOL bTemporary, BOOL *pbAdded)
+MCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNeeded, BOOL bTemporary, BOOL *pbAdded)
{
if (szEmail.IsEmpty())
return NULL;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
bool bFound = false;
//check not already on list
@@ -541,7 +541,7 @@ HCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe }
}
else {
- 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)m_szModuleName);
}
@@ -563,7 +563,7 @@ HCONTACT CMraProto::MraHContactFromEmail(const CMStringA &szEmail, BOOL bAddIfNe return hContact;
}
-bool CMraProto::MraUpdateContactInfo(HCONTACT hContact)
+bool CMraProto::MraUpdateContactInfo(MCONTACT hContact)
{
if (m_bLoggedIn && hContact)
if (IsContactMra(hContact)) {
@@ -577,22 +577,22 @@ bool CMraProto::MraUpdateContactInfo(HCONTACT hContact) return false;
}
-DWORD CMraProto::MraContactCapabilitiesGet(HCONTACT hContact)
+DWORD CMraProto::MraContactCapabilitiesGet(MCONTACT hContact)
{
return getDword(hContact, DBSETTING_CAPABILITIES, 0);
}
-void CMraProto::MraContactCapabilitiesSet(HCONTACT hContact, DWORD dwFutureFlags)
+void CMraProto::MraContactCapabilitiesSet(MCONTACT hContact, DWORD dwFutureFlags)
{
setDword(hContact, DBSETTING_CAPABILITIES, dwFutureFlags);
}
-DWORD CMraProto::MraGetContactStatus(HCONTACT hContact)
+DWORD CMraProto::MraGetContactStatus(MCONTACT hContact)
{
return getWord(hContact, "Status", ID_STATUS_OFFLINE);
}
-DWORD CMraProto::MraSetContactStatus(HCONTACT hContact, DWORD dwNewStatus)
+DWORD CMraProto::MraSetContactStatus(MCONTACT hContact, DWORD dwNewStatus)
{
DWORD dwOldStatus = MraGetContactStatus(hContact);
@@ -641,7 +641,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & if (m_dwEmailMessagesUnread) {
CMStringA szEmail;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
TCHAR szMailBoxStatus[MAX_SECONDLINE];
mir_sntprintf(szMailBoxStatus, SIZEOF(szMailBoxStatus), TranslateT("Unread mail is available: %lu/%lu messages"), m_dwEmailMessagesUnread, dwEmailMessagesTotal);
@@ -709,13 +709,13 @@ bool IsHTTPSProxyUsed(HANDLE m_hNetlibUser) }
// îïðåäåëÿåò ïðèíàäëåæíîñòü êîíòàêòà äàííîé êîïèè ïëàãèíà
-bool CMraProto::IsContactMra(HCONTACT hContact)
+bool CMraProto::IsContactMra(MCONTACT hContact)
{
return CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName) != 0;
}
// îïðåäåëÿåòñÿ ÿâëÿåòñÿ ëè êîíòàêò êîíòàêòîì MRA ïðîòîêîëà, íå çàâèñèìî îò òîãî êàêîìó ïëàãèíó îí ïðèíàäëåæèò
-bool IsContactMraProto(HCONTACT hContact)
+bool IsContactMraProto(MCONTACT hContact)
{
LPSTR lpszProto = GetContactProto(hContact);
if (lpszProto) {
@@ -751,7 +751,7 @@ bool CMraProto::IsEMailChatAgent(const CMStringA &szEmail) return false;
}
-bool CMraProto::IsContactChatAgent(HCONTACT hContact)
+bool CMraProto::IsContactChatAgent(MCONTACT hContact)
{
if (hContact == NULL)
return false;
@@ -791,7 +791,7 @@ bool GetEMailFromString(const CMStringA& szBuff, CMStringA& szEmail) return false;
}
-DWORD GetContactEMailCountParam(HCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName)
+DWORD GetContactEMailCountParam(MCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName)
{
DWORD dwRet = 0;
CMStringA szEmail;
@@ -815,7 +815,7 @@ DWORD GetContactEMailCountParam(HCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModu return dwRet;
}
-DWORD CMraProto::GetContactEMailCount(HCONTACT hContact, BOOL bMRAOnly)
+DWORD CMraProto::GetContactEMailCount(MCONTACT hContact, BOOL bMRAOnly)
{
LPSTR lpszProto = (hContact) ? GetContactProto(hContact) : m_szModuleName;
@@ -828,7 +828,7 @@ DWORD CMraProto::GetContactEMailCount(HCONTACT hContact, BOOL bMRAOnly) return dwRet;
}
-bool GetContactFirstEMailParam(HCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName, CMStringA &res)
+bool GetContactFirstEMailParam(MCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModule, LPSTR lpszValueName, CMStringA &res)
{
CMStringA szEmail;
@@ -853,7 +853,7 @@ bool GetContactFirstEMailParam(HCONTACT hContact, BOOL bMRAOnly, LPSTR lpszModul return false;
}
-bool CMraProto::GetContactFirstEMail(HCONTACT hContact, BOOL bMRAOnly, CMStringA &res)
+bool CMraProto::GetContactFirstEMail(MCONTACT hContact, BOOL bMRAOnly, CMStringA &res)
{
LPSTR lpszProto = (hContact) ? GetContactProto(hContact) : m_szModuleName;
@@ -891,7 +891,7 @@ static void FakeThread(void* param) mir_free(param);
}
-DWORD CMraProto::ProtoBroadcastAckAsync(HCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
+DWORD CMraProto::ProtoBroadcastAckAsync(MCONTACT hContact, int type, int hResult, HANDLE hProcess, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*)::mir_calloc(sizeof(ACKDATA));
ack->cbSize = sizeof(ACKDATA);
@@ -905,7 +905,7 @@ DWORD CMraProto::ProtoBroadcastAckAsync(HCONTACT hContact, int type, int hResult return 0;
}
-CMStringA CMraProto::CreateBlobFromContact(HCONTACT hContact, const CMStringW &wszRequestReason)
+CMStringA CMraProto::CreateBlobFromContact(MCONTACT hContact, const CMStringW &wszRequestReason)
{
CMStringA res('\0', 8), tmp;
DWORD *p = (DWORD*)res.c_str();
@@ -1206,7 +1206,7 @@ INT_PTR CALLBACK SendReplyBlogStatusDlgProc(HWND hWndDlg, UINT message, WPARAM w return iRet;
}
-bool CMraProto::MraSendReplyBlogStatus(HCONTACT hContact)
+bool CMraProto::MraSendReplyBlogStatus(MCONTACT hContact)
{
SetBlogStatusData* dat = (SetBlogStatusData*)mir_calloc(sizeof(SetBlogStatusData));
dat->ppro = this;
diff --git a/protocols/MRA/src/Mra_menus.cpp b/protocols/MRA/src/Mra_menus.cpp index ba91e2e660..d6584728d4 100644 --- a/protocols/MRA/src/Mra_menus.cpp +++ b/protocols/MRA/src/Mra_menus.cpp @@ -43,7 +43,7 @@ INT_PTR CMraProto::MraWebSearch(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraUpdateAllUsersInfo(WPARAM wParam, LPARAM lParam)
{
if (MessageBox(NULL, TranslateT("Are you sure?"), TranslateT(MRA_UPD_ALL_USERS_INFO_STR), MB_YESNO | MB_ICONQUESTION) == IDYES) {
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
MraWPRequestByEMail(hContact, ACKTYPE_GETINFO, szEmail);
@@ -55,7 +55,7 @@ INT_PTR CMraProto::MraUpdateAllUsersInfo(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraCheckUpdatesUsersAvt(WPARAM wParam, LPARAM lParam)
{
if (MessageBox(NULL, TranslateT("Are you sure?"), TranslateT(MRA_CHK_USERS_AVATARS_STR), MB_YESNO | MB_ICONQUESTION) == IDYES) {
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
if (!IsEMailChatAgent(szEmail))
@@ -68,7 +68,7 @@ INT_PTR CMraProto::MraCheckUpdatesUsersAvt(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam)
{
if (MessageBox(NULL, TranslateT("Are you sure?"), TranslateT(MRA_REQ_AUTH_FOR_ALL_STR), MB_YESNO | MB_ICONQUESTION) == IDYES) {
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DWORD dwContactSeverFlags;
if (GetContactBasicInfoW(hContact, NULL, NULL, NULL, &dwContactSeverFlags, NULL, NULL, NULL, NULL) == NO_ERROR)
if (dwContactSeverFlags & CONTACT_INTFLAG_NOT_AUTHORIZED && dwContactSeverFlags != -1)
@@ -80,7 +80,7 @@ INT_PTR CMraProto::MraRequestAuthForAll(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraRequestAuthorization(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -110,7 +110,7 @@ INT_PTR CMraProto::MraGrantAuthorization(WPARAM wParam, LPARAM lParam) // send without reason, do we need any ?
CMStringA szEmail;
- if (mraGetStringA((HCONTACT)wParam, "e-mail", szEmail))
+ if (mraGetStringA((MCONTACT)wParam, "e-mail", szEmail))
MraAuthorize(szEmail);
return 0;
@@ -121,17 +121,17 @@ INT_PTR CMraProto::MraSendPostcard(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailCount = GetContactEMailCount((HCONTACT)wParam, FALSE);
+ DWORD dwContactEMailCount = GetContactEMailCount((MCONTACT)wParam, FALSE);
if (dwContactEMailCount) {
if (dwContactEMailCount == 1) {
CMStringA szUrl, szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, FALSE, szEmail)) {
+ if (GetContactFirstEMail((MCONTACT)wParam, FALSE, szEmail)) {
szEmail.MakeLower();
szUrl.Format("http://cards.mail.ru/event.html?rcptname=%s&rcptemail=%s", GetContactNameA((HANDLE)wParam), szEmail);
MraMPopSessionQueueAddUrl(hMPopSessionQueue, szUrl);
}
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_SEND_POSTCARD);
}
return 0;
}
@@ -141,14 +141,14 @@ INT_PTR CMraProto::MraViewAlbum(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((HCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_FOTO_URL, szEmail);
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_ALBUM);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_ALBUM);
}
return 0;
}
@@ -158,14 +158,14 @@ INT_PTR CMraProto::MraReadBlog(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((HCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
if (dwContactEMailMRCount)
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_BLOGS_URL, szEmail);
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_READ_BLOG);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_READ_BLOG);
return 0;
}
@@ -176,9 +176,9 @@ INT_PTR CMraProto::MraReplyBlogStatus(WPARAM wParam, LPARAM lParam) return 0;
CMStringW blogStatusMsg;
- mraGetStringW((HCONTACT)wParam, DBSETTING_BLOGSTATUS, blogStatusMsg);
+ mraGetStringW((MCONTACT)wParam, DBSETTING_BLOGSTATUS, blogStatusMsg);
if (!blogStatusMsg.IsEmpty() || wParam == 0)
- MraSendReplyBlogStatus((HCONTACT)wParam);
+ MraSendReplyBlogStatus((MCONTACT)wParam);
return 0;
}
@@ -188,14 +188,14 @@ INT_PTR CMraProto::MraViewVideo(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((HCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_VIDEO_URL, szEmail);
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_VIDEO);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_VIEW_VIDEO);
}
return 0;
}
@@ -205,14 +205,14 @@ INT_PTR CMraProto::MraAnswers(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((HCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_ANSWERS_URL, szEmail);
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_ANSWERS);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_ANSWERS);
}
return 0;
}
@@ -222,14 +222,14 @@ INT_PTR CMraProto::MraWorld(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn)
return 0;
- DWORD dwContactEMailMRCount = GetContactEMailCount((HCONTACT)wParam, TRUE);
+ DWORD dwContactEMailMRCount = GetContactEMailCount((MCONTACT)wParam, TRUE);
if (dwContactEMailMRCount) {
if (dwContactEMailMRCount == 1) {
CMStringA szEmail;
- if (GetContactFirstEMail((HCONTACT)wParam, TRUE, szEmail))
+ if (GetContactFirstEMail((MCONTACT)wParam, TRUE, szEmail))
MraMPopSessionQueueAddUrlAndEMail(hMPopSessionQueue, MRA_WORLD_URL, szEmail);
}
- else MraSelectEMailDlgShow((HCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_WORLD);
+ else MraSelectEMailDlgShow((MCONTACT)wParam, MRA_SELECT_EMAIL_TYPE_WORLD);
}
return 0;
}
@@ -241,7 +241,7 @@ int CMraProto::MraRebuildContactMenu(WPARAM wParam, LPARAM lParam) BOOL bIsContactMRA, bHasEMail, bHasEMailMR, bChatAgent;
DWORD dwContactSeverFlags = 0;
CMStringW blogStatusMsgSize;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// proto own contact
bIsContactMRA = IsContactMra(hContact);
diff --git a/protocols/MRA/src/Mra_proto.cpp b/protocols/MRA/src/Mra_proto.cpp index 73270f7d9e..eb968f9d10 100644 --- a/protocols/MRA/src/Mra_proto.cpp +++ b/protocols/MRA/src/Mra_proto.cpp @@ -233,7 +233,7 @@ DWORD CMraProto::MraNetworkDispatcher() }
{
DWORD dwCMDNum, dwFlags, dwAckType;
- HCONTACT hContact;
+ MCONTACT hContact;
LPBYTE lpbData;
size_t dwDataSize;
while (!MraSendQueueFindOlderThan(hSendQueueHandle, SEND_QUEUE_TIMEOUT, &dwCMDNum, &dwFlags, &hContact, &dwAckType, &lpbData, &dwDataSize)) {
@@ -430,7 +430,7 @@ bool CMraProto::CmdMessageAck(BinBuffer &buf) bool CMraProto::CmdMessageStatus(ULONG seq, BinBuffer &buf)
{
DWORD dwAckType, dwTemp = buf.getDword();
- HCONTACT hContact;
+ MCONTACT hContact;
if (!MraSendQueueFind(hSendQueueHandle, seq, NULL, &hContact, &dwAckType, NULL, NULL)) {
switch (dwTemp) {
case MESSAGE_DELIVERED:// Message delivered directly to user
@@ -554,7 +554,7 @@ bool CMraProto::CmdAuthAck(BinBuffer &buf) buf >> szEmail;
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded);
if (bAdded)
MraUpdateContactInfo(hContact);
@@ -613,7 +613,7 @@ bool CMraProto::CmdFileTransfer(BinBuffer &buf) }
BOOL bAdded = FALSE;
- HCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded);
if (bAdded)
MraUpdateContactInfo(hContact);
@@ -667,7 +667,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) buf >> dwStatus >> szSpecStatusUri >> szStatusTitle >> szStatusDesc >> szEmail >> dwFutureFlags >> szUserAgentFormatted;
BOOL bAdded;
- if (HCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded)) {
+ if (MCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, TRUE, &bAdded)) {
if (bAdded)
MraUpdateContactInfo(hContact);
@@ -705,7 +705,7 @@ bool CMraProto::CmdUserStatus(BinBuffer &buf) bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf)
{
- DWORD dwAckType; HCONTACT hContact; LPBYTE pData; size_t dataLen;
+ DWORD dwAckType; MCONTACT hContact; LPBYTE pData; size_t dataLen;
if (!MraSendQueueFind(hSendQueueHandle, seq, NULL, &hContact, &dwAckType, &pData, &dataLen)) {
DWORD dwTemp = buf.getDword();
switch (dwTemp) {
@@ -753,7 +753,7 @@ bool CMraProto::CmdContactAck(int cmd, int seq, BinBuffer &buf) bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf)
{
- DWORD dwAckType, dwFlags; HCONTACT hContact; LPBYTE pData; size_t dataLen;
+ DWORD dwAckType, dwFlags; MCONTACT hContact; LPBYTE pData; size_t dataLen;
if (MraSendQueueFind(hSendQueueHandle, seq, &dwFlags, &hContact, &dwAckType, &pData, &dataLen)) {
MraPopupShowFromAgentW(MRA_POPUP_TYPE_DEBUG, 0, TranslateT("MRIM_ANKETA_INFO: not found in queue"));
return true;
@@ -1002,7 +1002,7 @@ bool CMraProto::CmdAnketaInfo(int seq, BinBuffer &buf) bool CMraProto::CmdGame(BinBuffer &buf)
{
- HCONTACT hContact;
+ MCONTACT hContact;
CMStringA szEmail, szData;
DWORD dwGameSessionID, dwGameMsg, dwGameMsgID, dwTemp;
buf >> szEmail >> dwGameSessionID >> dwGameMsg >> dwGameMsgID >> dwTemp >> szData;
@@ -1241,7 +1241,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) if (dwControlParam > 5)// âñå ïàðàìåòðû ïðàâèëüíî èíèöèàëèçèðîâàííû!
if ((dwContactFlag & (CONTACT_FLAG_GROUP | CONTACT_FLAG_REMOVED)) == 0) {
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, FALSE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(szEmail, TRUE, FALSE, &bAdded);
if (hContact) {
// already in list, remove the duplicate
if (GetContactBasicInfoW(hContact, &dwTemp, NULL, NULL, NULL, NULL, NULL, NULL, NULL) == NO_ERROR && dwTemp != -1) {
@@ -1309,7 +1309,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) if (mraGetStringW(NULL, "AuthMessage", wszAuthMessage) == FALSE) // def auth message
wszAuthMessage = TranslateT(MRA_DEFAULT_AUTH_MESSAGE);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (GetContactBasicInfoW(hContact, &dwID, NULL, NULL, NULL, NULL, &szEmail, NULL, NULL) == NO_ERROR)
if (dwID == -1) {
if (IsEMailChatAgent(szEmail)) {// ÷àò: åù¸ ðàç çàïðîñèì àâòîðèçàöèþ, ïîìåòèì êàê âèäèìûé â ñïèñêå, ïîñòîÿííûé
@@ -1338,7 +1338,7 @@ bool CMraProto::CmdClist2(BinBuffer &buf) }
else { // êîíòàêò ëèñò ïî÷åìóòî íå ïîëó÷èëè
// âñåõ â offline è id â íåñòàíäàðò
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS),
-1, -2, 0, 0, ID_STATUS_OFFLINE, 0, 0, 0);
// request user info from server
@@ -1442,7 +1442,7 @@ bool CMraProto::CmdBlogStatus(BinBuffer &buf) buf >> dwFlags >> szEmail >> dwBlogStatusID >> dwTime >> wszText >> szString;
- if (HCONTACT hContact = MraHContactFromEmail(szEmail, FALSE, TRUE, NULL)) {
+ if (MCONTACT hContact = MraHContactFromEmail(szEmail, FALSE, TRUE, NULL)) {
if (dwFlags & MRIM_BLOG_STATUS_MUSIC)
mraSetStringW(hContact, DBSETTING_BLOGSTATUSMUSIC, wszText);
else {
@@ -1459,7 +1459,7 @@ bool CMraProto::MraCommandDispatcher(mrim_packet_header_t *pmaHeader) WCHAR szBuff[4096] = { 0 };
DWORD dwTemp, dwAckType;
size_t dwSize;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
LPBYTE pByte;
debugLogA("Received packet %x\n", pmaHeader->msg);
@@ -1674,7 +1674,7 @@ DWORD CMraProto::MraRecvCommand_Message(DWORD dwTime, DWORD dwFlags, CMStringA & }
else {
BOOL bAdded;
- HCONTACT hContact = MraHContactFromEmail(plpsFrom, TRUE, TRUE, &bAdded);
+ MCONTACT hContact = MraHContactFromEmail(plpsFrom, TRUE, TRUE, &bAdded);
if (bAdded)
MraUpdateContactInfo(hContact);
diff --git a/protocols/MRA/src/Mra_svcs.cpp b/protocols/MRA/src/Mra_svcs.cpp index 16efbc3467..bbc74e26cb 100644 --- a/protocols/MRA/src/Mra_svcs.cpp +++ b/protocols/MRA/src/Mra_svcs.cpp @@ -119,7 +119,7 @@ const LPWSTR lpcszXStatusNameDef[] = //////////////////////////////////////////////////////////////////////////////////////////////////////////////
-void CMraProto::SetExtraIcons(HCONTACT hContact)
+void CMraProto::SetExtraIcons(MCONTACT hContact)
{
DWORD dwID, dwGroupID, dwContactSeverFlags;
if (GetContactBasicInfoW(hContact, &dwID, &dwGroupID, NULL, &dwContactSeverFlags, NULL, NULL, NULL, NULL))
@@ -168,7 +168,7 @@ INT_PTR CMraProto::MraXStatusMenu(WPARAM wParam, LPARAM lParam, LPARAM param) int CMraProto::MraContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!m_bLoggedIn || !hContact)
return 0;
@@ -191,7 +191,7 @@ int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!m_bLoggedIn || !lParam)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -298,7 +298,7 @@ int CMraProto::MraDbSettingChanged(WPARAM wParam, LPARAM lParam) int CMraProto::MraExtraIconsApply(WPARAM wParam, LPARAM lParam)
{
- SetExtraIcons((HCONTACT)wParam);
+ SetExtraIcons((MCONTACT)wParam);
return 0;
}
@@ -449,7 +449,7 @@ INT_PTR CMraProto::MraSetXStatusEx(WPARAM wParam, LPARAM lParam) INT_PTR CMraProto::MraGetXStatusEx(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CUSTOM_STATUS *pData = (CUSTOM_STATUS*)lParam;
if (pData->cbSize < sizeof(CUSTOM_STATUS))
@@ -552,7 +552,7 @@ INT_PTR CMraProto::MraSendNudge(WPARAM wParam, LPARAM lParam) {
if (m_bLoggedIn && wParam) {
LPWSTR lpwszAlarmMessage = TranslateW(MRA_ALARM_MESSAGE);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CMStringA szEmail;
if (mraGetStringA(hContact, "e-mail", szEmail))
@@ -619,7 +619,7 @@ INT_PTR CMraProto::MraGetMyAvatar(WPARAM wParam, LPARAM lParam) int CMraProto::OnGroupChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL) {
CLISTGROUPCHANGE *cgc = (CLISTGROUPCHANGE*)lParam;
if (cgc->pszOldName == NULL)
diff --git a/protocols/MSN/src/msn_avatar.cpp b/protocols/MSN/src/msn_avatar.cpp index ae8ca277cb..6f6f86998a 100644 --- a/protocols/MSN/src/msn_avatar.cpp +++ b/protocols/MSN/src/msn_avatar.cpp @@ -34,7 +34,7 @@ void CMsnProto::AvatarQueue_Uninit() ::CloseHandle(hevAvatarQueue);
}
-void CMsnProto::pushAvatarRequest(HCONTACT hContact, LPCSTR pszUrl)
+void CMsnProto::pushAvatarRequest(MCONTACT hContact, LPCSTR pszUrl)
{
ProtoBroadcastAck(hContact, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
diff --git a/protocols/MSN/src/msn_chat.cpp b/protocols/MSN/src/msn_chat.cpp index 76688d5235..1ffd87f65d 100644 --- a/protocols/MSN/src/msn_chat.cpp +++ b/protocols/MSN/src/msn_chat.cpp @@ -25,13 +25,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_proto.h"
#include <m_history.h>
-HCONTACT CMsnProto::MSN_GetChatInernalHandle(HCONTACT hContact)
+MCONTACT CMsnProto::MSN_GetChatInernalHandle(MCONTACT hContact)
{
- HCONTACT result = hContact;
+ MCONTACT result = hContact;
if ( isChatRoom(hContact)) {
DBVARIANT dbv;
if (getString(hContact, "ChatRoomID", &dbv) == 0) {
- result = (HCONTACT)(-atol(dbv.pszVal));
+ result = (MCONTACT)(-atol(dbv.pszVal));
db_free(&dbv);
}
}
@@ -98,7 +98,7 @@ void CMsnProto::MSN_ChatStart(ThreadData* info) for (int j=0; j < info->mJoinedContactsWLID.getCount(); j++)
{
- HCONTACT hContact = MSN_HContactFromEmail(info->mJoinedContactsWLID[j]);
+ MCONTACT hContact = MSN_HContactFromEmail(info->mJoinedContactsWLID[j]);
TCHAR *wlid = mir_a2t(info->mJoinedContactsWLID[j]);
gce.ptszNick = GetContactNameT(hContact);
@@ -169,23 +169,23 @@ static void ChatInviteSend(HANDLE hItem, HWND hwndList, STRLIST &str, CMsnProto }
-static void ChatValidateContact(HCONTACT hItem, HWND hwndList, CMsnProto* ppro)
+static void ChatValidateContact(MCONTACT hItem, HWND hwndList, CMsnProto* ppro)
{
if (!ppro->MSN_IsMyContact(hItem) || ppro->isChatRoom(hItem) || ppro->MSN_IsMeByContact(hItem))
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-static void ChatPrepare(HCONTACT hItem, HWND hwndList, CMsnProto* ppro)
+static void ChatPrepare(MCONTACT hItem, HWND hwndList, CMsnProto* ppro)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem)
{
- HCONTACT hItemN = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
ChatPrepare(hItemT, hwndList, ppro);
}
@@ -229,7 +229,7 @@ INT_PTR CALLBACK DlgInviteToChat(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- ChatValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
+ ChatValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
break;
case CLN_LISTREBUILT:
@@ -361,7 +361,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) case GC_USER_PRIVMESS:
{
char *email = mir_t2a(gch->ptszUID);
- HCONTACT hContact = MSN_HContactFromEmail(email);
+ MCONTACT hContact = MSN_HContactFromEmail(email);
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
mir_free(email);
break;
@@ -384,7 +384,7 @@ int CMsnProto::MSN_GCEventHook(WPARAM, LPARAM lParam) case GC_USER_NICKLISTMENU:
{
char *email = mir_t2a(gch->ptszUID);
- HCONTACT hContact = MSN_HContactFromEmail(email);
+ MCONTACT hContact = MSN_HContactFromEmail(email);
mir_free(email);
switch(gch->dwData)
diff --git a/protocols/MSN/src/msn_commands.cpp b/protocols/MSN/src/msn_commands.cpp index 56dc3e9807..c8b7e9029c 100644 --- a/protocols/MSN/src/msn_commands.cpp +++ b/protocols/MSN/src/msn_commands.cpp @@ -46,7 +46,7 @@ void MSN_ConnectionProc(HANDLE hNewConnection, DWORD /* dwRemoteIP */, void* ext }
}
-void CMsnProto::sttSetMirVer(HCONTACT hContact, DWORD dwValue, bool always)
+void CMsnProto::sttSetMirVer(MCONTACT hContact, DWORD dwValue, bool always)
{
static const char* MirVerStr[] =
{
@@ -253,7 +253,7 @@ void CMsnProto::sttInviteMessage(ThreadData* info, char* msgBody, char* email, c void CMsnProto::sttCustomSmiley(const char* msgBody, char* email, char* nick, int iSmileyType)
{
- HCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
+ MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
char smileyList[500] = "";
@@ -389,7 +389,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para tFileInfo.readFromBuffer(msgBody);
info->firstMsgRecv = true;
- HCONTACT hContact = MSN_HContactFromEmail(email);
+ MCONTACT hContact = MSN_HContactFromEmail(email);
const char* mirver = tFileInfo["Client-Name"];
if (hContact != NULL && mirver != NULL) {
setString(hContact, "MirVer", mirver);
@@ -404,7 +404,7 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para }
if (!_strnicmp(tContentType, "text/plain", 10)) {
- HCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
+ MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
const char* p = tHeader["X-MMS-IM-Format"];
bool isRtl = p != NULL && strstr(p, "RL=1") != NULL;
@@ -490,13 +490,13 @@ void CMsnProto::MSN_ReceiveMessage(ThreadData* info, char* cmdString, char* para const char* tTypingUser = tHeader["TypingUser"];
if (tTypingUser != NULL && info->mChatID[0] == 0 && _stricmp(email, MyOptions.szEmail)) {
- HCONTACT hContact = MSN_HContactFromEmail(tTypingUser, tTypingUser);
+ MCONTACT hContact = MSN_HContactFromEmail(tTypingUser, tTypingUser);
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, 7);
}
}
else if (!_strnicmp(tContentType, "text/x-msnmsgr-datacast", 23)) {
if (info->mJoinedContactsWLID.getCount()) {
- HCONTACT tContact;
+ MCONTACT tContact;
if (info->mChatID[0]) {
GC_INFO gci = { 0 };
@@ -602,7 +602,7 @@ void CMsnProto::sttProcessYFind(char* buf, size_t len) else {
if (szNetId != NULL) {
int netId = atol(szNetId);
- HCONTACT hContact = MSN_HContactFromEmail(szEmail, szEmail, true, false);
+ MCONTACT hContact = MSN_HContactFromEmail(szEmail, szEmail, true, false);
if (MSN_AddUser(hContact, szEmail, netId, LIST_FL)) {
MSN_AddUser(hContact, szEmail, netId, LIST_PL + LIST_REMOVE);
MSN_AddUser(hContact, szEmail, netId, LIST_BL + LIST_REMOVE);
@@ -640,7 +640,7 @@ void CMsnProto::sttProcessAdd(char* buf, size_t len) UrlDecode((char*)szNick);
if (listId == LIST_FL) {
- HCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick, true, false);
+ MCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick, true, false);
MSN_SetContactDb(hContact, szEmail);
}
@@ -706,7 +706,7 @@ void CMsnProto::sttProcessRemove(char* buf, size_t len) void CMsnProto::sttProcessStatusMessage(char* buf, unsigned len, const char* wlid)
{
- HCONTACT hContact = MSN_HContactFromEmail(wlid);
+ MCONTACT hContact = MSN_HContactFromEmail(wlid);
if (hContact == NULL) return;
ezxml_t xmli = ezxml_parse_str(buf, len);
@@ -1048,12 +1048,12 @@ LBL_InvalidCommand: if (strchr(data.userEmail, ';')) {
if (info->mJoinedContactsWLID.getCount() == 1)
- p2p_clearThreadSessions((HCONTACT)info->mJoinedContactsWLID[0], info->mType);
+ p2p_clearThreadSessions((MCONTACT)info->mJoinedContactsWLID[0], info->mType);
info->contactLeft(data.userEmail);
break;
}
- HCONTACT hContact = MSN_HContactFromEmail(data.userEmail);
+ MCONTACT hContact = MSN_HContactFromEmail(data.userEmail);
if (getByte("EnableSessionPopup", 0))
MSN_ShowPopup(hContact, TranslateT("Contact left channel"), 0);
@@ -1098,7 +1098,7 @@ LBL_InvalidCommand: MSN_KillChatSession(info->mChatID);
// open up srmm dialog when quit while 1 person left
- HCONTACT hContact = info->getContactHandle();
+ MCONTACT hContact = info->getContactHandle();
if (hContact) CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
}
}
@@ -1162,7 +1162,7 @@ LBL_InvalidCommand: if (tArgs < 2)
goto LBL_InvalidCommand;
- HCONTACT hContact = MSN_HContactFromEmail(data.userEmail);
+ MCONTACT hContact = MSN_HContactFromEmail(data.userEmail);
if (hContact != NULL) {
setWord(hContact, "Status", MSN_GetThreadByContact(data.userEmail) ? ID_STATUS_INVISIBLE : ID_STATUS_OFFLINE);
setDword(hContact, "IdleTS", 0);
@@ -1203,7 +1203,7 @@ LBL_InvalidCommand: MsnContact *cont = Lists_Get(szEmail);
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (!cont && !isMe) {
hContact = MSN_HContactFromEmail(data.wlid, data.userNick, true, true);
cont = Lists_Get(szEmail);
@@ -1293,7 +1293,7 @@ remove: if (!strchr(data.userEmail, ';')) {
UrlDecode(data.userNick);
- HCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
+ MCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
if (tNumTokens == 5 && strcmp(data.flags, "0:0")) {
MsnContact *cont = Lists_Get(data.userEmail);
@@ -1385,7 +1385,7 @@ remove: stripBBCode(data.userNick);
stripColorCode(data.userNick);
- HCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
+ MCONTACT hContact = MSN_HContactFromEmail(data.userEmail, data.userNick, true, true);
if (tNumTokens == 3) {
MsnContact *cont = Lists_Get(data.userEmail);
if (cont) {
diff --git a/protocols/MSN/src/msn_contact.cpp b/protocols/MSN/src/msn_contact.cpp index 1fdef99e6b..bb7bd6c559 100644 --- a/protocols/MSN/src/msn_contact.cpp +++ b/protocols/MSN/src/msn_contact.cpp @@ -23,9 +23,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "msn_global.h"
#include "msn_proto.h"
-HCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, bool addIfNeeded, bool temporary)
+MCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, bool addIfNeeded, bool temporary)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
char* szEmail;
parseWLID(NEWSTR_ALLOCA(wlid), NULL, &szEmail, NULL);
@@ -34,7 +34,7 @@ HCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, if (msc && msc->hContact) hContact = msc->hContact;
if (hContact == NULL && addIfNeeded) {
- 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)m_szModuleName);
setString(hContact, "e-mail", szEmail);
setStringUtf(hContact, "Nick", msnNick ? msnNick : wlid);
@@ -48,7 +48,7 @@ HCONTACT CMsnProto::MSN_HContactFromEmail(const char* wlid, const char* msnNick, }
-void CMsnProto::MSN_SetContactDb(HCONTACT hContact, const char *szEmail)
+void CMsnProto::MSN_SetContactDb(MCONTACT hContact, const char *szEmail)
{
MsnContact *cont = Lists_Get(szEmail);
const int listId = cont->list;
@@ -119,7 +119,7 @@ void CMsnProto::AddDelUserContList(const char* email, const int list, const int /////////////////////////////////////////////////////////////////////////////////////////
// MSN_AddUser - adds a e-mail address to one of the MSN server lists
-bool CMsnProto::MSN_AddUser(HCONTACT hContact, const char* email, int netId, int flags, const char *msg)
+bool CMsnProto::MSN_AddUser(MCONTACT hContact, const char* email, int netId, int flags, const char *msg)
{
bool needRemove = (flags & LIST_REMOVE) != 0;
bool leaveHotmail = (flags & LIST_REMOVENH) == LIST_REMOVENH;
diff --git a/protocols/MSN/src/msn_global.h b/protocols/MSN/src/msn_global.h index fac52f59d7..d1efa2736b 100644 --- a/protocols/MSN/src/msn_global.h +++ b/protocols/MSN/src/msn_global.h @@ -167,7 +167,7 @@ template <class chartype> void UrlDecode(chartype* str); void __cdecl MSN_ConnectionProc(HANDLE hNewConnection, DWORD dwRemoteIP, void*);
char* MSN_GetAvatarHash(char* szContext, char** pszUrl = NULL);
-bool MSN_MsgWndExist(HCONTACT hContact);
+bool MSN_MsgWndExist(MCONTACT hContact);
#define MSN_SendNickname(a) MSN_SendNicknameUtf(UTF8(a))
@@ -542,7 +542,7 @@ struct ThreadData int contactJoined(const char* email);
int contactLeft(const char* email);
- HCONTACT getContactHandle(void);
+ MCONTACT getContactHandle(void);
};
@@ -569,7 +569,7 @@ struct ThreadData -inline bool IsChatHandle(HCONTACT hContact) { return (INT_PTR)hContact < 0; }
+inline bool IsChatHandle(MCONTACT hContact) { return (INT_PTR)hContact < 0; }
/////////////////////////////////////////////////////////////////////////////////////////
@@ -596,10 +596,10 @@ struct MsgQueueEntry struct AvatarQueueEntry
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *pszUrl;
- __forceinline AvatarQueueEntry(HCONTACT _contact, LPCSTR _url) :
+ __forceinline AvatarQueueEntry(MCONTACT _contact, LPCSTR _url) :
hContact(_contact),
pszUrl( mir_strdup(_url))
{}
@@ -639,7 +639,7 @@ struct MsnContact char *email;
char *invite;
char *nick;
- HCONTACT hContact;
+ MCONTACT hContact;
int list;
int netId;
int p2pMsgId;
@@ -863,7 +863,7 @@ struct chunkedmsg struct DeleteParam
{
CMsnProto *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
};
INT_PTR CALLBACK DlgDeleteContactUI(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
@@ -871,10 +871,10 @@ INT_PTR CALLBACK DlgDeleteContactUI(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA struct InviteChatParam
{
TCHAR* id;
- HCONTACT hContact;
+ MCONTACT hContact;
CMsnProto* ppro;
- InviteChatParam(const TCHAR* id, HCONTACT hContact, CMsnProto* ppro)
+ InviteChatParam(const TCHAR* id, MCONTACT hContact, CMsnProto* ppro)
: id(mir_tstrdup(id)), hContact(hContact), ppro(ppro) {}
~InviteChatParam()
diff --git a/protocols/MSN/src/msn_links.cpp b/protocols/MSN/src/msn_links.cpp index e41bf5becb..e058d9194b 100644 --- a/protocols/MSN/src/msn_links.cpp +++ b/protocols/MSN/src/msn_links.cpp @@ -27,7 +27,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. static HANDLE hServiceParseLink;
-static HCONTACT GetContact(TCHAR *arg, TCHAR **pemail, CMsnProto *proto)
+static MCONTACT GetContact(TCHAR *arg, TCHAR **pemail, CMsnProto *proto)
{
TCHAR* email = NULL;
do
@@ -51,7 +51,7 @@ static HCONTACT GetContact(TCHAR *arg, TCHAR **pemail, CMsnProto *proto) return NULL;
}
if (pemail) *pemail = email;
- HCONTACT hContact = proto->MSN_HContactFromEmail(UTF8(email), NULL, true, true);
+ MCONTACT hContact = proto->MSN_HContactFromEmail(UTF8(email), NULL, true, true);
return hContact;
}
@@ -96,7 +96,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) arg += 4;
TCHAR *email;
- HCONTACT hContact = GetContact(arg, &email, proto);
+ MCONTACT hContact = GetContact(arg, &email, proto);
if (email == NULL) return 1;
/* does not yet check if email is current user */
@@ -121,7 +121,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) {
arg += 5;
- HCONTACT hContact = GetContact(arg, NULL, proto);
+ MCONTACT hContact = GetContact(arg, NULL, proto);
if (hContact != NULL)
{
@@ -133,7 +133,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) {
arg += 6;
- HCONTACT hContact = GetContact(arg, NULL, proto);
+ MCONTACT hContact = GetContact(arg, NULL, proto);
if (hContact != NULL)
{
@@ -145,7 +145,7 @@ static INT_PTR ServiceParseMsnimLink(WPARAM, LPARAM lParam) {
arg += 6;
- HCONTACT hContact = GetContact(arg, NULL, proto);
+ MCONTACT hContact = GetContact(arg, NULL, proto);
if (hContact != NULL)
{
diff --git a/protocols/MSN/src/msn_lists.cpp b/protocols/MSN/src/msn_lists.cpp index bd3ab46208..b091510004 100644 --- a/protocols/MSN/src/msn_lists.cpp +++ b/protocols/MSN/src/msn_lists.cpp @@ -65,7 +65,7 @@ MsnContact* CMsnProto::Lists_Get(const char* email) return p;
}
-MsnContact* CMsnProto::Lists_Get(HCONTACT hContact)
+MsnContact* CMsnProto::Lists_Get(MCONTACT hContact)
{
EnterCriticalSection(&csLists);
@@ -188,7 +188,7 @@ unsigned CMsnProto::p2p_getPktNum(const char* wlid) return res;
}
-int CMsnProto::Lists_Add(int list, int netId, const char* email, HCONTACT hContact, const char* nick, const char* invite)
+int CMsnProto::Lists_Add(int list, int netId, const char* email, MCONTACT hContact, const char* nick, const char* invite)
{
EnterCriticalSection(&csLists);
@@ -238,9 +238,9 @@ void CMsnProto::Lists_Remove(int list, const char* email) void CMsnProto::Lists_Populate(void)
{
- HCONTACT hContact = db_find_first(m_szModuleName);
+ MCONTACT hContact = db_find_first(m_szModuleName);
while (hContact) {
- HCONTACT hNext = db_find_next(hContact, m_szModuleName);
+ MCONTACT hNext = db_find_next(hContact, m_szModuleName);
char szEmail[MSN_MAX_EMAIL_LEN] = "";
if (db_get_static(hContact, m_szModuleName, "wlid", szEmail, sizeof(szEmail)))
db_get_static(hContact, m_szModuleName, "e-mail", szEmail, sizeof(szEmail));
@@ -439,7 +439,7 @@ static void ResetListOptions(HWND hwndList) SendMessage(hwndList, CLM_SETTEXTCOLOR, i, GetSysColor(COLOR_WINDOWTEXT));
}
-static void SetContactIcons(HCONTACT hItem, HWND hwndList, CMsnProto* proto)
+static void SetContactIcons(MCONTACT hItem, HWND hwndList, CMsnProto* proto)
{
if (!proto->MSN_IsMyContact(hItem)) {
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
@@ -460,17 +460,17 @@ static void SetContactIcons(HCONTACT hItem, HWND hwndList, CMsnProto* proto) SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(4,(dwMask & LIST_RL)?5:0));
}
-static void SetAllContactIcons(HCONTACT hItem, HWND hwndList, CMsnProto* proto)
+static void SetAllContactIcons(MCONTACT hItem, HWND hwndList, CMsnProto* proto)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem)
{
- HCONTACT hItemN = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
SetAllContactIcons(hItemT, hwndList, proto);
}
@@ -481,7 +481,7 @@ static void SetAllContactIcons(HCONTACT hItem, HWND hwndList, CMsnProto* proto) }
}
-static void SaveListItem(HCONTACT hContact, const char* szEmail, int list, int iPrevValue, int iNewValue, CMsnProto* proto)
+static void SaveListItem(MCONTACT hContact, const char* szEmail, int list, int iPrevValue, int iNewValue, CMsnProto* proto)
{
if (iPrevValue == iNewValue)
return;
@@ -499,15 +499,15 @@ static void SaveListItem(HCONTACT hContact, const char* szEmail, int list, int i proto->MSN_AddUser(hContact, szEmail, proto->Lists_GetNetId(szEmail), list);
}
-static void SaveSettings(HCONTACT hItem, HWND hwndList, CMsnProto* proto)
+static void SaveSettings(MCONTACT hItem, HWND hwndList, CMsnProto* proto)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem)
{
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
SaveSettings(hItemT, hwndList, proto);
}
@@ -536,7 +536,7 @@ static void SaveSettings(HCONTACT hItem, HWND hwndList, CMsnProto* proto) if (xorMask && newMask & (LIST_FL | LIST_LL))
{
- HCONTACT hContact = IsHContactInfo(hItem) ? proto->MSN_HContactFromEmail(szEmail, szEmail, true, false) : hItem;
+ MCONTACT hContact = IsHContactInfo(hItem) ? proto->MSN_HContactFromEmail(szEmail, szEmail, true, false) : hItem;
proto->MSN_SetContactDb(hContact, szEmail);
}
@@ -550,7 +550,7 @@ static void SaveSettings(HCONTACT hItem, HWND hwndList, CMsnProto* proto) }
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
@@ -632,7 +632,7 @@ INT_PTR CALLBACK DlgProcMsnServLists(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR {
case CLN_NEWCONTACT:
if ((nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- SetContactIcons((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, proto);
+ SetContactIcons((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, proto);
break;
case CLN_LISTREBUILT:
diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index d74d62ff33..f3c84f36af 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -293,7 +293,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) ShowPopup &= mUnreadMessages != 0 || (mUnreadJunkEmails != 0 && !getByte("DisableHotmailJunk", 0));
- HCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
+ MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
if (hContact)
{
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
@@ -398,7 +398,7 @@ static void TruncUtf8(char *str, size_t sz) str[cntl] = 0;
}
-void CMsnProto::displayEmailCount(HCONTACT hContact)
+void CMsnProto::displayEmailCount(MCONTACT hContact)
{
if (!emailEnabled || getByte("DisableHotmailCL", 0)) return;
diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index e9e6cf3b1a..f36fccd9e2 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -33,7 +33,7 @@ HANDLE hNetMeeting, hBlockCom, hSendHotMail, hInviteChat, hViewProfile; INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM)
{
if (msnLoggedIn) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char tEmail[MSN_MAX_EMAIL_LEN];
db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
@@ -51,7 +51,7 @@ INT_PTR CMsnProto::MsnBlockCommand(WPARAM wParam, LPARAM) INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM)
{
- HCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
+ MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail);
if (hContact) CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
MsnInvokeMyURL(true, "http://mail.live.com?rru=inbox");
@@ -60,7 +60,7 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM) INT_PTR CMsnProto::MsnSendHotmail(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail))
@@ -85,7 +85,7 @@ INT_PTR CMsnProto::MsnSetupAlerts(WPARAM, LPARAM) INT_PTR CMsnProto::MsnViewProfile(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char buf[64], *cid;
if (hContact == NULL)
@@ -127,7 +127,7 @@ INT_PTR CMsnProto::MsnInviteCommand(WPARAM, LPARAM) int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char szEmail[MSN_MAX_EMAIL_LEN];
if ( !MSN_IsMyContact(hContact))
@@ -157,7 +157,7 @@ int CMsnProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) int CMsnProto::OnContactDoubleClicked(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (emailEnabled && MSN_IsMeByContact(hContact)) {
MsnSendHotmail(wParam, 0);
@@ -173,7 +173,7 @@ INT_PTR CMsnProto::MsnSendNetMeeting(WPARAM wParam, LPARAM) {
if (!msnLoggedIn) return 0;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
char szEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, szEmail)) return 0;
@@ -359,7 +359,7 @@ void CMsnProto::MSN_EnableMenuItems(bool bEnable) //////////////////////////////////////////////////////////////////////////////////////
-static CMsnProto* GetProtoInstanceByHContact(HCONTACT hContact)
+static CMsnProto* GetProtoInstanceByHContact(MCONTACT hContact)
{
char* szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -374,31 +374,31 @@ static CMsnProto* GetProtoInstanceByHContact(HCONTACT hContact) static INT_PTR MsnMenuBlockCommand(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((HCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->MsnBlockCommand(wParam, lParam) : 0;
}
static INT_PTR MsnMenuViewProfile(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((HCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->MsnViewProfile(wParam, lParam) : 0;
}
static INT_PTR MsnMenuSendNetMeeting(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((HCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->MsnSendNetMeeting(wParam, lParam) : 0;
}
static INT_PTR MsnMenuSendHotmail(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((HCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
return (ppro) ? ppro->MsnSendHotmail(wParam, lParam) : 0;
}
static int MSN_OnPrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- CMsnProto* ppro = GetProtoInstanceByHContact((HCONTACT)wParam);
+ CMsnProto* ppro = GetProtoInstanceByHContact((MCONTACT)wParam);
if (ppro)
ppro->OnPrebuildContactMenu(wParam, lParam);
else {
diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 704adaf6f4..f3c74618e2 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -88,7 +88,7 @@ void CMsnProto::MSN_AddAuthRequest(const char *email, const char *nick, const ch {
//blob is: UIN=0(DWORD), hContact(DWORD), nick(ASCIIZ), ""(ASCIIZ), ""(ASCIIZ), email(ASCIIZ), ""(ASCIIZ)
- HCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
+ MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, true);
int emaillen = (int)strlen(email);
@@ -176,7 +176,7 @@ char* MSN_GetAvatarHash(char* szContext, char** pszUrl) /////////////////////////////////////////////////////////////////////////////////////////
// MSN_GetAvatarFileName - gets a file name for an contact's avatar
-void CMsnProto::MSN_GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
+void CMsnProto::MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext)
{
size_t tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -321,7 +321,7 @@ int CMsnProto::MSN_SetMyAvatar(const TCHAR* sztFname, void* pData, size_t cbLen) /////////////////////////////////////////////////////////////////////////////////////////
// MSN_GetCustomSmileyFileName - gets a file name for an contact's custom smiley
-void CMsnProto::MSN_GetCustomSmileyFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const char* SmileyName, int type)
+void CMsnProto::MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const char* SmileyName, int type)
{
size_t tPathLen;
@@ -834,7 +834,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_COMMAND:
if (tData != NULL) {
if (tData->flags & MSN_HOTMAIL_POPUP) {
- HCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
+ MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
if (hContact) CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
if (tData->flags & MSN_ALLOW_ENTER)
tData->proto->MsnInvokeMyURL(true, tData->url);
@@ -847,7 +847,7 @@ LRESULT CALLBACK NullWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case WM_CONTEXTMENU:
if (tData != NULL && tData->flags & MSN_HOTMAIL_POPUP) {
- HCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
+ MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, NULL);
if (hContact)
CallService(MS_CLIST_REMOVEEVENT, (WPARAM)hContact, (LPARAM) 1);
}
@@ -946,7 +946,7 @@ void CALLBACK sttMainThreadCallback(PVOID dwParam) CallService(MS_POPUP_ADDPOPUPCLASS, 0, (LPARAM)&ppd);
}
-void CMsnProto::MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags, const char* url, HCONTACT hContact)
+void CMsnProto::MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags, const char* url, MCONTACT hContact)
{
if (Miranda_Terminated()) return;
@@ -961,7 +961,7 @@ void CMsnProto::MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags }
-void CMsnProto::MSN_ShowPopup(const HCONTACT hContact, const TCHAR* msg, int flags)
+void CMsnProto::MSN_ShowPopup(const MCONTACT hContact, const TCHAR* msg, int flags)
{
const TCHAR* nickname = hContact ? GetContactNameT(hContact) : _T("Me");
MSN_ShowPopup(nickname, msg, flags, NULL, hContact);
@@ -1194,13 +1194,13 @@ char* TWinErrorCode::getText() return mErrorText;
}
-bool CMsnProto::MSN_IsMyContact(HCONTACT hContact)
+bool CMsnProto::MSN_IsMyContact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
}
-bool CMsnProto::MSN_IsMeByContact(HCONTACT hContact, char* szEmail)
+bool CMsnProto::MSN_IsMeByContact(MCONTACT hContact, char* szEmail)
{
char tEmail[MSN_MAX_EMAIL_LEN];
char *emailPtr = szEmail ? szEmail : tEmail;
@@ -1212,7 +1212,7 @@ bool CMsnProto::MSN_IsMeByContact(HCONTACT hContact, char* szEmail) return _stricmp(emailPtr, MyOptions.szEmail) == 0;
}
-bool MSN_MsgWndExist(HCONTACT hContact)
+bool MSN_MsgWndExist(MCONTACT hContact)
{
MessageWindowInputData msgWinInData =
{ sizeof(MessageWindowInputData), hContact, MSG_WINDOW_UFLAG_MSG_BOTH };
@@ -1222,7 +1222,7 @@ bool MSN_MsgWndExist(HCONTACT hContact) bool res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res = res || msgWinData.hwndWindow;
if (res) {
- msgWinInData.hContact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ msgWinInData.hContact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
if (msgWinInData.hContact != NULL) {
res = CallService(MS_MSG_GETWINDOWDATA, (WPARAM)&msgWinInData, (LPARAM)&msgWinData) != 0;
res |= (msgWinData.hwndWindow == NULL);
diff --git a/protocols/MSN/src/msn_msgqueue.cpp b/protocols/MSN/src/msn_msgqueue.cpp index 0bbd87c01b..ae231e7097 100644 --- a/protocols/MSN/src/msn_msgqueue.cpp +++ b/protocols/MSN/src/msn_msgqueue.cpp @@ -156,7 +156,7 @@ void CMsnProto::MsgQueue_Clear(const char* wlid, bool msg) const MsgQueueEntry& E = lsMessageQueue[i];
if (E.msgSize == 0)
{
- HCONTACT hContact = MSN_HContactFromEmail(E.wlid);
+ MCONTACT hContact = MSN_HContactFromEmail(E.wlid);
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED,
(HANDLE)E.seq, (LPARAM)Translate("Message delivery failed"));
}
@@ -187,7 +187,7 @@ void CMsnProto::MsgQueue_Clear(const char* wlid, bool msg) if (msgfnd)
{
LeaveCriticalSection(&csMsgQueue);
- HCONTACT hContact = MSN_HContactFromEmail(wlid);
+ MCONTACT hContact = MSN_HContactFromEmail(wlid);
ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)seq,
(LPARAM)Translate("Message delivery failed"));
i = 0;
diff --git a/protocols/MSN/src/msn_opts.cpp b/protocols/MSN/src/msn_opts.cpp index b4c00ca167..ae6276b6f3 100644 --- a/protocols/MSN/src/msn_opts.cpp +++ b/protocols/MSN/src/msn_opts.cpp @@ -490,7 +490,7 @@ static INT_PTR CALLBACK DlgProcHotmailPopupOpts(HWND hwndDlg, UINT msg, WPARAM w proto->setByte("EnableDeliveryPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_FIRSTMSG));
proto->setByte("EnableSessionPopup", (BYTE)IsDlgButtonChecked(hwndDlg, IDC_NOTIFY_ENDSESSION));
- HCONTACT hContact = proto->MSN_HContactFromEmail(proto->MyOptions.szEmail);
+ MCONTACT hContact = proto->MSN_HContactFromEmail(proto->MyOptions.szEmail);
if (hContact)
proto->displayEmailCount(hContact);
return TRUE;
diff --git a/protocols/MSN/src/msn_p2ps.cpp b/protocols/MSN/src/msn_p2ps.cpp index 697bb49c0b..780c27b197 100644 --- a/protocols/MSN/src/msn_p2ps.cpp +++ b/protocols/MSN/src/msn_p2ps.cpp @@ -110,7 +110,7 @@ bool CMsnProto::p2p_sessionRegistered(filetransfer* ft) return idx > -1;
}
-filetransfer* CMsnProto::p2p_getThreadSession(HCONTACT hContact, TInfoType mType)
+filetransfer* CMsnProto::p2p_getThreadSession(MCONTACT hContact, TInfoType mType)
{
EnterCriticalSection(&sessionLock);
@@ -129,7 +129,7 @@ filetransfer* CMsnProto::p2p_getThreadSession(HCONTACT hContact, TInfoType mType return result;
}
-void CMsnProto::p2p_clearThreadSessions(HCONTACT hContact, TInfoType mType)
+void CMsnProto::p2p_clearThreadSessions(MCONTACT hContact, TInfoType mType)
{
EnterCriticalSection(&sessionLock);
@@ -147,7 +147,7 @@ void CMsnProto::p2p_clearThreadSessions(HCONTACT hContact, TInfoType mType) LeaveCriticalSection(&sessionLock);
}
-filetransfer* CMsnProto::p2p_getAvatarSession(HCONTACT hContact)
+filetransfer* CMsnProto::p2p_getAvatarSession(MCONTACT hContact)
{
EnterCriticalSection(&sessionLock);
@@ -165,7 +165,7 @@ filetransfer* CMsnProto::p2p_getAvatarSession(HCONTACT hContact) return result;
}
-bool CMsnProto::p2p_isAvatarOnly(HCONTACT hContact)
+bool CMsnProto::p2p_isAvatarOnly(MCONTACT hContact)
{
EnterCriticalSection(&sessionLock);
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp index 7f4ad25621..1c21cb445e 100644 --- a/protocols/MSN/src/msn_proto.cpp +++ b/protocols/MSN/src/msn_proto.cpp @@ -80,7 +80,7 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) : LoadOptions();
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
delSetting(hContact, "Status");
delSetting(hContact, "IdleTS");
delSetting(hContact, "p2pMsgId");
@@ -216,9 +216,9 @@ int CMsnProto::OnPreShutdown(WPARAM, LPARAM) /////////////////////////////////////////////////////////////////////////////////////////
// MsnAddToList - adds contact to the server list
-HCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD flags)
+MCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD flags)
{
- HCONTACT hContact = MSN_HContactFromEmail(email, nick, true, flags & PALF_TEMPORARY);
+ MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, flags & PALF_TEMPORARY);
if (flags & PALF_TEMPORARY)
{
@@ -249,7 +249,7 @@ HCONTACT CMsnProto::AddToListByEmail(const char *email, const char *nick, DWORD return hContact;
}
-HCONTACT __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
TCHAR *id = psr->id ? psr->id : psr->email;
return AddToListByEmail(
@@ -258,7 +258,7 @@ HCONTACT __cdecl CMsnProto::AddToList(int flags, PROTOSEARCHRESULT* psr) flags);
}
-HCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
@@ -277,7 +277,7 @@ HCONTACT __cdecl CMsnProto::AddToListByEvent(int flags, int iContact, HANDLE hDb return AddToListByEmail(email, nick, flags);
}
-int CMsnProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int CMsnProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
Proto_AuthRecv(m_szModuleName, pre);
return 0;
@@ -286,7 +286,7 @@ int CMsnProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CMsnProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CMsnProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
if (msnLoggedIn)
{
@@ -349,7 +349,7 @@ int CMsnProto::Authorize(HANDLE hDbEvent) char* lastName = firstName + strlen(firstName) + 1;
char* email = lastName + strlen(lastName) + 1;
- HCONTACT hContact = MSN_HContactFromEmail(email, nick, true, 0);
+ MCONTACT hContact = MSN_HContactFromEmail(email, nick, true, 0);
int netId = Lists_GetNetId(email);
MSN_AddUser(hContact, email, netId, LIST_AL);
@@ -398,7 +398,7 @@ int CMsnProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) {
if (msc->hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)msc->hContact, 0);
msc->hContact = NULL;
- HCONTACT hContact = MSN_HContactFromEmail(email);
+ MCONTACT hContact = MSN_HContactFromEmail(email);
if (hContact) CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
@@ -518,7 +518,7 @@ void __cdecl CMsnProto::MsnFileAckThread(void* arg) ProtoBroadcastAck(ft->std.hContact, ACKTYPE_FILE, ACKRESULT_INITIALISING, ft, 0);
}
-HANDLE __cdecl CMsnProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CMsnProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -546,7 +546,7 @@ HANDLE __cdecl CMsnProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const P /////////////////////////////////////////////////////////////////////////////////////////
// MsnFileCancel - cancels the active file transfer
-int __cdecl CMsnProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int __cdecl CMsnProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -579,7 +579,7 @@ int __cdecl CMsnProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) /////////////////////////////////////////////////////////////////////////////////////////
// MsnFileDeny - rejects the file transfer request
-int __cdecl CMsnProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
+int __cdecl CMsnProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* /*szReason*/)
{
filetransfer* ft = (filetransfer*)hTransfer;
@@ -650,7 +650,7 @@ int __cdecl CMsnProto::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR typedef struct AwayMsgInfo_tag
{
INT_PTR id;
- HCONTACT hContact;
+ MCONTACT hContact;
} AwayMsgInfo;
void __cdecl CMsnProto::MsnGetAwayMsgThread(void* arg)
@@ -668,7 +668,7 @@ void __cdecl CMsnProto::MsnGetAwayMsgThread(void* arg) mir_free(inf);
}
-HANDLE __cdecl CMsnProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CMsnProto::GetAwayMsg(MCONTACT hContact)
{
AwayMsgInfo* inf = (AwayMsgInfo*)mir_alloc(sizeof(AwayMsgInfo));
inf->hContact = hContact;
@@ -681,7 +681,7 @@ HANDLE __cdecl CMsnProto::GetAwayMsg(HCONTACT hContact) /////////////////////////////////////////////////////////////////////////////////////////
// MsnGetCaps - obtain the protocol capabilities
-DWORD_PTR __cdecl CMsnProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CMsnProto::GetCaps(int type, MCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
@@ -718,7 +718,7 @@ DWORD_PTR __cdecl CMsnProto::GetCaps(int type, HCONTACT hContact) /////////////////////////////////////////////////////////////////////////////////////////
// MsnGetInfo - nothing to do, cause we cannot obtain information from the server
-int __cdecl CMsnProto::GetInfo(HCONTACT hContact, int infoType)
+int __cdecl CMsnProto::GetInfo(MCONTACT hContact, int infoType)
{
return 1;
}
@@ -726,7 +726,7 @@ int __cdecl CMsnProto::GetInfo(HCONTACT hContact, int infoType) ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CMsnProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT*)
+int __cdecl CMsnProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT*)
{
return 1;
}
@@ -735,7 +735,7 @@ int __cdecl CMsnProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT*) /////////////////////////////////////////////////////////////////////////////////////////
// MsnRecvFile - creates a database event from the file request been received
-int __cdecl CMsnProto::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+int __cdecl CMsnProto::RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
return Proto_RecvFile(hContact, evt);
}
@@ -743,7 +743,7 @@ int __cdecl CMsnProto::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt) /////////////////////////////////////////////////////////////////////////////////////////
// MsnRecvMessage - creates a database event from the message been received
-int __cdecl CMsnProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CMsnProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
char tEmail[MSN_MAX_EMAIL_LEN];
db_get_static(hContact, m_szModuleName, "e-mail", tEmail, sizeof(tEmail));
@@ -757,7 +757,7 @@ int __cdecl CMsnProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CMsnProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*)
+int __cdecl CMsnProto::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
{
return 1;
}
@@ -765,7 +765,7 @@ int __cdecl CMsnProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CMsnProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CMsnProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
@@ -773,7 +773,7 @@ int __cdecl CMsnProto::SendContacts(HCONTACT hContact, int flags, int nContacts, /////////////////////////////////////////////////////////////////////////////////////////
// MsnSendFile - initiates a file transfer
-HANDLE __cdecl CMsnProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE __cdecl CMsnProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
if (!msnLoggedIn)
return 0;
@@ -826,14 +826,14 @@ HANDLE __cdecl CMsnProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescrip struct TFakeAckParams
{
- inline TFakeAckParams(HCONTACT p2, long p3, const char* p4, CMsnProto *p5) :
+ inline TFakeAckParams(MCONTACT p2, long p3, const char* p4, CMsnProto *p5) :
hContact(p2),
id(p3),
msg(p4),
proto(p5)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
long id;
const char* msg;
CMsnProto *proto;
@@ -851,7 +851,7 @@ void CMsnProto::MsnFakeAck(void* arg) delete tParam;
}
-int __cdecl CMsnProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CMsnProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
const char *errMsg = NULL;
@@ -1002,7 +1002,7 @@ int __cdecl CMsnProto::SetAwayMsg(int status, const TCHAR* msg) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CMsnProto::RecvAwayMsg(HCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
+int __cdecl CMsnProto::RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
{
return 1;
}
@@ -1065,7 +1065,7 @@ int __cdecl CMsnProto::SetStatus(int iNewStatus) /////////////////////////////////////////////////////////////////////////////////////////
// MsnUserIsTyping - notify another contact that we're typing a message
-int __cdecl CMsnProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CMsnProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!msnLoggedIn) return 0;
@@ -1108,7 +1108,7 @@ int __cdecl CMsnProto::UserIsTyping(HCONTACT hContact, int type) ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CMsnProto::SendUrl(HCONTACT hContact, int flags, const char* url)
+int __cdecl CMsnProto::SendUrl(MCONTACT hContact, int flags, const char* url)
{
return 1;
}
@@ -1116,7 +1116,7 @@ int __cdecl CMsnProto::SendUrl(HCONTACT hContact, int flags, const char* url) /////////////////////////////////////////////////////////////////////////////////////////
// MsnSetApparentMode - controls contact visibility
-int __cdecl CMsnProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CMsnProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (mode && mode != ID_STATUS_OFFLINE)
return 1;
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h index cf40b2b89e..74d758dcbf 100644 --- a/protocols/MSN/src/msn_proto.h +++ b/protocols/MSN/src/msn_proto.h @@ -32,23 +32,23 @@ struct CMsnProto : public PROTO<CMsnProto> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
@@ -56,24 +56,24 @@ struct CMsnProto : public PROTO<CMsnProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -195,7 +195,7 @@ struct CMsnProto : public PROTO<CMsnProto> bool getMyAvatarFile(char *url, TCHAR *fname);
void MSN_GoOffline(void);
- void MSN_GetCustomSmileyFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const char* SmileyName, int Type);
+ void MSN_GetCustomSmileyFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const char* SmileyName, int Type);
const char* MirandaStatusToMSN(int status);
WORD MSNStatusToMiranda(const char *status);
@@ -218,13 +218,13 @@ struct CMsnProto : public PROTO<CMsnProto> void sttProcessYFind(char* buf, size_t len);
void sttCustomSmiley(const char* msgBody, char* email, char* nick, int iSmileyType);
void sttInviteMessage(ThreadData* info, char* msgBody, char* email, char* nick);
- void sttSetMirVer(HCONTACT hContact, DWORD dwValue, bool always);
+ void sttSetMirVer(MCONTACT hContact, DWORD dwValue, bool always);
void LoadOptions(void);
void InitPopups(void);
- void MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags, const char* url, HCONTACT hContact = NULL);
- void MSN_ShowPopup(const HCONTACT hContact, const TCHAR* msg, int flags);
+ void MSN_ShowPopup(const TCHAR* nickname, const TCHAR* msg, int flags, const char* url, MCONTACT hContact = NULL);
+ void MSN_ShowPopup(const MCONTACT hContact, const TCHAR* msg, int flags);
void MSN_ShowError(const char* msgtext, ...);
void MSN_SetNicknameUtf(const char* nickname);
@@ -337,7 +337,7 @@ struct CMsnProto : public PROTO<CMsnProto> void p2p_cancelAllSessions(void);
void p2p_redirectSessions(const char* wlid);
void p2p_startSessions(const char* wlid);
- void p2p_clearThreadSessions(HCONTACT hContact, TInfoType mType);
+ void p2p_clearThreadSessions(MCONTACT hContact, TInfoType mType);
void p2p_invite(unsigned iAppID, filetransfer* ft, const char *wlid);
void p2p_inviteDc(filetransfer* ft, const char *wlid);
@@ -380,14 +380,14 @@ struct CMsnProto : public PROTO<CMsnProto> void P2pSessions_Init(void);
void P2pSessions_Uninit(void);
- filetransfer* p2p_getAvatarSession(HCONTACT hContact);
- filetransfer* p2p_getThreadSession(HCONTACT hContact, TInfoType mType);
+ filetransfer* p2p_getAvatarSession(MCONTACT hContact);
+ filetransfer* p2p_getThreadSession(MCONTACT hContact, TInfoType mType);
filetransfer* p2p_getSessionByID(unsigned id);
filetransfer* p2p_getSessionByUniqueID(unsigned id);
filetransfer* p2p_getSessionByCallID(const char* CallID, const char* wlid);
bool p2p_sessionRegistered(filetransfer* ft);
- bool p2p_isAvatarOnly(HCONTACT hContact);
+ bool p2p_isAvatarOnly(MCONTACT hContact);
unsigned p2p_getMsgId(const char* wlid, int inc);
unsigned p2p_getPktNum(const char* wlid);
@@ -413,7 +413,7 @@ struct CMsnProto : public PROTO<CMsnProto> void MSN_ChatStart(ThreadData* info);
void MSN_KillChatSession(const TCHAR* id);
- HCONTACT MSN_GetChatInernalHandle(HCONTACT hContact);
+ MCONTACT MSN_GetChatInernalHandle(MCONTACT hContact);
int __cdecl MSN_GCEventHook(WPARAM wParam, LPARAM lParam);
int __cdecl MSN_GCMenuHook(WPARAM wParam, LPARAM lParam);
@@ -421,7 +421,7 @@ struct CMsnProto : public PROTO<CMsnProto> /////////////////////////////////////////////////////////////////////////////////////////
// MSN contact list
- int Lists_Add(int list, int netId, const char* email, HCONTACT hContact = NULL, const char* nick = NULL, const char* invite = NULL);
+ int Lists_Add(int list, int netId, const char* email, MCONTACT hContact = NULL, const char* nick = NULL, const char* invite = NULL);
bool Lists_IsInList(int list, const char* email);
int Lists_GetMask(const char* email);
int Lists_GetNetId(const char* email);
@@ -430,7 +430,7 @@ struct CMsnProto : public PROTO<CMsnProto> void Lists_Wipe(void);
MsnContact* Lists_Get(const char* email);
- MsnContact* Lists_Get(HCONTACT hContact);
+ MsnContact* Lists_Get(MCONTACT hContact);
MsnContact* Lists_GetNext(int& i);
MsnPlace* Lists_GetPlace(const char* wlid);
@@ -446,13 +446,13 @@ struct CMsnProto : public PROTO<CMsnProto> void MSN_FindYahooUser(const char* email);
bool MSN_RefreshContactList(void);
- bool MSN_IsMyContact(HCONTACT hContact);
- bool MSN_IsMeByContact(HCONTACT hContact, char* szEmail = NULL);
- bool MSN_AddUser(HCONTACT hContact, const char* email, int netId, int flags, const char *msg = NULL);
+ bool MSN_IsMyContact(MCONTACT hContact);
+ bool MSN_IsMeByContact(MCONTACT hContact, char* szEmail = NULL);
+ bool MSN_AddUser(MCONTACT hContact, const char* email, int netId, int flags, const char *msg = NULL);
void MSN_AddAuthRequest(const char *email, const char *nick, const char *reason);
- void MSN_SetContactDb(HCONTACT hContact, const char *szEmail);
- HCONTACT MSN_HContactFromEmail(const char* msnEmail, const char* msnNick = NULL, bool addIfNeeded = false, bool temporary = false);
- HCONTACT AddToListByEmail(const char *email, const char *nick, DWORD flags);
+ void MSN_SetContactDb(MCONTACT hContact, const char *szEmail);
+ MCONTACT MSN_HContactFromEmail(const char* msnEmail, const char* msnNick = NULL, bool addIfNeeded = false, bool temporary = false);
+ MCONTACT AddToListByEmail(const char *email, const char *nick, DWORD flags);
/////////////////////////////////////////////////////////////////////////////////////////
// MSN server groups
@@ -464,11 +464,11 @@ struct CMsnProto : public PROTO<CMsnProto> LPCSTR MSN_GetGroupByName(const char* pName);
void MSN_SetGroupName(const char* pId, const char* pName);
- void MSN_MoveContactToGroup(HCONTACT hContact, const char* grpName);
+ void MSN_MoveContactToGroup(MCONTACT hContact, const char* grpName);
void MSN_RenameServerGroup(LPCSTR szId, const char* newName);
void MSN_DeleteServerGroup(LPCSTR szId);
void MSN_RemoveEmptyGroups(void);
- void MSN_SyncContactToServerGroup(HCONTACT hContact, const char* szContId, ezxml_t cgrp);
+ void MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szContId, ezxml_t cgrp);
void MSN_UploadServerGroups(char* group);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -485,12 +485,12 @@ struct CMsnProto : public PROTO<CMsnProto> void AvatarQueue_Init(void);
void AvatarQueue_Uninit(void);
- void MSN_GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext);
+ void MSN_GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen, const TCHAR *ext);
int MSN_SetMyAvatar(const TCHAR* szFname, void* pData, size_t cbLen);
void __cdecl MSN_AvatarsThread(void*);
- void pushAvatarRequest(HCONTACT hContact, LPCSTR pszUrl);
+ void pushAvatarRequest(MCONTACT hContact, LPCSTR pszUrl);
bool loadHttpAvatar(AvatarQueueEntry *p);
/////////////////////////////////////////////////////////////////////////////////////////
@@ -504,7 +504,7 @@ struct CMsnProto : public PROTO<CMsnProto> void processMailData(char* mailData);
void sttNotificationMessage(char* msgBody, bool isInitial);
- void displayEmailCount(HCONTACT hContact);
+ void displayEmailCount(MCONTACT hContact);
/////////////////////////////////////////////////////////////////////////////////////////
// MSN SOAP Address Book
@@ -526,7 +526,7 @@ struct CMsnProto : public PROTO<CMsnProto> ezxml_t abSoapHdr(const char* service, const char* scenario, ezxml_t& tbdy, char*& httphdr);
char* GetABHost(const char* service, bool isSharing);
- void SetAbParam(HCONTACT hContact, const char *name, const char *par);
+ void SetAbParam(MCONTACT hContact, const char *name, const char *par);
void UpdateABHost(const char* service, const char* url);
void UpdateABCacheKey(ezxml_t bdy, bool isSharing);
@@ -560,11 +560,11 @@ struct CMsnProto : public PROTO<CMsnProto> //////////////////////////////////////////////////////////////////////////////////////
- TCHAR* GetContactNameT(HCONTACT hContact);
+ TCHAR* GetContactNameT(MCONTACT hContact);
- int getStringUtf(HCONTACT hContact, const char* name, DBVARIANT* result);
+ int getStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result);
int getStringUtf(const char* name, DBVARIANT* result);
- void setStringUtf(HCONTACT hContact, const char* name, const char* value);
+ void setStringUtf(MCONTACT hContact, const char* name, const char* value);
};
extern OBJLIST<CMsnProto> g_Instances;
diff --git a/protocols/MSN/src/msn_soapab.cpp b/protocols/MSN/src/msn_soapab.cpp index 5f528760f0..7545a1d7d7 100644 --- a/protocols/MSN/src/msn_soapab.cpp +++ b/protocols/MSN/src/msn_soapab.cpp @@ -609,7 +609,7 @@ bool CMsnProto::MSN_SharingMyProfile(bool allowRecurse) }
-void CMsnProto::SetAbParam(HCONTACT hContact, const char *name, const char *par)
+void CMsnProto::SetAbParam(MCONTACT hContact, const char *name, const char *par)
{
if (*par) setStringUtf(hContact, name, (char*)par);
// else delSetting(hContact, "FirstName");
@@ -814,7 +814,7 @@ bool CMsnProto::MSN_ABFind(const char* szMethod, const char* szGuid, bool deltas // Depricated in WLM 8.1
// const char* szNick = ezxml_txt(ezxml_child(contInf, "displayName"));
// if (*szNick == '\0') szNick = szEmail;
- HCONTACT hContact = MSN_HContactFromEmail(szEmail, szEmail, true, false);
+ MCONTACT hContact = MSN_HContactFromEmail(szEmail, szEmail, true, false);
// setStringUtf(hContact, "Nick", (char*)szNick);
if (MyOptions.ManageServer)
@@ -1555,7 +1555,7 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in else
{
MSN_ABAddRemoveContact(szContId, NETID_MSN, true);
- HCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick ? szNick : szEmail, true, false);
+ MCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick ? szNick : szEmail, true, false);
setString(hContact, "ID", szContId);
}
status = 0;
@@ -1590,7 +1590,7 @@ unsigned CMsnProto::MSN_ABContactAdd(const char* szEmail, const char* szNick, in }
else
{
- HCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick ? szNick : szEmail, true, false);
+ MCONTACT hContact = MSN_HContactFromEmail(szEmail, szNick ? szNick : szEmail, true, false);
setString(hContact, "ID", szContId);
}
}
diff --git a/protocols/MSN/src/msn_srv.cpp b/protocols/MSN/src/msn_srv.cpp index 472e7fafd8..5d655a2d31 100644 --- a/protocols/MSN/src/msn_srv.cpp +++ b/protocols/MSN/src/msn_srv.cpp @@ -133,7 +133,7 @@ void CMsnProto::MSN_SetGroupName(const char* pId, const char* pNewName) /////////////////////////////////////////////////////////////////////////////////////////
// MSN_MoveContactToGroup - sends a contact to the specified group
-void CMsnProto::MSN_MoveContactToGroup(HCONTACT hContact, const char* grpName)
+void CMsnProto::MSN_MoveContactToGroup(MCONTACT hContact, const char* grpName)
{
if (!MyOptions.ManageServer) return;
@@ -251,7 +251,7 @@ void CMsnProto::MSN_UploadServerGroups(char* group) // if contact in multiple server groups it get removed from all of them other them it's
// in or the last one
-void CMsnProto::MSN_SyncContactToServerGroup(HCONTACT hContact, const char* szContId, ezxml_t cgrp)
+void CMsnProto::MSN_SyncContactToServerGroup(MCONTACT hContact, const char* szContId, ezxml_t cgrp)
{
if (!MyOptions.ManageServer) return;
diff --git a/protocols/MSN/src/msn_std.cpp b/protocols/MSN/src/msn_std.cpp index 78655c0035..b6e2163e4d 100644 --- a/protocols/MSN/src/msn_std.cpp +++ b/protocols/MSN/src/msn_std.cpp @@ -26,7 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /////////////////////////////////////////////////////////////////////////////////////////
// Standard functions
-int CMsnProto::getStringUtf(HCONTACT hContact, const char* name, DBVARIANT* result)
+int CMsnProto::getStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result)
{ return db_get_utf(hContact, m_szModuleName, name, result);
}
@@ -34,13 +34,13 @@ int CMsnProto::getStringUtf(const char* name, DBVARIANT* result) { return db_get_utf(NULL, m_szModuleName, name, result);
}
-void CMsnProto::setStringUtf(HCONTACT hContact, const char* name, const char* value)
+void CMsnProto::setStringUtf(MCONTACT hContact, const char* name, const char* value)
{ db_set_utf(hContact, m_szModuleName, name, value);
}
/////////////////////////////////////////////////////////////////////////////////////////
-TCHAR* CMsnProto::GetContactNameT(HCONTACT hContact)
+TCHAR* CMsnProto::GetContactNameT(MCONTACT hContact)
{
if (hContact)
return (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR);
diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 73a74e0670..f19cbc0dec 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -246,7 +246,7 @@ INT_PTR CMsnProto::SendNudge(WPARAM wParam, LPARAM lParam) {
if (!msnLoggedIn) return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char tEmail[MSN_MAX_EMAIL_LEN];
if (MSN_IsMeByContact(hContact, tEmail)) return 0;
@@ -380,7 +380,7 @@ INT_PTR CMsnProto::SetCurrentMedia(WPARAM wParam, LPARAM lParam) int CMsnProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if (!msnLoggedIn) //should never happen for MSN contacts
return 0;
@@ -424,7 +424,7 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) {
if (!msnLoggedIn || !MyOptions.ManageServer) return 0;
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
const CLISTGROUPCHANGE* grpchg = (CLISTGROUPCHANGE*)lParam;
if (hContact == NULL)
@@ -458,7 +458,7 @@ int CMsnProto::OnGroupChange(WPARAM wParam,LPARAM lParam) int CMsnProto::OnDbSettingChanged(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING* cws = (DBCONTACTWRITESETTING*)lParam;
if (!msnLoggedIn)
@@ -619,7 +619,7 @@ INT_PTR CMsnProto::GetUnreadEmailCount(WPARAM wParam, LPARAM lParam) INT_PTR CMsnProto::OnLeaveChat(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (isChatRoom(hContact) != 0) {
DBVARIANT dbv;
if (getTString(hContact, "ChatRoomID", &dbv) == 0) {
diff --git a/protocols/MSN/src/msn_switchboard.cpp b/protocols/MSN/src/msn_switchboard.cpp index 582ea94452..4ff32a7938 100644 --- a/protocols/MSN/src/msn_switchboard.cpp +++ b/protocols/MSN/src/msn_switchboard.cpp @@ -47,7 +47,7 @@ int ThreadData::contactLeft(const char* email) return mJoinedContactsWLID.getCount();
}
-HCONTACT ThreadData::getContactHandle(void)
+MCONTACT ThreadData::getContactHandle(void)
{
return mJoinedContactsWLID.getCount() ? proto->MSN_HContactFromEmail(mJoinedContactsWLID[0]) : NULL;
}
diff --git a/protocols/MSN/src/msn_threads.cpp b/protocols/MSN/src/msn_threads.cpp index 5abc87ed2a..057f694311 100644 --- a/protocols/MSN/src/msn_threads.cpp +++ b/protocols/MSN/src/msn_threads.cpp @@ -552,7 +552,7 @@ ThreadData* CMsnProto::MSN_StartSB(const char* wlid, bool& isOffline) ThreadData* thread = MSN_GetThreadByContact(wlid);
if (thread == NULL)
{
- HCONTACT hContact = MSN_HContactFromEmail(wlid);
+ MCONTACT hContact = MSN_HContactFromEmail(wlid);
WORD wStatus = getWord(hContact, "Status", ID_STATUS_OFFLINE);
if (wStatus != ID_STATUS_OFFLINE)
{
@@ -664,7 +664,7 @@ ThreadData::~ThreadData() for (i=0; i<mJoinedContactsWLID.getCount(); ++i)
{
const char* wlid = mJoinedContactsWLID[i];
- HCONTACT hContact = proto->MSN_HContactFromEmail(wlid);
+ MCONTACT hContact = proto->MSN_HContactFromEmail(wlid);
int temp_status = proto->getWord(hContact, "Status", ID_STATUS_OFFLINE);
if (temp_status == ID_STATUS_INVISIBLE && proto->MSN_GetThreadByContact(wlid) == NULL)
proto->setWord(hContact, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/MSN/src/msn_ws.cpp b/protocols/MSN/src/msn_ws.cpp index 95f0ba5cea..22a4cbc0aa 100644 --- a/protocols/MSN/src/msn_ws.cpp +++ b/protocols/MSN/src/msn_ws.cpp @@ -67,7 +67,7 @@ bool ThreadData::isTimeout(void) }
else if (mJoinedContactsWLID.getCount() <= 1 || mChatID[0] == 0)
{
- HCONTACT hContact = getContactHandle();
+ MCONTACT hContact = getContactHandle();
if (mJoinedContactsWLID.getCount() == 0 || termPending)
res = true;
@@ -96,7 +96,7 @@ bool ThreadData::isTimeout(void) if (proto->getByte("EnableSessionPopup", 0))
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
if (mJoinedContactsWLID.getCount())
hContact = proto->MSN_HContactFromEmail(mJoinedContactsWLID[0]);
else if (mInitialContactWLID)
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp index f9d1c75b0a..a51eb4542f 100644 --- a/protocols/Omegle/src/chat.cpp +++ b/protocols/Omegle/src/chat.cpp @@ -361,12 +361,12 @@ void OmegleProto::ClearChat() }
// TODO: Could this be done better?
-HCONTACT OmegleProto::GetChatHandle()
+MCONTACT OmegleProto::GetChatHandle()
{
/*if (facy.chatHandle_ != NULL)
return facy.chatHandle_;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
if (id != NULL && !strcmp(id, m_szModuleName))
diff --git a/protocols/Omegle/src/messages.cpp b/protocols/Omegle/src/messages.cpp index e98fa84271..4ec6ef36fe 100644 --- a/protocols/Omegle/src/messages.cpp +++ b/protocols/Omegle/src/messages.cpp @@ -79,7 +79,7 @@ void OmegleProto::StopChatWorker(void*p) StopChat();
}
-int OmegleProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int OmegleProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
// TODO: msg comes as Unicode (retyped wchar_t*), why should we convert it as ANSI to UTF-8? o_O
/* if ( flags & PREF_UNICODE )
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp index ef213f5066..29612b1a75 100644 --- a/protocols/Omegle/src/proto.cpp +++ b/protocols/Omegle/src/proto.cpp @@ -82,7 +82,7 @@ OmegleProto::~OmegleProto( ) //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR OmegleProto::GetCaps( int type, HCONTACT hContact )
+DWORD_PTR OmegleProto::GetCaps( int type, MCONTACT hContact )
{
switch(type) {
case PFLAGNUM_1:
@@ -210,7 +210,7 @@ int OmegleProto::OnPreShutdown(WPARAM wParam,LPARAM lParam) int OmegleProto::OnContactDeleted(WPARAM wparam,LPARAM)
{
- //HCONTACT hContact = (HCONTACT)wparam;
+ //MCONTACT hContact = (MCONTACT)wparam;
OnLeaveChat(NULL, NULL);
return 0;
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h index f274dc0174..7e8ce70cad 100644 --- a/protocols/Omegle/src/proto.h +++ b/protocols/Omegle/src/proto.h @@ -44,23 +44,23 @@ public: }
// PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const PROTOCHAR* szReason );
- virtual int __cdecl AuthRecv( HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest( HCONTACT hContact, const PROTOCHAR* szMessage );
+ virtual int __cdecl AuthRecv( MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest( MCONTACT hContact, const PROTOCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow( HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel( HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny( HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow( MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel( MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny( MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo( HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo( MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
@@ -68,24 +68,24 @@ public: virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts( HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile( HCONTACT hContact, PROTOFILEEVENT* );
- virtual int __cdecl RecvMsg( HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl( HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts( MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile( MCONTACT hContact, PROTOFILEEVENT* );
+ virtual int __cdecl RecvMsg( MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl( MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts( HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList );
- virtual HANDLE __cdecl SendFile( HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles );
- virtual int __cdecl SendMsg( HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl( HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts( MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList );
+ virtual HANDLE __cdecl SendFile( MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles );
+ virtual int __cdecl SendMsg( MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl( MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode( HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode( MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg( HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg( HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg( MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg( MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int iStatus, const PROTOCHAR* msg );
- virtual int __cdecl UserIsTyping( HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping( MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam );
@@ -132,7 +132,7 @@ public: void SetChatStatus(int);
void ClearChat();
void SetTopic(const TCHAR *topic = NULL);
- HCONTACT GetChatHandle();
+ MCONTACT GetChatHandle();
// Connection client
Omegle_client facy;
diff --git a/protocols/Omegle/src/stubs.cpp b/protocols/Omegle/src/stubs.cpp index 1f8c085547..897ab43de3 100644 --- a/protocols/Omegle/src/stubs.cpp +++ b/protocols/Omegle/src/stubs.cpp @@ -22,12 +22,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "common.h"
-HCONTACT OmegleProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT OmegleProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
return NULL;
};
-HCONTACT OmegleProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT OmegleProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
};
@@ -42,12 +42,12 @@ int OmegleProto::AuthDeny(HANDLE hDbEvent,const PROTOCHAR *reason) return 1;
}
-int OmegleProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
+int OmegleProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
+int OmegleProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message)
{
return 1;
}
@@ -57,17 +57,17 @@ HANDLE OmegleProto::ChangeInfo(int type,void *info_data) return NULL;
}
-HANDLE OmegleProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
+HANDLE OmegleProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
return NULL;
}
-int OmegleProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
+int OmegleProto::FileCancel(MCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int OmegleProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
+int OmegleProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
return 1;
}
@@ -77,7 +77,7 @@ int OmegleProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filen return 1;
}
-int OmegleProto::GetInfo( HCONTACT hContact, int infoType )
+int OmegleProto::GetInfo( MCONTACT hContact, int infoType )
{
return 1;
}
@@ -107,47 +107,47 @@ HWND OmegleProto::CreateExtendedSearchUI(HWND owner) return NULL;
}
-int OmegleProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
+int OmegleProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
+int OmegleProto::RecvFile(MCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int OmegleProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
+int OmegleProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::SendContacts(HCONTACT hContact,int flags,int nContacts,HCONTACT *hContactsList)
+int OmegleProto::SendContacts(MCONTACT hContact,int flags,int nContacts,MCONTACT *hContactsList)
{
return 1;
}
-HANDLE OmegleProto::SendFile(HCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE OmegleProto::SendFile(MCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
return NULL;
}
-int OmegleProto::SendUrl(HCONTACT hContact,int flags,const char *url)
+int OmegleProto::SendUrl(MCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int OmegleProto::SetApparentMode(HCONTACT hContact,int mode)
+int OmegleProto::SetApparentMode(MCONTACT hContact,int mode)
{
return 1;
}
-int OmegleProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int OmegleProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
-int OmegleProto::UserIsTyping(HCONTACT hContact, int type)
+int OmegleProto::UserIsTyping(MCONTACT hContact, int type)
{
return 1;
}
@@ -157,12 +157,12 @@ int OmegleProto::SetAwayMsg(int iStatus, const PROTOCHAR* msg) return 1;
}
-HANDLE OmegleProto::GetAwayMsg( HCONTACT hContact )
+HANDLE OmegleProto::GetAwayMsg( MCONTACT hContact )
{
return NULL;
}
-int OmegleProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int OmegleProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
return 1;
}
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp index 78e1f9d135..c9b41d93ec 100644 --- a/protocols/Omegle/src/theme.cpp +++ b/protocols/Omegle/src/theme.cpp @@ -47,7 +47,7 @@ HANDLE GetIconHandle(const char* name) }
// Helper functions
-static OmegleProto * GetInstanceByHContact(HCONTACT hContact)
+static OmegleProto * GetInstanceByHContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if (!proto)
diff --git a/protocols/Skype/src/skype_avatars.cpp b/protocols/Skype/src/skype_avatars.cpp index 0ff7d40b56..25db2a32df 100644 --- a/protocols/Skype/src/skype_avatars.cpp +++ b/protocols/Skype/src/skype_avatars.cpp @@ -1,6 +1,6 @@ #include "skype.h"
-bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact)
+bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, MCONTACT hContact)
{
bool result = false;
@@ -21,7 +21,7 @@ bool CSkypeProto::IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact) return result;
}
-wchar_t * CSkypeProto::GetContactAvatarFilePath(HCONTACT hContact)
+wchar_t * CSkypeProto::GetContactAvatarFilePath(MCONTACT hContact)
{
TCHAR path[MAX_PATH];
::mir_sntprintf(path, SIZEOF(path), _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), this->m_szModuleName);
diff --git a/protocols/Skype/src/skype_blocked.cpp b/protocols/Skype/src/skype_blocked.cpp index a7c96da731..b807f95059 100644 --- a/protocols/Skype/src/skype_blocked.cpp +++ b/protocols/Skype/src/skype_blocked.cpp @@ -3,7 +3,7 @@ int CSkypeProto::BlockCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
@@ -143,7 +143,7 @@ LRESULT CALLBACK CSkypeProto::SkypeBlockedOptionsSubProc(HWND hwnd, UINT msg, WP param->contact->GetIdentity(data);
ptrW sid(::mir_utf8decodeW(data));
- HCONTACT hContact = param->ppro->GetContactBySid(sid);
+ MCONTACT hContact = param->ppro->GetContactBySid(sid);
if (::db_get_b(hContact, param->ppro->m_szModuleName, "IsSkypeOut", 0) > 0)
::db_set_w(hContact, param->ppro->m_szModuleName, "Status", ID_STATUS_ONTHEPHONE);
@@ -252,7 +252,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP }
///
int nItem = 0;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
::EnterCriticalSection(&ppro->contact_search_lock);
@@ -296,7 +296,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeBlockedOptionsProc(HWND hwndDlg, UINT msg, WP {
int i = ::SendMessage(::GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETCURSEL, 0, 0);
- HCONTACT hContact = (HCONTACT)::SendMessage(GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETITEMDATA, i, 0);
+ MCONTACT hContact = (MCONTACT)::SendMessage(GetDlgItem(hwndDlg, IDC_CONTACTS), CB_GETITEMDATA, i, 0);
if ( !hContact)
break;
diff --git a/protocols/Skype/src/skype_chat.cpp b/protocols/Skype/src/skype_chat.cpp index e0f76365c2..dc9845b6c6 100644 --- a/protocols/Skype/src/skype_chat.cpp +++ b/protocols/Skype/src/skype_chat.cpp @@ -140,7 +140,7 @@ ChatRoom::~ChatRoom() this->members.destroy();
}
-HCONTACT ChatRoom::GetContactHandle() const
+MCONTACT ChatRoom::GetContactHandle() const
{
return this->hContact;
}
@@ -982,7 +982,7 @@ void ChatRoom::OnParticipantChanged(const ParticipantRef &participant, int prop) ///
-void CSkypeProto::ChatValidateContact(HCONTACT hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatValidateContact(MCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (this->IsProtoContact(hItem) && !this->isChatRoom(hItem))
{
@@ -994,16 +994,16 @@ void CSkypeProto::ChatValidateContact(HCONTACT hItem, HWND hwndList, const Strin ::SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-void CSkypeProto::ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts)
+void CSkypeProto::ChatPrepare(MCONTACT hItem, HWND hwndList, const StringList &contacts)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
- HCONTACT hItemN = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
this->ChatPrepare(hItemT, hwndList, contacts);
}
@@ -1014,14 +1014,14 @@ void CSkypeProto::ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &c }
}
-void CSkypeProto::GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &chatTargets)
+void CSkypeProto::GetInvitedContacts(MCONTACT hItem, HWND hwndList, StringList &chatTargets)
{
if (hItem == NULL)
- hItem = (HCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)::SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
this->GetInvitedContacts(hItemT, hwndList, chatTargets);
}
@@ -1040,7 +1040,7 @@ void CSkypeProto::GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList & }
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
}
@@ -1088,7 +1088,7 @@ INT_PTR CALLBACK CSkypeProto::ChatRoomProc(HWND hwndDlg, UINT msg, WPARAM wParam switch (nmc->hdr.code) {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- param->ppro->ChatValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
+ param->ppro->ChatValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->invitedContacts);
break;
case CLN_LISTREBUILT:
@@ -1192,7 +1192,7 @@ INT_PTR CSkypeProto::CreateChatRoomCommand(WPARAM, LPARAM) return 0;
}
-void CSkypeProto::ChatRoomInvite(HCONTACT hContact)
+void CSkypeProto::ChatRoomInvite(MCONTACT hContact)
{
ptrT chat_id(::db_get_tsa(hContact, this->m_szModuleName, "ChatRoomID"));
@@ -1384,7 +1384,7 @@ int __cdecl CSkypeProto::OnGCEventHook(WPARAM, LPARAM lParam) case CHAT_LIST_MENU::ICM_COPY_SID:
{
- HCONTACT hContact = this->GetContactBySid(gch->ptszUID);
+ MCONTACT hContact = this->GetContactBySid(gch->ptszUID);
if (!hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
@@ -1456,7 +1456,7 @@ int __cdecl CSkypeProto::OnGCMenuHook(WPARAM, LPARAM lParam) if (member->GetRank() > Participant::SPECTATOR)
DisableChatMenuItem(ICM_ROLE);
- HCONTACT hContact = this->GetContactBySid(gcmi->pszUID);
+ MCONTACT hContact = this->GetContactBySid(gcmi->pszUID);
if (hContact == NULL)
DisableChatMenuItem(ICM_DETAILS);
else if(this->getByte(hContact, "Auth", 0) == 0)
@@ -1539,7 +1539,7 @@ void CSkypeProto::UpdateChatUserNick(const ContactRef &contact) INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
@@ -1567,7 +1567,7 @@ INT_PTR __cdecl CSkypeProto::OnJoinChat(WPARAM wParam, LPARAM) INT_PTR __cdecl CSkypeProto::OnLeaveChat(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
ptrW cid(::db_get_wsa(hContact, this->m_szModuleName, "ChatRoomID"));
diff --git a/protocols/Skype/src/skype_chat.h b/protocols/Skype/src/skype_chat.h index e5e775f980..d63d7c9da2 100644 --- a/protocols/Skype/src/skype_chat.h +++ b/protocols/Skype/src/skype_chat.h @@ -129,7 +129,7 @@ private: CConversation::Ref conversation;
- HCONTACT hContact;
+ MCONTACT hContact;
OBJLIST<ChatMember> members;
@@ -158,7 +158,7 @@ public: ChatRoom(const wchar_t *cid, const wchar_t *name, CSkypeProto *ppro);
~ChatRoom();
- HCONTACT GetContactHandle() const;
+ MCONTACT GetContactHandle() const;
void SetTopic(const wchar_t *topic);
wchar_t *GetUri();
diff --git a/protocols/Skype/src/skype_contacts.cpp b/protocols/Skype/src/skype_contacts.cpp index 325d70f508..9638676e83 100644 --- a/protocols/Skype/src/skype_contacts.cpp +++ b/protocols/Skype/src/skype_contacts.cpp @@ -1,6 +1,6 @@ #include "skype.h"
-void CSkypeProto::UpdateContactAuthState(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactAuthState(MCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropAuthreqTimestamp(newTS);
@@ -23,7 +23,7 @@ void CSkypeProto::UpdateContactAuthState(HCONTACT hContact, const ContactRef &co }
}
-void CSkypeProto::UpdateContactStatus(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactStatus(MCONTACT hContact, const ContactRef &contact)
{
Contact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
@@ -40,7 +40,7 @@ void CSkypeProto::UpdateContactStatus(HCONTACT hContact, const ContactRef &conta }
}
-void CSkypeProto::UpdateContactClient(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactClient(MCONTACT hContact, const ContactRef &contact)
{
bool isMobile = false;
contact->HasCapability(Contact::CAPABILITY_MOBILE_DEVICE, isMobile/*, true*/);
@@ -48,7 +48,7 @@ void CSkypeProto::UpdateContactClient(HCONTACT hContact, const ContactRef &conta this->setTString(hContact, "MirVer", isMobile ? L"SkypeMobile" : L"Skype");
}
-void CSkypeProto::UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactOnlineSinceTime(MCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropLastonlineTimestamp(newTS);
@@ -57,7 +57,7 @@ void CSkypeProto::UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactR this->setDword(hContact, "OnlineSinceTS", newTS);
}
-void CSkypeProto::UpdateContactLastEventDate(HCONTACT hContact, const ContactRef &contact)
+void CSkypeProto::UpdateContactLastEventDate(MCONTACT hContact, const ContactRef &contact)
{
uint newTS = 0;
contact->GetPropLastusedTimestamp(newTS);
@@ -71,7 +71,7 @@ void CSkypeProto::OnContactChanged(const ContactRef &contact, int prop) SEString data;
contact->GetPropSkypename(data);
wchar_t *sid = ::mir_utf8decodeW(data);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
::mir_free(sid);
SEObject *contactObj = contact.fetch();
@@ -148,14 +148,14 @@ void CSkypeProto::OnContactListChanged(const ContactRef &contact) }
}
-bool CSkypeProto::IsProtoContact(HCONTACT hContact)
+bool CSkypeProto::IsProtoContact(MCONTACT hContact)
{
return ::lstrcmpiA(::GetContactProto(hContact), this->m_szModuleName) == 0;
}
-HCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid)
+MCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid)
{
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
::EnterCriticalSection(&this->contact_search_lock);
@@ -171,7 +171,7 @@ HCONTACT CSkypeProto::GetContactBySid(const wchar_t *sid) return hContact;
}
-HCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
+MCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent)
{
// db_event_getContact
DWORD body[3];
@@ -180,28 +180,28 @@ HCONTACT CSkypeProto::GetContactFromAuthEvent(HANDLE hEvent) dbei.pBlob = (PBYTE)&body;
if (::db_event_get(hEvent, &dbei))
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (dbei.eventType != EVENTTYPE_AUTHREQUEST)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
if (strcmp(dbei.szModule, this->m_szModuleName) != 0)
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return INVALID_CONTACT_ID;
return ::DbGetAuthEventContact(&dbei);
}
-HCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
+MCONTACT CSkypeProto::AddContact(CContact::Ref contact, bool isTemporary)
{
ptrW sid(::mir_utf8decodeW(contact->GetSid()));
CContact::AVAILABILITY availability;
contact->GetPropAvailability(availability);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
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)this->m_szModuleName);
ptrW nick(::mir_utf8decodeW(contact->GetNick()));
@@ -255,7 +255,7 @@ void __cdecl CSkypeProto::LoadContactList(void* data) {
CContact::Ref contact = this->contactList[i];
- HCONTACT hContact = this->AddContact(contact);
+ MCONTACT hContact = this->AddContact(contact);
if ( !isFirstLoad)
{
@@ -293,7 +293,7 @@ void __cdecl CSkypeProto::LoadAuthWaitList(void*) }
}
-bool CSkypeProto::IsContactOnline(HCONTACT hContact)
+bool CSkypeProto::IsContactOnline(MCONTACT hContact)
{
return this->getWord(hContact, SKYPE_SETTINGS_STATUS, ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE;
}
@@ -302,7 +302,7 @@ void CSkypeProto::SetAllContactStatus(int status) {
::EnterCriticalSection(&this->contact_search_lock);
- for (HCONTACT hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
+ for (MCONTACT hContact = ::db_find_first(this->m_szModuleName); hContact; hContact = ::db_find_next(hContact, this->m_szModuleName))
{
if (this->getByte(hContact, "IsSkypeOut", 0) != 0)
continue;
@@ -355,7 +355,7 @@ void __cdecl CSkypeProto::SearchBySidAsync(void* arg) {
mir_ptr<wchar_t> sid((wchar_t*)arg);
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
if (hContact)
{
this->ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact);
@@ -462,7 +462,7 @@ void CSkypeProto::OnContactsReceived(const ConversationRef &conversation, const CContact::Ref author;
this->GetContact(data, author);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT hContact = this->AddContact(author);
SEBinary guid;
message->GetPropGuid(guid);
@@ -518,7 +518,7 @@ void CSkypeProto::OnContactsSent(const ConversationRef &conversation, const Mess CContact::Ref receiver;
this->GetContact(data, receiver);
- HCONTACT hContact = this->AddContact(receiver);
+ MCONTACT hContact = this->AddContact(receiver);
this->SendBroadcast(
hContact,
ACKTYPE_CONTACTS,
diff --git a/protocols/Skype/src/skype_database.cpp b/protocols/Skype/src/skype_database.cpp index 2390897d10..11caa48001 100644 --- a/protocols/Skype/src/skype_database.cpp +++ b/protocols/Skype/src/skype_database.cpp @@ -1,6 +1,6 @@ #include "skype.h"
-bool CSkypeProto::IsMessageInDB(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag)
+bool CSkypeProto::IsMessageInDB(MCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag)
{
for (HANDLE hDbEvent = ::db_event_last(hContact); hDbEvent; hDbEvent = ::db_event_prev(hDbEvent))
{
@@ -25,7 +25,7 @@ bool CSkypeProto::IsMessageInDB(HCONTACT hContact, DWORD timestamp, SEBinary &gu return false;
}
-HANDLE CSkypeProto::AddDBEvent(HCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
+HANDLE CSkypeProto::AddDBEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWORD flags, DWORD cbBlob, PBYTE pBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = this->m_szModuleName;
@@ -52,7 +52,7 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact) char *firstName = ::mir_strdup(data);
char *lastName = ::mir_strdup(last);
- HCONTACT hContact = this->AddContact(contact);
+ MCONTACT hContact = this->AddContact(contact);
/*blob is: 0(DWORD), hContact(DWORD), nick(ASCIIZ), firstName(ASCIIZ), lastName(ASCIIZ), sid(ASCIIZ), reason(ASCIIZ)*/
DWORD cbBlob = (DWORD)
@@ -84,7 +84,7 @@ void CSkypeProto::RaiseAuthRequestEvent(DWORD timestamp, CContact::Ref contact) this->AddDBEvent(hContact, EVENTTYPE_AUTHREQUEST, time(NULL), DBEF_UTF, cbBlob, pBlob);
}
-void CSkypeProto::RaiseMessageSentEvent(HCONTACT hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnread)
+void CSkypeProto::RaiseMessageSentEvent(MCONTACT hContact, DWORD timestamp, SEBinary &guid, const char *message, bool isUnread)
{
if (this->IsMessageInDB(hContact, timestamp, guid, DBEF_SENT))
return;
diff --git a/protocols/Skype/src/skype_dialogs.cpp b/protocols/Skype/src/skype_dialogs.cpp index b0dd1f5802..8aaa3bf433 100644 --- a/protocols/Skype/src/skype_dialogs.cpp +++ b/protocols/Skype/src/skype_dialogs.cpp @@ -403,7 +403,7 @@ INT_PTR CALLBACK CSkypeProto::SkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam break;
char *szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL)
szProto = ppro->m_szModuleName;
@@ -780,7 +780,7 @@ INT_PTR CALLBACK CSkypeProto::HomeSkypeDlgProc(HWND hwndDlg, UINT msg, WPARAM wP }
}
- tmi.prepareList((HCONTACT)lParam, ::GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
+ tmi.prepareList((MCONTACT)lParam, ::GetDlgItem(hwndDlg, IDC_TIMEZONE), TZF_PLF_CB);
HANDLE hTimeZone = tmi.createByContact ? tmi.createByContact(NULL, 0) : 0;
LPCTSTR TzDescr = tmi.getTzDescription(tmi.getTzName(hTimeZone));
::SetDlgItemText(hwndDlg, IDC_TIMEZONE, TzDescr);
diff --git a/protocols/Skype/src/skype_events.cpp b/protocols/Skype/src/skype_events.cpp index 7e399ba829..5d36c697e1 100644 --- a/protocols/Skype/src/skype_events.cpp +++ b/protocols/Skype/src/skype_events.cpp @@ -65,7 +65,7 @@ int CSkypeProto::OnPreShutdown(WPARAM, LPARAM) int CSkypeProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
if (this->isChatRoom(hContact))
@@ -128,7 +128,7 @@ int __cdecl CSkypeProto::OnOptionsInit(WPARAM wParam, LPARAM lParam) int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam)
{
- if ((!this->IsProtoContact((HCONTACT)lParam)) && lParam)
+ if ((!this->IsProtoContact((MCONTACT)lParam)) && lParam)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
@@ -138,7 +138,7 @@ int __cdecl CSkypeProto::OnUserInfoInit(WPARAM wParam, LPARAM lParam) odp.position = -1900000000;
odp.ptszTitle = this->m_tszUserName;
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
if (hContact) {
char *szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (szProto != NULL && !strcmp(szProto, m_szModuleName)) {
@@ -192,7 +192,7 @@ int __cdecl CSkypeProto::OnSrmmWindowOpen(WPARAM, LPARAM lParam) int __cdecl CSkypeProto::OnTabSRMMButtonPressed(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
CustomButtonClickData *cbcd = (CustomButtonClickData *)lParam;
switch (cbcd->dwButtonId)
diff --git a/protocols/Skype/src/skype_instances.cpp b/protocols/Skype/src/skype_instances.cpp index 264f6e14c2..7a571d243b 100644 --- a/protocols/Skype/src/skype_instances.cpp +++ b/protocols/Skype/src/skype_instances.cpp @@ -73,7 +73,7 @@ void CSkypeProto::UninitInstances() instanceList.destroy();
}
-CSkypeProto* CSkypeProto::GetContactInstance(HCONTACT hContact)
+CSkypeProto* CSkypeProto::GetContactInstance(MCONTACT hContact)
{
char *proto = (char *)::CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
diff --git a/protocols/Skype/src/skype_menus.cpp b/protocols/Skype/src/skype_menus.cpp index 52849b5efd..d1ea410511 100644 --- a/protocols/Skype/src/skype_menus.cpp +++ b/protocols/Skype/src/skype_menus.cpp @@ -13,7 +13,7 @@ INT_PTR CSkypeProto::MenuChooseService(WPARAM wParam, LPARAM lParam) int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if ( !hContact)
return 0;
@@ -66,19 +66,19 @@ int CSkypeProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM) template<int (__cdecl CSkypeProto::*Service)(WPARAM, LPARAM)>
INT_PTR GlobalService(WPARAM wParam, LPARAM lParam)
{
- CSkypeProto *ppro = CSkypeProto::GetContactInstance((HCONTACT)wParam);
+ CSkypeProto *ppro = CSkypeProto::GetContactInstance((MCONTACT)wParam);
return ppro ? (ppro->*Service)(wParam, lParam) : 0;
}
int CSkypeProto::RequestAuth(WPARAM wParam, LPARAM lParam)
{
- return this->AuthRequest((HCONTACT)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
+ return this->AuthRequest((MCONTACT)wParam, LPGENT("Hi! I\'d like to add you to my contact list"));
}
int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
if (this->GetContact(sid, contact))
{
@@ -95,7 +95,7 @@ int CSkypeProto::GrantAuth(WPARAM wParam, LPARAM lParam) int CSkypeProto::RevokeAuth(WPARAM wParam, LPARAM lParam)
{
CContact::Ref contact;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
SEString sid(_T2A(::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID)));
if (this->GetContact(sid, contact))
{
@@ -112,7 +112,7 @@ int CSkypeProto::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) for (int i = 0; i < SIZEOF(CSkypeProto::contactMenuItems); i++)
::Menu_ShowItem(CSkypeProto::contactMenuItems[i], false);
- CSkypeProto* ppro = CSkypeProto::GetContactInstance((HCONTACT)wParam);
+ CSkypeProto* ppro = CSkypeProto::GetContactInstance((MCONTACT)wParam);
return (ppro) ? ppro->OnPrebuildContactMenu(wParam, lParam) : 0;
}
diff --git a/protocols/Skype/src/skype_messages.cpp b/protocols/Skype/src/skype_messages.cpp index f82b89cb9e..b212959f98 100644 --- a/protocols/Skype/src/skype_messages.cpp +++ b/protocols/Skype/src/skype_messages.cpp @@ -53,7 +53,7 @@ void CSkypeProto::OnMessageReceived(const ConversationRef &conversation, const M message->GetPropAuthor(data);
this->GetContact(data, author);
- HCONTACT hContact = this->AddContact(author, true);
+ MCONTACT hContact = this->AddContact(author, true);
this->UserIsTyping(hContact, PROTOTYPE_SELFTYPING_OFF);
SEBinary guid;
@@ -103,7 +103,7 @@ void CSkypeProto::OnMessageSent(const ConversationRef &conversation, const Messa ptrW sid(::mir_utf8decodeW(data));
- HCONTACT hContact = this->GetContactBySid(sid);
+ MCONTACT hContact = this->GetContactBySid(sid);
this->SendBroadcast(
hContact,
ACKTYPE_MESSAGE,
@@ -157,7 +157,7 @@ void CSkypeProto::OnMessageEvent(const ConversationRef &conversation, const Mess CContact::Ref author;
this->GetContact(identity, author);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT hContact = this->AddContact(author);
char *message = ::mir_utf8encode(::Translate("Incoming call started"));
@@ -191,7 +191,7 @@ void CSkypeProto::OnMessageEvent(const ConversationRef &conversation, const Mess CContact::Ref author;
this->GetContact(identity, author);
- HCONTACT hContact = this->AddContact(author);
+ MCONTACT hContact = this->AddContact(author);
char *message = ::mir_utf8encode(::Translate("Incoming call finished"));
@@ -222,7 +222,7 @@ void CSkypeProto::SyncMessageHystory(const ConversationRef &conversation, const }
}
-void CSkypeProto::SyncHistoryCommand(HCONTACT hContact, time_t timestamp)
+void CSkypeProto::SyncHistoryCommand(MCONTACT hContact, time_t timestamp)
{
if (hContact)
{
@@ -250,7 +250,7 @@ int CSkypeProto::SyncLastDayHistoryCommand(WPARAM wParam, LPARAM lParam) {
time_t timestamp = time(NULL);
timestamp -= 60*60*24;
- this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
@@ -258,7 +258,7 @@ int CSkypeProto::SyncLastWeekHistoryCommand(WPARAM wParam, LPARAM lParam) {
time_t timestamp = time(NULL);
timestamp -= 60*60*24*7;
- this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
@@ -266,7 +266,7 @@ int CSkypeProto::SyncLastMonthHistoryCommand(WPARAM wParam, LPARAM lParam) {
time_t timestamp = time(NULL);
timestamp -= 60*60*24*30;
- this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
@@ -274,7 +274,7 @@ int CSkypeProto::SyncLast3MonthHistoryCommand(WPARAM wParam, LPARAM lParam) {
time_t timestamp = time(NULL);
timestamp -= 60*60*24*90;
- this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
@@ -282,13 +282,13 @@ int CSkypeProto::SyncLastYearHistoryCommand(WPARAM wParam, LPARAM lParam) {
time_t timestamp = time(NULL);
timestamp -= 60*60*24*365;
- this->SyncHistoryCommand((HCONTACT)wParam, timestamp);
+ this->SyncHistoryCommand((MCONTACT)wParam, timestamp);
return 0;
}
int CSkypeProto::SyncAllTimeHistoryCommand(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact)
{
ptrW sid( ::db_get_wsa(hContact, this->m_szModuleName, SKYPE_SETTINGS_SID));
diff --git a/protocols/Skype/src/skype_profile.cpp b/protocols/Skype/src/skype_profile.cpp index 6c8cb4e96d..0a6686303d 100644 --- a/protocols/Skype/src/skype_profile.cpp +++ b/protocols/Skype/src/skype_profile.cpp @@ -1,7 +1,7 @@ #include "skype.h"
#include <sstream>
-void CSkypeProto::UpdateProfileAvatar(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileAvatar(SEObject *obj, MCONTACT hContact)
{
uint newTS = obj->GetUintProp(/* *::P_AVATAR_TIMESTAMP */ 182);
//if (!newTS) return; //uncomment when skypekit will be work correctly
@@ -50,7 +50,7 @@ void CSkypeProto::UpdateProfileAvatar(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileAboutText(SEObject *obj, MCONTACT hContact)
{
ptrW aboutText(::mir_utf8decodeW(obj->GetStrProp(/* *::P_ABOUT */ 18)));
if ( !::wcslen(aboutText))
@@ -59,7 +59,7 @@ void CSkypeProto::UpdateProfileAboutText(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "About", aboutText);
}
-void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileBirthday(SEObject *obj, MCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_BIRTHDAY */ 7);
if (data > 0)
@@ -96,7 +96,7 @@ void CSkypeProto::UpdateProfileBirthday(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileCity(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileCity(SEObject *obj, MCONTACT hContact)
{
ptrW city(::mir_utf8decodeW(obj->GetStrProp(/* *::P_CITY */ 12)));
if ( !::wcslen(city))
@@ -105,7 +105,7 @@ void CSkypeProto::UpdateProfileCity(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "City", city);
}
-void CSkypeProto::UpdateProfileCountry(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileCountry(SEObject *obj, MCONTACT hContact)
{
char *country;
ptrA isocode(::mir_strdup(obj->GetStrProp(/* *::P_COUNTRY */ 10)));
@@ -118,7 +118,7 @@ void CSkypeProto::UpdateProfileCountry(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileEmails(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileEmails(SEObject *obj, MCONTACT hContact)
{
ptrW emails(::mir_utf8decodeW(obj->GetStrProp(/* *::P_EMAILS */ 16)));
if (::wcscmp(emails, L"") == 0)
@@ -141,7 +141,7 @@ void CSkypeProto::UpdateProfileEmails(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileFullName(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileFullName(SEObject *obj, MCONTACT hContact)
{
ptrW fullname(::mir_utf8decodeW(obj->GetStrProp(/* *::P_FULLNAME */ 5)));
if ( !::wcslen(fullname))
@@ -159,7 +159,7 @@ void CSkypeProto::UpdateProfileFullName(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileGender(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileGender(SEObject *obj, MCONTACT hContact)
{
uint data = obj->GetUintProp(/* *::P_GENDER */ 8);
if (data)
@@ -168,7 +168,7 @@ void CSkypeProto::UpdateProfileGender(SEObject *obj, HCONTACT hContact) this->delSetting(hContact, "Gender");
}
-void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileHomepage(SEObject *obj, MCONTACT hContact)
{
ptrW homepage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_HOMEPAGE */ 17)));
if (::wcscmp(homepage, L"") == 0)
@@ -177,7 +177,7 @@ void CSkypeProto::UpdateProfileHomepage(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Homepage", homepage);
}
-void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileLanguages(SEObject *obj, MCONTACT hContact)
{
ptrW isocodes(::mir_utf8decodeW(obj->GetStrProp(/* *::P_LANGUAGES */ 9)));
@@ -199,7 +199,7 @@ void CSkypeProto::UpdateProfileLanguages(SEObject *obj, HCONTACT hContact) }
}
-void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 15)));
if ( !::wcslen(phone))
@@ -208,7 +208,7 @@ void CSkypeProto::UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Cellular", phone);
}
-void CSkypeProto::UpdateProfileNick(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileNick(SEObject *obj, MCONTACT hContact)
{
ptrW nick;
if (hContact)
@@ -225,7 +225,7 @@ void CSkypeProto::UpdateProfileNick(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Nick", nick);
}
-void CSkypeProto::UpdateProfilePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfilePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_MOBILE */ 13)));
if ( !::wcslen(phone))
@@ -234,7 +234,7 @@ void CSkypeProto::UpdateProfilePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "Phone", phone);
}
-void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, MCONTACT hContact)
{
ptrW phone(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PHONE_OFFICE */ 14)));
if ( !::wcslen(phone))
@@ -243,7 +243,7 @@ void CSkypeProto::UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "CompanyPhone", phone);
}
-void CSkypeProto::UpdateProfileState(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileState(SEObject *obj, MCONTACT hContact)
{
ptrW state(::mir_utf8decodeW(obj->GetStrProp(/* *::P_PROVINCE */ 11)));
if ( !::wcslen(state))
@@ -252,7 +252,7 @@ void CSkypeProto::UpdateProfileState(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "State", state);
}
-void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, MCONTACT hContact)
{
ptrW statusMessage(::mir_utf8decodeW(obj->GetStrProp(/* *::P_MOOD_TEXT */ 26)));
if ( !::wcslen(statusMessage))
@@ -261,7 +261,7 @@ void CSkypeProto::UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact) this->setTString(hContact, "XStatusMsg", statusMessage);
}
-void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfileTimezone(SEObject *obj, MCONTACT hContact)
{
LONG data = obj->GetUintProp(/* *::P_TIMEZONE */ 27);
if (data > 0)
@@ -286,7 +286,7 @@ void CSkypeProto::UpdateProfileTimezone(SEObject *obj, HCONTACT hContact) else this->delSetting(hContact, "Timezone");
}
-void CSkypeProto::UpdateProfile(SEObject *obj, HCONTACT hContact)
+void CSkypeProto::UpdateProfile(SEObject *obj, MCONTACT hContact)
{
this->debugLogW(L"Updating profile for %p", hContact);
this->UpdateProfileAvatar(obj, hContact);
diff --git a/protocols/Skype/src/skype_proto.cpp b/protocols/Skype/src/skype_proto.cpp index c1d745185e..508c0684f9 100644 --- a/protocols/Skype/src/skype_proto.cpp +++ b/protocols/Skype/src/skype_proto.cpp @@ -46,14 +46,14 @@ CSkypeProto::~CSkypeProto() }
}
-HCONTACT __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT __cdecl CSkypeProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
CContact::Ref contact;
this->GetContact((char *)mir_ptr<char>(::mir_utf8encodeW(psr->id)), contact);
return this->AddContact(contact);
}
-HCONTACT __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+MCONTACT __cdecl CSkypeProto::AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
DBEVENTINFO dbei = {0};
dbei.cbSize = sizeof(dbei);
@@ -79,8 +79,8 @@ int __cdecl CSkypeProto::Authorize(HANDLE hDbEvent) {
if (this->IsOnline() && hDbEvent)
{
- HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
return CSkypeProto::GrantAuth((WPARAM)hContact, NULL);
@@ -93,8 +93,8 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) {
if (this->IsOnline())
{
- HCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ MCONTACT hContact = this->GetContactFromAuthEvent(hDbEvent);
+ if (hContact == INVALID_CONTACT_ID)
return 1;
return CSkypeProto::RevokeAuth((WPARAM)hContact, NULL);
@@ -103,7 +103,7 @@ int __cdecl CSkypeProto::AuthDeny(HANDLE hDbEvent, const TCHAR* szReason) return 1;
}
-int __cdecl CSkypeProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
DWORD flags = 0;
@@ -124,7 +124,7 @@ int __cdecl CSkypeProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) return 0;
}
-int __cdecl CSkypeProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+int __cdecl CSkypeProto::AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
if (this->IsOnline() && hContact)
{
@@ -144,7 +144,7 @@ int __cdecl CSkypeProto::AuthRequest(HCONTACT hContact, const TCHAR* szMessage) HANDLE __cdecl CSkypeProto::ChangeInfo( int iInfoType, void* pInfoData ) { return 0; }
-HANDLE __cdecl CSkypeProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath )
+HANDLE __cdecl CSkypeProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath )
{
uint oid = (uint)hTransfer;
@@ -193,7 +193,7 @@ HANDLE __cdecl CSkypeProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const return hTransfer;
}
-int __cdecl CSkypeProto::FileCancel(HCONTACT hContact, HANDLE hTransfer )
+int __cdecl CSkypeProto::FileCancel(MCONTACT hContact, HANDLE hTransfer )
{
uint oid = (uint)hTransfer;
@@ -217,7 +217,7 @@ int __cdecl CSkypeProto::FileCancel(HCONTACT hContact, HANDLE hTransfer ) return 1;
}
-int __cdecl CSkypeProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason )
+int __cdecl CSkypeProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason )
{
uint oid = (uint)hTransfer;
@@ -292,7 +292,7 @@ int __cdecl CSkypeProto::FileResume( HANDLE hTransfer, int* action, const TCH return 0;
}
-DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, MCONTACT hContact)
{
switch(type)
{
@@ -318,7 +318,7 @@ DWORD_PTR __cdecl CSkypeProto:: GetCaps(int type, HCONTACT hContact) }
}
-int __cdecl CSkypeProto::GetInfo(HCONTACT hContact, int infoType ) { return 0; }
+int __cdecl CSkypeProto::GetInfo(MCONTACT hContact, int infoType ) { return 0; }
HANDLE __cdecl CSkypeProto::SearchBasic(const TCHAR* id)
{
@@ -358,7 +358,7 @@ HWND __cdecl CSkypeProto::SearchAdvanced( HWND owner ) { return 0; } HWND __cdecl CSkypeProto::CreateExtendedSearchUI( HWND owner ){ return 0; }
-int __cdecl CSkypeProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming contacts");
::db_unset(hContact, "CList", "Hidden");
@@ -372,14 +372,14 @@ int __cdecl CSkypeProto::RecvContacts(HCONTACT hContact, PROTORECVEVENT* pre) (PBYTE)pre->szMessage);
}
-int __cdecl CSkypeProto::RecvFile(HCONTACT hContact, PROTORECVFILET* pre)
+int __cdecl CSkypeProto::RecvFile(MCONTACT hContact, PROTORECVFILET* pre)
{
this->debugLogW(L"Incoming file transfer");
::db_unset(hContact, "CList", "Hidden");
return ::Proto_RecvFile(hContact, pre);
}
-int __cdecl CSkypeProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CSkypeProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
this->debugLogW(L"Incoming message");
::db_unset(hContact, "CList", "Hidden");
@@ -401,9 +401,9 @@ int __cdecl CSkypeProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) (PBYTE)message);
}
-int __cdecl CSkypeProto::RecvUrl(HCONTACT hContact, PROTORECVEVENT *) { return 0; }
+int __cdecl CSkypeProto::RecvUrl(MCONTACT hContact, PROTORECVEVENT *) { return 0; }
-int __cdecl CSkypeProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int __cdecl CSkypeProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
if (this->IsOnline() && hContact && hContactsList)
{
@@ -454,7 +454,7 @@ int __cdecl CSkypeProto::SendContacts(HCONTACT hContact, int flags, int nContact return 0;
}
-HANDLE __cdecl CSkypeProto::SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
+HANDLE __cdecl CSkypeProto::SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles)
{
if (this->IsOnline() && hContact && ppszFiles)
{
@@ -525,7 +525,7 @@ HANDLE __cdecl CSkypeProto::SendFile(HCONTACT hContact, const TCHAR *szDescripti return 0;
}
-int __cdecl CSkypeProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int __cdecl CSkypeProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
this->debugLogW(L"Outcoming message");
SEStringList targets;
@@ -546,9 +546,9 @@ int __cdecl CSkypeProto::SendMsg(HCONTACT hContact, int flags, const char *msg) return 0;
}
-int __cdecl CSkypeProto::SendUrl(HCONTACT hContact, int flags, const char *url) { return 0; }
+int __cdecl CSkypeProto::SendUrl(MCONTACT hContact, int flags, const char *url) { return 0; }
-int __cdecl CSkypeProto::SetApparentMode(HCONTACT hContact, int mode) { return 0; }
+int __cdecl CSkypeProto::SetApparentMode(MCONTACT hContact, int mode) { return 0; }
int CSkypeProto::SetStatus(int new_status)
{
@@ -613,11 +613,11 @@ int CSkypeProto::SetStatus(int new_status) return 0;
}
-HANDLE __cdecl CSkypeProto::GetAwayMsg(HCONTACT hContact) { return 0; }
-int __cdecl CSkypeProto::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 0; }
+HANDLE __cdecl CSkypeProto::GetAwayMsg(MCONTACT hContact) { return 0; }
+int __cdecl CSkypeProto::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt) { return 0; }
int __cdecl CSkypeProto::SetAwayMsg(int m_iStatus, const TCHAR *msg) { return 0; }
-int __cdecl CSkypeProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CSkypeProto::UserIsTyping(MCONTACT hContact, int type)
{
if (hContact && this->IsOnline() && this->m_iStatus != ID_STATUS_INVISIBLE)
{
diff --git a/protocols/Skype/src/skype_proto.h b/protocols/Skype/src/skype_proto.h index 972d450e0f..3e009ea67b 100644 --- a/protocols/Skype/src/skype_proto.h +++ b/protocols/Skype/src/skype_proto.h @@ -26,12 +26,12 @@ struct ContactParam struct BlockParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
CSkypeProto *ppro;
bool remove;
bool abuse;
- BlockParam(HCONTACT hContact, CSkypeProto *ppro) : ppro(ppro)
+ BlockParam(MCONTACT hContact, CSkypeProto *ppro) : ppro(ppro)
{
this->hContact = hContact;
}
@@ -179,23 +179,23 @@ public: ~CSkypeProto();
// PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const TCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const TCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const TCHAR* email );
@@ -203,24 +203,24 @@ public: virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET* );
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* );
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR* szDescription, TCHAR** ppszFiles );
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact );
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int m_iStatus, const TCHAR* msg );
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
@@ -228,7 +228,7 @@ public: static CSkypeProto* InitSkypeProto(const char* protoName, const wchar_t* userName);
static int UninitSkypeProto(CSkypeProto* ppro);
- static CSkypeProto* GetContactInstance(HCONTACT hContact);
+ static CSkypeProto* GetContactInstance(MCONTACT hContact);
static void UninitInstances();
// icons
@@ -321,9 +321,9 @@ protected: INT_PTR __cdecl SetMyNickName(WPARAM, LPARAM);
// avatars
- bool IsAvatarChanged(const SEBinary &avatar, HCONTACT hContact = NULL);
+ bool IsAvatarChanged(const SEBinary &avatar, MCONTACT hContact = NULL);
- wchar_t* GetContactAvatarFilePath(HCONTACT hContact);
+ wchar_t* GetContactAvatarFilePath(MCONTACT hContact);
INT_PTR __cdecl GetAvatarInfo(WPARAM, LPARAM);
INT_PTR __cdecl GetAvatarCaps(WPARAM, LPARAM);
@@ -338,7 +338,7 @@ protected: void OnMessageReceived(const ConversationRef &conversation, const MessageRef &message);
void SyncMessageHystory(const ConversationRef &conversation, const time_t timestamp);
- void SyncHistoryCommand(HCONTACT hContact, time_t timestamp);
+ void SyncHistoryCommand(MCONTACT hContact, time_t timestamp);
int __cdecl SyncLastDayHistoryCommand(WPARAM wParam, LPARAM lParam);
int __cdecl SyncLastWeekHistoryCommand(WPARAM wParam, LPARAM lParam);
int __cdecl SyncLastMonthHistoryCommand(WPARAM wParam, LPARAM lParam);
@@ -366,14 +366,14 @@ protected: void UpdateChatUserStatus(const ContactRef &contact);
void UpdateChatUserNick(const ContactRef &contact);
- void ChatValidateContact(HCONTACT hItem, HWND hwndList, const StringList &contacts);
- void ChatPrepare(HCONTACT hItem, HWND hwndList, const StringList &contacts);
+ void ChatValidateContact(MCONTACT hItem, HWND hwndList, const StringList &contacts);
+ void ChatPrepare(MCONTACT hItem, HWND hwndList, const StringList &contacts);
- void GetInvitedContacts(HCONTACT hItem, HWND hwndList, StringList &invitedContacts);
+ void GetInvitedContacts(MCONTACT hItem, HWND hwndList, StringList &invitedContacts);
void ChatRoomParseUriComands(const wchar_t *commands);
- void ChatRoomInvite(HCONTACT hContact);
+ void ChatRoomInvite(MCONTACT hContact);
void CloseAllChatSessions();
@@ -391,11 +391,11 @@ protected: OBJLIST<ChatRoom> chatRooms;
// contacts
- void UpdateContactAuthState(HCONTACT hContact, const ContactRef &contact);
- void UpdateContactStatus(HCONTACT hContact, const ContactRef &contact);
- void UpdateContactClient(HCONTACT hContact, const ContactRef &contact);
- void UpdateContactOnlineSinceTime(HCONTACT hContact, const ContactRef &contact);
- void UpdateContactLastEventDate(HCONTACT hContact, const ContactRef &contact);
+ void UpdateContactAuthState(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactStatus(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactClient(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactOnlineSinceTime(MCONTACT hContact, const ContactRef &contact);
+ void UpdateContactLastEventDate(MCONTACT hContact, const ContactRef &contact);
void OnSearchCompleted(HANDLE hSearch);
void OnContactFinded(CContact::Ref contact, HANDLE hSearch);
@@ -403,12 +403,12 @@ protected: void OnContactChanged(const ContactRef &contact, int prop);
void OnContactListChanged(const ContactRef &contact);
- bool IsProtoContact(HCONTACT hContact);
- HCONTACT GetContactBySid(const wchar_t* sid);
- HCONTACT GetContactFromAuthEvent(HANDLE hEvent);
- HCONTACT AddContact(CContact::Ref contact, bool isTemporary = false);
+ bool IsProtoContact(MCONTACT hContact);
+ MCONTACT GetContactBySid(const wchar_t* sid);
+ MCONTACT GetContactFromAuthEvent(HANDLE hEvent);
+ MCONTACT AddContact(CContact::Ref contact, bool isTemporary = false);
- bool IsContactOnline(HCONTACT hContact);
+ bool IsContactOnline(MCONTACT hContact);
void SetAllContactStatus(int status);
void __cdecl LoadContactList(void*);
@@ -420,25 +420,25 @@ protected: void __cdecl SearchByEmailAsync(void*);
// profile
- void UpdateProfileAvatar(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileAboutText(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileBirthday(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileCity(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileCountry(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileEmails(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileFullName(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileGender(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileHomepage(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileLanguages(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileMobilePhone(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileNick(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfilePhone(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileOfficePhone(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileState(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileStatusMessage(SEObject *obj, HCONTACT hContact = NULL);
- void UpdateProfileTimezone(SEObject *obj, HCONTACT hContact = NULL);
-
- void UpdateProfile(SEObject *obj, HCONTACT hContact = NULL);
+ void UpdateProfileAvatar(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileAboutText(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileBirthday(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileCity(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileCountry(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileEmails(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileFullName(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileGender(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileHomepage(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileLanguages(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileMobilePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileNick(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfilePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileOfficePhone(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileState(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileStatusMessage(SEObject *obj, MCONTACT hContact = NULL);
+ void UpdateProfileTimezone(SEObject *obj, MCONTACT hContact = NULL);
+
+ void UpdateProfile(SEObject *obj, MCONTACT hContact = NULL);
void __cdecl LoadOwnInfo(void*);
@@ -456,8 +456,8 @@ protected: static bool FileExists(wchar_t *path);
- static void ShowNotification(const wchar_t *message, int flags = 0, HCONTACT hContact = NULL);
- static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, HCONTACT hContact = NULL);
+ static void ShowNotification(const wchar_t *message, int flags = 0, MCONTACT hContact = NULL);
+ static void ShowNotification(const wchar_t *caption, const wchar_t *message, int flags = 0, MCONTACT hContact = NULL);
static void CopyToClipboard(const wchar_t *text);
@@ -472,7 +472,7 @@ protected: //
int SendBroadcast(int type, int result, HANDLE hProcess, LPARAM lParam);
- int SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
+ int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam);
HANDLE CreateEvent(const char* szService);
@@ -514,11 +514,11 @@ protected: static LRESULT CALLBACK SkypeBlockedOptionsSubProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
// database
- bool IsMessageInDB(HCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
+ bool IsMessageInDB(MCONTACT hContact, DWORD timestamp, SEBinary &guid, int flag = 0);
- HANDLE AddDBEvent(HCONTACT hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
+ HANDLE AddDBEvent(MCONTACT hContact, WORD type, DWORD time, DWORD flags = 0, DWORD cbBlob = 0, PBYTE pBlob = 0);
void RaiseMessageSentEvent(
- HCONTACT hContact,
+ MCONTACT hContact,
DWORD timestamp,
SEBinary &guid,
const char *message,
diff --git a/protocols/Skype/src/skype_utils.cpp b/protocols/Skype/src/skype_utils.cpp index e95287b65b..f8c410513d 100644 --- a/protocols/Skype/src/skype_utils.cpp +++ b/protocols/Skype/src/skype_utils.cpp @@ -243,7 +243,7 @@ void CSkypeProto::InitLanguages() // ---
-int CSkypeProto::SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int CSkypeProto::SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
return ::ProtoBroadcastAck(this->m_szModuleName, hContact, type, result, hProcess, lParam);
}
@@ -285,7 +285,7 @@ int CSkypeProto::SkypeToMirandaLoginError(CAccount::LOGOUTREASON logoutReason) return loginError;
}
-void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, HCONTACT hContact)
+void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *message, int flags, MCONTACT hContact)
{
if (::Miranda_Terminated()) return;
@@ -305,7 +305,7 @@ void CSkypeProto::ShowNotification(const wchar_t *caption, const wchar_t *messag ::MessageBoxW(NULL, message, caption, MB_OK | flags);
}
-void CSkypeProto::ShowNotification(const wchar_t *message, int flags, HCONTACT hContact)
+void CSkypeProto::ShowNotification(const wchar_t *message, int flags, MCONTACT hContact)
{
CSkypeProto::ShowNotification(::TranslateT(MODULE), message, flags, hContact);
}
diff --git a/protocols/SkypeClassic/src/contacts.cpp b/protocols/SkypeClassic/src/contacts.cpp index 127f962792..ecc6902397 100644 --- a/protocols/SkypeClassic/src/contacts.cpp +++ b/protocols/SkypeClassic/src/contacts.cpp @@ -151,7 +151,7 @@ CLISTMENUITEM ChatInitItem(void) { return mi;
}
-HANDLE add_contextmenu(HCONTACT hContact) {
+HANDLE add_contextmenu(MCONTACT hContact) {
CLISTMENUITEM mi;
UNREFERENCED_PARAMETER(hContact);
@@ -225,8 +225,8 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { if (!strcmp(szProto, SKYPE_PROTONAME)) {
if (!HasVoiceService()) {
- if (!db_get((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0))
+ if (!db_get((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0))
mi=ResumeCallItem(); else mi=HoldCallItem();
mi.flags=CMIM_ALL;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuHoldCallItem,(LPARAM)&mi);
@@ -237,7 +237,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { db_free(&dbv);
} else { callAvailable = TRUE; hangupAvailable = FALSE; }
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)!=0) {
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)!=0) {
callAvailable = FALSE;
hangupAvailable = FALSE;
}
@@ -259,7 +259,7 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { // File sending and groupchat-creation works starting with protocol version 5
if (protocol>=5) {
mi=FileTransferItem();
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
mi.flags ^= CMIF_HIDDEN;
mi.flags |= CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuFileTransferItem,(LPARAM)&mi);
@@ -268,19 +268,19 @@ int __cdecl PrebuildContactMenu(WPARAM wParam, LPARAM lParam) { if (protocol>=5 || bIsImoproxy) {
mi=ChatInitItem();
if (db_get_b(NULL, SKYPE_PROTONAME, "UseGroupchat", 0) &&
- db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
+ db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)==0)
mi.flags ^= CMIF_HIDDEN;
mi.flags |= CMIM_FLAGS;
CallService(MS_CLIST_MODIFYMENUITEM, (WPARAM)(HANDLE)hMenuChatInitItem,(LPARAM)&mi);
}
} else if (bSkypeOut) {
- if (!db_get((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
mi=SkypeOutHupItem();
db_free(&dbv);
} else {
mi=SkypeOutCallItem();
- if(!db_get((HCONTACT)wParam,"UserInfo","MyPhone0",&dbv)) {
+ if(!db_get((MCONTACT)wParam,"UserInfo","MyPhone0",&dbv)) {
db_free(&dbv);
mi.flags=0;
}
@@ -306,13 +306,13 @@ int ClistDblClick(WPARAM wParam, LPARAM lParam) { }
*/
-HCONTACT find_contact(char *name)
+MCONTACT find_contact(char *name)
{
int tCompareResult;
DBVARIANT dbv;
// 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))
{
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
@@ -327,13 +327,13 @@ HCONTACT find_contact(char *name) return NULL;
}
-HCONTACT find_contactT(TCHAR *name)
+MCONTACT find_contactT(TCHAR *name)
{
int tCompareResult;
DBVARIANT dbv;
// 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))
{
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME) && db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0)==0)
@@ -349,9 +349,9 @@ HCONTACT find_contactT(TCHAR *name) }
-HCONTACT add_contact(char *name, DWORD flags)
+MCONTACT add_contact(char *name, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
// already on list?
if (hContact=find_contact(name)) {
@@ -365,7 +365,7 @@ HCONTACT add_contact(char *name, DWORD flags) // no, so add
LOG(("add_contact: Adding %s", name));
- hContact=(HCONTACT)CallServiceSync(MS_DB_CONTACT_ADD, 0, 0);
+ hContact=(MCONTACT)CallServiceSync(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
if (CallServiceSync(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)SKYPE_PROTONAME)!=0) {
LOG(("add_contact: Ouch! MS_PROTO_ADDTOCONTACT failed for some reason"));
@@ -387,7 +387,7 @@ HCONTACT add_contact(char *name, DWORD flags) }
void logoff_contacts(BOOL bCleanup) {
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
DBVARIANT dbv={0};
diff --git a/protocols/SkypeClassic/src/contacts.h b/protocols/SkypeClassic/src/contacts.h index 1cc71571a5..5665b70a7b 100644 --- a/protocols/SkypeClassic/src/contacts.h +++ b/protocols/SkypeClassic/src/contacts.h @@ -1,10 +1,10 @@ // Prototypes
-HANDLE add_contextmenu(HCONTACT hContact);
+HANDLE add_contextmenu(MCONTACT hContact);
HANDLE add_mainmenu(void);
-HCONTACT find_contact(char *name);
-HCONTACT find_contactT(TCHAR *name);
-HCONTACT add_contact(char *name, DWORD flags);
+MCONTACT find_contact(char *name);
+MCONTACT find_contactT(TCHAR *name);
+MCONTACT add_contact(char *name, DWORD flags);
CLISTMENUITEM HupItem(void);
CLISTMENUITEM CallItem(void);
diff --git a/protocols/SkypeClassic/src/gchat.cpp b/protocols/SkypeClassic/src/gchat.cpp index dd38a9d990..9e746244b6 100644 --- a/protocols/SkypeClassic/src/gchat.cpp +++ b/protocols/SkypeClassic/src/gchat.cpp @@ -112,7 +112,7 @@ gchat_contact *GetChatContact(gchat_contacts *gc, const TCHAR *who) { static int AddChatContact(gchat_contacts *gc, char *who, TCHAR *pszRole)
{
int i = -2;
- HCONTACT hContact;
+ MCONTACT hContact;
CONTACTINFO ci = {0};
TCHAR *twho;
@@ -165,10 +165,10 @@ void RemChatContact(gchat_contacts *gc, const TCHAR *who) { }
}
-HCONTACT find_chat(LPCTSTR chatname) {
+MCONTACT find_chat(LPCTSTR chatname) {
char *szProto;
int tCompareResult;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
@@ -187,10 +187,10 @@ HCONTACT find_chat(LPCTSTR chatname) { }
#ifdef _UNICODE
-HCONTACT find_chatA(char *chatname) {
+MCONTACT find_chatA(char *chatname) {
char *szProto;
int tCompareResult;
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
@@ -479,7 +479,7 @@ void KillChatSession(GCDEST *gcd) void InviteUser(const TCHAR *szChatId)
{
HMENU tMenu = CreatePopupMenu();
- HCONTACT hContact = db_find_first(), hInvitedUser;
+ MCONTACT hContact = db_find_first(), hInvitedUser;
DBVARIANT dbv;
HWND tWindow;
POINT pt;
@@ -516,7 +516,7 @@ void InviteUser(const TCHAR *szChatId) tWindow = CreateWindow(_T("EDIT"),_T(""),0,1,1,1,1,NULL,NULL,hInst,NULL);
GetCursorPos (&pt);
- hInvitedUser = (HCONTACT)TrackPopupMenu(tMenu, TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, tWindow, NULL);
+ hInvitedUser = (MCONTACT)TrackPopupMenu(tMenu, TPM_NONOTIFY | TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD, pt.x, pt.y, 0, tWindow, NULL);
DestroyMenu(tMenu);
DestroyWindow(tWindow);
@@ -527,7 +527,7 @@ void InviteUser(const TCHAR *szChatId) }
-static void KickUser (HCONTACT hContact, GCHOOK *gch)
+static void KickUser (MCONTACT hContact, GCHOOK *gch)
{
char *ptr;
@@ -566,7 +566,7 @@ static void KickUser (HCONTACT hContact, GCHOOK *gch) void SetChatTopic(const TCHAR *szChatId, TCHAR *szTopic, BOOL bSet)
{
- HCONTACT hContact = find_chat (szChatId);
+ MCONTACT hContact = find_chat (szChatId);
char *szUTFTopic;
GCDEST gcd = { SKYPE_PROTONAME, szChatId, GC_EVENT_TOPIC };
@@ -608,7 +608,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) { switch (gch->pDest->iType) {
case GC_SESSION_TERMINATE: {
- HCONTACT hContact;
+ MCONTACT hContact;
if (gc->mJoinedCount == 1) {
// switch back to normal session
@@ -691,7 +691,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) { InviteUser(gch->pDest->ptszID);
break;
case GC_USER_PRIVMESS: {
- HCONTACT hContact = find_contactT(gch->ptszUID);
+ MCONTACT hContact = find_contactT(gch->ptszUID);
if (hContact) CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
break;
@@ -714,7 +714,7 @@ int GCEventHook(WPARAM wParam,LPARAM lParam) { }
break;
case GC_USER_NICKLISTMENU: {
- HCONTACT hContact = find_contactT(gch->ptszUID);
+ MCONTACT hContact = find_contactT(gch->ptszUID);
switch(gch->dwData) {
case 10:CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0); break;
@@ -821,7 +821,7 @@ int __cdecl GCMenuHook(WPARAM wParam,LPARAM lParam) { INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
UNREFERENCED_PARAMETER(lParam);
@@ -837,7 +837,7 @@ INT_PTR GCOnLeaveChat(WPARAM wParam,LPARAM lParam) INT_PTR GCOnJoinChat(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
UNREFERENCED_PARAMETER(lParam);
diff --git a/protocols/SkypeClassic/src/gchat.h b/protocols/SkypeClassic/src/gchat.h index 13ef26afe6..91dcef43f4 100644 --- a/protocols/SkypeClassic/src/gchat.h +++ b/protocols/SkypeClassic/src/gchat.h @@ -12,7 +12,7 @@ #define MAX_BUF 256 // Buffer for topic-string
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR who[33];
TCHAR szRole[12];
} gchat_contact;
@@ -26,9 +26,9 @@ typedef struct { int ChatInit(WPARAM, LPARAM);
int __cdecl ChatStart(char *szChatId, BOOL bJustCreate);
gchat_contacts *GetChat(LPCTSTR szChatId);
-HCONTACT find_chat(LPCTSTR chatname);
+MCONTACT find_chat(LPCTSTR chatname);
#ifdef _UNICODE
-HCONTACT find_chatA(char *chatname);
+MCONTACT find_chatA(char *chatname);
#else
#define find_chatA find_chat
#endif
diff --git a/protocols/SkypeClassic/src/skype.cpp b/protocols/SkypeClassic/src/skype.cpp index 3a6b431f96..5acdb42d43 100644 --- a/protocols/SkypeClassic/src/skype.cpp +++ b/protocols/SkypeClassic/src/skype.cpp @@ -123,7 +123,7 @@ typedef struct { } fetchmsg_arg;
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
char szId[16];
} msgsendwt_arg;
@@ -266,7 +266,7 @@ int HookContactAdded(WPARAM wParam, LPARAM lParam) { szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, wParam, 0 );
if (szProto!=NULL && !strcmp(szProto, SKYPE_PROTONAME))
- add_contextmenu((HCONTACT)wParam);
+ add_contextmenu((MCONTACT)wParam);
return 0;
}
@@ -280,7 +280,7 @@ int HookContactDeleted(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv;
int retval;
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 1;
retval=SkypeSend("SET USER %s BUDDYSTATUS 1", dbv.pszVal);
db_free(&dbv);
if (retval) return 1;
@@ -304,7 +304,7 @@ void GetInfoThread(void *hContact) LOG (("GetInfoThread started."));
EnterCriticalSection (&QueryThreadMutex);
- if (db_get_s((HCONTACT)hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (db_get_s((MCONTACT)hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
{
LOG (("GetInfoThread terminated, cannot find Skype Name for contact %08X.", hContact));
LeaveCriticalSection (&QueryThreadMutex);
@@ -320,7 +320,7 @@ void GetInfoThread(void *hContact) if (ptr=SkypeGet ("USER", dbv.pszVal, "FULLNAME")) {
if (*ptr && !bSetNick && db_get_b(NULL, SKYPE_PROTONAME, "ShowFullname", 1)) {
// No Displayname and FULLNAME requested
- db_set_utf((HCONTACT)hContact, SKYPE_PROTONAME, "Nick", ptr);
+ db_set_utf((MCONTACT)hContact, SKYPE_PROTONAME, "Nick", ptr);
bSetNick = TRUE;
}
free (ptr);
@@ -328,7 +328,7 @@ void GetInfoThread(void *hContact) if (!bSetNick) {
// Still no nick set, so use SKYPE Nickname
- db_set_s((HCONTACT)hContact, SKYPE_PROTONAME, "Nick", dbv.pszVal);
+ db_set_s((MCONTACT)hContact, SKYPE_PROTONAME, "Nick", dbv.pszVal);
}
@@ -345,7 +345,7 @@ void GetInfoThread(void *hContact) ACKDATA ack = {0};
ack.cbSize = sizeof( ACKDATA );
ack.szModule = SKYPE_PROTONAME;
- ack.hContact = (HCONTACT)hContact;
+ ack.hContact = (MCONTACT)hContact;
ack.type = ACKTYPE_AVATAR;
ack.result = ACKRESULT_STATUS;
@@ -359,7 +359,7 @@ void GetInfoThread(void *hContact) if (ptr=SkypeGet ("USER", dbv.pszVal, m_settings[i].SkypeSetting)) free (ptr);
}
- ProtoBroadcastAck(SKYPE_PROTONAME, (HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(SKYPE_PROTONAME, (MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
LeaveCriticalSection(&QueryThreadMutex);
db_free(&dbv);
LOG (("GetInfoThread terminated gracefully."));
@@ -449,11 +449,11 @@ INT_PTR ImportHistory(WPARAM wParam, LPARAM lParam) { UNREFERENCED_PARAMETER(lParam);
- if (db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)) {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "ChatRoomID", &dbv)) return 0;
+ if (db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoom", 0)) {
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "ChatRoomID", &dbv)) return 0;
SkypeSend ("GET CHAT %s CHATMESSAGES", dbv.pszVal);
} else {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 0;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return 0;
SkypeSend("SEARCH %sS %s", cmdMessage, dbv.pszVal);
}
db_free(&dbv);
@@ -501,7 +501,7 @@ void __cdecl SearchUsersWaitingMyAuthorization(void *dummy) { while (token) {
CCSDATA ccs={0};
PROTORECVEVENT pre={0};
- HCONTACT hContact;
+ MCONTACT hContact;
char *firstname=NULL, *lastname=NULL, *pCurBlob;
LOG(("Awaiting auth: %s", token));
@@ -513,7 +513,7 @@ void __cdecl SearchUsersWaitingMyAuthorization(void *dummy) { pre.timestamp=(DWORD)SkypeTime(NULL);
/* blob is: */
- //DWORD protocolSpecific HCONTACT hContact
+ //DWORD protocolSpecific MCONTACT hContact
//ASCIIZ nick, firstName, lastName, e-mail, requestReason
if (firstname=SkypeGet("USER", token, "FULLNAME"))
if (lastname=strchr(firstname, ' ')) {
@@ -872,7 +872,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { DWORD timestamp = 0, lwr=0;
CCSDATA ccs={0};
PROTORECVEVENT pre={0};
- HCONTACT hContact = NULL, hChat = NULL;
+ MCONTACT hContact = NULL, hChat = NULL;
HANDLE hDbEvent;
DBEVENTINFO dbei={0};
DBVARIANT dbv={0};
@@ -1309,7 +1309,7 @@ void FetchMessageThread(fetchmsg_arg *pargs) { if (db_get_b(hContact, "MetaContacts", "IsSubcontact", 0))
{
DWORD dwMetaLink = db_get_dw(hContact, "MetaContacts", "MetaLink", MAXDWORD);
- HCONTACT hMetaContact;
+ MCONTACT hMetaContact;
if (dwMetaLink != MAXDWORD && (hMetaContact = GetMetaHandle(dwMetaLink)))
{
@@ -1364,8 +1364,8 @@ void FetchMessageThreadSync(fetchmsg_arg *pargs) { /*
if (pargs->bIsRead && pMsgEvent->hEvent != INVALID_HANDLE_VALUE)
{
- HCONTACT hContact;
- if ((int)(hContact = (HCONTACT)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)pMsgEntry->hEvent, 0)) != -1)
+ MCONTACT hContact;
+ if ((int)(hContact = (MCONTACT)CallService (MS_DB_EVENT_GETCONTACT, (WPARAM)pMsgEntry->hEvent, 0)) != -1)
CallService (MS_DB_EVENT_MARKREAD, (WPARAM)hContact, (LPARAM)hDBEvent);
}
*/
@@ -1419,10 +1419,10 @@ char *GetCallerHandle(char *szSkypeMsg) { }
-HCONTACT GetCallerContact(char *szSkypeMsg)
+MCONTACT GetCallerContact(char *szSkypeMsg)
{
char *szHandle;
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
if (!(szHandle=GetCallerHandle(szSkypeMsg))) return NULL;
if (!(hContact=find_contact(szHandle))) {
@@ -1442,9 +1442,9 @@ HCONTACT GetCallerContact(char *szSkypeMsg) return hContact;
}
-HCONTACT GetMetaHandle(DWORD dwId)
+MCONTACT GetMetaHandle(DWORD dwId)
{
- 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)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
if (szProto!=NULL && !strcmp(szProto, "MetaContacts") &&
db_get_dw(hContact, "MetaContacts", "MetaID", MAXDWORD)==dwId)
@@ -1478,7 +1478,7 @@ LRESULT CALLBACK InCallPopUpProc(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam) }
void RingThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
DBEVENTINFO dbei={0};
DBVARIANT dbv;
char *ptr = NULL;
@@ -1606,7 +1606,7 @@ l_exitRT: }
void EndCallThread(char *szSkypeMsg) {
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
HANDLE hDbEvent;
DBEVENTINFO dbei={0};
DBVARIANT dbv;
@@ -1669,7 +1669,7 @@ void EndCallThread(char *szSkypeMsg) { }
void HoldCallThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
LOG(("HoldCallThread started"));
if (!szSkypeMsg) {
@@ -1685,7 +1685,7 @@ void HoldCallThread(char *szSkypeMsg) { }
void ResumeCallThread(char *szSkypeMsg) {
- HCONTACT hContact;
+ MCONTACT hContact;
LOG(("ResumeCallThread started"));
if (!szSkypeMsg) {
@@ -1743,7 +1743,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) static char *onlinestatus=NULL;
static BOOL RestoreUserStatus=FALSE;
int sstat, oldstatus, flag;
- HCONTACT hContact;
+ MCONTACT hContact;
fetchmsg_arg *args;
static int iReentranceCnt = 0;
@@ -2091,7 +2091,7 @@ LONG APIENTRY WndProc(HWND hWndDlg, UINT message, UINT wParam, LONG lParam) } else
if (strncmp(ptr, " FRIENDLYNAME ", 14) == 0) {
// Chat session name
- HCONTACT hContact;
+ MCONTACT hContact;
*ptr=0;
if (hContact = find_chatA(szSkypeMsg+5))
@@ -2359,7 +2359,7 @@ INT_PTR SkypeSetStatus(WPARAM wParam, LPARAM lParam) return iRet;
}
-int __stdcall SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+int __stdcall SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
ACKDATA ack = { sizeof( ACKDATA ) };
ack.szModule = SKYPE_PROTONAME;
@@ -2374,11 +2374,11 @@ int __stdcall SendBroadcast(HCONTACT hContact, int type, int result, HANDLE hPro static void __cdecl SkypeGetAwayMessageThread(void *hContact)
{
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)hContact, "CList", "StatusMsg", &dbv )) {
- SendBroadcast((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )dbv.ptszVal );
+ if (!db_get_ts((MCONTACT)hContact, "CList", "StatusMsg", &dbv )) {
+ SendBroadcast((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )dbv.ptszVal );
db_free( &dbv );
}
- else SendBroadcast((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )0 );
+ else SendBroadcast((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, ( HANDLE )1, ( LPARAM )0 );
}
INT_PTR SkypeGetAwayMessage(WPARAM wParam,LPARAM lParam)
@@ -2449,7 +2449,7 @@ static int _GetFileSize(char* filename) */
void RetrieveUserAvatar(void *param)
{
- HCONTACT hContact = (HCONTACT) param;
+ MCONTACT hContact = (MCONTACT) param;
HANDLE file;
PROTO_AVATAR_INFORMATION AI={0};
ACKDATA ack = {0};
@@ -2777,7 +2777,7 @@ INT_PTR SkypeRecvMessage(WPARAM wParam, LPARAM lParam) INT_PTR SkypeUserIsTyping(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv={0};
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (protocol<5 && !bIsImoproxy) return 0;
if (db_get_s(hContact, SKYPE_PROTONAME, "Typing_Stream", &dbv)) {
@@ -2893,7 +2893,7 @@ INT_PTR SkypeAddToListByEvent(WPARAM wParam, LPARAM lParam) { if (pBlob=__skypeauth(wParam))
{
- HCONTACT hContact=add_contact(pBlob+sizeof(DWORD)+sizeof(HANDLE), LOWORD(wParam));
+ MCONTACT hContact=add_contact(pBlob+sizeof(DWORD)+sizeof(HANDLE), LOWORD(wParam));
free(pBlob);
if (hContact) return (int)hContact;
}
@@ -2914,7 +2914,7 @@ INT_PTR SkypeRegisterProxy(WPARAM wParam, LPARAM lParam) { void CleanupNicknames(char *dummy) {
- HCONTACT hContact;
+ MCONTACT hContact;
char *szProto;
DBVARIANT dbv, dbv2;
@@ -3014,7 +3014,7 @@ int EnumOldPluginName(const char *szSetting,LPARAM lParam) // 0 --> No
int AnySkypeusers(void)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
int tCompareResult;
@@ -3039,7 +3039,7 @@ int AnySkypeusers(void) DBCONTACTENUMSETTINGS cns;
DBCONTACTWRITESETTING cws;
DBVARIANT dbv;
- HCONTACT hContact=NULL;
+ MCONTACT hContact=NULL;
struct PLUGINDI pdi;
LOG(("Updating old database settings if there are any..."));
diff --git a/protocols/SkypeClassic/src/skype.h b/protocols/SkypeClassic/src/skype.h index 83021b91c6..5cd87986dd 100644 --- a/protocols/SkypeClassic/src/skype.h +++ b/protocols/SkypeClassic/src/skype.h @@ -172,7 +172,7 @@ int __stdcall EnterBitmapFileName( char* szDest ); void CleanupNicknames(char *dummy);
int InitVSApi();
int FreeVSApi();
-HCONTACT GetMetaHandle(DWORD dwId);
+MCONTACT GetMetaHandle(DWORD dwId);
void LaunchSkypeAndSetStatusThread(void *newStatus);
// Structs
diff --git a/protocols/SkypeClassic/src/skypeapi.cpp b/protocols/SkypeClassic/src/skypeapi.cpp index 310d26b975..1534a3530a 100644 --- a/protocols/SkypeClassic/src/skypeapi.cpp +++ b/protocols/SkypeClassic/src/skypeapi.cpp @@ -413,7 +413,7 @@ char *SkypeRcv(char *what, DWORD maxwait) return SkypeRcvTime(what, 0, maxwait);
}
-char *SkypeRcvMsg(char *what, time_t st, HCONTACT hContact, DWORD maxwait)
+char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait)
{
char *msg, msgid[32]={0}, *pMsg, *pCurMsg;
struct MsgQueue *ptr;
@@ -612,10 +612,10 @@ INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam) { char *msg=0;
int res;
- if (!db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
res = -1; // no direct return, because dbv needs to be freed
} else {
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
msg=(char *)malloc(strlen(dbv.pszVal)+6);
strcpy(msg, "CALL ");
strcat(msg, dbv.pszVal);
@@ -644,13 +644,13 @@ INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam) char *msg=0;
int res = -1;
- if (!db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
msg=(char *)malloc(strlen(dbv.pszVal)+21);
sprintf(msg, "SET %s STATUS FINISHED", dbv.pszVal);
//sprintf(msg, "ALTER CALL %s HANGUP", dbv.pszVal);
res=SkypeSend(msg);
#if _DEBUG
- db_unset((HCONTACT)wParam, SKYPE_PROTONAME, "CallId");
+ db_unset((MCONTACT)wParam, SKYPE_PROTONAME, "CallId");
#endif
//} else {
// if (db_get((HANDLE)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv)) return -1;
@@ -686,14 +686,14 @@ static void FixNumber(char *p) { * Purpose: Dialog procedure for the Dial-Dialog
*/
static INT_PTR CALLBACK DialDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) {
- static HCONTACT hContact;
+ static MCONTACT hContact;
static unsigned int entries=0;
BOOL TempAdded=FALSE;
char number[64], *msg, *ptr=NULL;
switch (uMsg){
case WM_INITDIALOG:
- hContact=(HCONTACT)lParam;
+ hContact=(MCONTACT)lParam;
Utils_RestoreWindowPosition(hwndDlg, NULL, SKYPE_PROTONAME, "DIALdlg");
TranslateDialogDefault(hwndDlg);
@@ -810,14 +810,14 @@ static INT_PTR CALLBACK CallstatDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, switch (uMsg){
case WM_INITDIALOG:
{
- HCONTACT hContact;
+ MCONTACT hContact;
- if (!db_get_s((HCONTACT)lParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (!db_get_s((MCONTACT)lParam, SKYPE_PROTONAME, "CallId", &dbv)) {
// Check, if another call is in progress
for (hContact=db_find_first();hContact != NULL;hContact=db_find_next(hContact)) {
char *szProto = (char*)CallService( MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0 );
- if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (HCONTACT)lParam &&
+ if (szProto != NULL && !strcmp(szProto, SKYPE_PROTONAME) && hContact != (MCONTACT)lParam &&
db_get_b(hContact, SKYPE_PROTONAME, "ChatRoom", 0) == 0 &&
!db_get_s(hContact, SKYPE_PROTONAME, "CallId", &dbv2))
{
@@ -927,7 +927,7 @@ INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv;
int res = -1;
- if (wParam && !db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
+ if (wParam && !db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv)) {
res=SkypeSend("SET %s STATUS FINISHED", dbv.pszVal);
pthread_create(( pThreadFunc )SkypeOutCallErrorCheck, _strdup(dbv.pszVal));
db_free(&dbv);
@@ -947,10 +947,10 @@ INT_PTR SkypeHoldCall(WPARAM wParam, LPARAM lParam) { int retval;
LOG(("SkypeHoldCall started"));
- if (!wParam || db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv))
+ if (!wParam || db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, "CallId", &dbv))
return -1;
retval = SkypeSend ("SET %s STATUS %s", dbv.pszVal,
- db_get_b((HCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0)?"INPROGRESS":"ONHOLD");
+ db_get_b((MCONTACT)wParam, SKYPE_PROTONAME, "OnHold", 0)?"INPROGRESS":"ONHOLD");
db_free(&dbv);
return retval;
}
@@ -1145,7 +1145,7 @@ INT_PTR SkypeSendFile(WPARAM wParam, LPARAM lParam) { DBVARIANT dbv;
int retval;
- if (!wParam || db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (!wParam || db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
return -1;
retval=SkypeSend("OPEN FILETRANSFER %s", dbv.pszVal);
db_free(&dbv);
@@ -1162,7 +1162,7 @@ INT_PTR SkypeSendFile(WPARAM wParam, LPARAM lParam) { */
INT_PTR SkypeChatCreate(WPARAM wParam, LPARAM lParam) {
DBVARIANT dbv;
- HCONTACT hContact=(HCONTACT)wParam;
+ MCONTACT hContact=(MCONTACT)wParam;
char *ptr, *ptr2;
if (!hContact || db_get_s(hContact, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
diff --git a/protocols/SkypeClassic/src/skypeapi.h b/protocols/SkypeClassic/src/skypeapi.h index 0d3f661dcb..aaff523921 100644 --- a/protocols/SkypeClassic/src/skypeapi.h +++ b/protocols/SkypeClassic/src/skypeapi.h @@ -28,7 +28,7 @@ char *SkypeMsgGet(void); int SkypeSend(char*, ...);
char *SkypeRcv(char *what, DWORD maxwait);
char *SkypeRcvTime(char *what, time_t st, DWORD maxwait);
-char *SkypeRcvMsg(char *what, time_t st, HCONTACT hContact, DWORD maxwait);
+char *SkypeRcvMsg(char *what, time_t st, MCONTACT hContact, DWORD maxwait);
INT_PTR SkypeCall(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeCallHangup(WPARAM wParam, LPARAM lParam);
INT_PTR SkypeOutCall(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/SkypeClassic/src/skypeopt.cpp b/protocols/SkypeClassic/src/skypeopt.cpp index 8b90c78780..42e4f79423 100644 --- a/protocols/SkypeClassic/src/skypeopt.cpp +++ b/protocols/SkypeClassic/src/skypeopt.cpp @@ -159,7 +159,7 @@ INT_PTR CALLBACK OptPopupDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar {
case IDC_PREVIEW:
{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR * lpzContactName;
hContact = db_find_first();
@@ -750,7 +750,7 @@ INT_PTR CALLBACK OptionsDefaultDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L int OnDetailsInit( WPARAM wParam, LPARAM lParam )
{
OPTIONSDIALOGPAGE odp = {0};
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
odp.cbSize = sizeof(odp);
odp.hIcon = NULL;
diff --git a/protocols/SkypeClassic/src/voiceservice.cpp b/protocols/SkypeClassic/src/voiceservice.cpp index 93181d0d4c..f5e97f3a53 100644 --- a/protocols/SkypeClassic/src/voiceservice.cpp +++ b/protocols/SkypeClassic/src/voiceservice.cpp @@ -20,7 +20,7 @@ BOOL HasVoiceService() return has_voice_service;
}
-void NofifyVoiceService(HCONTACT hContact, char *callId, int state)
+void NofifyVoiceService(MCONTACT hContact, char *callId, int state)
{
VOICE_CALL vc = {0};
vc.cbSize = sizeof(vc);
@@ -40,9 +40,9 @@ static INT_PTR VoiceGetInfo(WPARAM wParam, LPARAM lParam) return VOICE_SUPPORTED | VOICE_CALL_CONTACT | VOICE_CAN_HOLD;
}
-static HCONTACT FindContactByCallId(char *callId)
+static MCONTACT FindContactByCallId(char *callId)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int iCmpRes;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
char *szProto = (char*) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
@@ -71,7 +71,7 @@ static INT_PTR VoiceCall(WPARAM wParam, LPARAM lParam) if (!wParam) return -1;
- if (db_get_s((HCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
+ if (db_get_s((MCONTACT)wParam, SKYPE_PROTONAME, SKYPE_NAME, &dbv))
return -1;
SkypeSend("CALL %s", dbv.pszVal);
diff --git a/protocols/SkypeClassic/src/voiceservice.h b/protocols/SkypeClassic/src/voiceservice.h index fce03545d2..df1a016100 100644 --- a/protocols/SkypeClassic/src/voiceservice.h +++ b/protocols/SkypeClassic/src/voiceservice.h @@ -10,7 +10,7 @@ BOOL HasVoiceService(); void VoiceServiceInit();
void VoiceServiceExit();
void VoiceServiceModulesLoaded();
-void NofifyVoiceService(HCONTACT hContact, char *callId, int state) ;
+void NofifyVoiceService(MCONTACT hContact, char *callId, int state) ;
diff --git a/protocols/Tlen/src/tlen.cpp b/protocols/Tlen/src/tlen.cpp index 377d52f43c..bc9cde59f4 100644 --- a/protocols/Tlen/src/tlen.cpp +++ b/protocols/Tlen/src/tlen.cpp @@ -114,7 +114,7 @@ static void TlenRegisterIcons() int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -140,7 +140,7 @@ int TlenProtocol::PrebuildContactMenu(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -153,7 +153,7 @@ INT_PTR TlenProtocol::ContactMenuHandleRequestAuth(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline) {
DBVARIANT dbv;
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
@@ -166,7 +166,7 @@ INT_PTR TlenProtocol::ContactMenuHandleGrantAuth(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::ContactMenuHandleSendPicture(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact != NULL && isOnline)
SendPicture(this, hContact);
@@ -241,7 +241,7 @@ int TlenProtocol::OnModulesLoaded(WPARAM wParam, LPARAM lParam) char str[128];
/* Set all contacts to offline */
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (db_get_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, m_szModuleName, "Status", ID_STATUS_OFFLINE);
diff --git a/protocols/Tlen/src/tlen.h b/protocols/Tlen/src/tlen.h index 1096210110..b914fbc6f3 100644 --- a/protocols/Tlen/src/tlen.h +++ b/protocols/Tlen/src/tlen.h @@ -218,23 +218,23 @@ struct TlenProtocol : public PROTO<TlenProtocol> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const PROTOCHAR* szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
virtual HANDLE __cdecl SearchByEmail(const PROTOCHAR* email);
@@ -242,24 +242,24 @@ struct TlenProtocol : public PROTO<TlenProtocol> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int iStatus, const PROTOCHAR* msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam);
@@ -381,7 +381,7 @@ typedef struct ThreadDataStruct{ typedef enum { FT_CONNECTING, FT_INITIALIZING, FT_RECEIVING, FT_DONE, FT_ERROR, FT_DENIED, FT_SWITCH } TLEN_FILE_STATE;
typedef enum { FT_RECV, FT_SEND} TLEN_FILE_MODE;
typedef struct TLEN_FILE_TRANSFER_STRUCT{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE s;
NETLIBNEWCONNECTIONPROC_V2 pfnNewConnectionV2;
TLEN_FILE_STATE state;
@@ -466,8 +466,8 @@ void TlenSerialInit(TlenProtocol *proto); void TlenSerialUninit(TlenProtocol *proto);
unsigned int TlenSerialNext(TlenProtocol *proto);
int TlenSend(TlenProtocol *proto, const char *fmt, ...);
-HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid);
-char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact);
+MCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid);
+char *TlenJIDFromHContact(TlenProtocol *proto, MCONTACT hContact);
char *TlenLoginFromJID(const char *jid);
char *TlenResourceFromJID(const char *jid);
char *TlenNickFromJID(const char *jid);
@@ -481,7 +481,7 @@ void TlenUrlDecode(char *str); char *TlenUrlEncode(const char *str);
char *TlenTextEncode(const char *str);
char *TlenTextDecode(const char *str);
-void TlenLogMessage(TlenProtocol *proto, HCONTACT hContact, DWORD flags, const char *message);
+void TlenLogMessage(TlenProtocol *proto, MCONTACT hContact, DWORD flags, const char *message);
BOOL IsAuthorized(TlenProtocol *proto, const char *jid);
//char *TlenGetVersionText();
time_t TlenIsoToUnixTime(char *stamp);
@@ -490,9 +490,9 @@ void TlenSendPresence(TlenProtocol *proto,int status); void TlenStringAppend(char **str, int *sizeAlloced, const char *fmt, ...);
//char *TlenGetClientJID(char *jid);
// tlen_misc.cpp
-void TlenDBAddEvent(TlenProtocol *proto, HCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob);
+void TlenDBAddEvent(TlenProtocol *proto, MCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob);
void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick);
-HCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary);
+MCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary);
// tlen_svc.cpp
int TlenRunSearch(TlenProtocol *proto);
// tlen_opt.cpp
diff --git a/protocols/Tlen/src/tlen_avatar.cpp b/protocols/Tlen/src/tlen_avatar.cpp index f413b277ec..b75ac787ba 100644 --- a/protocols/Tlen/src/tlen_avatar.cpp +++ b/protocols/Tlen/src/tlen_avatar.cpp @@ -64,7 +64,7 @@ void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* pts mir_sntprintf(ptszDest + tPathLen, MAX_PATH - tPathLen, TEXT("%S_avatar%s"), proto->m_szModuleName, tszFileType);
}
-static void RemoveAvatar(TlenProtocol *proto, HCONTACT hContact) {
+static void RemoveAvatar(TlenProtocol *proto, MCONTACT hContact) {
TCHAR tFileName[ MAX_PATH ];
if (hContact == NULL) {
proto->threadData->avatarHash[0] = '\0';
@@ -77,7 +77,7 @@ static void RemoveAvatar(TlenProtocol *proto, HCONTACT hContact) { ProtoBroadcastAck(proto->m_szModuleName, NULL, ACKTYPE_AVATAR, ACKRESULT_STATUS, NULL, 0);
}
-static void SetAvatar(TlenProtocol *proto, HCONTACT hContact, TLEN_LIST_ITEM *item, char *data, int len, DWORD format) {
+static void SetAvatar(TlenProtocol *proto, MCONTACT hContact, TLEN_LIST_ITEM *item, char *data, int len, DWORD format) {
TCHAR filename[MAX_PATH];
char md5[33];
mir_md5_state_t ctx;
@@ -123,7 +123,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT XmlNode *aNode;
char *oldHash = NULL;
char *md5 = NULL, *type = NULL;
- HCONTACT hContact;
+ MCONTACT hContact;
hContact = NULL;
if (item != NULL) {
if ((hContact=TlenHContactFromJID(proto, item->jid)) == NULL) return 0;
@@ -165,7 +165,7 @@ int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_IT }
void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, TLEN_LIST_ITEM *item) {
- HCONTACT hContact;
+ MCONTACT hContact;
if ((hContact=TlenHContactFromJID(proto, item->jid)) == NULL) return;
TlenProcessAvatarNode(proto, TlenXmlGetChild(node, "avatar"), item);
}
@@ -225,7 +225,7 @@ static int getAvatarMutex = 0; typedef struct {
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
} TLENGETAVATARTHREADDATA;
static void TlenGetAvatarThread(void *ptr) {
@@ -234,7 +234,7 @@ static void TlenGetAvatarThread(void *ptr) { NETLIBHTTPREQUEST req;
NETLIBHTTPREQUEST *resp;
TLENGETAVATARTHREADDATA *data = (TLENGETAVATARTHREADDATA *)ptr;
- HCONTACT hContact = data->hContact;
+ MCONTACT hContact = data->hContact;
char *request;
char *login = NULL;
if (hContact != NULL) {
@@ -301,7 +301,7 @@ static void TlenGetAvatarThread(void *ptr) { mir_free(data);
}
-void TlenGetAvatar(TlenProtocol *proto, HCONTACT hContact) {
+void TlenGetAvatar(TlenProtocol *proto, MCONTACT hContact) {
if (hContact == NULL) {
if (getAvatarMutex != 0) {
return;
diff --git a/protocols/Tlen/src/tlen_avatar.h b/protocols/Tlen/src/tlen_avatar.h index c0bbfaa086..5de5d482a6 100644 --- a/protocols/Tlen/src/tlen_avatar.h +++ b/protocols/Tlen/src/tlen_avatar.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void TlenProcessPresenceAvatar(TlenProtocol *proto, XmlNode *node, TLEN_LIST_ITEM *item);
int TlenProcessAvatarNode(TlenProtocol *proto, XmlNode *avatarNode, TLEN_LIST_ITEM *item);
void TlenGetAvatarFileName(TlenProtocol *proto, TLEN_LIST_ITEM *item, TCHAR* psztDest, int cbLen);
-void TlenGetAvatar(TlenProtocol *proto, HCONTACT hContact);
+void TlenGetAvatar(TlenProtocol *proto, MCONTACT hContact);
void TlenUploadAvatar(TlenProtocol *proto, unsigned char *data, int dataLen, int access);
void TlenRemoveAvatar(TlenProtocol *proto);
diff --git a/protocols/Tlen/src/tlen_iqid.cpp b/protocols/Tlen/src/tlen_iqid.cpp index 74181bd9c3..450fc6c4a5 100644 --- a/protocols/Tlen/src/tlen_iqid.cpp +++ b/protocols/Tlen/src/tlen_iqid.cpp @@ -65,7 +65,7 @@ void TlenResultSetRoster(TlenProtocol *proto, XmlNode *queryNode) { DBVARIANT dbv;
XmlNode *itemNode, *groupNode;
TLEN_LIST_ITEM *item;
- HCONTACT hContact;
+ MCONTACT hContact;
char *jid, *name, *nick;
int i;
char *str;
@@ -165,7 +165,7 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) nick = TlenLocalNickFromJID(jid);
if (nick != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
item = TlenListAdd(proto, LIST_ROSTER, jid);
if (item->nick) mir_free(item->nick);
item->nick = nick;
@@ -206,8 +206,8 @@ void TlenIqResultRoster(TlenProtocol *proto, XmlNode *iqNode) // Delete orphaned contacts (if roster sync is enabled)
if (db_get_b(NULL, proto->m_szModuleName, "RosterSync", FALSE) == TRUE) {
- for (HCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; ) {
- HCONTACT hNext = hContact = db_find_next(hContact, proto->m_szModuleName);
+ for (MCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; ) {
+ MCONTACT hNext = hContact = db_find_next(hContact, proto->m_szModuleName);
ptrA jid( db_get_sa(hContact, proto->m_szModuleName, "jid"));
if (jid != NULL) {
if (!TlenListExist(proto, LIST_ROSTER, jid)) {
@@ -241,7 +241,7 @@ void TlenIqResultVcard(TlenProtocol *proto, XmlNode *iqNode) XmlNode *queryNode, *itemNode, *n;
char *type, *jid;
char text[128];
- HCONTACT hContact;
+ MCONTACT hContact;
char *nText;
// TlenLog("<iq/> iqIdGetVcard (tlen)");
@@ -561,7 +561,7 @@ void TlenIqResultVersion(TlenProtocol *proto, XmlNode *iqNode) if (( from=TlenXmlGetAttrValue( iqNode, "from" )) != NULL ) {
TLEN_LIST_ITEM *item;
if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *n;
if ( item->software ) mir_free( item->software );
if ( item->version ) mir_free( item->version );
@@ -598,7 +598,7 @@ void TlenIqResultInfo(TlenProtocol *proto, XmlNode *iqNode) if (( from=TlenXmlGetAttrValue( queryNode, "from" )) != NULL ) {
TLEN_LIST_ITEM *item;
if (( item=TlenListGetItemPtr( proto, LIST_ROSTER, from )) != NULL) {
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *version = TlenXmlGetChild(queryNode, "version");
item->protocolVersion = TlenTextDecode(version->text);
if (( hContact=TlenHContactFromJID(proto, item->jid )) != NULL ) {
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp index 6aed4ecadc..2879edfb82 100644 --- a/protocols/Tlen/src/tlen_misc.cpp +++ b/protocols/Tlen/src/tlen_misc.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen.h"
#include "tlen_list.h"
-void TlenDBAddEvent(TlenProtocol *proto, HCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob)
+void TlenDBAddEvent(TlenProtocol *proto, MCONTACT hContact, int eventType, DWORD flags, PBYTE pBlob, DWORD cbBlob)
{
DBEVENTINFO dbei = { sizeof(dbei) };
dbei.szModule = proto->m_szModuleName;
@@ -42,10 +42,10 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick) PBYTE pCurBlob;
PBYTE pBlob;
DWORD cbBlob;
- HCONTACT hContact;
+ MCONTACT hContact;
if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
- 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) proto->m_szModuleName);
// strip resource if present
s = TlenLoginFromJID(jid);
@@ -72,7 +72,7 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick) TlenDBAddEvent(proto, NULL, EVENTTYPE_AUTHREQUEST, 0, pBlob, cbBlob);
}
-char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact)
+char *TlenJIDFromHContact(TlenProtocol *proto, MCONTACT hContact)
{
char *p = NULL;
DBVARIANT dbv;
@@ -83,14 +83,14 @@ char *TlenJIDFromHContact(TlenProtocol *proto, HCONTACT hContact) return p;
}
-HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
+MCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid)
{
DBVARIANT dbv;
char *p;
if (jid == NULL)
return NULL;
- for (HCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; hContact = db_find_next(hContact, proto->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(proto->m_szModuleName); hContact; hContact = db_find_next(hContact, proto->m_szModuleName)) {
if ( db_get_s(hContact, proto->m_szModuleName, "jid", &dbv))
continue;
@@ -106,14 +106,14 @@ HCONTACT TlenHContactFromJID(TlenProtocol *proto, const char *jid) return NULL;
}
-HCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary)
+MCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL temporary)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (jid == NULL || jid[0] == '\0')
return NULL;
if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
- 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) proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if (nick != NULL && nick[0] != '\0')
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index 05d609947c..31dc19bb4b 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -69,7 +69,7 @@ static int stringToHex(const char *str) static char *getDisplayName(TlenProtocol *proto, const char *id)
{
char jid[256];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
@@ -101,7 +101,7 @@ BOOL TlenMUCInit(TlenProtocol *proto) int TlenProtocol::MUCHandleEvent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
int id;
MUCCEVENT *mucce=(MUCCEVENT *) lParam;
if (!strcmp(mucce->pszModule, m_szModuleName)) {
@@ -954,7 +954,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) queryResult.iItemsNum = 0;
- 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)) {
if ( db_get_b(hContact, szProto, "bChat", FALSE))
continue;
@@ -970,7 +970,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) memset(queryResult.pItems, 0, sizeof(MUCCQUERYITEM) * queryResult.iItemsNum);
queryResult.iItemsNum = 0;
- 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)) {
if ( db_get_b(hContact, szProto, "bChat", FALSE))
continue;
@@ -1025,13 +1025,13 @@ INT_PTR TlenProtocol::MUCMenuHandleChats(WPARAM wParam, LPARAM lParam) INT_PTR TlenProtocol::MUCContactMenuHandleMUC(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
if (!isOnline)
return 1;
- if ((hContact=(HCONTACT)wParam) != NULL && isOnline) {
+ if ((hContact=(MCONTACT)wParam) != NULL && isOnline) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), TLEN_IQID"%d", TlenSerialNext(this));
diff --git a/protocols/Tlen/src/tlen_picture.cpp b/protocols/Tlen/src/tlen_picture.cpp index 7f3f769ef2..f97cc1fb78 100644 --- a/protocols/Tlen/src/tlen_picture.cpp +++ b/protocols/Tlen/src/tlen_picture.cpp @@ -254,7 +254,7 @@ void TlenProcessPic(XmlNode *node, TlenProtocol *proto) { mir_free(fromRaw);
}
-BOOL SendPicture(TlenProtocol *proto, HCONTACT hContact) {
+BOOL SendPicture(TlenProtocol *proto, MCONTACT hContact) {
DBVARIANT dbv;
if (!db_get(hContact, proto->m_szModuleName, "jid", &dbv)) {
char *jid = dbv.pszVal;
diff --git a/protocols/Tlen/src/tlen_picture.h b/protocols/Tlen/src/tlen_picture.h index a15922a5a4..50e3b0b1e6 100644 --- a/protocols/Tlen/src/tlen_picture.h +++ b/protocols/Tlen/src/tlen_picture.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen.h" void TlenProcessPic(XmlNode *node, TlenProtocol *proto); -BOOL SendPicture(TlenProtocol *, HCONTACT hContact); +BOOL SendPicture(TlenProtocol *, MCONTACT hContact); #endif /* _TLEN_PICTURE_H */ diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp index d37c9bcdc6..57bd773bf0 100644 --- a/protocols/Tlen/src/tlen_presence.cpp +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -26,7 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) { - HCONTACT hContact; + MCONTACT hContact; XmlNode *showNode, *statusNode; TLEN_LIST_ITEM *item; char *from, *type, *nick, *show; @@ -178,7 +178,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) void setOwnStatusOnCList(TlenProtocol *proto, int status, char *statusMsg) { ptrA ownJid(db_get_sa(NULL, proto->m_szModuleName, "jid")); - HCONTACT hContact = TlenHContactFromJID(proto, ownJid); + MCONTACT hContact = TlenHContactFromJID(proto, ownJid); if(hContact){ if (db_get_w(hContact, proto->m_szModuleName, "Status", ID_STATUS_OFFLINE) != status) db_set_w(hContact, proto->m_szModuleName, "Status", (WORD)status); diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 479026eb1b..4f996b8a38 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -33,7 +33,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "tlen_avatar.h"
#include "tlen_file.h"
-DWORD_PTR TlenProtocol::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR TlenProtocol::GetCaps(int type, MCONTACT hContact)
{
if (type == PFLAGNUM_1)
return PF1_IM|PF1_AUTHREQ|PF1_SERVERCLIST|PF1_MODEMSG|PF1_BASICSEARCH|PF1_SEARCHBYEMAIL|PF1_EXTSEARCH|PF1_EXTSEARCHUI|PF1_SEARCHBYNAME|PF1_FILE;//|PF1_VISLIST|PF1_INVISLIST;
@@ -175,15 +175,15 @@ HWND TlenProtocol::SearchAdvanced(HWND owner) }
-static HCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flags)
+static MCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD flags)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *jid, *nick;
if ((hContact=TlenHContactFromJID(proto, newJid)) == NULL) {
// not already there: add
jid = mir_strdup(newJid); _strlwr(jid);
- 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) proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if ((nick=TlenNickFromJID(newJid)) == NULL)
@@ -214,9 +214,9 @@ static HCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD fl return hContact;
}
-HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
+MCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr)
{
- HCONTACT hContact;
+ MCONTACT hContact;
TLEN_SEARCH_RESULT *jsr = (TLEN_SEARCH_RESULT*)psr;
if (jsr->hdr.cbSize != sizeof(TLEN_SEARCH_RESULT))
return NULL;
@@ -224,7 +224,7 @@ HCONTACT TlenProtocol::AddToList(int flags, PROTOSEARCHRESULT *psr) return hContact;
}
-HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
+MCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEvent )
{
DBEVENTINFO dbei = { sizeof(dbei) };
if ((dbei.cbBlob = db_event_getBlobSize(hDbEvent)) == (DWORD)(-1))
@@ -257,7 +257,7 @@ HCONTACT TlenProtocol::AddToListByEvent( int flags, int iContact, HANDLE hDbEven char *lastName = firstName + strlen(firstName) + 1;
char *jid = lastName + strlen(lastName) + 1;
- HCONTACT hContact = (HCONTACT) AddToListByJID(this, jid, flags);
+ MCONTACT hContact = (MCONTACT) AddToListByJID(this, jid, flags);
mir_free(dbei.pBlob);
return hContact;
}
@@ -294,7 +294,7 @@ int TlenProtocol::Authorize(HANDLE hDbEvent) // Automatically add this user to my roster if option is enabled
if (db_get_b(NULL, m_szModuleName, "AutoAdd", TRUE) == TRUE) {
- HCONTACT hContact;
+ MCONTACT hContact;
TLEN_LIST_ITEM *item;
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, jid)) == NULL || (item->subscription != SUB_BOTH && item->subscription != SUB_TO)) {
@@ -473,7 +473,7 @@ int TlenProtocol::SetAwayMsg(int iStatus, const PROTOCHAR* msg) return 0;
}
-int TlenProtocol::GetInfo(HCONTACT hContact, int infoType)
+int TlenProtocol::GetInfo(MCONTACT hContact, int infoType)
{
DBVARIANT dbv;
int iqId;
@@ -500,7 +500,7 @@ int TlenProtocol::GetInfo(HCONTACT hContact, int infoType) return 0;
}
-int TlenProtocol::SetApparentMode(HCONTACT hContact, int mode)
+int TlenProtocol::SetApparentMode(MCONTACT hContact, int mode)
{
DBVARIANT dbv;
int oldMode;
@@ -539,12 +539,12 @@ int TlenProtocol::SetApparentMode(HCONTACT hContact, int mode) struct SENDACKTHREADDATA
{
- __inline SENDACKTHREADDATA(TlenProtocol *_ppro, HCONTACT _hContact, int _msgid=0) :
+ __inline SENDACKTHREADDATA(TlenProtocol *_ppro, MCONTACT _hContact, int _msgid=0) :
proto(_ppro), hContact(_hContact), msgid(_msgid)
{}
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
int msgid;
};
@@ -599,7 +599,7 @@ static void __cdecl TlenGetAwayMsgThread(void *ptr) INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (isOnline && !db_get(hContact, m_szModuleName, "jid", &dbv)) {
TlenSend(this, "<m tp='a' to='%s'/>", dbv.pszVal);
@@ -609,7 +609,7 @@ INT_PTR TlenProtocol::SendAlert(WPARAM wParam, LPARAM lParam) return 0;
}
-int TlenProtocol::SendMsg(HCONTACT hContact, int flags, const char* msgRAW)
+int TlenProtocol::SendMsg(MCONTACT hContact, int flags, const char* msgRAW)
{
DBVARIANT dbv;
char *msgEnc;
@@ -717,19 +717,19 @@ INT_PTR TlenProtocol::GetAvatarInfo(WPARAM wParam, LPARAM lParam) return GAIR_NOAVATAR;
}
-HANDLE TlenProtocol::GetAwayMsg(HCONTACT hContact)
+HANDLE TlenProtocol::GetAwayMsg(MCONTACT hContact)
{
SENDACKTHREADDATA *tdata = new SENDACKTHREADDATA(this, hContact, 0);
forkthread((void (__cdecl *)(void*))TlenGetAwayMsgThread, 0, (void*)tdata);
return (HANDLE)1;
}
-int TlenProtocol::RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt)
+int TlenProtocol::RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt)
{
return 0;
}
-HANDLE TlenProtocol::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE TlenProtocol::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
TLEN_FILE_TRANSFER *ft;
TLEN_LIST_ITEM *item;
@@ -752,7 +752,7 @@ HANDLE TlenProtocol::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOC return (HANDLE)hTransfer;
}
-int TlenProtocol::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+int TlenProtocol::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
TLEN_FILE_TRANSFER *ft;
char *nick;
@@ -775,7 +775,7 @@ int TlenProtocol::FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** sz return 0;
}
-int TlenProtocol::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int TlenProtocol::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
TLEN_FILE_TRANSFER *ft = (TLEN_FILE_TRANSFER *) hTransfer;
debugLogA("Invoking FileCancel()");
@@ -794,7 +794,7 @@ int TlenProtocol::FileCancel(HCONTACT hContact, HANDLE hTransfer) return 0;
}
-HANDLE TlenProtocol::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+HANDLE TlenProtocol::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
TLEN_FILE_TRANSFER *ft;
int i, j;
@@ -862,25 +862,25 @@ HANDLE TlenProtocol::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, return (HANDLE) ft;
}
-int TlenProtocol::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList){
+int TlenProtocol::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList){
return 0;
}
-int TlenProtocol::SendUrl(HCONTACT hContact, int flags, const char* urlt){
+int TlenProtocol::SendUrl(MCONTACT hContact, int flags, const char* urlt){
return 0;
}
-int TlenProtocol::RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
{
return Proto_RecvMessage(hContact, evt);
}
-int TlenProtocol::RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+int TlenProtocol::RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
return Proto_RecvFile(hContact, evt);
}
-int TlenProtocol::RecvUrl(HCONTACT hContact, PROTORECVEVENT*)
+int TlenProtocol::RecvUrl(MCONTACT hContact, PROTORECVEVENT*)
{
return 0;
}
@@ -904,12 +904,12 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) if (!isConnected) return 0;
if (!strcmp(cws->szModule, "CList")) {
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
char *szProto, *nick, *jid, *group;
- hContact = (HCONTACT) wParam;
+ hContact = (MCONTACT) wParam;
szProto = GetContactProto(hContact);
if (szProto == NULL || strcmp(szProto, m_szModuleName)) return 0;
// A contact's group is changed
@@ -956,7 +956,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) else if (!strcmp(cws->szSetting, "MyHandle")) {
char *newNick;
-// hContact = (HCONTACT) wParam;
+// hContact = (MCONTACT) wParam;
// szProto = GetContactProto(hContact);
// if (szProto == NULL || strcmp(szProto, proto->m_szModuleName)) return 0;
@@ -1035,12 +1035,12 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) if (!isOnline) // should never happen
return 0;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL || strcmp(szProto, m_szModuleName))
return 0;
DBVARIANT dbv;
- if (!db_get((HCONTACT)wParam, m_szModuleName, "jid", &dbv)) {
+ if (!db_get((MCONTACT)wParam, m_szModuleName, "jid", &dbv)) {
char *jid, *p, *q;
jid = dbv.pszVal;
@@ -1058,7 +1058,7 @@ int TlenProtocol::TlenContactDeleted(WPARAM wParam, LPARAM lParam) return 0;
}
-int TlenProtocol::UserIsTyping(HCONTACT hContact, int type)
+int TlenProtocol::UserIsTyping(MCONTACT hContact, int type)
{
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
@@ -1200,13 +1200,13 @@ int TlenProtocol::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lPara }
// PSS_ADDED
-int TlenProtocol::AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
{
return 1;
}
// PSS_AUTHREQUEST
-int TlenProtocol::AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage)
+int TlenProtocol::AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage)
{
return 1;
}
@@ -1217,7 +1217,7 @@ HANDLE TlenProtocol::ChangeInfo(int iInfoType, void* pInfoData) }
-int TlenProtocol::RecvContacts(HCONTACT hContact, PROTORECVEVENT* evt)
+int TlenProtocol::RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt)
{
return 1;
}
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index 40ae861fcf..460f3d860f 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -352,7 +352,7 @@ void __cdecl TlenServerThread(ThreadData *info) ProtoBroadcastAck(szProto, NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE) oldStatus, info->proto->m_iStatus);
// Set all contacts to offline
- 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))
if (db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
db_set_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
@@ -595,7 +595,7 @@ static void TlenProcessAvatar(XmlNode* node, ThreadData *info) static void TlenProcessMessage(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *bodyNode, *subjectNode, *xNode, *n;
char *from, *type, *nick, *p, *localMessage, *idStr;
DWORD msgTime;
@@ -728,7 +728,7 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) static void TlenProcessIq(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
XmlNode *queryNode = NULL;
char *type, *jid, *nick;
char *xmlns = NULL;
@@ -960,7 +960,7 @@ static void TlenProcessIq(XmlNode *node, ThreadData *info) */
static void TlenProcessW(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *f, *e, *s, *body;
char *str, *localMessage;
int strSize;
@@ -1007,7 +1007,7 @@ static void TlenProcessW(XmlNode *node, ThreadData *info) */
static void TlenProcessM(XmlNode *node, ThreadData *info)
{
- HCONTACT hContact;
+ MCONTACT hContact;
char *f;//, *from;//username
char *tp;//typing start/stop
char *p, *n, *r, *s, *str, *localMessage;
diff --git a/protocols/Tlen/src/tlen_userinfo.cpp b/protocols/Tlen/src/tlen_userinfo.cpp index 22ed3651e7..108214ebf2 100644 --- a/protocols/Tlen/src/tlen_userinfo.cpp +++ b/protocols/Tlen/src/tlen_userinfo.cpp @@ -132,7 +132,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) if (!CallService(MS_PROTO_ISPROTOCOLLOADED, 0, (LPARAM)m_szModuleName))
return 0;
- HCONTACT hContact = (HCONTACT) lParam;
+ MCONTACT hContact = (MCONTACT) lParam;
char *szProto = GetContactProto(hContact);
if ((szProto != NULL && !strcmp(szProto, m_szModuleName)) || !lParam) {
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
@@ -155,7 +155,7 @@ int TlenProtocol::UserInfoInit(WPARAM wParam, LPARAM lParam) typedef struct {
TlenProtocol *proto;
- HCONTACT hContact;
+ MCONTACT hContact;
}TLENUSERINFODLGDATA;
@@ -166,7 +166,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara case WM_INITDIALOG:
data = (TLENUSERINFODLGDATA*)mir_alloc(sizeof(TLENUSERINFODLGDATA));
- data->hContact = (HCONTACT) lParam;
+ data->hContact = (MCONTACT) lParam;
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)data);
// lParam is hContact
TranslateDialogDefault(hwndDlg);
@@ -286,7 +286,7 @@ static INT_PTR CALLBACK TlenUserInfoDlgProc(HWND hwndDlg, UINT msg, WPARAM wPara switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT) ((LPPSHNOTIFY) lParam)->lParam;
+ MCONTACT hContact = (MCONTACT) ((LPPSHNOTIFY) lParam)->lParam;
SendMessage(hwndDlg, WM_TLEN_REFRESH, 0, (LPARAM) hContact);
}
break;
diff --git a/protocols/Tlen/src/tlen_util.cpp b/protocols/Tlen/src/tlen_util.cpp index 8f8837454b..981c6da6fb 100644 --- a/protocols/Tlen/src/tlen_util.cpp +++ b/protocols/Tlen/src/tlen_util.cpp @@ -440,7 +440,7 @@ BOOL IsAuthorized(TlenProtocol *proto, const char *jid) }
-void TlenLogMessage(TlenProtocol *proto, HCONTACT hContact, DWORD flags, const char *message)
+void TlenLogMessage(TlenProtocol *proto, MCONTACT hContact, DWORD flags, const char *message)
{
int size = (int)strlen(message) + 2;
char *localMessage = (char *)mir_alloc(size);
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index 57cab89d2a..dca3634307 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -693,14 +693,14 @@ int TlenVoiceCancelAll(TlenProtocol *proto) INT_PTR TlenProtocol::VoiceContactMenuHandleVoice(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
TLEN_LIST_ITEM *item;
TLEN_FILE_TRANSFER *ft;
if (!isOnline)
return 1;
- if ((hContact=(HCONTACT)wParam) != NULL) {
+ if ((hContact=(MCONTACT)wParam) != NULL) {
if (!db_get(hContact, m_szModuleName, "jid", &dbv)) {
char serialId[32];
mir_snprintf(serialId, SIZEOF(serialId), "%d", TlenSerialNext(this));
@@ -942,7 +942,7 @@ int TlenVoiceStart(TLEN_FILE_TRANSFER *ft, int mode) static char *getDisplayName(TlenProtocol *proto, const char *id)
{
char jid[256];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp index df581c8586..d08e1c81e7 100644 --- a/protocols/Twitter/src/chat.cpp +++ b/protocols/Twitter/src/chat.cpp @@ -39,7 +39,7 @@ void TwitterProto::UpdateChat(const twitter_user &update) gce.time = static_cast<DWORD>(update.status.time);
DBVARIANT nick;
- HCONTACT hContact = UsernameToHContact(update.username.c_str());
+ MCONTACT hContact = UsernameToHContact(update.username.c_str());
if(hContact && !db_get_s(hContact,"CList","MyHandle",&nick))
{
gce.ptszNick = mir_a2t(nick.pszVal);
@@ -163,7 +163,7 @@ void TwitterProto::SetChatStatus(int status) if(status == ID_STATUS_ONLINE)
{
// Add all friends to contact list
- for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for(MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if( isChatRoom(hContact))
continue;
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp index bb332624e4..e13ee2a66b 100644 --- a/protocols/Twitter/src/connection.cpp +++ b/protocols/Twitter/src/connection.cpp @@ -25,7 +25,7 @@ void CALLBACK TwitterProto::APC_callback(ULONG_PTR p) }
template<typename T>
-inline static T db_pod_get(HCONTACT hContact,const char *module,const char *setting,T errorValue)
+inline static T db_pod_get(MCONTACT hContact,const char *module,const char *setting,T errorValue)
{
DBVARIANT dbv;
if(db_get(hContact, module, setting, &dbv))
@@ -41,7 +41,7 @@ inline static T db_pod_get(HCONTACT hContact,const char *module,const char *sett }
template<typename T>
-inline static INT_PTR db_pod_set(HCONTACT hContact,const char *module,const char *setting,T val)
+inline static INT_PTR db_pod_set(MCONTACT hContact,const char *module,const char *setting,T val)
{
return db_set_blob(hContact, module, setting, &val, sizeof(T));
}
@@ -401,8 +401,8 @@ void TwitterProto::MessageLoop(void*) struct update_avatar
{
- update_avatar(HCONTACT hContact,const std::string &url) : hContact(hContact),url(url) {}
- HCONTACT hContact;
+ update_avatar(MCONTACT hContact,const std::string &url) : hContact(hContact),url(url) {}
+ MCONTACT hContact;
std::string url;
};
@@ -454,7 +454,7 @@ void TwitterProto::UpdateAvatarWorker(void *p) debugLogA( _T("***** Done avatar: %s"),data->url.c_str());
}
-void TwitterProto::UpdateAvatar(HCONTACT hContact,const std::string &url,bool force)
+void TwitterProto::UpdateAvatar(MCONTACT hContact,const std::string &url,bool force)
{
DBVARIANT dbv = {0};
@@ -493,7 +493,7 @@ void TwitterProto::UpdateFriends() if(i->username == twit_.get_username())
continue;
- HCONTACT hContact = AddToClientList(i->username.c_str(),i->status.text.c_str());
+ MCONTACT hContact = AddToClientList(i->username.c_str(),i->status.text.c_str());
UpdateAvatar(hContact,i->profile_image_url);
}
disconnectionCount = 0;
@@ -516,7 +516,7 @@ void TwitterProto::UpdateFriends() }
-void TwitterProto::ShowContactPopup(HCONTACT hContact,const std::string &text)
+void TwitterProto::ShowContactPopup(MCONTACT hContact,const std::string &text)
{
if(!ServiceExists(MS_POPUP_ADDPOPUPT) || db_get_b(0,m_szModuleName,TWITTER_KEY_POPUP_SHOW,0) == 0)
{
@@ -565,7 +565,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg) if(i->username == twit_.get_username())
continue;
- HCONTACT hContact = AddToClientList(i->username.c_str(),"");
+ MCONTACT hContact = AddToClientList(i->username.c_str(),"");
UpdateAvatar(hContact,i->profile_image_url); // as UpdateFriends() doesn't work at the moment, i'm going to update the avatars here
// i think we maybe should just do that DBEF_READ line instead of stopping ALL this code. have to test.
@@ -620,7 +620,7 @@ void TwitterProto::UpdateMessages(bool pre_read) for(twitter::status_list::reverse_iterator i=messages.rbegin(); i!=messages.rend(); ++i)
{
- HCONTACT hContact = AddToClientList(i->username.c_str(),"");
+ MCONTACT hContact = AddToClientList(i->username.c_str(),"");
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_UTF;
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp index 3cb24db577..c78c28f914 100644 --- a/protocols/Twitter/src/contacts.cpp +++ b/protocols/Twitter/src/contacts.cpp @@ -32,7 +32,7 @@ void TwitterProto::AddToListWorker(void *p) twitter_user user = twit_.add_friend(name);
s.Unlock();
- HCONTACT hContact = UsernameToHContact(name);
+ MCONTACT hContact = UsernameToHContact(name);
UpdateAvatar(hContact,user.profile_image_url);
}
catch(const std::exception &e)
@@ -43,7 +43,7 @@ void TwitterProto::AddToListWorker(void *p) mir_free(name);
}
-HCONTACT TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
+MCONTACT TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -60,7 +60,7 @@ void TwitterProto::UpdateInfoWorker(void *hContact) std::string username;
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)hContact, m_szModuleName, TWITTER_KEY_UN, &dbv))
+ if (!db_get_s((MCONTACT)hContact, m_szModuleName, TWITTER_KEY_UN, &dbv))
{
username = dbv.pszVal;
db_free(&dbv);
@@ -73,11 +73,11 @@ void TwitterProto::UpdateInfoWorker(void *hContact) twit_.get_info(username,&user);
}
- UpdateAvatar((HCONTACT)hContact, user.profile_image_url, true);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, 0, 0);
+ UpdateAvatar((MCONTACT)hContact, user.profile_image_url, true);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, 0, 0);
}
-int TwitterProto::GetInfo(HCONTACT hContact,int info_type)
+int TwitterProto::GetInfo(MCONTACT hContact,int info_type)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 1;
@@ -170,14 +170,14 @@ void TwitterProto::GetAwayMsgWorker(void *hContact) return;
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ if (!db_get_ts((MCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
- else ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
+ else ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
}
-HANDLE TwitterProto::GetAwayMsg(HCONTACT hContact)
+HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact)
{
ForkThread(&TwitterProto::GetAwayMsgWorker, (void*)hContact);
return (HANDLE)1;
@@ -188,7 +188,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam) if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if(!IsMyContact(hContact))
return 0;
@@ -208,7 +208,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam) // *************************
-bool TwitterProto::IsMyContact(HCONTACT hContact,bool include_chat)
+bool TwitterProto::IsMyContact(MCONTACT hContact,bool include_chat)
{
char *proto = GetContactProto(hContact);
if(proto && strcmp(m_szModuleName,proto) == 0) {
@@ -219,9 +219,9 @@ bool TwitterProto::IsMyContact(HCONTACT hContact,bool include_chat) else return false;
}
-HCONTACT TwitterProto::UsernameToHContact(const char *name)
+MCONTACT TwitterProto::UsernameToHContact(const char *name)
{
- for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for(MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
{
if( db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
continue;
@@ -242,10 +242,10 @@ HCONTACT TwitterProto::UsernameToHContact(const char *name) return 0;
}
-HCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
+MCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
{
// First, check if this contact exists
- HCONTACT hContact = UsernameToHContact(name);
+ MCONTACT hContact = UsernameToHContact(name);
if(hContact)
return hContact;
@@ -253,7 +253,7 @@ HCONTACT TwitterProto::AddToClientList(const char *name, const char *status) AddChatContact(name);
// If not, make a new contact!
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
@@ -282,7 +282,7 @@ HCONTACT TwitterProto::AddToClientList(const char *name, const char *status) void TwitterProto::SetAllContactStatuses(int status)
{
- for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for(MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if( !db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
db_set_w(hContact,m_szModuleName,"Status",status);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp index 6ec565871f..e9ee5618c9 100644 --- a/protocols/Twitter/src/proto.cpp +++ b/protocols/Twitter/src/proto.cpp @@ -88,7 +88,7 @@ TwitterProto::~TwitterProto() // *************************
-DWORD_PTR TwitterProto::GetCaps(int type, HCONTACT)
+DWORD_PTR TwitterProto::GetCaps(int type, MCONTACT)
{
switch(type)
{
@@ -113,7 +113,7 @@ DWORD_PTR TwitterProto::GetCaps(int type, HCONTACT) // *************************
-int TwitterProto::RecvMsg(HCONTACT hContact,PROTORECVEVENT *pre)
+int TwitterProto::RecvMsg(MCONTACT hContact,PROTORECVEVENT *pre)
{
Proto_RecvMessage(hContact, pre);
return 0;
@@ -123,11 +123,11 @@ int TwitterProto::RecvMsg(HCONTACT hContact,PROTORECVEVENT *pre) struct send_direct
{
- __inline send_direct(HCONTACT _hContact, const std::string &_msg, int _msgid) :
+ __inline send_direct(MCONTACT _hContact, const std::string &_msg, int _msgid) :
hContact(_hContact), msg(_msg), msgid(_msgid)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
std::string msg;
int msgid;
};
@@ -151,7 +151,7 @@ void TwitterProto::SendSuccess(void *p) delete data;
}
-int TwitterProto::SendMsg(HCONTACT hContact,int flags,const char *msg)
+int TwitterProto::SendMsg(MCONTACT hContact,int flags,const char *msg)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -246,7 +246,7 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM) INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
{
// TODO: support replying to tweets instead of just users
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
@@ -264,7 +264,7 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM) INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
// TODO: remove this
@@ -398,7 +398,7 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM) int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
@@ -495,8 +495,8 @@ void TwitterProto::UpdateSettings() if(in_chat_)
OnLeaveChat(0,0);
- for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
- HCONTACT hNext = db_find_next(hContact, m_szModuleName);
+ for(MCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact, m_szModuleName);
if(isChatRoom(hContact))
CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
hContact = hNext;
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h index 68a7cb3b27..7ad5188626 100644 --- a/protocols/Twitter/src/proto.h +++ b/protocols/Twitter/src/proto.h @@ -36,23 +36,23 @@ public: //PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList(int,PROTOSEARCHRESULT *);
- virtual HCONTACT __cdecl AddToListByEvent(int,int,HANDLE);
+ virtual MCONTACT __cdecl AddToList(int,PROTOSEARCHRESULT *);
+ virtual MCONTACT __cdecl AddToListByEvent(int,int,HANDLE);
virtual int __cdecl Authorize(HANDLE);
virtual int __cdecl AuthDeny(HANDLE,const TCHAR *);
- virtual int __cdecl AuthRecv(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl AuthRequest(HCONTACT, const TCHAR *);
+ virtual int __cdecl AuthRecv(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl AuthRequest(MCONTACT, const TCHAR *);
virtual HANDLE __cdecl ChangeInfo(int,void *);
- virtual HANDLE __cdecl FileAllow(HCONTACT, HANDLE, const TCHAR *);
- virtual int __cdecl FileCancel(HCONTACT, HANDLE);
- virtual int __cdecl FileDeny(HCONTACT, HANDLE, const TCHAR *);
+ virtual HANDLE __cdecl FileAllow(MCONTACT, HANDLE, const TCHAR *);
+ virtual int __cdecl FileCancel(MCONTACT, HANDLE);
+ virtual int __cdecl FileDeny(MCONTACT, HANDLE, const TCHAR *);
virtual int __cdecl FileResume(HANDLE, int *, const TCHAR **);
- virtual DWORD_PTR __cdecl GetCaps(int, HCONTACT = 0);
- virtual int __cdecl GetInfo(HCONTACT, int);
+ virtual DWORD_PTR __cdecl GetCaps(int, MCONTACT = 0);
+ virtual int __cdecl GetInfo(MCONTACT, int);
virtual HANDLE __cdecl SearchBasic(const TCHAR *);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *);
@@ -60,24 +60,24 @@ public: virtual HWND __cdecl SearchAdvanced(HWND);
virtual HWND __cdecl CreateExtendedSearchUI(HWND);
- virtual int __cdecl RecvContacts(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl RecvFile(HCONTACT, PROTORECVFILET *);
- virtual int __cdecl RecvMsg(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl RecvUrl(HCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvContacts(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvFile(MCONTACT, PROTORECVFILET *);
+ virtual int __cdecl RecvMsg(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvUrl(MCONTACT, PROTORECVEVENT *);
- virtual int __cdecl SendContacts(HCONTACT, int, int, HCONTACT*);
- virtual HANDLE __cdecl SendFile(HCONTACT, const TCHAR *, TCHAR **);
- virtual int __cdecl SendMsg(HCONTACT, int, const char *);
- virtual int __cdecl SendUrl(HCONTACT, int, const char *);
+ virtual int __cdecl SendContacts(MCONTACT, int, int, MCONTACT*);
+ virtual HANDLE __cdecl SendFile(MCONTACT, const TCHAR *, TCHAR **);
+ virtual int __cdecl SendMsg(MCONTACT, int, const char *);
+ virtual int __cdecl SendUrl(MCONTACT, int, const char *);
- virtual int __cdecl SetApparentMode(HCONTACT, int);
+ virtual int __cdecl SetApparentMode(MCONTACT, int);
virtual int __cdecl SetStatus(int);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT);
- virtual int __cdecl RecvAwayMsg(HCONTACT, int, PROTORECVEVENT *);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT);
+ virtual int __cdecl RecvAwayMsg(MCONTACT, int, PROTORECVEVENT *);
virtual int __cdecl SetAwayMsg(int,const TCHAR *);
- virtual int __cdecl UserIsTyping(HCONTACT, int);
+ virtual int __cdecl UserIsTyping(MCONTACT, int);
virtual int __cdecl OnEvent(PROTOEVENTTYPE,WPARAM,LPARAM);
@@ -123,16 +123,16 @@ private: void UpdateStatuses(bool pre_read,bool popups, bool tweetToMsg);
void UpdateMessages(bool pre_read);
void UpdateFriends();
- void UpdateAvatar(HCONTACT, const std::string &, bool force = false);
+ void UpdateAvatar(MCONTACT, const std::string &, bool force = false);
int ShowPinDialog();
void ShowPopup(const wchar_t *, int Error = 0);
void ShowPopup(const char *, int Error = 0);
- void ShowContactPopup(HCONTACT, const std::string &);
+ void ShowContactPopup(MCONTACT, const std::string &);
- bool IsMyContact(HCONTACT, bool include_chat = false);
- HCONTACT UsernameToHContact(const char *);
- HCONTACT AddToClientList(const char *, const char *);
+ bool IsMyContact(MCONTACT, bool include_chat = false);
+ MCONTACT UsernameToHContact(const char *);
+ MCONTACT AddToClientList(const char *, const char *);
void SetAllContactStatuses(int);
void debugLogA(TCHAR *fmt,...);
diff --git a/protocols/Twitter/src/stubs.cpp b/protocols/Twitter/src/stubs.cpp index 9b8fc7deea..a959f6d487 100644 --- a/protocols/Twitter/src/stubs.cpp +++ b/protocols/Twitter/src/stubs.cpp @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "proto.h"
-HCONTACT TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
@@ -32,12 +32,12 @@ int TwitterProto::AuthDeny(HANDLE hDbEvent,const TCHAR *reason) return 1;
}
-int TwitterProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::AuthRequest(HCONTACT hContact,const TCHAR *message)
+int TwitterProto::AuthRequest(MCONTACT hContact,const TCHAR *message)
{
return 1;
}
@@ -48,17 +48,17 @@ HANDLE TwitterProto::ChangeInfo(int type,void *info_data) return NULL;
}
-HANDLE TwitterProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const TCHAR *path)
+HANDLE TwitterProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const TCHAR *path)
{
return NULL;
}
-int TwitterProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
+int TwitterProto::FileCancel(MCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int TwitterProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const TCHAR *reason)
+int TwitterProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const TCHAR *reason)
{
return 1;
}
@@ -83,42 +83,42 @@ HWND TwitterProto::CreateExtendedSearchUI(HWND owner) return NULL;
}
-int TwitterProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
+int TwitterProto::RecvFile(MCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int TwitterProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int TwitterProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
-HANDLE TwitterProto::SendFile(HCONTACT hContact,const TCHAR *desc, TCHAR **files)
+HANDLE TwitterProto::SendFile(MCONTACT hContact,const TCHAR *desc, TCHAR **files)
{
return NULL;
}
-int TwitterProto::SendUrl(HCONTACT hContact,int flags,const char *url)
+int TwitterProto::SendUrl(MCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int TwitterProto::SetApparentMode(HCONTACT hContact,int mode)
+int TwitterProto::SetApparentMode(MCONTACT hContact,int mode)
{
return 1;
}
-int TwitterProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int TwitterProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
@@ -128,7 +128,7 @@ int TwitterProto::SetAwayMsg(int status,const TCHAR *msg) return 1;
}
-int TwitterProto::UserIsTyping(HCONTACT hContact,int type)
+int TwitterProto::UserIsTyping(MCONTACT hContact,int type)
{
return 1;
}
\ No newline at end of file diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp index 81891adc44..7b0a6a6eac 100644 --- a/protocols/Twitter/src/theme.cpp +++ b/protocols/Twitter/src/theme.cpp @@ -52,7 +52,7 @@ static HGENMENU g_hMenuItems[2]; static HANDLE g_hMenuEvts[3];
// Helper functions
-static TwitterProto * GetInstanceByHContact(HCONTACT hContact)
+static TwitterProto * GetInstanceByHContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if(!proto)
@@ -68,7 +68,7 @@ static TwitterProto * GetInstanceByHContact(HCONTACT hContact) template<INT_PTR (__cdecl TwitterProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- TwitterProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ TwitterProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
@@ -76,7 +76,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam) {
ShowContactMenus(false);
- TwitterProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ TwitterProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp index 91c5f96ec5..9d8dfdd924 100644 --- a/protocols/Twitter/src/ui.cpp +++ b/protocols/Twitter/src/ui.cpp @@ -385,7 +385,7 @@ namespace popup_options POPUPDATAT popup = {};
// Pick a random contact
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
int n_contacts = (int)CallService(MS_DB_CONTACT_GETCOUNT,0,0);
if(n_contacts != 0)
diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index b36ea81976..58d3b356ba 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -25,7 +25,7 @@ TCHAR* CVkProto::GetUserStoredPassword() void CVkProto::SetAllContactStatuses(int iStatus)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (isChatRoom(hContact))
SetChatStatus(hContact, iStatus);
else if (getWord(hContact, "Status", 0) != iStatus)
@@ -33,9 +33,9 @@ void CVkProto::SetAllContactStatuses(int iStatus) }
}
-HCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate)
+MCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
LONG dbUserid = getDword(hContact, "ID", -1);
if (dbUserid == -1)
continue;
@@ -47,7 +47,7 @@ HCONTACT CVkProto::FindUser(LONG dwUserid, bool bCreate) if (!bCreate)
return NULL;
- HCONTACT hNewContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hNewContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hNewContact, (LPARAM)m_szModuleName);
setDword(hNewContact, "ID", dwUserid);
db_set_ts(hNewContact, "CList", "Group", m_defaultGroup);
diff --git a/protocols/VKontakte/src/vk_avatars.cpp b/protocols/VKontakte/src/vk_avatars.cpp index 15c56ba41a..560bf5dd75 100644 --- a/protocols/VKontakte/src/vk_avatars.cpp +++ b/protocols/VKontakte/src/vk_avatars.cpp @@ -23,18 +23,18 @@ void CVkProto::OnReceiveAvatar(NETLIBHTTPREQUEST *reply, AsyncHttpRequest* pReq) return;
PROTO_AVATAR_INFORMATIONT AI = { sizeof(AI) };
- GetAvatarFileName((HCONTACT)pReq->pUserInfo, AI.filename, SIZEOF(AI.filename));
+ GetAvatarFileName((MCONTACT)pReq->pUserInfo, AI.filename, SIZEOF(AI.filename));
AI.format = ProtoGetBufferFormat(reply->pData);
FILE *out = _tfopen(AI.filename, _T("wb"));
if (out == NULL) {
- ProtoBroadcastAck((HCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
+ ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_FAILED, &AI, 0);
return;
}
fwrite(reply->pData, 1, reply->dataLength, out);
fclose(out);
- ProtoBroadcastAck((HCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
+ ProtoBroadcastAck((MCONTACT)pReq->pUserInfo, ACKTYPE_AVATAR, ACKRESULT_SUCCESS, &AI, 0);
}
INT_PTR CVkProto::SvcGetAvatarCaps(WPARAM wParam, LPARAM lParam)
@@ -93,7 +93,7 @@ INT_PTR CVkProto::SvcGetAvatarInfo(WPARAM wParam, LPARAM lParam) return GAIR_NOAVATAR;
}
-void CVkProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen)
+void CVkProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
@@ -115,7 +115,7 @@ void CVkProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen mir_sntprintf(pszDest + tPathLen, MAX_PATH - tPathLen, _T("%d%s"), id, szFileType);
}
-void CVkProto::SetAvatarUrl(HCONTACT hContact, LPCTSTR ptszUrl)
+void CVkProto::SetAvatarUrl(MCONTACT hContact, LPCTSTR ptszUrl)
{
ptrT oldUrl( getTStringA(hContact, "AvatarUrl"));
if (!lstrcmp(ptszUrl, oldUrl))
diff --git a/protocols/VKontakte/src/vk_chats.cpp b/protocols/VKontakte/src/vk_chats.cpp index 31b583c62c..b8dfa1257b 100644 --- a/protocols/VKontakte/src/vk_chats.cpp +++ b/protocols/VKontakte/src/vk_chats.cpp @@ -287,7 +287,7 @@ CVkChatUser* CVkChatInfo::GetUserById(LPCTSTR ptszId) /////////////////////////////////////////////////////////////////////////////////////////
-void CVkProto::SetChatStatus(HCONTACT hContact, int iStatus)
+void CVkProto::SetChatStatus(MCONTACT hContact, int iStatus)
{
ptrT tszChatID(getTStringA(hContact, "ChatRoomID"));
if (tszChatID == NULL)
@@ -372,7 +372,7 @@ static INT_PTR CALLBACK InviteDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPA {
CVkProto *ppro = (CVkProto*)lParam;
HWND hwndCombo = GetDlgItem(hwndDlg, IDC_CONTACT);
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
TCHAR *ptszNick = pcli->pfnGetContactDisplayName(hContact, 0);
int idx = SendMessage(hwndCombo, CB_ADDSTRING, 0, LPARAM(ptszNick));
SendMessage(hwndCombo, CB_SETITEMDATA, idx, (LPARAM)hContact);
@@ -413,7 +413,7 @@ LPTSTR CVkProto::ChangeChatTopic(CVkChatInfo *cc) void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch)
{
- HCONTACT hContact;
+ MCONTACT hContact;
switch (gch->dwData) {
case IDM_TOPIC:
@@ -425,7 +425,7 @@ void CVkProto::LogMenuHook(CVkChatInfo *cc, GCHOOK *gch) break;
case IDM_INVITE:
- hContact = (HCONTACT)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INVITE), NULL, InviteDlgProc, (LPARAM)this);
+ hContact = (MCONTACT)DialogBoxParam(hInst, MAKEINTRESOURCE(IDD_INVITE), NULL, InviteDlgProc, (LPARAM)this);
if (hContact != NULL) {
int uid = getDword(hContact, "ID", -1);
if (uid != -1)
@@ -474,7 +474,7 @@ void CVkProto::NickMenuHook(CVkChatInfo *cc, GCHOOK *gch) switch (gch->dwData) {
case IDM_INFO:
- if (HCONTACT hContact = FindUser(cu->m_uid))
+ if (MCONTACT hContact = FindUser(cu->m_uid))
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
@@ -527,7 +527,7 @@ int CVkProto::OnGcMenuHook(WPARAM, LPARAM lParam) static void FilterContacts(HWND hwndDlg, CVkProto *ppro)
{
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
- 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 (lstrcmpA(proto, ppro->m_szModuleName) || ppro->isChatRoom(hContact))
if (HANDLE hItem = (HANDLE)SendMessage(hwndClist, CLM_FINDCONTACT, (WPARAM)hContact, 0))
@@ -585,7 +585,7 @@ static INT_PTR CALLBACK GcCreateDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDOK:
HWND hwndClist = GetDlgItem(hwndDlg, IDC_CLIST);
CMStringA uids;
- for (HCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(ppro->m_szModuleName); hContact; hContact = db_find_next(hContact, ppro->m_szModuleName)) {
if (ppro->isChatRoom(hContact))
continue;
diff --git a/protocols/VKontakte/src/vk_proto.cpp b/protocols/VKontakte/src/vk_proto.cpp index 3e52d04e5f..f1697284c2 100644 --- a/protocols/VKontakte/src/vk_proto.cpp +++ b/protocols/VKontakte/src/vk_proto.cpp @@ -103,7 +103,7 @@ int CVkProto::OnPreShutdown(WPARAM wParam, LPARAM lParam) //////////////////////////////////////////////////////////////////////////////
-DWORD_PTR CVkProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR CVkProto::GetCaps(int type, MCONTACT hContact)
{
switch(type) {
case PFLAGNUM_1:
@@ -135,7 +135,7 @@ DWORD_PTR CVkProto::GetCaps(int type, HCONTACT hContact) //////////////////////////////////////////////////////////////////////////////
-int CVkProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int CVkProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
Proto_RecvMessage(hContact, pre);
return 0;
@@ -145,11 +145,11 @@ int CVkProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre) struct TFakeAckParams
{
- __inline TFakeAckParams(HCONTACT _hContact, int _msgid) :
+ __inline TFakeAckParams(MCONTACT _hContact, int _msgid) :
hContact(_hContact), msgid(_msgid)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
int msgid;
};
@@ -161,7 +161,7 @@ void CVkProto::SendMsgAck(void *param) delete ack;
}
-int CVkProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int CVkProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
LONG userID = getDword(hContact, "ID", -1);
if (userID == -1)
@@ -202,7 +202,7 @@ void CVkProto::OnSendMessage(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq) }
if (m_bServerDelivery)
- ProtoBroadcastAck((HCONTACT)pReq->pData, ACKTYPE_MESSAGE, iResult, pReq->pUserInfo, 0);
+ ProtoBroadcastAck((MCONTACT)pReq->pData, ACKTYPE_MESSAGE, iResult, pReq->pUserInfo, 0);
pReq->pData = NULL;
}
@@ -273,12 +273,12 @@ HANDLE CVkProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, return 0;
}
-HCONTACT CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT CVkProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
return NULL;
}
-int CVkProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
+int CVkProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message)
{
return 0;
}
@@ -295,17 +295,17 @@ int CVkProto::AuthDeny(HANDLE hDbEvent, const PROTOCHAR *reason) return 1;
}
-int CVkProto::UserIsTyping(HCONTACT hContact, int type)
+int CVkProto::UserIsTyping(MCONTACT hContact, int type)
{
return 0;
}
-HCONTACT CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT CVkProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
-int CVkProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
@@ -316,17 +316,17 @@ HANDLE CVkProto::ChangeInfo(int type,void *info_data) return NULL;
}
-HANDLE CVkProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
+HANDLE CVkProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
return NULL;
}
-int CVkProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
+int CVkProto::FileCancel(MCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int CVkProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
+int CVkProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
return 1;
}
@@ -336,7 +336,7 @@ int CVkProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filename return 1;
}
-int CVkProto::GetInfo(HCONTACT hContact, int infoType)
+int CVkProto::GetInfo(MCONTACT hContact, int infoType)
{
// TODO: Most probably some ProtoAck should be here instead
return 1;
@@ -352,47 +352,47 @@ HWND CVkProto::CreateExtendedSearchUI(HWND owner) return NULL;
}
-int CVkProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
+int CVkProto::RecvFile(MCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int CVkProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
+int CVkProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int CVkProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int CVkProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
-HANDLE CVkProto::SendFile(HCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE CVkProto::SendFile(MCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
return NULL;
}
-int CVkProto::SendUrl(HCONTACT hContact,int flags,const char *url)
+int CVkProto::SendUrl(MCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int CVkProto::SetApparentMode(HCONTACT hContact,int mode)
+int CVkProto::SetApparentMode(MCONTACT hContact,int mode)
{
return 1;
}
-int CVkProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int CVkProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
-HANDLE CVkProto::GetAwayMsg(HCONTACT hContact)
+HANDLE CVkProto::GetAwayMsg(MCONTACT hContact)
{
return 0; // Status messages are disabled
}
diff --git a/protocols/VKontakte/src/vk_proto.h b/protocols/VKontakte/src/vk_proto.h index 6d5eec5f1a..34b34b8f59 100644 --- a/protocols/VKontakte/src/vk_proto.h +++ b/protocols/VKontakte/src/vk_proto.h @@ -100,7 +100,7 @@ struct CVkChatInfo : public MZeroedObject int m_chatid, m_admin_id;
bool m_bHistoryRead;
ptrT m_tszTopic, m_tszId;
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
OBJLIST<CVkChatUser> m_users;
OBJLIST<CVkChatMessage> m_msgs;
@@ -116,23 +116,23 @@ struct CVkProto : public PROTO<CVkProto> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent);
virtual int __cdecl Authorize(HANDLE hDbEvent);
virtual int __cdecl AuthDeny(HANDLE hDbEvent, const TCHAR *szReason);
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR *szMessage);
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR *szMessage);
virtual HANDLE __cdecl ChangeInfo(int iInfoType, void* pInfoData);
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer);
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const TCHAR *szReason);
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** szFilename);
- virtual DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType);
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const TCHAR *id);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *email);
@@ -140,24 +140,24 @@ struct CVkProto : public PROTO<CVkProto> virtual HWND __cdecl SearchAdvanced(HWND owner);
virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg);
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url);
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const TCHAR *szDescription, TCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url);
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt);
virtual int __cdecl SetAwayMsg(int m_iStatus, const TCHAR *msg);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -259,10 +259,10 @@ private: void OnLoggedOut();
void ShutdownSession();
- void SetAvatarUrl(HCONTACT hContact, LPCTSTR ptszUrl);
- void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, size_t cbLen);
+ void SetAvatarUrl(MCONTACT hContact, LPCTSTR ptszUrl);
+ void GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, size_t cbLen);
- HCONTACT FindUser(LONG userid, bool bCreate = false);
+ MCONTACT FindUser(LONG userid, bool bCreate = false);
void SetAllContactStatuses(int status);
@@ -297,7 +297,7 @@ private: void LogMenuHook(CVkChatInfo*, GCHOOK*);
void NickMenuHook(CVkChatInfo*, GCHOOK*);
LPTSTR ChangeChatTopic(CVkChatInfo*);
- void SetChatStatus(HCONTACT hContact, int iStatus);
+ void SetChatStatus(MCONTACT hContact, int iStatus);
CVkChatInfo* GetChatById(LPCTSTR ptszId);
INT_PTR __cdecl SvcCreateChat(WPARAM, LPARAM);
diff --git a/protocols/VKontakte/src/vk_thread.cpp b/protocols/VKontakte/src/vk_thread.cpp index c8d729f540..9999f04590 100644 --- a/protocols/VKontakte/src/vk_thread.cpp +++ b/protocols/VKontakte/src/vk_thread.cpp @@ -249,7 +249,7 @@ void CVkProto::OnReceiveUserInfo(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (userid == 0)
return;
- HCONTACT hContact;
+ MCONTACT hContact;
if (userid == m_myUserId)
hContact = NULL;
else if ((hContact = FindUser(userid, false)) == NULL)
@@ -311,7 +311,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq bool bCleanContacts = getByte("AutoClean", 0) != 0;
LIST<void> arContacts(10, PtrKeySortT);
if (bCleanContacts)
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
if (!isChatRoom(hContact))
arContacts.insert((HANDLE)hContact);
@@ -321,7 +321,7 @@ void CVkProto::OnReceiveFriends(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pReq continue;
CMString tszNick;
- HCONTACT hContact = FindUser(_ttoi(szValue), true);
+ MCONTACT hContact = FindUser(_ttoi(szValue), true);
arContacts.remove(hContact);
szValue = json_as_string(json_get(pInfo, "first_name"));
if (szValue) {
@@ -468,7 +468,7 @@ void CVkProto::OnReceiveMessages(NETLIBHTTPREQUEST *reply, AsyncHttpRequest *pRe if (pAttachments != NULL)
ptszBody = mir_tstrdup(CMString(ptszBody) + GetAttachmentDescr(pAttachments));
- HCONTACT hContact = FindUser(uid, true);
+ MCONTACT hContact = FindUser(uid, true);
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_TCHAR;
@@ -523,7 +523,7 @@ void CVkProto::PollUpdates(JSONNODE *pUpdates) CMStringA mids;
int msgid, uid, flags;
- HCONTACT hContact;
+ MCONTACT hContact;
JSONNODE *pChild;
for (int i = 0; (pChild = json_at(pUpdates, i)) != NULL; i++) {
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp index 81fd154153..bef230ecfd 100644 --- a/protocols/WhatsApp/src/chat.cpp +++ b/protocols/WhatsApp/src/chat.cpp @@ -35,7 +35,7 @@ int WhatsAppProto::OnChatOutgoing(WPARAM wParam, LPARAM lParam) mir_free(id);
if (isOnline()) {
- HCONTACT hContact = this->ContactIDToHContact(chat_id);
+ MCONTACT hContact = this->ContactIDToHContact(chat_id);
if (hContact)
{
debugLogA("**Chat - Outgoing message: %s", text);
diff --git a/protocols/WhatsApp/src/contacts.cpp b/protocols/WhatsApp/src/contacts.cpp index d3cf75690c..49cdca0982 100644 --- a/protocols/WhatsApp/src/contacts.cpp +++ b/protocols/WhatsApp/src/contacts.cpp @@ -1,6 +1,6 @@ #include "common.h"
-bool WhatsAppProto::IsMyContact(HCONTACT hContact, bool include_chat)
+bool WhatsAppProto::IsMyContact(MCONTACT hContact, bool include_chat)
{
const char *proto = GetContactProto(hContact);
if( proto && strcmp(m_szModuleName,proto) == 0 )
@@ -14,10 +14,10 @@ bool WhatsAppProto::IsMyContact(HCONTACT hContact, bool include_chat) return false;
}
-HCONTACT WhatsAppProto::AddToContactList(const std::string& jid, BYTE type, bool dont_check, const char *new_name,
+MCONTACT WhatsAppProto::AddToContactList(const std::string& jid, BYTE type, bool dont_check, const char *new_name,
bool isChatRoom, bool isHidden)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (!dont_check) {
// First, check if this contact exists
@@ -55,7 +55,7 @@ HCONTACT WhatsAppProto::AddToContactList(const std::string& jid, BYTE type, bool }
// If not, make a new contact!
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact)
{
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)m_szModuleName) == 0)
@@ -111,20 +111,20 @@ HCONTACT WhatsAppProto::AddToContactList(const std::string& jid, BYTE type, bool else CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
}
- return (HCONTACT)INVALID_HANDLE_VALUE;
+ return (MCONTACT)INVALID_HANDLE_VALUE;
}
-HCONTACT WhatsAppProto::ContactIDToHContact(const std::string& phoneNumber)
+MCONTACT WhatsAppProto::ContactIDToHContact(const std::string& phoneNumber)
{
// Cache
- std::map<string, HCONTACT>::iterator it = this->hContactByJid.find(phoneNumber);
+ std::map<string, MCONTACT>::iterator it = this->hContactByJid.find(phoneNumber);
if (it != this->hContactByJid.end())
return it->second;
const char* idForContact = "ID";
const char* idForChat = "ChatRoomID";
- 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 (!IsMyContact(hContact, true))
continue;
@@ -147,7 +147,7 @@ HCONTACT WhatsAppProto::ContactIDToHContact(const std::string& phoneNumber) void WhatsAppProto::SetAllContactStatuses(int status, bool reset_client)
{
- 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 (!IsMyContact(hContact))
continue;
@@ -171,7 +171,7 @@ void WhatsAppProto::ProcessBuddyList(void*) {
std::vector<std::string> jids;
DBVARIANT dbv;
- 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 (!IsMyContact(hContact))
continue;
@@ -219,7 +219,7 @@ void WhatsAppProto::SearchAckThread(void *targ) void WhatsAppProto::onAvailable(const std::string& paramString, bool paramBoolean)
{
- HCONTACT hContact = this->AddToContactList(paramString, 0, false);
+ MCONTACT hContact = this->AddToContactList(paramString, 0, false);
if (hContact != NULL)
{
if (paramBoolean)
@@ -246,7 +246,7 @@ void WhatsAppProto::onAvailable(const std::string& paramString, bool paramBoolea void WhatsAppProto::onLastSeen(const std::string& paramString1, int paramInt, std::string* paramString2)
{
/*
- HCONTACT hContact = this->ContactIDToHContact(paramString1);
+ MCONTACT hContact = this->ContactIDToHContact(paramString1);
if (hContact == NULL)
{
// This contact was searched
@@ -262,13 +262,13 @@ void WhatsAppProto::onLastSeen(const std::string& paramString1, int paramInt, st // #TODO
}
*/
- HCONTACT hContact = this->AddToContactList(paramString1, 0, false);
+ MCONTACT hContact = this->AddToContactList(paramString1, 0, false);
setDword(hContact, WHATSAPP_KEY_LAST_SEEN, paramInt);
this->UpdateStatusMsg(hContact);
}
-void WhatsAppProto::UpdateStatusMsg(HCONTACT hContact)
+void WhatsAppProto::UpdateStatusMsg(MCONTACT hContact)
{
std::wstringstream ss;
@@ -304,7 +304,7 @@ void WhatsAppProto::onPictureChanged(const std::string& from, const std::string& void WhatsAppProto::onSendGetPicture(const std::string& jid, const std::vector<unsigned char>& data, const std::string& oldId, const std::string& newId)
{
- HCONTACT hContact = this->ContactIDToHContact(jid);
+ MCONTACT hContact = this->ContactIDToHContact(jid);
if (hContact)
{
debugLogA("Updating avatar for jid %s", jid.c_str());
@@ -342,7 +342,7 @@ void WhatsAppProto::onSendGetPictureIds(std::map<string,string>* ids) {
for (std::map<string,string>::iterator it = ids->begin(); it != ids->end(); ++it)
{
- HCONTACT hContact = this->AddToContactList(it->first);
+ MCONTACT hContact = this->AddToContactList(it->first);
if (hContact != NULL)
{
DBVARIANT dbv;
@@ -365,14 +365,14 @@ void WhatsAppProto::onSendGetPictureIds(std::map<string,string>* ids) }
}
-string WhatsAppProto::GetContactDisplayName(HCONTACT hContact)
+string WhatsAppProto::GetContactDisplayName(MCONTACT hContact)
{
return string((CHAR*) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0));
}
string WhatsAppProto::GetContactDisplayName(const string& jid)
{
- HCONTACT hContact = this->ContactIDToHContact(jid);
+ MCONTACT hContact = this->ContactIDToHContact(jid);
return hContact ? this->GetContactDisplayName(hContact) : (string("+")+ Utilities::removeWaDomainFromJid(jid));
}
@@ -389,7 +389,7 @@ void WhatsAppProto::SendGetGroupInfoWorker(void* data) void WhatsAppProto::onGroupInfo(const std::string& gjid, const std::string& ownerJid, const std::string& subject, const std::string& createrJid, int paramInt1, int paramInt2)
{
debugLogA("'%s', '%s', '%s', '%s'", gjid.c_str(), ownerJid.c_str(), subject.c_str(), createrJid.c_str());
- HCONTACT hContact = ContactIDToHContact(gjid);
+ MCONTACT hContact = ContactIDToHContact(gjid);
if (!hContact)
{
debugLogA("Group info requested for non existing contact '%s'", gjid.c_str());
@@ -409,13 +409,13 @@ void WhatsAppProto::onGroupInfoFromList(const std::string& paramString1, const s void WhatsAppProto::onGroupNewSubject(const std::string& from, const std::string& author, const std::string& newSubject, int paramInt)
{
debugLogA("'%s', '%s', '%s'", from.c_str(), author.c_str(), newSubject.c_str());
- HCONTACT hContact = this->AddToContactList(from, 0, false, newSubject.c_str(), true);
+ MCONTACT hContact = this->AddToContactList(from, 0, false, newSubject.c_str(), true);
}
void WhatsAppProto::onGroupAddUser(const std::string& paramString1, const std::string& paramString2)
{
debugLogA("%s - user: %s", paramString1.c_str(), paramString2.c_str());
- HCONTACT hContact = this->AddToContactList(paramString1);
+ MCONTACT hContact = this->AddToContactList(paramString1);
std::string groupName(this->GetContactDisplayName(hContact));
if (paramString2.compare(this->jid) == 0)
@@ -438,7 +438,7 @@ void WhatsAppProto::onGroupAddUser(const std::string& paramString1, const std::s void WhatsAppProto::onGroupRemoveUser(const std::string& paramString1, const std::string& paramString2)
{
debugLogA("%s - user: %s", paramString1.c_str(), paramString2.c_str());
- HCONTACT hContact = this->ContactIDToHContact(paramString1);
+ MCONTACT hContact = this->ContactIDToHContact(paramString1);
if (!hContact)
return;
@@ -465,7 +465,7 @@ void WhatsAppProto::onLeaveGroup(const std::string& paramString) {
// Won't be called for unknown reasons!
debugLogA("%s", this->GetContactDisplayName(paramString).c_str());
- HCONTACT hContact = this->ContactIDToHContact(paramString);
+ MCONTACT hContact = this->ContactIDToHContact(paramString);
if (hContact)
setByte(hContact, "IsGroupMember", 0);
}
@@ -474,7 +474,7 @@ void WhatsAppProto::onGetParticipants(const std::string& gjid, const std::vector {
debugLogA("%s", this->GetContactDisplayName(gjid).c_str());
- HCONTACT hUserContact, hContact = this->ContactIDToHContact(gjid);
+ MCONTACT hUserContact, hContact = this->ContactIDToHContact(gjid);
if (!hContact)
return;
@@ -525,8 +525,8 @@ void WhatsAppProto::onGetParticipants(const std::string& gjid, const std::vector // Menu handler
INT_PTR __cdecl WhatsAppProto::OnAddContactToGroup(WPARAM wParam, LPARAM, LPARAM lParam)
{
- string a = GetContactDisplayName((HCONTACT)wParam);
- string b = GetContactDisplayName((HCONTACT)lParam);
+ string a = GetContactDisplayName((MCONTACT)wParam);
+ string b = GetContactDisplayName((MCONTACT)lParam);
debugLogA("Request add user %s to group %s", a.c_str(), b.c_str());
if (!this->isOnline())
@@ -534,14 +534,14 @@ INT_PTR __cdecl WhatsAppProto::OnAddContactToGroup(WPARAM wParam, LPARAM, LPARAM DBVARIANT dbv;
- if (getString((HCONTACT)wParam, "ID", &dbv))
+ if (getString((MCONTACT)wParam, "ID", &dbv))
return NULL;
std::vector<string> participants;
participants.push_back(string(dbv.pszVal));
db_free(&dbv);
- if (getString((HCONTACT)lParam, "ID", &dbv))
+ if (getString((MCONTACT)lParam, "ID", &dbv))
return NULL;
this->connection->sendAddParticipants(string(dbv.pszVal), participants);
@@ -553,8 +553,8 @@ INT_PTR __cdecl WhatsAppProto::OnAddContactToGroup(WPARAM wParam, LPARAM, LPARAM // Menu handler
INT_PTR __cdecl WhatsAppProto::OnRemoveContactFromGroup(WPARAM wParam, LPARAM, LPARAM lParam)
{
- string a = GetContactDisplayName((HCONTACT)wParam);
- string b = GetContactDisplayName((HCONTACT)lParam);
+ string a = GetContactDisplayName((MCONTACT)wParam);
+ string b = GetContactDisplayName((MCONTACT)lParam);
debugLogA("Request remove user %s from group %s", a.c_str(), b.c_str());
if (!this->isOnline())
@@ -562,14 +562,14 @@ INT_PTR __cdecl WhatsAppProto::OnRemoveContactFromGroup(WPARAM wParam, LPARAM, L DBVARIANT dbv;
- if (getString((HCONTACT)lParam, "ID", &dbv))
+ if (getString((MCONTACT)lParam, "ID", &dbv))
return NULL;
std::vector<string> participants;
participants.push_back(string(dbv.pszVal));
db_free(&dbv);
- if (getString((HCONTACT)wParam, "ID", &dbv))
+ if (getString((MCONTACT)wParam, "ID", &dbv))
return NULL;
this->connection->sendRemoveParticipants(string(dbv.pszVal), participants);
@@ -592,8 +592,8 @@ void WhatsAppProto::onParticipatingGroups(const std::vector<string>& paramVector void WhatsAppProto::HandleReceiveGroups(const std::vector<string>& groups, bool isOwned)
{
- HCONTACT hContact;
- map<HCONTACT, bool> isMember; // at the moment, only members of owning groups are stored
+ MCONTACT hContact;
+ map<MCONTACT, bool> isMember; // at the moment, only members of owning groups are stored
// This could take long time if there are many new groups which aren't
// yet stored to the database. But that should be a rare case
@@ -632,7 +632,7 @@ void WhatsAppProto::onGroupCreated(const std::string& paramString1, const std::s // Must be received after onOwningGroups() :/
debugLogA("%s / %s", paramString1.c_str(), paramString2.c_str());
string jid = paramString2 +string("@")+ paramString1;
- HCONTACT hContact = this->AddToContactList(jid, 0, false, NULL, true);
+ MCONTACT hContact = this->AddToContactList(jid, 0, false, NULL, true);
setByte(hContact, "SimpleChatRoom", 2);
}
@@ -659,7 +659,7 @@ void __cdecl WhatsAppProto::SendSetGroupNameWorker(void* data) string groupName(ibr->value);
mir_free(ibr->value);
DBVARIANT dbv;
- if (!getString(*((HCONTACT*)ibr->userData), WHATSAPP_KEY_ID, &dbv) && this->isOnline())
+ if (!getString(*((MCONTACT*)ibr->userData), WHATSAPP_KEY_ID, &dbv) && this->isOnline())
{
this->connection->sendSetNewSubject(dbv.pszVal, groupName);
db_free(&dbv);
@@ -682,7 +682,7 @@ void __cdecl WhatsAppProto::SendCreateGroupWorker(void* data) INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
input_box* ib = new input_box;
if (getTString(hContact, WHATSAPP_KEY_PUSH_NAME, &dbv))
@@ -698,7 +698,7 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam ib->thread = &WhatsAppProto::SendSetGroupNameWorker;
ib->proto = this;
- HCONTACT *hContactPtr = new HCONTACT(hContact);
+ MCONTACT *hContactPtr = new MCONTACT(hContact);
ib->userData = (void*)hContactPtr;
HWND hDlg = CreateDialogParam(g_hInstance, MAKEINTRESOURCE(IDD_INPUTBOX), 0, WhatsAppInputBoxProc,
@@ -710,7 +710,7 @@ INT_PTR __cdecl WhatsAppProto::OnChangeGroupSubject(WPARAM wParam, LPARAM lParam INT_PTR __cdecl WhatsAppProto::OnLeaveGroup(WPARAM wParam, LPARAM)
{
DBVARIANT dbv;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
if (this->isOnline() && !getString(hContact, WHATSAPP_KEY_ID, &dbv))
{
setByte(hContact, "IsGroupMember", 0);
diff --git a/protocols/WhatsApp/src/entities.h b/protocols/WhatsApp/src/entities.h index a2543cf20d..2be8cacd54 100644 --- a/protocols/WhatsApp/src/entities.h +++ b/protocols/WhatsApp/src/entities.h @@ -3,18 +3,18 @@ struct send_direct
{
- send_direct(HCONTACT hContact,const std::string &msg, HANDLE msgid, bool isChat = false)
+ send_direct(MCONTACT hContact,const std::string &msg, HANDLE msgid, bool isChat = false)
: hContact(hContact), msg(msg), msgid(msgid)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
std::string msg;
HANDLE msgid;
};
struct send_typing
{
- send_typing(HCONTACT hContact,const int status) : hContact(hContact), status(status) {}
- HCONTACT hContact;
+ send_typing(MCONTACT hContact,const int status) : hContact(hContact), status(status) {}
+ MCONTACT hContact;
int status;
};
diff --git a/protocols/WhatsApp/src/messages.cpp b/protocols/WhatsApp/src/messages.cpp index c5c911ade8..b051d20903 100644 --- a/protocols/WhatsApp/src/messages.cpp +++ b/protocols/WhatsApp/src/messages.cpp @@ -1,6 +1,6 @@ #include "common.h"
-int WhatsAppProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
+int WhatsAppProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
@@ -28,7 +28,7 @@ void WhatsAppProto::onMessageForMe(FMessage* paramFMessage, bool paramBoolean) msg->insert(0, std::string("[").append(paramFMessage->notifyname).append("]: "));
}
- HCONTACT hContact = this->AddToContactList(paramFMessage->key->remote_jid, 0, false,
+ MCONTACT hContact = this->AddToContactList(paramFMessage->key->remote_jid, 0, false,
isChatRoom ? NULL : paramFMessage->notifyname.c_str(), isChatRoom);
PROTORECVEVENT recv = {0};
@@ -40,7 +40,7 @@ void WhatsAppProto::onMessageForMe(FMessage* paramFMessage, bool paramBoolean) this->connection->sendMessageReceived(paramFMessage);
}
-int WhatsAppProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
+int WhatsAppProto::SendMsg(MCONTACT hContact, int flags, const char *msg)
{
debugLogA("");
int msgId = ++(this->msgId);
@@ -120,7 +120,7 @@ void WhatsAppProto::RecvMsgWorker(void *p) void WhatsAppProto::onIsTyping(const std::string& paramString, bool paramBoolean)
{
- HCONTACT hContact = this->AddToContactList(paramString, 0, false);
+ MCONTACT hContact = this->AddToContactList(paramString, 0, false);
if (hContact != NULL)
{
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM) hContact, (LPARAM)
@@ -129,7 +129,7 @@ void WhatsAppProto::onIsTyping(const std::string& paramString, bool paramBoolean }
-int WhatsAppProto::UserIsTyping(HCONTACT hContact,int type)
+int WhatsAppProto::UserIsTyping(MCONTACT hContact,int type)
{
if (hContact && isOnline())
ForkThread(&WhatsAppProto::SendTypingWorker, new send_typing(hContact, type));
@@ -165,7 +165,7 @@ void WhatsAppProto::onMessageStatusUpdate(FMessage* fmsg) {
debugLogA("");
- HCONTACT hContact = this->ContactIDToHContact(fmsg->key->remote_jid);
+ MCONTACT hContact = this->ContactIDToHContact(fmsg->key->remote_jid);
if (hContact == 0)
return;
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index 1430969639..4b142f0d47 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -61,7 +61,7 @@ int WhatsAppProto::OnModulesLoaded(WPARAM wParam, LPARAM lParam) return 0;
}
-DWORD_PTR WhatsAppProto::GetCaps( int type, HCONTACT hContact )
+DWORD_PTR WhatsAppProto::GetCaps( int type, MCONTACT hContact )
{
switch(type)
{
@@ -134,12 +134,12 @@ int WhatsAppProto::SetStatus( int new_status ) return 0;
}
-HCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
+MCONTACT WhatsAppProto::AddToList(int flags, PROTOSEARCHRESULT* psr)
{
return NULL;
}
-int WhatsAppProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
+int WhatsAppProto::AuthRequest(MCONTACT hContact,const PROTOCHAR *message)
{
return this->RequestFriendship((WPARAM)hContact, NULL);
}
@@ -314,7 +314,7 @@ int WhatsAppProto::RequestFriendship(WPARAM wParam, LPARAM lParam) if (wParam == NULL || isOffline())
return 0;
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
DBVARIANT dbv;
if ( !getString(hContact, WHATSAPP_KEY_ID, &dbv))
@@ -363,7 +363,7 @@ LRESULT CALLBACK PopupDlgProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa return DefWindowProc(hwnd, message, wParam, lParam);
};
-void WhatsAppProto::NotifyEvent(const string& title, const string& info, HCONTACT contact, DWORD flags, TCHAR* url)
+void WhatsAppProto::NotifyEvent(const string& title, const string& info, MCONTACT contact, DWORD flags, TCHAR* url)
{
TCHAR* rawTitle = mir_a2t_cp(title.c_str(), CP_UTF8);
TCHAR* rawInfo = mir_a2t_cp(info.c_str(), CP_UTF8);
@@ -372,7 +372,7 @@ void WhatsAppProto::NotifyEvent(const string& title, const string& info, HCONTAC mir_free(rawInfo);
}
-void WhatsAppProto::NotifyEvent(TCHAR* title, TCHAR* info, HCONTACT contact, DWORD flags, TCHAR* szUrl)
+void WhatsAppProto::NotifyEvent(TCHAR* title, TCHAR* info, MCONTACT contact, DWORD flags, TCHAR* szUrl)
{
int ret; int timeout; COLORREF colorBack = 0; COLORREF colorText = 0;
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h index 5b1862464a..4e0d36db42 100644 --- a/protocols/WhatsApp/src/proto.h +++ b/protocols/WhatsApp/src/proto.h @@ -32,23 +32,23 @@ public: //PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
+ virtual MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent) { return NULL; }
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const PROTOCHAR* szReason ) { return 1; }
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* ) { return 1; }
- virtual int __cdecl AuthRequest(HCONTACT hContact, const PROTOCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* ) { return 1; }
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const PROTOCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData ) { return NULL; }
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath ) { return NULL; }
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer ) { return 1; }
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason ) { return 1; }
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath ) { return NULL; }
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer ) { return 1; }
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason ) { return 1; }
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename ) { return 1; }
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType ) { return 1; }
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType ) { return 1; }
virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email ) { return NULL; }
@@ -56,25 +56,25 @@ public: virtual HWND __cdecl SearchAdvanced( HWND owner ) { return NULL; }
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner ) { return NULL; }
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* ) { return 1; }
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* ) { return 1; }
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* ) { return 1; }
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* ) { return 1; }
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT* ) { return 1; }
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* ) { return 1; }
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList) { return 1; }
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ) { return NULL; }
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url ) { return 1; }
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList) { return 1; }
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles ) { return NULL; }
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url ) { return 1; }
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode ) { return 1; }
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode ) { return 1; }
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact ) { return NULL; }
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT* evt ) { return 1; }
- virtual int __cdecl SendAwayMsg(HCONTACT hContact, HANDLE hProcess, const char* msg ) { return 1; }
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact ) { return NULL; }
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT* evt ) { return 1; }
+ virtual int __cdecl SendAwayMsg(MCONTACT hContact, HANDLE hProcess, const char* msg ) { return 1; }
virtual int __cdecl SetAwayMsg( int iStatus, const PROTOCHAR* msg ) { return 1; }
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam ) { return 1; }
@@ -120,18 +120,18 @@ public: void __cdecl SendCreateGroupWorker(void*);
// Contacts handling
- HCONTACT AddToContactList(const std::string& jid, BYTE type = 0, bool dont_check = false,
+ MCONTACT AddToContactList(const std::string& jid, BYTE type = 0, bool dont_check = false,
const char *new_name = NULL, bool isChatRoom = false, bool isHidden = false);
- bool IsMyContact(HCONTACT hContact, bool include_chat = false);
- HCONTACT ContactIDToHContact(const std::string&);
+ bool IsMyContact(MCONTACT hContact, bool include_chat = false);
+ MCONTACT ContactIDToHContact(const std::string&);
void SetAllContactStatuses(int status, bool reset_client = false);
- void UpdateStatusMsg(HCONTACT hContact);
- string GetContactDisplayName(HCONTACT hContact);
+ void UpdateStatusMsg(MCONTACT hContact);
+ string GetContactDisplayName(MCONTACT hContact);
string GetContactDisplayName(const string& jid);
void InitContactMenus();
void HandleReceiveGroups(const std::vector<string>& groups, bool isOwned);
- bool IsGroupChat(HCONTACT hC, bool checkIsAdmin = false)
+ bool IsGroupChat(MCONTACT hC, bool checkIsAdmin = false)
{
return getByte(hC, "SimpleChatRoom", 0) > (checkIsAdmin ? 1 : 0);
}
@@ -165,8 +165,8 @@ public: string phoneNumber;
string jid;
string nick;
- std::map<string, HCONTACT> hContactByJid;
- map<HCONTACT, map<HCONTACT, bool>> isMemberByGroupContact;
+ std::map<string, MCONTACT> hContactByJid;
+ map<MCONTACT, map<MCONTACT, bool>> isMemberByGroupContact;
// WhatsApp Events
virtual void onMessageForMe(FMessage* paramFMessage, bool paramBoolean);
@@ -205,8 +205,8 @@ public: virtual void onLeaveGroup(const std::string& paramString);
// Information providing
- void NotifyEvent(TCHAR* title, TCHAR* info, HCONTACT contact, DWORD flags, TCHAR* url = NULL);
- void NotifyEvent(const string& title, const string& info, HCONTACT contact, DWORD flags, TCHAR* url = NULL);
+ void NotifyEvent(TCHAR* title, TCHAR* info, MCONTACT contact, DWORD flags, TCHAR* url = NULL);
+ void NotifyEvent(const string& title, const string& info, MCONTACT contact, DWORD flags, TCHAR* url = NULL);
};
#endif
\ No newline at end of file diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp index f76129f12d..ed1ef25743 100644 --- a/protocols/WhatsApp/src/theme.cpp +++ b/protocols/WhatsApp/src/theme.cpp @@ -40,7 +40,7 @@ char *GetIconDescription(const char* name) HGENMENU g_hContactMenuItems[CMITEMS_COUNT];
// Helper functions
-static WhatsAppProto* GetInstanceByHContact(HCONTACT hContact)
+static WhatsAppProto* GetInstanceByHContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if( !proto )
@@ -56,14 +56,14 @@ static WhatsAppProto* GetInstanceByHContact(HCONTACT hContact) template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM,LPARAM)>
INT_PTR GlobalServiceParam(WPARAM wParam,LPARAM lParam, LPARAM lParam2)
{
- WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam,lParam2) : 0;
}
@@ -72,7 +72,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam) for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- WhatsAppProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -104,7 +104,7 @@ void WhatsAppProto::InitContactMenus() int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hContact = HCONTACT(wParam);
+ MCONTACT hContact = MCONTACT(wParam);
if (hContact)
debugLogA(this->GetContactDisplayName(hContact).c_str());
else
@@ -144,10 +144,10 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) svcName += "/AddContactToGroup_";
DBVARIANT dbv;
- for (map<HCONTACT, map<HCONTACT, bool>>::iterator it = this->isMemberByGroupContact.begin();
+ for (map<MCONTACT, map<MCONTACT, bool>>::iterator it = this->isMemberByGroupContact.begin();
it != this->isMemberByGroupContact.end(); ++it)
{
- map<HCONTACT, bool>::iterator memberIt = it->second.find(hContact);
+ map<MCONTACT, bool>::iterator memberIt = it->second.find(hContact);
// Only, if current contact is not already member of this group
if ((memberIt == it->second.end() || memberIt->second == false) && !getString(it->first, "ID", &dbv))
{
@@ -184,7 +184,7 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) bool bShow = false;
if (isOnline() && getByte(hContact, "IsGroupMember", 0) == 1)
{
- map<HCONTACT, map<HCONTACT, bool>>::iterator groupsIt = this->isMemberByGroupContact.find(hContact);
+ map<MCONTACT, map<MCONTACT, bool>>::iterator groupsIt = this->isMemberByGroupContact.find(hContact);
if (groupsIt == this->isMemberByGroupContact.end())
{
debugLogA("Group exists only on contact list");
@@ -199,7 +199,7 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam) svcName += "/RemoveContactFromGroup_";
DBVARIANT dbv;
- for (map<HCONTACT, bool>::iterator it = groupsIt->second.begin(); it != groupsIt->second.end(); ++it)
+ for (map<MCONTACT, bool>::iterator it = groupsIt->second.begin(); it != groupsIt->second.end(); ++it)
{
if (!getString(it->first, "ID", &dbv))
{
diff --git a/protocols/Xfire/src/Xfire_avatar_loader.cpp b/protocols/Xfire/src/Xfire_avatar_loader.cpp index 674329f762..b27b755059 100644 --- a/protocols/Xfire/src/Xfire_avatar_loader.cpp +++ b/protocols/Xfire/src/Xfire_avatar_loader.cpp @@ -66,7 +66,7 @@ void Xfire_avatar_loader::loadThread(LPVOID lparam) { return;
}
-BOOL Xfire_avatar_loader::loadAvatar(HCONTACT hcontact,char*username,unsigned int userid)
+BOOL Xfire_avatar_loader::loadAvatar(MCONTACT hcontact,char*username,unsigned int userid)
{
Xfire_avatar_process process={0};
diff --git a/protocols/Xfire/src/Xfire_avatar_loader.h b/protocols/Xfire/src/Xfire_avatar_loader.h index c6305270d1..92b89184e1 100644 --- a/protocols/Xfire/src/Xfire_avatar_loader.h +++ b/protocols/Xfire/src/Xfire_avatar_loader.h @@ -1,21 +1,21 @@ /*
* Plugin of miranda IM(ICQ) for Communicating with users of the XFire Network.
*
- * Copyright (C) 2009 by - * dufte <dufte@justmail.de> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software + * Copyright (C) 2009 by
+ * dufte <dufte@justmail.de>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
*
@@ -37,7 +37,7 @@ using namespace xfirelib;
struct Xfire_avatar_process {
- HCONTACT hcontact;
+ MCONTACT hcontact;
char username[128];
unsigned int userid;
};
@@ -50,7 +50,7 @@ private: public:
vector<Xfire_avatar_process> list;
BOOL threadrunning;
- BOOL loadAvatar(HCONTACT hcontact,char*username,unsigned int userid);
+ BOOL loadAvatar(MCONTACT hcontact,char*username,unsigned int userid);
Xfire_avatar_loader(xfirelib::Client* client);
~Xfire_avatar_loader();
};
diff --git a/protocols/Xfire/src/baseProtocol.h b/protocols/Xfire/src/baseProtocol.h index 64abc5720c..7bd05730a1 100644 --- a/protocols/Xfire/src/baseProtocol.h +++ b/protocols/Xfire/src/baseProtocol.h @@ -58,7 +58,7 @@ INT_PTR GetStatus(WPARAM wParam,LPARAM lParam); INT_PTR TMLoadIcon(WPARAM wParam,LPARAM lParam);
INT_PTR SetNickName(WPARAM newnick, LPARAM lparam);
-BOOL IsXFireContact(HCONTACT h);
+BOOL IsXFireContact(MCONTACT h);
int displayPopup(HWND hWnd, LPCSTR lpText, LPCSTR lpCaption, UINT uType,HICON hhicon=NULL);
BOOL CreateToolTip(int toolID, HWND hDlg, CHAR* pText);
void EnableDlgItem(HWND hwndDlg, UINT control, int state);
@@ -155,7 +155,7 @@ struct XFire_FoundGame struct XFire_SetAvatar
{
- HCONTACT hContact;
+ MCONTACT hContact;
char* username;
};
diff --git a/protocols/Xfire/src/buddylist.cpp b/protocols/Xfire/src/buddylist.cpp index a7f2ba8042..315c3e2a6e 100644 --- a/protocols/Xfire/src/buddylist.cpp +++ b/protocols/Xfire/src/buddylist.cpp @@ -36,7 +36,7 @@ //buddylist verarbeitung von der main in buddylist verschoben, um doppelte schleifenverarbeitung zuunterbinden #include "baseProtocol.h" -extern HCONTACT handlingBuddys(xfirelib::BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE); +extern MCONTACT handlingBuddys(xfirelib::BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE); extern void setBuddyStatusMsg(xfirelib::BuddyListEntry *entry); namespace xfirelib { diff --git a/protocols/Xfire/src/buddylist.h b/protocols/Xfire/src/buddylist.h index ee6f2a22b4..13fdd0b02d 100644 --- a/protocols/Xfire/src/buddylist.h +++ b/protocols/Xfire/src/buddylist.h @@ -83,7 +83,7 @@ namespace xfirelib { string gameinfo; long game; long game2; - HCONTACT hcontact; + MCONTACT hcontact; int clanid; //lastpopup diff --git a/protocols/Xfire/src/main.cpp b/protocols/Xfire/src/main.cpp index 51d217717f..e331f44302 100644 --- a/protocols/Xfire/src/main.cpp +++ b/protocols/Xfire/src/main.cpp @@ -148,13 +148,13 @@ INT_PTR RecvMessage(WPARAM wParam, LPARAM lParam); INT_PTR SendMessage(WPARAM wParam, LPARAM lParam);
int FillList(WPARAM wParam, LPARAM lParam);
-HCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan);
-HCONTACT CList_FindContact (int uid);
+MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan);
+MCONTACT CList_FindContact (int uid);
void CList_MakeAllOffline();
static INT_PTR UserIsTyping(WPARAM wParam, LPARAM lParam);
HANDLE LoadGameIcon(char* g, int id, HICON* ico,BOOL onyico=FALSE,char * gamename=NULL,int*uu=NULL);
BOOL GetAvatar(char* username,XFireAvatar* av);
-//void SetAvatar(HCONTACT hContact, char* username);
+//void SetAvatar(MCONTACT hContact, char* username);
static void SetAvatar(LPVOID lparam);
static INT_PTR GetIPPort(WPARAM /*wParam*/,LPARAM lParam);
static INT_PTR GetVIPPort(WPARAM /*wParam*/,LPARAM lParam);
@@ -187,7 +187,7 @@ INT_PTR SetAwayMsg(WPARAM wParam, LPARAM lParam); INT_PTR GetXStatusIcon(WPARAM wParam, LPARAM lParam);
static INT_PTR GotoProfile2(WPARAM wParam,LPARAM lParam);
-HCONTACT handlingBuddys(BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE);
+MCONTACT handlingBuddys(BuddyListEntry *entry, int clan=0,char* group=NULL,BOOL dontscan=FALSE);
int StatusIcon(WPARAM wParam,LPARAM lParam);
void CreateGroup(char*grpn,char*field); //void CreateGroup(char*grp);
@@ -221,7 +221,7 @@ class XFireClient : public PacketListener { void getBuddyList();
void sendmsg(char*usr,char*msg);
void setNick(char*nnick);
- void handlingBuddy(HCONTACT handle);
+ void handlingBuddy(MCONTACT handle);
void CheckAvatar(BuddyListEntry* entry);
private:
@@ -259,7 +259,7 @@ void XFireClient::CheckAvatar(BuddyListEntry* entry) { }
}
-void XFireClient::handlingBuddy(HCONTACT handle)
+void XFireClient::handlingBuddy(MCONTACT handle)
{
vector<BuddyListEntry*> *entries = client->getBuddyList()->getEntries();
for(uint i = 0 ; i < entries->size() ; i ++) {
@@ -515,7 +515,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { db_free(&dbv);
}
CreateGroup(Translate(fofname),"fofgroup");
- HCONTACT hc=handlingBuddys(entry,-1,Translate(fofname));
+ MCONTACT hc=handlingBuddys(entry,-1,Translate(fofname));
if (hc)
{
CheckAvatar(entry);
@@ -609,7 +609,7 @@ void XFireClient::sendmsg(char*usr,char*cmsg) { xfire_newc.nick=(char*)invite->nick.c_str();
xfire_newc.id=0;
- HCONTACT handle = CList_AddContact(xfire_newc,TRUE,TRUE,0);
+ MCONTACT handle = CList_AddContact(xfire_newc,TRUE,TRUE,0);
if (handle) { // invite nachricht mitsenden
string str = (char*)invite->msg.c_str();
@@ -999,7 +999,7 @@ int ExtraListRebuild(WPARAM wparam, LPARAM lparam) int ExtraImageApply1(WPARAM wparam, LPARAM lparam)
{
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !lstrcmpiA(szProto, protocolname) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
int gameid = db_get_w(hContact, protocolname, "GameId", 0);
@@ -1011,7 +1011,7 @@ int ExtraImageApply1(WPARAM wparam, LPARAM lparam) int ExtraImageApply2(WPARAM wparam, LPARAM lparam)
{
- HCONTACT hContact=(HCONTACT)wparam;
+ MCONTACT hContact=(MCONTACT)wparam;
// TODO: maybe need to fix extra icons
char *szProto = GetContactProto(hContact);
if ( szProto != NULL && !lstrcmpiA( szProto, protocolname ) && db_get_w(hContact, protocolname, "Status", ID_STATUS_OFFLINE)!=ID_STATUS_OFFLINE) {
@@ -1327,17 +1327,17 @@ static void SetStatusLate( LPVOID param ) static void SendAck( LPVOID param )
{
- ProtoBroadcastAck(protocolname, (HCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
+ ProtoBroadcastAck(protocolname, (MCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE) 1, 0);
}
static void SendBadAck( LPVOID param )
{
- ProtoBroadcastAck(protocolname, (HCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 0, LPARAM(Translate("XFire does not support offline messaging!")));
+ ProtoBroadcastAck(protocolname, (MCONTACT)param, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE) 0, LPARAM(Translate("XFire does not support offline messaging!")));
}
static INT_PTR UserIsTyping(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
if (lParam==PROTOTYPE_SELFTYPING_ON)
@@ -1595,15 +1595,15 @@ INT_PTR GetStatus(WPARAM wParam,LPARAM lParam) return ID_STATUS_OFFLINE;
}
-HCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
+MCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan)
{
- HCONTACT hContact;
+ MCONTACT hContact;
if (xfc.username == NULL)
return 0;
// here we create a new one since no one is to be found
- hContact = (HCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
if ( hContact ) {
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM)protocolname );
@@ -1665,7 +1665,7 @@ HCONTACT CList_AddContact(XFireContact xfc, bool InList, bool SetOnline,int clan return false;
}
-BOOL IsXFireContact(HCONTACT hContact)
+BOOL IsXFireContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !lstrcmpiA(szProto, protocolname))
@@ -1674,9 +1674,9 @@ BOOL IsXFireContact(HCONTACT hContact) return FALSE;
}
-HCONTACT CList_FindContact (int uid)
+MCONTACT CList_FindContact (int uid)
{
- for (HCONTACT hContact = db_find_first(protocolname); hContact; hContact = db_find_next(hContact, protocolname))
+ for (MCONTACT hContact = db_find_first(protocolname); hContact; hContact = db_find_next(hContact, protocolname))
if ( db_get_dw(hContact, protocolname, "UserId", -1) == uid)
return hContact;
@@ -1685,8 +1685,8 @@ HCONTACT CList_FindContact (int uid) void CList_MakeAllOffline()
{
- vector<HCONTACT> fhandles;
- for (HCONTACT hContact = db_find_first(protocolname); hContact; hContact = db_find_next(hContact, protocolname)) {
+ vector<MCONTACT> fhandles;
+ for (MCONTACT hContact = db_find_first(protocolname); hContact; hContact = db_find_next(hContact, protocolname)) {
//freunde von freunden in eine seperate liste setzen
//nur wenn das nicht abgestellt wurde
if (db_get_b(hContact,protocolname,"friendoffriend",0)==1 && db_get_b(NULL,protocolname,"fofdbremove",0)==1)
@@ -1767,7 +1767,7 @@ void SetAvatar2(LPVOID lparam) { }
void SetAvatar(LPVOID lparam)
-//void SetAvatar(HCONTACT hContact, char* username)
+//void SetAvatar(MCONTACT hContact, char* username)
{
//EnterCriticalSection(&avatarMutex);
//WaitForSingleObject(hMutex, INFINITE);
@@ -1929,14 +1929,14 @@ static INT_PTR GetIPPort(WPARAM wParam,LPARAM lParam) HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((HCONTACT)wParam, protocolname, "Port", -1)==0)
+ if (db_get_w((MCONTACT)wParam, protocolname, "Port", -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((HCONTACT)wParam, protocolname, "ServerIP",&dbv))
+ if (db_get_s((MCONTACT)wParam, protocolname, "ServerIP",&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((HCONTACT)wParam, protocolname, "Port", -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, "Port", -1));
db_free(&dbv);
@@ -1962,14 +1962,14 @@ static INT_PTR GetVIPPort(WPARAM wParam,LPARAM lParam) HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((HCONTACT)wParam, protocolname, "VPort", -1)==0)
+ if (db_get_w((MCONTACT)wParam, protocolname, "VPort", -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((HCONTACT)wParam, protocolname, "VServerIP",&dbv))
+ if (db_get_s((MCONTACT)wParam, protocolname, "VServerIP",&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((HCONTACT)wParam, protocolname, "VPort", -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, "VPort", -1));
db_free(&dbv);
@@ -1994,7 +1994,7 @@ static INT_PTR GotoProfile(WPARAM wParam,LPARAM lParam) DBVARIANT dbv;
char temp[64]="";
- if (db_get_s((HCONTACT)wParam, protocolname, "Username",&dbv))
+ if (db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
return 0;
strcpy(temp,"http://xfire.com/profile/");
@@ -2010,7 +2010,7 @@ static INT_PTR GotoXFireClanSite(WPARAM wParam,LPARAM lParam) { DBVARIANT dbv;
char temp[64]="";
- int clanid=db_get_dw((HCONTACT)wParam, protocolname, "Clan",-1);
+ int clanid=db_get_dw((MCONTACT)wParam, protocolname, "Clan",-1);
mir_snprintf(temp, SIZEOF(temp), "ClanUrl_%d", clanid);
if (db_get_s(NULL, protocolname, temp,&dbv))
@@ -2071,7 +2071,7 @@ static INT_PTR GotoProfileAct(WPARAM wParam,LPARAM lParam) int RebuildContactMenu( WPARAM wParam, LPARAM lParam )
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
bool bEnabled = true, bEnabled2 = true;
DBVARIANT dbv;
@@ -2685,9 +2685,9 @@ void setBuddyStatusMsg(BuddyListEntry *entry) }
}*/
-HCONTACT handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
+MCONTACT handlingBuddys(BuddyListEntry *entry, int clan,char*group,BOOL dontscan)
{
- HCONTACT hContact;
+ MCONTACT hContact;
string game;
if (entry==NULL)
@@ -3254,14 +3254,14 @@ INT_PTR SendPrefs(WPARAM wparam, LPARAM lparam) int ContactDeleted(WPARAM wParam,LPARAM lParam)
{
- if (!db_get_b((HCONTACT)wParam, protocolname, "DontSendDenyPacket", 0))
- if (db_get_b((HCONTACT)wParam,"CList","NotOnList",0))
+ if (!db_get_b((MCONTACT)wParam, protocolname, "DontSendDenyPacket", 0))
+ if (db_get_b((MCONTACT)wParam,"CList","NotOnList",0))
{
if (myClient!=NULL)
if (myClient->client->connected)
{
DBVARIANT dbv2;
- if (!db_get((HCONTACT)wParam,protocolname,"Username",&dbv2)) {
+ if (!db_get((MCONTACT)wParam,protocolname,"Username",&dbv2)) {
SendDenyInvitationPacket deny;
deny.name = dbv2.pszVal;
myClient->client->send( &deny );
@@ -3294,7 +3294,7 @@ INT_PTR RemoveFriend(WPARAM wParam,LPARAM lParam) char temp[256];
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)wParam, protocolname, "Username",&dbv))
+ if (!db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
{
mir_snprintf(temp, SIZEOF(temp), Translate("Do you really want to delete your friend %s?"), dbv.pszVal);
if (MessageBoxA(NULL,temp,Translate("Confirm Delete"),MB_YESNO|MB_ICONQUESTION)==IDYES)
@@ -3305,7 +3305,7 @@ INT_PTR RemoveFriend(WPARAM wParam,LPARAM lParam) {
SendRemoveBuddyPacket removeBuddy;
- removeBuddy.userid=db_get_dw((HCONTACT)wParam,protocolname,"UserId",0);
+ removeBuddy.userid=db_get_dw((MCONTACT)wParam,protocolname,"UserId",0);
if (removeBuddy.userid!=0)
{
@@ -3323,7 +3323,7 @@ INT_PTR BlockFriend(WPARAM wParam,LPARAM lParam) {
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)wParam, protocolname, "Username",&dbv))
+ if (!db_get_s((MCONTACT)wParam, protocolname, "Username",&dbv))
{
if (MessageBox(NULL,TranslateT("Block this user from ever contacting you again?"),TranslateT("Block Confirmation"),MB_YESNO|MB_ICONQUESTION)==IDYES)
{
@@ -3350,7 +3350,7 @@ INT_PTR StartThisGame(WPARAM wParam,LPARAM lParam) { xgamelist.Block(TRUE);
//hole die gameid des spiels
- int id=db_get_w((HCONTACT)wParam, protocolname, "GameId",0);
+ int id=db_get_w((MCONTACT)wParam, protocolname, "GameId",0);
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
@@ -3370,7 +3370,7 @@ INT_PTR JoinGame(WPARAM wParam,LPARAM lParam) { xgamelist.Block(TRUE);
//hole die gameid des spiels
- int id=db_get_w((HCONTACT)wParam, protocolname, "GameId",0);
+ int id=db_get_w((MCONTACT)wParam, protocolname, "GameId",0);
//hole passendes spielobjekt
Xfire_game*game=xgamelist.getGamebyGameid(id);
@@ -3379,8 +3379,8 @@ INT_PTR JoinGame(WPARAM wParam,LPARAM lParam) { if (game)
{
DBVARIANT dbv; //dbv.pszVal
- int port=db_get_w((HCONTACT)wParam, protocolname, "Port",0);
- if (!db_get_s((HCONTACT)wParam, protocolname, "ServerIP",&dbv))
+ int port=db_get_w((MCONTACT)wParam, protocolname, "Port",0);
+ if (!db_get_s((MCONTACT)wParam, protocolname, "ServerIP",&dbv))
{
//starte spiel mit netzwerk parametern
game->start_game(dbv.pszVal,port);
diff --git a/protocols/Xfire/src/processbuddyinfo.cpp b/protocols/Xfire/src/processbuddyinfo.cpp index 28eb283f66..014894cf54 100644 --- a/protocols/Xfire/src/processbuddyinfo.cpp +++ b/protocols/Xfire/src/processbuddyinfo.cpp @@ -27,7 +27,7 @@ extern HANDLE XFireAvatarFolder; return h;
}*/
-void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,HCONTACT hcontact,char* username) {
+void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo,MCONTACT hcontact,char* username) {
char temp[255] = "";
char filename[1024] = "";
BOOL dl=FALSE;
diff --git a/protocols/Xfire/src/processbuddyinfo.h b/protocols/Xfire/src/processbuddyinfo.h index e4fad3b387..c9f3e396b9 100644 --- a/protocols/Xfire/src/processbuddyinfo.h +++ b/protocols/Xfire/src/processbuddyinfo.h @@ -4,4 +4,4 @@ #include "getbuddyinfo.h"
#include "buddyinfo.h"
-void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, HCONTACT hcontact,char* username);
\ No newline at end of file +void ProcessBuddyInfo(xfirelib::BuddyInfoPacket *buddyinfo, MCONTACT hcontact,char* username);
diff --git a/protocols/Xfire/src/recvremovebuddypacket.h b/protocols/Xfire/src/recvremovebuddypacket.h index 842163ad1a..c617215d66 100644 --- a/protocols/Xfire/src/recvremovebuddypacket.h +++ b/protocols/Xfire/src/recvremovebuddypacket.h @@ -47,7 +47,7 @@ namespace xfirelib { * (it will be set by the BuddyList, not when parsing the packet) */ std::string username; - HCONTACT handle; // handle eingefügt, damit ich schnell den buddy killen kann - dufte + MCONTACT handle; // handle eingefügt, damit ich schnell den buddy killen kann - dufte }; }; diff --git a/protocols/Xfire/src/userdetails.cpp b/protocols/Xfire/src/userdetails.cpp index d2301f4fe6..1db5474f2f 100644 --- a/protocols/Xfire/src/userdetails.cpp +++ b/protocols/Xfire/src/userdetails.cpp @@ -61,7 +61,7 @@ void LoadProfilStatus(LPVOID lparam) { delete[] lparam;
}
-void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HCONTACT hcontact,int type)
+void SetItemTxt(HWND hwndDlg,int feldid,char*feld,MCONTACT hcontact,int type)
{
DBVARIANT dbv;
if (!db_get(hcontact,protocolname,feld,&dbv)) {
@@ -85,20 +85,20 @@ void SetItemTxt(HWND hwndDlg,int feldid,char*feld,HCONTACT hcontact,int type) }
}
-static int GetIPPortUDetails(HCONTACT wParam,char* feld1,char* feld2)
+static int GetIPPortUDetails(MCONTACT wParam,char* feld1,char* feld2)
{
char temp[255];
HGLOBAL clipbuffer;
char* buffer;
- if (db_get_w((HCONTACT)wParam, protocolname, feld2, -1)==0)
+ if (db_get_w((MCONTACT)wParam, protocolname, feld2, -1)==0)
return 0;
DBVARIANT dbv;
- if (db_get_s((HCONTACT)wParam, protocolname, feld1,&dbv))
+ if (db_get_s((MCONTACT)wParam, protocolname, feld1,&dbv))
return 0;
- mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((HCONTACT)wParam, protocolname, feld2, -1));
+ mir_snprintf(temp, SIZEOF(temp), "%s:%d", dbv.pszVal, db_get_w((MCONTACT)wParam, protocolname, feld2, -1));
db_free(&dbv);
@@ -118,7 +118,7 @@ static int GetIPPortUDetails(HCONTACT wParam,char* feld1,char* feld2) return 0;
}
-void addToList(HWND listbox,HCONTACT hContact,char*key,char*val)
+void addToList(HWND listbox,MCONTACT hContact,char*key,char*val)
{
DBVARIANT dbv;
if (!db_get(hContact,protocolname,val,&dbv))
@@ -185,7 +185,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam static WCHAR wpath[256];
static HICON gameicon=0;
static HICON voiceicon=0;
- static HCONTACT uhandle=0;
+ static MCONTACT uhandle=0;
static HWND listbox;
LVCOLUMNA pcol;
@@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam case PSN_INFOCHANGED:
{
char* szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
uhandle=hContact; //handle sichern
if (hContact == NULL)
@@ -370,7 +370,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam case PSN_INFOCHANGED:
{
char* szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL)
szProto = protocolname;
@@ -429,7 +429,7 @@ static INT_PTR CALLBACK DlgProcUserDetails(HWND hwndDlg, UINT msg, WPARAM wParam int OnDetailsInit(WPARAM wParam,LPARAM lParam)
{
- if (!IsXFireContact((HCONTACT)lParam))
+ if (!IsXFireContact((MCONTACT)lParam))
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index 4eb38181ac..063231212a 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -171,7 +171,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) LOG(("yahoo_recv_avatarthread who:%s url:%s checksum: %d", avt->who, avt->pic_url, avt->cksum));
- HCONTACT hContact = getbuddyH(avt->who);
+ MCONTACT hContact = getbuddyH(avt->who);
if (!hContact) {
LOG(("ERROR: Can't find buddy: %s", avt->who));
@@ -258,7 +258,7 @@ void __cdecl CYahooProto::recv_avatarthread(void *pavt) void CYahooProto::ext_got_picture(const char *me, const char *who, const char *pic_url, int cksum, int type)
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
LOG(("[ext_yahoo_got_picture] for %s with url %s (checksum: %d) type: %d", who, pic_url, cksum, type));
@@ -450,7 +450,7 @@ void CYahooProto::ext_got_picture(const char *me, const char *who, const char *p void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int cksum)
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
LOG(("ext_yahoo_got_picture_checksum for %s checksum: %d", who, cksum));
@@ -488,7 +488,7 @@ void CYahooProto::ext_got_picture_checksum(const char *me, const char *who, int void CYahooProto::ext_got_picture_update(const char *me, const char *who, int buddy_icon)
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
LOG(("ext_got_picture_update for %s buddy_icon: %d", who, buddy_icon));
@@ -506,7 +506,7 @@ void CYahooProto::ext_got_picture_update(const char *me, const char *who, int bu void CYahooProto::ext_got_picture_status(const char *me, const char *who, int buddy_icon)
{
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
LOG(("ext_yahoo_got_picture_status for %s buddy_icon: %d", who, buddy_icon));
@@ -572,7 +572,7 @@ void CYahooProto::ext_got_avatar_share(int buddy_icon) setByte("ShareAvatar", buddy_icon );
}
-void CYahooProto::reset_avatar(HCONTACT hContact)
+void CYahooProto::reset_avatar(MCONTACT hContact)
{
LOG(("[YAHOO_RESET_AVATAR]"));
@@ -586,7 +586,7 @@ void CYahooProto::request_avatar(const char* who) return;
}
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (!hContact)
return;
@@ -606,7 +606,7 @@ void CYahooProto::request_avatar(const char* who) else LOG(("Avatar Not Available for: %s Last Check: %ld Current: %ld (Flood Check in Effect)", who, last_chk, cur_time));
}
-void CYahooProto::GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, int cbLen, int type)
+void CYahooProto::GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type)
{
int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName);
diff --git a/protocols/Yahoo/src/chat.cpp b/protocols/Yahoo/src/chat.cpp index 75dbf851ea..1130a248af 100644 --- a/protocols/Yahoo/src/chat.cpp +++ b/protocols/Yahoo/src/chat.cpp @@ -244,7 +244,7 @@ void CYahooProto::ChatEvent(const char* room, const char* who, int evt, const TC TCHAR* idt = mir_a2t(room);
TCHAR* snt = mir_a2t(who);
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
TCHAR* nick = hContact ? (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, WPARAM(hContact), GCDNF_TCHAR) : snt;
GCDEST gcd = { m_szModuleName, idt, evt };
@@ -395,17 +395,17 @@ int __cdecl CYahooProto::OnGCMenuHook(WPARAM, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// Invite to chat dialog
-static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, char* room, CYahooProto* ppro, TCHAR *msg)
+static void clist_chat_invite_send(MCONTACT hItem, HWND hwndList, YList* &who, char* room, CYahooProto* ppro, TCHAR *msg)
{
bool root = !hItem;
if (root)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem)
{
if (IsHContactGroup(hItem))
{
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
clist_chat_invite_send(hItemT, hwndList, who, room, ppro, msg);
}
@@ -429,7 +429,7 @@ static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, c }
}
}
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
}
if (root && who)
@@ -451,23 +451,23 @@ static void clist_chat_invite_send(HCONTACT hItem, HWND hwndList, YList* &who, c }
}
-static void ClistValidateContact(HCONTACT hItem, HWND hwndList, CYahooProto* ppro)
+static void ClistValidateContact(MCONTACT hItem, HWND hwndList, CYahooProto* ppro)
{
if (!ppro->IsMyContact(hItem) || ppro->isChatRoom(hItem) ||
ppro->getWord(hItem, "Status", ID_STATUS_OFFLINE) == ID_STATUS_ONTHEPHONE)
SendMessage(hwndList, CLM_DELETEITEM, (WPARAM)hItem, 0);
}
-static void ClistChatPrepare(HCONTACT hItem, HWND hwndList, CYahooProto* ppro)
+static void ClistChatPrepare(MCONTACT hItem, HWND hwndList, CYahooProto* ppro)
{
if (hItem == NULL)
- hItem = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
+ hItem = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_ROOT, 0);
while (hItem) {
- HCONTACT hItemN = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
+ MCONTACT hItemN = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_NEXT, (LPARAM)hItem);
if (IsHContactGroup(hItem)) {
- HCONTACT hItemT = (HCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
+ MCONTACT hItemT = (MCONTACT)SendMessage(hwndList, CLM_GETNEXTITEM, CLGN_CHILD, (LPARAM)hItem);
if (hItemT)
ClistChatPrepare(hItemT, hwndList, ppro);
}
@@ -516,7 +516,7 @@ INT_PTR CALLBACK InviteToChatDialog(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA {
case CLN_NEWCONTACT:
if (param && (nmc->flags & (CLNF_ISGROUP | CLNF_ISINFO)) == 0)
- ClistValidateContact((HCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
+ ClistValidateContact((MCONTACT)nmc->hItem, nmc->hdr.hwndFrom, param->ppro);
break;
case CLN_LISTREBUILT:
diff --git a/protocols/Yahoo/src/file_transfer.cpp b/protocols/Yahoo/src/file_transfer.cpp index e83f9d3836..4b2497574a 100644 --- a/protocols/Yahoo/src/file_transfer.cpp +++ b/protocols/Yahoo/src/file_transfer.cpp @@ -19,7 +19,7 @@ YList *file_transfers=NULL;
-static y_filetransfer* new_ft(CYahooProto* ppro, int id, HCONTACT hContact, const char *who, const char *msg,
+static y_filetransfer* new_ft(CYahooProto* ppro, int id, MCONTACT hContact, const char *who, const char *msg,
const char *url, const char *ft_token, int y7, YList *fs, int sending)
{
yahoo_file_info * fi;
@@ -478,7 +478,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, {
LOG(("[ext_yahoo_got_file] ident:%s, who: %s, url: %s, expires: %lu, msg: %s, fname: %s, fsize: %lu ftoken: %s y7: %d", me, who, url, expires, msg, fname, fesize, ft_token == NULL ? "NULL" : ft_token, y7));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL)
hContact = add_buddy(who, who, 0 /* NO FT for other IMs */, PALF_TEMPORARY);
@@ -533,7 +533,7 @@ void CYahooProto::ext_got_file(const char *me, const char *who, const char *url, void CYahooProto::ext_got_files(const char *me, const char *who, const char *ft_token, int y7, YList* files)
{
- HCONTACT hContact;
+ MCONTACT hContact;
y_filetransfer *ft;
YList *f;
char fn[4096];
@@ -699,7 +699,7 @@ void __cdecl CYahooProto::send_filethread(void *psf) ////////////////////////////////////////////////////////////////////////////////////////
// SendFile - sends a file
-HANDLE __cdecl CYahooProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles )
+HANDLE __cdecl CYahooProto::SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles )
{
DBVARIANT dbv;
y_filetransfer *sf;
@@ -763,7 +763,7 @@ HANDLE __cdecl CYahooProto::SendFile(HCONTACT hContact, const PROTOCHAR* szDescr ////////////////////////////////////////////////////////////////////////////////////////
// FileAllow - starts a file transfer
-HANDLE __cdecl CYahooProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+HANDLE __cdecl CYahooProto::FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
y_filetransfer *ft = (y_filetransfer *)hTransfer;
size_t len;
@@ -792,7 +792,7 @@ HANDLE __cdecl CYahooProto::FileAllow(HCONTACT hContact, HANDLE hTransfer, const ////////////////////////////////////////////////////////////////////////////////////////
// FileCancel - cancels a file transfer
-int __cdecl CYahooProto::FileCancel(HCONTACT hContact, HANDLE hTransfer)
+int __cdecl CYahooProto::FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
debugLogA("[YahooFileCancel]");
@@ -815,7 +815,7 @@ int __cdecl CYahooProto::FileCancel(HCONTACT hContact, HANDLE hTransfer) ////////////////////////////////////////////////////////////////////////////////////////
// FileDeny - denies a file transfer
-int __cdecl CYahooProto::FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*)
+int __cdecl CYahooProto::FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR*)
{
/* deny file receive request.. just ignore it! */
y_filetransfer *ft = (y_filetransfer *)hTransfer;
diff --git a/protocols/Yahoo/src/file_transfer.h b/protocols/Yahoo/src/file_transfer.h index cdbacd9c32..b57a56867d 100644 --- a/protocols/Yahoo/src/file_transfer.h +++ b/protocols/Yahoo/src/file_transfer.h @@ -22,7 +22,7 @@ typedef struct { char *msg; char *ftoken; char *relay; - HCONTACT hContact; + MCONTACT hContact; int cancel; char *url; HANDLE hWaitEvent; diff --git a/protocols/Yahoo/src/im.cpp b/protocols/Yahoo/src/im.cpp index fc295a4a42..b85ce78357 100644 --- a/protocols/Yahoo/src/im.cpp +++ b/protocols/Yahoo/src/im.cpp @@ -100,7 +100,7 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons /* Need to strip off formatting stuff first. Then do all decoding/converting */
LOG(("%s: %s", who, umsg));
- HCONTACT hContact = add_buddy(who, who, protocol, PALF_TEMPORARY);
+ MCONTACT hContact = add_buddy(who, who, protocol, PALF_TEMPORARY);
//setWord(hContact, "yprotoid", protocol);
Set_Protocol(hContact, protocol);
@@ -154,24 +154,24 @@ void CYahooProto::ext_got_im(const char *me, const char *who, int protocol, cons void __cdecl CYahooProto::im_sendacksuccess(void *hContact)
{
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
void __cdecl CYahooProto::im_sendackfail(void *hContact)
{
SleepEx(1000, TRUE);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
(LPARAM)Translate("The message send timed out."));
}
void __cdecl CYahooProto::im_sendackfail_longmsg(void *hContact)
{
SleepEx(1000, TRUE);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1,
(LPARAM)Translate("Message is too long: Yahoo messages are limited by 800 UTF8 chars"));
}
-int __cdecl CYahooProto::SendMsg(HCONTACT hContact, int flags, const char* pszSrc)
+int __cdecl CYahooProto::SendMsg(MCONTACT hContact, int flags, const char* pszSrc)
{
if (!m_bLoggedIn) {/* don't send message if we not connected! */
ForkThread(&CYahooProto::im_sendackfail, (void*)hContact);
@@ -207,7 +207,7 @@ int __cdecl CYahooProto::SendMsg(HCONTACT hContact, int flags, const char* pszSr ////////////////////////////////////////////////////////////////////////////////////////
// RecvMsg
-int __cdecl CYahooProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CYahooProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT* pre)
{
db_unset(hContact, "CList", "Hidden");
@@ -227,7 +227,7 @@ int __cdecl CYahooProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT* pre) INT_PTR __cdecl CYahooProto::SendNudge(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
debugLogA("[YAHOO_SENDNUDGE]");
diff --git a/protocols/Yahoo/src/links.cpp b/protocols/Yahoo/src/links.cpp index d1136a507a..9aef65c76b 100644 --- a/protocols/Yahoo/src/links.cpp +++ b/protocols/Yahoo/src/links.cpp @@ -148,7 +148,7 @@ static INT_PTR ServiceParseYmsgrLink(WPARAM wParam, LPARAM lParam) if (arg) *arg = 0;
}
- HCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */
+ MCONTACT hContact = proto->add_buddy(id, id, 0, PALF_TEMPORARY); /* ensure contact is on list */
if (hContact)
CallService(MS_MSG_SENDMESSAGET, (WPARAM)hContact, (LPARAM)msg);
diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index b607385fa0..4987c50b34 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -99,7 +99,7 @@ int CYahooProto::OnModulesLoadedEx(WPARAM, LPARAM) ////////////////////////////////////////////////////////////////////////////////////////
// AddToList - adds a contact to the contact list
-HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
+MCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr )
{
debugLogA("[YahooAddToList] Flags: %d", flags);
@@ -114,7 +114,7 @@ HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) }
char *id = psr->flags & PSR_UNICODE ? mir_utf8encodeW((wchar_t*)psr->id) : mir_utf8encode((char*)psr->id);
- HCONTACT hContact = getbuddyH(id);
+ MCONTACT hContact = getbuddyH(id);
if (hContact != NULL) {
if (db_get_b(hContact, "CList", "NotOnList", 0)) {
debugLogA("[YahooAddToList] Temporary Buddy:%s already on our buddy list", id);
@@ -137,7 +137,7 @@ HCONTACT CYahooProto::AddToList( int flags, PROTOSEARCHRESULT* psr ) return hContact;
}
-HCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent )
+MCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HANDLE hDbEvent )
{
debugLogA("[YahooAddToListByEvent]");
if (!m_bLoggedIn)
@@ -166,7 +166,7 @@ HCONTACT __cdecl CYahooProto::AddToListByEvent( int flags, int /*iContact*/, HAN return 0;
}
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL)
debugLogA("Temp Buddy found at: %p ", hContact);
else
@@ -201,7 +201,7 @@ int CYahooProto::Authorize( HANDLE hdbe ) return 1;
/* Need to remove the buddy from our Miranda Lists */
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL) {
ptrA who( getStringA(hContact, YAHOO_LOGINID));
if (who) {
@@ -246,7 +246,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) }
/* Need to remove the buddy from our Miranda Lists */
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
if (hContact != NULL) {
ptrA who( getStringA(hContact, YAHOO_LOGINID));
if (who) {
@@ -264,7 +264,7 @@ int CYahooProto::AuthDeny( HANDLE hdbe, const TCHAR* reason ) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AUTH
-int __cdecl CYahooProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre)
+int __cdecl CYahooProto::AuthRecv(MCONTACT hContact, PROTORECVEVENT* pre)
{
debugLogA("[YahooRecvAuth] ");
db_unset(hContact,"CList","Hidden");
@@ -276,7 +276,7 @@ int __cdecl CYahooProto::AuthRecv(HCONTACT hContact, PROTORECVEVENT* pre) ////////////////////////////////////////////////////////////////////////////////////////
// PSS_AUTHREQUEST
-int __cdecl CYahooProto::AuthRequest(HCONTACT hContact, const TCHAR* msg )
+int __cdecl CYahooProto::AuthRequest(MCONTACT hContact, const TCHAR* msg )
{
debugLogA("[YahooSendAuthRequest]");
@@ -299,7 +299,7 @@ HANDLE __cdecl CYahooProto::ChangeInfo( int /*iInfoType*/, void* ) ////////////////////////////////////////////////////////////////////////////////////////
// GetCaps - return protocol capabilities bits
-DWORD_PTR __cdecl CYahooProto::GetCaps(int type, HCONTACT hContact)
+DWORD_PTR __cdecl CYahooProto::GetCaps(int type, MCONTACT hContact)
{
switch ( type ) {
case PFLAGNUM_1:
@@ -334,10 +334,10 @@ DWORD_PTR __cdecl CYahooProto::GetCaps(int type, HCONTACT hContact) void __cdecl CYahooProto::get_info_thread(void *hContact)
{
SleepEx(500, TRUE);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, (HANDLE)1, 0);
}
-int __cdecl CYahooProto::GetInfo(HCONTACT hContact, int /*infoType*/ )
+int __cdecl CYahooProto::GetInfo(MCONTACT hContact, int /*infoType*/ )
{
ForkThread(&CYahooProto::get_info_thread, (void*)hContact);
return 0;
@@ -362,7 +362,7 @@ HANDLE __cdecl CYahooProto::SearchByName( const PROTOCHAR* nick, const PROTOCHAR ////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
-int __cdecl CYahooProto::RecvContacts(HCONTACT/*hContact*/, PROTORECVEVENT*)
+int __cdecl CYahooProto::RecvContacts(MCONTACT/*hContact*/, PROTORECVEVENT*)
{
return 1;
}
@@ -370,7 +370,7 @@ int __cdecl CYahooProto::RecvContacts(HCONTACT/*hContact*/, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// RecvFile
-int __cdecl CYahooProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt)
+int __cdecl CYahooProto::RecvFile(MCONTACT hContact, PROTORECVFILET* evt)
{
db_unset(hContact, "CList", "Hidden");
@@ -380,7 +380,7 @@ int __cdecl CYahooProto::RecvFile(HCONTACT hContact, PROTORECVFILET* evt) ////////////////////////////////////////////////////////////////////////////////////////
// RecvUrl
-int __cdecl CYahooProto::RecvUrl(HCONTACT/*hContact*/, PROTORECVEVENT*)
+int __cdecl CYahooProto::RecvUrl(MCONTACT/*hContact*/, PROTORECVEVENT*)
{
return 1;
}
@@ -388,7 +388,7 @@ int __cdecl CYahooProto::RecvUrl(HCONTACT/*hContact*/, PROTORECVEVENT*) ////////////////////////////////////////////////////////////////////////////////////////
// SendContacts
-int __cdecl CYahooProto::SendContacts(HCONTACT/*hContact*/, int /*flags*/, int /*nContacts*/, HCONTACT* /*hContactsList*/)
+int __cdecl CYahooProto::SendContacts(MCONTACT/*hContact*/, int /*flags*/, int /*nContacts*/, MCONTACT* /*hContactsList*/)
{
return 1;
}
@@ -396,7 +396,7 @@ int __cdecl CYahooProto::SendContacts(HCONTACT/*hContact*/, int /*flags*/, int / ////////////////////////////////////////////////////////////////////////////////////////
// SendUrl
-int __cdecl CYahooProto::SendUrl(HCONTACT/*hContact*/, int /*flags*/, const char* /*url*/)
+int __cdecl CYahooProto::SendUrl(MCONTACT/*hContact*/, int /*flags*/, const char* /*url*/)
{
return 1;
}
@@ -404,7 +404,7 @@ int __cdecl CYahooProto::SendUrl(HCONTACT/*hContact*/, int /*flags*/, const char ////////////////////////////////////////////////////////////////////////////////////////
// SetApparentMode - sets the visibility status
-int __cdecl CYahooProto::SetApparentMode(HCONTACT hContact, int mode)
+int __cdecl CYahooProto::SetApparentMode(MCONTACT hContact, int mode)
{
if (mode && mode != ID_STATUS_OFFLINE)
return 1;
@@ -524,7 +524,7 @@ void __cdecl CYahooProto::get_status_thread(void *param) int l;
DBVARIANT dbv;
char *gm = NULL, *sm = NULL, *fm;
- HCONTACT hContact = (HCONTACT)param;
+ MCONTACT hContact = (MCONTACT)param;
Sleep(150);
@@ -583,7 +583,7 @@ void __cdecl CYahooProto::get_status_thread(void *param) ProtoBroadcastAck(hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)(TCHAR*)_A2T(fm));
}
-HANDLE __cdecl CYahooProto::GetAwayMsg(HCONTACT hContact)
+HANDLE __cdecl CYahooProto::GetAwayMsg(MCONTACT hContact)
{
debugLogA("[YahooGetAwayMessage] ");
@@ -601,7 +601,7 @@ HANDLE __cdecl CYahooProto::GetAwayMsg(HCONTACT hContact) ////////////////////////////////////////////////////////////////////////////////////////
// PSR_AWAYMSG
-int __cdecl CYahooProto::RecvAwayMsg(HCONTACT/*hContact*/, int /*statusMode*/, PROTORECVEVENT*)
+int __cdecl CYahooProto::RecvAwayMsg(MCONTACT/*hContact*/, int /*statusMode*/, PROTORECVEVENT*)
{
return 1;
}
@@ -674,7 +674,7 @@ INT_PTR __cdecl CYahooProto::GetMyAwayMsg(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// UserIsTyping - sends a UTN notification
-int __cdecl CYahooProto::UserIsTyping(HCONTACT hContact, int type)
+int __cdecl CYahooProto::UserIsTyping(MCONTACT hContact, int type)
{
if (!m_bLoggedIn)
return 0;
diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index 667473292b..d01daf5144 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -25,23 +25,23 @@ struct CYahooProto : public PROTO<CYahooProto> // PROTO_INTERFACE
//====================================================================================
- virtual HCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
- virtual HCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
+ virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
+ virtual MCONTACT __cdecl AddToListByEvent( int flags, int iContact, HANDLE hDbEvent );
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const TCHAR* szReason );
- virtual int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage );
+ virtual int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL);
- virtual int __cdecl GetInfo(HCONTACT hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
@@ -49,25 +49,25 @@ struct CYahooProto : public PROTO<CYahooProto> virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvFile(HCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
+ virtual int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT*);
+ virtual int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT*);
- virtual int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList);
- virtual HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
- virtual int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList);
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR *szDescription, PROTOCHAR **ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode(HCONTACT hContact, int mode);
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
virtual int __cdecl SetStatus(int iNewStatus);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT hContact);
- virtual int __cdecl RecvAwayMsg(HCONTACT hContact, int mode, PROTORECVEVENT *evt);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl RecvAwayMsg(MCONTACT hContact, int mode, PROTORECVEVENT *evt);
virtual int __cdecl SetAwayMsg( int m_iStatus, const PROTOCHAR *msg);
virtual INT_PTR __cdecl GetMyAwayMsg(WPARAM wParam, LPARAM lParam);
- virtual int __cdecl UserIsTyping(HCONTACT hContact, int type);
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
@@ -152,11 +152,11 @@ struct CYahooProto : public PROTO<CYahooProto> void ext_got_picture_upload(const char *me, const char *url, unsigned int ts);
void ext_got_avatar_share(int buddy_icon);
- void reset_avatar(HCONTACT hContact);
+ void reset_avatar(MCONTACT hContact);
void request_avatar(const char* who);
void SendAvatar(const TCHAR *szFile);
- void GetAvatarFileName(HCONTACT hContact, TCHAR* pszDest, int cbLen, int type);
+ void GetAvatarFileName(MCONTACT hContact, TCHAR* pszDest, int cbLen, int type);
//====| chat.cpp |====================================================================
void ChatRegister(void);
@@ -223,20 +223,20 @@ struct CYahooProto : public PROTO<CYahooProto> int __cdecl OnUserInfoInit( WPARAM wParam, LPARAM lParam );
//====| util.cpp |====================================================================
- int GetStringUtf(HCONTACT hContact, const char* name, DBVARIANT* );
- DWORD SetStringUtf(HCONTACT hContact, const char* valueName, const char* parValue );
+ int GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* );
+ DWORD SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue );
- DWORD Set_Protocol(HCONTACT hContact, int protocol );
+ DWORD Set_Protocol(MCONTACT hContact, int protocol );
int ShowNotification(const TCHAR *title, const TCHAR *info, DWORD flags);
void ShowError(const TCHAR *title, const TCHAR *buff);
int ShowPopup( const TCHAR* nickname, const TCHAR* msg, const char *szURL );
- bool IsMyContact(HCONTACT hContact);
+ bool IsMyContact(MCONTACT hContact);
//====| yahoo.cpp |===================================================================
- HCONTACT add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags);
+ MCONTACT add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags);
const char *find_buddy( const char *yahoo_id);
- HCONTACT getbuddyH(const char *yahoo_id);
+ MCONTACT getbuddyH(const char *yahoo_id);
void remove_buddy(const char *who, int protocol);
void logout();
@@ -272,7 +272,7 @@ struct CYahooProto : public PROTO<CYahooProto> void ext_login_response(int succ, const char *url);
void ext_login(enum yahoo_status login_mode);
- void AddBuddy(HCONTACT hContact, const char *group, const TCHAR *msg);
+ void AddBuddy(MCONTACT hContact, const char *group, const TCHAR *msg);
void YAHOO_utils_logversion();
diff --git a/protocols/Yahoo/src/services.cpp b/protocols/Yahoo/src/services.cpp index ebf142a7ab..dc28575a65 100644 --- a/protocols/Yahoo/src/services.cpp +++ b/protocols/Yahoo/src/services.cpp @@ -31,7 +31,7 @@ void CYahooProto::logoff_buddies()
{
//set all contacts to 'offline'
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
setWord( hContact, "Status", ID_STATUS_OFFLINE );
setDword(hContact, "IdleTS", 0);
setDword(hContact, "PictLastCheck", 0);
@@ -83,7 +83,7 @@ void CYahooProto::BroadcastStatus(int s) int __cdecl CYahooProto::OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
debugLogA("[YahooContactDeleted]");
@@ -254,11 +254,11 @@ INT_PTR __cdecl CYahooProto::OnShowProfileCommand(WPARAM wParam, LPARAM lParam) /**
* We don't show profile for users using other IM clients through the IM server bridge
*/
- if (getWord((HCONTACT)wParam, "yprotoid", 0) != 0) {
+ if (getWord((MCONTACT)wParam, "yprotoid", 0) != 0) {
return 0;
}
- if (getString((HCONTACT)wParam, YAHOO_LOGINID, &dbv))
+ if (getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv))
return 0;
mir_snprintf(tUrl, sizeof(tUrl), "http://profiles.yahoo.com/%s", dbv.pszVal);
@@ -497,7 +497,7 @@ void CYahooProto::MenuUninit( void ) int __cdecl CYahooProto::OnPrebuildContactMenu(WPARAM wParam, LPARAM)
{
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if (!IsMyContact(hContact)) {
debugLogA("[OnPrebuildContactMenu] Not a Yahoo Contact!!!");
return 0;
diff --git a/protocols/Yahoo/src/user_info.cpp b/protocols/Yahoo/src/user_info.cpp index 79a2c77c64..0f020adbd7 100644 --- a/protocols/Yahoo/src/user_info.cpp +++ b/protocols/Yahoo/src/user_info.cpp @@ -47,7 +47,7 @@ static INT_PTR CALLBACK YahooUserInfoDlgProc( HWND hwndDlg, UINT msg, WPARAM wPa break;
char* szProto;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact == NULL) {
szProto = ppro->m_szModuleName;
@@ -118,7 +118,7 @@ int __cdecl CYahooProto::OnUserInfoInit( WPARAM wParam, LPARAM lParam ) odp.dwInitParam = (LPARAM)this;
odp.flags = ODPF_TCHAR | ODPF_DONTTRANSLATE;
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
if ( IsMyContact(hContact)) {
odp.pfnDlgProc = YahooUserInfoDlgProc;
odp.position = -1900000000;
diff --git a/protocols/Yahoo/src/util.cpp b/protocols/Yahoo/src/util.cpp index 2cad148fb1..9550adf4d4 100644 --- a/protocols/Yahoo/src/util.cpp +++ b/protocols/Yahoo/src/util.cpp @@ -39,7 +39,7 @@ int debugLogA( const char *fmt, ... ) return CallService(MS_NETLIB_LOG, (WPARAM)g_hNetlibUser, (LPARAM)str);
}
-DWORD CYahooProto::Set_Protocol(HCONTACT hContact, int protocol )
+DWORD CYahooProto::Set_Protocol(MCONTACT hContact, int protocol )
{
char *s=NULL;
@@ -59,11 +59,11 @@ DWORD CYahooProto::Set_Protocol(HCONTACT hContact, int protocol ) return 0;
}
-int CYahooProto::GetStringUtf(HCONTACT hContact, const char* name, DBVARIANT* result)
+int CYahooProto::GetStringUtf(MCONTACT hContact, const char* name, DBVARIANT* result)
{ return db_get_utf(hContact, m_szModuleName, name, result);
}
-DWORD CYahooProto::SetStringUtf(HCONTACT hContact, const char* valueName, const char* parValue)
+DWORD CYahooProto::SetStringUtf(MCONTACT hContact, const char* valueName, const char* parValue)
{ return db_set_utf(hContact, m_szModuleName, valueName, parValue);
}
@@ -162,8 +162,8 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam) debugLogA("DB Setting changed. YAHOO user's visible setting changed.");
DBVARIANT dbv;
- if (!getString((HCONTACT)wParam, YAHOO_LOGINID, &dbv)) {
- int iAdd = (ID_STATUS_OFFLINE == getWord((HCONTACT)wParam, "ApparentMode", 0));
+ if (!getString((MCONTACT)wParam, YAHOO_LOGINID, &dbv)) {
+ int iAdd = (ID_STATUS_OFFLINE == getWord((MCONTACT)wParam, "ApparentMode", 0));
stealth(dbv.pszVal, iAdd);
db_free(&dbv);
}
@@ -171,7 +171,7 @@ int __cdecl CYahooProto::OnSettingChanged(WPARAM wParam, LPARAM lParam) return 0;
}
-bool CYahooProto::IsMyContact(HCONTACT hContact)
+bool CYahooProto::IsMyContact(MCONTACT hContact)
{
if (!hContact)
return false;
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp index ef7fcfb7c0..fc4debb1f5 100644 --- a/protocols/Yahoo/src/yahoo.cpp +++ b/protocols/Yahoo/src/yahoo.cpp @@ -228,7 +228,7 @@ void CYahooProto::logout() poll_loop = 0;
}
-void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *msg)
+void CYahooProto::AddBuddy(MCONTACT hContact, const char *group, const TCHAR *msg)
{
DBVARIANT dbv;
char *fname=NULL, *lname=NULL, *ident=NULL, *who, *u_msg;
@@ -282,9 +282,9 @@ void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *ms mir_free(u_msg);
}
-HCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
+MCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (getString(hContact, YAHOO_LOGINID, &dbv))
continue;
@@ -300,12 +300,12 @@ HCONTACT CYahooProto::getbuddyH(const char *yahoo_id) return NULL;
}
-HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags)
+MCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags)
{
char *yid = NEWSTR_ALLOCA(yahoo_id);
strlwr(yid);
- HCONTACT hContact = getbuddyH(yid);
+ MCONTACT hContact = getbuddyH(yid);
if (hContact != NULL) {
LOG(("[add_buddy] Found buddy id: %s, handle: %p", yid, hContact));
if ( !(flags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 1)) {
@@ -319,7 +319,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in //not already there: add
LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
- 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)m_szModuleName);
setString( hContact, YAHOO_LOGINID, yid );
Set_Protocol( hContact, protocol );
@@ -340,7 +340,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in const char* CYahooProto::find_buddy( const char *yahoo_id)
{
static char nick[128];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
hContact = getbuddyH(yahoo_id);
@@ -371,7 +371,7 @@ void CYahooProto::ext_status_changed(const char *who, int protocol, int stat, co away,
idle);
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
debugLogA("Buddy Not Found. Adding...");
hContact = add_buddy(who, who, protocol, 0);
@@ -426,7 +426,7 @@ void CYahooProto::ext_status_logon(const char *who, int protocol, int stat, cons ext_status_changed(who, protocol, stat, msg, away, idle, mobile, utf8);
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
debugLogA("[ext_status_logon] Can't find handle for %s??? PANIC!!!", who);
return;
@@ -569,7 +569,7 @@ void CYahooProto::ext_got_audible(const char *me, const char *who, const char *a LOG(("ext_got_audible for %s aud: %s msg:'%s' hash: %s", who, aud, msg, aud_hash));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
LOG(("Buddy Not Found. Skipping avatar update"));
return;
@@ -600,7 +600,7 @@ void CYahooProto::ext_got_stealth(char *stealthlist) if (stealthlist)
stealth = y_strsplit(stealthlist, ",", -1);
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (getString( hContact, YAHOO_LOGINID, &dbv))
continue;
@@ -645,7 +645,7 @@ void CYahooProto::ext_got_buddies(YList * buds) debugLogA(("[ext_got_buddies] Walking buddy list..."));
for (; buds; buds = buds->next) {
- HCONTACT hContact;
+ MCONTACT hContact;
yahoo_buddy *bud = ( yahoo_buddy* )buds->data;
if (bud == NULL) {
@@ -719,7 +719,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg) {
LOG(("[ext_rejected] who: %s msg: %s", who, msg));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact != NULL) {
/*
* Make sure the contact is temporary so we could delete it w/o extra traffic
@@ -739,7 +739,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg) void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status, int auth)
{
- HCONTACT hContact=getbuddyH(who);
+ MCONTACT hContact=getbuddyH(who);
LOG(("[ext_buddy_added] %s authorized you as %s group: %s status: %d auth: %d", who, myid, group, status, auth));
@@ -778,7 +778,7 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha {
char nick[128];
BYTE *pCurBlob;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
PROTORECVEVENT pre = { 0 };
/* NOTE: Msg is actually in UTF8 unless stated otherwise!! */
@@ -869,7 +869,7 @@ void CYahooProto::ext_typing_notify(const char *me, const char *who, int protoco {
LOG(("[ext_typing_notify] me: '%s' who: '%s' protocol: %d stat: %d ", me, who, protocol, stat));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact)
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)stat?10:0);
@@ -904,7 +904,7 @@ void CYahooProto::ext_game_notify(const char *me, const char *who, int stat, con LOG(("[ext_game_notify] me: %s, who: %s, stat: %d, msg: %s", me, who, stat, msg));
/* FIXME - Not Implemented - this informs you someone else is playing on Yahoo! Games */
/* Also Stubbed in Sample Client */
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (!hContact)
return;
diff --git a/src/core/miranda.h b/src/core/miranda.h index 4af88c8984..29ef7d8509 100644 --- a/src/core/miranda.h +++ b/src/core/miranda.h @@ -130,7 +130,7 @@ extern const int statusModeList[ MAX_STATUS_COUNT ]; extern const int skinIconStatusList[ MAX_STATUS_COUNT ];
extern const int skinIconStatusFlags[ MAX_STATUS_COUNT ];
-int TryProcessDoubleClick(HCONTACT hContact);
+int TryProcessDoubleClick(MCONTACT hContact);
void KillModuleMenus(int hLangpack);
@@ -144,7 +144,7 @@ void KillModuleMenus(int hLangpack); extern LIST<PROTOACCOUNT> accounts;
PROTOACCOUNT* __fastcall Proto_GetAccount(const char* accName);
-PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact);
+PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact);
PROTOCOLDESCRIPTOR* __fastcall Proto_IsProtocolLoaded(const char* szProtoName);
bool __fastcall Proto_IsAccountEnabled(PROTOACCOUNT* pa);
@@ -162,7 +162,7 @@ void OpenAccountOptions(PROTOACCOUNT* pa); void LoadDbAccounts(void);
void WriteDbAccounts(void);
-INT_PTR CallProtoServiceInt(HCONTACT hContact, const char* szModule, const char* szService, WPARAM wParam, LPARAM lParam);
+INT_PTR CallProtoServiceInt(MCONTACT hContact, const char* szModule, const char* szService, WPARAM wParam, LPARAM lParam);
/**** utils.cpp ************************************************************************/
diff --git a/src/core/stdauth/auth.cpp b/src/core/stdauth/auth.cpp index 14f5723124..d55a16898d 100644 --- a/src/core/stdauth/auth.cpp +++ b/src/core/stdauth/auth.cpp @@ -57,7 +57,7 @@ static int AuthEventAdded(WPARAM, LPARAM lParam) dbei.pBlob = (PBYTE)alloca(dbei.cbBlob);
db_event_get(hDbEvent, &dbei);
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
CLISTEVENT cli = {0};
cli.cbSize = sizeof(cli);
diff --git a/src/core/stdauth/authdialogs.cpp b/src/core/stdauth/authdialogs.cpp index d66941dd31..27a5c64107 100644 --- a/src/core/stdauth/authdialogs.cpp +++ b/src/core/stdauth/authdialogs.cpp @@ -45,7 +45,7 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar db_event_get(hDbEvent, &dbei);
DWORD uin = *(PDWORD)dbei.pBlob;
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
char* nick = (char*)dbei.pBlob + sizeof(DWORD)*2;
char* first = nick + strlen(nick) + 1;
char* last = first + strlen(first) + 1;
@@ -96,7 +96,7 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar SetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA, (LONG_PTR)hContact);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || !db_get_b(hContact, "CList", "NotOnList", 0))
+ if (hContact == INVALID_CONTACT_ID || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
}
return TRUE;
@@ -111,14 +111,14 @@ INT_PTR CALLBACK DlgProcAdded(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar acs.szProto = "";
CallService(MS_ADDCONTACT_SHOW, (WPARAM)hwndDlg, (LPARAM)&acs);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
- if ((hContact == (HCONTACT)INVALID_HANDLE_VALUE) || !db_get_b(hContact, "CList", "NotOnList", 0))
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
+ if ((hContact == INVALID_CONTACT_ID) || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
break;
}
case IDC_DETAILS:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(GetDlgItem(hwndDlg, IDC_DETAILS), GWLP_USERDATA);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
}
@@ -168,7 +168,7 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP db_event_get(hDbEvent, &dbei);
DWORD uin = *(PDWORD)dbei.pBlob;
- HCONTACT hContact = DbGetAuthEventContact(&dbei);
+ MCONTACT hContact = DbGetAuthEventContact(&dbei);
char *nick = (char*)dbei.pBlob + sizeof(DWORD)*2;
char *first = nick + strlen(nick) + 1;
char *last = first + strlen(first) + 1;
@@ -214,7 +214,7 @@ INT_PTR CALLBACK DlgProcAuthReq(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SetDlgItemText(hwndDlg, IDC_HEADERBAR, hdr);
SetDlgItemText(hwndDlg, IDC_REASON, reasonT);
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || !db_get_b(hContact, "CList", "NotOnList", 0))
+ if (hContact == INVALID_CONTACT_ID || !db_get_b(hContact, "CList", "NotOnList", 0))
ShowWindow(GetDlgItem(hwndDlg, IDC_ADD), FALSE);
SendDlgItemMessage(hwndDlg, IDC_DENYREASON, EM_LIMITTEXT, 255, 0);
diff --git a/src/core/stdaway/awaymsg.cpp b/src/core/stdaway/awaymsg.cpp index cc8427ec72..c7df74e5a8 100644 --- a/src/core/stdaway/awaymsg.cpp +++ b/src/core/stdaway/awaymsg.cpp @@ -30,7 +30,7 @@ static HGENMENU hAwayMsgMenuItem; static HANDLE hWindowList;
struct AwayMsgDlgData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hSeq;
HANDLE hAwayMsgEvent;
};
@@ -46,7 +46,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->hAwayMsgEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_AWAYMSG);
dat->hSeq = (HANDLE)CallContactService(dat->hContact, PSS_GETAWAYMSG, 0, 0);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
@@ -77,7 +77,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP ack.result = ACKRESULT_SUCCESS;
SendMessage(hwndDlg, HM_AWAYMSG, 0, (LPARAM)&ack);
}
- Utils_RestoreWindowPosition(hwndDlg, (HCONTACT)lParam, "SRAway", "AwayMsgDlg");
+ Utils_RestoreWindowPosition(hwndDlg, (MCONTACT)lParam, "SRAway", "AwayMsgDlg");
return TRUE;
case HM_AWAYMSG:
@@ -123,7 +123,7 @@ static INT_PTR CALLBACK ReadAwayMsgDlgProc(HWND hwndDlg, UINT message, WPARAM wP static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM)
{
HWND hwnd;
- if (hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam)) {
+ if (hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam)) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
}
@@ -134,15 +134,15 @@ static INT_PTR GetMessageCommand(WPARAM wParam, LPARAM) static int AwayMsgPreBuildMenu(WPARAM wParam, LPARAM)
{
TCHAR str[128];
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
CLISTMENUITEM mi = { sizeof(mi) };
mi.flags = CMIM_FLAGS | CMIF_NOTOFFLINE | CMIF_HIDDEN | CMIF_TCHAR;
if (szProto != NULL) {
- int chatRoom = szProto ? db_get_b((HCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
+ int chatRoom = szProto ? db_get_b((MCONTACT)wParam, szProto, "ChatRoom", 0) : 0;
if ( !chatRoom) {
- int status = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ int status = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
mir_sntprintf(str, SIZEOF(str), TranslateT("Re&ad %s message"), pcli->pfnGetStatusModeDescription(status, 0));
mi.ptszName = str;
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGRECV) {
diff --git a/src/core/stdchat/src/window.cpp b/src/core/stdchat/src/window.cpp index 05145007f2..b07d8ffcc7 100644 --- a/src/core/stdchat/src/window.cpp +++ b/src/core/stdchat/src/window.cpp @@ -1074,7 +1074,7 @@ static LRESULT CALLBACK NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, return mir_callNextSubclass(hwnd, NicklistSubclassProc, msg, wParam, lParam);
}
-static int RestoreWindowPosition(HWND hwnd, HCONTACT hContact, char * szModule, char * szNamePrefix, UINT showCmd)
+static int RestoreWindowPosition(HWND hwnd, MCONTACT hContact, char * szModule, char * szNamePrefix, UINT showCmd)
{
WINDOWPLACEMENT wp;
wp.length = sizeof(wp);
diff --git a/src/core/stdclist/src/clistopts.cpp b/src/core/stdclist/src/clistopts.cpp index 6dc2d88deb..ee90165e6c 100644 --- a/src/core/stdclist/src/clistopts.cpp +++ b/src/core/stdclist/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))
@@ -222,7 +222,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/src/core/stdemail/email.cpp b/src/core/stdemail/email.cpp index 537f40e7df..9c8f1eeafe 100644 --- a/src/core/stdemail/email.cpp +++ b/src/core/stdemail/email.cpp @@ -35,9 +35,9 @@ void SendEmailThread(void *szUrl) static INT_PTR SendEMailCommand(WPARAM wParam, LPARAM lParam)
{
DBVARIANT dbv;
- char *szProto = GetContactProto((HCONTACT)wParam);
- if (szProto == NULL || db_get_s((HCONTACT)wParam, szProto, "e-mail", &dbv)) {
- if (db_get_s((HCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv)) {
+ char *szProto = GetContactProto((MCONTACT)wParam);
+ if (szProto == NULL || db_get_s((MCONTACT)wParam, szProto, "e-mail", &dbv)) {
+ if (db_get_s((MCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv)) {
MessageBox((HWND)lParam, TranslateT("User has not registered an e-mail address"), TranslateT("Send e-mail"), MB_OK);
return 1;
}
@@ -54,9 +54,9 @@ static int EMailPreBuildMenu(WPARAM wParam, LPARAM) {
bool bEnabled = true;
DBVARIANT dbv = { 0 };
- char *szProto = GetContactProto((HCONTACT)wParam);
- if (szProto == NULL || db_get_s((HCONTACT)wParam, szProto, "e-mail", &dbv))
- if (db_get_s((HCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv))
+ char *szProto = GetContactProto((MCONTACT)wParam);
+ if (szProto == NULL || db_get_s((MCONTACT)wParam, szProto, "e-mail", &dbv))
+ if (db_get_s((MCONTACT)wParam, "UserInfo", "Mye-mail0", &dbv))
bEnabled = false;
Menu_ShowItem(hEMailMenuItem, bEnabled);
diff --git a/src/core/stdfile/file.cpp b/src/core/stdfile/file.cpp index 7cf600a641..9bc353b73d 100644 --- a/src/core/stdfile/file.cpp +++ b/src/core/stdfile/file.cpp @@ -30,7 +30,7 @@ int PFTS_CompareWithTchar(PROTOFILETRANSFERSTATUS* ft, const PROTOCHAR* s, TCHAR static HGENMENU hSRFileMenuItem;
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
TCHAR *theValue = {0};
char *szProto = GetContactProto(hContact);
@@ -62,7 +62,7 @@ TCHAR *GetContactID(HCONTACT hContact) static INT_PTR SendFileCommand(WPARAM wParam, LPARAM)
{
struct FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
fsd.ppFiles = NULL;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -71,7 +71,7 @@ static INT_PTR SendFileCommand(WPARAM wParam, LPARAM) static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
char** ppFiles = (char**)lParam;
int count = 0;
@@ -92,7 +92,7 @@ static INT_PTR SendSpecificFiles(WPARAM wParam, LPARAM lParam) static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam)
{
FileSendData fsd;
- fsd.hContact = (HCONTACT)wParam;
+ fsd.hContact = (MCONTACT)wParam;
fsd.ppFiles = (const TCHAR**)lParam;
CreateDialogParam(hInst, MAKEINTRESOURCE(IDD_FILESEND), NULL, DlgProcSendFile, (LPARAM)&fsd);
return 0;
@@ -101,7 +101,7 @@ static INT_PTR SendSpecificFilesT(WPARAM wParam, LPARAM lParam) static INT_PTR GetReceivedFilesFolder(WPARAM wParam, LPARAM lParam)
{
TCHAR buf[MAX_PATH];
- GetContactReceivedFilesDir((HCONTACT)wParam, buf, MAX_PATH, TRUE);
+ GetContactReceivedFilesDir((MCONTACT)wParam, buf, MAX_PATH, TRUE);
char* dir = mir_t2a(buf);
lstrcpynA((char*)lParam, dir, MAX_PATH);
mir_free(dir);
@@ -114,7 +114,7 @@ static INT_PTR RecvFileCommand(WPARAM, LPARAM lParam) return 0;
}
-void PushFileEvent(HCONTACT hContact, HANDLE hdbe, LPARAM lParam)
+void PushFileEvent(MCONTACT hContact, HANDLE hdbe, LPARAM lParam)
{
CLISTEVENT cle = {0};
cle.cbSize = sizeof(cle);
@@ -148,7 +148,7 @@ static int FileEventAdded(WPARAM wParam, LPARAM lParam) if (dbei.flags & (DBEF_SENT|DBEF_READ) || dbei.eventType != EVENTTYPE_FILE || dwSignature == 0)
return 0;
- PushFileEvent((HCONTACT)wParam, (HANDLE)lParam, 0);
+ PushFileEvent((MCONTACT)wParam, (HANDLE)lParam, 0);
return 0;
}
@@ -288,7 +288,7 @@ void UpdateProtoFileTransferStatus(PROTOFILETRANSFERSTATUS *dest, PROTOFILETRANS static void RemoveUnreadFileEvents(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) };
@@ -303,12 +303,12 @@ static void RemoveUnreadFileEvents(void) static int SRFilePreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_FILESEND) {
if ( CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_4, 0) & PF4_OFFLINEFILES)
bEnabled = true;
- else if (db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
+ else if (db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE)
bEnabled = true;
}
}
@@ -339,7 +339,7 @@ INT_PTR FtMgrShowCommand(WPARAM, LPARAM) INT_PTR openContRecDir(WPARAM wparam, LPARAM)
{
TCHAR szContRecDir[MAX_PATH];
- HCONTACT hContact = (HCONTACT)wparam;
+ MCONTACT hContact = (MCONTACT)wparam;
GetContactReceivedFilesDir(hContact, szContRecDir, SIZEOF(szContRecDir), TRUE);
ShellExecute(0, _T("open"), szContRecDir, 0, 0, SW_SHOW);
return 0;
diff --git a/src/core/stdfile/file.h b/src/core/stdfile/file.h index aa390a774a..2c21d5987f 100644 --- a/src/core/stdfile/file.h +++ b/src/core/stdfile/file.h @@ -38,7 +38,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define M_PRESHUTDOWN (WM_USER+201)
struct FileSendData {
- HCONTACT hContact;
+ MCONTACT hContact;
const TCHAR **ppFiles;
};
@@ -46,7 +46,7 @@ struct FileSendData { struct FileDlgData {
HWND hwndTransfer;
HANDLE fs;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
HANDLE hNotifyEvent;
TCHAR **files;
@@ -85,7 +85,7 @@ INT_PTR CALLBACK DlgProcSendFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l INT_PTR CALLBACK DlgProcRecvFile(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam);
void RemoveInvalidFilenameChars(TCHAR *tszString);
void RemoveInvalidPathChars(TCHAR *tszString);
-void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL substVars);
+void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL substVars);
void GetReceivedFilesDir(TCHAR *szDir, int cchDir);
int BrowseForFolder(HWND hwnd, TCHAR *szPath);
//fileexistsdlg.c
@@ -113,4 +113,4 @@ HWND FtMgr_AddTransfer(struct FileDlgData *dat); void FreeFileDlgData(FileDlgData* dat);
-TCHAR *GetContactID(HCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact);
diff --git a/src/core/stdfile/filerecvdlg.cpp b/src/core/stdfile/filerecvdlg.cpp index b98aa94ea6..f2f19d5ded 100644 --- a/src/core/stdfile/filerecvdlg.cpp +++ b/src/core/stdfile/filerecvdlg.cpp @@ -131,7 +131,7 @@ static void patchDir(TCHAR *str, size_t strSize) lstrcpy(str+len, _T("\\"));
}
-void GetContactReceivedFilesDir(HCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
+void GetContactReceivedFilesDir(MCONTACT hContact, TCHAR *szDir, int cchDir, BOOL patchVars)
{
DBVARIANT dbv;
TCHAR szTemp[MAX_PATH];
diff --git a/src/core/stdmsg/src/cmdlist.cpp b/src/core/stdmsg/src/cmdlist.cpp index 90be69418b..b4a326a5b3 100644 --- a/src/core/stdmsg/src/cmdlist.cpp +++ b/src/core/stdmsg/src/cmdlist.cpp @@ -89,7 +89,7 @@ static VOID CALLBACK MsgTimer(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTi MessageFailureProcess(tmlst[i], LPGEN("The message send timed out."));
}
-void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent)
+void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent)
{
TMsgQueue *item = (TMsgQueue*)mir_alloc(sizeof(TMsgQueue));
item->hContact = hContact;
@@ -106,7 +106,7 @@ void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent }
-void msgQueue_processack(HCONTACT hContact, int id, BOOL success, const char* szErr)
+void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr)
{
int i;
TMsgQueue* item = NULL;
diff --git a/src/core/stdmsg/src/cmdlist.h b/src/core/stdmsg/src/cmdlist.h index c82cf41666..66d273617c 100644 --- a/src/core/stdmsg/src/cmdlist.h +++ b/src/core/stdmsg/src/cmdlist.h @@ -38,15 +38,15 @@ __inline TCHAR* tcmdlist_getitem(SortedList *list, int ind) typedef struct _TMsgQueue
{
int id;
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR* szMsg;
HANDLE hDbEvent;
unsigned ts;
}
TMsgQueue;
-void msgQueue_add(HCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent);
-void msgQueue_processack(HCONTACT hContact, int id, BOOL success, const char* szErr);
+void msgQueue_add(MCONTACT hContact, int id, const TCHAR* szMsg, HANDLE hDbEvent);
+void msgQueue_processack(MCONTACT hContact, int id, BOOL success, const char* szErr);
void msgQueue_init(void);
void msgQueue_destroy(void);
diff --git a/src/core/stdmsg/src/globals.cpp b/src/core/stdmsg/src/globals.cpp index 15d5bc126a..71af89163b 100644 --- a/src/core/stdmsg/src/globals.cpp +++ b/src/core/stdmsg/src/globals.cpp @@ -121,7 +121,7 @@ void ReloadGlobals() static int dbaddedevent(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h)
@@ -144,7 +144,7 @@ static int ackevent(WPARAM wParam, LPARAM lParam) int AvatarChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND h = WindowList_Find(g_dat.hMessageWindowList, hContact);
if (h) SendMessage(h, HM_AVATARACK, wParam, lParam);
return 0;
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 1861bf13af..23a16cc783 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -41,7 +41,7 @@ static const UINT infoLineControls[] = { IDC_PROTOCOL, IDC_NAME }; static const UINT buttonLineControls[] = { IDC_ADD, IDC_USERMENU, IDC_DETAILS, IDC_HISTORY };
static const UINT sendControls[] = { IDC_MESSAGE };
-static void NotifyLocalWinEvent(HCONTACT hContact, HWND hwnd, unsigned int type)
+static void NotifyLocalWinEvent(MCONTACT hContact, HWND hwnd, unsigned int type)
{
if (hContact == NULL || hwnd == NULL)
return;
@@ -58,7 +58,7 @@ static 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 )
@@ -80,7 +80,7 @@ static int RTL_Detect(const TCHAR *ptszText) return 0;
}
-HANDLE SendMessageDirect(const TCHAR *szMsg, HCONTACT hContact, char *szProto)
+HANDLE SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char *szProto)
{
if (hContact == NULL)
return NULL;
@@ -1308,7 +1308,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP break;
case HM_DBEVENTADDED:
- if ((HCONTACT)wParam == dat->hContact) {
+ if ((MCONTACT)wParam == dat->hContact) {
HANDLE hDbEvent = (HANDLE)lParam;
if (dat->hDbEventFirst == NULL)
dat->hDbEventFirst = hDbEvent;
@@ -1751,7 +1751,7 @@ INT_PTR CALLBACK DlgProcMessage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP if (hFont != NULL && hFont != (HFONT)SendDlgItemMessage(hwndDlg, IDOK, WM_GETFONT, 0, 0))
DeleteObject(hFont);
- HCONTACT hContact;
+ MCONTACT hContact;
if (db_get_b(NULL, SRMMMOD, SRMSGSET_SAVEPERCONTACT, SRMSGDEFSET_SAVEPERCONTACT))
hContact = dat->hContact;
else
diff --git a/src/core/stdmsg/src/msglog.cpp b/src/core/stdmsg/src/msglog.cpp index 4775242489..1aedcf4640 100644 --- a/src/core/stdmsg/src/msglog.cpp +++ b/src/core/stdmsg/src/msglog.cpp @@ -37,7 +37,7 @@ static int logIconBmpSize[ SIZEOF(pLogIconBmpBits) ]; struct LogStreamData
{
int stage;
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent, hDbEventLast;
char *buffer;
int bufferOffset, bufferLen;
@@ -263,7 +263,7 @@ int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat) }
//mir_free() the return value
-static char *CreateRTFFromDbEvent(SrmmWindowData *dat, HCONTACT hContact, HANDLE hDbEvent, struct LogStreamData *streamData)
+static char *CreateRTFFromDbEvent(SrmmWindowData *dat, MCONTACT hContact, HANDLE hDbEvent, struct LogStreamData *streamData)
{
char *buffer;
int bufferAlloced, bufferEnd;
diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 511de0a1f1..21728424bb 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -449,7 +449,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);
@@ -464,7 +464,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/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 256790d429..c448ec70f5 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -59,7 +59,7 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) CallServiceSync(MS_CLIST_REMOVEEVENT, wParam, (LPARAM) 1);
/* does a window for the contact exist? */
- HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(g_dat.hMessageWindowList, (MCONTACT)wParam);
if (hwnd) {
if (!db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS)) {
ShowWindow(hwnd, SW_RESTORE);
@@ -78,10 +78,10 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) /* new message */
SkinPlaySound("AlertMsg");
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto && (g_dat.openFlags & SRMMStatusToPf2(CallProtoService(szProto, PS_GETSTATUS, 0, 0)))) {
NewMessageWindowLParam newData = { 0 };
- newData.hContact = (HCONTACT)wParam;
+ newData.hContact = (MCONTACT)wParam;
newData.noActivate = db_get_b(NULL, SRMMMOD, SRMSGSET_DONOTSTEALFOCUS, SRMSGDEFSET_DONOTSTEALFOCUS);
CreateDialogParam(g_hInst, MAKEINTRESOURCE(IDD_MSG), NULL, DlgProcMessage, (LPARAM)&newData);
return 0;
@@ -89,21 +89,21 @@ static int MessageEventAdded(WPARAM wParam, LPARAM lParam) TCHAR toolTip[256], *contactName;
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.flags = CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon(SKINICON_EVENT_MESSAGE);
cle.pszService = "SRMsg/ReadMessage";
- contactName = pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0);
+ contactName = pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0);
mir_sntprintf(toolTip, SIZEOF(toolTip), TranslateT("Message from %s"), contactName);
cle.ptszTooltip = toolTip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
return 0;
}
-INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar)
+INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar)
{
- /* does the HCONTACT's protocol support IM messages? */
+ /* does the MCONTACT's protocol support IM messages? */
char *szProto = GetContactProto(hContact);
if (!szProto || (!CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_IMSEND))
return 1;
@@ -135,12 +135,12 @@ INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar) static INT_PTR SendMessageCommand_W(WPARAM wParam, LPARAM lParam)
{
- return SendMessageCmd((HCONTACT)wParam, (char*)lParam, TRUE);
+ return SendMessageCmd((MCONTACT)wParam, (char*)lParam, TRUE);
}
static INT_PTR SendMessageCommand(WPARAM wParam, LPARAM lParam)
{
- return SendMessageCmd((HCONTACT)wParam, (char*)lParam, FALSE);
+ return SendMessageCmd((MCONTACT)wParam, (char*)lParam, FALSE);
}
static INT_PTR ReadMessageCommand(WPARAM wParam, LPARAM lParam)
@@ -159,12 +159,12 @@ 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.flags & SMF_SHOWTYPINGTRAY)) {
TCHAR szTip[256];
- mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(szTip, SIZEOF(szTip), TranslateT("%s is typing a message"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
if (ServiceExists(MS_CLIST_SYSTRAY_NOTIFY) && !(g_dat.flags&SMF_SHOWTYPINGCLIST)) {
MIRANDASYSTRAYNOTIFY tn = { sizeof(tn) };
@@ -177,7 +177,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) }
else {
CLISTEVENT cle = { sizeof(cle) };
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)1;
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
cle.hIcon = LoadSkinnedIcon( SKINICON_OTHER_TYPING );
@@ -194,7 +194,7 @@ static int TypingMessage(WPARAM wParam, LPARAM lParam) static int MessageSettingChanged(WPARAM wParam, LPARAM lParam)
{
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (cws->szModule == NULL) return 0;
@@ -204,7 +204,7 @@ static int MessageSettingChanged(WPARAM wParam, LPARAM lParam) if (cws->szSetting && !strcmp(cws->szSetting, "Timezone"))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_NEWTIMEZONE, (WPARAM) cws, 0);
else {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto && !strcmp(cws->szModule, szProto))
WindowList_Broadcast(g_dat.hMessageWindowList, DM_UPDATETITLE, (WPARAM) cws, 0);
}
@@ -215,7 +215,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;
@@ -235,7 +235,7 @@ static 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)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
autoPopup = 0;
@@ -315,7 +315,7 @@ static int IconsChanged(WPARAM, LPARAM) static int PrebuildContactMenu(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
bool bEnabled = false;
char *szProto = GetContactProto(hContact);
@@ -346,7 +346,7 @@ static INT_PTR GetWindowClass(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)
return 1;
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 29cbf7520e..c2f4d36e63 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct NewMessageWindowLParam
{
- HCONTACT hContact;
+ MCONTACT hContact;
const char *szInitialText;
int isWchar;
int noActivate;
@@ -35,7 +35,7 @@ struct NewMessageWindowLParam struct SrmmWindowData
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEventFirst, hDbEventLast;
HBRUSH hBkgBrush;
int splitterPos, originalSplitterPos;
@@ -117,7 +117,7 @@ INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar int DbEventIsForMsgWindow(DBEVENTINFO *dbei);
int DbEventIsShown(DBEVENTINFO * dbei, SrmmWindowData *dat);
void StreamInEvents(HWND hwndDlg, HANDLE hDbEventFirst, int count, int fAppend);
-HANDLE SendMessageDirect(const TCHAR *szMsg, HCONTACT hContact, char *szProto);
+HANDLE SendMessageDirect(const TCHAR *szMsg, MCONTACT hContact, char *szProto);
void LoadMsgLogIcons(void);
void FreeMsgLogIcons(void);
diff --git a/src/core/stdmsg/src/msgtimedout.cpp b/src/core/stdmsg/src/msgtimedout.cpp index f8c8b82f49..b42875447f 100644 --- a/src/core/stdmsg/src/msgtimedout.cpp +++ b/src/core/stdmsg/src/msgtimedout.cpp @@ -28,7 +28,7 @@ typedef struct TMsgQueue *item;
} ErrorDlgParam;
-INT_PTR SendMessageCmd(HCONTACT hContact, char* msg, int isWchar);
+INT_PTR SendMessageCmd(MCONTACT hContact, char* msg, int isWchar);
INT_PTR CALLBACK ErrorDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
diff --git a/src/core/stdmsg/src/statusicon.cpp b/src/core/stdmsg/src/statusicon.cpp index 060f950aa0..e969085c22 100644 --- a/src/core/stdmsg/src/statusicon.cpp +++ b/src/core/stdmsg/src/statusicon.cpp @@ -26,7 +26,7 @@ HANDLE hHookIconPressedEvt; static int OnSrmmIconChanged(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
WindowList_Broadcast(g_dat.hMessageWindowList, DM_STATUSICONCHANGE, 0, 0);
else {
@@ -37,7 +37,7 @@ static int OnSrmmIconChanged(WPARAM wParam, LPARAM) return 0;
}
-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;
@@ -55,7 +55,7 @@ void DrawStatusIcons(HCONTACT hContact, HDC hDC, RECT r, int gap) }
}
-void CheckIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
+void CheckIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int click_flags)
{
int iconNum = (pt.x - r.left) / (GetSystemMetrics(SM_CXSMICON) + gap);
StatusIconData *sid = Srmm_GetNthIcon(hContact, iconNum);
@@ -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/src/core/stdmsg/src/statusicon.h b/src/core/stdmsg/src/statusicon.h index 2da94eab1a..8afbbfb0bb 100644 --- a/src/core/stdmsg/src/statusicon.h +++ b/src/core/stdmsg/src/statusicon.h @@ -7,8 +7,8 @@ extern int status_icon_list_size; int InitStatusIcons();
int DeinitStatusIcons();
-int GetStatusIconsCount(HCONTACT hContact);
-void DrawStatusIcons(HCONTACT hContact, HDC hdc, RECT r, int gap);
-void CheckIconClick(HCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int flags);
+int GetStatusIconsCount(MCONTACT hContact);
+void DrawStatusIcons(MCONTACT hContact, HDC hdc, RECT r, int gap);
+void CheckIconClick(MCONTACT hContact, HWND hwndFrom, POINT pt, RECT r, int gap, int flags);
#endif
diff --git a/src/core/stduihist/history.cpp b/src/core/stduihist/history.cpp index 0978f94731..6f88f3200d 100644 --- a/src/core/stduihist/history.cpp +++ b/src/core/stduihist/history.cpp @@ -135,7 +135,7 @@ static void GetObjectSummary(DBEVENTINFO *dbei, TCHAR* str, int cbStr) }
typedef struct {
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hwnd;
} THistoryThread;
@@ -201,12 +201,12 @@ static int HistoryDlgResizer(HWND, LPARAM, UTILRESIZECONTROL *urc) static INT_PTR CALLBACK DlgProcHistory(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:
TranslateDialogDefault(hwndDlg);
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)lParam);
- hContact = (HCONTACT)lParam;
+ hContact = (MCONTACT)lParam;
WindowList_Add(hWindowList, hwndDlg, hContact);
Utils_RestoreWindowPosition(hwndDlg, hContact, "History", "");
{
@@ -376,7 +376,7 @@ static INT_PTR CALLBACK DlgProcHistoryFind(HWND hwndDlg, UINT msg, WPARAM wParam static INT_PTR UserHistoryCommand(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
@@ -388,7 +388,7 @@ static INT_PTR UserHistoryCommand(WPARAM wParam, LPARAM) static int HistoryContactDelete(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd != NULL)
DestroyWindow(hwnd);
return 0;
diff --git a/src/core/stdurl/url.cpp b/src/core/stdurl/url.cpp index 12e7137c67..4fbd2bbf6c 100644 --- a/src/core/stdurl/url.cpp +++ b/src/core/stdurl/url.cpp @@ -49,11 +49,11 @@ static int UrlEventAdded(WPARAM wParam, LPARAM lParam) SkinPlaySound("RecvUrl");
TCHAR szTooltip[256];
- mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(szTooltip, SIZEOF(szTooltip), TranslateT("URL from %s"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
CLISTEVENT cle = { sizeof(cle) };
cle.flags = CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)lParam;
cle.hIcon = LoadSkinIcon(SKINICON_EVENT_URL);
cle.pszService = "SRUrl/ReadUrl";
@@ -75,7 +75,7 @@ static void RestoreUnreadUrlAlerts(void) cle.pszService = "SRUrl/ReadUrl";
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)) {
HANDLE hDbEvent = db_event_firstUnread(hContact);
while (hDbEvent) {
DBEVENTINFO dbei = { sizeof(dbei) };
@@ -97,7 +97,7 @@ static void RestoreUnreadUrlAlerts(void) static int ContactSettingChanged(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;
@@ -108,7 +108,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam) static int SRUrlPreBuildMenu(WPARAM wParam, LPARAM)
{
bool bEnabled = false;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL)
if (CallProtoService(szProto, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_URLSEND)
bEnabled = true;
@@ -147,7 +147,7 @@ static int SRUrlShutdown(WPARAM, LPARAM) int UrlContactDeleted(WPARAM wParam, LPARAM)
{
- HWND h = WindowList_Find(hUrlWindowList, (HCONTACT)wParam);
+ HWND h = WindowList_Find(hUrlWindowList, (MCONTACT)wParam);
if (h)
SendMessage(h, WM_CLOSE, 0, 0);
diff --git a/src/core/stdurl/url.h b/src/core/stdurl/url.h index 075f14ecbb..dd8b2eda0f 100644 --- a/src/core/stdurl/url.h +++ b/src/core/stdurl/url.h @@ -29,12 +29,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DDEMESSAGETIMEOUT 1000
struct UrlRcvData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
};
struct UrlSendData {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hSendId;
HANDLE hAckEvent;
char *sendBuffer;
diff --git a/src/core/stdurl/urldialogs.cpp b/src/core/stdurl/urldialogs.cpp index 9a654fa9ff..c541825d9f 100644 --- a/src/core/stdurl/urldialogs.cpp +++ b/src/core/stdurl/urldialogs.cpp @@ -28,7 +28,7 @@ INT_PTR CALLBACK DlgProcUrlSend(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP extern HANDLE hUrlWindowList;
-static void sttUpdateTitle(HWND hwndDlg, HCONTACT hContact)
+static void sttUpdateTitle(HWND hwndDlg, MCONTACT hContact)
{
TCHAR newtitle[256], oldtitle[256];
TCHAR *szStatus, *contactName, *pszNewTitleStart = TranslateT("Send URL to");
@@ -467,7 +467,7 @@ INT_PTR CALLBACK DlgProcUrlSend(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP SendDlgItemMessage(hwndDlg, IDC_MESSAGE, EM_LIMITTEXT, 450, 0);
dat = (struct UrlSendData*)mir_alloc(sizeof(struct UrlSendData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)lParam;
+ dat->hContact = (MCONTACT)lParam;
dat->hAckEvent = NULL;
dat->hSendId = NULL;
dat->sendBuffer = NULL;
diff --git a/src/core/stduserinfo/contactinfo.cpp b/src/core/stduserinfo/contactinfo.cpp index fd38ad1758..59d9bc93c3 100644 --- a/src/core/stduserinfo/contactinfo.cpp +++ b/src/core/stduserinfo/contactinfo.cpp @@ -252,7 +252,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP case M_REMAKELISTS:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -436,7 +436,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP NMLISTVIEW *nm = (NMLISTVIEW*)lParam;
LVITEM lvi;
TCHAR szEmail[256];
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
char *szIdTemplate = (nm->hdr.idFrom == IDC_PHONES) ? "MyPhone%d" : "Mye-mail%d";
LVHITTESTINFO hti;
diff --git a/src/core/stduserinfo/stdinfo.cpp b/src/core/stduserinfo/stdinfo.cpp index ac02608694..4e65815d98 100644 --- a/src/core/stduserinfo/stdinfo.cpp +++ b/src/core/stduserinfo/stdinfo.cpp @@ -35,7 +35,7 @@ INT_PTR CALLBACK ContactDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #define SVS_SIGNED 6
#define SVS_TIMEZONE 7
-static int Proto_GetContactInfoSetting(HCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
+static int Proto_GetContactInfoSetting(MCONTACT hContact, const char *szProto, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
{
DBCONTACTGETSETTING cgs = {szModule, szSetting, dbv};
dbv->type = (BYTE)nType;
@@ -64,7 +64,7 @@ static void Proto_FreeInfoVariant(DBVARIANT *dbv) dbv->type = 0;
}
-static void SetValue(HWND hwndDlg, int idCtrl, HCONTACT hContact, char *szModule, char *szSetting, int special)
+static void SetValue(HWND hwndDlg, int idCtrl, MCONTACT hContact, char *szModule, char *szSetting, int special)
{
char str[80], *pstr = NULL;
TCHAR* ptstr = NULL;
@@ -194,7 +194,7 @@ static INT_PTR CALLBACK SummaryDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -244,13 +244,13 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L TranslateDialogDefault(hwndDlg);
SetTimer(hwndDlg, 1, 1000, NULL);
- tmi.prepareList((HCONTACT)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
+ tmi.prepareList((MCONTACT)lParam, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
SendMessage(hwndDlg, WM_TIMER, 0, 0);
break;
case WM_TIMER:
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
if (hContact != NULL) {
TCHAR szTime[80];
if (tmi.printDateTimeByContact(hContact, _T("s"), szTime, SIZEOF(szTime), TZF_KNOWNONLY)) {
@@ -269,7 +269,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -297,7 +297,7 @@ static INT_PTR CALLBACK LocationDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, L case IDC_TIMEZONESELECT:
if (HIWORD(wParam) == CBN_SELCHANGE) {
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
tmi.storeListResults(hContact, GetDlgItem(hwndDlg, IDC_TIMEZONESELECT), TZF_PLF_CB);
@@ -319,7 +319,7 @@ static INT_PTR CALLBACK WorkDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA switch (((LPNMHDR)lParam)->idFrom) {
case 0:
if (((LPNMHDR)lParam)->code == PSN_INFOCHANGED) {
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto == NULL) break;
@@ -395,7 +395,7 @@ static INT_PTR CALLBACK BackgroundDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, int i;
char idstr[33];
DBVARIANT dbv, dbvText;
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
@@ -522,7 +522,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR hFont = CreateFontIndirect(&lf);
SendDlgItemMessage(hwndDlg, IDC_ABOUT, WM_SETFONT, (WPARAM) hFont, MAKELPARAM(TRUE, 0));
- if (!db_get_s((HCONTACT)lParam, "UserInfo", "MyNotes", &dbv)) {
+ if (!db_get_s((MCONTACT)lParam, "UserInfo", "MyNotes", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_MYNOTES, dbv.pszVal);
db_free(&dbv);
}
@@ -535,7 +535,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR switch (((LPNMHDR)lParam)->code) {
case PSN_INFOCHANGED:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (hContact != NULL) {
char *szProto = GetContactProto(hContact);
if (szProto != NULL)
@@ -545,7 +545,7 @@ static INT_PTR CALLBACK NotesDlgProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR break;
case PSN_APPLY:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
if (GetWindowTextLength(GetDlgItem(hwndDlg, IDC_MYNOTES))) {
char text[2048];
GetDlgItemTextA(hwndDlg, IDC_MYNOTES, text, SIZEOF(text));
@@ -579,7 +579,7 @@ int DetailsInit(WPARAM wParam, LPARAM lParam) if (lParam == NULL)
return 0;
- if (GetContactProto((HCONTACT)lParam) == 0)
+ if (GetContactProto((MCONTACT)lParam) == 0)
return 0;
OPTIONSDIALOGPAGE odp = { sizeof(odp) };
diff --git a/src/core/stduserinfo/userinfo.cpp b/src/core/stduserinfo/userinfo.cpp index d7312c0134..61248a0751 100644 --- a/src/core/stduserinfo/userinfo.cpp +++ b/src/core/stduserinfo/userinfo.cpp @@ -51,7 +51,7 @@ struct DetailsPageData struct DetailsData
{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hProtoAckEvent;
HINSTANCE hInstIcmp;
HFONT hBoldFont;
@@ -95,7 +95,7 @@ static int PageSortProc(OPTIONSDIALOGPAGE *item1, OPTIONSDIALOGPAGE *item2) static INT_PTR ShowDetailsDialogCommand(WPARAM wParam, LPARAM)
{
HWND hwnd;
- if (hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam)) {
+ if (hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam)) {
SetForegroundWindow(hwnd);
SetFocus(hwnd);
return 0;
@@ -222,7 +222,7 @@ static void CreateDetailsPageWindow(HWND hwndDlg, DetailsData *dat, DetailsPageD static int UserInfoContactDelete(WPARAM wParam, LPARAM)
{
- HWND hwnd = WindowList_Find(hWindowList, (HCONTACT)wParam);
+ HWND hwnd = WindowList_Find(hWindowList, (MCONTACT)wParam);
if (hwnd != NULL)
DestroyWindow(hwnd);
return 0;
@@ -245,7 +245,7 @@ static INT_PTR CALLBACK DlgProcDetails(HWND hwndDlg, UINT msg, WPARAM wParam, LP PROPSHEETHEADER *psh = (PROPSHEETHEADER*)lParam;
dat = (DetailsData*)mir_calloc(sizeof(DetailsData));
SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
- dat->hContact = (HCONTACT)psh->pszCaption;
+ dat->hContact = (MCONTACT)psh->pszCaption;
dat->hProtoAckEvent = HookEventMessage(ME_PROTO_ACK, hwndDlg, HM_PROTOACK);
WindowList_Add(hWindowList, hwndDlg, dat->hContact);
diff --git a/src/core/stduseronline/useronline.cpp b/src/core/stduseronline/useronline.cpp index 90881b1e4b..188999dcfe 100644 --- a/src/core/stduseronline/useronline.cpp +++ b/src/core/stduseronline/useronline.cpp @@ -38,17 +38,17 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam) return 0;
int newStatus = cws->value.wVal;
- int oldStatus = db_get_w((HCONTACT)wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
- db_set_w((HCONTACT)wParam, "UserOnline", "OldStatus", (WORD)newStatus);
+ int oldStatus = db_get_w((MCONTACT)wParam, "UserOnline", "OldStatus", ID_STATUS_OFFLINE);
+ db_set_w((MCONTACT)wParam, "UserOnline", "OldStatus", (WORD)newStatus);
if (CallService(MS_IGNORE_ISIGNORED, wParam, IGNOREEVENT_USERONLINE)) return 0;
- if (db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) return 0;
+ if (db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) return 0;
if (newStatus == ID_STATUS_OFFLINE && oldStatus != ID_STATUS_OFFLINE) {
// Remove the event from the queue if it exists since they are now offline
- int lastEvent = (int)db_get_dw((HCONTACT)wParam, "UserOnline", "LastEvent", 0);
+ int lastEvent = (int)db_get_dw((MCONTACT)wParam, "UserOnline", "LastEvent", 0);
if (lastEvent) {
CallService(MS_CLIST_REMOVEEVENT, wParam, (LPARAM)lastEvent);
- db_set_dw((HCONTACT)wParam, "UserOnline", "LastEvent", 0);
+ db_set_dw((MCONTACT)wParam, "UserOnline", "LastEvent", 0);
}
}
if ((newStatus == ID_STATUS_ONLINE || newStatus == ID_STATUS_FREECHAT) &&
@@ -63,11 +63,11 @@ static int UserOnlineSettingChanged(WPARAM wParam, LPARAM lParam) ZeroMemory(&cle, sizeof(cle));
cle.cbSize = sizeof(cle);
cle.flags = CLEF_ONLYAFEW | CLEF_TCHAR;
- cle.hContact = (HCONTACT)wParam;
+ cle.hContact = (MCONTACT)wParam;
cle.hDbEvent = (HANDLE)(uniqueEventId++);
cle.hIcon = LoadSkinIcon(SKINICON_OTHER_USERONLINE, false);
cle.pszService = "UserOnline/Description";
- mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName((HCONTACT)wParam, 0));
+ mir_sntprintf(tooltip, SIZEOF(tooltip), TranslateT("%s is online"), pcli->pfnGetContactDisplayName((MCONTACT)wParam, 0));
cle.ptszTooltip = tooltip;
CallService(MS_CLIST_ADDEVENT, 0, (LPARAM)&cle);
IcoLib_ReleaseIcon(cle.hIcon, 0);
diff --git a/src/mir_core/db.cpp b/src/mir_core/db.cpp index 962daff91e..5b35cc2628 100644 --- a/src/mir_core/db.cpp +++ b/src/mir_core/db.cpp @@ -29,7 +29,7 @@ static MIDatabase* currDb = NULL; /////////////////////////////////////////////////////////////////////////////////////////
// getting data
-MIR_CORE_DLL(int) db_get_b(HCONTACT hContact, const char *szModule, const char *szSetting, int errorValue)
+MIR_CORE_DLL(int) db_get_b(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue)
{
if (currDb != NULL) {
DBVARIANT dbv;
@@ -46,7 +46,7 @@ MIR_CORE_DLL(int) db_get_b(HCONTACT hContact, const char *szModule, const char * return errorValue;
}
-MIR_CORE_DLL(int) db_get_w(HCONTACT hContact, const char *szModule, const char *szSetting, int errorValue)
+MIR_CORE_DLL(int) db_get_w(MCONTACT hContact, const char *szModule, const char *szSetting, int errorValue)
{
if (currDb != NULL) {
DBVARIANT dbv;
@@ -62,7 +62,7 @@ MIR_CORE_DLL(int) db_get_w(HCONTACT hContact, const char *szModule, const char * return errorValue;
}
-MIR_CORE_DLL(DWORD) db_get_dw(HCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue)
+MIR_CORE_DLL(DWORD) db_get_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD errorValue)
{
if (currDb != NULL) {
DBVARIANT dbv;
@@ -80,7 +80,7 @@ MIR_CORE_DLL(DWORD) db_get_dw(HCONTACT hContact, const char *szModule, const cha return errorValue;
}
-MIR_CORE_DLL(INT_PTR) db_get(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+MIR_CORE_DLL(INT_PTR) db_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
if (currDb == NULL)
return 1;
@@ -88,7 +88,7 @@ MIR_CORE_DLL(INT_PTR) db_get(HCONTACT hContact, const char *szModule, const char return currDb->GetContactSetting((MCONTACT)hContact, szModule, szSetting, dbv);
}
-MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
+MIR_CORE_DLL(INT_PTR) db_get_s(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv, const int nType)
{
if (currDb == NULL)
return 1;
@@ -97,7 +97,7 @@ MIR_CORE_DLL(INT_PTR) db_get_s(HCONTACT hContact, const char *szModule, const ch return currDb->GetContactSettingStr((MCONTACT)hContact, szModule, szSetting, dbv);
}
-MIR_CORE_DLL(char*) db_get_sa(HCONTACT hContact, const char *szModule, const char *szSetting)
+MIR_CORE_DLL(char*) db_get_sa(MCONTACT hContact, const char *szModule, const char *szSetting)
{
char *str = NULL;
DBVARIANT dbv = {0};
@@ -108,7 +108,7 @@ MIR_CORE_DLL(char*) db_get_sa(HCONTACT hContact, const char *szModule, const cha return str;
}
-MIR_CORE_DLL(wchar_t*) db_get_wsa(HCONTACT hContact, const char *szModule, const char *szSetting)
+MIR_CORE_DLL(wchar_t*) db_get_wsa(MCONTACT hContact, const char *szModule, const char *szSetting)
{
wchar_t *str = NULL;
DBVARIANT dbv={0};
@@ -122,7 +122,7 @@ MIR_CORE_DLL(wchar_t*) db_get_wsa(HCONTACT hContact, const char *szModule, const /////////////////////////////////////////////////////////////////////////////////////////
// getting static data
-MIR_CORE_DLL(int) db_get_static(HCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest)
+MIR_CORE_DLL(int) db_get_static(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest)
{
if (currDb == NULL)
return 1;
@@ -134,7 +134,7 @@ MIR_CORE_DLL(int) db_get_static(HCONTACT hContact, const char *szModule, const c return currDb->GetContactSettingStatic((MCONTACT)hContact, szModule, szSetting, &dbv);
}
-MIR_CORE_DLL(int) db_get_static_utf(HCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest)
+MIR_CORE_DLL(int) db_get_static_utf(MCONTACT hContact, const char *szModule, const char *szSetting, char *pDest, int cbDest)
{
if (currDb == NULL)
return 1;
@@ -146,7 +146,7 @@ MIR_CORE_DLL(int) db_get_static_utf(HCONTACT hContact, const char *szModule, con return currDb->GetContactSettingStatic((MCONTACT)hContact, szModule, szSetting, &dbv);
}
-MIR_CORE_DLL(int) db_get_wstatic(HCONTACT hContact, const char *szModule, const char *szSetting, WCHAR *pDest, int cbDest)
+MIR_CORE_DLL(int) db_get_wstatic(MCONTACT hContact, const char *szModule, const char *szSetting, WCHAR *pDest, int cbDest)
{
if (currDb == NULL)
return 1;
@@ -161,7 +161,7 @@ MIR_CORE_DLL(int) db_get_wstatic(HCONTACT hContact, const char *szModule, const /////////////////////////////////////////////////////////////////////////////////////////
// setting data
-MIR_CORE_DLL(INT_PTR) db_set(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+MIR_CORE_DLL(INT_PTR) db_set(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
if (currDb == NULL) return 1;
@@ -172,7 +172,7 @@ MIR_CORE_DLL(INT_PTR) db_set(HCONTACT hContact, const char *szModule, const char return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_b(HCONTACT hContact, const char *szModule, const char *szSetting, BYTE val)
+MIR_CORE_DLL(INT_PTR) db_set_b(MCONTACT hContact, const char *szModule, const char *szSetting, BYTE val)
{
if (currDb == NULL) return 1;
@@ -184,7 +184,7 @@ MIR_CORE_DLL(INT_PTR) db_set_b(HCONTACT hContact, const char *szModule, const ch return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_w(HCONTACT hContact, const char *szModule, const char *szSetting, WORD val)
+MIR_CORE_DLL(INT_PTR) db_set_w(MCONTACT hContact, const char *szModule, const char *szSetting, WORD val)
{
if (currDb == NULL) return 1;
@@ -196,7 +196,7 @@ MIR_CORE_DLL(INT_PTR) db_set_w(HCONTACT hContact, const char *szModule, const ch return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_dw(HCONTACT hContact, const char *szModule, const char *szSetting, DWORD val)
+MIR_CORE_DLL(INT_PTR) db_set_dw(MCONTACT hContact, const char *szModule, const char *szSetting, DWORD val)
{
if (currDb == NULL) return 1;
@@ -208,7 +208,7 @@ MIR_CORE_DLL(INT_PTR) db_set_dw(HCONTACT hContact, const char *szModule, const c return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_s(HCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
+MIR_CORE_DLL(INT_PTR) db_set_s(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
{
if (currDb == NULL) return 1;
@@ -220,7 +220,7 @@ MIR_CORE_DLL(INT_PTR) db_set_s(HCONTACT hContact, const char *szModule, const ch return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_ws(HCONTACT hContact, const char *szModule, const char *szSetting, const WCHAR *val)
+MIR_CORE_DLL(INT_PTR) db_set_ws(MCONTACT hContact, const char *szModule, const char *szSetting, const WCHAR *val)
{
if (currDb == NULL) return 1;
@@ -232,7 +232,7 @@ MIR_CORE_DLL(INT_PTR) db_set_ws(HCONTACT hContact, const char *szModule, const c return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_utf(HCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
+MIR_CORE_DLL(INT_PTR) db_set_utf(MCONTACT hContact, const char *szModule, const char *szSetting, const char *val)
{
if (currDb == NULL) return 1;
@@ -244,7 +244,7 @@ MIR_CORE_DLL(INT_PTR) db_set_utf(HCONTACT hContact, const char *szModule, const return currDb->WriteContactSetting((MCONTACT)hContact, &cws);
}
-MIR_CORE_DLL(INT_PTR) db_set_blob(HCONTACT hContact, const char *szModule, const char *szSetting, void *val, unsigned len)
+MIR_CORE_DLL(INT_PTR) db_set_blob(MCONTACT hContact, const char *szModule, const char *szSetting, void *val, unsigned len)
{
if (currDb == NULL) return 1;
@@ -260,27 +260,27 @@ MIR_CORE_DLL(INT_PTR) db_set_blob(HCONTACT hContact, const char *szModule, const /////////////////////////////////////////////////////////////////////////////////////////
// events
-MIR_CORE_DLL(HANDLE) db_event_add(HCONTACT hContact, DBEVENTINFO *dbei)
+MIR_CORE_DLL(HANDLE) db_event_add(MCONTACT hContact, DBEVENTINFO *dbei)
{
return (currDb == NULL) ? 0 : currDb->AddEvent((MCONTACT)hContact, dbei);
}
-MIR_CORE_DLL(int) db_event_count(HCONTACT hContact)
+MIR_CORE_DLL(int) db_event_count(MCONTACT hContact)
{
return (currDb == NULL) ? 0 : currDb->GetEventCount((MCONTACT)hContact);
}
-MIR_CORE_DLL(int) db_event_delete(HCONTACT hContact, HANDLE hDbEvent)
+MIR_CORE_DLL(int) db_event_delete(MCONTACT hContact, HANDLE hDbEvent)
{
return (currDb == NULL) ? 0 : currDb->DeleteEvent((MCONTACT)hContact, hDbEvent);
}
-MIR_CORE_DLL(HANDLE) db_event_first(HCONTACT hContact)
+MIR_CORE_DLL(HANDLE) db_event_first(MCONTACT hContact)
{
return (currDb == NULL) ? 0 : currDb->FindFirstEvent((MCONTACT)hContact);
}
-MIR_CORE_DLL(HANDLE) db_event_firstUnread(HCONTACT hContact)
+MIR_CORE_DLL(HANDLE) db_event_firstUnread(MCONTACT hContact)
{
return (currDb == NULL) ? 0 : currDb->FindFirstUnreadEvent((MCONTACT)hContact);
}
@@ -295,17 +295,17 @@ MIR_CORE_DLL(int) db_event_getBlobSize(HANDLE hDbEvent) return (currDb == NULL) ? 0 : currDb->GetBlobSize(hDbEvent);
}
-MIR_CORE_DLL(HCONTACT) db_event_getContact(HANDLE hDbEvent)
+MIR_CORE_DLL(MCONTACT) db_event_getContact(HANDLE hDbEvent)
{
- return (currDb == NULL) ? 0 : (HCONTACT)currDb->GetEventContact(hDbEvent);
+ return (currDb == NULL) ? 0 : (MCONTACT)currDb->GetEventContact(hDbEvent);
}
-MIR_CORE_DLL(HANDLE) db_event_last(HCONTACT hContact)
+MIR_CORE_DLL(HANDLE) db_event_last(MCONTACT hContact)
{
return (currDb == NULL) ? 0 : currDb->FindLastEvent((MCONTACT)hContact);
}
-MIR_CORE_DLL(int) db_event_markRead(HCONTACT hContact, HANDLE hDbEvent)
+MIR_CORE_DLL(int) db_event_markRead(MCONTACT hContact, HANDLE hDbEvent)
{
return (currDb == NULL) ? 0 : currDb->MarkEventRead((MCONTACT)hContact, hDbEvent);
}
@@ -328,7 +328,7 @@ MIR_CORE_DLL(INT_PTR) db_free(DBVARIANT *dbv) return (currDb == NULL) ? 1 : currDb->FreeVariant(dbv);
}
-MIR_CORE_DLL(INT_PTR) db_unset(HCONTACT hContact, const char *szModule, const char *szSetting)
+MIR_CORE_DLL(INT_PTR) db_unset(MCONTACT hContact, const char *szModule, const char *szSetting)
{
if (currDb == NULL)
return 1;
@@ -336,14 +336,14 @@ MIR_CORE_DLL(INT_PTR) db_unset(HCONTACT hContact, const char *szModule, const ch return currDb->DeleteContactSetting((MCONTACT)hContact, szModule, szSetting);
}
-MIR_CORE_DLL(HCONTACT) db_find_first(const char *szProto)
+MIR_CORE_DLL(MCONTACT) db_find_first(const char *szProto)
{
- return (currDb == NULL) ? NULL : (HCONTACT)currDb->FindFirstContact(szProto);
+ return (currDb == NULL) ? NULL : (MCONTACT)currDb->FindFirstContact(szProto);
}
-MIR_CORE_DLL(HCONTACT) db_find_next(HCONTACT hContact, const char *szProto)
+MIR_CORE_DLL(MCONTACT) db_find_next(MCONTACT hContact, const char *szProto)
{
- return (currDb == NULL) ? NULL : (HCONTACT)currDb->FindNextContact((MCONTACT)hContact, szProto);
+ return (currDb == NULL) ? NULL : (MCONTACT)currDb->FindNextContact((MCONTACT)hContact, szProto);
}
extern "C" MIR_CORE_DLL(void) db_setCurrent(MIDatabase* _db)
diff --git a/src/mir_core/protos.cpp b/src/mir_core/protos.cpp index 99db602565..1d98222708 100644 --- a/src/mir_core/protos.cpp +++ b/src/mir_core/protos.cpp @@ -61,7 +61,7 @@ MIR_CORE_DLL(void) ProtoLogW(struct PROTO_INTERFACE *pThis, LPCWSTR wszFormat, v /////////////////////////////////////////////////////////////////////////////////////////
-MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, HCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
+MIR_CORE_DLL(INT_PTR) ProtoBroadcastAck(const char *szModule, MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam)
{
if (type == ACKTYPE_AVATAR && hProcess) {
PROTO_AVATAR_INFORMATION* ai = (PROTO_AVATAR_INFORMATION*)hProcess;
diff --git a/src/modules/addcontact/addcontact.cpp b/src/modules/addcontact/addcontact.cpp index 2659705072..c9cee416f5 100644 --- a/src/modules/addcontact/addcontact.cpp +++ b/src/modules/addcontact/addcontact.cpp @@ -58,9 +58,9 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp dbei.cbBlob = db_event_getBlobSize(acs->hDbEvent);
dbei.pBlob = (PBYTE)mir_alloc(dbei.cbBlob);
db_event_get(acs->hDbEvent, &dbei);
- HCONTACT hcontact = *(HCONTACT*)(dbei.pBlob + sizeof(DWORD));
+ MCONTACT hcontact = *(MCONTACT*)(dbei.pBlob + sizeof(DWORD));
mir_free(dbei.pBlob);
- if (hcontact != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hcontact != INVALID_CONTACT_ID) {
szName = cli.pfnGetContactDisplayName(hcontact, 0);
isSet = 1;
}
@@ -147,18 +147,18 @@ INT_PTR CALLBACK AddContactDlgProc(HWND hdlg, UINT msg, WPARAM wparam, LPARAM lp break;
case IDOK:
{
- HCONTACT hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hContact = INVALID_CONTACT_ID;
switch (acs->handleType) {
case HANDLE_EVENT:
{
DBEVENTINFO dbei = { sizeof(dbei) };
db_event_get(acs->hDbEvent, &dbei);
- hContact = (HCONTACT)CallProtoServiceInt(NULL, dbei.szModule, PS_ADDTOLISTBYEVENT, 0, (LPARAM)acs->hDbEvent);
+ hContact = (MCONTACT)CallProtoServiceInt(NULL, dbei.szModule, PS_ADDTOLISTBYEVENT, 0, (LPARAM)acs->hDbEvent);
}
break;
case HANDLE_SEARCHRESULT:
- hContact = (HCONTACT)CallProtoServiceInt(NULL, acs->szProto, PS_ADDTOLIST, 0, (LPARAM)acs->psr);
+ hContact = (MCONTACT)CallProtoServiceInt(NULL, acs->szProto, PS_ADDTOLIST, 0, (LPARAM)acs->psr);
break;
case HANDLE_CONTACT:
diff --git a/src/modules/chat/chat.h b/src/modules/chat/chat.h index d79accdc35..fbe96ac805 100644 --- a/src/modules/chat/chat.h +++ b/src/modules/chat/chat.h @@ -55,11 +55,11 @@ char* Log_CreateRTF(LOGSTREAMDATA *streamData); char* Log_SetStyle(int style);
// clist.c
-BOOL AddEvent(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...);
-HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType);
-HCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom);
+BOOL AddEvent(MCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ...);
+MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType);
+MCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom);
BOOL SetAllOffline(BOOL bHide, const char *pszModule);
-BOOL SetOffline(HCONTACT hContact, BOOL bHide);
+BOOL SetOffline(MCONTACT hContact, BOOL bHide);
int RoomDoubleclicked(WPARAM wParam,LPARAM lParam);
INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam);
@@ -99,7 +99,7 @@ BOOL IsEventSupported(int eventType); BOOL LogToFile(SESSION_INFO *si, GCEVENT *gce);
BOOL DoTrayIcon(SESSION_INFO *si, GCEVENT *gce);
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, ...);
const TCHAR* my_strstri(const TCHAR* s1, const TCHAR* s2);
diff --git a/src/modules/chat/clist.cpp b/src/modules/chat/clist.cpp index cbd9fbd262..5f47aa4c4b 100644 --- a/src/modules/chat/clist.cpp +++ b/src/modules/chat/clist.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "chat.h"
-HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType)
+MCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDisplayName, int iType)
{
TCHAR pszGroup[50]; *pszGroup = '\0';
ptrT groupName(db_get_tsa(NULL, CHAT_MODULE, "AddToGroup"));
@@ -42,7 +42,7 @@ HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi }
}
- HCONTACT hContact = ci.FindRoom(pszModule, pszRoom);
+ MCONTACT hContact = ci.FindRoom(pszModule, pszRoom);
if (hContact) { //contact exist, make sure it is in the right group
if (pszGroup[0]) {
ptrT grpName(db_get_tsa(hContact, "CList", "Group"));
@@ -56,7 +56,7 @@ HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi }
// here we create a new one since no one is to be found
- if ((hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL)
+ if ((hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0)) == NULL)
return NULL;
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)pszModule);
@@ -71,7 +71,7 @@ HCONTACT AddRoom(const char *pszModule, const TCHAR *pszRoom, const TCHAR *pszDi return hContact;
}
-BOOL SetOffline(HCONTACT hContact, BOOL bHide)
+BOOL SetOffline(MCONTACT hContact, BOOL bHide)
{
if (hContact) {
char *szProto = GetContactProto(hContact);
@@ -85,7 +85,7 @@ BOOL SetOffline(HCONTACT hContact, BOOL bHide) BOOL SetAllOffline(BOOL bHide, const char *pszModule)
{
- 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 (!ci.MM_FindModule(szProto))
continue;
@@ -103,7 +103,7 @@ BOOL SetAllOffline(BOOL bHide, const char *pszModule) int RoomDoubleclicked(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (!hContact)
return 0;
@@ -141,7 +141,7 @@ INT_PTR EventDoubleclicked(WPARAM wParam,LPARAM lParam) INT_PTR JoinChat(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto) {
@@ -157,7 +157,7 @@ INT_PTR JoinChat(WPARAM wParam, LPARAM lParam) INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
char *szProto = GetContactProto(hContact);
if (szProto)
@@ -168,7 +168,7 @@ INT_PTR LeaveChat(WPARAM wParam, LPARAM lParam) int PrebuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -201,7 +201,7 @@ INT_PTR PrebuildContactMenuSvc(WPARAM wParam, LPARAM lParam) return PrebuildContactMenu(wParam, lParam);
}
-BOOL AddEvent(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ... )
+BOOL AddEvent(MCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fmt, ... )
{
TCHAR szBuf[4096];
@@ -233,9 +233,9 @@ BOOL AddEvent(HCONTACT hContact, HICON hIcon, HANDLE hEvent, int type, TCHAR* fm return TRUE;
}
-HCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom)
+MCONTACT FindRoom(const char *pszModule, const TCHAR *pszRoom)
{
- for (HCONTACT hContact = db_find_first(pszModule); hContact; hContact = db_find_next(hContact, pszModule)) {
+ for (MCONTACT hContact = db_find_first(pszModule); hContact; hContact = db_find_next(hContact, pszModule)) {
if (!db_get_b(hContact, pszModule, "ChatRoom", 0))
continue;
diff --git a/src/modules/chat/tools.cpp b/src/modules/chat/tools.cpp index 9001e5678b..cff0ad072e 100644 --- a/src/modules/chat/tools.cpp +++ b/src/modules/chat/tools.cpp @@ -166,7 +166,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA return DefWindowProc(hWnd, message, wParam, lParam);
}
-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, ...)
{
static TCHAR szBuf[4 * 1024];
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp index f087f87039..b2f3bad3fb 100644 --- a/src/modules/clist/clc.cpp +++ b/src/modules/clist/clc.cpp @@ -78,7 +78,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "MyHandle")) {
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
cli.pfnClcBroadcast(INTM_NAMECHANGED, wParam, lParam);
}
else if (!strcmp(cws->szSetting, "Group"))
@@ -93,7 +93,7 @@ static int ClcSettingChanged(WPARAM wParam, LPARAM lParam) cli.pfnClcBroadcast(INTM_NAMEORDERCHANGED, 0, 0);
}
else {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL) {
if (!strcmp(cws->szModule, "Protocol") && !strcmp(cws->szSetting, "p"))
cli.pfnClcBroadcast(INTM_PROTOCHANGED, wParam, lParam);
@@ -443,13 +443,13 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
case INTM_CONTACTADDED:
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
SortClcByTimer(hwnd);
break;
case INTM_CONTACTDELETED:
- cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
SortClcByTimer(hwnd);
break;
@@ -461,10 +461,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (dbcws->value.type == DBVT_DELETED || dbcws->value.bVal == 0) {
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, NULL, NULL, NULL))
break;
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
}
- else cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ else cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
SortClcByTimer(hwnd);
@@ -481,10 +481,10 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, memcpy(iExtraImage, contact->iExtraImage, sizeof(iExtraImage));
flags = contact->flags;
}
- cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
- if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0)) {
+ cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
+ if (GetWindowLongPtr(hwnd, GWL_STYLE) & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0)) {
NMCLISTCONTROL nm;
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 1);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 1);
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
memcpy(contact->iExtraImage, iExtraImage, sizeof(iExtraImage));
if (flags & CONTACTF_CHECKED)
@@ -506,18 +506,18 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, {
int recalcScrollBar = 0, shouldShow;
WORD status;
- HCONTACT hSelItem = NULL;
+ 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 = db_get_w((HCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
+ status = db_get_w((MCONTACT)wParam, szProto, "Status", ID_STATUS_OFFLINE);
// this means an offline msg is flashing, so the contact should be shown
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b((HCONTACT)wParam, "CList", "Hidden", 0))
+ shouldShow = (style & CLS_SHOWHIDDEN || !db_get_b((MCONTACT)wParam, "CList", "Hidden", 0))
&& (!cli.pfnIsHiddenMode(dat, status) || CallService(MS_CLIST_GETCONTACTICON, wParam, 0) != lParam);
contact = NULL;
@@ -525,13 +525,13 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, &group, NULL)) {
if (shouldShow && CallService(MS_DB_CONTACT_IS, wParam, 0)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)cli.pfnContactToHItem(selcontact);
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
+ hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, (style & CLS_CONTACTLIST) == 0, 0);
recalcScrollBar = 1;
cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL);
if (contact) {
contact->iImage = (WORD) lParam;
- cli.pfnNotifyNewContact(hwnd, (HCONTACT)wParam);
+ cli.pfnNotifyNewContact(hwnd, (MCONTACT)wParam);
dat->needsResort = 1;
}
}
@@ -541,7 +541,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, break;
if (!shouldShow && !(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) {
if (dat->selection >= 0 && cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) != -1)
- hSelItem = (HCONTACT)cli.pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
cli.pfnRemoveItemFromGroup(hwnd, group, contact, (style & CLS_CONTACTLIST) == 0);
recalcScrollBar = 1;
}
@@ -569,7 +569,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
dat->needsResort = 1;
SortClcByTimer(hwnd);
break;
@@ -578,9 +578,9 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, if (!cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL))
break;
- contact->proto = GetContactProto((HCONTACT)wParam);
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
- lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((HCONTACT)wParam, 0), SIZEOF(contact->szText));
+ contact->proto = GetContactProto((MCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
+ lstrcpyn(contact->szText, cli.pfnGetContactDisplayName((MCONTACT)wParam, 0), SIZEOF(contact->szText));
SortClcByTimer(hwnd);
break;
@@ -604,11 +604,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_APPARENTMODECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
break;
- WORD apparentMode = db_get_w((HCONTACT)wParam, szProto, "ApparentMode", 0);
+ WORD apparentMode = db_get_w((MCONTACT)wParam, szProto, "ApparentMode", 0);
contact->flags &= ~(CONTACTF_INVISTO | CONTACTF_VISTO);
if (apparentMode == ID_STATUS_OFFLINE)
contact->flags |= CONTACTF_INVISTO;
@@ -626,11 +626,11 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, case INTM_IDLECHANGED:
if (cli.pfnFindItem(hwnd, dat, (HANDLE)wParam, &contact, NULL, NULL)) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto == NULL)
break;
contact->flags &= ~CONTACTF_IDLE;
- if (db_get_dw((HCONTACT)wParam, szProto, "IdleTS", 0))
+ if (db_get_dw((MCONTACT)wParam, szProto, "IdleTS", 0))
contact->flags |= CONTACTF_IDLE;
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
diff --git a/src/modules/clist/clc.h b/src/modules/clist/clc.h index b95e072656..0c1a714fae 100644 --- a/src/modules/clist/clc.h +++ b/src/modules/clist/clc.h @@ -58,9 +58,9 @@ void fnFreeContact(ClcContact *p); void fnFreeGroup(ClcGroup *group);
int fnAddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText);
int fnAddItemToGroup(ClcGroup *group, int iAboveItem);
-void fnAddContactToTree(HWND hwnd, struct ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline);
-int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact);
-void fnDeleteItemFromTree(HWND hwnd, HCONTACT hItem);
+void fnAddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline);
+int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact);
+void fnDeleteItemFromTree(HWND hwnd, MCONTACT hItem);
void fnRebuildEntireList(HWND hwnd, struct ClcData *dat);
int fnGetGroupContentsCount(ClcGroup *group, int visibleOnly);
void fnSortCLC(HWND hwnd, struct ClcData *dat, int useInsertionSort);
@@ -86,7 +86,7 @@ int fnGetDropTargetInformation(HWND hwnd, struct ClcData *dat, POINT pt); int fnClcStatusToPf2(int status);
int fnIsHiddenMode(struct ClcData *dat, int status);
void fnHideInfoTip(HWND hwnd, struct ClcData *dat);
-void fnNotifyNewContact(HWND hwnd, HCONTACT hContact);
+void fnNotifyNewContact(HWND hwnd, MCONTACT hContact);
DWORD fnGetDefaultExStyle(void);
void fnGetSetting(int i, LOGFONT* lf, COLORREF* colour);
void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF* colour);
@@ -120,12 +120,12 @@ void RebuildMenuOrder(void); INT_PTR MenuProcessCommand(WPARAM wParam, LPARAM lParam);
/* clistsettings.c */
-TCHAR* fnGetContactDisplayName(HCONTACT hContact, int mode);
+TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode);
void fnGetDefaultFontSetting(int i, LOGFONT* lf, COLORREF * colour);
-void fnInvalidateDisplayNameCacheEntry(HCONTACT hContact);
+void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact);
-ClcCacheEntry* fnGetCacheEntry(HCONTACT hContact);
-ClcCacheEntry* fnCreateCacheItem (HCONTACT hContact);
+ClcCacheEntry* fnGetCacheEntry(MCONTACT hContact);
+ClcCacheEntry* fnCreateCacheItem (MCONTACT hContact);
void fnCheckCacheItem(ClcCacheEntry *p);
void fnFreeCacheItem(ClcCacheEntry *p);
@@ -137,21 +137,21 @@ void fnUnregisterFileDropping (HWND hwnd); /* clistevents.c */
struct CListEvent* fnAddEvent(CLISTEVENT *cle);
-CLISTEVENT* fnGetEvent(HCONTACT hContact, int idx);
+CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx);
struct CListEvent* fnCreateEvent(void);
void fnFreeEvent(struct CListEvent* p);
-int fnEventsProcessContactDoubleClick(HCONTACT hContact);
+int fnEventsProcessContactDoubleClick(MCONTACT hContact);
int fnEventsProcessTrayDoubleClick(int);
int fnGetImlIconIndex(HICON hIcon);
-int fnRemoveEvent(HCONTACT hContact, HANDLE dbEvent);
+int fnRemoveEvent(MCONTACT hContact, HANDLE dbEvent);
/* clistmod.c */
-int fnGetContactIcon(HCONTACT hContact);
-int fnIconFromStatusMode(const char *szProto, int status, HCONTACT hContact);
+int fnGetContactIcon(MCONTACT hContact);
+int fnIconFromStatusMode(const char *szProto, int status, MCONTACT hContact);
int fnShowHide(WPARAM wParam, LPARAM lParam);
-HICON fnGetIconFromStatusMode(HCONTACT hContact, const char *szProto, int status);
+HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status);
TCHAR* fnGetStatusModeDescription(int wParam, int lParam);
int fnGetWindowVisibleState(HWND hWnd, int iStepX, int iStepY);
@@ -186,7 +186,7 @@ void fnCluiProtocolStatusChanged(int, const char*); void fnDrawMenuItem(DRAWITEMSTRUCT *dis, HICON hIcon, HICON eventIcon);
/* contact.c */
-void fnChangeContactIcon (HCONTACT hContact, int iIcon, int add);
+void fnChangeContactIcon (MCONTACT hContact, int iIcon, int add);
void fnLoadContactTree (void);
int fnCompareContacts (const ClcContact *contact1, const ClcContact *contact2);
void fnSortContacts (void);
diff --git a/src/modules/clist/clcfiledrop.cpp b/src/modules/clist/clcfiledrop.cpp index 2c79cafb7e..9cb9e01f03 100644 --- a/src/modules/clist/clcfiledrop.cpp +++ b/src/modules/clist/clcfiledrop.cpp @@ -70,7 +70,7 @@ ULONG CDropTarget::Release(void) return InterlockedDecrement(&refCount);
}
-static HCONTACT HContactFromPoint(HWND hwnd, struct ClcData *dat, int x, int y, int *hitLine)
+static MCONTACT HContactFromPoint(HWND hwnd, struct ClcData *dat, int x, int y, int *hitLine)
{
DWORD hitFlags;
ClcContact *contact;
@@ -98,7 +98,7 @@ HRESULT CDropTarget::DragOver(DWORD /*grfKeyState*/, POINTL pt, DWORD * pdwEffec struct ClcData *dat;
RECT clRect;
int hit;
- HCONTACT hContact;
+ MCONTACT hContact;
if (pDropTargetHelper && hwndCurrentDrag)
pDropTargetHelper->DragOver((POINT*)&pt, *pdwEffect);
@@ -220,7 +220,7 @@ HRESULT CDropTarget::Drop(IDataObject * pDataObj, DWORD /*fKeyState*/, POINTL pt shortPt.x = pt.x;
shortPt.y = pt.y;
ScreenToClient(hwndCurrentDrag, &shortPt);
- HCONTACT hContact = HContactFromPoint(hwndCurrentDrag, dat, shortPt.x, shortPt.y, NULL);
+ MCONTACT hContact = HContactFromPoint(hwndCurrentDrag, dat, shortPt.x, shortPt.y, NULL);
if (hContact != NULL) {
TCHAR **ppFiles = NULL;
TCHAR szFilename[MAX_PATH];
diff --git a/src/modules/clist/clcidents.cpp b/src/modules/clist/clcidents.cpp index 7165d61b48..40584a910d 100644 --- a/src/modules/clist/clcidents.cpp +++ b/src/modules/clist/clcidents.cpp @@ -99,9 +99,9 @@ int fnFindItem(HWND hwnd, struct ClcData *dat, HANDLE hItem, ClcContact **contac if ((IsHContactGroup(hItem) && group->cl.items[group->scanIndex]->type == CLCIT_GROUP &&
((unsigned) 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]->hContact == (MCONTACT)hItem) || (IsHContactInfo(hItem) &&
group->cl.items[group->scanIndex]->type == CLCIT_INFO &&
- group->cl.items[group->scanIndex]->hContact == (HCONTACT)((UINT_PTR)hItem & ~HCONTACT_ISINFO)))
+ group->cl.items[group->scanIndex]->hContact == (MCONTACT)((UINT_PTR)hItem & ~HCONTACT_ISINFO)))
{
if (isVisible) {
if (!nowVisible)
diff --git a/src/modules/clist/clcitems.cpp b/src/modules/clist/clcitems.cpp index 690de3c4cb..9587d3f94f 100644 --- a/src/modules/clist/clcitems.cpp +++ b/src/modules/clist/clcitems.cpp @@ -108,7 +108,7 @@ ClcGroup* fnAddGroup(HWND hwnd, struct ClcData *dat, const TCHAR *szName, DWORD group->totalMembers = 0;
if (flags != (DWORD) - 1 && pNextField == NULL && calcTotalMembers) {
DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE);
- 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 *cache = cli.pfnGetCacheEntry(hContact);
if (!lstrcmp(cache->tszGroup, szName) && (style & CLS_SHOWHIDDEN || !cache->bIsHidden))
group->totalMembers++;
@@ -164,12 +164,12 @@ int fnAddInfoItemToGroup(ClcGroup *group, int flags, const TCHAR *pszText) ++iInfoItemUniqueHandle;
group->cl.items[i]->type = CLCIT_INFO;
group->cl.items[i]->flags = (BYTE) flags;
- group->cl.items[i]->hContact = (HCONTACT)++iInfoItemUniqueHandle;
+ group->cl.items[i]->hContact = (MCONTACT)++iInfoItemUniqueHandle;
lstrcpyn(group->cl.items[i]->szText, pszText, SIZEOF(group->cl.items[i]->szText));
return i;
}
-int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact)
+int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, MCONTACT hContact)
{
int i, index = -1;
@@ -212,7 +212,7 @@ int fnAddContactToGroup(struct ClcData *dat, ClcGroup *group, HCONTACT hContact) return i;
}
-void fnAddContactToTree(HWND hwnd, struct ClcData *dat, HCONTACT hContact, int updateTotalCount, int checkHideOffline)
+void fnAddContactToTree(HWND hwnd, struct ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline)
{
ClcGroup *group;
DBVARIANT dbv;
@@ -309,7 +309,7 @@ ClcGroup* fnRemoveItemFromGroup(HWND hwnd, ClcGroup *group, ClcContact *contact, return group;
}
-void fnDeleteItemFromTree(HWND hwnd, HCONTACT hItem)
+void fnDeleteItemFromTree(HWND hwnd, MCONTACT hItem)
{
ClcContact *contact;
ClcGroup *group;
@@ -363,7 +363,7 @@ void fnRebuildEntireList(HWND hwnd, struct ClcData *dat) cli.pfnAddGroup(hwnd, dat, szGroupName, groupFlags, 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)) {
if (style & CLS_SHOWHIDDEN || !db_get_b(hContact, "CList", "Hidden", 0)) {
DBVARIANT dbv;
if (db_get_ts(hContact, "CList", "Group", &dbv))
@@ -545,13 +545,13 @@ void fnSortCLC(HWND hwnd, struct ClcData *dat, int useInsertionSort) {
ClcContact *selcontact;
ClcGroup *group = &dat->list, *selgroup;
- HCONTACT hSelItem;
+ MCONTACT hSelItem;
if (dat->needsResort) {
if (cli.pfnGetRowByIndex(dat, dat->selection, &selcontact, NULL) == -1)
hSelItem = NULL;
else
- hSelItem = (HCONTACT)cli.pfnContactToHItem(selcontact);
+ hSelItem = (MCONTACT)cli.pfnContactToHItem(selcontact);
group->scanIndex = 0;
SortGroup(dat, group, useInsertionSort);
for (;;) {
@@ -580,7 +580,7 @@ void fnSortCLC(HWND hwnd, struct ClcData *dat, int useInsertionSort) struct SavedContactState_t
{
- HCONTACT hContact;
+ MCONTACT hContact;
WORD iExtraImage[EXTRA_ICON_COUNT];
int checked;
};
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp index 9ce6f5c3a9..2f839b934d 100644 --- a/src/modules/clist/clcmsgs.cpp +++ b/src/modules/clist/clcmsgs.cpp @@ -31,7 +31,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR {
switch (msg) {
case CLM_ADDCONTACT:
- cli.pfnAddContactToTree(hwnd, dat, (HCONTACT)wParam, 1, 0);
+ cli.pfnAddContactToTree(hwnd, dat, (MCONTACT)wParam, 1, 0);
cli.pfnRecalcScrollBar(hwnd, dat);
cli.pfnSortCLC(hwnd, dat, 1);
break;
@@ -79,7 +79,7 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR break;
case CLM_DELETEITEM:
- cli.pfnDeleteItemFromTree(hwnd, (HCONTACT)wParam);
+ cli.pfnDeleteItemFromTree(hwnd, (MCONTACT)wParam);
cli.pfnSortCLC(hwnd, dat, 1);
cli.pfnRecalcScrollBar(hwnd, dat);
break;
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp index d5cb14fdbf..470936f9e4 100644 --- a/src/modules/clist/clcutils.cpp +++ b/src/modules/clist/clcutils.cpp @@ -633,7 +633,7 @@ void fnHideInfoTip(HWND, struct ClcData *dat) NotifyEventHooks(hHideInfoTipEvent, 0, (LPARAM) & it);
}
-void fnNotifyNewContact(HWND hwnd, HCONTACT hContact)
+void fnNotifyNewContact(HWND hwnd, MCONTACT hContact)
{
NMCLISTCONTROL nm;
nm.hdr.code = CLN_NEWCONTACT;
diff --git a/src/modules/clist/clistevents.cpp b/src/modules/clist/clistevents.cpp index 4acefdf247..6a99a46180 100644 --- a/src/modules/clist/clistevents.cpp +++ b/src/modules/clist/clistevents.cpp @@ -200,7 +200,7 @@ struct CListEvent* fnAddEvent(CLISTEVENT *cle) // Removes an event from the contact list's queue
// Returns 0 if the event was successfully removed, or nonzero if the event was not found
-int fnRemoveEvent(HCONTACT hContact, HANDLE dbEvent)
+int fnRemoveEvent(MCONTACT hContact, HANDLE dbEvent)
{
int i;
char *szProto;
@@ -257,9 +257,9 @@ int fnRemoveEvent(HCONTACT hContact, HANDLE dbEvent) return 0;
}
-CLISTEVENT* fnGetEvent(HCONTACT hContact, int idx)
+CLISTEVENT* fnGetEvent(MCONTACT hContact, int idx)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
if (idx >= cli.events.count)
return NULL;
return &cli.events.items[idx]->cle;
@@ -272,7 +272,7 @@ CLISTEVENT* fnGetEvent(HCONTACT hContact, int idx) return NULL;
}
-int fnEventsProcessContactDoubleClick(HCONTACT hContact)
+int fnEventsProcessContactDoubleClick(MCONTACT hContact)
{
for (int i=0; i < cli.events.count; i++) {
if (cli.events.items[i]->cle.hContact == hContact) {
@@ -290,7 +290,7 @@ int fnEventsProcessTrayDoubleClick(int index) {
BOOL click_in_first_icon = FALSE;
if (cli.events.count) {
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hDbEvent;
int eventIndex = 0;
cli.pfnLockTray();
@@ -370,8 +370,8 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM) for (; cli.events.count > 0;) {
for (hit = 0, j = 0; j < cli.events.count; j++) {
- if (cli.events.items[j]->cle.hContact == (HCONTACT)wParam) {
- cli.pfnRemoveEvent((HCONTACT)wParam, cli.events.items[j]->cle.hDbEvent);
+ if (cli.events.items[j]->cle.hContact == (MCONTACT)wParam) {
+ cli.pfnRemoveEvent((MCONTACT)wParam, cli.events.items[j]->cle.hDbEvent);
hit = 1;
}
}
@@ -384,7 +384,7 @@ static int RemoveEventsForContact(WPARAM wParam, LPARAM) static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING*)lParam;
if (hContact == NULL && cws && cws->szModule && cws->szSetting && strcmp(cws->szModule, "CList") == 0) {
if (strcmp(cws->szSetting, "DisableTrayFlash") == 0)
@@ -399,8 +399,8 @@ static int CListEventSettingsChanged(WPARAM wParam, LPARAM lParam) INT_PTR AddEventSyncStub(WPARAM wParam, LPARAM lParam) { return CallServiceSync(MS_CLIST_ADDEVENT"_SYNC", wParam, lParam); }
INT_PTR AddEventStub(WPARAM, LPARAM lParam) { return cli.pfnAddEvent((CLISTEVENT*)lParam) == NULL; }
-INT_PTR RemoveEventStub(WPARAM wParam, LPARAM lParam) { return cli.pfnRemoveEvent((HCONTACT)wParam, (HANDLE)lParam); }
-INT_PTR GetEventStub(WPARAM wParam, LPARAM lParam) { return (INT_PTR)cli.pfnGetEvent((HCONTACT)wParam, (int)lParam); }
+INT_PTR RemoveEventStub(WPARAM wParam, LPARAM lParam) { return cli.pfnRemoveEvent((MCONTACT)wParam, (HANDLE)lParam); }
+INT_PTR GetEventStub(WPARAM wParam, LPARAM lParam) { return (INT_PTR)cli.pfnGetEvent((MCONTACT)wParam, (int)lParam); }
int InitCListEvents(void)
{
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index 08c81d6a3d..1adf39e438 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -320,7 +320,7 @@ static INT_PTR AddContactMenuItem(WPARAM, LPARAM lParam) static INT_PTR BuildContactMenu(WPARAM wParam, LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
NotifyEventHooks(hPreBuildContactMenuEvent, (WPARAM)hContact, 0);
char *szProto = GetContactProto(hContact);
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 5f2ae798be..28f011e93c 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -139,8 +139,8 @@ static int ProtocolAck(WPARAM, LPARAM lParam) if ((int)ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
DWORD caps = (DWORD)CallProtoServiceInt(NULL,ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
- for (HCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
- HCONTACT hNext = db_find_next(hContact, ack->szModule);
+ for (MCONTACT hContact = db_find_first(ack->szModule); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact, ack->szModule);
if (db_get_b(hContact, "CList", "Delete", 0))
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hContact, 0);
hContact = hNext;
@@ -152,12 +152,12 @@ static int ProtocolAck(WPARAM, LPARAM lParam) return 0;
}
-HICON fnGetIconFromStatusMode(HCONTACT hContact, const char *szProto, int status)
+HICON fnGetIconFromStatusMode(MCONTACT hContact, const char *szProto, int status)
{
return ImageList_GetIcon(hCListImages, cli.pfnIconFromStatusMode(szProto, status, hContact), ILD_NORMAL);
}
-int fnIconFromStatusMode(const char *szProto, int status, HCONTACT)
+int fnIconFromStatusMode(const char *szProto, int status, MCONTACT)
{
int index, i;
@@ -176,7 +176,7 @@ int fnIconFromStatusMode(const char *szProto, int status, HCONTACT) return 1;
}
-int fnGetContactIcon(HCONTACT hContact)
+int fnGetContactIcon(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
return cli.pfnIconFromStatusMode(szProto,
@@ -185,7 +185,7 @@ int fnGetContactIcon(HCONTACT hContact) static INT_PTR GetContactIcon(WPARAM wParam, LPARAM)
{
- return cli.pfnGetContactIcon((HCONTACT)wParam);
+ return cli.pfnGetContactIcon((MCONTACT)wParam);
}
static void AddProtoIconIndex(PROTOACCOUNT* pa)
@@ -245,7 +245,7 @@ static int ContactListAccountsChanged(WPARAM eventCode, LPARAM lParam) static INT_PTR ContactDoubleClicked(WPARAM wParam, LPARAM)
{
// Try to process event myself
- if (cli.pfnEventsProcessContactDoubleClick((HCONTACT)wParam) == 0)
+ if (cli.pfnEventsProcessContactDoubleClick((MCONTACT)wParam) == 0)
return 0;
// Allow third-party plugins to process a dblclick
@@ -253,7 +253,7 @@ static INT_PTR ContactDoubleClicked(WPARAM wParam, LPARAM) return 0;
// Otherwise try to execute the default action
- TryProcessDoubleClick((HCONTACT)wParam);
+ TryProcessDoubleClick((MCONTACT)wParam);
return 0;
}
@@ -425,7 +425,7 @@ extern int sortByStatus, sortByProto; static INT_PTR CompareContacts(WPARAM wParam, LPARAM lParam)
{
- HCONTACT a = (HCONTACT)wParam, b = (HCONTACT)lParam;
+ MCONTACT a = (MCONTACT)wParam, b = (MCONTACT)lParam;
TCHAR namea[128], *nameb;
int statusa, statusb;
char *szProto1, *szProto2;
@@ -533,8 +533,8 @@ void UnloadContactListModule() return;
//remove transitory contacts
- for (HCONTACT hContact = db_find_first(); hContact != NULL; ) {
- HCONTACT hNext = db_find_next(hContact);
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; ) {
+ MCONTACT hNext = db_find_next(hContact);
if (db_get_b(hContact, "CList", "NotOnList", 0))
CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
hContact = hNext;
diff --git a/src/modules/clist/clistsettings.cpp b/src/modules/clist/clistsettings.cpp index 7e23fb67bc..90930e092a 100644 --- a/src/modules/clist/clistsettings.cpp +++ b/src/modules/clist/clistsettings.cpp @@ -54,7 +54,7 @@ void FreeDisplayNameCache(void) // default handlers for the cache item creation and destruction
-ClcCacheEntry* fnCreateCacheItem(HCONTACT hContact)
+ClcCacheEntry* fnCreateCacheItem(MCONTACT hContact)
{
ClcCacheEntry* p = (ClcCacheEntry*)mir_calloc(sizeof(ClcCacheEntry));
if (p == NULL)
@@ -86,14 +86,14 @@ void fnFreeCacheItem(ClcCacheEntry *p) p->bIsHidden = -1;
}
-ClcCacheEntry* fnGetCacheEntry(HCONTACT hContact)
+ClcCacheEntry* fnGetCacheEntry(MCONTACT hContact)
{
ClcCacheEntry *p;
int idx;
if (!List_GetIndex(clistCache, &hContact, &idx)) {
if ((p = cli.pfnCreateCacheItem(hContact)) != NULL) {
List_Insert(clistCache, p, idx);
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)p);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)p);
}
}
else p = (ClcCacheEntry*)clistCache->items[idx];
@@ -102,9 +102,9 @@ ClcCacheEntry* fnGetCacheEntry(HCONTACT hContact) return p;
}
-void fnInvalidateDisplayNameCacheEntry(HCONTACT hContact)
+void fnInvalidateDisplayNameCacheEntry(MCONTACT hContact)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
FreeDisplayNameCache();
InitDisplayNameCache();
SendMessage(cli.hwndContactTree, CLM_AUTOREBUILD, 0, 0);
@@ -116,7 +116,7 @@ void fnInvalidateDisplayNameCacheEntry(HCONTACT hContact) }
}
-TCHAR* fnGetContactDisplayName(HCONTACT hContact, int mode)
+TCHAR* fnGetContactDisplayName(MCONTACT hContact, int mode)
{
ClcCacheEntry *cacheEntry = NULL;
@@ -160,7 +160,7 @@ INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam) {
static char retVal[200];
ClcCacheEntry *cacheEntry = NULL;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (lParam & GCDNF_UNICODE)
return (INT_PTR)cli.pfnGetContactDisplayName(hContact, lParam & ~GCDNF_UNICODE);
@@ -209,13 +209,13 @@ INT_PTR GetContactDisplayName(WPARAM wParam, LPARAM lParam) INT_PTR InvalidateDisplayName(WPARAM wParam, LPARAM)
{
- cli.pfnInvalidateDisplayNameCacheEntry((HCONTACT)wParam);
+ cli.pfnInvalidateDisplayNameCacheEntry((MCONTACT)wParam);
return 0;
}
int ContactAdded(WPARAM wParam, LPARAM)
{
- cli.pfnChangeContactIcon((HCONTACT)wParam, cli.pfnIconFromStatusMode(GetContactProto((HCONTACT)wParam), ID_STATUS_OFFLINE, NULL), 1);
+ cli.pfnChangeContactIcon((MCONTACT)wParam, cli.pfnIconFromStatusMode(GetContactProto((MCONTACT)wParam), ID_STATUS_OFFLINE, NULL), 1);
cli.pfnSortContacts();
return 0;
}
@@ -230,7 +230,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) {
DBCONTACTWRITESETTING *cws = (DBCONTACTWRITESETTING *) lParam;
DBVARIANT dbv;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
// Early exit
if (hContact == NULL)
@@ -270,7 +270,7 @@ int ContactSettingChanged(WPARAM wParam, LPARAM lParam) if (!strcmp(cws->szModule, "CList")) {
if (!strcmp(cws->szSetting, "Hidden")) {
if (cws->value.type == DBVT_DELETED || cws->value.bVal == 0) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(szProto, szProto == NULL ? ID_STATUS_OFFLINE : db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE), hContact), 1);
}
else
diff --git a/src/modules/clist/clui.cpp b/src/modules/clist/clui.cpp index 4683169736..a5d760cfad 100644 --- a/src/modules/clist/clui.cpp +++ b/src/modules/clist/clui.cpp @@ -134,7 +134,7 @@ static INT_PTR CALLBACK AskForConfirmationDlgProc(HWND hWnd, UINT msg, WPARAM wP TCHAR szFinal[256];
GetDlgItemText(hWnd, IDC_TOPLINE, szFormat, SIZEOF(szFormat));
- mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName((HCONTACT)lParam, 0));
+ mir_sntprintf(szFinal, SIZEOF(szFinal), szFormat, cli.pfnGetContactDisplayName((MCONTACT)lParam, 0));
SetDlgItemText(hWnd, IDC_TOPLINE, szFinal);
}
SetFocus( GetDlgItem(hWnd, IDNO));
@@ -185,7 +185,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) // Delete contact
case IDYES:
{
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (szProto != NULL) {
// Check if protocol uses server side lists
DWORD caps;
@@ -197,7 +197,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) status = CallProtoServiceInt(NULL,szProto, PS_GETSTATUS, 0, 0);
if (status == ID_STATUS_OFFLINE || (status >= ID_STATUS_CONNECTING && status < ID_STATUS_CONNECTING + MAX_CONNECT_RETRIES)) {
// Set a flag so we remember to delete the contact when the protocol goes online the next time
- db_set_b((HCONTACT)wParam, "CList", "Delete", 1);
+ db_set_b((MCONTACT)wParam, "CList", "Delete", 1);
MessageBox(NULL,
TranslateT("This contact is on an instant messaging system which stores its contact list on a central server. The contact will be removed from the server and from your contact list when you next connect to that network."),
TranslateT("Delete contact"), MB_ICONINFORMATION | MB_OK);
@@ -212,7 +212,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) // Archive contact
case IDC_HIDE:
- db_set_b((HCONTACT)wParam, "CList", "Hidden", 1);
+ db_set_b((MCONTACT)wParam, "CList", "Hidden", 1);
break;
}
@@ -222,7 +222,7 @@ static INT_PTR MenuItem_DeleteContact(WPARAM wParam, LPARAM lParam) static INT_PTR MenuItem_AddContactToList(WPARAM wParam, LPARAM)
{
ADDCONTACTSTRUCT acs = { 0 };
- acs.hContact = (HCONTACT)wParam;
+ acs.hContact = (MCONTACT)wParam;
acs.handleType = HANDLE_CONTACT;
acs.szProto = "";
CallService(MS_ADDCONTACT_SHOW, NULL, (LPARAM)&acs);
@@ -813,7 +813,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case CLN_NEWCONTACT:
if (nmc != NULL)
- cli.pfnSetAllExtraIcons((HCONTACT)nmc->hItem);
+ cli.pfnSetAllExtraIcons((MCONTACT)nmc->hItem);
return TRUE;
case CLN_LISTREBUILT:
@@ -867,7 +867,7 @@ LRESULT CALLBACK fnContactListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM if (hItem) {
if (hitFlags & CLCHT_ONITEMEXTRA) {
if (!IsHContactGroup(hItem) && !IsHContactInfo(hItem))
- if (cli.pfnGetCacheEntry((HCONTACT)nmc->hItem))
+ if (cli.pfnGetCacheEntry((MCONTACT)nmc->hItem))
NotifyEventHooks(hEventExtraClick, (WPARAM)nmc->hItem, nmc->iColumn+1);
}
break;
diff --git a/src/modules/clist/contact.cpp b/src/modules/clist/contact.cpp index 92f7f5deda..be856535aa 100644 --- a/src/modules/clist/contact.cpp +++ b/src/modules/clist/contact.cpp @@ -45,7 +45,7 @@ static const struct { {ID_STATUS_ONTHEPHONE, 150},
{ID_STATUS_OUTTOLUNCH, 425}};
-static int GetContactStatus(HCONTACT hContact)
+static int GetContactStatus(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto == NULL)
@@ -53,7 +53,7 @@ static int GetContactStatus(HCONTACT hContact) return db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
}
-void fnChangeContactIcon(HCONTACT hContact, int iIcon, int add)
+void fnChangeContactIcon(MCONTACT hContact, int iIcon, int add)
{
CallService(add ? MS_CLUI_CONTACTADDED : MS_CLUI_CONTACTSETICON, (WPARAM) hContact, iIcon);
NotifyEventHooks(hContactIconChangedEvent, (WPARAM) hContact, iIcon);
@@ -78,7 +78,7 @@ void fnLoadContactTree(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)) {
int status = GetContactStatus(hContact);
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !db_get_b(hContact, "CList", "Hidden", 0))
cli.pfnChangeContactIcon(hContact, cli.pfnIconFromStatusMode(GetContactProto(hContact), status, hContact), 1);
@@ -90,7 +90,7 @@ void fnLoadContactTree(void) int fnCompareContacts(const ClcContact* c1, const ClcContact* c2)
{
- HCONTACT a = c1->hContact, b = c2->hContact;
+ MCONTACT a = c1->hContact, b = c2->hContact;
TCHAR namea[128], *nameb;
int statusa, statusb;
int rc;
@@ -144,13 +144,13 @@ INT_PTR ContactChangeGroup(WPARAM wParam, LPARAM lParam) CallService(MS_CLUI_CONTACTDELETED, wParam, 0);
if ((HANDLE) lParam == NULL)
- db_unset((HCONTACT)wParam, "CList", "Group");
+ db_unset((MCONTACT)wParam, "CList", "Group");
else {
grpChg.pszNewName = cli.pfnGetGroupName(lParam, NULL);
- db_set_ts((HCONTACT)wParam, "CList", "Group", grpChg.pszNewName);
+ db_set_ts((MCONTACT)wParam, "CList", "Group", grpChg.pszNewName);
}
CallService(MS_CLUI_CONTACTADDED, wParam,
- cli.pfnIconFromStatusMode(GetContactProto((HCONTACT)wParam), GetContactStatus((HCONTACT)wParam), (HCONTACT)wParam));
+ cli.pfnIconFromStatusMode(GetContactProto((MCONTACT)wParam), GetContactStatus((MCONTACT)wParam), (MCONTACT)wParam));
NotifyEventHooks(hGroupChangeEvent, wParam, (LPARAM)&grpChg);
return 0;
diff --git a/src/modules/clist/genmenu.cpp b/src/modules/clist/genmenu.cpp index c453635fce..ad3657ab55 100644 --- a/src/modules/clist/genmenu.cpp +++ b/src/modules/clist/genmenu.cpp @@ -1096,7 +1096,7 @@ int RegisterAllIconsInIconLib() return 0;
}
-int TryProcessDoubleClick(HCONTACT hContact)
+int TryProcessDoubleClick(MCONTACT hContact)
{
int iMenuID = GetMenuObjbyId((int)hContactMenuObject);
if (iMenuID != -1) {
diff --git a/src/modules/clist/groups.cpp b/src/modules/clist/groups.cpp index 123ee33692..3799770865 100644 --- a/src/modules/clist/groups.cpp +++ b/src/modules/clist/groups.cpp @@ -178,7 +178,7 @@ static INT_PTR DeleteGroup(WPARAM wParam, LPARAM) int i;
char str[33];
DBVARIANT dbv;
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR name[256], szNewParent[256], *pszLastBackslash;
//get the name
@@ -292,7 +292,7 @@ static int RenameGroupWithMove(int groupId, const TCHAR *szName, int move) db_set_ts(NULL, "CListGroups", idstr, str);
//must rename setting in all child contacts too
- 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 *cache = cli.pfnGetCacheEntry(hContact);
if (!lstrcmp(cache->tszGroup, oldName)) {
db_set_ts(hContact, "CList", "Group", szName);
diff --git a/src/modules/clist/movetogroup.cpp b/src/modules/clist/movetogroup.cpp index 3c3dc12ef2..3193dc6a20 100644 --- a/src/modules/clist/movetogroup.cpp +++ b/src/modules/clist/movetogroup.cpp @@ -101,7 +101,7 @@ static int OnContactMenuBuild(WPARAM wParam, LPARAM) CallService(MS_CLIST_REMOVECONTACTMENUITEM, (WPARAM)lphGroupsItems[i], 0);
lphGroupsItems.destroy();
- ptrT szContactGroup(db_get_tsa((HCONTACT)wParam, "CList", "Group"));
+ ptrT szContactGroup(db_get_tsa((MCONTACT)wParam, "CList", "Group"));
int pos = 1000;
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp index c07ab7502f..46719debed 100644 --- a/src/modules/database/dbintf.cpp +++ b/src/modules/database/dbintf.cpp @@ -48,7 +48,7 @@ static INT_PTR srvGetContactCount(WPARAM, LPARAM) static INT_PTR srvDeleteContact(WPARAM wParam, LPARAM)
{
DBVARIANT dbv = {0};
- if (!db_get_ts((HCONTACT)wParam, "ContactPhoto", "File", &dbv)) {
+ if (!db_get_ts((MCONTACT)wParam, "ContactPhoto", "File", &dbv)) {
DeleteFile(dbv.ptszVal);
db_free(&dbv);
}
diff --git a/src/modules/database/dbutils.cpp b/src/modules/database/dbutils.cpp index 045967ed1d..6f9bb2a9c8 100644 --- a/src/modules/database/dbutils.cpp +++ b/src/modules/database/dbutils.cpp @@ -112,7 +112,7 @@ static INT_PTR DbEventGetText(WPARAM wParam, LPARAM lParam) // EVENTTYPE_AUTHREQUEST: uin(DWORD), hContact(DWORD), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
// EVENTTYPE_ADDED: uin(DWORD), hContact(HANDLE), nick(ASCIIZ), first(ASCIIZ), last(ASCIIZ), email(ASCIIZ)
DWORD uin = *(DWORD*)dbei->pBlob;
- HCONTACT hContact = (HCONTACT)*(DWORD*)(dbei->pBlob + sizeof(DWORD));
+ MCONTACT hContact = (MCONTACT)*(DWORD*)(dbei->pBlob + sizeof(DWORD));
char *buf = LPSTR(dbei->pBlob) + sizeof(DWORD)*2;
ptrT tszNick(getEventString(dbei, buf));
ptrT tszFirst(getEventString(dbei, buf));
diff --git a/src/modules/extraicons/BaseExtraIcon.cpp b/src/modules/extraicons/BaseExtraIcon.cpp index e60276bad4..56631313e3 100644 --- a/src/modules/extraicons/BaseExtraIcon.cpp +++ b/src/modules/extraicons/BaseExtraIcon.cpp @@ -65,13 +65,13 @@ void BaseExtraIcon::setDescIcon(const char *icon) szDescIcon = mir_strdup(icon);
}
-void BaseExtraIcon::onClick(HCONTACT hContact)
+void BaseExtraIcon::onClick(MCONTACT hContact)
{
if (OnClick != NULL)
OnClick((WPARAM)hContact, (LPARAM)ConvertToClistSlot(slot), onClickParam);
}
-int BaseExtraIcon::ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage)
+int BaseExtraIcon::ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage)
{
ExtraIcon *tmp = extraIconsByHandle[id - 1];
if (tmp != this)
diff --git a/src/modules/extraicons/CallbackExtraIcon.cpp b/src/modules/extraicons/CallbackExtraIcon.cpp index 6c83193971..73badf0fc9 100644 --- a/src/modules/extraicons/CallbackExtraIcon.cpp +++ b/src/modules/extraicons/CallbackExtraIcon.cpp @@ -50,7 +50,7 @@ void CallbackExtraIcon::rebuildIcons() RebuildIcons(0, 0);
}
-void CallbackExtraIcon::applyIcon(HCONTACT hContact)
+void CallbackExtraIcon::applyIcon(MCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -61,7 +61,7 @@ void CallbackExtraIcon::applyIcon(HCONTACT hContact) ApplyIcon((WPARAM)hContact, 0);
}
-int CallbackExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE icon)
+int CallbackExtraIcon::setIcon(int id, MCONTACT hContact, HANDLE icon)
{
if (!isEnabled() || hContact == NULL || id != this->id)
return -1;
@@ -69,7 +69,7 @@ int CallbackExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE icon) return ClistSetExtraIcon(hContact, icon);
}
-int CallbackExtraIcon::setIconByName(int id, HCONTACT hContact, const char *icon)
+int CallbackExtraIcon::setIconByName(int id, MCONTACT hContact, const char *icon)
{
return -1;
}
diff --git a/src/modules/extraicons/DefaultExtraIcons.cpp b/src/modules/extraicons/DefaultExtraIcons.cpp index fe75c5b1a8..7b03c16c96 100644 --- a/src/modules/extraicons/DefaultExtraIcons.cpp +++ b/src/modules/extraicons/DefaultExtraIcons.cpp @@ -33,7 +33,7 @@ ExtraIcon* GetExtraIcon(HANDLE id); HANDLE hExtraVisibility, hExtraChat, hExtraGender, hExtraProto;
-static void SetVisibility(HCONTACT hContact, int apparentMode, bool clear)
+static void SetVisibility(MCONTACT hContact, int apparentMode, bool clear)
{
if (hContact == NULL)
return;
@@ -69,7 +69,7 @@ static void SetVisibility(HCONTACT hContact, int apparentMode, bool clear) }
}
-static void SetGender(HCONTACT hContact, int gender, bool clear)
+static void SetGender(MCONTACT hContact, int gender, bool clear)
{
if (hContact == NULL)
return;
@@ -134,7 +134,7 @@ static Info infos[] = &EmailOnClick },
};
-static void SetExtraIcons(HCONTACT hContact)
+static void SetExtraIcons(MCONTACT hContact)
{
if (hContact == NULL)
return;
@@ -161,7 +161,7 @@ static void SetExtraIcons(HCONTACT hContact) static int SettingChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -209,7 +209,7 @@ static int DefaultOnClick(WPARAM wParam, LPARAM lParam, LPARAM param) if (p == NULL)
return 0;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -279,7 +279,7 @@ static ProtoInfo* FindProto(const char *proto) static int ProtocolApplyIcon(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
char *proto = GetContactProto(hContact);
if (IsEmpty(proto))
return 0;
@@ -319,7 +319,7 @@ void DefaultExtraIcons_Load() p.hExtraIcon = ExtraIcon_Register(p.name, p.desc, LoadSkinnedIconName(p.iSkinIcon));
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
SetExtraIcons(hContact);
SetVisibility(hContact, -1, false);
SetGender(hContact, -1, false);
diff --git a/src/modules/extraicons/ExtraIcon.cpp b/src/modules/extraicons/ExtraIcon.cpp index 0da9413ef8..c35cec4ca8 100644 --- a/src/modules/extraicons/ExtraIcon.cpp +++ b/src/modules/extraicons/ExtraIcon.cpp @@ -67,7 +67,7 @@ void ExtraIcon::applyIcons() if (!isEnabled())
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)) {
// Clear to assert that it will be cleared
Clist_SetExtraIcon(hContact, slot, INVALID_HANDLE_VALUE);
applyIcon(hContact);
diff --git a/src/modules/extraicons/ExtraIcon.h b/src/modules/extraicons/ExtraIcon.h index de259cbd9c..6a3f4a79f2 100644 --- a/src/modules/extraicons/ExtraIcon.h +++ b/src/modules/extraicons/ExtraIcon.h @@ -35,12 +35,12 @@ public: virtual void rebuildIcons() = 0;
virtual void applyIcons();
- virtual void applyIcon(HCONTACT hContact) =0 ;
- virtual void onClick(HCONTACT hContact) = 0;
+ virtual void applyIcon(MCONTACT hContact) =0 ;
+ virtual void onClick(MCONTACT hContact) = 0;
- virtual int setIcon(int id, HCONTACT hContact, HANDLE icon) = 0;
- virtual int setIconByName(int id, HCONTACT hContact, const char* icon) = 0;
- virtual void storeIcon(HCONTACT hContact, void *icon) {};
+ virtual int setIcon(int id, MCONTACT hContact, HANDLE icon) = 0;
+ virtual int setIconByName(int id, MCONTACT hContact, const char* icon) = 0;
+ virtual void storeIcon(MCONTACT hContact, void *icon) {};
virtual const char *getName() const;
virtual const TCHAR *getDescription() const = 0;
@@ -55,7 +55,7 @@ public: virtual bool isEnabled() const;
- virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage) = 0;
+ virtual int ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage) = 0;
int hLangpack;
@@ -82,10 +82,10 @@ public: virtual void setDescIcon(const char *icon);
virtual int getType() const =0;
- virtual void onClick(HCONTACT hContact);
+ virtual void onClick(MCONTACT hContact);
virtual void setOnClick(MIRANDAHOOKPARAM OnClick, LPARAM param);
- virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage);
+ virtual int ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage);
protected:
int id;
@@ -108,10 +108,10 @@ public: virtual int getType() const;
virtual void rebuildIcons();
- virtual void applyIcon(HCONTACT hContact);
+ virtual void applyIcon(MCONTACT hContact);
- virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
- virtual int setIconByName(int id, HCONTACT hContact, const char* icon);
+ virtual int setIcon(int id, MCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, MCONTACT hContact, const char* icon);
private:
int(*RebuildIcons)(WPARAM wParam, LPARAM lParam);
@@ -132,11 +132,11 @@ public: virtual int getType() const;
virtual void rebuildIcons();
- virtual void applyIcon(HCONTACT hContact);
+ virtual void applyIcon(MCONTACT hContact);
- virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
- virtual int setIconByName(int id, HCONTACT hContact, const char* icon);
- virtual void storeIcon(HCONTACT hContact, void *icon);
+ virtual int setIcon(int id, MCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, MCONTACT hContact, const char* icon);
+ virtual void storeIcon(MCONTACT hContact, void *icon);
};
/////////////////////////////////////////////////////////////////////////////////////////
@@ -144,7 +144,7 @@ public: class ExtraIconGroup : public ExtraIcon
{
- int internalSetIcon(int id, HCONTACT hContact, HANDLE icon, bool bByName);
+ int internalSetIcon(int id, MCONTACT hContact, HANDLE icon, bool bByName);
public:
ExtraIconGroup(const char *name);
virtual ~ExtraIconGroup();
@@ -152,11 +152,11 @@ public: virtual void addExtraIcon(BaseExtraIcon *extra);
virtual void rebuildIcons();
- virtual void applyIcon(HCONTACT hContact);
- virtual void onClick(HCONTACT hContact);
+ virtual void applyIcon(MCONTACT hContact);
+ virtual void onClick(MCONTACT hContact);
- virtual int setIcon(int id, HCONTACT hContact, HANDLE icon);
- virtual int setIconByName(int id, HCONTACT hContact, const char *icon);
+ virtual int setIcon(int id, MCONTACT hContact, HANDLE icon);
+ virtual int setIconByName(int id, MCONTACT hContact, const char *icon);
virtual const TCHAR* getDescription() const;
virtual const char* getDescIcon() const;
@@ -167,14 +167,14 @@ public: LIST<BaseExtraIcon> items;
- virtual int ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage);
+ virtual int ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage);
protected:
ptrT tszDescription;
bool setValidExtraIcon;
bool insideApply;
- virtual ExtraIcon *getCurrentItem(HCONTACT hContact) const;
+ virtual ExtraIcon *getCurrentItem(MCONTACT hContact) const;
};
#endif // __EXTRAICON_H__
diff --git a/src/modules/extraicons/ExtraIconGroup.cpp b/src/modules/extraicons/ExtraIconGroup.cpp index 9df088c1c8..1cc7d43c18 100644 --- a/src/modules/extraicons/ExtraIconGroup.cpp +++ b/src/modules/extraicons/ExtraIconGroup.cpp @@ -54,7 +54,7 @@ void ExtraIconGroup::rebuildIcons() items[i]->rebuildIcons();
}
-void ExtraIconGroup::applyIcon(HCONTACT hContact)
+void ExtraIconGroup::applyIcon(MCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -91,7 +91,7 @@ void ExtraIconGroup::setSlot(int slot) items[i]->setSlot(slot);
}
-ExtraIcon * ExtraIconGroup::getCurrentItem(HCONTACT hContact) const
+ExtraIcon * ExtraIconGroup::getCurrentItem(MCONTACT hContact) const
{
int id = (int)db_get_dw(hContact, MODULE_NAME, szName, 0);
if (id < 1)
@@ -104,24 +104,24 @@ ExtraIcon * ExtraIconGroup::getCurrentItem(HCONTACT hContact) const return NULL;
}
-void ExtraIconGroup::onClick(HCONTACT hContact)
+void ExtraIconGroup::onClick(MCONTACT hContact)
{
ExtraIcon *extra = getCurrentItem(hContact);
if (extra != NULL)
extra->onClick(hContact);
}
-int ExtraIconGroup::setIcon(int id, HCONTACT hContact, HANDLE value)
+int ExtraIconGroup::setIcon(int id, MCONTACT hContact, HANDLE value)
{
return internalSetIcon(id, hContact, (void*)value, false);
}
-int ExtraIconGroup::setIconByName(int id, HCONTACT hContact, const char *value)
+int ExtraIconGroup::setIconByName(int id, MCONTACT hContact, const char *value)
{
return internalSetIcon(id, hContact, (void*)value, true);
}
-int ExtraIconGroup::internalSetIcon(int id, HCONTACT hContact, void *value, bool bByName)
+int ExtraIconGroup::internalSetIcon(int id, MCONTACT hContact, void *value, bool bByName)
{
if (insideApply) {
for (int i=0; i < items.getCount(); i++)
@@ -208,7 +208,7 @@ int ExtraIconGroup::getType() const return EXTRAICON_TYPE_GROUP;
}
-int ExtraIconGroup::ClistSetExtraIcon(HCONTACT hContact, HANDLE hImage)
+int ExtraIconGroup::ClistSetExtraIcon(MCONTACT hContact, HANDLE hImage)
{
if (hImage != INVALID_HANDLE_VALUE)
setValidExtraIcon = true;
diff --git a/src/modules/extraicons/IcolibExtraIcon.cpp b/src/modules/extraicons/IcolibExtraIcon.cpp index acf38d3ead..3013ae087b 100644 --- a/src/modules/extraicons/IcolibExtraIcon.cpp +++ b/src/modules/extraicons/IcolibExtraIcon.cpp @@ -46,7 +46,7 @@ void IcolibExtraIcon::rebuildIcons() {
}
-void IcolibExtraIcon::applyIcon(HCONTACT hContact)
+void IcolibExtraIcon::applyIcon(MCONTACT hContact)
{
if (!isEnabled() || hContact == NULL)
return;
@@ -60,7 +60,7 @@ void IcolibExtraIcon::applyIcon(HCONTACT hContact) ClistSetExtraIcon(hContact, hImage);
}
-int IcolibExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE hIcoLib)
+int IcolibExtraIcon::setIcon(int id, MCONTACT hContact, HANDLE hIcoLib)
{
if (hContact == NULL || id != this->id)
return -1;
@@ -84,7 +84,7 @@ int IcolibExtraIcon::setIcon(int id, HCONTACT hContact, HANDLE hIcoLib) return 0;
}
-int IcolibExtraIcon::setIconByName(int id, HCONTACT hContact, const char *icon)
+int IcolibExtraIcon::setIconByName(int id, MCONTACT hContact, const char *icon)
{
if (hContact == NULL || id != this->id)
return -1;
@@ -106,7 +106,7 @@ int IcolibExtraIcon::setIconByName(int id, HCONTACT hContact, const char *icon) return 0;
}
-void IcolibExtraIcon::storeIcon(HCONTACT hContact, void *icon)
+void IcolibExtraIcon::storeIcon(MCONTACT hContact, void *icon)
{
if (hContact == NULL)
return;
diff --git a/src/modules/extraicons/extraicons.cpp b/src/modules/extraicons/extraicons.cpp index a85fb18a28..8cb0acadac 100644 --- a/src/modules/extraicons/extraicons.cpp +++ b/src/modules/extraicons/extraicons.cpp @@ -82,7 +82,7 @@ int ExtraImage_ExtraIDToColumnNum(int extra) return (extra < 1 || extra > EXTRA_ICON_COUNT) ? -1 : extra-1;
}
-int Clist_SetExtraIcon(HCONTACT hContact, int slot, HANDLE hImage)
+int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage)
{
if (cli.hwndContactTree == 0)
return -1;
@@ -248,7 +248,7 @@ int ClistExtraListRebuild(WPARAM wParam, LPARAM lParam) int ClistExtraImageApply(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -262,7 +262,7 @@ int ClistExtraImageApply(WPARAM wParam, LPARAM lParam) int ClistExtraClick(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL)
return 0;
@@ -313,7 +313,7 @@ void fnReloadExtraIcons() bImageCreated = true;
}
-void fnSetAllExtraIcons(HCONTACT hContact)
+void fnSetAllExtraIcons(MCONTACT hContact)
{
if (cli.hwndContactTree == 0)
return;
diff --git a/src/modules/extraicons/extraicons.h b/src/modules/extraicons/extraicons.h index cedddefb0c..2b34ecbbd9 100644 --- a/src/modules/extraicons/extraicons.h +++ b/src/modules/extraicons/extraicons.h @@ -41,14 +41,14 @@ ExtraIcon * GetExtraIconBySlot(int slot); int GetNumberOfSlots();
int ConvertToClistSlot(int slot);
-int Clist_SetExtraIcon(HCONTACT hContact, int slot, HANDLE hImage);
+int Clist_SetExtraIcon(MCONTACT hContact, int slot, HANDLE hImage);
void DefaultExtraIcons_Load();
HANDLE ExtraIcon_Add(HICON hIcon);
void fnReloadExtraIcons();
-void fnSetAllExtraIcons(HCONTACT hContact);
+void fnSetAllExtraIcons(MCONTACT hContact);
static inline BOOL IsEmpty(const char *str)
{
diff --git a/src/modules/extraicons/options_ei.cpp b/src/modules/extraicons/options_ei.cpp index 19117a0de8..3300e279ac 100644 --- a/src/modules/extraicons/options_ei.cpp +++ b/src/modules/extraicons/options_ei.cpp @@ -70,7 +70,7 @@ BOOL ScreenToClient(HWND hWnd, LPRECT lpRect) static void RemoveExtraIcons(int slot)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
Clist_SetExtraIcon(hContact, slot, INVALID_HANDLE_VALUE);
}
diff --git a/src/modules/findadd/searchresults.cpp b/src/modules/findadd/searchresults.cpp index 726ce32bcd..ed608a13e9 100644 --- a/src/modules/findadd/searchresults.cpp +++ b/src/modules/findadd/searchresults.cpp @@ -377,13 +377,13 @@ void ShowMoreOptionsMenu(HWND hwndDlg, int x, int y) }
case IDC_DETAILS:
{
- HCONTACT hContact = (HCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
+ MCONTACT hContact = (MCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)hContact, 0);
break;
}
case IDC_SENDMESSAGE:
{
- HCONTACT hContact = (HCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
+ MCONTACT hContact = (MCONTACT)CallProtoServiceInt(NULL, lsr->szProto, PS_ADDTOLIST, PALF_TEMPORARY, (LPARAM)&lsr->psr);
CallService(MS_MSG_SENDMESSAGE, (WPARAM)hContact, (LPARAM)(const char*)NULL);
break;
}
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index 74683b5c18..f50384ae6a 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -29,7 +29,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, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF};
static const DWORD ignoreIdToPf4[IGNOREEVENT_MAX] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, PF4_SUPPORTTYPING};
-static DWORD GetMask(HCONTACT hContact)
+static DWORD GetMask(MCONTACT hContact)
{
DWORD mask = db_get_dw(hContact, "Ignore", "Mask1", (DWORD)(-1));
if (mask == (DWORD)(-1)) {
@@ -145,7 +145,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int }
}
-static void InitialiseItem(HWND hwndList, HCONTACT hContact, HANDLE hItem, DWORD proto1Caps, DWORD proto4Caps)
+static void InitialiseItem(HWND hwndList, MCONTACT hContact, HANDLE hItem, DWORD proto1Caps, DWORD proto4Caps)
{
DWORD mask = GetMask(hContact);
for (int i=0; i < IGNOREEVENT_MAX; i++)
@@ -156,7 +156,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 = 0;
for (int i=0; i < IGNOREEVENT_MAX; i++) {
@@ -169,7 +169,7 @@ static void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem, const c 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)) {
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) {
DWORD proto1Caps, proto4Caps;
@@ -296,7 +296,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, 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)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
if (SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
@@ -338,7 +338,7 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM) static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HCONTACT)wParam);
+ DWORD mask = GetMask((MCONTACT)wParam);
if (lParam < 1 || lParam > IGNOREEVENT_MAX)
return 1;
return (mask >> (lParam-1))&1;
@@ -346,20 +346,20 @@ static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam) static INT_PTR Ignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HCONTACT)wParam);
+ DWORD mask = GetMask((MCONTACT)wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
if (lParam == IGNOREEVENT_ALL)
mask = (1 << IGNOREEVENT_MAX)-1;
else
mask |= 1 << (lParam-1);
- db_set_dw((HCONTACT)wParam, "Ignore", "Mask1", mask);
+ db_set_dw((MCONTACT)wParam, "Ignore", "Mask1", mask);
return 0;
}
static INT_PTR Unignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HCONTACT)wParam);
+ DWORD mask = GetMask((MCONTACT)wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
@@ -367,7 +367,7 @@ static INT_PTR Unignore(WPARAM wParam, LPARAM lParam) mask = 0;
else
mask &= ~(1 << (lParam-1));
- db_set_dw((HCONTACT)wParam, "Ignore", "Mask1", mask);
+ db_set_dw((MCONTACT)wParam, "Ignore", "Mask1", mask);
return 0;
}
@@ -403,7 +403,7 @@ static int IgnoreAddedNotify(WPARAM, LPARAM lParam) {
DBEVENTINFO *dbei = (DBEVENTINFO*)lParam;
if (dbei && dbei->eventType == EVENTTYPE_ADDED && dbei->pBlob != NULL) {
- HCONTACT hContact = DbGetAuthEventContact(dbei);
+ MCONTACT hContact = DbGetAuthEventContact(dbei);
if (CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0) && IsIgnored((WPARAM)hContact, IGNOREEVENT_YOUWEREADDED))
return 1;
}
diff --git a/src/modules/protocols/protoaccs.cpp b/src/modules/protocols/protoaccs.cpp index e3ef2977c5..2a0e2c4699 100644 --- a/src/modules/protocols/protoaccs.cpp +++ b/src/modules/protocols/protoaccs.cpp @@ -199,7 +199,7 @@ void WriteDbAccounts() /////////////////////////////////////////////////////////////////////////////////////////
static int OnContactDeleted(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -210,7 +210,7 @@ static int OnContactDeleted(WPARAM wParam, LPARAM lParam) static int OnDbSettingsChanged(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact) {
PROTOACCOUNT* pa = Proto_GetAccount(hContact);
if (Proto_IsAccountEnabled(pa) && pa->ppro)
@@ -317,7 +317,7 @@ static INT_PTR stub11(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam) static INT_PTR stub12(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM lParam)
{
- return (INT_PTR)ppi->GetCaps(wParam, (HCONTACT)lParam);
+ return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
}
static INT_PTR stub13(PROTO_INTERFACE* ppi, WPARAM wParam, LPARAM)
@@ -550,9 +550,9 @@ void DeactivateAccount(PROTOACCOUNT* pa, bool bIsDynamic, bool bErase) void EraseAccount(const char* pszModuleName)
{
// remove protocol contacts first
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while (hContact != NULL) {
- HCONTACT h1 = hContact;
+ MCONTACT h1 = hContact;
hContact = db_find_next(h1);
char *szProto = GetContactProto(hContact);
diff --git a/src/modules/protocols/protochains.cpp b/src/modules/protocols/protochains.cpp index cc55405227..bf13ecd7d1 100644 --- a/src/modules/protocols/protochains.cpp +++ b/src/modules/protocols/protochains.cpp @@ -56,7 +56,7 @@ static int GetProtocolP(MCONTACT hContact, char *szBuf, int cbLen) /////////////////////////////////////////////////////////////////////////////////////////
-INT_PTR CallContactService(HCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
+INT_PTR CallContactService(MCONTACT hContact, const char *szProtoService, WPARAM wParam, LPARAM lParam)
{
INT_PTR ret;
CCSDATA ccs = { hContact, szProtoService, wParam, lParam };
@@ -161,7 +161,7 @@ static INT_PTR Proto_RecvChain(WPARAM wParam, LPARAM lParam) return ret;
}
-PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact)
+PROTOACCOUNT* __fastcall Proto_GetAccount(MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
@@ -175,13 +175,13 @@ PROTOACCOUNT* __fastcall Proto_GetAccount(HCONTACT hContact) static INT_PTR Proto_GetContactBaseProto(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((HCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
return (INT_PTR)(Proto_IsAccountEnabled(pa) ? pa->szModuleName : NULL);
}
static INT_PTR Proto_GetContactBaseAccount(WPARAM wParam, LPARAM)
{
- PROTOACCOUNT *pa = Proto_GetAccount((HCONTACT)wParam);
+ PROTOACCOUNT *pa = Proto_GetAccount((MCONTACT)wParam);
return (INT_PTR)(pa ? pa->szModuleName : NULL);
}
@@ -210,14 +210,14 @@ static INT_PTR Proto_AddToContact(WPARAM wParam, LPARAM lParam) if (pd == NULL) {
PROTOACCOUNT *pa = Proto_GetAccount(szProto);
if (pa) {
- db_set_s((HCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
return 0;
}
return 1;
}
if (pd->type == PROTOTYPE_PROTOCOL || pd->type == PROTOTYPE_VIRTUAL)
- db_set_s((HCONTACT)wParam, "Protocol", "p", szProto);
+ db_set_s((MCONTACT)wParam, "Protocol", "p", szProto);
return 0;
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_RemoveFromContact(WPARAM wParam, LPARAM lParam) case 0:
return 1;
case -1:
- db_unset((HCONTACT)wParam, "Protocol", "p");
+ db_unset((MCONTACT)wParam, "Protocol", "p");
}
return 0;
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp index f2a30976e7..03ff01a69c 100644 --- a/src/modules/protocols/protocols.cpp +++ b/src/modules/protocols/protocols.cpp @@ -203,7 +203,7 @@ static INT_PTR Proto_AuthRecv(WPARAM wParam, LPARAM lParam) /////////////////////////////////////////////////////////////////////////////////////////
// User Typing Notification services
-static int Proto_ValidTypingContact(HCONTACT hContact, char *szProto)
+static int Proto_ValidTypingContact(MCONTACT hContact, char *szProto)
{
if (!hContact || !szProto)
return 0;
@@ -214,11 +214,11 @@ static int Proto_ValidTypingContact(HCONTACT hContact, char *szProto) static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam)
{
if (lParam == PROTOTYPE_SELFTYPING_OFF || lParam == PROTOTYPE_SELFTYPING_ON) {
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (!szProto)
return 0;
- if (Proto_ValidTypingContact((HCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
CallProtoServiceInt(NULL,szProto, PSS_USERISTYPING, wParam, lParam);
}
@@ -228,7 +228,7 @@ static INT_PTR Proto_SelfIsTyping(WPARAM wParam, LPARAM lParam) static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam)
{
int type = (int)lParam;
- char *szProto = GetContactProto((HCONTACT)wParam);
+ char *szProto = GetContactProto((MCONTACT)wParam);
if (!szProto)
return 0;
@@ -238,7 +238,7 @@ static INT_PTR Proto_ContactIsTyping(WPARAM wParam, LPARAM lParam) if (type < PROTOTYPE_CONTACTTYPING_OFF)
return 0;
- if (Proto_ValidTypingContact((HCONTACT)wParam, szProto))
+ if (Proto_ValidTypingContact((MCONTACT)wParam, szProto))
NotifyEventHooks(hTypeEvent, wParam, lParam);
return 0;
@@ -372,7 +372,7 @@ INT_PTR CallProtoService(const char* szModule, const char* szService, WPARAM wPa return CallProtoServiceInt(NULL, szModule, szService, wParam, lParam);
}
-INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
+INT_PTR CallProtoServiceInt(MCONTACT hContact, const char *szModule, const char *szService, WPARAM wParam, LPARAM lParam)
{
PROTOACCOUNT* pa = Proto_GetAccount(szModule);
if (pa && !pa->bOldProto) {
@@ -442,7 +442,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char else
return (INT_PTR)ppi->FileResume((HANDLE)wParam, &pfr->action, (const PROTOCHAR**)&pfr->szFilename);
}
- case 12: return (INT_PTR)ppi->GetCaps(wParam, (HCONTACT)lParam);
+ case 12: return (INT_PTR)ppi->GetCaps(wParam, (MCONTACT)lParam);
case 13: return (INT_PTR)Proto_GetIcon(ppi, wParam);
case 14: return (INT_PTR)ppi->GetInfo(hContact, wParam);
case 15:
@@ -469,7 +469,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char case 21: return (INT_PTR)ppi->RecvFile(hContact, (PROTOFILEEVENT*)lParam);
case 22: return (INT_PTR)ppi->RecvMsg(hContact, (PROTORECVEVENT*)lParam);
case 23: return (INT_PTR)ppi->RecvUrl(hContact, (PROTORECVEVENT*)lParam);
- case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (HCONTACT*)lParam);
+ case 24: return (INT_PTR)ppi->SendContacts(hContact, LOWORD(wParam), HIWORD(wParam), (MCONTACT*)lParam);
case 25:
if (ppi->m_iVersion > 1) {
TCHAR** files = Proto_FilesMatrixU((char**)lParam);
@@ -490,7 +490,7 @@ INT_PTR CallProtoServiceInt(HCONTACT hContact, const char *szModule, const char return (INT_PTR)ppi->SetAwayMsg(wParam, StrConvT((char*)lParam));
else
return (INT_PTR)ppi->SetAwayMsg(wParam, (TCHAR*)lParam);
- case 34: return (INT_PTR)ppi->UserIsTyping((HCONTACT)wParam, lParam);
+ case 34: return (INT_PTR)ppi->UserIsTyping((MCONTACT)wParam, lParam);
case 35: lstrcpynA((char*)lParam, ppi->m_szModuleName, wParam); return 0;
case 36: return ppi->m_iStatus;
diff --git a/src/modules/protocols/protoint.cpp b/src/modules/protocols/protoint.cpp index 75099e8c95..a1b7ab0469 100644 --- a/src/modules/protocols/protoint.cpp +++ b/src/modules/protocols/protoint.cpp @@ -47,14 +47,14 @@ void FreeFilesMatrix(TCHAR ***files) struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE
{
- HCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr)
+ MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr)
{
- return (HCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
+ return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLIST, flags, (LPARAM)psr);
}
- HCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
+ MCONTACT __cdecl AddToListByEvent(int flags, int iContact, HANDLE hDbEvent)
{
- return (HCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent);
+ return (MCONTACT)ProtoCallService(m_szModuleName, PS_ADDTOLISTBYEVENT, MAKELONG(flags, iContact), (LPARAM)hDbEvent);
}
int __cdecl Authorize(HANDLE hDbEvent)
@@ -67,13 +67,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (int)ProtoCallService(m_szModuleName, PS_AUTHDENY, (WPARAM)hDbEvent, (LPARAM)StrConvA(szReason));
}
- int __cdecl AuthRecv(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl AuthRecv(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_AUTH, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AUTH, 0, (LPARAM)&ccs);
}
- int __cdecl AuthRequest(HCONTACT hContact, const TCHAR* szMessage)
+ int __cdecl AuthRequest(MCONTACT hContact, const TCHAR* szMessage)
{
CCSDATA ccs = { hContact, PSS_AUTHREQUEST, 0, (LPARAM)szMessage };
ccs.lParam = (LPARAM)mir_t2a(szMessage);
@@ -87,7 +87,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (HANDLE)ProtoCallService(m_szModuleName, PS_CHANGEINFO, iInfoType, (LPARAM)pInfoData);
}
- HANDLE __cdecl FileAllow(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
+ HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath)
{
CCSDATA ccs = { hContact, PSS_FILEALLOW, (WPARAM)hTransfer, (LPARAM)szPath };
@@ -97,13 +97,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- int __cdecl FileCancel(HCONTACT hContact, HANDLE hTransfer)
+ int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer)
{
CCSDATA ccs = { hContact, PSS_FILECANCEL, (WPARAM)hTransfer, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_FILECANCEL, 0, (LPARAM)&ccs);
}
- int __cdecl FileDeny(HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
+ int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason)
{
CCSDATA ccs = { hContact, PSS_FILEDENY, (WPARAM)hTransfer, (LPARAM)szReason };
@@ -125,7 +125,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- DWORD_PTR __cdecl GetCaps(int type, HCONTACT hContact)
+ DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact)
{
return (DWORD_PTR)ProtoCallService(m_szModuleName, PS_GETCAPS, type, (LPARAM)hContact);
}
@@ -135,7 +135,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (HICON)ProtoCallService(m_szModuleName, PS_LOADICON, iconIndex, 0);
}
- int __cdecl GetInfo(HCONTACT hContact, int flags)
+ int __cdecl GetInfo(MCONTACT hContact, int flags)
{
CCSDATA ccs = { hContact, PSS_GETINFO, flags, 0 };
return ProtoCallService(m_szModuleName, PSS_GETINFO, 0, (LPARAM)&ccs);
@@ -176,37 +176,37 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (HWND)ProtoCallService(m_szModuleName, PS_CREATEADVSEARCHUI, 0, (LPARAM)owner);
}
- int __cdecl RecvContacts(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvContacts(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_CONTACTS, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_CONTACTS, 0, (LPARAM)&ccs);
}
- int __cdecl RecvFile(HCONTACT hContact, PROTOFILEEVENT* evt)
+ int __cdecl RecvFile(MCONTACT hContact, PROTOFILEEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_FILE, 0, (LPARAM)evt };
return ProtoCallService(m_szModuleName, PSR_FILE, 0, (LPARAM)&ccs);
}
- int __cdecl RecvMsg(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvMsg(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_MESSAGE, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_MESSAGE, 0, (LPARAM)&ccs);
}
- int __cdecl RecvUrl(HCONTACT hContact, PROTORECVEVENT* evt)
+ int __cdecl RecvUrl(MCONTACT hContact, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_URL, 0, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_URL, 0, (LPARAM)&ccs);
}
- int __cdecl SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+ int __cdecl SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
CCSDATA ccs = { hContact, PSS_CONTACTS, MAKEWPARAM(flags, nContacts), (LPARAM)hContactsList };
return (int)ProtoCallService(m_szModuleName, PSS_CONTACTS, 0, (LPARAM)&ccs);
}
- HANDLE __cdecl SendFile(HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
+ HANDLE __cdecl SendFile(MCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles)
{
CCSDATA ccs = { hContact, PSS_FILE, (WPARAM)szDescription, (LPARAM)ppszFiles };
@@ -218,19 +218,19 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return res;
}
- int __cdecl SendMsg(HCONTACT hContact, int flags, const char* msg)
+ int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg)
{
CCSDATA ccs = { hContact, PSS_MESSAGE, flags, (LPARAM)msg };
return (int)ProtoCallService(m_szModuleName, PSS_MESSAGE, 0, (LPARAM)&ccs);
}
- int __cdecl SendUrl(HCONTACT hContact, int flags, const char* url)
+ int __cdecl SendUrl(MCONTACT hContact, int flags, const char* url)
{
CCSDATA ccs = { hContact, PSS_URL, flags, (LPARAM)url };
return (int)ProtoCallService(m_szModuleName, PSS_URL, 0, (LPARAM)&ccs);
}
- int __cdecl SetApparentMode(HCONTACT hContact, int mode)
+ int __cdecl SetApparentMode(MCONTACT hContact, int mode)
{
CCSDATA ccs = { hContact, PSS_SETAPPARENTMODE, mode, 0 };
return (int)ProtoCallService(m_szModuleName, PSS_SETAPPARENTMODE, 0, (LPARAM)&ccs);
@@ -241,13 +241,13 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (int)ProtoCallService(m_szModuleName, PS_SETSTATUS, iNewStatus, 0);
}
- HANDLE __cdecl GetAwayMsg(HCONTACT hContact)
+ HANDLE __cdecl GetAwayMsg(MCONTACT hContact)
{
CCSDATA ccs = { hContact, PSS_GETAWAYMSG, 0, 0 };
return (HANDLE)ProtoCallService(m_szModuleName, PSS_GETAWAYMSG, 0, (LPARAM)&ccs);
}
- int __cdecl RecvAwayMsg(HCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
+ int __cdecl RecvAwayMsg(MCONTACT hContact, int statusMode, PROTORECVEVENT* evt)
{
CCSDATA ccs = { hContact, PSR_AWAYMSG, statusMode, (LPARAM)evt };
return (int)ProtoCallService(m_szModuleName, PSR_AWAYMSG, 0, (LPARAM)&ccs);
@@ -258,7 +258,7 @@ struct DEFAULT_PROTO_INTERFACE : public PROTO_INTERFACE return (int)ProtoCallService(m_szModuleName, PS_SETAWAYMSG, iStatus, (LPARAM)StrConvA(msg));
}
- int __cdecl UserIsTyping(HCONTACT hContact, int type)
+ int __cdecl UserIsTyping(MCONTACT hContact, int type)
{
CCSDATA ccs = { hContact, PSS_USERISTYPING, (WPARAM)hContact, type };
return ProtoCallService(m_szModuleName, PSS_USERISTYPING, 0, (LPARAM)&ccs);
diff --git a/src/modules/srmm/statusicon.cpp b/src/modules/srmm/statusicon.cpp index d74d5eac0b..e1cc7bc0f0 100644 --- a/src/modules/srmm/statusicon.cpp +++ b/src/modules/srmm/statusicon.cpp @@ -32,7 +32,7 @@ struct StatusIconChild : public MZeroedObject mir_free(tszTooltip);
}
- HCONTACT hContact;
+ MCONTACT hContact;
HICON hIcon, hIconDisabled;
int flags;
TCHAR *tszTooltip;
@@ -88,7 +88,7 @@ INT_PTR ModifyStatusIcon(WPARAM wParam, LPARAM lParam) if (p == NULL)
return 1;
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if (hContact == NULL) {
mir_free(p->sid.szModule);
mir_free(p->sid.szTooltip);
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp index 0f47fdb23a..3520a749b0 100644 --- a/src/modules/utils/path.cpp +++ b/src/modules/utils/path.cpp @@ -68,7 +68,7 @@ static INT_PTR createDirTreeW(WPARAM, LPARAM lParam) return CreateDirectoryTreeW((WCHAR*)lParam);
}
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
TCHAR *theValue = {0};
char *szProto = GetContactProto(hContact);
@@ -114,12 +114,12 @@ static __forceinline char *_xstrselect(char *, char *s1, TCHAR *s2) { return s1; static __forceinline char *_itox(char *, int a) { return itoa(a, (char *)mir_alloc(sizeof(char)*20), 10); }
static __forceinline char *mir_a2x(char *, char *s) { return mir_strdup(s); }
-static __forceinline char *GetContactNickX(char *, HCONTACT hContact)
+static __forceinline char *GetContactNickX(char *, MCONTACT hContact)
{
return mir_strdup((char *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, 0));
}
-static __forceinline char *GetContactIDX(char *, HCONTACT hContact)
+static __forceinline char *GetContactIDX(char *, MCONTACT hContact)
{
TCHAR *id = GetContactID(hContact);
char* res = mir_t2a(id);
@@ -201,12 +201,12 @@ static __forceinline TCHAR *_xstrselect(TCHAR *, char *s1, TCHAR *s2) { return s static __forceinline TCHAR *_itox(TCHAR *, int a) { return _itot(a, (TCHAR *)mir_alloc(sizeof(TCHAR)*20), 10); }
static __forceinline TCHAR *mir_a2x(TCHAR *, char *s) { return mir_a2t(s); }
-static __forceinline TCHAR *GetContactNickX(TCHAR *, HCONTACT hContact)
+static __forceinline TCHAR *GetContactNickX(TCHAR *, MCONTACT hContact)
{
return mir_tstrdup((TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR));
}
-static __forceinline TCHAR *GetContactIDX(TCHAR *, HCONTACT hContact)
+static __forceinline TCHAR *GetContactIDX(TCHAR *, MCONTACT hContact)
{
return GetContactID(hContact);
}
@@ -277,7 +277,7 @@ static __forceinline TCHAR *GetPathVarX(TCHAR *, int code) }
template<typename XCHAR>
-XCHAR *GetInternalVariable(XCHAR *key, size_t keyLength, HCONTACT hContact)
+XCHAR *GetInternalVariable(XCHAR *key, size_t keyLength, MCONTACT hContact)
{
XCHAR *theValue = NULL;
XCHAR *theKey = (XCHAR *)_alloca(sizeof(XCHAR) * (keyLength + 1));
@@ -323,7 +323,7 @@ XCHAR *GetInternalVariable(XCHAR *key, size_t keyLength, HCONTACT hContact) }
template<typename XCHAR>
-XCHAR *GetVariableFromArray(REPLACEVARSARRAY *vars, XCHAR *key, size_t keyLength, HCONTACT hContact, bool *bFree)
+XCHAR *GetVariableFromArray(REPLACEVARSARRAY *vars, XCHAR *key, size_t keyLength, MCONTACT hContact, bool *bFree)
{
*bFree = false;
for (REPLACEVARSARRAY *var = vars; var && var->lptzKey; ++var)
diff --git a/src/modules/utils/timezones.cpp b/src/modules/utils/timezones.cpp index ec3442c471..dab7f94089 100644 --- a/src/modules/utils/timezones.cpp +++ b/src/modules/utils/timezones.cpp @@ -168,7 +168,7 @@ static HANDLE timeapiGetInfoByName(LPCTSTR tszName, DWORD dwFlags) return tz;
}
-static HANDLE timeapiGetInfoByContact(HCONTACT hContact, DWORD dwFlags)
+static HANDLE timeapiGetInfoByContact(MCONTACT hContact, DWORD dwFlags)
{
if (hContact == NULL)
return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? NULL : &myInfo.myTZ;
@@ -227,7 +227,7 @@ static HANDLE timeapiGetInfoByContact(HCONTACT hContact, DWORD dwFlags) return (dwFlags & (TZF_DIFONLY | TZF_KNOWNONLY)) ? NULL : &myInfo.myTZ;
}
-static void timeapiSetInfoByContact(HCONTACT hContact, HANDLE hTZ)
+static void timeapiSetInfoByContact(MCONTACT hContact, HANDLE hTZ)
{
MIM_TIMEZONE *tz = (MIM_TIMEZONE*)hTZ;
@@ -354,7 +354,7 @@ static const ListMessages *GetListMessages(HWND hWnd, DWORD dwFlags) }
-static int timeapiSelectListItem(HCONTACT hContact, HWND hWnd, DWORD dwFlags)
+static int timeapiSelectListItem(MCONTACT hContact, HWND hWnd, DWORD dwFlags)
{
if (hWnd == NULL) // nothing to do
return -1;
@@ -386,7 +386,7 @@ static int timeapiSelectListItem(HCONTACT hContact, HWND hWnd, DWORD dwFlags) }
-static int timeapiPrepareList(HCONTACT hContact, HWND hWnd, DWORD dwFlags)
+static int timeapiPrepareList(MCONTACT hContact, HWND hWnd, DWORD dwFlags)
{
if (hWnd == NULL) // nothing to do
return 0;
@@ -408,7 +408,7 @@ static int timeapiPrepareList(HCONTACT hContact, HWND hWnd, DWORD dwFlags) }
-static void timeapiStoreListResult(HCONTACT hContact, HWND hWnd, DWORD dwFlags)
+static void timeapiStoreListResult(MCONTACT hContact, HWND hWnd, DWORD dwFlags)
{
const ListMessages *lstMsg = GetListMessages(hWnd, dwFlags);
if (lstMsg == NULL) return;
diff --git a/src/modules/utils/windowlist.cpp b/src/modules/utils/windowlist.cpp index 1337795f2d..80c84906f4 100644 --- a/src/modules/utils/windowlist.cpp +++ b/src/modules/utils/windowlist.cpp @@ -26,12 +26,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. struct TWindowListItem
{
- TWindowListItem(HCONTACT _contact, HWND _wnd) :
+ TWindowListItem(MCONTACT _contact, HWND _wnd) :
hContact(_contact),
hWnd(_wnd)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
HWND hWnd;
};
diff --git a/src/modules/visibility/visibility.cpp b/src/modules/visibility/visibility.cpp index 449467c3e9..d9043ee9e3 100644 --- a/src/modules/visibility/visibility.cpp +++ b/src/modules/visibility/visibility.cpp @@ -107,7 +107,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)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem == NULL)
continue;
@@ -244,7 +244,7 @@ static INT_PTR CALLBACK DlgProcVisibilityOpts(HWND hwndDlg, UINT msg, WPARAM, LP case 0:
if (((LPNMHDR)lParam)->code == 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 == NULL)
continue;
|