diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/m_addcontact.h | 2 | ||||
-rw-r--r-- | include/m_avatars.h | 41 | ||||
-rw-r--r-- | include/m_chat.h | 2 | ||||
-rw-r--r-- | include/m_chat_int.h | 12 | ||||
-rw-r--r-- | include/m_clist.h | 4 | ||||
-rw-r--r-- | include/m_clistint.h | 36 | ||||
-rw-r--r-- | include/m_contacts.h | 2 | ||||
-rw-r--r-- | include/m_core.h | 88 | ||||
-rw-r--r-- | include/m_database.h | 10 | ||||
-rw-r--r-- | include/m_extraicons.h | 12 | ||||
-rw-r--r-- | include/m_jabber.h | 4 | ||||
-rw-r--r-- | include/m_message.h | 14 | ||||
-rw-r--r-- | include/m_popup.h | 10 | ||||
-rw-r--r-- | include/m_protocols.h | 12 | ||||
-rw-r--r-- | include/m_protoint.h | 74 | ||||
-rw-r--r-- | include/m_protomod.h | 6 | ||||
-rw-r--r-- | include/m_protosvc.h | 4 | ||||
-rw-r--r-- | include/m_timezones.h | 20 | ||||
-rw-r--r-- | include/m_utils.h | 20 |
19 files changed, 188 insertions, 185 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;
|