summaryrefslogtreecommitdiff
path: root/plugins/MetaContacts/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/MetaContacts/src
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MetaContacts/src')
-rw-r--r--plugins/MetaContacts/src/addto.cpp12
-rw-r--r--plugins/MetaContacts/src/edit.cpp32
-rw-r--r--plugins/MetaContacts/src/meta_api.cpp52
-rw-r--r--plugins/MetaContacts/src/meta_main.cpp2
-rw-r--r--plugins/MetaContacts/src/meta_menu.cpp48
-rwxr-xr-xplugins/MetaContacts/src/meta_services.cpp116
-rw-r--r--plugins/MetaContacts/src/meta_utils.cpp70
-rw-r--r--plugins/MetaContacts/src/metacontacts.h34
8 files changed, 183 insertions, 183 deletions
diff --git a/plugins/MetaContacts/src/addto.cpp b/plugins/MetaContacts/src/addto.cpp
index 40d3c30b86..507c3961e3 100644
--- a/plugins/MetaContacts/src/addto.cpp
+++ b/plugins/MetaContacts/src/addto.cpp
@@ -56,7 +56,7 @@ int FillList(HWND list, BOOL sort)
int i=0;
// The DB is searched through, to get all the metacontacts
- for (HCONTACT hMetaUser = db_find_first(); hMetaUser; hMetaUser = db_find_next(hMetaUser)) {
+ for (MCONTACT hMetaUser = db_find_first(); hMetaUser; hMetaUser = db_find_next(hMetaUser)) {
// if it's not a MetaContact, go to the next
if ( db_get_dw(hMetaUser, META_PROTO, META_ID, (DWORD)-1) == (DWORD)-1)
continue;
@@ -124,7 +124,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
case WM_INITDIALOG:
TranslateDialogDefault( hwndDlg );
- if ( db_get_dw((HCONTACT)lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
+ if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
MessageBox(hwndDlg,
TranslateT("This contact is a MetaContact.\nYou can't add a MetaContact to another MetaContact.\n\nPlease choose another."),
TranslateT("MetaContact Conflict"),MB_ICONERROR);
@@ -132,7 +132,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
return TRUE;
}
- if ( db_get_dw((HCONTACT)lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) {
+ if ( db_get_dw((MCONTACT)lParam, META_PROTO, META_LINK, (DWORD)-1) != (DWORD)-1) {
MessageBox(hwndDlg,
TranslateT("This contact is already associated to a MetaContact.\nYou cannot add a contact to multiple MetaContacts."),
TranslateT("Multiple MetaContacts"),MB_ICONERROR);
@@ -155,7 +155,7 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
else {
// get contact display name from clist
- TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((HCONTACT)lParam, GCDNF_TCHAR);
+ TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR);
if (!ptszCDN)
ptszCDN = TranslateT("a contact");
@@ -178,8 +178,8 @@ INT_PTR CALLBACK Meta_SelectDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LP
if (item == -1)
return IDOK == MessageBox(hwndDlg, TranslateT("Please select a MetaContact"), TranslateT("No MetaContact selected"), MB_ICONHAND);
- HCONTACT hContact = (HCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
- HCONTACT hMeta = (HCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_METALIST), LB_GETITEMDATA, (WPARAM)item, 0);
+ MCONTACT hContact = (MCONTACT)GetWindowLongPtr(hwndDlg, GWLP_USERDATA);
+ MCONTACT hMeta = (MCONTACT)SendMessage(GetDlgItem(hwndDlg, IDC_METALIST), LB_GETITEMDATA, (WPARAM)item, 0);
if (!Meta_Assign(hContact, hMeta, FALSE))
MessageBox(hwndDlg, TranslateT("Assignment to the MetaContact failed."), TranslateT("Assignment failure"),MB_ICONERROR);
}
diff --git a/plugins/MetaContacts/src/edit.cpp b/plugins/MetaContacts/src/edit.cpp
index 859ad8aafd..b3a8622689 100644
--- a/plugins/MetaContacts/src/edit.cpp
+++ b/plugins/MetaContacts/src/edit.cpp
@@ -29,13 +29,13 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//! Holds the differents changes that have to made
typedef struct tag_CHANGES {
- HCONTACT hMeta; //!< \c HANDLE of the MetaContact that is edited.
- HCONTACT hDefaultContact; //!< \c HANDLE of the new default contact
- HCONTACT hOfflineContact;
+ MCONTACT hMeta; //!< \c HANDLE of the MetaContact that is edited.
+ MCONTACT hDefaultContact; //!< \c HANDLE of the new default contact
+ MCONTACT hOfflineContact;
int num_deleted, //!< \c DWORD number of deleted contacts
num_contacts; //!< \c DWORD number of contacts
- HCONTACT hDeletedContacts[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts to be removed from this metacontact
- HCONTACT hContact[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts, in the order they should be in
+ MCONTACT hDeletedContacts[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts to be removed from this metacontact
+ MCONTACT hContact[MAX_CONTACTS]; //!< \c HANDLEs of the subcontacts, in the order they should be in
int force_default;
} CHANGES;
@@ -167,7 +167,7 @@ void ApplyChanges(CHANGES *chg)
db_set_dw(chg->hMeta, META_PROTO, "OfflineSend", (DWORD)-1);
// fix nick
- HCONTACT most_online = Meta_GetMostOnline(chg->hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(chg->hMeta);
Meta_CopyContactNick(chg->hMeta, most_online);
// fix status
@@ -270,17 +270,17 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_UP), FALSE);
EnableWindow(GetDlgItem(hwndDlg, IDC_BTN_DOWN), FALSE);
- int nb_contacts = db_get_dw((HCONTACT)lParam, META_PROTO, "NumContacts", 0);
- int default_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
- int offline_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "OfflineSend", (DWORD)-1);
+ int nb_contacts = db_get_dw((MCONTACT)lParam, META_PROTO, "NumContacts", 0);
+ int default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
+ int offline_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "OfflineSend", (DWORD)-1);
- changes.hMeta = (HCONTACT)lParam;
+ changes.hMeta = (MCONTACT)lParam;
changes.num_contacts = nb_contacts;
changes.num_deleted = 0;
- changes.hDefaultContact = Meta_GetContactHandle((HCONTACT)lParam, default_contact_number);
- changes.hOfflineContact = Meta_GetContactHandle((HCONTACT)lParam, offline_contact_number);
+ changes.hDefaultContact = Meta_GetContactHandle((MCONTACT)lParam, default_contact_number);
+ changes.hOfflineContact = Meta_GetContactHandle((MCONTACT)lParam, offline_contact_number);
for (i = 0; i < nb_contacts; i++)
- changes.hContact[i] = Meta_GetContactHandle((HCONTACT)lParam, i);
+ changes.hContact[i] = Meta_GetContactHandle((MCONTACT)lParam, i);
changes.force_default = MetaAPI_GetForceState((WPARAM)lParam, 0);
SendMessage(hwndDlg, WMU_SETTITLE, 0, lParam);
@@ -293,7 +293,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
case WMU_SETTITLE:
{
- TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((HCONTACT)lParam, GCDNF_TCHAR);
+ TCHAR *ptszCDN = pcli->pfnGetContactDisplayName((MCONTACT)lParam, GCDNF_TCHAR);
if (ptszCDN == NULL)
ptszCDN = TranslateT("(Unknown Contact)");
@@ -413,7 +413,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS);
sel = ListView_GetNextItem(hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED);
{
- HCONTACT temp = changes.hContact[sel];
+ MCONTACT temp = changes.hContact[sel];
changes.hContact[sel] = changes.hContact[sel - 1];
changes.hContact[sel-1] = temp;
}
@@ -430,7 +430,7 @@ INT_PTR CALLBACK Meta_EditDialogProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPAR
hwnd = GetDlgItem(hwndDlg, IDC_LST_CONTACTS);
sel = ListView_GetNextItem(hwnd, -1, LVNI_FOCUSED | LVNI_SELECTED);
{
- HCONTACT temp = changes.hContact[sel];
+ MCONTACT temp = changes.hContact[sel];
changes.hContact[sel] = changes.hContact[sel + 1];
changes.hContact[sel + 1] = temp;
}
diff --git a/plugins/MetaContacts/src/meta_api.cpp b/plugins/MetaContacts/src/meta_api.cpp
index 71cdfeb1ec..6fbad29f5d 100644
--- a/plugins/MetaContacts/src/meta_api.cpp
+++ b/plugins/MetaContacts/src/meta_api.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//lParam=0
//returns a handle to the parent metacontact, or null if this contact is not a subcontact
INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)(HANDLE)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ return (INT_PTR)(HANDLE)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
}
//gets the handle for the default contact
@@ -40,9 +40,9 @@ INT_PTR MetaAPI_GetMeta(WPARAM wParam, LPARAM lParam) {
//lParam=0
//returns a handle to the default contact, or null on failure
INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) {
- DWORD default_contact_number = db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ DWORD default_contact_number = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
if (default_contact_number != -1) {
- return (INT_PTR)Meta_GetContactHandle((HCONTACT)wParam, default_contact_number);
+ return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, default_contact_number);
}
return 0;
}
@@ -52,7 +52,7 @@ INT_PTR MetaAPI_GetDefault(WPARAM wParam, LPARAM lParam) {
//lParam=0
//returns a DWORD contact number, or -1 on failure
INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) {
- return db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ return db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
}
//gets the handle for the 'most online' contact
@@ -60,7 +60,7 @@ INT_PTR MetaAPI_GetDefaultNum(WPARAM wParam, LPARAM lParam) {
//lParam=0
//returns a handle to the 'most online' contact
INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetMostOnline((HCONTACT)wParam);
+ return (INT_PTR)Meta_GetMostOnline((MCONTACT)wParam);
}
//gets the number of subcontacts for a metacontact
@@ -68,7 +68,7 @@ INT_PTR MetaAPI_GetMostOnline(WPARAM wParam, LPARAM lParam) {
//lParam=0
//returns a DWORD representing the number of subcontacts for the given metacontact
INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
return num_contacts;
}
@@ -77,7 +77,7 @@ INT_PTR MetaAPI_GetNumContacts(WPARAM wParam, LPARAM lParam) {
//lParam=(DWORD)contact number
//returns a handle to the specified subcontact
INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) {
- return (INT_PTR)Meta_GetContactHandle((HCONTACT)wParam, (DWORD)lParam);
+ return (INT_PTR)Meta_GetContactHandle((MCONTACT)wParam, (DWORD)lParam);
}
//sets the default contact, using the subcontact's contact number
@@ -85,15 +85,15 @@ INT_PTR MetaAPI_GetContact(WPARAM wParam, LPARAM lParam) {
//lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) {
- DWORD num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", -1);
+ DWORD num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", -1);
if (num_contacts == -1)
return 1;
if ((DWORD)lParam >= num_contacts || (DWORD)lParam < 0)
return 1;
- if (db_set_dw((HCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam))
+ if (db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)lParam))
return 1;
- NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((HCONTACT)wParam, (int)lParam));
+ NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, (int)lParam));
return 0;
}
@@ -102,9 +102,9 @@ INT_PTR MetaAPI_SetDefaultContactNum(WPARAM wParam, LPARAM lParam) {
//lParam=(HANDLE)hSubcontact
//returns 0 on success
INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) {
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)lParam, META_PROTO, "Handle", 0);
- DWORD contact_number = Meta_GetContactNumber((HCONTACT)lParam);
- if (contact_number == -1 || !hMeta || hMeta != (HCONTACT)wParam)
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)lParam, META_PROTO, "Handle", 0);
+ DWORD contact_number = Meta_GetContactNumber((MCONTACT)lParam);
+ if (contact_number == -1 || !hMeta || hMeta != (MCONTACT)wParam)
return 1;
if (db_set_dw(hMeta, META_PROTO, "Default", contact_number))
return 1;
@@ -118,9 +118,9 @@ INT_PTR MetaAPI_SetDefaultContact(WPARAM wParam, LPARAM lParam) {
//lParam=(DWORD)contact number
//returns 0 on success
INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, (int)lParam);
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (HCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam);
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -134,9 +134,9 @@ INT_PTR MetaAPI_ForceSendContactNum(WPARAM wParam, LPARAM lParam) {
//lParam=(HANDLE)hSubcontact
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) {
- HCONTACT hContact = (HCONTACT)lParam;
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
- if (!hContact || !hMeta || hMeta != (HCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
+ MCONTACT hContact = (MCONTACT)lParam;
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ if (!hContact || !hMeta || hMeta != (MCONTACT)wParam || db_get_b(hMeta, META_PROTO, "ForceDefault", 0))
return 1;
db_set_dw(hMeta, META_PROTO, "ForceSend", (DWORD)hContact);
@@ -150,10 +150,10 @@ INT_PTR MetaAPI_ForceSendContact(WPARAM wParam, LPARAM lParam) {
//lParam=0
//returns 0 on success (will fail if 'force default' is in effect)
INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) {
- if (db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0))
+ if (db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0))
return 1;
- db_set_dw((HCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
NotifyEventHooks(hEventUnforceSend, wParam, lParam);
return 0;
@@ -169,7 +169,7 @@ INT_PTR MetaAPI_UnforceSendContact(WPARAM wParam, LPARAM lParam) {
INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) {
// forward to menu function
Meta_ForceDefault(wParam, lParam);
- return db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ return db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
}
// method to get state of 'force' for a metacontact
@@ -179,15 +179,15 @@ INT_PTR MetaAPI_ForceDefault(WPARAM wParam, LPARAM lParam) {
// or if none is in force, the value (DWORD)-1 will be copied
// (v0.8.0.8+ returns 1 if 'force default' is true with *lParam == default contact number, else returns 0 with *lParam as above)
INT_PTR MetaAPI_GetForceState(WPARAM wParam, LPARAM lParam) {
- HCONTACT hMeta = (HCONTACT)wParam;
+ MCONTACT hMeta = (MCONTACT)wParam;
if ( !hMeta) return 0;
if (db_get_b(hMeta, META_PROTO, "ForceDefault", 0)) {
- if (lParam) *(DWORD *)lParam = db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1);
+ if (lParam) *(DWORD *)lParam = db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1);
return 1;
}
- HCONTACT hContact = (HCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0);
+ MCONTACT hContact = (MCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0);
if ( !hContact) {
if (lParam) *(DWORD *)lParam = -1;
} else {
@@ -216,7 +216,7 @@ INT_PTR MetaAPI_ConvertToMeta(WPARAM wParam, LPARAM lParam) {
// lParam=(HANDLE)hMeta
// add an existing contact to a metacontact
INT_PTR MetaAPI_AddToMeta(WPARAM wParam, LPARAM lParam) {
- return Meta_Assign((HCONTACT)wParam, (HCONTACT)lParam, FALSE);
+ return Meta_Assign((MCONTACT)wParam, (MCONTACT)lParam, FALSE);
}
// added 0.9.5.0 (22/3/05)
diff --git a/plugins/MetaContacts/src/meta_main.cpp b/plugins/MetaContacts/src/meta_main.cpp
index f251c1020d..6f245ff501 100644
--- a/plugins/MetaContacts/src/meta_main.cpp
+++ b/plugins/MetaContacts/src/meta_main.cpp
@@ -151,7 +151,7 @@ extern "C" __declspec(dllexport) int Load(void)
db_set_resident(META_PROTO, "WindowOpen");
//set all contacts to 'offline', and initialize subcontact counter for db consistency check
- for (HCONTACT hContact = db_find_first(META_PROTO); hContact; hContact = db_find_next(hContact, META_PROTO)) {
+ for (MCONTACT hContact = db_find_first(META_PROTO); hContact; hContact = db_find_next(hContact, META_PROTO)) {
db_set_w(hContact, META_PROTO, "Status", ID_STATUS_OFFLINE);
db_set_dw(hContact, META_PROTO, "IdleTS", 0);
db_set_b(hContact, META_PROTO, "ContactCountCheck", 0);
diff --git a/plugins/MetaContacts/src/meta_menu.cpp b/plugins/MetaContacts/src/meta_menu.cpp
index 7c8ae2d560..30ab1750a6 100644
--- a/plugins/MetaContacts/src/meta_menu.cpp
+++ b/plugins/MetaContacts/src/meta_menu.cpp
@@ -42,13 +42,13 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam)
char *group = 0;
// Get some information about the selected contact.
- if ( !db_get_utf((HCONTACT)wParam, "CList", "Group", &dbv)) {
+ if ( !db_get_utf((MCONTACT)wParam, "CList", "Group", &dbv)) {
group = _strdup(dbv.pszVal);
db_free(&dbv);
}
// Create a new metacontact
- HCONTACT hMetaContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
+ MCONTACT hMetaContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD,0,0);
if (hMetaContact) {
db_set_dw(hMetaContact, META_PROTO, META_ID,nextMetaID);
db_set_dw(hMetaContact, META_PROTO, "NumContacts",0);
@@ -61,7 +61,7 @@ INT_PTR Meta_Convert(WPARAM wParam, LPARAM lParam)
db_set_utf(hMetaContact, "CList", "Group", group);
// Assign the contact to the MetaContact just created (and make default).
- if ( !Meta_Assign((HCONTACT)wParam, hMetaContact, TRUE)) {
+ if ( !Meta_Assign((MCONTACT)wParam, hMetaContact, TRUE)) {
MessageBox(0, TranslateT("There was a problem in assigning the contact to the MetaContact"), TranslateT("Error"), MB_ICONEXCLAMATION);
CallService(MS_DB_CONTACT_DELETE, (WPARAM)hMetaContact, 0);
return 0;
@@ -106,7 +106,7 @@ INT_PTR Meta_Edit(WPARAM wParam,LPARAM lParam)
return 0;
}
-void Meta_RemoveContactNumber(HCONTACT hMeta, int number)
+void Meta_RemoveContactNumber(MCONTACT hMeta, int number)
{
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", 0);
int default_contact = db_get_dw(hMeta, META_PROTO, "Default", -1);
@@ -114,10 +114,10 @@ void Meta_RemoveContactNumber(HCONTACT hMeta, int number)
return;
// get the handle
- HCONTACT hContact = Meta_GetContactHandle(hMeta, number);
+ MCONTACT hContact = Meta_GetContactHandle(hMeta, number);
// make sure this contact thinks it's part of this metacontact
- if ((HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0) == hMeta) {
+ if ((MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0) == hMeta) {
// remove link to meta contact
db_unset(hContact, META_PROTO, "IsSubcontact");
db_unset(hContact, META_PROTO, META_LINK);
@@ -207,7 +207,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
DWORD metaID;
// The wParam is a metacontact
- if ((metaID = db_get_dw((HCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
+ if ((metaID = db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1)) != (DWORD)-1) {
if ( !lParam) { // check from recursion - see second half of this function
if ( MessageBox((HWND)CallService(MS_CLUI_GETHWND,0,0),
TranslateT("This will remove the MetaContact permanently.\n\nProceed Anyway?"),
@@ -215,7 +215,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
return 0;
}
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// This contact is assigned to the MetaContact that will be deleted, clear the "MetaContacts" information
if ( db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1) == metaID) {
db_unset(hContact, META_PROTO, "IsSubcontact");
@@ -237,7 +237,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
CallService(MS_DB_CONTACT_DELETE,wParam,0);
}
else {
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
DWORD num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", -1);
if (num_contacts == 1) {
@@ -247,7 +247,7 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
return 0;
}
- Meta_RemoveContactNumber(hMeta, db_get_dw((HCONTACT)wParam, META_PROTO, "ContactNumber", -1));
+ Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1));
}
return 0;
}
@@ -262,11 +262,11 @@ INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam)
*/
INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hMeta;
+ MCONTACT hMeta;
// the wParam is a subcontact
- if ((hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0)) != 0) {
- db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((HCONTACT)wParam));
+ if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0) {
+ db_set_dw(hMeta, META_PROTO, "Default", (DWORD)Meta_GetContactNumber((MCONTACT)wParam));
NotifyEventHooks(hEventDefaultChanged, (WPARAM)hMeta, (LPARAM)wParam);
}
return 0;
@@ -284,15 +284,15 @@ INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam)
INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam)
{
// the wParam is a MetaContact
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
- BOOL current = db_get_b((HCONTACT)wParam, META_PROTO, "ForceDefault", 0);
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1) {
+ BOOL current = db_get_b((MCONTACT)wParam, META_PROTO, "ForceDefault", 0);
current = !current;
- db_set_b((HCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current);
+ db_set_b((MCONTACT)wParam, META_PROTO, "ForceDefault", (BYTE)current);
- db_set_dw((HCONTACT)wParam, META_PROTO, "ForceSend", 0);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "ForceSend", 0);
if (current)
- NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((HCONTACT)wParam, db_get_dw((HCONTACT)wParam, META_PROTO, "Default", -1)));
+ NotifyEventHooks(hEventForceSend, wParam, (LPARAM)Meta_GetContactHandle((MCONTACT)wParam, db_get_dw((MCONTACT)wParam, META_PROTO, "Default", -1)));
else
NotifyEventHooks(hEventUnforceSend, wParam, 0);
}
@@ -317,7 +317,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
WORD status;
CLISTMENUITEM mi = { sizeof(mi) };
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,-1) != (DWORD)-1) {
// save the mouse pos in case they open a subcontact menu
GetCursorPos(&menuMousePoint);
@@ -333,14 +333,14 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
Menu_ModifyItem(hMenuDelete, &mi);
//show subcontact menu items
- int num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", 0);
+ int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0);
for (int i = 0; i < MAX_CONTACTS; i++) {
if (i >= num_contacts) {
Menu_ShowItem(hMenuContact[i], false);
continue;
}
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, i);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i);
char *szProto = GetContactProto(hContact);
if ( !szProto)
status = ID_STATUS_OFFLINE;
@@ -351,7 +351,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
strcpy(buf, "Login");
strcat(buf, _itoa(i, idStr, 10));
- db_get((HCONTACT)wParam, META_PROTO, buf, &dbv);
+ db_get((MCONTACT)wParam, META_PROTO, buf, &dbv);
switch(dbv.type) {
case DBVT_ASCIIZ:
mir_snprintf(buf,512,"%s",dbv.pszVal);
@@ -391,7 +391,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
// wParam = char *szProto
// lParam = BOOL show
char serviceFunc[256];
- mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((HCONTACT)wParam)), PS_SEND_NUDGE);
+ mir_snprintf(serviceFunc, 256, "%s%s", GetContactProto( Meta_GetMostOnline((MCONTACT)wParam)), PS_SEND_NUDGE);
CallService(MS_NUDGE_SHOWMENU, (WPARAM)META_PROTO, (LPARAM)ServiceExists(serviceFunc));
}
else { // This is a simple contact
@@ -403,7 +403,7 @@ int Meta_ModifyMenu(WPARAM wParam, LPARAM lParam)
Menu_ShowItem(hMenuConvert, false);
Menu_ShowItem(hMenuEdit, false);
}
- else if (db_get_dw((HCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
+ else if (db_get_dw((MCONTACT)wParam, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// The contact is affected to a metacontact.
Menu_ShowItem(hMenuDefault, true);
diff --git a/plugins/MetaContacts/src/meta_services.cpp b/plugins/MetaContacts/src/meta_services.cpp
index 3851c575e0..f12a2ee768 100755
--- a/plugins/MetaContacts/src/meta_services.cpp
+++ b/plugins/MetaContacts/src/meta_services.cpp
@@ -191,7 +191,7 @@ INT_PTR Meta_GetStatus(WPARAM wParam,LPARAM lParam)
struct TFakeAckParams
{
HANDLE hEvent;
- HCONTACT hContact;
+ MCONTACT hContact;
LONG id;
char msg[512];
};
@@ -222,9 +222,9 @@ static DWORD CALLBACK sttFakeAckFail( LPVOID param )
INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam)
{
CCSDATA *ccs = (CCSDATA*)lParam;
- HCONTACT hMeta;
+ MCONTACT hMeta;
- if ((hMeta = (HCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
+ if ((hMeta = (MCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
return CallService(MS_PROTO_CHAINSEND, wParam, lParam); // Can't find the MetaID of the metacontact linked to
// if subcontact sending, add db event to keep metacontact history correct
@@ -261,7 +261,7 @@ INT_PTR MetaFilter_SendMessage(WPARAM wParam,LPARAM lParam)
INT_PTR Meta_SendNudge(WPARAM wParam,LPARAM lParam)
{
- HCONTACT hSubContact = Meta_GetMostOnline((HCONTACT)wParam);
+ MCONTACT hSubContact = Meta_GetMostOnline((MCONTACT)wParam);
return ProtoCallService(GetContactProto(hSubContact), PS_SEND_NUDGE, (WPARAM)hSubContact, lParam);
}
@@ -289,7 +289,7 @@ INT_PTR Meta_SendMessage(WPARAM wParam,LPARAM lParam)
return CallService(MS_PROTO_CHAINSEND, wParam, lParam);
}
- HCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
+ MCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
if ( !most_online) {
DWORD dwThreadId;
@@ -359,10 +359,10 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
DBEVENTINFO dbei;
CCSDATA *ccs = (CCSDATA*)lParam;
PROTORECVEVENT *pre = (PROTORECVEVENT *) ccs->lParam;
- HCONTACT hMeta;
+ MCONTACT hMeta;
// Can't find the MetaID of the metacontact linked to this contact, let through the protocol chain
- if ((hMeta = (HCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
+ if ((hMeta = (MCONTACT)db_get_dw(ccs->hContact, META_PROTO, "Handle", 0)) == 0)
return CallService(MS_PROTO_CHAINRECV, wParam, (LPARAM)ccs);
if (options.set_default_on_recv) {
@@ -404,7 +404,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
// use the subcontact's protocol 'recv' service to add the meta's history (AIMOSCAR removes HTML here!) if possible
char *proto = GetContactProto(ccs->hContact);
if (proto) {
- HCONTACT hSub = ccs->hContact;
+ MCONTACT hSub = ccs->hContact;
DWORD flags = pre->flags;
ccs->hContact = hMeta;
pre->flags |= (db_get_b(hMeta, META_PROTO, "WindowOpen", 0) ? 0 : PREF_CREATEREAD);
@@ -437,7 +437,7 @@ INT_PTR MetaFilter_RecvMessage(WPARAM wParam,LPARAM lParam)
return CallService(MS_PROTO_CHAINRECV, wParam, (LPARAM)ccs);
}
- HCONTACT hSub = ccs->hContact;
+ MCONTACT hSub = ccs->hContact;
ccs->hContact = hMeta; // Forward to the associated MetaContact.
CallService(MS_PROTO_CHAINRECV, 0, (LPARAM)ccs);
ccs->hContact = hSub;
@@ -467,7 +467,7 @@ INT_PTR Meta_RecvMessage(WPARAM wParam, LPARAM lParam)
if (options.use_proto_recv) {
// use the subcontact's protocol to add the db if possible (AIMOSCAR removes HTML here!)
- HCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
+ MCONTACT most_online = Meta_GetMostOnline(ccs->hContact);
if (char *subProto = GetContactProto(most_online))
if ( ProtoCallService(subProto, PSR_MESSAGE, wParam, lParam) != CALLSERVICE_NOTFOUND)
return 0;
@@ -503,9 +503,9 @@ information about the ACK.
int Meta_HandleACK(WPARAM wParam, LPARAM lParam)
{
ACKDATA *ack = (ACKDATA*) lParam;
- HCONTACT hUser;
+ MCONTACT hUser;
- if (ack->hContact == 0 || (hUser = (HCONTACT)db_get_dw(ack->hContact, META_PROTO, "Handle",0)) == 0)
+ if (ack->hContact == 0 || (hUser = (MCONTACT)db_get_dw(ack->hContact, META_PROTO, "Handle",0)) == 0)
return 0; // Can't find the MetaID, let through the protocol chain
@@ -527,7 +527,7 @@ int Meta_HandleACK(WPARAM wParam, LPARAM lParam)
DBVARIANT dbv;
// change avatar if the most online supporting avatars changes, or if we don't have one
- HCONTACT most_online = Meta_GetMostOnlineSupporting(hUser, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(hUser, PFLAGNUM_4, PF4_AVATARS);
//if (AI.hContact == 0 || AI.hContact != most_online) {
if (ack->hContact == 0 || ack->hContact != most_online) {
return 0;
@@ -571,7 +571,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
DBCONTACTWRITESETTING *dcws = (DBCONTACTWRITESETTING *)lParam;
char buffer[512], szId[40];
int contact_number;
- HCONTACT hMeta, most_online;
+ MCONTACT hMeta, most_online;
// hide metacontacts when groups disabled
if (wParam == 0
@@ -588,7 +588,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
// import process has just been run...call startup routines...
Meta_SetHandles();
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
int meta_id;
if ((meta_id = db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)) != (DWORD)-1)
Meta_CopyData(hContact);
@@ -601,22 +601,22 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
// from here on, we're just interested in contact settings
if (wParam == 0) return 0;
- if ((hMeta=(HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe
+ if ((hMeta=(MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0))!=0 && CallService(MS_DB_CONTACT_IS, (WPARAM)hMeta, 0)) // just to be safe
{
// This contact is attached to a MetaContact.
- contact_number = Meta_GetContactNumber((HCONTACT)wParam);
+ contact_number = Meta_GetContactNumber((MCONTACT)wParam);
if (contact_number == -1) return 0; // exit - db corruption
if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Group") &&
- Meta_IsEnabled() && db_get_b((HCONTACT)wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) {
+ Meta_IsEnabled() && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 0 && !Miranda_Terminated()) {
if ((dcws->value.type == DBVT_ASCIIZ || dcws->value.type == DBVT_UTF8) && !Meta_IsHiddenGroup(dcws->value.pszVal)) {
// subcontact group reassigned - copy to saved group
- db_set((HCONTACT)wParam, META_PROTO, "OldCListGroup", &dcws->value);
- db_set_s((HCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
+ db_set((MCONTACT)wParam, META_PROTO, "OldCListGroup", &dcws->value);
+ db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
} else if (dcws->value.type == DBVT_DELETED) {
- db_unset((HCONTACT)wParam, META_PROTO, "OldCListGroup");
- db_set_s((HCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
+ db_unset((MCONTACT)wParam, META_PROTO, "OldCListGroup");
+ db_set_s((MCONTACT)wParam, "CList", "Group", META_HIDDEN_GROUP);
}
}
else if ( !strcmp(dcws->szSetting, "IP")) {
@@ -655,7 +655,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
db_set(hMeta, META_PROTO, buffer, &dcws->value);
DBVARIANT dbv;
- if (Mydb_get((HCONTACT)wParam, "CList", "MyHandle", &dbv)) {
+ if (Mydb_get((MCONTACT)wParam, "CList", "MyHandle", &dbv)) {
strcpy(buffer, "CListName");
strcat(buffer, _itoa(contact_number, szId, 10));
db_set(hMeta, META_PROTO, buffer, &dcws->value);
@@ -663,7 +663,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
else db_free(&dbv);
// copy nick to metacontact, if it's the most online
- HCONTACT most_online = Meta_GetMostOnline(hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(hMeta);
Meta_CopyContactNick(hMeta, most_online);
return 0;
@@ -682,12 +682,12 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
}
else if ( !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "MyHandle")) {
if (dcws->value.type == DBVT_DELETED) {
- char *proto = GetContactProto((HCONTACT)wParam);
+ char *proto = GetContactProto((MCONTACT)wParam);
strcpy(buffer, "CListName");
strcat(buffer, _itoa(contact_number, szId, 10));
DBVARIANT dbv;
- if (proto && !Mydb_get((HCONTACT)wParam, proto, "Nick", &dbv)) {
+ if (proto && !Mydb_get((MCONTACT)wParam, proto, "Nick", &dbv)) {
db_set(hMeta, META_PROTO, buffer, &dbv);
db_free(&dbv);
} else {
@@ -702,7 +702,7 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
}
// copy nick to metacontact, if it's the most online
- HCONTACT most_online = Meta_GetMostOnline(hMeta);
+ MCONTACT most_online = Meta_GetMostOnline(hMeta);
Meta_CopyContactNick(hMeta, most_online);
return 0;
@@ -752,11 +752,11 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
Meta_CopyData(hMeta);
}
else if ( !meta_group_hack_disabled && !strcmp(dcws->szModule, "CList") && !strcmp(dcws->szSetting, "Hidden")) {
- if ((dcws->value.type == DBVT_DELETED || db_get_b((HCONTACT)wParam, "CList", "Hidden", 0) == 0)
- && db_get_b((HCONTACT)wParam, META_PROTO, "Hidden", 0) == 1)
+ if ((dcws->value.type == DBVT_DELETED || db_get_b((MCONTACT)wParam, "CList", "Hidden", 0) == 0)
+ && db_get_b((MCONTACT)wParam, META_PROTO, "Hidden", 0) == 1)
{
// a subcontact we hid (e.g. jabber) has been unhidden - hide it again :(
- db_set_b((HCONTACT)wParam, "CList", "Hidden", 1);
+ db_set_b((MCONTACT)wParam, "CList", "Hidden", 1);
}
}
}
@@ -767,21 +767,21 @@ int Meta_SettingChanged(WPARAM wParam, LPARAM lParam)
int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam)
{
// is a subcontact - update meta contact
- HCONTACT hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle", 0);
if (hMeta) {
- Meta_RemoveContactNumber(hMeta, db_get_dw((HCONTACT)wParam, META_PROTO, "ContactNumber", -1));
+ Meta_RemoveContactNumber(hMeta, db_get_dw((MCONTACT)wParam, META_PROTO, "ContactNumber", -1));
NotifyEventHooks(hSubcontactsChanged, (WPARAM)hMeta, 0);
return 0;
}
// not a subcontact - is it a metacontact?
- int num_contacts = db_get_dw((HCONTACT)wParam, META_PROTO, "NumContacts", 0);
+ int num_contacts = db_get_dw((MCONTACT)wParam, META_PROTO, "NumContacts", 0);
if (num_contacts)
NotifyEventHooks(hSubcontactsChanged, (WPARAM)wParam, 0);
// remove & restore all subcontacts
for (int i = 0; i < num_contacts; i++) {
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, i);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, i);
if (hContact && (HANDLE)db_get_dw(hContact, META_PROTO, "Handle", 0) == (HANDLE)wParam) {
if (db_get_b(hContact, META_PROTO, "IsSubcontact", 0) == 1)
db_unset(hContact, META_PROTO, "IsSubcontact");
@@ -807,13 +807,13 @@ int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam)
INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam)
{
// This is a simple contact, let through the stack of protocols
- if (db_get_dw((HCONTACT)wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1)
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, META_ID,(DWORD)-1) == (DWORD)-1)
return 0;
// forward to sending protocol, if supported
- HCONTACT most_online = Meta_GetMostOnline((HCONTACT)wParam);
- Meta_CopyContactNick((HCONTACT)wParam, most_online);
+ MCONTACT most_online = Meta_GetMostOnline((MCONTACT)wParam);
+ Meta_CopyContactNick((MCONTACT)wParam, most_online);
if ( !most_online)
return 0;
@@ -832,8 +832,8 @@ INT_PTR Meta_UserIsTyping(WPARAM wParam, LPARAM lParam)
*/
int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hMeta;
- if ((hMeta = (HCONTACT)db_get_dw((HCONTACT)wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) {
+ MCONTACT hMeta;
+ if ((hMeta = (MCONTACT)db_get_dw((MCONTACT)wParam, META_PROTO, "Handle",0)) != 0 && Meta_IsEnabled()) {
// This contact is attached to a MetaContact.
if ( !options.subcontact_windows) { // we don't want clicking on the clist notification icon to open the metacontact message window
// try to remove any clist events we added for subcontact
@@ -855,12 +855,12 @@ int Meta_ContactIsTyping(WPARAM wParam, LPARAM lParam)
int Meta_UserInfo(WPARAM wParam, LPARAM lParam)
{
- DWORD default_contact_number = db_get_dw((HCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
+ DWORD default_contact_number = db_get_dw((MCONTACT)lParam, META_PROTO, "Default", (DWORD)-1);
if (default_contact_number == -1) // not a meta contact
return 0;
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle((HCONTACT)lParam, default_contact_number), 0);
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)Meta_GetContactHandle((MCONTACT)lParam, default_contact_number), 0);
return 1;
}
@@ -868,11 +868,11 @@ int Meta_UserInfo(WPARAM wParam, LPARAM lParam)
// let received messages through and add db history to metacontact, or vice versa
int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) {
MessageWindowEventData *mwed = (MessageWindowEventData *)lParam;
- HCONTACT hMeta = 0;
+ MCONTACT hMeta = 0;
message_window_api_enabled = TRUE;
- if ((hMeta = (HCONTACT)db_get_dw(mwed->hContact, META_PROTO, "Handle", 0)) != 0
+ if ((hMeta = (MCONTACT)db_get_dw(mwed->hContact, META_PROTO, "Handle", 0)) != 0
|| db_get_dw(mwed->hContact, META_PROTO, META_ID, (DWORD)-1) != (DWORD)-1)
{
// contact is subcontact of metacontact, or an actual metacontact - record whether window is open or closed
@@ -907,11 +907,11 @@ int Meta_MessageWindowEvent(WPARAM wParam, LPARAM lParam) {
int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam)
{
- if (db_get_dw((HCONTACT)wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1)
+ if (db_get_dw((MCONTACT)wParam, META_PROTO, "Default",(WORD)-1) == (WORD)-1)
return 0;
// -1 indicates no specific capability but respect 'ForceDefault'
- HCONTACT most_online = Meta_GetMostOnlineSupporting((HCONTACT)wParam, PFLAGNUM_1, -1);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting((MCONTACT)wParam, PFLAGNUM_1, -1);
if ( !most_online)
return 0;
@@ -944,7 +944,7 @@ int Meta_ClistDoubleClicked(WPARAM wParam, LPARAM lParam)
INT_PTR Meta_ClistMessageEventClicked(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
+ MCONTACT hContact = ((CLISTEVENT *)lParam)->hContact;
return Meta_ClistDoubleClicked((WPARAM)hContact, (LPARAM)((CLISTEVENT *)lParam)->hDbEvent);
}
@@ -1041,7 +1041,7 @@ int Meta_ModulesLoaded(WPARAM wParam, LPARAM lParam)
// loop and copy data from subcontacts
if (options.copydata) {
int meta_id;
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
if ((meta_id = db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1))!=(DWORD)-1)
Meta_CopyData(hContact);
}
@@ -1093,7 +1093,7 @@ static VOID CALLBACK sttMenuThread( PVOID param )
INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam)
{
- HCONTACT hContact = Meta_GetContactHandle((HCONTACT)wParam, (int)lParam);
+ MCONTACT hContact = Meta_GetContactHandle((MCONTACT)wParam, (int)lParam);
if (options.menu_function == FT_MSG) {
// open message window if protocol supports message sending or chat, else simulate double click
@@ -1112,7 +1112,7 @@ INT_PTR Meta_ContactMenuFunc(WPARAM wParam, LPARAM lParam)
if ((caps & PF1_IMSEND) || (caps & PF1_CHAT) || (proto && strcmp(proto, "IRC") == 0)) {
// set default contact for sending/status and open message window
- db_set_dw((HCONTACT)wParam, META_PROTO, "Default", (DWORD)(int)lParam);
+ db_set_dw((MCONTACT)wParam, META_PROTO, "Default", (DWORD)(int)lParam);
NotifyEventHooks(hEventDefaultChanged, wParam, (LPARAM)hContact);
CallService(MS_MSG_SENDMESSAGE, wParam, 0);
} else
@@ -1152,7 +1152,7 @@ INT_PTR Meta_FileSend(WPARAM wParam, LPARAM lParam)
}
else
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_FILESEND);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_FILESEND);
if ( !most_online) {
//PUShowMessage("no most online for ft", SM_NOTIFY);
return 0;
@@ -1179,7 +1179,7 @@ INT_PTR Meta_GetAwayMsg(WPARAM wParam, LPARAM lParam)
}
else
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_MODEMSGRECV);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_1, PF1_MODEMSGRECV);
if ( !most_online)
return 0;
@@ -1208,8 +1208,8 @@ INT_PTR Meta_GetAvatarInfo(WPARAM wParam, LPARAM lParam) {
}
else
{
- HCONTACT hMeta = AI->hContact;
- HCONTACT hSub = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT hMeta = AI->hContact;
+ MCONTACT hSub = Meta_GetMostOnlineSupporting(AI->hContact, PFLAGNUM_4, PF4_AVATARS);
if ( !hSub)
return GAIR_NOAVATAR;
@@ -1236,7 +1236,7 @@ INT_PTR Meta_GetInfo(WPARAM wParam, LPARAM lParam)
if ((default_contact_number = db_get_dw(ccs->hContact, META_PROTO, "Default",(DWORD)-1)) == (DWORD)-1)
return 0;
- HCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_4, PF4_AVATARS);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(ccs->hContact, PFLAGNUM_4, PF4_AVATARS);
if ( !most_online)
return 0;
@@ -1292,16 +1292,16 @@ int Meta_OptInit(WPARAM wParam, LPARAM lParam)
int Meta_CallMostOnline(WPARAM wParam, LPARAM lParam)
{
- HCONTACT most_online_im = Meta_GetMostOnline((HCONTACT)wParam);
+ MCONTACT most_online_im = Meta_GetMostOnline((MCONTACT)wParam);
// fix nick
- Meta_CopyContactNick((HCONTACT)wParam, most_online_im);
+ Meta_CopyContactNick((MCONTACT)wParam, most_online_im);
// fix status
- Meta_FixStatus((HCONTACT)wParam);
+ Meta_FixStatus((MCONTACT)wParam);
// copy all other data
- Meta_CopyData((HCONTACT) wParam);
+ Meta_CopyData((MCONTACT) wParam);
return 0;
}
diff --git a/plugins/MetaContacts/src/meta_utils.cpp b/plugins/MetaContacts/src/meta_utils.cpp
index cc2b70ce98..4d83038cd3 100644
--- a/plugins/MetaContacts/src/meta_utils.cpp
+++ b/plugins/MetaContacts/src/meta_utils.cpp
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
HANDLE invisiGroup;
POINT menuMousePoint;
-INT_PTR Mydb_get(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
+INT_PTR Mydb_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv)
{
memset(dbv, 0, sizeof(DBVARIANT));
return db_get_s(hContact, szModule, szSetting, dbv, 0);
@@ -86,7 +86,7 @@ int Meta_EqualDBV(DBVARIANT *dbv, DBVARIANT *id) {
* @return a \c HANDLE to the specified contact or \c NULL
if no contact has been found.
*/
-HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id)
+MCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id)
{
char *field;
DBVARIANT dbv;
@@ -98,7 +98,7 @@ HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id)
field = (char *)CallProtoService(protocol,PS_GETCAPS,PFLAG_UNIQUEIDSETTING,0);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
// Scan the database and retrieve the field for each contact
if ( !db_get(hContact, protocol, field, &dbv)) {
if (dbv.type == id->type) {
@@ -209,12 +209,12 @@ int Meta_SetNick(char *szProto)
*
* @return TRUE on success, FALSE otherwise
*/
-BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default)
+BOOL Meta_Assign(MCONTACT src, MCONTACT dest, BOOL set_as_default)
{
DWORD metaID, num_contacts;
char buffer[512], szId[40];
WORD status;
- HCONTACT most_online;
+ MCONTACT most_online;
if ((metaID = db_get_dw(dest, META_PROTO, META_ID,(DWORD)-1))==-1) {
MessageBox(0, TranslateT("Could not get MetaContact ID"), TranslateT("Assignment error"), MB_OK | MB_ICONWARNING);
@@ -377,7 +377,7 @@ BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default)
* Convenience method - get most online contact supporting messaging
*
*/
-HCONTACT Meta_GetMostOnline(HCONTACT hMeta) {
+MCONTACT Meta_GetMostOnline(MCONTACT hMeta) {
return Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, PF1_IM);
}
/** Get the 'most online' contact for a meta contact (according to above order) which supports the specified
@@ -388,9 +388,9 @@ HCONTACT Meta_GetMostOnline(HCONTACT hMeta) {
* @return \c HANDLE to a contact
*/
-HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned long capability) {
+MCONTACT Meta_GetMostOnlineSupporting(MCONTACT hMeta, int pflagnum, unsigned long capability) {
int most_online_status = ID_STATUS_OFFLINE;
- HCONTACT most_online_contact = NULL, hContact;
+ MCONTACT most_online_contact = NULL, hContact;
int i, status, default_contact_number, num_contacts;
unsigned long caps = 0;
char *szProto, *most_online_proto;
@@ -416,7 +416,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon
return most_online_contact;
// a subcontact is being temporarily 'forced' to do sending
- if ((most_online_contact = (HCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0))) {
+ if ((most_online_contact = (MCONTACT)db_get_dw(hMeta, META_PROTO, "ForceSend", 0))) {
caps = szProto ? CallProtoService(szProto, PS_GETCAPS, (WPARAM)pflagnum, 0) : 0;
if (szProto && strcmp(szProto, "IRC") == 0) caps |= PF1_IM;
if (szProto && (caps & capability) == capability && capability != 0) // capability is 0 when we're working out status
@@ -477,7 +477,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon
// no online contacts? if we're trying to message, use 'send offline' contact
if (most_online_status == ID_STATUS_OFFLINE && capability == PF1_IM) {
- HCONTACT hOffline = Meta_GetContactHandle(hMeta, db_get_dw(hMeta, META_PROTO, "OfflineSend", (DWORD)-1));
+ MCONTACT hOffline = Meta_GetContactHandle(hMeta, db_get_dw(hMeta, META_PROTO, "OfflineSend", (DWORD)-1));
if (hOffline)
most_online_contact = hOffline;
}
@@ -485,7 +485,7 @@ HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned lon
return most_online_contact;
}
-int Meta_GetContactNumber(HCONTACT hContact) {
+int Meta_GetContactNumber(MCONTACT hContact) {
return db_get_dw(hContact, META_PROTO, "ContactNumber", -1);
}
@@ -509,12 +509,12 @@ BOOL dbv_same(DBVARIANT *dbv1, DBVARIANT *dbv2) {
}
}
- void copy_settings_array(HCONTACT hMeta, char *module, const char *settings[], int num_settings) {
+ void copy_settings_array(MCONTACT hMeta, char *module, const char *settings[], int num_settings) {
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", (DWORD)-1),
default_contact = db_get_dw(hMeta, META_PROTO, "Default", (DWORD)-1),
most_online = Meta_GetContactNumber(Meta_GetMostOnline(hMeta));
- HCONTACT hContact;
+ MCONTACT hContact;
int i, j;
char *used_mod;
@@ -613,12 +613,12 @@ const char *MBirthdaySettings[3] =
// szProto:
// clist: "StatusMsg"
-void CopyStatusData(HCONTACT hMeta)
+void CopyStatusData(MCONTACT hMeta)
{
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", (DWORD)-1),
most_online = Meta_GetContactNumber(Meta_GetMostOnline(hMeta));
WORD status = db_get_w(hMeta, META_PROTO, "Status", ID_STATUS_OFFLINE);
- HCONTACT hContact;
+ MCONTACT hContact;
BOOL bDoneStatus = FALSE, bDoneXStatus = FALSE;
for (int i = 0; i < num_contacts; i++) {
@@ -667,7 +667,7 @@ void CopyStatusData(HCONTACT hMeta)
}
}
-void Meta_CopyData(HCONTACT hMeta)
+void Meta_CopyData(MCONTACT hMeta)
{
if (options.copydata) {
CopyStatusData(hMeta);
@@ -682,7 +682,7 @@ void Meta_CopyData(HCONTACT hMeta)
}
-HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number)
+MCONTACT Meta_GetContactHandle(MCONTACT hMeta, int contact_number)
{
char buffer[512], buffer2[512];
int num_contacts = db_get_dw(hMeta, META_PROTO, "NumContacts", 0);
@@ -691,13 +691,13 @@ HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number)
strcpy(buffer, "Handle");
strcat(buffer, _itoa(contact_number, buffer2, 10));
- return (HCONTACT)db_get_dw(hMeta, META_PROTO, buffer, 0);
+ return (MCONTACT)db_get_dw(hMeta, META_PROTO, buffer, 0);
}
int Meta_SetHandles(void)
{
DWORD meta_id, num_contacts, contact_number;
- HCONTACT hContact2, hContact = db_find_first(), hNextContact;
+ MCONTACT hContact2, hContact = db_find_first(), hNextContact;
char buffer[512];
TCHAR nick_buffer[128], buffer2[40];
BOOL found;
@@ -875,7 +875,7 @@ int Meta_HideLinkedContacts(void) {
char *szProto, *group_name;
int hGroup = 1;
- HCONTACT hContact2, hContact = db_find_first();
+ MCONTACT hContact2, hContact = db_find_first();
// ensure the hidden group does not exist (how this occurs i wonder but there have been reports!)
// (sometimes protocol server side groups are to blame - msn and icq)
@@ -961,7 +961,7 @@ int Meta_HideLinkedContacts(void) {
while ( hContact != NULL ) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
// is a meta contact
- HCONTACT hMostOnline = Meta_GetMostOnline(hContact); // set nick
+ MCONTACT hMostOnline = Meta_GetMostOnline(hContact); // set nick
Meta_CopyContactNick(hContact, hMostOnline);
Meta_FixStatus(hContact);
@@ -979,7 +979,7 @@ int Meta_HideLinkedContacts(void) {
*/
int Meta_UnhideLinkedContacts(void)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// has a link - unhide it
// restore old group
@@ -996,7 +996,7 @@ int Meta_HideMetaContacts(int hide)
if (hide) Meta_SuppressStatus(FALSE);
else Meta_SuppressStatus(options.suppress_status);
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
// is a meta contact
if (hide)
@@ -1016,7 +1016,7 @@ int Meta_HideMetaContacts(int hide)
return 0;
}
-void Meta_RestoreGroup(HCONTACT hContact) {
+void Meta_RestoreGroup(MCONTACT hContact) {
if (meta_group_hack_disabled) return; // clist has called api function to disable group hack - yay!
@@ -1057,7 +1057,7 @@ void Meta_RestoreGroup(HCONTACT hContact) {
else {
// put back into metacontact's group
DBVARIANT dbv;
- HCONTACT hMeta = (HCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
+ MCONTACT hMeta = (MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0);
if (hMeta && !Mydb_get(hMeta, "CList", "Group", &dbv)) {
db_set(hContact, "CList", "Group", &dbv);
db_free(&dbv);
@@ -1082,7 +1082,7 @@ void Meta_RestoreGroup(HCONTACT hContact) {
db_unset(hContact, "CList", "Hidden");
}
-void Meta_SetGroup(HCONTACT hContact) {
+void Meta_SetGroup(MCONTACT hContact) {
char *szProto, *uid;
if (meta_group_hack_disabled) return; // clist has called api function to disable group hack - yay!
@@ -1118,7 +1118,7 @@ void Meta_SetGroup(HCONTACT hContact) {
int Meta_SuppressStatus(BOOL suppress)
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_LINK,(DWORD)-1)!=(DWORD)-1) {
// is a subcontact
if (suppress)
@@ -1131,7 +1131,7 @@ int Meta_SuppressStatus(BOOL suppress)
return 0;
}
-int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact) {
+int Meta_CopyContactNick(MCONTACT hMeta, MCONTACT hContact) {
DBVARIANT dbv, dbv_proto;
char *szProto;
@@ -1170,9 +1170,9 @@ int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact) {
int Meta_SetAllNicks()
{
- for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
if (db_get_dw(hContact, META_PROTO, META_ID,(DWORD)-1)!=(DWORD)-1) {
- HCONTACT most_online = Meta_GetMostOnline(hContact);
+ MCONTACT most_online = Meta_GetMostOnline(hContact);
Meta_CopyContactNick(hContact, most_online);
Meta_FixStatus(hContact);
Meta_CopyData(hContact);
@@ -1190,10 +1190,10 @@ int Meta_IsHiddenGroup(const char *group_name)
return 0;
}
-int Meta_SwapContacts(HCONTACT hMeta, DWORD contact_number1, DWORD contact_number2) {
+int Meta_SwapContacts(MCONTACT hMeta, DWORD contact_number1, DWORD contact_number2) {
DBVARIANT dbv1, dbv2;
- HCONTACT hContact1 = Meta_GetContactHandle(hMeta, contact_number1),
+ MCONTACT hContact1 = Meta_GetContactHandle(hMeta, contact_number1),
hContact2 = Meta_GetContactHandle(hMeta, contact_number2);
char buff1[512], buff12[512], buff2[512], buff22[512];
BOOL ok1, ok2;
@@ -1348,7 +1348,7 @@ INT_PTR CALLBACK DlgProcNull(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
}
// function to copy history from one contact to another - courtesy JdGordon (thx)
-void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo)
+void copyHistory(MCONTACT hContactFrom, MCONTACT hContactTo)
{
HANDLE hDbEvent;
DBEVENTINFO dbei;
@@ -1409,9 +1409,9 @@ void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo)
//mir_free(id);
}
-void Meta_FixStatus(HCONTACT hMeta)
+void Meta_FixStatus(MCONTACT hMeta)
{
- HCONTACT most_online = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, 0);
+ MCONTACT most_online = Meta_GetMostOnlineSupporting(hMeta, PFLAGNUM_1, 0);
if (most_online) {
char *szProto = GetContactProto(most_online);
if (szProto) {
diff --git a/plugins/MetaContacts/src/metacontacts.h b/plugins/MetaContacts/src/metacontacts.h
index 637db357d5..369bdf696c 100644
--- a/plugins/MetaContacts/src/metacontacts.h
+++ b/plugins/MetaContacts/src/metacontacts.h
@@ -63,7 +63,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
// I can't think of a way around this - mental block
-INT_PTR TranslateMenuFunc(HCONTACT hContact, int i);
+INT_PTR TranslateMenuFunc(MCONTACT hContact, int i);
extern HGENMENU hMenuContact[MAX_CONTACTS];
extern HINSTANCE hInstance;
@@ -78,7 +78,7 @@ extern int mcStatus;
INT_PTR Meta_Convert(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_AddTo(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_Edit(WPARAM wParam,LPARAM lParam);
-void Meta_RemoveContactNumber(HCONTACT hMeta, int number);
+void Meta_RemoveContactNumber(MCONTACT hMeta, int number);
INT_PTR Meta_Delete(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_Default(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_ForceDefault(WPARAM wParam,LPARAM lParam);
@@ -87,32 +87,32 @@ INT_PTR Meta_IsEnabled();
int Meta_EqualDBV(DBVARIANT *dbv, DBVARIANT *id);
int Meta_ModifyMenu(WPARAM wParam,LPARAM lParam);
-BOOL Meta_Assign(HCONTACT src, HCONTACT dest, BOOL set_as_default);
-HCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id);
+BOOL Meta_Assign(MCONTACT src, MCONTACT dest, BOOL set_as_default);
+MCONTACT Meta_GetHandle(const char *protocol, DBVARIANT *id);
int Meta_SetNick(char *proto);
-HCONTACT Meta_GetMostOnline(HCONTACT hMeta);
-HCONTACT Meta_GetMostOnlineSupporting(HCONTACT hMeta, int pflagnum, unsigned long capability);
+MCONTACT Meta_GetMostOnline(MCONTACT hMeta);
+MCONTACT Meta_GetMostOnlineSupporting(MCONTACT hMeta, int pflagnum, unsigned long capability);
int Meta_HideLinkedContacts(void);
int Meta_SetHandles(void);
int Meta_UnhideLinkedContacts(void);
-int Meta_GetContactNumber(HCONTACT hContact);
-HCONTACT Meta_GetContactHandle(HCONTACT hMeta, int contact_number);
-void Meta_RestoreGroup(HCONTACT hContact);
-void Meta_SetGroup(HCONTACT hContact);
+int Meta_GetContactNumber(MCONTACT hContact);
+MCONTACT Meta_GetContactHandle(MCONTACT hMeta, int contact_number);
+void Meta_RestoreGroup(MCONTACT hContact);
+void Meta_SetGroup(MCONTACT hContact);
int Meta_HideMetaContacts(int hide);
int Meta_SuppressStatus(int suppress);
-int Meta_CopyContactNick(HCONTACT hMeta, HCONTACT hContact);
-void Meta_CopyData(HCONTACT hMeta);
+int Meta_CopyContactNick(MCONTACT hMeta, MCONTACT hContact);
+void Meta_CopyData(MCONTACT hMeta);
int Meta_SetAllNicks();
int Meta_IsHiddenGroup(const char *group_name);
-int Meta_SwapContacts(HCONTACT hMeta, DWORD contact_number1, DWORD contact_number2);
+int Meta_SwapContacts(MCONTACT hMeta, DWORD contact_number1, DWORD contact_number2);
// function to copy history from one contact to another - courtesy JdGordon with mods (thx)
-void copyHistory(HCONTACT hContactFrom, HCONTACT hContactTo);
+void copyHistory(MCONTACT hContactFrom, MCONTACT hContactTo);
// inverse
//void Meta_RemoveHistory(HANDLE hContactRemoveFrom, HANDLE hContactSource);
-void Meta_FixStatus(HCONTACT hMeta);
+void Meta_FixStatus(MCONTACT hMeta);
-char *Meta_GetUniqueIdentifier(HCONTACT hContact, DWORD *pused);
+char *Meta_GetUniqueIdentifier(MCONTACT hContact, DWORD *pused);
INT_PTR Meta_GetCaps(WPARAM wParam,LPARAM lParam);
INT_PTR Meta_GetName(WPARAM wParam,LPARAM lParam);
@@ -187,7 +187,7 @@ INT_PTR MetaAPI_RemoveFromMeta(WPARAM wParam, LPARAM lParam);
INT_PTR MetaAPI_DisableHiddenGroup(WPARAM wParam, LPARAM lParam);
// extended db get/write setting functions, that handle unicode
-INT_PTR Mydb_get(HCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
+INT_PTR Mydb_get(MCONTACT hContact, const char *szModule, const char *szSetting, DBVARIANT *dbv);
// IcoLib support
void InitIcons(void);