diff options
Diffstat (limited to 'plugins/WhenWasIt/src')
-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 | 26 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/hooked_events.cpp | 4 | ||||
-rw-r--r-- | plugins/WhenWasIt/src/notifiers.cpp | 14 | ||||
-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, 67 insertions, 67 deletions
diff --git a/plugins/WhenWasIt/src/birthdays.cpp b/plugins/WhenWasIt/src/birthdays.cpp index d3615a06f9..ccea05193f 100644 --- a/plugins/WhenWasIt/src/birthdays.cpp +++ b/plugins/WhenWasIt/src/birthdays.cpp @@ -82,7 +82,7 @@ void CBirthdays::Realloc(int increaseCapacity) birthdays = (PBirthdayContact *) realloc(birthdays, size * sizeof(PBirthdayContact));
}
-int CBirthdays::Add(HCONTACT hContact, HANDLE hClistIcon)
+int CBirthdays::Add(MCONTACT hContact, HANDLE hClistIcon)
{
if ( !Contains(hContact)) {
EnsureCapacity();
@@ -107,12 +107,12 @@ int CBirthdays::Remove(int index) return -1;
}
-int CBirthdays::Remove(HCONTACT hContact)
+int CBirthdays::Remove(MCONTACT hContact)
{
return Remove( Index(hContact));
}
-int CBirthdays::Contains(HCONTACT hContact) const
+int CBirthdays::Contains(MCONTACT hContact) const
{
for (int i = 0; i < count; i++)
if (birthdays[i]->hContact == hContact)
@@ -121,7 +121,7 @@ int CBirthdays::Contains(HCONTACT hContact) const return FALSE;
}
-int CBirthdays::Index(HCONTACT hContact) const
+int CBirthdays::Index(MCONTACT hContact) const
{
for (int i = 0; i < count; i++)
if (birthdays[i]->hContact == hContact)
@@ -140,7 +140,7 @@ int CBirthdays::GetAdvancedIconIndex() const return advancedIcon;
}
-HANDLE CBirthdays::GetClistIcon(HCONTACT hContact) const
+HANDLE CBirthdays::GetClistIcon(MCONTACT hContact) const
{
int index = Index(hContact);
if ((index >= 0) && (index < count))
diff --git a/plugins/WhenWasIt/src/birthdays.h b/plugins/WhenWasIt/src/birthdays.h index f42b8dc09c..8336feaaf8 100644 --- a/plugins/WhenWasIt/src/birthdays.h +++ b/plugins/WhenWasIt/src/birthdays.h @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define M_WWI_BIRTHDAYS_H
struct TBirthdayContact{
- HCONTACT hContact;
+ MCONTACT hContact;
HANDLE hClistIcon;
};
@@ -45,19 +45,19 @@ class CBirthdays CBirthdays(int initialSize = 10);
~CBirthdays();
- int Add(HCONTACT hContact, HANDLE hClistIcon);
+ int Add(MCONTACT hContact, HANDLE hClistIcon);
int Remove(int index);
- int Remove(HCONTACT hContact);
+ int Remove(MCONTACT hContact);
void Clear();
void Destroy();
- int Index(HCONTACT hContact) const;
- int Contains(HCONTACT hContact) const;
+ int Index(MCONTACT hContact) const;
+ int Contains(MCONTACT hContact) const;
void SetAdvancedIconIndex(int advIcon);
int GetAdvancedIconIndex() const;
- HANDLE GetClistIcon(HCONTACT hContact) const;
+ HANDLE GetClistIcon(MCONTACT hContact) const;
int Count() const;
int Size() const;
diff --git a/plugins/WhenWasIt/src/date_utils.cpp b/plugins/WhenWasIt/src/date_utils.cpp index 863371eead..c10fdfe56b 100644 --- a/plugins/WhenWasIt/src/date_utils.cpp +++ b/plugins/WhenWasIt/src/date_utils.cpp @@ -33,7 +33,7 @@ bool IsDOBValid(int year, int month, int day) return (year != 0 && month != 0 && day != 0);
}
-int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day)
+int GetContactDOB(MCONTACT hContact, int &year, int &month, int &day)
{
year = db_get_w(hContact, "UserInfo", "DOBy", 0);
month = db_get_b(hContact, "UserInfo", "DOBm", 0);
@@ -69,7 +69,7 @@ int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day) return DOB_UNKNOWN;
}
-int GetContactAge(HCONTACT hContact)
+int GetContactAge(MCONTACT hContact)
{
int year, month, day;
time_t tNow;
@@ -79,7 +79,7 @@ int GetContactAge(HCONTACT hContact) return (now->tm_year + 1900) - year;
}
-char GetContactGender(HCONTACT hContact)
+char GetContactGender(MCONTACT hContact)
{
char gender = db_get_b(hContact, "UserInfo", "Gender", 'U');
if (gender == 'U')
@@ -185,7 +185,7 @@ void FillStandard(char *&module, char *&sYear, char *&sMonth, char *&sDay) sDay = "DOBd";
}
-int SaveBirthday(HCONTACT hContact, int year, int month, int day, int mode)
+int SaveBirthday(MCONTACT hContact, int year, int month, int day, int mode)
{
char *sModule, *sdModule, *sd2Module; //s* = keep, sd* = delete, sd2* = delete
char *sYear, *sdYear, *sd2Year;
diff --git a/plugins/WhenWasIt/src/date_utils.h b/plugins/WhenWasIt/src/date_utils.h index db69702729..d0f5d171dc 100644 --- a/plugins/WhenWasIt/src/date_utils.h +++ b/plugins/WhenWasIt/src/date_utils.h @@ -42,10 +42,10 @@ bool IsDOBValid(int year, int month, int day); unsigned int DaysToBirthday(time_t now, int ctYear, int ctMonth, int ctDay);
int DaysAfterBirthday(time_t now, int ctYear, int ctMonth, int ctDay);
-int GetContactAge(HCONTACT hContact);
-int GetContactDOB(HCONTACT hContact, int &year, int &month, int &day);
-char GetContactGender(HCONTACT hContact);
+int GetContactAge(MCONTACT hContact);
+int GetContactDOB(MCONTACT hContact, int &year, int &month, int &day);
+char GetContactGender(MCONTACT hContact);
-int SaveBirthday(HCONTACT hContact, int year, int month, int day, int mode);
+int SaveBirthday(MCONTACT hContact, int year, int month, int day, int mode);
#endif //H_WWI_DATE_UTILS_H
\ No newline at end of file diff --git a/plugins/WhenWasIt/src/dlg_handlers.cpp b/plugins/WhenWasIt/src/dlg_handlers.cpp index a38258c5c8..ff123eed26 100644 --- a/plugins/WhenWasIt/src/dlg_handlers.cpp +++ b/plugins/WhenWasIt/src/dlg_handlers.cpp @@ -272,7 +272,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara case IDC_PREVIEW:
{
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
int dtb = rand() % 11; //0..10
int age = rand() % 50 + 1; //1..50
PopupNotifyBirthday(hContact, dtb, age);
@@ -391,14 +391,14 @@ INT_PTR CALLBACK DlgProcOptions(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPara INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
switch (msg) {
case WM_INITDIALOG:
TranslateDialogDefault(hWnd);
SetWindowLongPtr(hWnd, GWLP_USERDATA, lParam);
{
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
WindowList_Add(hAddBirthdayWndsList, hWnd, hContact);
Utils_RestoreWindowPositionNoSize(hWnd,hContact,ModuleName,"BirthdayWnd");
}
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgProcAddBirthday(HWND hWnd, UINT msg, WPARAM wParam, LPARAM l case IDOK:
{
SYSTEMTIME st;
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hWnd, GWLP_USERDATA);
HWND hDate = GetDlgItem(hWnd, IDC_DATE);
if (DateTime_GetSystemtime(hDate, &st) == GDT_VALID) {
int mode = SendMessage(GetDlgItem(hWnd, IDC_COMPATIBILITY), CB_GETCURSEL, 0, 0); //SAVE modes in date_utils.h are synced
@@ -519,7 +519,7 @@ void AddAnchorWindowToDeferList(HDWP &hdWnds, HWND window, RECT *rParent, WINDOW #define NA TranslateT("N/A")
-TCHAR *GetBirthdayModule(int module, HCONTACT hContact)
+TCHAR *GetBirthdayModule(int module, MCONTACT hContact)
{
switch (module) {
case DOB_MBIRTHDAY: return _T("mBirthday");
@@ -569,7 +569,7 @@ INT_PTR CALLBACK BirthdaysCompare(LPARAM lParam1, LPARAM lParam2, LPARAM myParam }
//only updates the birthday part of the list view entry. Won't update the szProto and the contact name (those shouldn't change anyway :))
-int UpdateBirthdayEntry(HWND hList, HCONTACT hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
+int UpdateBirthdayEntry(HWND hList, MCONTACT hContact, int entry, int bShowAll, int bShowCurrentAge, int bAdd)
{
int currentMonth, currentDay;
int res = entry;
@@ -655,14 +655,14 @@ static LRESULT CALLBACK BirthdaysListSubclassProc(HWND hWnd, UINT msg, WPARAM wP case WM_LBUTTONDBLCLK:
{
int count = ListView_GetItemCount(hWnd);
- HCONTACT hContact;
+ MCONTACT hContact;
LVITEM item = {0};
item.mask = LVIF_PARAM;
for (int i = 0; i < count; i++) {
if (ListView_GetItemState(hWnd, i, LVIS_SELECTED)) {
item.iItem = i;
ListView_GetItem(hWnd, &item);
- hContact = (HCONTACT)item.lParam;
+ hContact = (MCONTACT)item.lParam;
CallService(MS_WWI_ADD_BIRTHDAY, (WPARAM) hContact, 0);
}
}
@@ -686,7 +686,7 @@ int LoadBirthdays(HWND hWnd, int bShowAll) ListView_DeleteAllItems(hList);
int count = 0;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
count = UpdateBirthdayEntry(hList, hContact, count, bShowAll, commonData.cShowAgeMode, 1);
SetBirthdaysCount(hWnd);
@@ -746,7 +746,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa case WWIM_UPDATE_BIRTHDAY:
{//wParam = hContact
HWND hList = GetDlgItem(hWnd, IDC_BIRTHDAYS_LIST);
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
int i;
int count = ListView_GetItemCount(hList);
//int bShowCurrentAge = db_get_b(NULL, ModuleName, "ShowCurrentAge", 0);
@@ -757,7 +757,7 @@ INT_PTR CALLBACK DlgProcBirthdays(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPa for (i = 0; (i < count) && (!found); i++) {
item.iItem = i;
ListView_GetItem(hList, &item);
- if (hContact == (HCONTACT)item.lParam) {
+ if (hContact == (MCONTACT)item.lParam) {
UpdateBirthdayEntry(hList, hContact, i, IsDlgButtonChecked(hWnd, IDC_SHOW_ALL), commonData.cShowAgeMode, 0);
found = 1;
}
@@ -938,7 +938,7 @@ INT_PTR CALLBACK DlgProcUpcoming(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lPar DWORD WINAPI OpenMessageWindowThread(void *data)
{
- HCONTACT hContact = (HCONTACT)data;
+ MCONTACT hContact = (MCONTACT)data;
CallServiceSync(MS_MSG_SENDMESSAGE, (WPARAM)hContact, 0);
CallServiceSync("SRMsg/LaunchMessageWindow", (WPARAM)hContact, 0);
return 0;
@@ -949,7 +949,7 @@ int HandlePopupClick(HWND hWnd, int action) switch (action) {
case 2: //OPEN MESSAGE WINDOW
{
- HCONTACT hContact = (HCONTACT)PUGetContact(hWnd);
+ MCONTACT hContact = (MCONTACT)PUGetContact(hWnd);
if (hContact) {
DWORD threadID;
HANDLE thread = CreateThread(NULL, NULL, OpenMessageWindowThread, (void*)hContact, 0, &threadID);
diff --git a/plugins/WhenWasIt/src/hooked_events.cpp b/plugins/WhenWasIt/src/hooked_events.cpp index 98793832d5..94f2f3a355 100644 --- a/plugins/WhenWasIt/src/hooked_events.cpp +++ b/plugins/WhenWasIt/src/hooked_events.cpp @@ -68,7 +68,7 @@ static int OnContactSettingChanged(WPARAM wParam, LPARAM lParam) DBCONTACTWRITESETTING *dw = (DBCONTACTWRITESETTING *) lParam;
DBVARIANT dv = dw->value;
if ((strcmp(dw->szModule, DUMMY_MODULE) == 0) && (strcmp(dw->szSetting, DUMMY_SETTING) == 0))
- RefreshContactListIcons((HCONTACT)wParam);
+ RefreshContactListIcons((MCONTACT)wParam);
return 0;
}
@@ -152,7 +152,7 @@ int UnhookEvents() /////////////////////////////////////////////////////////////////////////////////////////
-int RefreshContactListIcons(HCONTACT hContact)
+int RefreshContactListIcons(MCONTACT hContact)
{
if (hContact == 0)
return 0;
diff --git a/plugins/WhenWasIt/src/notifiers.cpp b/plugins/WhenWasIt/src/notifiers.cpp index 267b6bd8d7..71e701dc7b 100644 --- a/plugins/WhenWasIt/src/notifiers.cpp +++ b/plugins/WhenWasIt/src/notifiers.cpp @@ -64,14 +64,14 @@ TCHAR *BuildDABText(int dab, TCHAR *name, TCHAR *text, int size) return text;
}
-int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age)
+int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
TCHAR text[MAX_SIZE];
//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
if (commonData.bIgnoreSubcontacts) {
- HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
+ MCONTACT hMetacontact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
if ((hMetacontact) && (hMetacontact != hContact)) //not main metacontact
return 0;
}
@@ -108,14 +108,14 @@ int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age) return 0;
}
-int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
+int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
TCHAR text[MAX_SIZE];
//int bIgnoreSubcontacts = db_get_b(NULL, ModuleName, "IgnoreSubcontacts", FALSE);
if (commonData.bIgnoreSubcontacts) {
- HCONTACT hMetacontact = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
+ MCONTACT hMetacontact = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
if (hMetacontact && hMetacontact != hContact) //not main metacontact
return 0;
}
@@ -152,7 +152,7 @@ int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age) return 0;
}
-int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age)
+int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
@@ -178,7 +178,7 @@ int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age) return 0;
}
-int DialogNotifyMissedBirthday(HCONTACT hContact, int dab, int age)
+int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age)
{
TCHAR *name = GetContactName(hContact, NULL);
const int MAX_SIZE = 1024;
@@ -218,7 +218,7 @@ int SoundNotifyBirthday(int dtb) //called with oldClistIcon != -1 from dlg_handlers whtn the extra icon slot changes.
int RefreshAllContactListIcons(int oldClistIcon)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (oldClistIcon != -1)
ExtraIcon_Clear(hWWIExtraIcons, hContact);
diff --git a/plugins/WhenWasIt/src/notifiers.h b/plugins/WhenWasIt/src/notifiers.h index 598421078b..7fbeb682c3 100644 --- a/plugins/WhenWasIt/src/notifiers.h +++ b/plugins/WhenWasIt/src/notifiers.h @@ -30,7 +30,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #define DUMMY_SETTING "refreshIconsDummyVal"
struct TUpcomingBirthday{
- HCONTACT hContact;
+ MCONTACT hContact;
TCHAR *name;
TCHAR *message;
int dtb;
@@ -40,13 +40,13 @@ struct TUpcomingBirthday{ typedef TUpcomingBirthday *PUpcomingBirthday;
void PopupNotifyNoBirthdays();
-int PopupNotifyBirthday(HCONTACT hContact, int dtb, int age);
-int PopupNotifyMissedBirthday(HCONTACT hContact, int dab, int age);
-int DialogNotifyBirthday(HCONTACT hContact, int dtb, int age);
-int DialogNotifyMissedBirthday(HCONTACT hContact, int dab, int age);
+int PopupNotifyBirthday(MCONTACT hContact, int dtb, int age);
+int PopupNotifyMissedBirthday(MCONTACT hContact, int dab, int age);
+int DialogNotifyBirthday(MCONTACT hContact, int dtb, int age);
+int DialogNotifyMissedBirthday(MCONTACT hContact, int dab, int age);
int SoundNotifyBirthday(int dtb);
-int RefreshContactListIcons(HCONTACT hContact);
+int RefreshContactListIcons(MCONTACT hContact);
int RefreshAllContactListIcons(int oldClistIcon = -1);
#endif //M_WWI_NOTIFIERS_H
\ No newline at end of file diff --git a/plugins/WhenWasIt/src/services.cpp b/plugins/WhenWasIt/src/services.cpp index c86a52c81b..79dd45688f 100644 --- a/plugins/WhenWasIt/src/services.cpp +++ b/plugins/WhenWasIt/src/services.cpp @@ -87,7 +87,7 @@ int DestroyServices() returns -1 if notify is not necesarry
returns daysToBirthday if it should notify
*/
-int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance)
+int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance)
{
int year, month, day;
GetContactDOB(hContact, year, month, day);
@@ -100,7 +100,7 @@ int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance) // returns -1 if notify is not necessary
// returns daysAfterBirthday if it should notify
-int NotifyMissedContactBirthday(HCONTACT hContact, time_t now, int daysAfter)
+int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter)
{
if (daysAfter > 0)
{
@@ -169,7 +169,7 @@ INT_PTR ShowListService(WPARAM wParam, LPARAM lParam) INT_PTR AddBirthdayService(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hWnd = WindowList_Find(hAddBirthdayWndsList, hContact);
if ( !hWnd) {
hWnd = CreateDialogParam(hInstance, MAKEINTRESOURCE(IDD_ADD_BIRTHDAY), NULL, DlgProcAddBirthday, (LPARAM) hContact);
@@ -194,7 +194,7 @@ DWORD WINAPI RefreshUserDetailsWorkerThread(LPVOID param) int delay = db_get_w(NULL, ModuleName, "UpdateDelay", REFRESH_DETAILS_DELAY);
int res;
- HCONTACT hContact = db_find_first();
+ MCONTACT hContact = db_find_first();
while (hContact != NULL) {
res = CallContactService(hContact, PSS_GETINFO, 0, 0);
hContact = db_find_next(hContact);
@@ -301,7 +301,7 @@ int DoImport(TCHAR *fileName) TCHAR *szHandle = buffer;
TCHAR *szProto = delProto + 1;
- HCONTACT hContact = GetContactFromID(szHandle, szProto);
+ MCONTACT hContact = GetContactFromID(szHandle, szProto);
if (hContact) {
delProto[0] = tmp;
delAccount[0] = tmp;
@@ -334,7 +334,7 @@ int DoExport(TCHAR *fileName) _ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("Warning! Please do not mix Unicode and Ansi exported birthday files. You should use the same version (Ansi/Unicode) of WhenWasIt that was used to export the info.\n"));
_ftprintf(fout, _T("%c%s"), _T(COMMENT_CHAR), TranslateT("This file was exported with a Unicode version of WhenWasIt. Please only use a Unicode version of the plugin to import the birthdays.\n"));
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int year, month, day;
GetContactDOB(hContact, year, month, day);
if ( IsDOBValid(year, month, day)) {
diff --git a/plugins/WhenWasIt/src/services.h b/plugins/WhenWasIt/src/services.h index 437cc93f73..d4c19194a1 100644 --- a/plugins/WhenWasIt/src/services.h +++ b/plugins/WhenWasIt/src/services.h @@ -42,8 +42,8 @@ extern int bBirthdayFound; int InitServices();
int DestroyServices();
-int NotifyContactBirthday(HCONTACT hContact, time_t now, int daysInAdvance);
-int NotifyMissedContactBirthday(HCONTACT hContact, time_t now, int daysAfter);
+int NotifyContactBirthday(MCONTACT hContact, time_t now, int daysInAdvance);
+int NotifyMissedContactBirthday(MCONTACT hContact, time_t now, int daysAfter);
int DoExport(TCHAR *fileName);
int DoImport(TCHAR *fileName);
diff --git a/plugins/WhenWasIt/src/utils.cpp b/plugins/WhenWasIt/src/utils.cpp index f09f9ffdca..ec04582ed2 100644 --- a/plugins/WhenWasIt/src/utils.cpp +++ b/plugins/WhenWasIt/src/utils.cpp @@ -118,7 +118,7 @@ void HexToBin(char *inData, ULONG &size, LPBYTE &outData) i = size;
}
-int GetStringFromDatabase(HCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
+int GetStringFromDatabase(MCONTACT hContact, char *szModule, char *szSettingName, char *szError, char *szResult, size_t size)
{
DBVARIANT dbv = {0};
int res = 1;
@@ -156,7 +156,7 @@ int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, si #pragma warning (disable: 4312)
-TCHAR *GetContactName(HCONTACT hContact, char *szProto)
+TCHAR *GetContactName(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo = { sizeof(ctInfo) };
ctInfo.szProto = (szProto) ? szProto : GetContactProto(hContact);
@@ -176,12 +176,12 @@ TCHAR *GetContactName(HCONTACT hContact, char *szProto) return buffer;
}
-TCHAR *GetContactID(HCONTACT hContact)
+TCHAR *GetContactID(MCONTACT hContact)
{
return GetContactID(hContact, GetContactProto(hContact));
}
-TCHAR *GetContactID(HCONTACT hContact, char *szProto)
+TCHAR *GetContactID(MCONTACT hContact, char *szProto)
{
CONTACTINFO ctInfo = { sizeof(ctInfo) };
ctInfo.szProto = szProto;
@@ -217,9 +217,9 @@ TCHAR *GetContactID(HCONTACT hContact, char *szProto) return (!ret) ? buffer : NULL;
}
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *m_szProto = GetContactProto(hContact);
TCHAR *szHandle = GetContactID(hContact, szProto);
if (szHandle) {
@@ -232,7 +232,7 @@ HCONTACT GetContactFromID(TCHAR *szID, char *szProto) return NULL;
}
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto)
{
char protocol[1024];
WideCharToMultiByte(CP_ACP, 0, szProto, -1, protocol, sizeof(protocol), NULL, NULL);
diff --git a/plugins/WhenWasIt/src/utils.h b/plugins/WhenWasIt/src/utils.h index 022b79b117..ce7001b6dd 100644 --- a/plugins/WhenWasIt/src/utils.h +++ b/plugins/WhenWasIt/src/utils.h @@ -44,10 +44,10 @@ RECT AnchorCalcPos(HWND window, const RECT *rParent, const WINDOWPOS *parentPos, int GetStringFromDatabase(char *szSettingName, char *szError, char *szResult, int size);
-TCHAR *GetContactName(HCONTACT hContact, char *szProto);
-TCHAR *GetContactID(HCONTACT hContact);
-TCHAR *GetContactID(HCONTACT hContact, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, char *szProto);
-HCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
+TCHAR *GetContactName(MCONTACT hContact, char *szProto);
+TCHAR *GetContactID(MCONTACT hContact);
+TCHAR *GetContactID(MCONTACT hContact, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, char *szProto);
+MCONTACT GetContactFromID(TCHAR *szID, wchar_t *szProto);
#endif
\ No newline at end of file |