diff options
| author | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 | 
|---|---|---|
| committer | George Hazan <george.hazan@gmail.com> | 2014-02-10 08:04:30 +0000 | 
| commit | ddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch) | |
| tree | 5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/WhenWasIt | |
| parent | c39340bf493a1745a41317bbf937fc7eb6cbb26a (diff) | |
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts
git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/WhenWasIt')
| -rw-r--r-- | plugins/WhenWasIt/src/birthdays.cpp | 10 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/birthdays.h | 12 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/date_utils.cpp | 8 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/date_utils.h | 8 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/dlg_handlers.cpp | 25 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/hooked_events.cpp | 4 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/notifiers.cpp | 10 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/notifiers.h | 12 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/services.cpp | 12 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/services.h | 4 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/utils.cpp | 14 | ||||
| -rw-r--r-- | plugins/WhenWasIt/src/utils.h | 10 | 
12 files changed, 64 insertions, 65 deletions
| diff --git a/plugins/WhenWasIt/src/birthdays.cpp b/plugins/WhenWasIt/src/birthdays.cpp index a99ed2e868..d3615a06f9 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(HANDLE hContact, HANDLE hClistIcon)
 +int CBirthdays::Add(HCONTACT hContact, HANDLE hClistIcon)
  {
  	if ( !Contains(hContact)) {
  		EnsureCapacity();
 @@ -107,12 +107,12 @@ int CBirthdays::Remove(int index)  	return -1;
  }
 -int CBirthdays::Remove(HANDLE hContact)
 +int CBirthdays::Remove(HCONTACT hContact)
  {
  	return Remove( Index(hContact));
  }
 -int CBirthdays::Contains(HANDLE hContact) const
 +int CBirthdays::Contains(HCONTACT hContact) const
  {
  	for (int i = 0; i < count; i++)
  		if (birthdays[i]->hContact == hContact)
 @@ -121,7 +121,7 @@ int CBirthdays::Contains(HANDLE hContact) const  	return FALSE;
  }
 -int CBirthdays::Index(HANDLE hContact) const
 +int CBirthdays::Index(HCONTACT 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(HANDLE hContact) const
 +HANDLE CBirthdays::GetClistIcon(HCONTACT 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 c54042800c..f42b8dc09c 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{
 -	HANDLE hContact;
 +	HCONTACT hContact;
  	HANDLE hClistIcon;
  };
 @@ -45,19 +45,19 @@ class CBirthdays  		CBirthdays(int initialSize = 10);
  		~CBirthdays();
 -		int Add(HANDLE hContact, HANDLE hClistIcon);
 +		int Add(HCONTACT hContact, HANDLE hClistIcon);
  		int Remove(int index);
 -		int Remove(HANDLE hContact);
 +		int Remove(HCONTACT hContact);
  		void Clear();
  		void Destroy();
 -		int Index(HANDLE hContact) const;
 -		int Contains(HANDLE hContact) const;
 +		int Index(HCONTACT hContact) const;
 +		int Contains(HCONTACT hContact) const;
  		void SetAdvancedIconIndex(int advIcon);
  		int GetAdvancedIconIndex() const;
 -		HANDLE GetClistIcon(HANDLE hContact) const;
 +		HANDLE GetClistIcon(HCONTACT 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 6c510da4ae..863371eead 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(HANDLE hContact, int &year, int &month, int &day)
 +int GetContactDOB(HCONTACT 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(HANDLE hContact, int &year, int &month, int &day)  	return DOB_UNKNOWN;
  }
 -int GetContactAge(HANDLE hContact)
 +int GetContactAge(HCONTACT hContact)
  {
  	int year, month, day;
  	time_t tNow;
 @@ -79,7 +79,7 @@ int GetContactAge(HANDLE hContact)  	return (now->tm_year + 1900) - year;
  }
 -char GetContactGender(HANDLE hContact)
 +char GetContactGender(HCONTACT 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(HANDLE hContact, int year, int month, int day, int mode)
 +int SaveBirthday(HCONTACT 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 6b4cfcc7f2..db69702729 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(HANDLE hContact);
 -int GetContactDOB(HANDLE hContact, int &year, int &month, int &day);
 -char GetContactGender(HANDLE hContact);
 +int GetContactAge(HCONTACT hContact);
 +int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day);
 +char GetContactGender(HCONTACT hContact);
 -int SaveBirthday(HANDLE hContact, int year, int month, int day, int mode);
 +int SaveBirthday(HCONTACT 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 ddbe9fa6b8..dfbd581dd5 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:
  			{
 -				HANDLE hContact = db_find_first();
 +				HCONTACT hContact = db_find_first();
  				int dtb = rand() % 11; //0..10
  				int age = rand() % 50 + 1; //1..50
  				PopupNotifyBirthday(hContact, dtb, age);
 @@ -391,15 +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)
  {
 -	HANDLE hContact = (HANDLE)GetWindowLongPtr(hWnd, GWLP_USERDATA);
 +	HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
  	switch (msg) {
  	case WM_INITDIALOG:
  		TranslateDialogDefault(hWnd);
  		SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam);
 -		
  		{
 -			HANDLE hContact = (HANDLE) lParam;
 +			HCONTACT hContact = (HCONTACT)lParam;
  			WindowList_Add(hAddBirthdayWndsList, hWnd, hContact);
  			Utils_RestoreWindowPositionNoSize(hWnd,hContact,ModuleName,"BirthdayWnd");
  		}
 @@ -490,7 +489,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l  		case IDOK:
  			{
  				SYSTEMTIME st;
 -				HANDLE hContact = (HANDLE) GetWindowLongPtr(hWnd, GWLP_USERDATA);
 +				HCONTACT hContact = (HCONTACT)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
 @@ -520,7 +519,7 @@ void AddAnchorWindowToDeferList(HDWP &hdWnds, HWND window, RECT *rParent, WINDOW  #define NA TranslateT("N/A")
 -TCHAR *GetBirthdayModule(int module, HANDLE hContact)
 +TCHAR *GetBirthdayModule(int module, HCONTACT hContact)
  {
  	switch (module) {
  		case DOB_MBIRTHDAY:        return _T("mBirthday");
 @@ -570,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, HANDLE hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
 +int UpdateBirthdayEntry(HWND hList, HCONTACT hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
  {
  	int currentMonth, currentDay;
  	int res = entry;
 @@ -656,14 +655,14 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP  	case WM_LBUTTONDBLCLK:
  		{
  			int count = ListView_GetItemCount(hWnd);
 -			HANDLE hContact;
 +			HCONTACT 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 = (HANDLE) item.lParam;
 +					hContact = (HCONTACT)item.lParam;
  					CallService(MS_WWI_ADD_BIRTHDAY, (WPARAM) hContact, 0);
  				}
  			}
 @@ -687,7 +686,7 @@ int LoadBirthdays(HWND hWnd, int bShowAll)  	ListView_DeleteAllItems(hList);
  	int count = 0;
 -	for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
 +	for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
  		count = UpdateBirthdayEntry(hList, hContact, count, bShowAll, commonData.cShowAgeMode, 1); 
  	SetBirthdaysCount(hWnd);
 @@ -747,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);
 -			HANDLE hContact = (HANDLE) wParam;
 +			HCONTACT hContact = (HCONTACT)wParam;
  			int i;
  			int count = ListView_GetItemCount(hList);
  			//int bShowCurrentAge = db_get_b(NULL, ModuleName, "ShowCurrentAge", 0);
 @@ -939,7 +938,7 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar  DWORD WINAPI OpenMessageWindowThread(void *data)
  {
 -	HANDLE hContact = (HANDLE) data;
 +	HCONTACT hContact = (HCONTACT)data;
  	CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM) hContact, 0);
  	CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM) hContact, 0);
  	return 0;
 @@ -950,7 +949,7 @@ int HandlePopupClick(HWND hWnd, int action)  	switch (action) {
  	case 2: //OPEN MESSAGE WINDOW
  		{
 -			HANDLE hContact = (HANDLE) PUGetContact(hWnd);
 +			HCONTACT hContact = (HCONTACT)PUGetContact(hWnd);
  			if (hContact) {
  				DWORD threadID;
  				HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, hContact, 0, &threadID);
 diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 9cf7266433..98793832d5 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((HANDLE)wParam);
 +		RefreshContactListIcons((HCONTACT)wParam);
  	return 0;
  }
 @@ -152,7 +152,7 @@ int UnhookEvents()  /////////////////////////////////////////////////////////////////////////////////////////
 -int RefreshContactListIcons(HANDLE hContact)
 +int RefreshContactListIcons(HCONTACT hContact)
  {
  	if (hContact == 0)
  		return 0;
 diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 98dbef5e6f..b759b405df 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -64,7 +64,7 @@ TCHAR *BuildDABText(int dab, TCHAR *name, TCHAR *text, int size)  	return text;
  }
 -int PopupNotifyBirthday(HANDLE hContact, int dtb, int age)
 +int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age)
  {
  	TCHAR *name = GetContactName(hContact, NULL);
  	const int MAX_SIZE = 1024;
 @@ -111,7 +111,7 @@ int PopupNotifyBirthday(HANDLE hContact, int dtb, int age)  	return 0;
  }
 -int PopupNotifyMissedBirthday(HANDLE hContact, int dab, int age)
 +int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
  {
  	TCHAR *name = GetContactName(hContact, NULL);
  	const int MAX_SIZE = 1024;
 @@ -155,7 +155,7 @@ int PopupNotifyMissedBirthday(HANDLE hContact, int dab, int age)  	return 0;
  }
 -int DialogNotifyBirthday(HANDLE hContact, int dtb, int age)
 +int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age)
  {
  	TCHAR *name = GetContactName(hContact, NULL);
  	const int MAX_SIZE = 1024;
 @@ -181,7 +181,7 @@ int DialogNotifyBirthday(HANDLE hContact, int dtb, int age)  	return 0;
  }
 -int DialogNotifyMissedBirthday(HANDLE hContact, int dab, int age)
 +int DialogNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
  {
  	TCHAR *name = GetContactName(hContact, NULL);
  	const int MAX_SIZE = 1024;
 @@ -221,7 +221,7 @@ int SoundNotifyBirthday(int dtb)  //called with oldClistIcon != -1 from dlg_handlers whtn the extra icon slot changes.
  int RefreshAllContactListIcons(int oldClistIcon)
  {
 -	for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
 +	for (HCONTACT 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 344774ce02..598421078b 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{
 -	HANDLE hContact;
 +	HCONTACT hContact;
  	TCHAR *name;
  	TCHAR *message;
  	int dtb;
 @@ -40,13 +40,13 @@ struct TUpcomingBirthday{  typedef TUpcomingBirthday *PUpcomingBirthday;
  void PopupNotifyNoBirthdays();
 -int  PopupNotifyBirthday(HANDLE hContact, int dtb, int age);
 -int  PopupNotifyMissedBirthday(HANDLE hContact, int dab, int age);
 -int  DialogNotifyBirthday(HANDLE hContact, int dtb, int age);
 -int  DialogNotifyMissedBirthday(HANDLE hContact, int dab, int age);
 +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  SoundNotifyBirthday(int dtb);
 -int  RefreshContactListIcons(HANDLE hContact);
 +int  RefreshContactListIcons(HCONTACT 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 5ad63f93d4..c86a52c81b 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(HANDLE hContact, time_t now, int daysInAdvance)
 +int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance)
  {
  	int year, month, day;
  	GetContactDOB(hContact, year, month, day);
 @@ -100,7 +100,7 @@ int NotifyContactBirthday(HANDLE hContact, time_t now, int daysInAdvance)  // returns -1 if notify is not necessary
  // returns daysAfterBirthday if it should notify
 -int NotifyMissedContactBirthday(HANDLE hContact, time_t now, int daysAfter)
 +int NotifyMissedContactBirthday(HCONTACT 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)
  {
 -	HANDLE hContact = (HANDLE) wParam;
 +	HCONTACT hContact = (HCONTACT)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;
 -	HANDLE hContact = db_find_first();
 +	HCONTACT 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;
 -				HANDLE hContact = GetContactFromID(szHandle, szProto);
 +				HCONTACT 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 (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
 +	for (HCONTACT 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 5bc19aca3f..437cc93f73 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(HANDLE hContact, time_t now, int daysInAdvance);
 -int NotifyMissedContactBirthday(HANDLE hContact, time_t now, int daysAfter);
 +int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance);
 +int NotifyMissedContactBirthday(HCONTACT 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 a2f2bb6ade..f09f9ffdca 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(HANDLE hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
 +int GetStringFromDatabase(HCONTACT 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(HANDLE hContact, char *szProto)
 +TCHAR *GetContactName(HCONTACT hContact, char *szProto)
  {
  	CONTACTINFO ctInfo = { sizeof(ctInfo) };
  	ctInfo.szProto = (szProto) ? szProto : GetContactProto(hContact);
 @@ -176,12 +176,12 @@ TCHAR *GetContactName(HANDLE hContact, char *szProto)  	return buffer;
  }
 -TCHAR *GetContactID(HANDLE hContact)
 +TCHAR *GetContactID(HCONTACT hContact)
  {
  	return GetContactID(hContact, GetContactProto(hContact));
  }
 -TCHAR *GetContactID(HANDLE hContact, char *szProto)
 +TCHAR *GetContactID(HCONTACT hContact, char *szProto)
  {
  	CONTACTINFO ctInfo = { sizeof(ctInfo) };
  	ctInfo.szProto = szProto;
 @@ -217,9 +217,9 @@ TCHAR *GetContactID(HANDLE hContact, char *szProto)  	return (!ret) ? buffer : NULL;
  }
 -HANDLE GetContactFromID(TCHAR *szID, char *szProto)
 +HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
  {
 -	for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
 +	for (HCONTACT 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 @@ HANDLE GetContactFromID(TCHAR *szID, char *szProto)  	return NULL;
  }
 -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto)
 +HCONTACT 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 6468ab63bc..022b79b117 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(HANDLE hContact, char *szProto);
 -TCHAR *GetContactID(HANDLE hContact);
 -TCHAR *GetContactID(HANDLE hContact, char *szProto);
 -HANDLE GetContactFromID(TCHAR *szID, char *szProto);
 -HANDLE GetContactFromID(TCHAR *szID, wchar_t *szProto);
 +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);
  #endif
\ No newline at end of file | 
