diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 20:47:51 +0000 | 
| commit | 68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch) | |
| tree | fcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/AVS/src | |
| parent | 7193759b046338c6f47ff2edb34743a1465791cd (diff) | |
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS/src')
| -rw-r--r-- | plugins/AVS/src/acc.cpp | 6 | ||||
| -rw-r--r-- | plugins/AVS/src/acc.h | 2 | ||||
| -rw-r--r-- | plugins/AVS/src/cache.cpp | 14 | ||||
| -rw-r--r-- | plugins/AVS/src/commonheaders.h | 22 | ||||
| -rw-r--r-- | plugins/AVS/src/image_utils.cpp | 6 | ||||
| -rw-r--r-- | plugins/AVS/src/image_utils.h | 4 | ||||
| -rw-r--r-- | plugins/AVS/src/main.cpp | 10 | ||||
| -rw-r--r-- | plugins/AVS/src/options.cpp | 28 | ||||
| -rw-r--r-- | plugins/AVS/src/poll.cpp | 22 | ||||
| -rw-r--r-- | plugins/AVS/src/poll.h | 4 | ||||
| -rw-r--r-- | plugins/AVS/src/services.cpp | 12 | ||||
| -rw-r--r-- | plugins/AVS/src/utils.cpp | 24 | 
12 files changed, 77 insertions, 77 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp index 3a743a2f08..4f5e423ace 100644 --- a/plugins/AVS/src/acc.cpp +++ b/plugins/AVS/src/acc.cpp @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  typedef struct
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	char proto[64];
  	HANDLE hHook;
  	HANDLE hHookMy;
 @@ -556,7 +556,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg,  WPARAM wParam, LPARAM l  		{
  			DestroyAnimation(hwnd, data);
 -			data->hContact = (HCONTACT)lParam;
 +			data->hContact = (MCONTACT)lParam;
  			if (lParam == NULL)
  				data->proto[0] = '\0';
  			else
 @@ -708,7 +708,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg,  WPARAM wParam, LPARAM l  		}
  		case DM_AVATARCHANGED:
  		{
 -			if (data->hContact == (HCONTACT)wParam)
 +			if (data->hContact == (MCONTACT)wParam)
  			{
  				DestroyAnimation(hwnd, data);
  				StartAnimation(hwnd, data);
 diff --git a/plugins/AVS/src/acc.h b/plugins/AVS/src/acc.h index 576215b1a4..4ac03915f0 100644 --- a/plugins/AVS/src/acc.h +++ b/plugins/AVS/src/acc.h @@ -21,7 +21,7 @@ Boston, MA 02111-1307, USA.  #ifndef __ACC_H__
  # define __ACC_H__
 -INT_PTR avSetAvatar(HCONTACT hContact, TCHAR* tszPath );
 +INT_PTR avSetAvatar(MCONTACT hContact, TCHAR* tszPath );
  INT_PTR avSetMyAvatar( char* szProto, TCHAR* tszPath );
  int LoadACC();
 diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp index c6155f3bef..56a443afab 100644 --- a/plugins/AVS/src/cache.cpp +++ b/plugins/AVS/src/cache.cpp @@ -88,7 +88,7 @@ static CacheNode* AddToList(CacheNode *node)  	return pCurrent;
  }
 -CacheNode *FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny)
 +CacheNode *FindAvatarInCache(MCONTACT hContact, BOOL add, BOOL findAny)
  {
  	if (g_shutDown)
  		return NULL;
 @@ -143,7 +143,7 @@ CacheNode *FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny)   * popup plugin.
   */
 -void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)-1)
 +void NotifyMetaAware(MCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY *ace = (AVATARCACHEENTRY *)-1)
  {
  	if (g_shutDown)
  		return;
 @@ -154,8 +154,8 @@ void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY  	NotifyEventHooks(hEventChanged, (WPARAM)hContact, (LPARAM)ace);
  	if (g_MetaAvail && (node->dwFlags & MC_ISSUBCONTACT) && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
 -		HCONTACT hMasterContact = (HCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
 -		if (hMasterContact && (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMasterContact, 0) == hContact &&
 +		MCONTACT hMasterContact = (MCONTACT)db_get_dw(hContact, g_szMetaName, "Handle", 0);
 +		if (hMasterContact && (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hMasterContact, 0) == hContact &&
  			!db_get_b(hMasterContact, "ContactPhoto", "Locked", 0))
  			NotifyEventHooks(hEventChanged, (WPARAM)hMasterContact, (LPARAM)ace);
  	}
 @@ -200,7 +200,7 @@ void NotifyMetaAware(HCONTACT hContact, CacheNode *node = NULL, AVATARCACHEENTRY  // Just delete an avatar from cache
  // An cache entry is never deleted. What is deleted is the image handle inside it
  // This is done this way to keep track of which avatars avs have to keep track
 -void DeleteAvatarFromCache(HCONTACT hContact, BOOL forever)
 +void DeleteAvatarFromCache(MCONTACT hContact, BOOL forever)
  {
  	if (g_shutDown)
  		return;
 @@ -222,7 +222,7 @@ void DeleteAvatarFromCache(HCONTACT hContact, BOOL forever)  /////////////////////////////////////////////////////////////////////////////////////////
 -int SetAvatarAttribute(HCONTACT hContact, DWORD attrib, int mode)
 +int SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode)
  {
  	if (g_shutDown)
  		return 0;
 @@ -305,7 +305,7 @@ void PicLoader(LPVOID param)  				mir_sleep(dwDelay);
  			}
  			else if (node->mustLoad < 0 && node->ace.hContact) {         // delete this picture
 -				HCONTACT hContact = node->ace.hContact;
 +				MCONTACT hContact = node->ace.hContact;
  				EnterCriticalSection(&cachecs);
  				node->mustLoad = 0;
  				node->loaded = 0;
 diff --git a/plugins/AVS/src/commonheaders.h b/plugins/AVS/src/commonheaders.h index 2b7b8d7877..6507b2ecd9 100644 --- a/plugins/AVS/src/commonheaders.h +++ b/plugins/AVS/src/commonheaders.h @@ -123,24 +123,24 @@ extern HANDLE hEventChanged, hEventContactAvatarChanged, hMyAvatarChanged;  int   GetFileHash(TCHAR* filename);
  DWORD GetFileSize(TCHAR *szFilename);
 -void  MakePathRelative(HCONTACT hContact);
 -void  MakePathRelative(HCONTACT hContact, TCHAR *dest);
 +void  MakePathRelative(MCONTACT hContact);
 +void  MakePathRelative(MCONTACT hContact, TCHAR *dest);
  HBITMAP LoadPNG(struct avatarCacheEntry *ace, char *szFilename);
  void InitCache(void);
  void UnloadCache(void);
 -int  CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto);
 -void DeleteAvatarFromCache(HCONTACT hContact, BOOL);
 +int  CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto);
 +void DeleteAvatarFromCache(MCONTACT hContact, BOOL);
  void PicLoader(LPVOID param);
  void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bmHeight, DWORD dwFlags);
 -int ChangeAvatar(HCONTACT hContact, BOOL fLoad, BOOL fNotifyHist = FALSE, int pa_format = 0);
 +int ChangeAvatar(MCONTACT hContact, BOOL fLoad, BOOL fNotifyHist = FALSE, int pa_format = 0);
  void DeleteGlobalUserAvatar();
 -int  FetchAvatarFor(HCONTACT hContact, char *szProto = NULL);
 -CacheNode* FindAvatarInCache(HCONTACT hContact, BOOL add, BOOL findAny = FALSE);
 -int  SetAvatarAttribute(HCONTACT hContact, DWORD attrib, int mode);
 +int  FetchAvatarFor(MCONTACT hContact, char *szProto = NULL);
 +CacheNode* FindAvatarInCache(MCONTACT hContact, BOOL add, BOOL findAny = FALSE);
 +int  SetAvatarAttribute(MCONTACT hContact, DWORD attrib, int mode);
  void SetIgnoreNotify(char *protocol, BOOL ignore);
  INT_PTR DrawAvatarPicture(WPARAM wParam, LPARAM lParam);
 @@ -149,9 +149,9 @@ INT_PTR GetMyAvatar(WPARAM wParam, LPARAM lParam);  INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam);
  INT_PTR ReportMyAvatarChanged(WPARAM wParam, LPARAM lParam);
 -HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked = -1);
 +MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked = -1);
 -void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
 +void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto);
  int  Proto_GetDelayAfterFail(const char *proto);
  BOOL Proto_NeedDelaysForAvatars(const char *proto);
 @@ -161,4 +161,4 @@ int  Proto_AvatarImageProportion(const char *proto);  void Proto_GetAvatarMaxSize(const char *proto, int *width, int *height);
  int  Proto_GetAvatarMaxFileSize(const char *proto);
 -protoPicCacheEntry* GetProtoDefaultAvatar(HCONTACT hContact);
