diff options
Diffstat (limited to 'plugins/UserInfoEx/src')
-rw-r--r-- | plugins/UserInfoEx/src/classMAnnivDate.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_anniversarylist.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/dlg_propsheet.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp | 2 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp | 8 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp | 4 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_db.cpp | 8 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_db.h | 1 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/svc_reminder.cpp | 6 |
9 files changed, 13 insertions, 22 deletions
diff --git a/plugins/UserInfoEx/src/classMAnnivDate.cpp b/plugins/UserInfoEx/src/classMAnnivDate.cpp index bd4396612d..59e861d446 100644 --- a/plugins/UserInfoEx/src/classMAnnivDate.cpp +++ b/plugins/UserInfoEx/src/classMAnnivDate.cpp @@ -731,7 +731,7 @@ int MAnnivDate::BackupBirthday(MCONTACT hContact, LPSTR pszProto, const BYTE bDo if (pszProto) {
BYTE bIsMeta = DB::Module::IsMeta(pszProto);
- BYTE bIsMetaSub = !bIsMeta && DB::MetaContact::IsSub(hContact);
+ BYTE bIsMetaSub = !bIsMeta && db_mc_isSub(hContact);
MAnnivDate mdbNewProto;
MAnnivDate mdbIgnore;
diff --git a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp index 42e7d3e525..745a82caa7 100644 --- a/plugins/UserInfoEx/src/dlg_anniversarylist.cpp +++ b/plugins/UserInfoEx/src/dlg_anniversarylist.cpp @@ -829,7 +829,7 @@ class CAnnivList 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)) {
+ if (!db_mc_isSub(hContact)) {
// filter protocol
pszProto = DB::Contact::Proto(hContact);
if (pszProto) {
diff --git a/plugins/UserInfoEx/src/dlg_propsheet.cpp b/plugins/UserInfoEx/src/dlg_propsheet.cpp index f5da4c7488..b46b9a635f 100644 --- a/plugins/UserInfoEx/src/dlg_propsheet.cpp +++ b/plugins/UserInfoEx/src/dlg_propsheet.cpp @@ -1350,7 +1350,7 @@ static INT_PTR CALLBACK DlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lPar if (hContact != pPs->hContact) {
if (!myGlobals.szMetaProto)
break;
- if (pPs->hContact != (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, NULL))
+ if (pPs->hContact != db_mc_getMeta(hContact))
break;
if (!db_get_b(NULL, MODNAME, SET_META_SCAN, TRUE))
break;
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp index 67681553b8..74cfe49000 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactBase.cpp @@ -242,7 +242,7 @@ MCONTACT CExImContactBase::toDB() return _hContact = INVALID_CONTACT_ID;
}
// Add the protocol to the new contact
- if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)_hContact, (LPARAM)_pszProto)) {
+ if (CallService(MS_PROTO_ADDTOCONTACT, _hContact, (LPARAM)_pszProto)) {
DB::Contact::Delete(_hContact);
return _hContact = INVALID_CONTACT_ID;
}
diff --git a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp index de9db38883..a71efbfa07 100644 --- a/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/classExImContactXML.cpp @@ -511,7 +511,7 @@ int CExImContactXML::LoadXmlElemnt(TiXmlElement *xContact) if (vSub = xSub) {
// identify metacontact by the first valid subcontact in xmlfile
if (_hContact == INVALID_CONTACT_ID && vSub.handle() != INVALID_CONTACT_ID) {
- MCONTACT hMeta = (MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)vSub.handle(), NULL);
+ MCONTACT hMeta = db_mc_getMeta(vSub.handle());
if (hMeta != NULL) {
_hContact = hMeta;
break;
@@ -636,7 +636,7 @@ int CExImContactXML::ImportNormalContact() int err = ImportContact();
// remove contact from a metacontact
- if (err == ERROR_OK && CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL))
+ if (err == ERROR_OK && db_mc_getMeta(_hContact))
CallService(MS_MC_REMOVEFROMMETA, NULL, (LPARAM)_hContact);
return err;
@@ -736,9 +736,9 @@ int CExImContactXML::ImportMetaSubContact(CExImContactXML * pMetaContact) return err;
// check if contact is subcontact of the desired meta contact
- if ((MCONTACT)CallService(MS_MC_GETMETACONTACT, (WPARAM)_hContact, NULL) != pMetaContact->handle()) {
+ if (db_mc_getMeta(_hContact) != pMetaContact->handle()) {
// add contact to the metacontact (this service returns TRUE if successful)
- err = CallService(MS_MC_ADDTOMETA, (WPARAM)_hContact, (LPARAM)pMetaContact->handle());
+ err = CallService(MS_MC_ADDTOMETA, _hContact, (LPARAM)pMetaContact->handle());
if (err == FALSE) {
// ask to delete new contact
if (_isNewContact && _hContact != NULL) {
diff --git a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp index 6a5f9154dc..ed8c032472 100644 --- a/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp +++ b/plugins/UserInfoEx/src/ex_import/svc_ExImXML.cpp @@ -158,7 +158,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) case EXIM_ALL:
case EXIM_GROUP:
// dont export meta subcontacts by default
- if (!DB::MetaContact::IsSub(hContact)) {
+ if (!db_mc_isSub(hContact)) {
if (vContact.fromDB(hContact)) {
vContact.Export(xmlfile, &Modules);
}
@@ -167,7 +167,7 @@ int CFileXml::Export(lpExImParam ExImContact, LPCSTR pszFileName) case EXIM_SUBGROUP:
// dont export meta subcontacts by default and
// export only contact with selectet group name
- if (!DB::MetaContact::IsSub(hContact) &&
+ if (!db_mc_isSub(hContact) &&
mir_tcsncmp(ExImContact->ptszName, DB::Setting::GetTString(hContact, "CList", "Group"), mir_tcslen(ExImContact->ptszName))== 0)
{
if (vContact.fromDB(hContact)) {
diff --git a/plugins/UserInfoEx/src/mir_db.cpp b/plugins/UserInfoEx/src/mir_db.cpp index 48cc65751d..d759ebaf9b 100644 --- a/plugins/UserInfoEx/src/mir_db.cpp +++ b/plugins/UserInfoEx/src/mir_db.cpp @@ -46,18 +46,12 @@ MCONTACT Sub(MCONTACT hMetaContact, int idx) return NULL;
}
-bool IsSub(MCONTACT hContact)
-{
- return db_mc_isSub(hContact);
-}
-
MCONTACT GetMeta(MCONTACT hContact)
{
if (!myGlobals.szMetaProto)
return NULL;
- MCONTACT result = (MCONTACT)CallService(MS_MC_GETMETACONTACT, hContact, 0);
- return (result == (MCONTACT)CALLSERVICE_NOTFOUND) ? NULL : result;
+ return db_mc_getMeta(hContact);
}
} /* namespace MetaContact */
diff --git a/plugins/UserInfoEx/src/mir_db.h b/plugins/UserInfoEx/src/mir_db.h index 9d850c0006..ae6ec11c25 100644 --- a/plugins/UserInfoEx/src/mir_db.h +++ b/plugins/UserInfoEx/src/mir_db.h @@ -28,7 +28,6 @@ namespace MetaContact{ INT_PTR SubDefNum(MCONTACT hMetaContact);
MCONTACT Sub(MCONTACT hMetaContact, int idx);
- bool IsSub(MCONTACT hContact);
MCONTACT GetMeta(MCONTACT hContact);
} /* namespace MetaContact */
diff --git a/plugins/UserInfoEx/src/svc_reminder.cpp b/plugins/UserInfoEx/src/svc_reminder.cpp index 491a26685a..c22b9089c1 100644 --- a/plugins/UserInfoEx/src/svc_reminder.cpp +++ b/plugins/UserInfoEx/src/svc_reminder.cpp @@ -537,9 +537,7 @@ static BYTE CheckBirthday(MCONTACT hContact, MTime &Now, CEvent &evt, BYTE bNoti 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 &&
- (!gRemindOpts.bCheckVisibleOnly || !db_get_b(hContact, MOD_CLIST, "Hidden", FALSE)) &&
- (!DB::MetaContact::IsSub(hContact)))
+ if (hContact && (!gRemindOpts.bCheckVisibleOnly || !db_get_b(hContact, MOD_CLIST, "Hidden", FALSE)) && !db_mc_isSub(hContact))
{
CEvent ca;
@@ -738,7 +736,7 @@ static INT_PTR BackupBirthdayService(WPARAM hContact, LPARAM lParam) //walk through all the contacts stored in the DB
for (hContact = db_find_first(); hContact != NULL; hContact = db_find_next(hContact))
- if (!DB::MetaContact::IsSub(hContact) && !mdb.DBGetBirthDate(hContact))
+ if (!db_mc_isSub(hContact) && !mdb.DBGetBirthDate(hContact))
mdb.BackupBirthday(hContact, NULL, TRUE, &a1);
}
|