summaryrefslogtreecommitdiff
path: root/plugins/UserInfoEx
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/UserInfoEx')
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.cpp16
-rw-r--r--plugins/UserInfoEx/src/Flags/svc_flags.h8
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.cpp38
-rw-r--r--plugins/UserInfoEx/src/classMAnnivDate.h28
-rw-r--r--plugins/UserInfoEx/src/classMTime.cpp6
-rw-r--r--plugins/UserInfoEx/src/classMTime.h6
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.cpp20
-rw-r--r--plugins/UserInfoEx/src/ctrl_annivedit.h12
-rw-r--r--plugins/UserInfoEx/src/ctrl_base.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_base.h8
-rw-r--r--plugins/UserInfoEx/src/ctrl_combo.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_combo.h4
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.cpp16
-rw-r--r--plugins/UserInfoEx/src/ctrl_contact.h8
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_edit.h4
-rw-r--r--plugins/UserInfoEx/src/ctrl_tzcombo.cpp4
-rw-r--r--plugins/UserInfoEx/src/ctrl_tzcombo.h4
-rw-r--r--plugins/UserInfoEx/src/dlg_anniversarylist.cpp23
-rw-r--r--plugins/UserInfoEx/src/dlg_msgbox.cpp2
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.cpp24
-rw-r--r--plugins/UserInfoEx/src/dlg_propsheet.h14
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp46
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactBase.h20
-rw-r--r--plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp14
-rw-r--r--plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp20
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImINI.h2
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp24
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h10
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp4
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImXML.h6
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp8
-rw-r--r--plugins/UserInfoEx/src/ex_import/svc_ExImport.h2
-rw-r--r--plugins/UserInfoEx/src/mir_contactqueue.cpp14
-rw-r--r--plugins/UserInfoEx/src/mir_contactqueue.h18
-rw-r--r--plugins/UserInfoEx/src/mir_db.cpp55
-rw-r--r--plugins/UserInfoEx/src/mir_db.h66
-rw-r--r--plugins/UserInfoEx/src/psp_base.cpp64
-rw-r--r--plugins/UserInfoEx/src/psp_contact.cpp8
-rw-r--r--plugins/UserInfoEx/src/psp_general.cpp4
-rw-r--r--plugins/UserInfoEx/src/psp_options.cpp4
-rw-r--r--plugins/UserInfoEx/src/psp_origin.cpp2
-rw-r--r--plugins/UserInfoEx/src/psp_profile.cpp16
-rw-r--r--plugins/UserInfoEx/src/svc_avatar.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_contactinfo.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp12
-rw-r--r--plugins/UserInfoEx/src/svc_gender.cpp8
-rw-r--r--plugins/UserInfoEx/src/svc_gender.h4
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp10
-rw-r--r--plugins/UserInfoEx/src/svc_phone.cpp6
-rw-r--r--plugins/UserInfoEx/src/svc_refreshci.cpp15
-rw-r--r--plugins/UserInfoEx/src/svc_reminder.cpp26
-rw-r--r--plugins/UserInfoEx/src/svc_timezone.cpp4
-rw-r--r--plugins/UserInfoEx/src/svc_timezone_old.cpp12
-rw-r--r--plugins/UserInfoEx/src/svc_timezone_old.h8
56 files changed, 381 insertions, 400 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
index a0b350f1a9..8b35da97e9 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.cpp
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.cpp
@@ -44,18 +44,18 @@ static LIST<MsgWndData> gMsgWndList(10, HandleKeySortT);
static INT_PTR ServiceDetectContactOriginCountry(WPARAM wParam,LPARAM lParam)
{
WORD countryNumber;
- char *pszProto = GetContactProto((HANDLE)wParam);
+ char *pszProto = GetContactProto((HCONTACT)wParam);
/* UserinfoEx */
- if (countryNumber = db_get_w((HANDLE)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
+ if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HANDLE)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
+ if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HANDLE)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
+ if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
return countryNumber;
/* fallback proto settings */
- if (countryNumber = db_get_w((HANDLE)wParam, pszProto, "Country", 0))
+ if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "Country", 0))
return countryNumber;
- if (countryNumber = db_get_w((HANDLE)wParam, pszProto, "CompanyCountry", 0))
+ if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "CompanyCountry", 0))
return countryNumber;
return (INT_PTR)0xFFFF;
@@ -69,7 +69,7 @@ static void CALLBACK SetExtraImage(LPARAM lParam)
{
/* get contact's country */
int countryNumber = ServiceDetectContactOriginCountry(lParam, 0);
- ExtraIcon_SetIcon(hExtraIconSvc, (HANDLE)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL);
+ ExtraIcon_SetIcon(hExtraIconSvc, (HCONTACT)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL);
}
static int OnCListApplyIcons(WPARAM wParam, LPARAM)
@@ -82,7 +82,7 @@ static int OnCListApplyIcons(WPARAM wParam, LPARAM)
* message winsow status icon functions
***********************************************************************************************************/
-MsgWndData::MsgWndData(HWND hwnd, HANDLE hContact)
+MsgWndData::MsgWndData(HWND hwnd, HCONTACT hContact)
{
m_hwnd = hwnd;
m_hContact = hContact;
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.h b/plugins/UserInfoEx/src/Flags/svc_flags.h
index 71c0cb5bee..55d57a93ae 100644
--- a/plugins/UserInfoEx/src/Flags/svc_flags.h
+++ b/plugins/UserInfoEx/src/Flags/svc_flags.h
@@ -33,11 +33,11 @@ extern bool g_eiGender, g_eiHome, g_eiEmail, g_eiPhone;
struct MsgWndData
{
- HANDLE m_hContact;
- HWND m_hwnd;
- int m_countryID;
+ HCONTACT m_hContact;
+ HWND m_hwnd;
+ int m_countryID;
- MsgWndData(HWND hwnd, HANDLE hContact);
+ MsgWndData(HWND hwnd, HCONTACT hContact);
~MsgWndData();
void FlagsIconSet();
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp
index 794af36cc8..2731b85bca 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.cpp
+++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp
@@ -255,7 +255,7 @@ MZodiac MAnnivDate::Zodiac()
* param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetReminderOpts(HANDLE hContact)
+int MAnnivDate::DBGetReminderOpts(HCONTACT hContact)
{
if (!hContact || hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -287,7 +287,7 @@ int MAnnivDate::DBGetReminderOpts(HANDLE hContact)
* param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteReminderOpts(HANDLE hContact)
+int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact)
{
if (!hContact || hContact == INVALID_HANDLE_VALUE)
return 1;
@@ -336,7 +336,7 @@ int MAnnivDate::DBWriteReminderOpts(HANDLE hContact)
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
ZeroDate();
@@ -371,7 +371,7 @@ int MAnnivDate::DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCST
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
return
db_set_b(hContact, pszModule, szDay, (BYTE)Day()) ||
@@ -390,7 +390,7 @@ int MAnnivDate::DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPC
* szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
+int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
{
int ret;
@@ -413,7 +413,7 @@ int MAnnivDate::DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LP
* pszSetting - key used to identify the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIs(hContact, pszModule, pszSetting, &dbv))
@@ -436,7 +436,7 @@ int MAnnivDate::DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSett
* pszSetting - key used to save the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (hContact == INVALID_HANDLE_VALUE || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
return 1;
@@ -457,7 +457,7 @@ int MAnnivDate::DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSe
* pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
+int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto)
{
Clear();
@@ -482,7 +482,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
// try to get setting from the default subcontact first
const int def = DB::MetaContact::SubDefNum(hContact);
if (def > -1 && def < INT_MAX) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, def);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -496,7 +496,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
if (cnt < INT_MAX) {
for (int i = 0; i < cnt; i++) {
if (i != def) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -521,7 +521,7 @@ int MAnnivDate::DBGetBirthDate(HANDLE hContact, LPSTR pszProto)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew)
+int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew)
{
Clear();
switch(bOld) {
@@ -556,7 +556,7 @@ int MAnnivDate::DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteBirthDate(HANDLE hContact)
+int MAnnivDate::DBWriteBirthDate(HCONTACT hContact)
{
LPCSTR pszModule = SvcReminderGetMyBirthdayModule();
@@ -599,7 +599,7 @@ int MAnnivDate::DBWriteBirthDate(HANDLE hContact)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteBirthDate(HANDLE hContact)
+int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact)
{
return DBDeleteDate(hContact, Module(), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
}
@@ -617,7 +617,7 @@ int MAnnivDate::DBDeleteBirthDate(HANDLE hContact)
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex)
+int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex)
{
Clear();
@@ -649,7 +649,7 @@ int MAnnivDate::DBGetAnniversaryDate(HANDLE hContact, WORD iIndex)
* pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex)
+int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex)
{
// date can only be written to db as anniversary if it is not marked as birthday
if (wIndex <= ANID_LAST && _wID != ANID_BIRTHDAY) {
@@ -673,7 +673,7 @@ int MAnnivDate::DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex)
* automatic backup service
***********************************************************************************************************/
-static WORD AskUser(HANDLE hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
+static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
TCHAR szMsg[MAXDATASIZE];
@@ -707,7 +707,7 @@ static WORD AskUser(HANDLE hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNe
* return: 0 if backup was done, 1 otherwise
**/
-int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
+int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
{
if (!hContact)
return 1;
@@ -742,7 +742,7 @@ int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDont
// allow backup only, if the custom setting differs from all meta subcontacts' protocol based settings, too.
for (int i = 0; (i < nSubContactCount) && bWantBackup && bIsMeta; i++) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact && !mdbIgnore.DBGetDate(hSubContact, pszProto, SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
bWantBackup = bWantBackup
&& !IsEqual(mdbIgnore.SystemTime())
@@ -767,7 +767,7 @@ int MAnnivDate::BackupBirthday(HANDLE hContact, LPSTR pszProto, const BYTE bDont
// update metasubcontacts
for (int i = 0; i < nSubContactCount; i++) {
- HANDLE hSubContact = DB::MetaContact::Sub(hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL) {
if (!mdbIgnore.DBGetDate(hSubContact, DB::Contact::Proto(hSubContact), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR))
mdbIgnore.DBWriteDateStamp(hSubContact, USERINFO, SET_REMIND_BIRTHDAY_IGNORED);
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.h b/plugins/UserInfoEx/src/classMAnnivDate.h
index acc3790b96..c2ebffbe89 100644
--- a/plugins/UserInfoEx/src/classMAnnivDate.h
+++ b/plugins/UserInfoEx/src/classMAnnivDate.h
@@ -50,8 +50,8 @@ private:
BYTE _bRemind; // per user setting for reminder (0 - disabled, 1 - use local offset, 2 - use global offset)
WORD _wDaysEarlier; // number of days to the anniversary the user wants to be reminded of this anniversary
- int DBWriteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
- int DBDeleteDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
+ int DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
public:
MAnnivDate();
@@ -93,23 +93,23 @@ public:
void Clear();
// read date from database
- int DBGetDate(HANDLE hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
- int DBGetDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBGetAnniversaryDate(HANDLE hContact, WORD iIndex);
- int DBGetBirthDate(HANDLE hContact, LPSTR pszProto = NULL);
- int DBGetReminderOpts(HANDLE hContact);
+ int DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex);
+ int DBGetBirthDate(HCONTACT hContact, LPSTR pszProto = NULL);
+ int DBGetReminderOpts(HCONTACT hContact);
// write date to database
- int DBWriteDateStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteAnniversaryDate(HANDLE hContact, WORD wIndex);
- int DBWriteBirthDate(HANDLE hContact);
- int DBWriteReminderOpts(HANDLE hContact);
+ int DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex);
+ int DBWriteBirthDate(HCONTACT hContact);
+ int DBWriteReminderOpts(HCONTACT hContact);
// delete date from database
- int DBDeleteBirthDate(HANDLE hContact);
+ int DBDeleteBirthDate(HCONTACT hContact);
- int DBMoveBirthDate(HANDLE hContact, BYTE bOld, BYTE bNew);
- int BackupBirthday (HANDLE hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL);
+ int DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew);
+ int BackupBirthday (HCONTACT hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL);
// setting values
void SetDate(SYSTEMTIME &st);
diff --git a/plugins/UserInfoEx/src/classMTime.cpp b/plugins/UserInfoEx/src/classMTime.cpp
index 0d5a42f9d8..5035d8eac9 100644
--- a/plugins/UserInfoEx/src/classMTime.cpp
+++ b/plugins/UserInfoEx/src/classMTime.cpp
@@ -408,7 +408,7 @@ void MTime::GetLocalTime()
::GetLocalTime(&_SysTime);
}
-void MTime::GetLocalTime(HANDLE hContact)
+void MTime::GetLocalTime(HCONTACT hContact)
{
TIME_ZONE_INFORMATION tzi;
@@ -423,7 +423,7 @@ void MTime::GetLocalTime(HANDLE hContact)
* read and write time to miranda's database
*********************************************/
-int MTime::DBGetStamp (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DWORD dwTimeStamp;
@@ -446,7 +446,7 @@ int MTime::DBGetStamp (HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
return 0;
}
-int MTime::DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (hContact == INVALID_HANDLE_VALUE ||
pszModule == NULL || pszModule[0] == 0 ||
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h
index 99706578aa..1363a0247b 100644
--- a/plugins/UserInfoEx/src/classMTime.h
+++ b/plugins/UserInfoEx/src/classMTime.h
@@ -90,7 +90,7 @@ public:
// get current time
void GetTimeUTC();
void GetLocalTime();
- void GetLocalTime(HANDLE hContact);
+ void GetLocalTime(HCONTACT hContact);
// conversions
void UTCToLocal();
@@ -100,8 +100,8 @@ public:
void TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi);
// read and write from and to db
- int DBGetStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteStamp(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
// operatoren
void operator = (DWORD& dwTimeStamp) { FromStampAsUTC(dwTimeStamp); };
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.cpp b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
index f0da0189d1..c0041d26e5 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.cpp
@@ -140,7 +140,7 @@ void CAnnivEditCtrl::EnableCurrentItem()
MAnnivDate *pCurrent = Current();
if (pCurrent) {
- HANDLE hContact;
+ HCONTACT hContact;
PSGetContact(_hwndDlg, hContact);
@@ -233,8 +233,8 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex)
// only delete values, but not the item
if (_pDates[wIndex]->Id() == ANID_BIRTHDAY) {
- HANDLE hContact;
- LPCSTR pszProto;
+ HCONTACT hContact;
+ LPCSTR pszProto;
PSGetContact(_hwndDlg, hContact);
PSGetBaseProto(_hwndDlg, pszProto);
@@ -273,7 +273,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex)
* param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetBirthDay(HANDLE hContact, LPCSTR pszProto)
+INT_PTR CAnnivEditCtrl::DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto)
{
MAnnivDate mdb;
@@ -290,7 +290,7 @@ INT_PTR CAnnivEditCtrl::DBGetBirthDay(HANDLE hContact, LPCSTR pszProto)
* param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HANDLE hContact)
+INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HCONTACT hContact)
{
MAnnivDate mda;
@@ -317,7 +317,7 @@ INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HANDLE hContact)
* param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HANDLE hContact)
+INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HCONTACT hContact)
{
MAnnivDate *pmdb;
@@ -346,7 +346,7 @@ INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HANDLE hContact)
* param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(HANDLE hContact)
+INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(HCONTACT hContact)
{
const LPCSTR szPrefix[] = { "Reminder", "Offset", "Desc", "Day", "Month", "Year", "Stamp", "Date" };
CHAR szSet0[MAXSETTING];
@@ -526,7 +526,7 @@ void CAnnivEditCtrl::OnRemindEditChanged()
**/
void CAnnivEditCtrl::OnReminderChecked()
{
- HANDLE hContact;
+ HCONTACT hContact;
LPCSTR pszProto;
int state;
TCHAR buf[6];
@@ -606,7 +606,7 @@ void CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt)
}
}
-BOOL CAnnivEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
+BOOL CAnnivEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged;
bChanged = DBGetBirthDay(hContact, pszProto);
@@ -616,7 +616,7 @@ BOOL CAnnivEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
return bChanged;
}
-void CAnnivEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto)
+void CAnnivEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
{
DBWriteBirthDay(hContact);
DBWriteAnniversaries(hContact);
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h
index ee6307f8ed..932fe8f49f 100644
--- a/plugins/UserInfoEx/src/ctrl_annivedit.h
+++ b/plugins/UserInfoEx/src/ctrl_annivedit.h
@@ -42,11 +42,11 @@ class CAnnivEditCtrl : public CBaseCtrl
BYTE ItemValid(WORD wIndex) const;
BYTE CurrentItemValid() const;
- INT_PTR DBGetBirthDay(HANDLE hContact, LPCSTR pszProto);
- INT_PTR DBWriteBirthDay(HANDLE hContact);
+ INT_PTR DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto);
+ INT_PTR DBWriteBirthDay(HCONTACT hContact);
- INT_PTR DBGetAnniversaries(HANDLE hContact);
- INT_PTR DBWriteAnniversaries(HANDLE hContact);
+ INT_PTR DBGetAnniversaries(HCONTACT hContact);
+ INT_PTR DBWriteAnniversaries(HCONTACT hContact);
CAnnivEditCtrl(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
~CAnnivEditCtrl();
@@ -87,8 +87,8 @@ public:
static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting);
virtual void Release();
- virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
- virtual void OnApply(HANDLE hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
};
#endif /* _UINFOEX_CTRLANNIVEDIT_H_ */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/ctrl_base.cpp b/plugins/UserInfoEx/src/ctrl_base.cpp
index 070ae8eb7f..5e90f7f989 100644
--- a/plugins/UserInfoEx/src/ctrl_base.cpp
+++ b/plugins/UserInfoEx/src/ctrl_base.cpp
@@ -219,7 +219,7 @@ void CCtrlList::OnReset()
*
*
**/
-BOOL CCtrlList::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
+BOOL CCtrlList::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged = 0;
INT_PTR i;
@@ -238,7 +238,7 @@ BOOL CCtrlList::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
*
*
**/
-void CCtrlList::OnApply(HANDLE hContact, LPCSTR pszProto)
+void CCtrlList::OnApply(HCONTACT hContact, LPCSTR pszProto)
{
INT_PTR i;
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h
index d0bf2b50fb..20ef261090 100644
--- a/plugins/UserInfoEx/src/ctrl_base.h
+++ b/plugins/UserInfoEx/src/ctrl_base.h
@@ -163,7 +163,7 @@ public:
* @retval TRUE - the content was updated
* @retval FALSE - content not updated
**/
- virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto) { return 0; }
+ virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) { return 0; }
/**
* This is a pure virtual method, which is the common interface
@@ -174,7 +174,7 @@ public:
*
* @return nothing
**/
- virtual void OnApply(HANDLE hContact, LPCSTR pszProto) { }
+ virtual void OnApply(HCONTACT hContact, LPCSTR pszProto) { }
/**
* This is a pure virtual method, which is called to set the
@@ -220,8 +220,8 @@ public:
void Release();
void OnReset();
- BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
- void OnApply(HANDLE hContact, LPCSTR pszProto);
+ BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
+ void OnApply(HCONTACT hContact, LPCSTR pszProto);
void OnChangedByUser(WORD idCtrl, WORD wChangedMsg);
INT_PTR OnSetTextColour(HWND hCtrl, HDC hdc);
};
diff --git a/plugins/UserInfoEx/src/ctrl_combo.cpp b/plugins/UserInfoEx/src/ctrl_combo.cpp
index 1eb3817f3e..42a6d6df00 100644
--- a/plugins/UserInfoEx/src/ctrl_combo.cpp
+++ b/plugins/UserInfoEx/src/ctrl_combo.cpp
@@ -148,7 +148,7 @@ void CCombo::Release()
*
* @return nothing
**/
-BOOL CCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
+BOOL CCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged && _pList != NULL)
{
@@ -196,7 +196,7 @@ BOOL CCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
*
* @return nothing
**/
-void CCombo::OnApply(HANDLE hContact, LPCSTR pszProto)
+void CCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_combo.h b/plugins/UserInfoEx/src/ctrl_combo.h
index 5e0db3b196..ad5ea0aa54 100644
--- a/plugins/UserInfoEx/src/ctrl_combo.h
+++ b/plugins/UserInfoEx/src/ctrl_combo.h
@@ -61,8 +61,8 @@ public:
static CBaseCtrl* CreateObj(HWND hDlg, WORD idCtrl, LPCSTR pszSetting, BYTE bDBDataType, LPIDSTRLIST pList, int nListCount);
virtual void Release();
- virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
- virtual void OnApply(HANDLE hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
};
diff --git a/plugins/UserInfoEx/src/ctrl_contact.cpp b/plugins/UserInfoEx/src/ctrl_contact.cpp
index 1efda63861..12286d6f71 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.cpp
+++ b/plugins/UserInfoEx/src/ctrl_contact.cpp
@@ -690,7 +690,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
cbi.dwID = 0;
if (DialogBoxParam(ghInst, MAKEINTRESOURCE(dlgID), GetParent(hwnd), dlgProc, (LPARAM)&cbi) == IDOK) {
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
SendMessage(hDlgDetails, PSM_GETCONTACT, NULL, (LPARAM)&hContact);
if (hContact) cbi.wFlags |= CTRLF_HASCUSTOM;
@@ -748,7 +748,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
}
if (DialogBoxParam(ghInst, MAKEINTRESOURCE(dlgID), GetParent(hwnd), dlgProc, (LPARAM)&cbi) == IDOK) {
- HANDLE hContact;
+ HCONTACT hContact;
SendMessage(hDlgDetails, PSM_GETCONTACT, NULL, (LPARAM)&hContact);
if (hContact) cbi.wFlags |= CTRLF_HASCUSTOM;
@@ -826,7 +826,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
{
TCHAR szVal[MAXDATASIZE] = { 0 };
int ccVal;
- HANDLE hContact;
+ HCONTACT hContact;
HWND hDlgDetails = GetParent(GetParent(hwnd));
EnableWindow(cbex->hBtnDel, GetWindowTextLength(cbex->hEdit) > 0);
@@ -1124,7 +1124,7 @@ static LRESULT CALLBACK CtrlContactWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
**/
case CBEXM_ENABLEITEM:
if (cbex->iSelectedItem >= 0 && cbex->iSelectedItem < cbex->numItems) {
- HANDLE hContact;
+ HCONTACT hContact;
BYTE bEnabled;
PSGetContact(GetParent(hwnd), hContact);
@@ -1277,7 +1277,7 @@ int CtrlContactAddItemFromDB(
HWND hCtrl,
LPCSTR szIcon,
LPTSTR szItem,
- HANDLE hContact,
+ HCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szSettingVal)
@@ -1330,7 +1330,7 @@ int CtrlContactAddMyItemsFromDB(
HWND hCtrl,
LPCSTR szIcon,
WORD wForcedFlags,
- HANDLE hContact,
+ HCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
@@ -1406,7 +1406,7 @@ int CtrlContactAddMyItemsFromDB(
**/
int CtrlContactWriteItemToDB(
HWND hCtrl,
- HANDLE hContact,
+ HCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR pszSetting)
@@ -1448,7 +1448,7 @@ int CtrlContactWriteItemToDB(
int CtrlContactWriteMyItemsToDB(
HWND hCtrl,
int iFirstItem,
- HANDLE hContact,
+ HCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h
index 69b57bac0a..92cc6894ff 100644
--- a/plugins/UserInfoEx/src/ctrl_contact.h
+++ b/plugins/UserInfoEx/src/ctrl_contact.h
@@ -69,9 +69,9 @@ typedef struct TComboExItem
int CtrlContactLoadModule();
int CtrlContactUnLoadModule();
-int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
-int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
-int CtrlContactWriteItemToDB(HWND hCtrl, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
-int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
+int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactWriteItemToDB(HWND hCtrl, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
+int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
#endif /* _UI_CTRL_INCLUDE_ */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/ctrl_edit.cpp b/plugins/UserInfoEx/src/ctrl_edit.cpp
index 2d25aa7213..c87490dba0 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.cpp
+++ b/plugins/UserInfoEx/src/ctrl_edit.cpp
@@ -105,7 +105,7 @@ void CEditCtrl::OnReset()
*
* @return nothing
**/
-BOOL CEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
+BOOL CEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged)
{
@@ -165,7 +165,7 @@ BOOL CEditCtrl::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
*
* @return nothing
**/
-void CEditCtrl::OnApply(HANDLE hContact, LPCSTR pszProto)
+void CEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_edit.h b/plugins/UserInfoEx/src/ctrl_edit.h
index de95a46226..4e569645ba 100644
--- a/plugins/UserInfoEx/src/ctrl_edit.h
+++ b/plugins/UserInfoEx/src/ctrl_edit.h
@@ -57,8 +57,8 @@ public:
virtual void Release();
virtual void OnReset();
- virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
- virtual void OnApply(HANDLE hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
void OpenUrl();
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
index 76152e13c4..d98c591f34 100644
--- a/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
+++ b/plugins/UserInfoEx/src/ctrl_tzcombo.cpp
@@ -157,7 +157,7 @@ void CTzCombo::Release()
*
* @return _Flags.B.hasChanged member
**/
-BOOL CTzCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
+BOOL CTzCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged) {
//use new core tz interface to change the cbbox
@@ -198,7 +198,7 @@ BOOL CTzCombo::OnInfoChanged(HANDLE hContact, LPCSTR pszProto)
*
* @return nothing
**/
-void CTzCombo::OnApply(HANDLE hContact, LPCSTR pszProto)
+void CTzCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.h b/plugins/UserInfoEx/src/ctrl_tzcombo.h
index 7c87c0ce2b..487792ebd5 100644
--- a/plugins/UserInfoEx/src/ctrl_tzcombo.h
+++ b/plugins/UserInfoEx/src/ctrl_tzcombo.h
@@ -46,8 +46,8 @@ public:
virtual void Release();
// virtual void OnReset() {};
- virtual BOOL OnInfoChanged(HANDLE hContact, LPCSTR pszProto);
- virtual void OnApply(HANDLE hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(HCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
virtual void OnChangedByUser(WORD wChangedMsg);
void GetTime(LPTSTR szTime, WORD cchTime);
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
index 00ad372ef0..d451d11ad5 100644
--- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
+++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp
@@ -91,12 +91,12 @@ class CAnnivList
struct CItemData
{
- HANDLE _hContact;
+ HCONTACT _hContact;
MAnnivDate* _pDate;
WORD _wDaysBefore;
BYTE _wReminderState;
- CItemData(HANDLE hContact, MAnnivDate &date)
+ CItemData(HCONTACT hContact, MAnnivDate &date)
{
_hContact = hContact;
_wReminderState = date.RemindOption();
@@ -740,7 +740,7 @@ class CAnnivList
* @retval TRUE if successful
* @retval FALSE if failed
**/
- BYTE AddRow(HANDLE hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
+ BYTE AddRow(HCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
{
TCHAR szText[MAX_PATH];
int diff, iItem = -1;
@@ -810,7 +810,6 @@ class CAnnivList
**/
void RebuildList()
{
- HANDLE hContact;
LPSTR pszProto;
MTime mtNow;
MAnnivDate ad;
@@ -827,7 +826,7 @@ class CAnnivList
mtNow.GetLocalTime();
// insert the items into the list
- for (hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
{
// ignore meta subcontacts here, as they are not interesting.
if (!DB::MetaContact::IsSub(hContact)) {
@@ -835,15 +834,13 @@ class CAnnivList
pszProto = DB::Contact::Proto(hContact);
if (pszProto) {
numContacts++;
- switch (GenderOf(hContact, pszProto))
- {
- case 'M': {
- numMale++;
- } break;
+ switch (GenderOf(hContact, pszProto)) {
+ case 'M':
+ numMale++;
+ break;
- case 'F': {
- numFemale++;
- }
+ case 'F':
+ numFemale++;
}
if (!ad.DBGetBirthDate(hContact, pszProto)) {
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp
index 06a470f67d..470d988a1f 100644
--- a/plugins/UserInfoEx/src/dlg_msgbox.cpp
+++ b/plugins/UserInfoEx/src/dlg_msgbox.cpp
@@ -613,7 +613,7 @@ static LRESULT CALLBACK PopupProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lP
/**
* This is the service function for external plugins to use the nice messagebox
*
-* @param wParam - HANDLE hContact which can display an avatar for popups
+* @param wParam - HCONTACT hContact which can display an avatar for popups
* @param lParam - MSGBOX structure holding parameters
*
* @return The function returns the ID of the clicked button (IDOK, IDCANCEL, ...)
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp
index 978da21f4f..653f9c77b2 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.cpp
+++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp
@@ -253,7 +253,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
myGlobals.WantAeroAdaption = db_get_b(NULL, MODNAME, SET_PROPSHEET_AEROADAPTION, TRUE);
// allow only one dialog per user
- if (HWND hWnd = WindowList_Find(ghWindowList, (HANDLE)wParam)) {
+ if (HWND hWnd = WindowList_Find(ghWindowList, (HCONTACT)wParam)) {
SetForegroundWindow(hWnd);
SetFocus(hWnd);
return 0;
@@ -285,7 +285,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
ImageList_AddIcon(psh._hImages, hDefIcon);
// init contact
- psh._hContact = (HANDLE)wParam;
+ psh._hContact = (HCONTACT)wParam;
if (psh._hContact == NULL) {
// mark owner icons as initiated
bInitIcons |= INIT_ICONS_OWNER;
@@ -294,7 +294,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
}
else {
// get contact's protocol
- psh._pszPrefix = psh._pszProto = DB::Contact::Proto((HANDLE)wParam);
+ psh._pszPrefix = psh._pszProto = DB::Contact::Proto((HCONTACT)wParam);
if (psh._pszProto == NULL) {
MsgErr(NULL, LPGENT("Could not find contact's protocol. Maybe it is not active!"));
return 1;
@@ -313,12 +313,12 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
// metacontacts sub pages
if (bScanMetaSubContacts) {
- int numSubs = DB::MetaContact::SubCount((HANDLE)wParam);
+ int numSubs = DB::MetaContact::SubCount((HCONTACT)wParam);
psh._dwFlags &= ~PSF_PROTOPAGESONLY_INIT;
psh._dwFlags |= PSF_PROTOPAGESONLY;
for (int i = 0; i < numSubs; i++) {
- psh._hContact = DB::MetaContact::Sub((HANDLE)wParam, i);
+ psh._hContact = DB::MetaContact::Sub((HCONTACT)wParam, i);
psh._nSubContact = i;
if (psh._hContact) {
psh._pszProto = DB::Contact::Proto(psh._hContact);
@@ -326,7 +326,7 @@ static INT_PTR ShowDialog(WPARAM wParam, LPARAM lParam)
NotifyEventHooks(ghDetailsInitEvent, (WPARAM)&psh, (LPARAM)psh._hContact);
}
}
- psh._hContact = (HANDLE)wParam;
+ psh._hContact = (HCONTACT)wParam;
}
// sort the pages by the position read from database
@@ -409,10 +409,10 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam)
**/
static int OnDeleteContact(WPARAM wParam, LPARAM lParam)
{
- HWND hWnd = WindowList_Find(ghWindowList, (HANDLE)wParam);
- if (hWnd != NULL)
- DestroyWindow(hWnd);
- return 0;
+ HWND hWnd = WindowList_Find(ghWindowList, (HCONTACT)wParam);
+ if (hWnd != NULL)
+ DestroyWindow(hWnd);
+ return 0;
}
/**
@@ -1356,7 +1356,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
**/
case HM_SETTING_CHANGED:
if (!(pPs->dwFlags & PSF_LOCKED)) {
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact != pPs->hContact) {
@@ -1593,7 +1593,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
// count valid subcontacts whose protocol supports the PSS_GETINFO service to update the information
int numSubs = DB::MetaContact::SubCount(pPs->hContact);
for (int i = 0; i < numSubs; i++) {
- HANDLE hSubContact = DB::MetaContact::Sub(pPs->hContact, i);
+ HCONTACT hSubContact = DB::MetaContact::Sub(pPs->hContact, i);
if (hSubContact != NULL) {
if (ProtoServiceExists(DB::Contact::Proto(hSubContact), PSS_GETINFO)) {
pPs->infosUpdated = (TAckInfo*)mir_realloc(pPs->infosUpdated, sizeof(TAckInfo)* (pPs->nSubContacts + 1));
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.h b/plugins/UserInfoEx/src/dlg_propsheet.h
index c7965e5693..dce0416454 100644
--- a/plugins/UserInfoEx/src/dlg_propsheet.h
+++ b/plugins/UserInfoEx/src/dlg_propsheet.h
@@ -40,7 +40,7 @@ class CPsTreeItem
DWORD _dwFlags; // some flags
int _iPosition; // initiating position if custom (used for sorting)
LPARAM _initParam;
- HANDLE _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
+ HCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
LPCSTR _pszProto; // protocol the page is accociated with (is the contact's protocol if _hContact is not NULL)
LPCSTR _pszPrefix; // pointer to the dialog owning contact's protocol
@@ -68,7 +68,7 @@ public:
__inline LPCSTR Proto() const { return _pszProto; };
__inline LPTSTR Label() const { return _ptszLabel; };
void Rename( const LPTSTR pszLabel );
- __inline HANDLE hContact() const { return _hContact; };
+ __inline HCONTACT hContact() const { return _hContact; };
__inline HWND Wnd() const { return _hWnd; };
__inline int DlgId() const { return _idDlg; };
@@ -219,7 +219,7 @@ class CPsHdr
{
public:
DWORD _dwSize; // size of this class in bytes
- HANDLE _hContact; // handle to the owning contact
+ HCONTACT _hContact; // handle to the owning contact
LPCSTR _pszProto; // owning contact's protocol
LPCSTR _pszPrefix; // name prefix for treeitem settings
CPsTreeItem** _pPages; // the pages
@@ -238,15 +238,15 @@ public:
struct TAckInfo
{
- HANDLE hContact;
- LPINT/*PINT_PTR*/ acks;
- int count;
+ HCONTACT hContact;
+ LPINT acks;
+ int count;
};
struct TPropSheet
{
// dialogs owner
- HANDLE hContact;
+ HCONTACT hContact;
CHAR pszProto[MAXMODULELABELLENGTH];
HANDLE hProtoAckEvent; // eventhook for protocol acks
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
index 0906dacaae..efb32e0efc 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp
@@ -30,17 +30,17 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
**/
CExImContactBase::CExImContactBase()
{
- _pszNick = NULL;
- _pszDisp = NULL;
- _pszGroup = NULL;
- _pszProto = NULL;
- _pszProtoOld = NULL;
- _pszAMPro = NULL;
- _pszUIDKey = NULL;
- _dbvUIDHash = NULL;
+ _pszNick = NULL;
+ _pszDisp = NULL;
+ _pszGroup = NULL;
+ _pszProto = NULL;
+ _pszProtoOld = NULL;
+ _pszAMPro = NULL;
+ _pszUIDKey = NULL;
+ _dbvUIDHash = NULL;
ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
- _hContact = INVALID_HANDLE_VALUE;
- _isNewContact = FALSE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _isNewContact = FALSE;
}
/**
@@ -69,7 +69,7 @@ CExImContactBase::~CExImContactBase()
* param: hContact - handle to contact whose information to read
* return: TRUE if successful or FALSE otherwise
**/
-BYTE CExImContactBase::fromDB(HANDLE hContact)
+BYTE CExImContactBase::fromDB(HCONTACT hContact)
{
BYTE ret = FALSE;
BYTE isChatRoom = FALSE;
@@ -224,15 +224,14 @@ BYTE CExImContactBase::fromIni(LPSTR& row)
* param: hMetaContact - a meta contact to add this contact to
* return: handle of the contact if successful
**/
-HANDLE CExImContactBase::toDB()
+HCONTACT CExImContactBase::toDB()
{
// create new contact if none exists
if (_hContact == INVALID_HANDLE_VALUE && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
PROTOACCOUNT* pszAccount = 0;
if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) {
//account does not exist
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
if (!IsAccountEnabled(pszAccount)) {
;
@@ -240,20 +239,17 @@ HANDLE CExImContactBase::toDB()
// create new contact
_hContact = DB::Contact::Add();
if (!_hContact) {
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// Add the protocol to the new contact
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)_hContact, (LPARAM)_pszProto)) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// write uid to protocol module
if (db_set(_hContact, _pszProto, _pszUIDKey, &_dbvUID)) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
// write nick and display name
if (_pszNick) db_set_utf(_hContact, _pszProto, SET_CONTACT_NICK, _pszNick);
@@ -477,7 +473,7 @@ BYTE CExImContactBase::isMeta() const
return DB::Module::IsMeta(_pszProto);
}
-BYTE CExImContactBase::isHandle(HANDLE hContact)
+BYTE CExImContactBase::isHandle(HCONTACT hContact)
{
LPCSTR pszProto;
DBVARIANT dbv;
@@ -527,10 +523,7 @@ BYTE CExImContactBase::isHandle(HANDLE hContact)
**/
HANDLE CExImContactBase::findHandle()
{
- HANDLE hContact;
-
- for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
- {
+ for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (isHandle(hContact)) {
_hContact = hContact;
_isNewContact = FALSE;
@@ -538,6 +531,5 @@ HANDLE CExImContactBase::findHandle()
}
}
_isNewContact = TRUE;
- _hContact = INVALID_HANDLE_VALUE;
- return INVALID_HANDLE_VALUE;
+ return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
index 377b341c3e..c9bb3fee24 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h
@@ -36,7 +36,7 @@ protected:
LPSTR _pszUIDKey;
DWORD _dbvUIDHash;
DBVARIANT _dbvUID;
- HANDLE _hContact;
+ HCONTACT _hContact;
BYTE _isNewContact; // is this contact a new one?
HANDLE findHandle();
@@ -52,7 +52,7 @@ public:
// __inline LPCSTR ampro() const { return mir_strcmp(_pszAMPro,"")? _pszAMPro : NULL; }
// __inline LPCSTR uidk() const { return mir_strcmp(_pszUIDKey,"")? _pszUIDKey : NULL; }
__inline DBVARIANT& uid() { return _dbvUID; }
- __inline HANDLE handle() const { return _hContact; }
+ __inline HCONTACT handle() const { return _hContact; }
__inline void disp(LPCSTR val) { _pszDisp = val ? mir_strdup(val): NULL; }
__inline void group(LPCSTR val) { _pszGroup = val ? mir_strdup(val): NULL; }
@@ -77,16 +77,16 @@ public:
mir_free(temp);
}
- BYTE isHandle(HANDLE hContact);
- BYTE isMeta() const;
+ BYTE isHandle(HCONTACT hContact);
+ BYTE isMeta() const;
- LPSTR uid2String(BYTE bPrependType);
+ LPSTR uid2String(BYTE bPrependType);
- BYTE fromDB(HANDLE hContact);
- BYTE fromIni(LPSTR& row);
+ BYTE fromDB(HCONTACT hContact);
+ BYTE fromIni(LPSTR& row);
- HANDLE toDB();
- void toIni(FILE* file, int modCount);
+ HCONTACT toDB();
+ void toIni(FILE* file, int modCount);
- BYTE operator = (HANDLE hContact) { return fromDB(hContact); }
+ BYTE operator = (HCONTACT hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
index a292f6d803..8aa92d5285 100644
--- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp
@@ -219,7 +219,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules)
const int cnt = DB::MetaContact::SubCount(_hContact);
const int def = DB::MetaContact::SubDefNum(_hContact);
- HANDLE hSubContact = DB::MetaContact::Sub(_hContact, def);
+ HCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
// export default subcontact
if (hSubContact && vContact.fromDB(hSubContact))
@@ -488,7 +488,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
// delete last contact
db_free(&_dbvUID);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
_xmlNode = xContact;
MIR_FREE(_pszAMPro); ampro(xContact->Attribute("ampro"));
@@ -511,7 +511,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact)
if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
if (_hContact == INVALID_HANDLE_VALUE && vSub.handle() != INVALID_HANDLE_VALUE) {
- HANDLE hMeta = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -610,7 +610,7 @@ int CExImContactXML::ImportContact()
LPGENT("You aborted import of a new contact.\nSome information may be missing for this contact.\n\nDo you want to delete the incomplete contact?"));
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
}
return ERROR_ABORTED;
@@ -674,9 +674,9 @@ int CExImContactXML::Import(BYTE keepMetaSubContact)
return result;
// convert default subcontact to metacontact
- _hContact = (HANDLE)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
+ _hContact = (HCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
if (_hContact == NULL) {
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
return ERROR_CONVERT_METACONTACT;
}
@@ -753,7 +753,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact)
MIR_FREE(ptszMetaNick);
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = INVALID_HANDLE_VALUE;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
}
}
return ERROR_ADDTO_METACONTACT;
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
index d170c6d993..1c552187e2 100644
--- a/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
+++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImModules.cpp
@@ -292,7 +292,7 @@ INT_PTR CALLBACK SelectModulesToExport_DlgProc(HWND hDlg, UINT uMsg, WPARAM wPar
// module must exist in at least one contact
if (pDat->ExImContact->Typ != EXIM_CONTACT) // TRUE = All Contacts
{
- HANDLE hContact;
+ HCONTACT hContact;
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
{
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
index 1949ae96f0..3ddfbe0f93 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.cpp
@@ -37,7 +37,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* file - file to write the settings to
* return nothing
**/
-static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
+static void ExportModule(HCONTACT hContact, LPCSTR pszModule, FILE* file)
{
DB::CEnumList Settings;
@@ -126,7 +126,7 @@ static void ExportModule(HANDLE hContact, LPCSTR pszModule, FILE* file)
* pModules - module to export, NULL to export all modules of a contact
* file - ini file to write the contact to
**/
-static BYTE ExportContact(HANDLE hContact, DB::CEnumList* pModules, FILE* file)
+static BYTE ExportContact(HCONTACT hContact, DB::CEnumList* pModules, FILE* file)
{
CExImContactBase vcc;
@@ -167,7 +167,7 @@ int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName)
errno_t err;
DB::CEnumList Modules;
SYSTEMTIME now;
- HANDLE hContact;
+ HCONTACT hContact;
if (!DlgExImModules_SelectModulesToExport(ExImContact, &Modules, NULL))
{
@@ -298,7 +298,7 @@ static DWORD ImportreadLine(FILE* file, LPSTR &str)
* cchBuf - character count of the buffer
* return: handle to the contact that matches the information or NULL if no match
**/
-static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate)
+static HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
{
CExImContactBase vcc;
@@ -322,7 +322,7 @@ static HANDLE ImportFindContact(HANDLE hContact, LPSTR &strBuf, BYTE bCanCreate)
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
+int ImportSetting(HCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
{
DBVARIANT dbv;
LPSTR end, value;
@@ -433,10 +433,10 @@ int ImportSetting(HANDLE hContact, LPCSTR pszModule, LPSTR &strLine)
* strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
+int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName)
{
FILE *file;
- HANDLE hNewContact = INVALID_HANDLE_VALUE;
+ HCONTACT hNewContact = (HCONTACT)INVALID_HANDLE_VALUE;
DWORD end,
numLines = 0;
CHAR szModule[MAXSETTING] = {0};
@@ -471,7 +471,7 @@ int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
strBuf = mir_strnerase(strBuf, 0, 1);
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != (HCONTACT)INVALID_HANDLE_VALUE)
numContactsAdded++;
continue;
}
@@ -484,13 +484,13 @@ int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName)
*szModule = 0;
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != (HCONTACT)INVALID_HANDLE_VALUE)
numContactsAdded++;
continue;
}
// read modules and settings only for valid contacts
- if (hNewContact != INVALID_HANDLE_VALUE) {
+ if (hNewContact != (HCONTACT)INVALID_HANDLE_VALUE) {
// found a module line
if (strBuf[0] == '[' && (end = (strchr(strBuf, ']') - strBuf)) > 0) {
mir_strncpy(szModule, &strBuf[1], end);
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
index 6961b1b6f7..9d737fcdb8 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImINI.h
@@ -25,6 +25,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#pragma once
int SvcExImINI_Export(lpExImParam ExImContact, LPCSTR pszFileName);
- int SvcExImINI_Import(HANDLE hContact, LPCSTR pszFileName);
+ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName);
#endif /* _SVC_EXIMINI_H_ */
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
index e3b6f45f2c..824c4c0fd1 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.cpp
@@ -557,7 +557,7 @@ size_t CLineBuffer::GetTokenNext(const CHAR delim, CLineBuffer * pBuf)
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -594,7 +594,7 @@ int CLineBuffer::DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -628,7 +628,7 @@ int CLineBuffer::DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const
*
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting)
+int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
{
if (_pVal && _cbUsed > 0)
return db_set_s(hContact, pszModule, pszSetting, (LPSTR)_pVal);
@@ -649,11 +649,11 @@ int CLineBuffer::DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, co
**/
CVCardFileVCF::CVCardFileVCF()
{
- _pFile = NULL;
- _hContact = INVALID_HANDLE_VALUE;
- _pszBaseProto = NULL;
- _hasUtf8 = 0;
- _useUtf8 = FALSE;
+ _pFile = NULL;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _pszBaseProto = NULL;
+ _hasUtf8 = 0;
+ _useUtf8 = FALSE;
}
/**
@@ -850,7 +850,7 @@ void CVCardFileVCF::writeLineEncoded(const CHAR *szSet, size_t *cbRew)
* pszMode - the mode the file should be opened with
* return TRUE or FALSE
**/
-BYTE CVCardFileVCF::Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode)
+BYTE CVCardFileVCF::Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
{
if (!(_pFile = fopen(pszFileName, pszMode)))
return FALSE;
@@ -873,9 +873,9 @@ void CVCardFileVCF::Close(void)
{
if (_pFile)
fclose(_pFile);
- _pFile = NULL;
- _hContact = INVALID_HANDLE_VALUE;
- _pszBaseProto = NULL;
+ _pFile = NULL;
+ _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _pszBaseProto = NULL;
}
/**
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
index 3fbab056e7..2507d83b61 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h
@@ -59,9 +59,9 @@ public:
size_t GetTokenFirst(const CHAR delim, CLineBuffer * pBuf);
size_t GetTokenNext(const CHAR delim, CLineBuffer * pBuf);
- int DBWriteTokenFirst(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteTokenNext(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
- int DBWriteSettingString(HANDLE hContact, const CHAR* pszModule, const CHAR* pszSetting);
+ int DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting);
};
class CVCardFileVCF
@@ -69,7 +69,7 @@ class CVCardFileVCF
private:
CLineBuffer _clVal;
FILE *_pFile;
- HANDLE _hContact;
+ HCONTACT _hContact;
const CHAR *_pszBaseProto;
WORD _cbRew;
BYTE _useUtf8;
@@ -87,7 +87,7 @@ private:
public:
CVCardFileVCF();
- BYTE Open(HANDLE hContact, LPCSTR pszFileName, LPCSTR pszMode);
+ BYTE Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode);
void Close(void);
BYTE Export(BYTE bExportUtf);
BYTE Import();
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
index 61d46dcef8..c4664b0975 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp
@@ -93,7 +93,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName)
LONG cbHeader;
SYSTEMTIME now;
DWORD result;
- HANDLE hContact;
+ HCONTACT hContact;
result = (DWORD)DialogBox(ghInst,
MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY),
@@ -346,7 +346,7 @@ DWORD CFileXml::CountContacts(TiXmlElement* xmlParent)
* pszFileName - full qualified path to the xml file which is to import
* return: ERROR_OK on success or one other element of ImportError to tell the type of failure
**/
-int CFileXml::Import(HANDLE hContact, LPCSTR pszFileName)
+int CFileXml::Import(HCONTACT hContact, LPCSTR pszFileName)
{
TiXmlDocument doc;
TiXmlElement *xmlCard = NULL;
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
index 3ec0ca998a..382fdb6dde 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h
@@ -50,13 +50,13 @@ class CFileXml {
/*
int ExportOwner(FILE *xmlfile, BYTE bExportEvents);
- int ExportContact(FILE *xmlfile, HANDLE hContact, BYTE bExportEvents, LPENUMLIST pModules);
- int ExportSubContact(TiXmlElement *xContact, HANDLE hContact, BYTE bExportEvents);
+ int ExportContact(FILE *xmlfile, HCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
+ int ExportSubContact(TiXmlElement *xContact, HCONTACT hContact, BYTE bExportEvents);
*/
public:
CFileXml();
- int Import(HANDLE hContact, LPCSTR pszFileName);
+ int Import(HCONTACT hContact, LPCSTR pszFileName);
int Export(lpExImParam ExImContact, LPCSTR pszFileName);
};
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
index f331f1f3e3..0632d96f32 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.cpp
@@ -211,7 +211,7 @@ INT_PTR svcExIm_MainExport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = INVALID_HANDLE_VALUE;
+ ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -220,7 +220,7 @@ INT_PTR svcExIm_MainImport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = INVALID_HANDLE_VALUE;
+ ExIm.hContact = (HCONTACT)INVALID_HANDLE_VALUE;
ExIm.Typ = EXIM_ALL;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
@@ -233,7 +233,7 @@ INT_PTR svcExIm_ContactExport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HANDLE)wParam;
+ ExIm.hContact = (HCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Export(&ExIm, (HWND)lParam);
}
@@ -242,7 +242,7 @@ INT_PTR svcExIm_ContactImport_Service(WPARAM wParam, LPARAM lParam)
{
ExImParam ExIm;
ZeroMemory(&ExIm, sizeof(ExIm));
- ExIm.hContact = (HANDLE)wParam;
+ ExIm.hContact = (HCONTACT)wParam;
ExIm.Typ = EXIM_CONTACT;
return SvcExImport_Import(&ExIm, (HWND)lParam);
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
index 16c64c25e3..484c266535 100644
--- a/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
+++ b/plugins/UserInfoEx/src/ex_import/svc_ExImport.h
@@ -26,7 +26,7 @@ typedef struct
{
BYTE Typ;
union {
- HANDLE hContact;
+ HCONTACT hContact;
LPSTR pszName;
LPTSTR ptszName;
};
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.cpp b/plugins/UserInfoEx/src/mir_contactqueue.cpp
index 00c612295d..0c9ff0883b 100644
--- a/plugins/UserInfoEx/src/mir_contactqueue.cpp
+++ b/plugins/UserInfoEx/src/mir_contactqueue.cpp
@@ -123,7 +123,7 @@ void CContactQueue::RemoveAll()
*
* @return nothing
**/
-void CContactQueue::RemoveAll(HANDLE hContact)
+void CContactQueue::RemoveAll(HCONTACT hContact)
{
Lock();
@@ -149,7 +149,7 @@ void CContactQueue::RemoveAll(HANDLE hContact)
*
* @return nothing
**/
-void CContactQueue::RemoveAllConsiderParam(HANDLE hContact, PVOID param)
+void CContactQueue::RemoveAllConsiderParam(HCONTACT hContact, PVOID param)
{
Lock();
@@ -177,7 +177,7 @@ void CContactQueue::RemoveAllConsiderParam(HANDLE hContact, PVOID param)
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::Add(int waitTime, HANDLE hContact, PVOID param)
+BOOL CContactQueue::Add(int waitTime, HCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -201,7 +201,7 @@ BOOL CContactQueue::Add(int waitTime, HANDLE hContact, PVOID param)
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddIfDontHave(int waitTime, HANDLE hContact, PVOID param)
+BOOL CContactQueue::AddIfDontHave(int waitTime, HCONTACT hContact, PVOID param)
{
int i;
BOOL rc;
@@ -235,7 +235,7 @@ BOOL CContactQueue::AddIfDontHave(int waitTime, HANDLE hContact, PVOID param)
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddUnique(int waitTime, HANDLE hContact, PVOID param)
+BOOL CContactQueue::AddUnique(int waitTime, HCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -261,7 +261,7 @@ BOOL CContactQueue::AddUnique(int waitTime, HANDLE hContact, PVOID param)
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HANDLE hContact, PVOID param)
+BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -285,7 +285,7 @@ BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HANDLE hContact, PVOID
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
-BOOL CContactQueue::InternalAdd(int waitTime, HANDLE hContact, PVOID param)
+BOOL CContactQueue::InternalAdd(int waitTime, HCONTACT hContact, PVOID param)
{
BOOL rc;
CQueueItem *qi = (CQueueItem *) mir_alloc(sizeof(CQueueItem));
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.h b/plugins/UserInfoEx/src/mir_contactqueue.h
index b42d89c1a6..4da54dcacc 100644
--- a/plugins/UserInfoEx/src/mir_contactqueue.h
+++ b/plugins/UserInfoEx/src/mir_contactqueue.h
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
struct CQueueItem
{
DWORD check_time;
- HANDLE hContact;
+ HCONTACT hContact;
PVOID param;
};
@@ -65,7 +65,7 @@ public:
*
* @return nothing
**/
- void RemoveAll(HANDLE hContact);
+ void RemoveAll(HCONTACT hContact);
/**
* This function removes all queue items for the hContact considering the correct parameter.
@@ -75,7 +75,7 @@ public:
*
* @return nothing
**/
- void RemoveAllConsiderParam(HANDLE hContact, PVOID param);
+ void RemoveAllConsiderParam(HCONTACT hContact, PVOID param);
/**
* This method adds the desired new item.
@@ -87,7 +87,7 @@ public:
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL Add(int waitTime, HANDLE hContact, PVOID param = NULL);
+ BOOL Add(int waitTime, HCONTACT hContact, PVOID param = NULL);
/**
* This method adds the desired new item only, if the queue does not yet contain
@@ -100,7 +100,7 @@ public:
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL AddIfDontHave(int waitTime, HANDLE hContact, PVOID param = NULL);
+ BOOL AddIfDontHave(int waitTime, HCONTACT hContact, PVOID param = NULL);
/**
* This method removes all existing queue items for the contact and adds a new queue item
@@ -113,7 +113,7 @@ public:
*
* @return nothing
**/
- BOOL AddUnique(int waitTime, HANDLE hContact, PVOID param = NULL);
+ BOOL AddUnique(int waitTime, HCONTACT hContact, PVOID param = NULL);
/**
* This method removes all existing queue items for the contact with the same parameter as @e param
@@ -126,7 +126,7 @@ public:
*
* @return nothing
**/
- BOOL AddUniqueConsiderParam (int waitTime, HANDLE hContact, PVOID param = NULL);
+ BOOL AddUniqueConsiderParam (int waitTime, HCONTACT hContact, PVOID param = NULL);
/**
* This method resumes the worker thread and immitiatly goes on with the next entry.
@@ -140,7 +140,7 @@ public:
protected:
virtual void OnEmpty () {};
- virtual void Callback (HANDLE hContact, PVOID param) = 0;
+ virtual void Callback (HCONTACT hContact, PVOID param) = 0;
/**
* This is the real thread callback function. As long as _status
@@ -198,7 +198,7 @@ private:
* @retval TRUE - The item is added to the queue successfully.
* @retval FALSE - The item is not added to the queue.
**/
- BOOL InternalAdd(int waitTime, HANDLE hContact, PVOID param);
+ BOOL InternalAdd(int waitTime, HCONTACT hContact, PVOID param);
};
#endif // __CONTACTASYNCQUEUE_H__ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp
index ed48c02193..1a41e8da34 100644
--- a/plugins/UserInfoEx/src/mir_db.cpp
+++ b/plugins/UserInfoEx/src/mir_db.cpp
@@ -25,41 +25,41 @@ namespace DB {
namespace MetaContact {
-INT_PTR SubCount(HANDLE hMetaContact)
+INT_PTR SubCount(HCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETNUMCONTACTS, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-INT_PTR SubDefNum(HANDLE hMetaContact)
+INT_PTR SubDefNum(HCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-HANDLE Sub(HANDLE hMetaContact, int idx)
+HCONTACT Sub(HCONTACT hMetaContact, int idx)
{
if (idx != -1) {
INT_PTR result = CallService(MS_MC_GETSUBCONTACT, (WPARAM) hMetaContact, (LPARAM) idx);
- return (result == CALLSERVICE_NOTFOUND) ? NULL : (HANDLE) result;
+ return (result == CALLSERVICE_NOTFOUND) ? NULL : (HCONTACT)result;
}
return NULL;
}
-bool IsSub(HANDLE hContact)
+bool IsSub(HCONTACT hContact)
{
return myGlobals.szMetaProto &&
db_get_b(NULL, myGlobals.szMetaProto, "Enabled", TRUE) &&
db_get_b(hContact, myGlobals.szMetaProto, "IsSubcontact", FALSE);
}
-HANDLE GetMeta(HANDLE hContact)
+HCONTACT GetMeta(HCONTACT hContact)
{
if (!myGlobals.szMetaProto)
return NULL;
- HANDLE result = (HANDLE)CallService(MS_MC_GETMETACONTACT, (WPARAM) hContact, 0);
- return (result == (HANDLE)CALLSERVICE_NOTFOUND) ? NULL : result;
+ HCONTACT result = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (result == (HCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
}
} /* namespace MetaContact */
@@ -76,7 +76,7 @@ namespace Contact {
* @return Returns the display name of a contact.
**/
-LPTSTR DisplayName(HANDLE hContact)
+LPTSTR DisplayName(HCONTACT hContact)
{
return pcli->pfnGetContactDisplayName(hContact, 0);
}
@@ -87,7 +87,7 @@ LPTSTR DisplayName(HANDLE hContact)
* @return This function returns the basic protocol of a contact.
**/
-LPSTR Proto(HANDLE hContact)
+LPSTR Proto(HCONTACT hContact)
{
if (hContact) {
INT_PTR result;
@@ -112,16 +112,16 @@ INT_PTR GetCount()
* Simply adds a new contact without setting up any protocol or something else
* @return HANDLE The function returns the HANDLE of the new contact
**/
-HANDLE Add()
+HCONTACT Add()
{
- return (HANDLE) CallService(MS_DB_CONTACT_ADD, 0, 0);
+ return (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
}
/**
* This function deletes a contact from the database.
* @param hContact - handle to the contact
**/
-BYTE Delete(HANDLE hContact)
+BYTE Delete(HCONTACT hContact)
{
return CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0) != 0;
}
@@ -159,7 +159,7 @@ namespace Module {
* return: nothing
**/
-void Delete(HANDLE hContact, LPCSTR pszModule)
+void Delete(HCONTACT hContact, LPCSTR pszModule)
{
CEnumList Settings;
if (!Settings.EnumSettings(hContact, pszModule))
@@ -187,7 +187,7 @@ static int IsEmptyEnumProc(LPCSTR pszSetting, LPARAM lParam)
* @retval FALSE - the module contains settings
**/
-bool IsEmpty(HANDLE hContact, LPCSTR pszModule)
+bool IsEmpty(HCONTACT hContact, LPCSTR pszModule)
{
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = IsEmptyEnumProc;
@@ -236,7 +236,7 @@ namespace Setting {
* @retval 1 - error
**/
-BYTE Get(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
// read value without translation to specific type
BYTE result = db_get_s(hContact, pszModule, pszSetting, dbv, 0) != 0;
@@ -256,7 +256,7 @@ BYTE Get(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, c
* @return string value
**/
-LPSTR GetAString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetAString(hContact, pszModule, pszSetting, &dbv) == 0){
@@ -277,7 +277,7 @@ LPSTR GetAString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
* @return string value
**/
-LPWSTR GetWString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetWString(hContact, pszModule, pszSetting, &dbv) == 0) {
@@ -302,7 +302,7 @@ LPWSTR GetWString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
* @retval 1 - error
**/
-BYTE GetEx(HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
BYTE result = !pszModule || Get(hContact, pszModule, pszSetting, dbv, destType);
// try to read setting from the contact's protocol module
@@ -311,13 +311,12 @@ BYTE GetEx(HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting
// try to get setting from a metasubcontact
if (result && DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HANDLE hSubContact;
+ HCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
- if (hSubContact != NULL) {
+ if (hSubContact != NULL)
result = DB::Setting::GetEx(hSubContact, pszModule, DB::Contact::Proto(hSubContact), pszSetting, dbv, destType) != 0;
- }
}
// scan all subcontacts for the setting
if (result) {
@@ -348,7 +347,7 @@ BYTE GetEx(HANDLE hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting
* @return This function returns the WORD which contains the source of information.
**/
-WORD GetCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
WORD wFlags = 0;
@@ -367,7 +366,7 @@ WORD GetCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszP
// try to read the setting from the sub contacts' modules
else if (DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HANDLE hSubContact;
+ HCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
@@ -410,7 +409,7 @@ WORD GetCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszP
* @retval FALSE - setting does not exist
**/
-BYTE Exists(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
+BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (pszModule && pszSetting) {
CHAR szDummy[1];
@@ -429,7 +428,7 @@ BYTE Exists(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting)
* @return nothing
**/
-void DeleteArray(HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
+void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
{
CHAR pszSetting[MAXSETTING];
do {
@@ -703,7 +702,7 @@ static FORCEINLINE bool IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bo
*
**/
-bool Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
+bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
{
bool result = false;
DBEVENTINFO edbei;
@@ -827,7 +826,7 @@ INT_PTR CEnumList::EnumModules()
* @retval 0 - success
**/
-INT_PTR CEnumList::EnumSettings(HANDLE hContact, LPCSTR pszModule)
+INT_PTR CEnumList::EnumSettings(HCONTACT hContact, LPCSTR pszModule)
{
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = (DBSETTINGENUMPROC)CEnumList::EnumSettingsProc;
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h
index 27424857fb..2732d6e6f8 100644
--- a/plugins/UserInfoEx/src/mir_db.h
+++ b/plugins/UserInfoEx/src/mir_db.h
@@ -24,12 +24,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
namespace DB {
namespace MetaContact{
- INT_PTR SubCount(HANDLE hMetaContact);
- INT_PTR SubDefNum(HANDLE hMetaContact);
- HANDLE Sub(HANDLE hMetaContact, int idx);
+ INT_PTR SubCount(HCONTACT hMetaContact);
+ INT_PTR SubDefNum(HCONTACT hMetaContact);
+ HCONTACT Sub(HCONTACT hMetaContact, int idx);
- bool IsSub(HANDLE hContact);
- HANDLE GetMeta(HANDLE hContact);
+ bool IsSub(HCONTACT hContact);
+ HCONTACT GetMeta(HCONTACT hContact);
} /* namespace MetaContact */
/**
@@ -37,21 +37,21 @@ namespace MetaContact{
* or modify contacts in the database.
**/
namespace Contact {
- LPTSTR DisplayName(HANDLE hContact);
- LPSTR Proto(HANDLE hContact);
+ LPTSTR DisplayName(HCONTACT hContact);
+ LPSTR Proto(HCONTACT hContact);
INT_PTR GetCount();
- HANDLE Add();
- BYTE Delete(HANDLE hContact);
+ HCONTACT Add();
+ BYTE Delete(HCONTACT hContact);
DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
namespace Module {
- void Delete(HANDLE hContact, LPCSTR pszModule);
- bool IsEmpty(HANDLE hContact, LPCSTR pszModule);
+ void Delete(HCONTACT hContact, LPCSTR pszModule);
+ bool IsEmpty(HCONTACT hContact, LPCSTR pszModule);
bool IsMeta(LPCSTR pszModule);
bool IsMetaAndScan(LPCSTR pszModule);
@@ -62,38 +62,38 @@ namespace Module {
**/
namespace Setting {
- BYTE Get(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE BYTE GetAsIs(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIs(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, 0); }
- static FORCEINLINE BYTE GetAString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE BYTE GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_ASCIIZ); }
- LPSTR GetAString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetWString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_WCHAR); }
- LPWSTR GetWString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetUString(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetUString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_UTF8); }
- BYTE GetEx(HANDLE hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE BYTE GetAsIsEx(HANDLE hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIsEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetEx(hContact, pszModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE LPSTR GetAStringEx(HANDLE hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetAStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_ASCIIZ) && dbv.type == DBVT_ASCIIZ) ? dbv.pszVal : NULL; }
- static FORCEINLINE LPWSTR GetWStringEx(HANDLE hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPWSTR GetWStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_WCHAR) && dbv.type == DBVT_WCHAR) ? dbv.pwszVal : NULL; }
- static FORCEINLINE LPSTR GetUStringEx(HANDLE hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetUStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
{ DBVARIANT dbv; return (!GetEx(hContact, pszModule, szProto, pszSetting, &dbv, DBVT_UTF8) && dbv.type == DBVT_UTF8) ? dbv.pszVal : NULL; }
- WORD GetCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
- static FORCEINLINE WORD GetAsIsCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE WORD GetAsIsCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE WORD GetAStringCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetAStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_ASCIIZ); }
- static FORCEINLINE WORD GetWStringCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetWStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_WCHAR); }
- static FORCEINLINE WORD GetUStringCtrl(HANDLE hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetUStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, DBVT_UTF8); }
#define GetTString GetWString
@@ -104,8 +104,8 @@ namespace Setting {
/**
* misc operations
**/
- BYTE Exists(HANDLE hContact, LPCSTR pszModule, LPCSTR pszSetting);
- void DeleteArray(HANDLE hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
+ BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
} /* namespace Setting */
@@ -115,11 +115,11 @@ namespace Variant {
} /* namespace Variant */
namespace Event {
- HANDLE FindLast(HANDLE hContact);
+ HANDLE FindLast(HCONTACT hContact);
bool GetInfo(HANDLE hEvent, DBEVENTINFO *dbei);
bool GetInfoWithData(HANDLE hEvent, DBEVENTINFO *dbei);
DWORD GetTime(HANDLE hEvent);
- bool Exists(HANDLE hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
+ bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
} /* namespace Events */
/**
@@ -140,7 +140,7 @@ public:
LPSTR Insert(LPCSTR str);
INT_PTR EnumModules();
- INT_PTR EnumSettings(HANDLE hContact, LPCSTR pszModule);
+ INT_PTR EnumSettings(HCONTACT hContact, LPCSTR pszModule);
};
} /* namespace DB */ \ No newline at end of file
diff --git a/plugins/UserInfoEx/src/psp_base.cpp b/plugins/UserInfoEx/src/psp_base.cpp
index ebdf9e1e96..77ec44c285 100644
--- a/plugins/UserInfoEx/src/psp_base.cpp
+++ b/plugins/UserInfoEx/src/psp_base.cpp
@@ -56,46 +56,40 @@ INT_PTR CALLBACK PSPBaseProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
return pCtrlList->OnSetTextColour((HWND)lParam, (HDC)wParam);
case WM_NOTIFY:
- {
- switch (((LPNMHDR)lParam)->idFrom) {
- case 0: {
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
- LPSTR pszProto;
-
- switch (((LPNMHDR)lParam)->code) {
- case PSN_RESET: {
- pCtrlList->OnReset();
- } break;
-
- case PSN_INFOCHANGED: {
- if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
- BOOL bChanged = (GetWindowLongPtr(hDlg, DWLP_MSGRESULT)&PSP_CHANGED)|pCtrlList->OnInfoChanged(hContact, pszProto);
- SetWindowLongPtr(hDlg, DWLP_MSGRESULT, bChanged ? PSP_CHANGED : 0);
- }
- } break;
-
- case PSN_APPLY: {
- if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
- pCtrlList->OnApply(hContact, pszProto);
- }
- } break;
- }
- } break;
+ switch (((LPNMHDR)lParam)->idFrom) {
+ case 0:
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ LPSTR pszProto;
+
+ switch (((LPNMHDR)lParam)->code) {
+ case PSN_RESET:
+ pCtrlList->OnReset();
+ break;
+
+ case PSN_INFOCHANGED:
+ if (PSGetBaseProto(hDlg, pszProto) && *pszProto) {
+ BOOL bChanged = (GetWindowLongPtr(hDlg, DWLP_MSGRESULT)&PSP_CHANGED) | pCtrlList->OnInfoChanged(hContact, pszProto);
+ SetWindowLongPtr(hDlg, DWLP_MSGRESULT, bChanged ? PSP_CHANGED : 0);
+ }
+ break;
+
+ case PSN_APPLY:
+ if (PSGetBaseProto(hDlg, pszProto) && *pszProto)
+ pCtrlList->OnApply(hContact, pszProto);
+ break;
}
- } break;
+ break;
+ }
+ break;
case WM_COMMAND:
- {
- if (!PspIsLocked(hDlg)) {
- pCtrlList->OnChangedByUser(LOWORD(wParam), HIWORD(wParam));
- }
- } break;
+ if (!PspIsLocked(hDlg))
+ pCtrlList->OnChangedByUser(LOWORD(wParam), HIWORD(wParam));
+ break;
case WM_DESTROY:
- {
- // destroy all control objects and the list
- pCtrlList->Release();
- }
+ // destroy all control objects and the list
+ pCtrlList->Release();
}
}
return 0;
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp
index 09f0604ba3..b71f809b49 100644
--- a/plugins/UserInfoEx/src/psp_contact.cpp
+++ b/plugins/UserInfoEx/src/psp_contact.cpp
@@ -41,7 +41,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
if (pCtrlList)
{
TCHAR szAddr[MAX_PATH];
- HANDLE hContact = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -74,7 +74,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
{
case 0:
{
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
HWND hCtrl;
@@ -196,7 +196,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
if (pCtrlList)
{
TCHAR szAddr[MAX_PATH];
- HANDLE hContact = (HANDLE)lParam;
+ HCONTACT hContact = (HCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -227,7 +227,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM
{
case 0:
{
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
HWND hCtrl;
diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp
index 896b016c1c..d881f8b812 100644
--- a/plugins/UserInfoEx/src/psp_general.cpp
+++ b/plugins/UserInfoEx/src/psp_general.cpp
@@ -77,7 +77,7 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
{
case 0:
{
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
char* pszProto;
switch (((LPNMHDR)lParam)->code)
@@ -149,7 +149,7 @@ INT_PTR CALLBACK PSPProcGeneral(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar
case WM_COMMAND:
{
- HANDLE hContact;
+ HCONTACT hContact;
LPCSTR pszProto;
switch (LOWORD(wParam))
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp
index 300eaf9d27..49626f63e7 100644
--- a/plugins/UserInfoEx/src/psp_options.cpp
+++ b/plugins/UserInfoEx/src/psp_options.cpp
@@ -488,7 +488,7 @@ static INT_PTR CALLBACK DlgProc_AdvancedOpts(HWND hDlg, UINT uMsg, WPARAM wParam
LPGENT("This will delete all settings, you've made!\nAll TreeView settings, window positions and any other settings!\n\nAre you sure to procceed?"));
if (WantReset) {
- HANDLE hContact;
+ HCONTACT hContact;
DB::CEnumList Settings;
// delete all skin icons
@@ -706,7 +706,7 @@ static INT_PTR CALLBACK DlgProc_ReminderOpts(HWND hDlg, UINT uMsg, WPARAM wParam
if (bOld != bNew) {
//keep the database clean
MAnnivDate mdb;
- HANDLE hContact = NULL;
+ HCONTACT hContact = NULL;
DBWriteComboByte(hDlg, EDIT_BIRTHMODULE, SET_REMIND_BIRTHMODULE, DEFVAL_REMIND_BIRTHMODULE);
//walk through all the contacts stored in the DB
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
diff --git a/plugins/UserInfoEx/src/psp_origin.cpp b/plugins/UserInfoEx/src/psp_origin.cpp
index 979a574747..6b337a4d5c 100644
--- a/plugins/UserInfoEx/src/psp_origin.cpp
+++ b/plugins/UserInfoEx/src/psp_origin.cpp
@@ -72,7 +72,7 @@ INT_PTR CALLBACK PSPProcOrigin(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPara
{
case 0:
{
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY) lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
switch (((LPNMHDR) lParam)->code)
diff --git a/plugins/UserInfoEx/src/psp_profile.cpp b/plugins/UserInfoEx/src/psp_profile.cpp
index f0e2084f16..098fc8ad72 100644
--- a/plugins/UserInfoEx/src/psp_profile.cpp
+++ b/plugins/UserInfoEx/src/psp_profile.cpp
@@ -278,7 +278,7 @@ static HWND ProfileList_BeginLabelEdit(LPLISTCTRL pList, int iItem, int iSubItem
{
LVITEM lvi;
LPLCITEM pItem;
- HANDLE hContact;
+ HCONTACT hContact;
RECT rcList;
if (!PtrIsValid(pList))
@@ -431,7 +431,7 @@ static BYTE ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENT
{
LPLCITEM pItem;
LVITEM lvi;
- HANDLE hContact;
+ HCONTACT hContact;
if (PtrIsValid(pList) && (pItem = (LPLCITEM)mir_alloc(sizeof(LCITEM)))) {
PSGetContact(hDlg, hContact);
@@ -478,7 +478,7 @@ static int ProfileList_AddItemlistFromDB(
int &iItem,
LPIDSTRLIST idList,
UINT nList,
- HANDLE hContact,
+ HCONTACT hContact,
LPCSTR pszModule,
LPCSTR szCatFormat,
LPCSTR szValFormat,
@@ -1113,7 +1113,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
{
- HANDLE hContact = (HANDLE)((LPPSHNOTIFY)lParam)->lParam;
+ HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
if (!PtrIsValid(pList = (LPLISTCTRL)GetUserData(hList)))
@@ -1144,11 +1144,11 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
// scan all basic protocols for the subcontacts
if (DB::Module::IsMetaAndScan(pszProto)) {
int iDefault = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM)hContact, NULL);
- HANDLE hSubContact, hDefContact;
+ HCONTACT hSubContact, hDefContact;
LPCSTR pszSubBaseProto;
int j, numSubs;
- if ((hDefContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
+ if ((hDefContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
(pszSubBaseProto = DB::Contact::Proto(hDefContact)))
{
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hDefContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
@@ -1158,7 +1158,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
numSubs = CallService(MS_MC_GETNUMCONTACTS, (WPARAM)hContact, NULL);
for (j = 0; j < numSubs; j++) {
if (j == iDefault) continue;
- if (!(hSubContact = (HANDLE)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
+ if (!(hSubContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
if (!(pszSubBaseProto = DB::Contact::Proto(hSubContact))) continue;
if ((numProtoItems += ProfileList_AddItemlistFromDB(pList, iItem, idList, nList, hSubContact, pszSubBaseProto, pFmt[i].szCatFmt, pFmt[i].szValFmt, CTRLF_HASMETA|CTRLF_HASPROTO)) < 0)
return FALSE;
@@ -1270,7 +1270,7 @@ INT_PTR CALLBACK PSPProcContactProfile(HWND hDlg, UINT uMsg, WPARAM wParam, LPAR
{
HMENU hMenu = CreatePopupMenu();
MENUITEMINFO mii;
- HANDLE hContact;
+ HCONTACT hContact;
LVHITTESTINFO hi;
LPLCITEM pItem;
POINT pt;
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp
index abccecb80e..38b3897a43 100644
--- a/plugins/UserInfoEx/src/svc_avatar.cpp
+++ b/plugins/UserInfoEx/src/svc_avatar.cpp
@@ -50,7 +50,7 @@ namespace NServices
*
*
**/
- static void SetZodiacAvatar(HANDLE hContact)
+ static void SetZodiacAvatar(HCONTACT hContact)
{
MAnnivDate mtb;
@@ -76,7 +76,7 @@ namespace NServices
}
}
- void DeleteAvatar(HANDLE hContact)
+ void DeleteAvatar(HCONTACT hContact)
{
if (hContact && db_get_b(hContact, "ContactPhoto", "IsZodiac", FALSE))
{
@@ -94,7 +94,7 @@ namespace NServices
*
*
**/
- static int OnAvatarChanged(HANDLE hContact, AVATARCACHEENTRY *ace)
+ static int OnAvatarChanged(HCONTACT hContact, AVATARCACHEENTRY *ace)
{
if (hContact)
{
@@ -127,7 +127,7 @@ namespace NServices
**/
void Enable(BYTE bEnable)
{
- HANDLE hContact;
+ HCONTACT hContact;
DBVARIANT dbv;
if (bEnable && !ghChangedHook)
diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp
index 0c39d10aec..1743477c89 100644
--- a/plugins/UserInfoEx/src/svc_contactinfo.cpp
+++ b/plugins/UserInfoEx/src/svc_contactinfo.cpp
@@ -705,7 +705,7 @@ INT_PTR GetContactInfo(WPARAM wParam, LPARAM lParam)
static INT_PTR GetContactSettingStrExService(WPARAM wParam, LPARAM lParam)
{
DBCONTACTGETSETTING *cgs = (DBCONTACTGETSETTING*)lParam;
- return DB::Setting::GetEx((HANDLE)wParam, USERINFO,
+ return DB::Setting::GetEx((HCONTACT)wParam, USERINFO,
cgs->szModule, cgs->szSetting, cgs->pValue, cgs->pValue->type);
}
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index 9fae47b727..40bbf256cc 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -39,7 +39,7 @@ bool g_eiEmail = false;
* @retval NULL, if contact does not provide any email address
**/
-static LPSTR Get(HANDLE hContact)
+static LPSTR Get(HCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -84,7 +84,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam)
__try
{
- val = Get((HANDLE) wParam);
+ val = Get((HCONTACT)wParam);
if (val) {
LPSTR szUrl;
INT_PTR len;
@@ -126,8 +126,8 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam)
static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HANDLE)wParam);
- ExtraIcon_SetIcon(ghExtraIconSvc, (HANDLE)wParam, (val) ? ICO_BTN_EMAIL: 0);
+ LPSTR val = Get((HCONTACT)wParam);
+ ExtraIcon_SetIcon(ghExtraIconSvc, (HCONTACT)wParam, (val) ? ICO_BTN_EMAIL : 0);
mir_free(val);
return 0;
}
@@ -139,7 +139,7 @@ static int OnCListApplyIcons(WPARAM wParam, LPARAM lParam)
* @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
@@ -163,7 +163,7 @@ static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HANDLE)wParam);
+ LPSTR val = Get((HCONTACT)wParam);
Menu_ShowItem(ghMenuItem, val != NULL);
mir_free(val);
return 0;
diff --git a/plugins/UserInfoEx/src/svc_gender.cpp b/plugins/UserInfoEx/src/svc_gender.cpp
index 75ddfdf09f..26a26d7aa7 100644
--- a/plugins/UserInfoEx/src/svc_gender.cpp
+++ b/plugins/UserInfoEx/src/svc_gender.cpp
@@ -30,7 +30,7 @@ static HANDLE hApplyIconHook = NULL;
bool g_eiGender = false;
-BYTE GenderOf(HANDLE hContact, LPCSTR pszProto)
+BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIsEx(hContact, USERINFO, pszProto, SET_CONTACT_GENDER, &dbv) == 0) {
@@ -53,7 +53,7 @@ BYTE GenderOf(HANDLE hContact, LPCSTR pszProto)
* @retval 0 - contact does not provide its gender
**/
-BYTE GenderOf(HANDLE hContact)
+BYTE GenderOf(HCONTACT hContact)
{
return GenderOf(hContact, DB::Contact::Proto(hContact));
}
@@ -69,7 +69,7 @@ BYTE GenderOf(HANDLE hContact)
* @param lParam - not used
**/
-static int OnCListApplyIcons(HANDLE hContact, LPARAM)
+static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
{
if (ghExtraIconSvc != INVALID_HANDLE_VALUE) {
char *icoName;
@@ -90,7 +90,7 @@ static int OnCListApplyIcons(HANDLE hContact, LPARAM)
* @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && (pdbcws->value.type <= DBVT_BYTE) && !lstrcmpA(pdbcws->szSetting, SET_CONTACT_GENDER))
OnCListApplyIcons(hContact, 0);
diff --git a/plugins/UserInfoEx/src/svc_gender.h b/plugins/UserInfoEx/src/svc_gender.h
index 8c7c892ccf..1e90820b95 100644
--- a/plugins/UserInfoEx/src/svc_gender.h
+++ b/plugins/UserInfoEx/src/svc_gender.h
@@ -22,8 +22,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#ifndef _UINFOEX_SVCGENDER_H_INCLUDED_
#define _UINFOEX_SVCGENDER_H_INCLUDED_
-BYTE GenderOf(HANDLE hContact, LPCSTR pszProto);
-BYTE GenderOf(HANDLE hContact);
+BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto);
+BYTE GenderOf(HCONTACT hContact);
bool SvcGenderEnableExtraIcons(bool bEnable = false, bool bUpdateDB = false);
void SvcGenderUnloadModule();
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index abc25bfdce..2845570486 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -39,7 +39,7 @@ bool g_eiHome = false;
* @retval NULL if contact provides no homepage
**/
-static LPSTR Get(HANDLE hContact)
+static LPSTR Get(HCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -68,7 +68,7 @@ static LPSTR Get(HANDLE hContact)
static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam)
{
- LPSTR szUrl = Get((HANDLE)wParam);
+ LPSTR szUrl = Get((HCONTACT)wParam);
if (szUrl) {
CallService(MS_UTILS_OPENURL, 1, (LPARAM)szUrl);
mir_free(szUrl);
@@ -89,7 +89,7 @@ static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam)
* @param lParam - not used
**/
-static int OnCListApplyIcons(HANDLE hContact, LPARAM)
+static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
{
LPSTR val = Get(hContact);
if (ghExtraIconSvc != INVALID_HANDLE_VALUE)
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HANDLE hContact, LPARAM)
* @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
@@ -127,7 +127,7 @@ static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HANDLE)wParam);
+ LPSTR val = Get((HCONTACT)wParam);
Menu_ShowItem(ghMenuItem, val != 0);
mir_free(val);
return 0;
diff --git a/plugins/UserInfoEx/src/svc_phone.cpp b/plugins/UserInfoEx/src/svc_phone.cpp
index 258cde98c1..6a510f28c3 100644
--- a/plugins/UserInfoEx/src/svc_phone.cpp
+++ b/plugins/UserInfoEx/src/svc_phone.cpp
@@ -47,7 +47,7 @@ bool g_eiPhone = false;
* @retval PHONE_NONE: The contact does not provide any phone number
**/
-static INT_PTR Get(HANDLE hContact)
+static INT_PTR Get(HCONTACT hContact)
{
INT_PTR nType = PHONE_NONE;
@@ -86,7 +86,7 @@ static INT_PTR Get(HANDLE hContact)
* @param lParam - not used
**/
-static int OnCListApplyIcons(HANDLE hContact, LPARAM)
+static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
{
char *icoName;
switch (Get(hContact)) {
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HANDLE hContact, LPARAM)
* @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && pdbcws && pdbcws->szSetting &&
((pdbcws->value.type & DBVTF_VARIABLELENGTH) || (pdbcws->value.type == DBVT_DELETED)) &&
diff --git a/plugins/UserInfoEx/src/svc_refreshci.cpp b/plugins/UserInfoEx/src/svc_refreshci.cpp
index 0b83a036cb..4d2715dc39 100644
--- a/plugins/UserInfoEx/src/svc_refreshci.cpp
+++ b/plugins/UserInfoEx/src/svc_refreshci.cpp
@@ -485,7 +485,7 @@ class CContactUpdater : public CContactQueue
{
CUpdProgress* _pProgress; // pointer to the progress dialog/popup
HANDLE _hProtoAckEvent; // handle to protocol ack notification
- HANDLE _hContact; // current contact being refreshed
+ HCONTACT _hContact; // current contact being refreshed
PBYTE _hContactAcks; // array of acknoledgements for the current contact to wait for
INT_PTR _nContactAcks; // number of acknoledgements for the current contact to wait for
@@ -627,7 +627,7 @@ class CContactUpdater : public CContactQueue
*
* @return nothing
**/
- virtual void Callback(HANDLE hContact, PVOID param)
+ virtual void Callback(HCONTACT hContact, PVOID param)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -687,7 +687,7 @@ public:
*
*
**/
- BOOL QueueAddRefreshContact(HANDLE hContact, int iWait)
+ BOOL QueueAddRefreshContact(HCONTACT hContact, int iWait)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -708,7 +708,7 @@ public:
{
int iWait = 100;
- for (HANDLE hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
if (QueueAddRefreshContact(hContact, iWait))
iWait += 5000;
@@ -840,13 +840,13 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam)
{
try
{
- DWORD dwStmp = db_get_dw((HANDLE)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ DWORD dwStmp = db_get_dw((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp)
{
MTime mt;
mt.GetLocalTime();
- mt.DBWriteStamp((HANDLE)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
+ mt.DBWriteStamp((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
// create updater, if not yet exists
if (!ContactUpdater)
@@ -858,8 +858,7 @@ static int OnContactAdded(WPARAM wParam, LPARAM lParam)
ContactUpdater->AddIfDontHave(
(ContactUpdater->Size() > 0)
? max(ContactUpdater->Get(ContactUpdater->Size() - 1)->check_time + 15000, 4000)
- : 4000,
- (HANDLE)wParam);
+ : 4000, (HCONTACT)wParam);
}
}
catch(...)
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp
index e0dd88f83e..235694e451 100644
--- a/plugins/UserInfoEx/src/svc_reminder.cpp
+++ b/plugins/UserInfoEx/src/svc_reminder.cpp
@@ -173,7 +173,7 @@ static HICON GetAnnivIcon(const CEvent &evt)
* @return nothing
**/
-static void NotifyWithExtraIcon(HANDLE hContact, const CEvent &evt)
+static void NotifyWithExtraIcon(HCONTACT hContact, const CEvent &evt)
{
if (gRemindOpts.bCListExtraIcon) {
char szIcon[MAXSETTING], *icoName;
@@ -244,7 +244,7 @@ static LRESULT CALLBACK PopupWindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPA
* @return return value of the popup service
**/
-static int NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
+static int NotifyWithPopup(HCONTACT hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
{
if (!gRemindOpts.bPopups)
return 1;
@@ -304,7 +304,7 @@ static int NotifyWithPopup(HANDLE hContact, CEvent::EType eventType, int DaysToA
* @return nothing
**/
-static void NotifyFlashCListIcon(HANDLE hContact, const CEvent &evt)
+static void NotifyFlashCListIcon(HCONTACT hContact, const CEvent &evt)
{
if (!gRemindOpts.bFlashCList || evt._wDaysLeft != 0)
return;
@@ -369,7 +369,7 @@ static BYTE NotifyWithSound(const CEvent &evt)
* "check for anniversary" functions
***********************************************************************************************************/
-static LPCTSTR ContactGender(HANDLE hContact)
+static LPCTSTR ContactGender(HCONTACT hContact)
{
switch (GenderOf(hContact)) {
case 'M': return TranslateT("He");
@@ -378,7 +378,7 @@ static LPCTSTR ContactGender(HANDLE hContact)
return TranslateT("He/She");
}
-static BYTE CheckAnniversaries(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify)
+static BYTE CheckAnniversaries(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
{
int numAnniversaries = 0;
int Diff;
@@ -466,7 +466,7 @@ static BYTE CheckAnniversaries(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bN
* @retval FALSE - contact has no birthday or it is not within the desired period of time.
**/
-static BYTE CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
+static BYTE CheckBirthday(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
{
BYTE result = FALSE;
@@ -534,7 +534,7 @@ static BYTE CheckBirthday(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify
* @return nothing
**/
-static void CheckContact(HANDLE hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0)
+static void CheckContact(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0)
{
// ignore meta subcontacts here as their birthday information are collected explicitly
if (hContact &&
@@ -570,7 +570,7 @@ void SvcReminderCheckAll(const ENotify notify)
now.GetLocalTime();
//walk through all the contacts stored in the DB
- for (HANDLE hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
CheckContact(hContact, now, evt, notify != NOTIFY_CLIST, &a1);
if (notify != NOTIFY_CLIST) {
@@ -623,7 +623,7 @@ static int OnCListRebuildIcons(WPARAM, LPARAM)
* @return This function must return 0 in order to continue in the notification chain.
**/
-int OnCListApplyIcon(HANDLE hContact, LPARAM)
+int OnCListApplyIcon(HCONTACT hContact, LPARAM)
{
if (gRemindOpts.RemindState != REMIND_OFF) {
CEvent evt;
@@ -645,7 +645,7 @@ int OnCListApplyIcon(HANDLE hContact, LPARAM)
* @return This function must return 0 in order to continue in the notification chain.
**/
-static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && // valid contact not owner!
ghCListIA && // extraicons active
@@ -656,7 +656,7 @@ static int OnContactSettingChanged(HANDLE hContact, DBCONTACTWRITESETTING* pdbcw
!strncmp(pdbcws->szSetting, "Anniv", 5) ||
!strncmp(pdbcws->szSetting, "DOB", 3)))
{
- HANDLE hMeta = DB::MetaContact::GetMeta(hContact);
+ HCONTACT hMeta = DB::MetaContact::GetMeta(hContact);
WORD LastAnswer = IDNONE;
CEvent evt;
MTime now;
@@ -727,7 +727,7 @@ static INT_PTR CheckService(WPARAM, LPARAM)
static INT_PTR BackupBirthdayService(WPARAM wParam, LPARAM lParam)
{
- HANDLE hContact = (HANDLE)wParam;
+ HCONTACT hContact = (HCONTACT)wParam;
MAnnivDate mdb;
if (hContact) {
@@ -872,7 +872,7 @@ void SvcReminderEnable(BYTE bEnable)
UpdateTimer(TRUE);
}
else { // Reminder is off
- for (HANDLE hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
NotifyWithExtraIcon(hContact, CEvent());
gRemindOpts.RemindState = REMIND_OFF;
diff --git a/plugins/UserInfoEx/src/svc_timezone.cpp b/plugins/UserInfoEx/src/svc_timezone.cpp
index 37f0a89d11..777a12e2a8 100644
--- a/plugins/UserInfoEx/src/svc_timezone.cpp
+++ b/plugins/UserInfoEx/src/svc_timezone.cpp
@@ -41,7 +41,7 @@ INT_PTR GetContactTimeZoneInformation(WPARAM wParam,LPARAM lParam)
{
//use new core tz interface
LPTIME_ZONE_INFORMATION pTimeZoneInformation = (LPTIME_ZONE_INFORMATION)lParam;
- (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((HANDLE)wParam, 0));
+ (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((HCONTACT)wParam, 0));
return (pTimeZoneInformation == NULL);
}
@@ -58,7 +58,7 @@ INT_PTR GetContactLocalTime(WPARAM wParam, LPARAM lParam)
{
//use new core tz interface
LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam;
- return (INT_PTR)tmi.getTimeZoneTimeByContact((HANDLE)wParam, pSystemTime);
+ return (INT_PTR)tmi.getTimeZoneTimeByContact((HCONTACT)wParam, pSystemTime);
}
/***********************************************************************************************************
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp
index 683af3c65b..641d4c6d3e 100644
--- a/plugins/UserInfoEx/src/svc_timezone_old.cpp
+++ b/plugins/UserInfoEx/src/svc_timezone_old.cpp
@@ -375,7 +375,7 @@ static TZ_MAP MirTZ2WinTZ(const CHAR MirTz)
* @retval CTimeZone* - Pointer to the timezone.
**/
-CTimeZone* GetContactTimeZone(HANDLE hContact, LPCSTR pszProto)
+CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto)
{
LPTSTR ptszName;
CTimeZone* pTimeZone = NULL;
@@ -410,7 +410,7 @@ CTimeZone* GetContactTimeZone(HANDLE hContact, LPCSTR pszProto)
*
**/
-CTimeZone* GetContactTimeZone(HANDLE hContact)
+CTimeZone* GetContactTimeZone(HCONTACT hContact)
{
return GetContactTimeZone(hContact, DB::Contact::Proto(hContact));
}
@@ -431,7 +431,7 @@ CTimeZone* GetContactTimeZone(HANDLE hContact)
* @e dwIndex retrieved its value. If not, dwIndex is -100 (unspecified).
**/
-WORD GetContactTimeZoneCtrl(HANDLE hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
+WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
{
WORD flags;
DBVARIANT dbv;
@@ -476,7 +476,7 @@ WORD GetContactTimeZoneCtrl(HANDLE hContact, LPCSTR pszProto, CTimeZone** pTimeZ
* @return String containing display name.
**/
-LPCTSTR GetContactTimeZoneDisplayName(HANDLE hContact)
+LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact)
{
CTimeZone *pTimeZone;
@@ -561,7 +561,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam)
CTimeZone *pTimeZone;
TIME_ZONE_INFORMATION* pTimeZoneInformation = (TIME_ZONE_INFORMATION*)lParam;
- pTimeZone = GetContactTimeZone((HANDLE)wParam);
+ pTimeZone = GetContactTimeZone((HCONTACT)wParam);
if (pTimeZone && pTimeZoneInformation)
(*pTimeZoneInformation) = *pTimeZone;
@@ -580,7 +580,7 @@ INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam,LPARAM lParam)
INT_PTR GetContactLocalTime_old(WPARAM wParam, LPARAM lParam)
{
MTime now;
- now.GetLocalTime((HANDLE)wParam);
+ now.GetLocalTime((HCONTACT)wParam);
LPSYSTEMTIME pSystemTime = (LPSYSTEMTIME)lParam;
*pSystemTime = now.SystemTime();
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.h b/plugins/UserInfoEx/src/svc_timezone_old.h
index 8d8627039f..073794fd21 100644
--- a/plugins/UserInfoEx/src/svc_timezone_old.h
+++ b/plugins/UserInfoEx/src/svc_timezone_old.h
@@ -78,10 +78,10 @@ struct CTimeZone : public REG_TZI_FORMAT
typedef INT_PTR (*PEnumNamesProc)(CTimeZone* pTimeZone, int index, LPARAM lParam);
-CTimeZone* GetContactTimeZone(HANDLE hContact);
-CTimeZone* GetContactTimeZone(HANDLE hContact, LPCSTR pszProto);
-WORD GetContactTimeZoneCtrl(HANDLE hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
-LPCTSTR GetContactTimeZoneDisplayName(HANDLE hContact);
+CTimeZone* GetContactTimeZone(HCONTACT hContact);
+CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto);
+WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
+LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact);
INT_PTR EnumTimeZones(PEnumNamesProc enumProc, LPARAM lParam);
INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam, LPARAM lParam);