\ No newline at end of file +protoPicCacheEntry* GetProtoDefaultAvatar(MCONTACT hContact);
 diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp index 9e7be9b152..3a2fa368af 100644 --- a/plugins/AVS/src/image_utils.cpp +++ b/plugins/AVS/src/image_utils.cpp @@ -2,7 +2,7 @@  #include "image_utils.h"
  extern int _DebugTrace(const char *fmt, ...);
 -extern int _DebugTrace(HCONTACT hContact, const char *fmt, ...);
 +extern int _DebugTrace(MCONTACT hContact, const char *fmt, ...);
  #define GET_PIXEL(__P__, __X__, __Y__) ( __P__ + width * 4 * (__Y__) + 4 * (__X__))
 @@ -410,7 +410,7 @@ DWORD GetImgHash(HBITMAP hBitmap)  /*
   * Changes the handle to a grayscale image
   */
 -HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap)
 +HBITMAP MakeGrayscale(MCONTACT hContact, HBITMAP hBitmap)
  {
  	if (hBitmap) {
  		FIBITMAP *dib = fei->FI_CreateDIBFromHBITMAP(hBitmap);
 @@ -433,7 +433,7 @@ HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap)   * See if finds a transparent background in image, and set its transparency
   * Return TRUE if found a transparent background
   */
 -BOOL MakeTransparentBkg(HCONTACT hContact, HBITMAP *hBitmap)
 +BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap)
  {
  	BYTE *p = NULL;
  	DWORD dwLen;
 diff --git a/plugins/AVS/src/image_utils.h b/plugins/AVS/src/image_utils.h index f22dc47c04..77ff831719 100644 --- a/plugins/AVS/src/image_utils.h +++ b/plugins/AVS/src/image_utils.h @@ -37,8 +37,8 @@ int BmpFilterSaveBitmapW(HBITMAP hBmp, wchar_t *wszFile, int flags);  HBITMAP CopyBitmapTo32(HBITMAP hBitmap);
  BOOL PreMultiply(HBITMAP hBitmap);
 -BOOL MakeTransparentBkg(HCONTACT hContact, HBITMAP *hBitmap);
 -HBITMAP MakeGrayscale(HCONTACT hContact, HBITMAP hBitmap);
 +BOOL MakeTransparentBkg(MCONTACT hContact, HBITMAP *hBitmap);
 +HBITMAP MakeGrayscale(MCONTACT hContact, HBITMAP hBitmap);
  DWORD GetImgHash(HBITMAP hBitmap);
  int AVS_pathIsAbsolute(const TCHAR *path);
 diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp index a4422d83b4..0a4997a54e 100644 --- a/plugins/AVS/src/main.cpp +++ b/plugins/AVS/src/main.cpp @@ -134,8 +134,8 @@ static int MetaChanged(WPARAM wParam, LPARAM lParam)  	AVATARCACHEENTRY *ace;
 -	HCONTACT hContact = (HCONTACT)wParam;
 -	HCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact);
 +	MCONTACT hContact = (MCONTACT)wParam;
 +	MCONTACT hSubContact = GetContactThatHaveTheAvatar(hContact);
  	// Get the node
  	CacheNode *node = FindAvatarInCache(hSubContact, TRUE);
 @@ -190,7 +190,7 @@ static void LoadAccountInfo(PROTOACCOUNT *acc)  	g_ProtoPictures.insert(pce);
  	pce = new protoPicCacheEntry;
 -	CreateAvatarInCache((HCONTACT)-1, pce, acc->szModuleName);
 +	CreateAvatarInCache((MCONTACT)-1, pce, acc->szModuleName);
  	pce->szProtoname = mir_strdup(acc->szModuleName);
  	pce->tszAccName = mir_tstrdup(acc->tszAccountName);
  	g_MyAvatars.insert(pce);
 @@ -242,7 +242,7 @@ static int ContactSettingChanged(WPARAM wParam, LPARAM lParam)  static int ContactDeleted(WPARAM wParam, LPARAM lParam)
  {
 -	DeleteAvatarFromCache((HCONTACT)wParam, TRUE);
 +	DeleteAvatarFromCache((MCONTACT)wParam, TRUE);
  	return 0;
  }
 @@ -401,7 +401,7 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam)  	// Load global avatar
  	protoPicCacheEntry *pce = new protoPicCacheEntry;
 -	CreateAvatarInCache((HCONTACT)-1, pce, "");
 +	CreateAvatarInCache((MCONTACT)-1, pce, "");
  	pce->szProtoname = mir_strdup("");
  	g_MyAvatars.insert(pce);
 diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index ee1fc4007a..580e375048 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.  #define DM_AVATARCHANGED (WM_USER + 12)
  #define DM_PROTOCOLCHANGED (WM_USER + 13)
 -extern int _DebugPopup(HCONTACT hContact, const char *fmt, ...);
 +extern int _DebugPopup(MCONTACT hContact, const char *fmt, ...);
  extern INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam);
  extern OBJLIST<protoPicCacheEntry> g_ProtoPictures;
  extern HANDLE hEventChanged;
 @@ -41,7 +41,7 @@ extern BOOL ScreenToClient(HWND hWnd, LPRECT lpRect);  static BOOL dialoginit = TRUE;
  struct WindowData {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	HANDLE hHook;
  };
 @@ -423,7 +423,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar  					BOOL newVal = ListView_GetCheckState(hwndList, i);
  					if (oldVal && !newVal)
 -						for (HCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
 +						for (MCONTACT hContact = db_find_first(szProto); hContact; hContact = db_find_next(hContact, szProto))
  							DeleteAvatarFromCache(hContact, TRUE);
  					if (newVal)
 @@ -440,7 +440,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar  /////////////////////////////////////////////////////////////////////////////////////////
 -static void LoadTransparentData(HWND hwndDlg, HCONTACT hContact)
 +static void LoadTransparentData(HWND hwndDlg, MCONTACT hContact)
  {
  	CheckDlgButton(hwndDlg, IDC_MAKETRANSPBKG, db_get_b(hContact, "ContactPhoto", "MakeTransparentBkg", db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0)));
  	SendDlgItemMessage(hwndDlg, IDC_BKG_NUM_POINTS_SPIN, UDM_SETPOS, 0, (LPARAM)db_get_w(hContact, "ContactPhoto", "TranspBkgNumPoints", db_get_w(0, AVS_MODULE, "TranspBkgNumPoints", 5)));
 @@ -455,7 +455,7 @@ static void LoadTransparentData(HWND hwndDlg, HCONTACT hContact)  	EnableWindow(GetDlgItem(hwndDlg, IDC_BKG_COLOR_DIFFERENCE), transp_enabled);
  }
 -static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact)
 +static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact)
  {
  	BOOL transp = IsDlgButtonChecked(hwndDlg, IDC_MAKETRANSPBKG);
  	if (db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0) == transp)
 @@ -476,18 +476,18 @@ static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact)  		db_set_w(hContact, "ContactPhoto", "TranspBkgColorDiff", tmp);
  }
 -static void SaveTransparentData(HWND hwndDlg, HCONTACT hContact, BOOL locked)
 +static void SaveTransparentData(HWND hwndDlg, MCONTACT hContact, BOOL locked)
  {
  	SaveTransparentData(hwndDlg, hContact);
 -	HCONTACT tmp = GetContactThatHaveTheAvatar(hContact, locked);
 +	MCONTACT tmp = GetContactThatHaveTheAvatar(hContact, locked);
  	if (tmp != hContact)
  		SaveTransparentData(hwndDlg, tmp);
  }
  INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	struct WindowData *dat = (struct WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  	if (dat)
 @@ -501,10 +501,10 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA  			struct WindowData *dat = (struct WindowData *)malloc(sizeof(struct WindowData));
  			if (dat)
 -				dat->hContact = (HCONTACT)lParam;
 +				dat->hContact = (MCONTACT)lParam;
  			SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
 -			hContact = (HCONTACT)lParam;
 +			hContact = (MCONTACT)lParam;
  			TranslateDialogDefault(hwndDlg);
  			if (hContact) {
  				szNick = (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)hContact, GCDNF_TCHAR);
 @@ -759,7 +759,7 @@ int OptInit(WPARAM wParam, LPARAM lParam)  static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	struct WindowData *dat = (struct WindowData *)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
  	if (dat)
 @@ -771,7 +771,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa  			dat = (struct WindowData *) malloc(sizeof(struct WindowData));
  			if (dat == NULL)
  				return FALSE;
 -			dat->hContact = (HCONTACT)lParam;
 +			dat->hContact = (MCONTACT)lParam;
  			HWND protopic = GetDlgItem(hwndDlg, IDC_PROTOPIC);
  			SendMessage(protopic, AVATAR_SETCONTACT, 0, (LPARAM) dat->hContact);
 @@ -781,7 +781,7 @@ static INT_PTR CALLBACK DlgProcAvatarUserInfo(HWND hwndDlg, UINT msg, WPARAM wPa  			SendMessage(protopic, AVATAR_SETRESIZEIFSMALLER, 0, (LPARAM) FALSE);
  			SetWindowLongPtr(hwndDlg, GWLP_USERDATA, (LONG_PTR)dat);
 -			hContact = (HCONTACT)lParam;
 +			hContact = (MCONTACT)lParam;
  			TranslateDialogDefault(hwndDlg);
  			SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
  			CheckDlgButton(hwndDlg, IDC_PROTECTAVATAR, db_get_b(hContact, "ContactPhoto", "Locked", 0) ? TRUE : FALSE);
 @@ -1148,7 +1148,7 @@ int OnDetailsInit(WPARAM wParam, LPARAM lParam)  	odp.hInstance = g_hInst;
  	odp.pszTitle = LPGEN("Avatar");
 -	HCONTACT hContact = (HCONTACT)lParam;
 +	MCONTACT hContact = (MCONTACT)lParam;
  	if (hContact == NULL) {
  		// User dialog
  		odp.pfnDlgProc = DlgProcAvatarProtoInfo;
 diff --git a/plugins/AVS/src/poll.cpp b/plugins/AVS/src/poll.cpp index 9273720962..a7faa9007c 100644 --- a/plugins/AVS/src/poll.cpp +++ b/plugins/AVS/src/poll.cpp @@ -45,15 +45,15 @@ A queue to request items. One request is done at a time, REQUEST_WAIT_TIME milis  static void RequestThread(void *vParam);
  extern HANDLE hShutdownEvent;
 -extern int DeleteAvatar(HCONTACT hContact);
 -extern void MakePathRelative(HCONTACT hContact, TCHAR *path);
 +extern int DeleteAvatar(MCONTACT hContact);
 +extern void MakePathRelative(MCONTACT hContact, TCHAR *path);
  int Proto_GetDelayAfterFail(const char *proto);
  BOOL Proto_IsFetchingWhenProtoNotVisibleAllowed(const char *proto);
  BOOL Proto_IsFetchingWhenContactOfflineAllowed(const char *proto);
  #ifdef _DEBUG
  int _DebugTrace(const char *fmt, ...);
 -int _DebugTrace(HCONTACT hContact, const char *fmt, ...);
 +int _DebugTrace(MCONTACT hContact, const char *fmt, ...);
  #endif
  // Functions ////////////////////////////////////////////////////////////////////////////
 @@ -100,7 +100,7 @@ static BOOL PollCheckProtocol(const char *szProto)  }
  // Return true if this contact can have avatar requested
 -static BOOL PollContactCanHaveAvatar(HCONTACT hContact, const char *szProto)
 +static BOOL PollContactCanHaveAvatar(MCONTACT hContact, const char *szProto)
  {
  	int status = db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE);
  	return (Proto_IsFetchingWhenContactOfflineAllowed(szProto) || status != ID_STATUS_OFFLINE)
 @@ -108,12 +108,12 @@ static BOOL PollContactCanHaveAvatar(HCONTACT hContact, const char *szProto)  }
  // Return true if this contact has to be checked
 -static BOOL PollCheckContact(HCONTACT hContact, const char *szProto)
 +static BOOL PollCheckContact(MCONTACT hContact, const char *szProto)
  {
  	return !db_get_b(hContact, "ContactPhoto", "Locked", 0) && FindAvatarInCache(hContact, FALSE, TRUE) != NULL;
  }
 -static void QueueRemove(HCONTACT hContact)
 +static void QueueRemove(MCONTACT hContact)
  {
  	mir_cslock lck(cs);
 @@ -124,7 +124,7 @@ static void QueueRemove(HCONTACT hContact)  	}
  }
 -static void QueueAdd(HCONTACT hContact, int waitTime)
 +static void QueueAdd(MCONTACT hContact, int waitTime)
  {
  	if (fei == NULL || g_shutDown)
  		return;
 @@ -143,12 +143,12 @@ static void QueueAdd(HCONTACT hContact, int waitTime)  }
  // Add an contact to a queue
 -void QueueAdd(HCONTACT hContact)
 +void QueueAdd(MCONTACT hContact)
  {
  	QueueAdd(hContact, waitTime);
  }
 -void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
 +void ProcessAvatarInfo(MCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *pai, const char *szProto)
  {
  	QueueRemove(hContact);
 @@ -202,7 +202,7 @@ void ProcessAvatarInfo(HCONTACT hContact, int type, PROTO_AVATAR_INFORMATIONT *p  	}
  }
 -int FetchAvatarFor(HCONTACT hContact, char *szProto)
 +int FetchAvatarFor(MCONTACT hContact, char *szProto)
  {
  	int result = GAIR_NOAVATAR;
 @@ -258,7 +258,7 @@ static void RequestThread(void *vParam)  		}
  		// Will request this item
 -		HCONTACT hContact = qi.hContact;
 +		MCONTACT hContact = qi.hContact;
  		queue.remove( queue.getCount()-1 );
  		QueueRemove(hContact);
  		LeaveCriticalSection(&cs);
 diff --git a/plugins/AVS/src/poll.h b/plugins/AVS/src/poll.h index 7b7924a9cf..a7db946467 100644 --- a/plugins/AVS/src/poll.h +++ b/plugins/AVS/src/poll.h @@ -23,7 +23,7 @@ Boston, MA 02111-1307, USA.  struct QueueItem
  {
 -	HCONTACT hContact;
 +	MCONTACT hContact;
  	DWORD check_time;
  };
 @@ -31,6 +31,6 @@ void InitPolls();  void UninitPolls();
  // Add an contact to a queue
 -void QueueAdd(HCONTACT hContact);
 +void QueueAdd(MCONTACT hContact);
  #endif // __POLL_H__
 diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index 85218de38b..b02f0e5d19 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -31,7 +31,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam)  	if (wParam == 0 || g_shutDown || fei == NULL)
  		return 0;
 -	HCONTACT hContact = (HCONTACT)wParam;
 +	MCONTACT hContact = (MCONTACT)wParam;
  	hContact = GetContactThatHaveTheAvatar(hContact);
  	// Get the node
 @@ -46,7 +46,7 @@ INT_PTR GetAvatarBitmap(WPARAM wParam, LPARAM lParam)  INT_PTR ProtectAvatar(WPARAM wParam, LPARAM lParam)
  {
 -	HCONTACT hContact = (HCONTACT)wParam;
 +	MCONTACT hContact = (MCONTACT)wParam;
  	BYTE was_locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
  	if (fei == NULL || was_locked == (BYTE)lParam)      // no need for redundant lockings...
 @@ -118,7 +118,7 @@ UINT_PTR CALLBACK OpenFileSubclass(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP  	return FALSE;
  }
 -static INT_PTR avSetAvatar(HCONTACT hContact, TCHAR *tszPath)
 +static INT_PTR avSetAvatar(MCONTACT hContact, TCHAR *tszPath)
  {
  	BYTE is_locked = 0;
  	TCHAR FileName[MAX_PATH], szBackupName[MAX_PATH];
 @@ -188,12 +188,12 @@ static INT_PTR avSetAvatar(HCONTACT hContact, TCHAR *tszPath)  INT_PTR SetAvatar(WPARAM wParam, LPARAM lParam)
  {
 -	return avSetAvatar((HCONTACT)wParam, _A2T((const char*)lParam));
 +	return avSetAvatar((MCONTACT)wParam, _A2T((const char*)lParam));
  }
  INT_PTR SetAvatarW(WPARAM wParam, LPARAM lParam)
  {
 -	return avSetAvatar((HCONTACT)wParam, (TCHAR*)lParam);
 +	return avSetAvatar((MCONTACT)wParam, (TCHAR*)lParam);
  }
  /*
 @@ -932,7 +932,7 @@ static void ReloadMyAvatar(LPVOID lpParam)  		if (g_MyAvatars[i].hbmPic)
  			DeleteObject(g_MyAvatars[i].hbmPic);
 -		if (CreateAvatarInCache((HCONTACT)-1, &g_MyAvatars[i], myAvatarProto) != -1)
 +		if (CreateAvatarInCache((MCONTACT)-1, &g_MyAvatars[i], myAvatarProto) != -1)
  			NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, (LPARAM)&g_MyAvatars[i]);
  		else
  			NotifyEventHooks(hMyAvatarChanged, (WPARAM)myAvatarProto, 0);
 diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index ed9e674750..35bebb621b 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -37,7 +37,7 @@ int _DebugTrace(const char *fmt, ...)  	return 0;
  }
 -int _DebugTrace(HCONTACT hContact, const char *fmt, ...)
 +int _DebugTrace(MCONTACT hContact, const char *fmt, ...)
  {
  	char text[1024];
  	size_t len;
 @@ -119,7 +119,7 @@ size_t AVS_pathToAbsolute(const TCHAR *pSrc, TCHAR *pOut)   * convert the avatar image path to a relative one...
   * given: contact handle, path to image
   */
 -void MakePathRelative(HCONTACT hContact, TCHAR *path)
 +void MakePathRelative(MCONTACT hContact, TCHAR *path)
  {
  	TCHAR szFinalPath[MAX_PATH];
  	szFinalPath[0] = '\0';
 @@ -137,7 +137,7 @@ void MakePathRelative(HCONTACT hContact, TCHAR *path)   * given: contact handle
   */
 -void MakePathRelative(HCONTACT hContact)
 +void MakePathRelative(MCONTACT hContact)
  {
  	DBVARIANT dbv;
  	if ( !db_get_ts(hContact, "ContactPhoto", "File", &dbv)) {
 @@ -148,7 +148,7 @@ void MakePathRelative(HCONTACT hContact)  // create the avatar in cache
  // returns 0 if not created (no avatar), iIndex otherwise, -2 if has to request avatar, -3 if avatar too big
 -int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)
 +int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
  {
  	DBVARIANT dbv = {0};
  	char *szExt = NULL;
 @@ -212,7 +212,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)  				}
  			}
  		}
 -		else if (hContact == (HCONTACT)-1) {	// create own picture - note, own avatars are not on demand, they are loaded once at
 +		else if (hContact == (MCONTACT)-1) {	// create own picture - note, own avatars are not on demand, they are loaded once at
  			// startup and everytime they are changed.
  			if (szProto[0] == '\0') {
  				// Global avatar
 @@ -274,7 +274,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)  		BOOL noTransparency = db_get_b(0, AVS_MODULE, "RemoveAllTransparency", 0);
  		// Calc image hash
 -		if (hContact != 0 && hContact != (HCONTACT)-1) {
 +		if (hContact != 0 && hContact != (MCONTACT)-1) {
  			// Have to reset settings? -> do it if image changed
  			DWORD imgHash = GetImgHash(ace->hbmPic);
  			if (imgHash != db_get_dw(hContact, "ContactPhoto", "ImageHash", 0)) {
 @@ -297,7 +297,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)  				}
  			}
  		}
 -		else if (hContact == (HCONTACT)-1) { // My avatars
 +		else if (hContact == (MCONTACT)-1) { // My avatars
  			if (!noTransparency && !isTransparentImage
  				&& db_get_b(0, AVS_MODULE, "MakeTransparentBkg", 0)
  				&& db_get_b(0, AVS_MODULE, "MakeMyAvatarsTransparent", 0))
 @@ -329,7 +329,7 @@ int CreateAvatarInCache(HCONTACT hContact, avatarCacheEntry *ace, char *szProto)  			protoPicCacheEntry *pAce = (protoPicCacheEntry *)ace;
  			if (hContact == 0)
  				pAce->dwFlags |= AVS_PROTOPIC;
 -			else if (hContact == (HCONTACT)-1)
 +			else if (hContact == (MCONTACT)-1)
  				pAce->dwFlags |= AVS_OWNAVATAR;
  		}
 @@ -493,7 +493,7 @@ BOOL Proto_IsFetchingWhenContactOfflineAllowed(const char *proto)  /////////////////////////////////////////////////////////////////////////////////////////
 -protoPicCacheEntry *GetProtoDefaultAvatar(HCONTACT hContact)
 +protoPicCacheEntry *GetProtoDefaultAvatar(MCONTACT hContact)
  {
  	char *szProto = GetContactProto(hContact);
  	if (szProto) {
 @@ -506,7 +506,7 @@ protoPicCacheEntry *GetProtoDefaultAvatar(HCONTACT hContact)  	return NULL;
  }
 -HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked)
 +MCONTACT GetContactThatHaveTheAvatar(MCONTACT hContact, int locked)
  {
  	if (g_MetaAvail && db_get_b(NULL, g_szMetaName, "Enabled", 0)) {
  		if (db_get_dw(hContact, g_szMetaName, "NumContacts", 0) >= 1) {
 @@ -514,13 +514,13 @@ HCONTACT GetContactThatHaveTheAvatar(HCONTACT hContact, int locked)  				locked = db_get_b(hContact, "ContactPhoto", "Locked", 0);
  			if (!locked)
 -				hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
 +				hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
  		}
  	}
  	return hContact;
  }
 -int ChangeAvatar(HCONTACT hContact, BOOL fLoad, BOOL fNotifyHist, int pa_format)
 +int ChangeAvatar(MCONTACT hContact, BOOL fLoad, BOOL fNotifyHist, int pa_format)
  {
  	if (g_shutDown)
  		return 0;
  | 
