diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
56 files changed, 346 insertions, 346 deletions
diff --git a/plugins/UserInfoEx/src/Flags/svc_flags.cpp b/plugins/UserInfoEx/src/Flags/svc_flags.cpp index 8b35da97e9..c27e8a576d 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((HCONTACT)wParam);
+ char *pszProto = GetContactProto((MCONTACT)wParam);
/* UserinfoEx */
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_ORIGIN_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COUNTRY, 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, USERINFO, SET_CONTACT_COMPANY_COUNTRY, 0))
return countryNumber;
/* fallback proto settings */
- if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "Country", 0))
+ if (countryNumber = db_get_w((MCONTACT)wParam, pszProto, "Country", 0))
return countryNumber;
- if (countryNumber = db_get_w((HCONTACT)wParam, pszProto, "CompanyCountry", 0))
+ if (countryNumber = db_get_w((MCONTACT)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, (HCONTACT)lParam, (countryNumber != 0xFFFF || g_bUseUnknownFlag) ? LoadFlagHandle(countryNumber) : NULL);
+ ExtraIcon_SetIcon(hExtraIconSvc, (MCONTACT)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, HCONTACT hContact)
+MsgWndData::MsgWndData(HWND hwnd, MCONTACT 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 55d57a93ae..974fce9f62 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
{
- HCONTACT m_hContact;
+ MCONTACT m_hContact;
HWND m_hwnd;
int m_countryID;
- MsgWndData(HWND hwnd, HCONTACT hContact);
+ MsgWndData(HWND hwnd, MCONTACT hContact);
~MsgWndData();
void FlagsIconSet();
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index f23bf33c74..bd4396612d 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -255,9 +255,9 @@ MZodiac MAnnivDate::Zodiac() * param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetReminderOpts(HCONTACT hContact)
+int MAnnivDate::DBGetReminderOpts(MCONTACT hContact)
{
- if (!hContact || hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (!hContact || hContact == INVALID_CONTACT_ID)
return 1;
if (_wID == ANID_BIRTHDAY) {
@@ -288,9 +288,9 @@ int MAnnivDate::DBGetReminderOpts(HCONTACT hContact) * param: hContact - handle to a contact to read the date from
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact)
+int MAnnivDate::DBWriteReminderOpts(MCONTACT hContact)
{
- if (!hContact || hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (!hContact || hContact == INVALID_CONTACT_ID)
return 1;
if (_wID == ANID_BIRTHDAY) {
@@ -338,7 +338,7 @@ int MAnnivDate::DBWriteReminderOpts(HCONTACT hContact) * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
ZeroDate();
@@ -373,7 +373,7 @@ int MAnnivDate::DBGetDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPC * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
+int MAnnivDate::DBWriteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear)
{
return
db_set_b(hContact, pszModule, szDay, (BYTE)Day()) ||
@@ -392,7 +392,7 @@ int MAnnivDate::DBWriteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, L * szYear - setting of the year to read
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
+int MAnnivDate::DBDeleteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const
{
int ret;
@@ -415,7 +415,7 @@ int MAnnivDate::DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, * pszSetting - key used to identify the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIs(hContact, pszModule, pszSetting, &dbv))
@@ -438,9 +438,9 @@ int MAnnivDate::DBGetDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSe * pszSetting - key used to save the datestamp
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MAnnivDate::DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
+ if (hContact == INVALID_CONTACT_ID || pszModule == 0 || *pszModule == 0 || pszSetting == 0 || *pszSetting == 0)
return 1;
DWORD dwStamp = DateStamp();
@@ -459,7 +459,7 @@ int MAnnivDate::DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR psz * pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto)
+int MAnnivDate::DBGetBirthDate(MCONTACT hContact, LPSTR pszProto)
{
Clear();
@@ -484,7 +484,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT 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) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, def);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -498,7 +498,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto) if (cnt < INT_MAX) {
for (int i = 0; i < cnt; i++) {
if (i != def) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
if (hSubContact != NULL && !DBGetBirthDate(hSubContact, NULL)) {
RemoveFlags(MADF_HASCUSTOM);
SetFlags(MADF_HASMETA);
@@ -523,7 +523,7 @@ int MAnnivDate::DBGetBirthDate(HCONTACT hContact, LPSTR pszProto) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew)
+int MAnnivDate::DBMoveBirthDate(MCONTACT hContact, BYTE bOld, BYTE bNew)
{
Clear();
switch(bOld) {
@@ -558,7 +558,7 @@ int MAnnivDate::DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteBirthDate(HCONTACT hContact)
+int MAnnivDate::DBWriteBirthDate(MCONTACT hContact)
{
LPCSTR pszModule = SvcReminderGetMyBirthdayModule();
@@ -601,7 +601,7 @@ int MAnnivDate::DBWriteBirthDate(HCONTACT hContact) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact)
+int MAnnivDate::DBDeleteBirthDate(MCONTACT hContact)
{
return DBDeleteDate(hContact, Module(), SET_CONTACT_BIRTHDAY, SET_CONTACT_BIRTHMONTH, SET_CONTACT_BIRTHYEAR);
}
@@ -619,7 +619,7 @@ int MAnnivDate::DBDeleteBirthDate(HCONTACT hContact) * return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex)
+int MAnnivDate::DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex)
{
Clear();
@@ -651,7 +651,7 @@ int MAnnivDate::DBGetAnniversaryDate(HCONTACT hContact, WORD iIndex) * pszProto - basic protocol module
* return: 0 on success, 1 otherwise
**/
-int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex)
+int MAnnivDate::DBWriteAnniversaryDate(MCONTACT 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) {
@@ -675,7 +675,7 @@ int MAnnivDate::DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex) * automatic backup service
***********************************************************************************************************/
-static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
+static WORD AskUser(MCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *pNewProtoDate)
{
MSGBOX MB;
TCHAR szMsg[MAXDATASIZE];
@@ -709,7 +709,7 @@ static WORD AskUser(HCONTACT hContact, MAnnivDate *pOldCustomDate, MAnnivDate *p * return: 0 if backup was done, 1 otherwise
**/
-int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
+int MAnnivDate::BackupBirthday(MCONTACT hContact, LPSTR pszProto, const BYTE bDontIgnoreAnything, PWORD lastAnswer)
{
if (!hContact)
return 1;
@@ -744,7 +744,7 @@ int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDo // 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++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT 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())
@@ -769,7 +769,7 @@ int MAnnivDate::BackupBirthday(HCONTACT hContact, LPSTR pszProto, const BYTE bDo // update metasubcontacts
for (int i = 0; i < nSubContactCount; i++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(hContact, i);
+ MCONTACT 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 c2ebffbe89..bca4cd22c2 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
- int DBDeleteDate(HCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear) const;
+ int DBWriteDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBDeleteDate(MCONTACT 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(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);
+ int DBGetDate(MCONTACT hContact, LPCSTR pszModule, LPCSTR szDay, LPCSTR szMonth, LPCSTR szYear);
+ int DBGetDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetAnniversaryDate(MCONTACT hContact, WORD iIndex);
+ int DBGetBirthDate(MCONTACT hContact, LPSTR pszProto = NULL);
+ int DBGetReminderOpts(MCONTACT hContact);
// write date to database
- int DBWriteDateStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteAnniversaryDate(HCONTACT hContact, WORD wIndex);
- int DBWriteBirthDate(HCONTACT hContact);
- int DBWriteReminderOpts(HCONTACT hContact);
+ int DBWriteDateStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteAnniversaryDate(MCONTACT hContact, WORD wIndex);
+ int DBWriteBirthDate(MCONTACT hContact);
+ int DBWriteReminderOpts(MCONTACT hContact);
// delete date from database
- int DBDeleteBirthDate(HCONTACT hContact);
+ int DBDeleteBirthDate(MCONTACT hContact);
- int DBMoveBirthDate(HCONTACT hContact, BYTE bOld, BYTE bNew);
- int BackupBirthday (HCONTACT hContact, LPSTR pszProto = NULL, const BYTE bDontIgnoreAnything = FALSE, PWORD lastAnswer = NULL);
+ int DBMoveBirthDate(MCONTACT hContact, BYTE bOld, BYTE bNew);
+ int BackupBirthday (MCONTACT 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 190488b10a..65939b07ad 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(HCONTACT hContact)
+void MTime::GetLocalTime(MCONTACT hContact)
{
TIME_ZONE_INFORMATION tzi;
@@ -423,9 +423,9 @@ void MTime::GetLocalTime(HCONTACT hContact) * read and write time to miranda's database
*********************************************/
-int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBGetStamp (MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
+ if (hContact == INVALID_CONTACT_ID || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0) {
ZeroDate();
return 1;
}
@@ -440,9 +440,9 @@ int MTime::DBGetStamp (HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) return 0;
}
-int MTime::DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+int MTime::DBWriteStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
+ if (hContact == INVALID_CONTACT_ID || pszModule == NULL || pszModule[0] == 0 || pszSetting == NULL || pszSetting[0] == 0)
return 1;
return db_set_dw(hContact, pszModule, pszSetting, TimeStamp());
diff --git a/plugins/UserInfoEx/src/classMTime.h b/plugins/UserInfoEx/src/classMTime.h index 1363a0247b..d0f02420fd 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(HCONTACT hContact);
+ void GetLocalTime(MCONTACT hContact);
// conversions
void UTCToLocal();
@@ -100,8 +100,8 @@ public: void TzSpecificLocalToUTC(TIME_ZONE_INFORMATION *tzi);
// read and write from and to db
- int DBGetStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- int DBWriteStamp(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBGetStamp(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ int DBWriteStamp(MCONTACT 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 c0041d26e5..f71a0ff047 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) {
- HCONTACT hContact;
+ MCONTACT hContact;
PSGetContact(_hwndDlg, hContact);
@@ -233,7 +233,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex) // only delete values, but not the item
if (_pDates[wIndex]->Id() == ANID_BIRTHDAY) {
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
PSGetContact(_hwndDlg, hContact);
@@ -273,7 +273,7 @@ INT_PTR CAnnivEditCtrl::DeleteDate(WORD wIndex) * param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto)
+INT_PTR CAnnivEditCtrl::DBGetBirthDay(MCONTACT hContact, LPCSTR pszProto)
{
MAnnivDate mdb;
@@ -290,7 +290,7 @@ INT_PTR CAnnivEditCtrl::DBGetBirthDay(HCONTACT hContact, LPCSTR pszProto) * param:
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBGetAnniversaries(MCONTACT hContact)
{
MAnnivDate mda;
@@ -317,7 +317,7 @@ INT_PTR CAnnivEditCtrl::DBGetAnniversaries(HCONTACT hContact) * param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBWriteBirthDay(MCONTACT hContact)
{
MAnnivDate *pmdb;
@@ -346,7 +346,7 @@ INT_PTR CAnnivEditCtrl::DBWriteBirthDay(HCONTACT hContact) * param: hContact - the contact to write the anniversaries to
* return: 0 on success 1 otherwise
**/
-INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(HCONTACT hContact)
+INT_PTR CAnnivEditCtrl::DBWriteAnniversaries(MCONTACT 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()
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
int state;
TCHAR buf[6];
@@ -606,7 +606,7 @@ void CAnnivEditCtrl::SetZodiacAndAge(MAnnivDate *mt) }
}
-BOOL CAnnivEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto)
+BOOL CAnnivEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged;
bChanged = DBGetBirthDay(hContact, pszProto);
@@ -616,7 +616,7 @@ BOOL CAnnivEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) return bChanged;
}
-void CAnnivEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CAnnivEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
DBWriteBirthDay(hContact);
DBWriteAnniversaries(hContact);
diff --git a/plugins/UserInfoEx/src/ctrl_annivedit.h b/plugins/UserInfoEx/src/ctrl_annivedit.h index 932fe8f49f..96caf188fd 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(HCONTACT hContact, LPCSTR pszProto);
- INT_PTR DBWriteBirthDay(HCONTACT hContact);
+ INT_PTR DBGetBirthDay(MCONTACT hContact, LPCSTR pszProto);
+ INT_PTR DBWriteBirthDay(MCONTACT hContact);
- INT_PTR DBGetAnniversaries(HCONTACT hContact);
- INT_PTR DBWriteAnniversaries(HCONTACT hContact);
+ INT_PTR DBGetAnniversaries(MCONTACT hContact);
+ INT_PTR DBWriteAnniversaries(MCONTACT 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(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT 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 5e90f7f989..1151592fe5 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(HCONTACT hContact, LPCSTR pszProto)
+BOOL CCtrlList::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
BOOL bChanged = 0;
INT_PTR i;
@@ -238,7 +238,7 @@ BOOL CCtrlList::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
*
**/
-void CCtrlList::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CCtrlList::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
INT_PTR i;
diff --git a/plugins/UserInfoEx/src/ctrl_base.h b/plugins/UserInfoEx/src/ctrl_base.h index 20ef261090..22aacd2baf 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(HCONTACT hContact, LPCSTR pszProto) { return 0; }
+ virtual BOOL OnInfoChanged(MCONTACT 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(HCONTACT hContact, LPCSTR pszProto) { }
+ virtual void OnApply(MCONTACT 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(HCONTACT hContact, LPCSTR pszProto);
- void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ void OnApply(MCONTACT 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 42a6d6df00..b32ea49ee0 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(HCONTACT hContact, LPCSTR pszProto)
+BOOL CCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged && _pList != NULL)
{
@@ -196,7 +196,7 @@ BOOL CCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_combo.h b/plugins/UserInfoEx/src/ctrl_combo.h index ad5ea0aa54..b2e2dc1ecf 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(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT 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 12286d6f71..7739fc9bf0 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) {
- HCONTACT hContact = NULL;
+ MCONTACT 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) {
- HCONTACT hContact;
+ MCONTACT 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;
- HCONTACT hContact;
+ MCONTACT 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) {
- HCONTACT hContact;
+ MCONTACT hContact;
BYTE bEnabled;
PSGetContact(GetParent(hwnd), hContact);
@@ -1277,7 +1277,7 @@ int CtrlContactAddItemFromDB( HWND hCtrl,
LPCSTR szIcon,
LPTSTR szItem,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szSettingVal)
@@ -1330,7 +1330,7 @@ int CtrlContactAddMyItemsFromDB( HWND hCtrl,
LPCSTR szIcon,
WORD wForcedFlags,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
@@ -1406,7 +1406,7 @@ int CtrlContactAddMyItemsFromDB( **/
int CtrlContactWriteItemToDB(
HWND hCtrl,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR pszSetting)
@@ -1448,7 +1448,7 @@ int CtrlContactWriteItemToDB( int CtrlContactWriteMyItemsToDB(
HWND hCtrl,
int iFirstItem,
- HCONTACT hContact,
+ MCONTACT hContact,
LPCSTR pszModule,
LPCSTR pszProto,
LPCSTR szFormatCat,
diff --git a/plugins/UserInfoEx/src/ctrl_contact.h b/plugins/UserInfoEx/src/ctrl_contact.h index 92cc6894ff..20a5f23902 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, 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);
+int CtrlContactAddItemFromDB(HWND hCtrl, LPCSTR szIcon, LPTSTR szItem, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szSettingVal);
+int CtrlContactAddMyItemsFromDB(HWND hCtrl, LPCSTR szIcon, WORD wForcedFlags, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR szFormatCat, LPCSTR szFormatVal);
+int CtrlContactWriteItemToDB(HWND hCtrl, MCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting);
+int CtrlContactWriteMyItemsToDB(HWND hCtrl, int iFirstItem, MCONTACT 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 c87490dba0..1b4ecac93e 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(HCONTACT hContact, LPCSTR pszProto)
+BOOL CEditCtrl::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged)
{
@@ -165,7 +165,7 @@ BOOL CEditCtrl::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CEditCtrl::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CEditCtrl::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_edit.h b/plugins/UserInfoEx/src/ctrl_edit.h index 4e569645ba..2166d74831 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(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT 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 d98c591f34..dfa4084a83 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(HCONTACT hContact, LPCSTR pszProto)
+BOOL CTzCombo::OnInfoChanged(MCONTACT hContact, LPCSTR pszProto)
{
if (!_Flags.B.hasChanged) {
//use new core tz interface to change the cbbox
@@ -198,7 +198,7 @@ BOOL CTzCombo::OnInfoChanged(HCONTACT hContact, LPCSTR pszProto) *
* @return nothing
**/
-void CTzCombo::OnApply(HCONTACT hContact, LPCSTR pszProto)
+void CTzCombo::OnApply(MCONTACT hContact, LPCSTR pszProto)
{
if (_Flags.B.hasChanged)
{
diff --git a/plugins/UserInfoEx/src/ctrl_tzcombo.h b/plugins/UserInfoEx/src/ctrl_tzcombo.h index 487792ebd5..08e5ef092d 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(HCONTACT hContact, LPCSTR pszProto);
- virtual void OnApply(HCONTACT hContact, LPCSTR pszProto);
+ virtual BOOL OnInfoChanged(MCONTACT hContact, LPCSTR pszProto);
+ virtual void OnApply(MCONTACT 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 d451d11ad5..42e7d3e525 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -91,12 +91,12 @@ class CAnnivList struct CItemData
{
- HCONTACT _hContact;
+ MCONTACT _hContact;
MAnnivDate* _pDate;
WORD _wDaysBefore;
BYTE _wReminderState;
- CItemData(HCONTACT hContact, MAnnivDate &date)
+ CItemData(MCONTACT hContact, MAnnivDate &date)
{
_hContact = hContact;
_wReminderState = date.RemindOption();
@@ -740,7 +740,7 @@ class CAnnivList * @retval TRUE if successful
* @retval FALSE if failed
**/
- BYTE AddRow(HCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
+ BYTE AddRow(MCONTACT hContact, LPCSTR pszProto, MAnnivDate &ad, MTime &mtNow, WORD wDaysBefore)
{
TCHAR szText[MAX_PATH];
int diff, iItem = -1;
@@ -826,7 +826,7 @@ class CAnnivList mtNow.GetLocalTime();
// insert the items into the list
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
{
// ignore meta subcontacts here, as they are not interesting.
if (!DB::MetaContact::IsSub(hContact)) {
diff --git a/plugins/UserInfoEx/src/dlg_msgbox.cpp b/plugins/UserInfoEx/src/dlg_msgbox.cpp index 470d988a1f..3df5b58e95 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 - HCONTACT hContact which can display an avatar for popups
+* @param wParam - MCONTACT 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 1efc6eb034..a8ec59ab5c 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, (HCONTACT)wParam)) {
+ if (HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)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 = (HCONTACT)wParam;
+ psh._hContact = (MCONTACT)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((HCONTACT)wParam);
+ psh._pszPrefix = psh._pszProto = DB::Contact::Proto((MCONTACT)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((HCONTACT)wParam);
+ int numSubs = DB::MetaContact::SubCount((MCONTACT)wParam);
psh._dwFlags &= ~PSF_PROTOPAGESONLY_INIT;
psh._dwFlags |= PSF_PROTOPAGESONLY;
for (int i = 0; i < numSubs; i++) {
- psh._hContact = DB::MetaContact::Sub((HCONTACT)wParam, i);
+ psh._hContact = DB::MetaContact::Sub((MCONTACT)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 = (HCONTACT)wParam;
+ psh._hContact = (MCONTACT)wParam;
}
// sort the pages by the position read from database
@@ -409,7 +409,7 @@ static INT_PTR AddPage(WPARAM wParam, LPARAM lParam) **/
static int OnDeleteContact(WPARAM wParam, LPARAM lParam)
{
- HWND hWnd = WindowList_Find(ghWindowList, (HCONTACT)wParam);
+ HWND hWnd = WindowList_Find(ghWindowList, (MCONTACT)wParam);
if (hWnd != NULL)
DestroyWindow(hWnd);
return 0;
@@ -986,15 +986,15 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar : pPs->pTree->CurrentItem();
// prefer to return the contact accociated with the current page
- if (pti && pti->hContact() != (HCONTACT)INVALID_HANDLE_VALUE) {
- *(HCONTACT*)lParam = pti->hContact();
+ if (pti && pti->hContact() != INVALID_CONTACT_ID) {
+ *(MCONTACT*)lParam = pti->hContact();
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, (LONG_PTR)pti->hContact());
return TRUE;
}
// return contact who owns the details dialog
- if (pPs->hContact != (HCONTACT)INVALID_HANDLE_VALUE) {
- *(HCONTACT*)lParam = pPs->hContact;
+ if (pPs->hContact != INVALID_CONTACT_ID) {
+ *(MCONTACT*)lParam = pPs->hContact;
SetWindowLongPtr(hDlg, DWLP_MSGRESULT, (LONG_PTR)pPs->hContact);
return TRUE;
}
@@ -1356,13 +1356,13 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar **/
case HM_SETTING_CHANGED:
if (!(pPs->dwFlags & PSF_LOCKED)) {
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBCONTACTWRITESETTING *pdbcws = (DBCONTACTWRITESETTING*)lParam;
if (hContact != pPs->hContact) {
if (!myGlobals.szMetaProto)
break;
- if (pPs->hContact != (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL))
+ if (pPs->hContact != (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, NULL))
break;
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
break;
@@ -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++) {
- HCONTACT hSubContact = DB::MetaContact::Sub(pPs->hContact, i);
+ MCONTACT 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 88e9f4a643..8e28a102cc 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;
- HCONTACT _hContact; // contact the page is accociated with (may be a meta subcontact if details dialog is shown for a meta contact)
+ MCONTACT _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 HCONTACT hContact() const { return _hContact; };
+ __inline MCONTACT 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
- HCONTACT _hContact; // handle to the owning contact
+ MCONTACT _hContact; // handle to the owning contact
LPCSTR _pszProto; // owning contact's protocol
LPCSTR _pszPrefix; // name prefix for treeitem settings
CPsTreeItem** _pPages; // the pages
@@ -238,7 +238,7 @@ public: struct TAckInfo
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPINT acks;
int count;
};
@@ -246,7 +246,7 @@ struct TAckInfo struct TPropSheet
{
// dialogs owner
- HCONTACT hContact;
+ MCONTACT 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 023f551096..67681553b8 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -39,7 +39,7 @@ CExImContactBase::CExImContactBase() _pszUIDKey = NULL;
_dbvUIDHash = NULL;
ZeroMemory(&_dbvUID, sizeof(DBVARIANT));
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_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(HCONTACT hContact)
+BYTE CExImContactBase::fromDB(MCONTACT hContact)
{
BYTE ret = FALSE;
BYTE isChatRoom = FALSE;
@@ -224,14 +224,14 @@ BYTE CExImContactBase::fromIni(LPSTR& row) * param: hMetaContact - a meta contact to add this contact to
* return: handle of the contact if successful
**/
-HCONTACT CExImContactBase::toDB()
+MCONTACT CExImContactBase::toDB()
{
// create new contact if none exists
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
+ if (_hContact == INVALID_CONTACT_ID && _pszProto && _pszUIDKey && _dbvUID.type != DBVT_DELETED) {
PROTOACCOUNT* pszAccount = 0;
if (NULL == (pszAccount = ProtoGetAccount( _pszProto ))) {
//account does not exist
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
if (!IsAccountEnabled(pszAccount)) {
;
@@ -239,17 +239,17 @@ HCONTACT CExImContactBase::toDB() // create new contact
_hContact = DB::Contact::Add();
if (!_hContact) {
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// Add the protocol to the new contact
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)_hContact, (LPARAM)_pszProto)) {
DB::Contact::Delete(_hContact);
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// write uid to protocol module
if (db_set(_hContact, _pszProto, _pszUIDKey, &_dbvUID)) {
DB::Contact::Delete(_hContact);
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
// write nick and display name
if (_pszNick) db_set_utf(_hContact, _pszProto, SET_CONTACT_NICK, _pszNick);
@@ -473,7 +473,7 @@ BYTE CExImContactBase::isMeta() const return DB::Module::IsMeta(_pszProto);
}
-BYTE CExImContactBase::isHandle(HCONTACT hContact)
+BYTE CExImContactBase::isHandle(MCONTACT hContact)
{
LPCSTR pszProto;
DBVARIANT dbv;
@@ -521,9 +521,9 @@ BYTE CExImContactBase::isHandle(HCONTACT hContact) * param: none
* return: handle if successful, INVALID_HANDLE_VALUE otherwise
**/
-HCONTACT CExImContactBase::findHandle()
+MCONTACT CExImContactBase::findHandle()
{
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact)) {
if (isHandle(hContact)) {
_hContact = hContact;
_isNewContact = FALSE;
@@ -531,5 +531,5 @@ HCONTACT CExImContactBase::findHandle() }
}
_isNewContact = TRUE;
- return _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ return _hContact = INVALID_CONTACT_ID;
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h index e248c1d2a7..90e080b34e 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.h +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.h @@ -37,17 +37,17 @@ protected: LPSTR _pszUIDKey;
DWORD _dbvUIDHash;
DBVARIANT _dbvUID;
- HCONTACT _hContact;
+ MCONTACT _hContact;
BYTE _isNewContact; // is this contact a new one?
- HCONTACT findHandle();
+ MCONTACT findHandle();
public:
CExImContactBase();
~CExImContactBase();
__inline DBVARIANT& uid() { return _dbvUID; }
- __inline HCONTACT handle() const { return _hContact; }
+ __inline MCONTACT 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; }
@@ -72,16 +72,16 @@ public: mir_free(temp);
}
- BYTE isHandle(HCONTACT hContact);
+ BYTE isHandle(MCONTACT hContact);
BYTE isMeta() const;
LPSTR uid2String(BYTE bPrependType);
- BYTE fromDB(HCONTACT hContact);
+ BYTE fromDB(MCONTACT hContact);
BYTE fromIni(LPSTR& row);
- HCONTACT toDB();
+ MCONTACT toDB();
void toIni(FILE* file, int modCount);
- BYTE operator = (HCONTACT hContact) { return fromDB(hContact); }
+ BYTE operator = (MCONTACT hContact) { return fromDB(hContact); }
};
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index 1bef0889b8..de9db38883 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -207,7 +207,7 @@ int CExImContactXML::Export(FILE *xmlfile, DB::CEnumList* pModules) if (!xmlfile)
return ERROR_INVALID_PARAMS;
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE)
+ if (_hContact == INVALID_CONTACT_ID)
return ERROR_INVALID_CONTACT;
if (!CreateXmlElement())
@@ -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);
- HCONTACT hSubContact = DB::MetaContact::Sub(_hContact, def);
+ MCONTACT 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 = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_xmlNode = xContact;
MIR_FREE(_pszAMPro); ampro(xContact->Attribute("ampro"));
@@ -510,8 +510,8 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) CExImContactXML vSub(_pXmlFile);
if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
- if (_hContact == (HCONTACT)INVALID_HANDLE_VALUE && vSub.handle() != (HCONTACT)INVALID_HANDLE_VALUE) {
- HCONTACT hMeta = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ if (_hContact == INVALID_CONTACT_ID && vSub.handle() != INVALID_CONTACT_ID) {
+ MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -520,7 +520,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) }
}
// if no handle was found, this is a new meta contact
- _isNewContact = _hContact == (HCONTACT)INVALID_HANDLE_VALUE;
+ _isNewContact = _hContact == INVALID_CONTACT_ID;
}
// entry is a default contact
else {
@@ -588,7 +588,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) int CExImContactXML::ImportContact()
{
// create the contact if not yet exists
- if (toDB() != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (toDB() != INVALID_CONTACT_ID) {
_hEvent = NULL;
// count settings and events and init progress dialog
@@ -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 = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
return ERROR_ABORTED;
@@ -674,9 +674,9 @@ int CExImContactXML::Import(BYTE keepMetaSubContact) return result;
// convert default subcontact to metacontact
- _hContact = (HCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
+ _hContact = (MCONTACT)CallService(MS_MC_CONVERTTOMETA, (WPARAM)vContact.handle(), NULL);
if (_hContact == NULL) {
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
return ERROR_CONVERT_METACONTACT;
}
@@ -736,7 +736,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) return err;
// check if contact is subcontact of the desired meta contact
- if ((HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
+ if ((MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
// add contact to the metacontact (this service returns TRUE if successful)
err = CallService(MS_MC_ADDTOMETA, (WPARAM)_hContact, (LPARAM)pMetaContact->handle());
if (err == FALSE) {
@@ -753,7 +753,7 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) MIR_FREE(ptszMetaNick);
if (result == IDYES) {
DB::Contact::Delete(_hContact);
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
}
}
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 1c552187e2..f6b36c931f 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
{
- HCONTACT hContact;
+ MCONTACT 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 acd8410463..458e41d901 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(HCONTACT hContact, LPCSTR pszModule, FILE* file)
+static void ExportModule(MCONTACT hContact, LPCSTR pszModule, FILE* file)
{
DB::CEnumList Settings;
@@ -126,7 +126,7 @@ static void ExportModule(HCONTACT 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(HCONTACT hContact, DB::CEnumList* pModules, FILE* file)
+static BYTE ExportContact(MCONTACT 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;
- HCONTACT hContact;
+ MCONTACT hContact;
if (!DlgExImModules_SelectModulesToExport(ExImContact, &Modules, NULL))
{
@@ -298,12 +298,12 @@ 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 HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
+static MCONTACT ImportFindContact(MCONTACT hContact, LPSTR &strBuf, BYTE bCanCreate)
{
CExImContactBase vcc;
vcc.fromIni(strBuf);
- if (vcc.handle() != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (vcc.handle() != INVALID_CONTACT_ID) {
//if (vcc.isHandle(hContact))
// return hContact;
return vcc.handle();
@@ -322,7 +322,7 @@ static HCONTACT ImportFindContact(HCONTACT hContact, LPSTR &strBuf, BYTE bCanCre * strLine - string with the setting and its value to write to db
* return: 0 if writing was ok, 1 otherwise
**/
-int ImportSetting(HCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
+int ImportSetting(MCONTACT hContact, LPCSTR pszModule, LPSTR &strLine)
{
DBVARIANT dbv;
LPSTR end, value;
@@ -433,10 +433,10 @@ int ImportSetting(HCONTACT 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(HCONTACT hContact, LPCSTR pszFileName)
+int SvcExImINI_Import(MCONTACT hContact, LPCSTR pszFileName)
{
FILE *file;
- HCONTACT hNewContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ MCONTACT hNewContact = INVALID_CONTACT_ID;
DWORD end,
numLines = 0;
CHAR szModule[MAXSETTING] = {0};
@@ -452,11 +452,11 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) numLines++;
// contact was found and imported
- if (hContact != (HCONTACT)INVALID_HANDLE_VALUE && hNewContact != (HCONTACT)INVALID_HANDLE_VALUE)
+ if (hContact != INVALID_CONTACT_ID && hNewContact != INVALID_CONTACT_ID)
break;
// importing settings is only valid vor the main menu item
- if (hContact == (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hContact == INVALID_CONTACT_ID) {
if (!strncmp(strBuf, "SETTINGS:", 9)) {
*szModule = 0;
hNewContact = NULL;
@@ -471,7 +471,7 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) strBuf = mir_strnerase(strBuf, 0, 1);
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, FALSE)) != INVALID_CONTACT_ID)
numContactsAdded++;
continue;
}
@@ -484,13 +484,13 @@ int SvcExImINI_Import(HCONTACT hContact, LPCSTR pszFileName) *szModule = 0;
numContactsInFile++;
- if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((hNewContact = ImportFindContact(hContact, strBuf, TRUE)) != INVALID_CONTACT_ID)
numContactsAdded++;
continue;
}
// read modules and settings only for valid contacts
- if (hNewContact != (HCONTACT)INVALID_HANDLE_VALUE) {
+ if (hNewContact != INVALID_CONTACT_ID) {
// 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 9d737fcdb8..250df73991 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(HCONTACT hContact, LPCSTR pszFileName);
+ int SvcExImINI_Import(MCONTACT 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 0cea3cff25..0f27390c84 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(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenFirst(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -594,7 +594,7 @@ int CLineBuffer::DBWriteTokenFirst(HCONTACT hContact, const CHAR* pszModule, con *
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
+int CLineBuffer::DBWriteTokenNext(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim)
{
PBYTE here;
int iRet = 1;
@@ -628,7 +628,7 @@ int CLineBuffer::DBWriteTokenNext(HCONTACT hContact, const CHAR* pszModule, cons *
* return: 0 if successful, 1 otherwise
**/
-int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
+int CLineBuffer::DBWriteSettingString(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting)
{
if (_pVal && _cbUsed > 0)
return db_set_s(hContact, pszModule, pszSetting, (LPSTR)_pVal);
@@ -650,7 +650,7 @@ int CLineBuffer::DBWriteSettingString(HCONTACT hContact, const CHAR* pszModule, CVCardFileVCF::CVCardFileVCF()
{
_pFile = NULL;
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_pszBaseProto = NULL;
_hasUtf8 = 0;
_useUtf8 = FALSE;
@@ -850,11 +850,11 @@ 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(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
+BYTE CVCardFileVCF::Open(MCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode)
{
if (!(_pFile = fopen(pszFileName, pszMode)))
return FALSE;
- if ((_hContact = hContact) == (HCONTACT)INVALID_HANDLE_VALUE)
+ if ((_hContact = hContact) == INVALID_CONTACT_ID)
return FALSE;
if (!(_pszBaseProto = DB::Contact::Proto(_hContact)))
return FALSE;
@@ -874,7 +874,7 @@ void CVCardFileVCF::Close(void) if (_pFile)
fclose(_pFile);
_pFile = NULL;
- _hContact = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContact = INVALID_CONTACT_ID;
_pszBaseProto = NULL;
}
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h b/plugins/UserInfoEx/src/ex_import/svc_ExImVCF.h index 2507d83b61..cb1e70b4ec 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(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);
+ int DBWriteTokenFirst(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteTokenNext(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting, const CHAR delim);
+ int DBWriteSettingString(MCONTACT hContact, const CHAR* pszModule, const CHAR* pszSetting);
};
class CVCardFileVCF
@@ -69,7 +69,7 @@ class CVCardFileVCF private:
CLineBuffer _clVal;
FILE *_pFile;
- HCONTACT _hContact;
+ MCONTACT _hContact;
const CHAR *_pszBaseProto;
WORD _cbRew;
BYTE _useUtf8;
@@ -87,7 +87,7 @@ private: public:
CVCardFileVCF();
- BYTE Open(HCONTACT hContact, LPCSTR pszFileName, LPCSTR pszMode);
+ BYTE Open(MCONTACT 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 245c28e016..6a5f9154dc 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;
- HCONTACT hContact;
+ MCONTACT hContact;
result = (DWORD)DialogBox(ghInst,
MAKEINTRESOURCE(IDD_EXPORT_DATAHISTORY),
@@ -139,7 +139,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) }
else {
// other export mode
- _hContactToWorkOn = (HCONTACT)INVALID_HANDLE_VALUE;
+ _hContactToWorkOn = INVALID_CONTACT_ID;
#ifdef _DEBUG
LARGE_INTEGER freq, t1, t2;
@@ -265,8 +265,8 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) switch (result) {
case ERROR_OK:
// init contact class and import if matches the user desires
- if (_hContactToWorkOn == (HCONTACT)INVALID_HANDLE_VALUE || vContact.handle() == _hContactToWorkOn) {
- result = vContact.Import(_hContactToWorkOn != (HCONTACT)INVALID_HANDLE_VALUE);
+ if (_hContactToWorkOn == INVALID_CONTACT_ID || vContact.handle() == _hContactToWorkOn) {
+ result = vContact.Import(_hContactToWorkOn != INVALID_CONTACT_ID);
switch (result) {
case ERROR_OK:
_numContactsDone++;
@@ -295,7 +295,7 @@ int CFileXml::ImportContacts(TiXmlElement* xmlParent) if (pszNick) mir_free(pszNick);
}
// import owner contact
- else if (_hContactToWorkOn == (HCONTACT)INVALID_HANDLE_VALUE && !mir_stricmp(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) {
+ else if (_hContactToWorkOn == INVALID_CONTACT_ID && !mir_stricmp(xContact->Value(), XKEY_OWNER) && (vContact = xContact)) {
result = vContact.Import();
switch (result) {
case ERROR_OK:
@@ -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(HCONTACT hContact, LPCSTR pszFileName)
+int CFileXml::Import(MCONTACT 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 cbc64d761d..b7e6fe50ee 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.h @@ -37,7 +37,7 @@ class CFileXml { DWORD _numEventsDone;
DWORD _numEventsDuplicated;
- HCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
+ MCONTACT _hContactToWorkOn; // contact to ex/import (NULL=owner|INVALID_HANDLE_VALUE=all|HADNLE=one user)
WORD _wExport;
@@ -50,13 +50,13 @@ class CFileXml { /*
int ExportOwner(FILE *xmlfile, BYTE bExportEvents);
- int ExportContact(FILE *xmlfile, HCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
- int ExportSubContact(TiXmlElement *xContact, HCONTACT hContact, BYTE bExportEvents);
+ int ExportContact(FILE *xmlfile, MCONTACT hContact, BYTE bExportEvents, LPENUMLIST pModules);
+ int ExportSubContact(TiXmlElement *xContact, MCONTACT hContact, BYTE bExportEvents);
*/
public:
CFileXml();
- int Import(HCONTACT hContact, LPCSTR pszFileName);
+ int Import(MCONTACT 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 0632d96f32..50f0aba261 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 = (HCONTACT)INVALID_HANDLE_VALUE;
+ ExIm.hContact = INVALID_CONTACT_ID;
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 = (HCONTACT)INVALID_HANDLE_VALUE;
+ ExIm.hContact = INVALID_CONTACT_ID;
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 = (HCONTACT)wParam;
+ ExIm.hContact = (MCONTACT)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 = (HCONTACT)wParam;
+ ExIm.hContact = (MCONTACT)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 484c266535..5a6f684139 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 {
- HCONTACT hContact;
+ MCONTACT hContact;
LPSTR pszName;
LPTSTR ptszName;
};
diff --git a/plugins/UserInfoEx/src/mir_contactqueue.cpp b/plugins/UserInfoEx/src/mir_contactqueue.cpp index 0c9ff0883b..b06593d1bd 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(HCONTACT hContact)
+void CContactQueue::RemoveAll(MCONTACT hContact)
{
Lock();
@@ -149,7 +149,7 @@ void CContactQueue::RemoveAll(HCONTACT hContact) *
* @return nothing
**/
-void CContactQueue::RemoveAllConsiderParam(HCONTACT hContact, PVOID param)
+void CContactQueue::RemoveAllConsiderParam(MCONTACT hContact, PVOID param)
{
Lock();
@@ -177,7 +177,7 @@ void CContactQueue::RemoveAllConsiderParam(HCONTACT 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, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::Add(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -201,7 +201,7 @@ BOOL CContactQueue::Add(int waitTime, HCONTACT 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, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddIfDontHave(int waitTime, MCONTACT hContact, PVOID param)
{
int i;
BOOL rc;
@@ -235,7 +235,7 @@ BOOL CContactQueue::AddIfDontHave(int waitTime, HCONTACT 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, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddUnique(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -261,7 +261,7 @@ BOOL CContactQueue::AddUnique(int waitTime, HCONTACT 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, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, MCONTACT hContact, PVOID param)
{
BOOL rc;
@@ -285,7 +285,7 @@ BOOL CContactQueue::AddUniqueConsiderParam(int waitTime, HCONTACT hContact, PVOI * @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, HCONTACT hContact, PVOID param)
+BOOL CContactQueue::InternalAdd(int waitTime, MCONTACT 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 4da54dcacc..a426701e19 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;
- HCONTACT hContact;
+ MCONTACT hContact;
PVOID param;
};
@@ -65,7 +65,7 @@ public: *
* @return nothing
**/
- void RemoveAll(HCONTACT hContact);
+ void RemoveAll(MCONTACT hContact);
/**
* This function removes all queue items for the hContact considering the correct parameter.
@@ -75,7 +75,7 @@ public: *
* @return nothing
**/
- void RemoveAllConsiderParam(HCONTACT hContact, PVOID param);
+ void RemoveAllConsiderParam(MCONTACT 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, HCONTACT hContact, PVOID param = NULL);
+ BOOL Add(int waitTime, MCONTACT 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, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddIfDontHave(int waitTime, MCONTACT 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, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddUnique(int waitTime, MCONTACT 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, HCONTACT hContact, PVOID param = NULL);
+ BOOL AddUniqueConsiderParam (int waitTime, MCONTACT 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 (HCONTACT hContact, PVOID param) = 0;
+ virtual void Callback (MCONTACT 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, HCONTACT hContact, PVOID param);
+ BOOL InternalAdd(int waitTime, MCONTACT 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 1a41e8da34..a87b654658 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(HCONTACT hMetaContact)
+INT_PTR SubCount(MCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETNUMCONTACTS, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-INT_PTR SubDefNum(HCONTACT hMetaContact)
+INT_PTR SubDefNum(MCONTACT hMetaContact)
{
INT_PTR result = CallService(MS_MC_GETDEFAULTCONTACTNUM, (WPARAM) hMetaContact, 0);
return (result == CALLSERVICE_NOTFOUND) ? -1 : result;
}
-HCONTACT Sub(HCONTACT hMetaContact, int idx)
+MCONTACT Sub(MCONTACT hMetaContact, int idx)
{
if (idx != -1) {
INT_PTR result = CallService(MS_MC_GETSUBCONTACT, (WPARAM) hMetaContact, (LPARAM) idx);
- return (result == CALLSERVICE_NOTFOUND) ? NULL : (HCONTACT)result;
+ return (result == CALLSERVICE_NOTFOUND) ? NULL : (MCONTACT)result;
}
return NULL;
}
-bool IsSub(HCONTACT hContact)
+bool IsSub(MCONTACT hContact)
{
return myGlobals.szMetaProto &&
db_get_b(NULL, myGlobals.szMetaProto, "Enabled", TRUE) &&
db_get_b(hContact, myGlobals.szMetaProto, "IsSubcontact", FALSE);
}
-HCONTACT GetMeta(HCONTACT hContact)
+MCONTACT GetMeta(MCONTACT hContact)
{
if (!myGlobals.szMetaProto)
return NULL;
- HCONTACT result = (HCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
- return (result == (HCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
+ MCONTACT result = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)hContact, 0);
+ return (result == (MCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
}
} /* namespace MetaContact */
@@ -76,7 +76,7 @@ namespace Contact { * @return Returns the display name of a contact.
**/
-LPTSTR DisplayName(HCONTACT hContact)
+LPTSTR DisplayName(MCONTACT hContact)
{
return pcli->pfnGetContactDisplayName(hContact, 0);
}
@@ -87,7 +87,7 @@ LPTSTR DisplayName(HCONTACT hContact) * @return This function returns the basic protocol of a contact.
**/
-LPSTR Proto(HCONTACT hContact)
+LPSTR Proto(MCONTACT 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
**/
-HCONTACT Add()
+MCONTACT Add()
{
- return (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ return (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
}
/**
* This function deletes a contact from the database.
* @param hContact - handle to the contact
**/
-BYTE Delete(HCONTACT hContact)
+BYTE Delete(MCONTACT hContact)
{
return CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0) != 0;
}
@@ -159,7 +159,7 @@ namespace Module { * return: nothing
**/
-void Delete(HCONTACT hContact, LPCSTR pszModule)
+void Delete(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule)
+bool IsEmpty(MCONTACT hContact, LPCSTR pszModule)
{
DBCONTACTENUMSETTINGS dbces = { 0 };
dbces.pfnEnumProc = IsEmptyEnumProc;
@@ -236,7 +236,7 @@ namespace Setting { * @retval 1 - error
**/
-BYTE Get(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE Get(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, * @return string value
**/
-LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPSTR GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetAString(hContact, pszModule, pszSetting, &dbv) == 0){
@@ -277,7 +277,7 @@ LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @return string value
**/
-LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+LPWSTR GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
DBVARIANT dbv;
if (GetWString(hContact, pszModule, pszSetting, &dbv) == 0) {
@@ -302,7 +302,7 @@ LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @retval 1 - error
**/
-BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+BYTE GetEx(MCONTACT 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,7 +311,7 @@ BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti // try to get setting from a metasubcontact
if (result && DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HCONTACT hSubContact;
+ MCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
@@ -347,7 +347,7 @@ BYTE GetEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszProto, LPCSTR pszSetti * @return This function returns the WORD which contains the source of information.
**/
-WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
+WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR pszProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE destType)
{
WORD wFlags = 0;
@@ -366,7 +366,7 @@ WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps // try to read the setting from the sub contacts' modules
else if (DB::Module::IsMetaAndScan(pszProto)) {
const INT_PTR def = DB::MetaContact::SubDefNum(hContact);
- HCONTACT hSubContact;
+ MCONTACT hSubContact;
// try to get setting from the default subcontact first
if (def > -1 && def < INT_MAX) {
hSubContact = DB::MetaContact::Sub(hContact, def);
@@ -409,7 +409,7 @@ WORD GetCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSubModule, LPCSTR ps * @retval FALSE - setting does not exist
**/
-BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
+BYTE Exists(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting)
{
if (pszModule && pszSetting) {
CHAR szDummy[1];
@@ -428,7 +428,7 @@ BYTE Exists(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting) * @return nothing
**/
-void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
+void DeleteArray(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart)
{
CHAR pszSetting[MAXSETTING];
do {
@@ -702,7 +702,7 @@ static FORCEINLINE bool IsEqual(const DBEVENTINFO *d1, const DBEVENTINFO *d2, bo *
**/
-bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
+bool Exists(MCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei)
{
bool result = false;
DBEVENTINFO edbei;
@@ -826,7 +826,7 @@ INT_PTR CEnumList::EnumModules() * @retval 0 - success
**/
-INT_PTR CEnumList::EnumSettings(HCONTACT hContact, LPCSTR pszModule)
+INT_PTR CEnumList::EnumSettings(MCONTACT 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 2732d6e6f8..9d850c0006 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(HCONTACT hMetaContact);
- INT_PTR SubDefNum(HCONTACT hMetaContact);
- HCONTACT Sub(HCONTACT hMetaContact, int idx);
+ INT_PTR SubCount(MCONTACT hMetaContact);
+ INT_PTR SubDefNum(MCONTACT hMetaContact);
+ MCONTACT Sub(MCONTACT hMetaContact, int idx);
- bool IsSub(HCONTACT hContact);
- HCONTACT GetMeta(HCONTACT hContact);
+ bool IsSub(MCONTACT hContact);
+ MCONTACT GetMeta(MCONTACT hContact);
} /* namespace MetaContact */
/**
@@ -37,21 +37,21 @@ namespace MetaContact{ * or modify contacts in the database.
**/
namespace Contact {
- LPTSTR DisplayName(HCONTACT hContact);
- LPSTR Proto(HCONTACT hContact);
+ LPTSTR DisplayName(MCONTACT hContact);
+ LPSTR Proto(MCONTACT hContact);
INT_PTR GetCount();
- HCONTACT Add();
- BYTE Delete(HCONTACT hContact);
+ MCONTACT Add();
+ BYTE Delete(MCONTACT hContact);
DWORD WhenAdded(DWORD dwUIN, LPCSTR szBaseProto);
} /* namespace Contact */
namespace Module {
- void Delete(HCONTACT hContact, LPCSTR pszModule);
- bool IsEmpty(HCONTACT hContact, LPCSTR pszModule);
+ void Delete(MCONTACT hContact, LPCSTR pszModule);
+ bool IsEmpty(MCONTACT hContact, LPCSTR pszModule);
bool IsMeta(LPCSTR pszModule);
bool IsMetaAndScan(LPCSTR pszModule);
@@ -62,38 +62,38 @@ namespace Module { **/
namespace Setting {
- 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)
+ BYTE Get(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIs(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, 0); }
- static FORCEINLINE BYTE GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE BYTE GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_ASCIIZ); }
- LPSTR GetAString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPSTR GetAString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_WCHAR); }
- LPWSTR GetWString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- static FORCEINLINE BYTE GetUString(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
+ LPWSTR GetWString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ static FORCEINLINE BYTE GetUString(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting, DBVARIANT *dbv)
{ return Get(hContact, pszModule, pszSetting, dbv, DBVT_UTF8); }
- 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)
+ BYTE GetEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE BYTE GetAsIsEx(MCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetEx(hContact, pszModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE LPSTR GetAStringEx(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetAStringEx(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPWSTR GetWStringEx(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR szProto, LPCSTR pszSetting)
+ static FORCEINLINE LPSTR GetUStringEx(MCONTACT 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(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)
+ WORD GetCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv, const BYTE nType);
+ static FORCEINLINE WORD GetAsIsCtrl(MCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
{ return GetCtrl(hContact, pszModule, szSubModule, szProto, pszSetting, dbv, 0); }
- static FORCEINLINE WORD GetAStringCtrl(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetAStringCtrl(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetWStringCtrl(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR szSubModule, LPCSTR szProto, LPCSTR pszSetting, DBVARIANT *dbv)
+ static FORCEINLINE WORD GetUStringCtrl(MCONTACT 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(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
- void DeleteArray(HCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
+ BYTE Exists(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszSetting);
+ void DeleteArray(MCONTACT hContact, LPCSTR pszModule, LPCSTR pszFormat, int iStart);
} /* namespace Setting */
@@ -115,11 +115,11 @@ namespace Variant { } /* namespace Variant */
namespace Event {
- HANDLE FindLast(HCONTACT hContact);
+ HANDLE FindLast(MCONTACT hContact);
bool GetInfo(HANDLE hEvent, DBEVENTINFO *dbei);
bool GetInfoWithData(HANDLE hEvent, DBEVENTINFO *dbei);
DWORD GetTime(HANDLE hEvent);
- bool Exists(HCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
+ bool Exists(MCONTACT hContact, HANDLE& hDbExistingEvent, DBEVENTINFO *dbei);
} /* namespace Events */
/**
@@ -140,7 +140,7 @@ public: LPSTR Insert(LPCSTR str);
INT_PTR EnumModules();
- INT_PTR EnumSettings(HCONTACT hContact, LPCSTR pszModule);
+ INT_PTR EnumSettings(MCONTACT 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 77ec44c285..611783f1c2 100644 --- a/plugins/UserInfoEx/src/psp_base.cpp +++ b/plugins/UserInfoEx/src/psp_base.cpp @@ -58,7 +58,7 @@ INT_PTR CALLBACK PSPBaseProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_NOTIFY:
switch (((LPNMHDR)lParam)->idFrom) {
case 0:
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPSTR pszProto;
switch (((LPNMHDR)lParam)->code) {
diff --git a/plugins/UserInfoEx/src/psp_contact.cpp b/plugins/UserInfoEx/src/psp_contact.cpp index b71f809b49..0bce7739ae 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];
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -74,7 +74,7 @@ INT_PTR CALLBACK PSPProcContactHome(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((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];
- HCONTACT hContact = (HCONTACT)lParam;
+ MCONTACT hContact = (MCONTACT)lParam;
LPIDSTRLIST pList;
UINT nList;
@@ -227,7 +227,7 @@ INT_PTR CALLBACK PSPProcContactWork(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM {
case 0:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((LPPSHNOTIFY)lParam)->lParam;
LPCSTR pszProto;
HWND hCtrl;
diff --git a/plugins/UserInfoEx/src/psp_general.cpp b/plugins/UserInfoEx/src/psp_general.cpp index d881f8b812..44aa65c843 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:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((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:
{
- HCONTACT hContact;
+ MCONTACT hContact;
LPCSTR pszProto;
switch (LOWORD(wParam))
diff --git a/plugins/UserInfoEx/src/psp_options.cpp b/plugins/UserInfoEx/src/psp_options.cpp index 49626f63e7..aaafe6e38e 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) {
- HCONTACT hContact;
+ MCONTACT 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;
- HCONTACT hContact = NULL;
+ MCONTACT 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 6b337a4d5c..5c455e2a78 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:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((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 098fc8ad72..621e913492 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;
- HCONTACT hContact;
+ MCONTACT hContact;
RECT rcList;
if (!PtrIsValid(pList))
@@ -431,7 +431,7 @@ static BYTE ProfileList_AddNewItem(HWND hDlg, LPLISTCTRL pList, const PROFILEENT {
LPLCITEM pItem;
LVITEM lvi;
- HCONTACT hContact;
+ MCONTACT 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,
- HCONTACT hContact,
+ MCONTACT 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:
{
- HCONTACT hContact = (HCONTACT)((LPPSHNOTIFY)lParam)->lParam;
+ MCONTACT hContact = (MCONTACT)((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);
- HCONTACT hSubContact, hDefContact;
+ MCONTACT hSubContact, hDefContact;
LPCSTR pszSubBaseProto;
int j, numSubs;
- if ((hDefContact = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, iDefault)) &&
+ if ((hDefContact = (MCONTACT)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 = (HCONTACT)CallService(MS_MC_GETSUBCONTACT, (WPARAM)hContact, j))) continue;
+ if (!(hSubContact = (MCONTACT)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;
- HCONTACT hContact;
+ MCONTACT hContact;
LVHITTESTINFO hi;
LPLCITEM pItem;
POINT pt;
diff --git a/plugins/UserInfoEx/src/svc_avatar.cpp b/plugins/UserInfoEx/src/svc_avatar.cpp index 38b3897a43..c6edeaab85 100644 --- a/plugins/UserInfoEx/src/svc_avatar.cpp +++ b/plugins/UserInfoEx/src/svc_avatar.cpp @@ -50,7 +50,7 @@ namespace NServices *
*
**/
- static void SetZodiacAvatar(HCONTACT hContact)
+ static void SetZodiacAvatar(MCONTACT hContact)
{
MAnnivDate mtb;
@@ -76,7 +76,7 @@ namespace NServices }
}
- void DeleteAvatar(HCONTACT hContact)
+ void DeleteAvatar(MCONTACT hContact)
{
if (hContact && db_get_b(hContact, "ContactPhoto", "IsZodiac", FALSE))
{
@@ -94,7 +94,7 @@ namespace NServices *
*
**/
- static int OnAvatarChanged(HCONTACT hContact, AVATARCACHEENTRY *ace)
+ static int OnAvatarChanged(MCONTACT hContact, AVATARCACHEENTRY *ace)
{
if (hContact)
{
@@ -127,7 +127,7 @@ namespace NServices **/
void Enable(BYTE bEnable)
{
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
if (bEnable && !ghChangedHook)
diff --git a/plugins/UserInfoEx/src/svc_contactinfo.cpp b/plugins/UserInfoEx/src/svc_contactinfo.cpp index 1743477c89..aaa4c816e2 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((HCONTACT)wParam, USERINFO,
+ return DB::Setting::GetEx((MCONTACT)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 40bbf256cc..3888dd7ba9 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(HCONTACT hContact)
+static LPSTR Get(MCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -84,7 +84,7 @@ static INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam) __try
{
- val = Get((HCONTACT)wParam);
+ val = Get((MCONTACT)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((HCONTACT)wParam);
- ExtraIcon_SetIcon(ghExtraIconSvc, (HCONTACT)wParam, (val) ? ICO_BTN_EMAIL : 0);
+ LPSTR val = Get((MCONTACT)wParam);
+ ExtraIcon_SetIcon(ghExtraIconSvc, (MCONTACT)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(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT 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(HCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HCONTACT)wParam);
+ LPSTR val = Get((MCONTACT)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 26a26d7aa7..0582c9c82d 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(HCONTACT hContact, LPCSTR pszProto)
+BYTE GenderOf(MCONTACT hContact, LPCSTR pszProto)
{
DBVARIANT dbv;
if (DB::Setting::GetAsIsEx(hContact, USERINFO, pszProto, SET_CONTACT_GENDER, &dbv) == 0) {
@@ -53,7 +53,7 @@ BYTE GenderOf(HCONTACT hContact, LPCSTR pszProto) * @retval 0 - contact does not provide its gender
**/
-BYTE GenderOf(HCONTACT hContact)
+BYTE GenderOf(MCONTACT hContact)
{
return GenderOf(hContact, DB::Contact::Proto(hContact));
}
@@ -69,7 +69,7 @@ BYTE GenderOf(HCONTACT hContact) * @param lParam - not used
**/
-static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
if (ghExtraIconSvc != INVALID_HANDLE_VALUE) {
char *icoName;
@@ -90,7 +90,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT 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 1e90820b95..5d897bbe11 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(HCONTACT hContact, LPCSTR pszProto);
-BYTE GenderOf(HCONTACT hContact);
+BYTE GenderOf(MCONTACT hContact, LPCSTR pszProto);
+BYTE GenderOf(MCONTACT 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 2845570486..d5a1d8d5fd 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(HCONTACT hContact)
+static LPSTR Get(MCONTACT hContact)
{
// ignore owner
if (hContact != NULL) {
@@ -68,7 +68,7 @@ static LPSTR Get(HCONTACT hContact) static INT_PTR MenuCommand(WPARAM wParam, LPARAM lParam)
{
- LPSTR szUrl = Get((HCONTACT)wParam);
+ LPSTR szUrl = Get((MCONTACT)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(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
LPSTR val = Get(hContact);
if (ghExtraIconSvc != INVALID_HANDLE_VALUE)
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT 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(HCONTACT hContact, DBCONTACTWRITESETTING* pdb static int OnPreBuildMenu(WPARAM wParam, LPARAM lParam)
{
- LPSTR val = Get((HCONTACT)wParam);
+ LPSTR val = Get((MCONTACT)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 6a510f28c3..c640d0b34c 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(HCONTACT hContact)
+static INT_PTR Get(MCONTACT hContact)
{
INT_PTR nType = PHONE_NONE;
@@ -86,7 +86,7 @@ static INT_PTR Get(HCONTACT hContact) * @param lParam - not used
**/
-static int OnCListApplyIcons(HCONTACT hContact, LPARAM)
+static int OnCListApplyIcons(MCONTACT hContact, LPARAM)
{
char *icoName;
switch (Get(hContact)) {
@@ -105,7 +105,7 @@ static int OnCListApplyIcons(HCONTACT hContact, LPARAM) * @param lParam - (DBCONTACTWRITESETTING*)pdbcws
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT 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 4d2715dc39..e2022e5982 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
- HCONTACT _hContact; // current contact being refreshed
+ MCONTACT _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(HCONTACT hContact, PVOID param)
+ virtual void Callback(MCONTACT hContact, PVOID param)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -687,7 +687,7 @@ public: *
*
**/
- BOOL QueueAddRefreshContact(HCONTACT hContact, int iWait)
+ BOOL QueueAddRefreshContact(MCONTACT hContact, int iWait)
{
LPSTR pszProto = DB::Contact::Proto(hContact);
@@ -708,7 +708,7 @@ public: {
int iWait = 100;
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT 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((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
+ DWORD dwStmp = db_get_dw((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME, 0);
if (!dwStmp)
{
MTime mt;
mt.GetLocalTime();
- mt.DBWriteStamp((HCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
+ mt.DBWriteStamp((MCONTACT)wParam, USERINFO, SET_CONTACT_ADDEDTIME);
// create updater, if not yet exists
if (!ContactUpdater)
@@ -858,7 +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, (HCONTACT)wParam);
+ : 4000, (MCONTACT)wParam);
}
}
catch(...)
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 235694e451..ca075925d0 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(HCONTACT hContact, const CEvent &evt)
+static void NotifyWithExtraIcon(MCONTACT 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(HCONTACT hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
+static int NotifyWithPopup(MCONTACT hContact, CEvent::EType eventType, int DaysToAnniv, LPCTSTR pszDesc, LPCTSTR pszMsg)
{
if (!gRemindOpts.bPopups)
return 1;
@@ -304,7 +304,7 @@ static int NotifyWithPopup(HCONTACT hContact, CEvent::EType eventType, int DaysT * @return nothing
**/
-static void NotifyFlashCListIcon(HCONTACT hContact, const CEvent &evt)
+static void NotifyFlashCListIcon(MCONTACT 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(HCONTACT hContact)
+static LPCTSTR ContactGender(MCONTACT hContact)
{
switch (GenderOf(hContact)) {
case 'M': return TranslateT("He");
@@ -378,7 +378,7 @@ static LPCTSTR ContactGender(HCONTACT hContact) return TranslateT("He/She");
}
-static BYTE CheckAnniversaries(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
+static BYTE CheckAnniversaries(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify)
{
int numAnniversaries = 0;
int Diff;
@@ -466,7 +466,7 @@ static BYTE CheckAnniversaries(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE * @retval FALSE - contact has no birthday or it is not within the desired period of time.
**/
-static BYTE CheckBirthday(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
+static BYTE CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer)
{
BYTE result = FALSE;
@@ -534,7 +534,7 @@ static BYTE CheckBirthday(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti * @return nothing
**/
-static void CheckContact(HCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNotify, PWORD LastAnwer = 0)
+static void CheckContact(MCONTACT 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 (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT 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(HCONTACT hContact, LPARAM)
+int OnCListApplyIcon(MCONTACT hContact, LPARAM)
{
if (gRemindOpts.RemindState != REMIND_OFF) {
CEvent evt;
@@ -645,7 +645,7 @@ int OnCListApplyIcon(HCONTACT hContact, LPARAM) * @return This function must return 0 in order to continue in the notification chain.
**/
-static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
+static int OnContactSettingChanged(MCONTACT hContact, DBCONTACTWRITESETTING* pdbcws)
{
if (hContact && // valid contact not owner!
ghCListIA && // extraicons active
@@ -656,7 +656,7 @@ static int OnContactSettingChanged(HCONTACT hContact, DBCONTACTWRITESETTING* pdb !strncmp(pdbcws->szSetting, "Anniv", 5) ||
!strncmp(pdbcws->szSetting, "DOB", 3)))
{
- HCONTACT hMeta = DB::MetaContact::GetMeta(hContact);
+ MCONTACT 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)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
MAnnivDate mdb;
if (hContact) {
@@ -872,7 +872,7 @@ void SvcReminderEnable(BYTE bEnable) UpdateTimer(TRUE);
}
else { // Reminder is off
- for (HCONTACT hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
+ for (MCONTACT 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 777a12e2a8..f9341d1543 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((HCONTACT)wParam, 0));
+ (*pTimeZoneInformation) = *tmi.getTzi(tmi.createByContact((MCONTACT)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((HCONTACT)wParam, pSystemTime);
+ return (INT_PTR)tmi.getTimeZoneTimeByContact((MCONTACT)wParam, pSystemTime);
}
/***********************************************************************************************************
diff --git a/plugins/UserInfoEx/src/svc_timezone_old.cpp b/plugins/UserInfoEx/src/svc_timezone_old.cpp index 641d4c6d3e..1bb5a202a8 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(HCONTACT hContact, LPCSTR pszProto)
+CTimeZone* GetContactTimeZone(MCONTACT hContact, LPCSTR pszProto)
{
LPTSTR ptszName;
CTimeZone* pTimeZone = NULL;
@@ -410,7 +410,7 @@ CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto) *
**/
-CTimeZone* GetContactTimeZone(HCONTACT hContact)
+CTimeZone* GetContactTimeZone(MCONTACT hContact)
{
return GetContactTimeZone(hContact, DB::Contact::Proto(hContact));
}
@@ -431,7 +431,7 @@ CTimeZone* GetContactTimeZone(HCONTACT hContact) * @e dwIndex retrieved its value. If not, dwIndex is -100 (unspecified).
**/
-WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
+WORD GetContactTimeZoneCtrl(MCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone)
{
WORD flags;
DBVARIANT dbv;
@@ -476,7 +476,7 @@ WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTim * @return String containing display name.
**/
-LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact)
+LPCTSTR GetContactTimeZoneDisplayName(MCONTACT 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((HCONTACT)wParam);
+ pTimeZone = GetContactTimeZone((MCONTACT)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((HCONTACT)wParam);
+ now.GetLocalTime((MCONTACT)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 073794fd21..040f272ec6 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(HCONTACT hContact);
-CTimeZone* GetContactTimeZone(HCONTACT hContact, LPCSTR pszProto);
-WORD GetContactTimeZoneCtrl(HCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
-LPCTSTR GetContactTimeZoneDisplayName(HCONTACT hContact);
+CTimeZone* GetContactTimeZone(MCONTACT hContact);
+CTimeZone* GetContactTimeZone(MCONTACT hContact, LPCSTR pszProto);
+WORD GetContactTimeZoneCtrl(MCONTACT hContact, LPCSTR pszProto, CTimeZone** pTimeZone);
+LPCTSTR GetContactTimeZoneDisplayName(MCONTACT hContact);
INT_PTR EnumTimeZones(PEnumNamesProc enumProc, LPARAM lParam);
INT_PTR GetContactTimeZoneInformation_old(WPARAM wParam, LPARAM lParam);
|