summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/utility.cpp
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 /protocols/AimOscar/src/utility.cpp
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 'protocols/AimOscar/src/utility.cpp')
-rw-r--r--protocols/AimOscar/src/utility.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/protocols/AimOscar/src/utility.cpp b/protocols/AimOscar/src/utility.cpp
index 7df2eccaaf..119234a93c 100644
--- a/protocols/AimOscar/src/utility.cpp
+++ b/protocols/AimOscar/src/utility.cpp
@@ -160,15 +160,15 @@ unsigned short CAimProto::get_default_port(void)
return getWord(AIM_KEY_PN, getByte(AIM_KEY_DSSL, 0) ? AIM_DEFAULT_PORT : AIM_DEFAULT_SSL_PORT);
}
-bool CAimProto::is_my_contact(HCONTACT hContact)
+bool CAimProto::is_my_contact(MCONTACT hContact)
{
const char* szProto = GetContactProto(hContact);
return szProto != NULL && strcmp(m_szModuleName, szProto) == 0;
}
-HCONTACT CAimProto::find_chat_contact(const char* room)
+MCONTACT CAimProto::find_chat_contact(const char* room)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, "ChatRoomID", &dbv)) {
bool found = !strcmp(room, dbv.pszVal);
@@ -180,11 +180,11 @@ HCONTACT CAimProto::find_chat_contact(const char* room)
return NULL;
}
-HCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool temporary)
+MCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool temporary)
{
ptrA norm_sn( normalize_name(sn));
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if (!getString(hContact, AIM_KEY_SN, &dbv)) {
bool found = !strcmp(norm_sn, dbv.pszVal);
@@ -195,7 +195,7 @@ HCONTACT CAimProto::contact_from_sn(const char* sn, bool addIfNeeded, bool tempo
}
if (addIfNeeded) {
- HCONTACT hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if (hContact) {
if (CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) m_szModuleName) == 0) {
setString(hContact, AIM_KEY_SN, norm_sn);
@@ -234,7 +234,7 @@ void CAimProto::update_server_group(const char* group, unsigned short group_id)
mir_free(user_id_array);
}
-void CAimProto::add_contact_to_group(HCONTACT hContact, const char* new_group)
+void CAimProto::add_contact_to_group(MCONTACT hContact, const char* new_group)
{
if (new_group == NULL) return;
@@ -300,7 +300,7 @@ void CAimProto::add_contact_to_group(HCONTACT hContact, const char* new_group)
db_free(&dbv);
}
-void CAimProto::offline_contact(HCONTACT hContact, bool remove_settings)
+void CAimProto::offline_contact(MCONTACT hContact, bool remove_settings)
{
if (remove_settings)
{
@@ -318,7 +318,7 @@ void CAimProto::offline_contact(HCONTACT hContact, bool remove_settings)
void CAimProto::offline_contacts(void)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
offline_contact(hContact,true);
allow_list.destroy();
@@ -376,14 +376,14 @@ void create_group(const char *group)
mir_free(szGroupName);
}
-unsigned short CAimProto::search_for_free_item_id(HCONTACT hbuddy)//returns a free item id and links the id to the buddy
+unsigned short CAimProto::search_for_free_item_id(MCONTACT hbuddy)//returns a free item id and links the id to the buddy
{
unsigned short id;
retry:
id = get_random();
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
for(int i=1; ;++i) {
unsigned short item_id = getBuddyId(hContact, i);
if (item_id == 0) break;
@@ -402,7 +402,7 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne
unsigned short* list = NULL;
size = 0;
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
for(int i=1; ;++i) {
unsigned short user_group_id = getGroupId(hContact, i);
if (user_group_id == 0)
@@ -422,7 +422,7 @@ unsigned short* CAimProto::get_members_of_group(unsigned short group_id, unsigne
void CAimProto::upload_nicks(void)
{
- for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
DBVARIANT dbv;
if ( !db_get_utf(hContact, MOD_KEY_CL, "MyHandle", &dbv)) {
set_local_nick(hContact, dbv.pszVal, NULL);
@@ -431,7 +431,7 @@ void CAimProto::upload_nicks(void)
}
}
-void CAimProto::set_local_nick(HCONTACT hContact, char* nick, char* note)
+void CAimProto::set_local_nick(MCONTACT hContact, char* nick, char* note)
{
DBVARIANT dbv;
if (getString(hContact, AIM_KEY_SN, &dbv)) return;
@@ -498,42 +498,42 @@ void BdList::remove_by_id(unsigned short id)
/////////////////////////////////////////////////////////////////////////////////////////
-unsigned short CAimProto::getBuddyId(HCONTACT hContact, int i)
+unsigned short CAimProto::getBuddyId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
return getWord(hContact, item, 0);
}
-void CAimProto::setBuddyId(HCONTACT hContact, int i, unsigned short id)
+void CAimProto::setBuddyId(MCONTACT hContact, int i, unsigned short id)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
setWord(hContact, item, id);
}
-int CAimProto::deleteBuddyId(HCONTACT hContact, int i)
+int CAimProto::deleteBuddyId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_BI)+10];
mir_snprintf(item, sizeof(AIM_KEY_BI)+10, AIM_KEY_BI"%d", i);
return delSetting(hContact, item);
}
-unsigned short CAimProto::getGroupId(HCONTACT hContact, int i)
+unsigned short CAimProto::getGroupId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);
return getWord(hContact, item, 0);
}
-void CAimProto::setGroupId(HCONTACT hContact, int i, unsigned short id)
+void CAimProto::setGroupId(MCONTACT hContact, int i, unsigned short id)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);
setWord(hContact, item, id);
}
-int CAimProto::deleteGroupId(HCONTACT hContact, int i)
+int CAimProto::deleteGroupId(MCONTACT hContact, int i)
{
char item[sizeof(AIM_KEY_GI)+10];
mir_snprintf(item, sizeof(AIM_KEY_GI)+10, AIM_KEY_GI"%d", i);