summaryrefslogtreecommitdiff
path: root/protocols/Yahoo/src/yahoo.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/Yahoo/src/yahoo.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/Yahoo/src/yahoo.cpp')
-rw-r--r--protocols/Yahoo/src/yahoo.cpp34
1 files changed, 17 insertions, 17 deletions
diff --git a/protocols/Yahoo/src/yahoo.cpp b/protocols/Yahoo/src/yahoo.cpp
index ef7fcfb7c0..fc4debb1f5 100644
--- a/protocols/Yahoo/src/yahoo.cpp
+++ b/protocols/Yahoo/src/yahoo.cpp
@@ -228,7 +228,7 @@ void CYahooProto::logout()
poll_loop = 0;
}
-void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *msg)
+void CYahooProto::AddBuddy(MCONTACT hContact, const char *group, const TCHAR *msg)
{
DBVARIANT dbv;
char *fname=NULL, *lname=NULL, *ident=NULL, *who, *u_msg;
@@ -282,9 +282,9 @@ void CYahooProto::AddBuddy(HCONTACT hContact, const char *group, const TCHAR *ms
mir_free(u_msg);
}
-HCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
+MCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
{
- 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, YAHOO_LOGINID, &dbv))
continue;
@@ -300,12 +300,12 @@ HCONTACT CYahooProto::getbuddyH(const char *yahoo_id)
return NULL;
}
-HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags)
+MCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, int protocol, DWORD flags)
{
char *yid = NEWSTR_ALLOCA(yahoo_id);
strlwr(yid);
- HCONTACT hContact = getbuddyH(yid);
+ MCONTACT hContact = getbuddyH(yid);
if (hContact != NULL) {
LOG(("[add_buddy] Found buddy id: %s, handle: %p", yid, hContact));
if ( !(flags & PALF_TEMPORARY) && db_get_b(hContact, "CList", "NotOnList", 1)) {
@@ -319,7 +319,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in
//not already there: add
LOG(("[add_buddy] Adding buddy id: %s (Nick: %s), flags: %lu", yid, yahoo_name, flags));
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact,(LPARAM)m_szModuleName);
setString( hContact, YAHOO_LOGINID, yid );
Set_Protocol( hContact, protocol );
@@ -340,7 +340,7 @@ HCONTACT CYahooProto::add_buddy(const char *yahoo_id, const char *yahoo_name, in
const char* CYahooProto::find_buddy( const char *yahoo_id)
{
static char nick[128];
- HCONTACT hContact;
+ MCONTACT hContact;
DBVARIANT dbv;
hContact = getbuddyH(yahoo_id);
@@ -371,7 +371,7 @@ void CYahooProto::ext_status_changed(const char *who, int protocol, int stat, co
away,
idle);
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
debugLogA("Buddy Not Found. Adding...");
hContact = add_buddy(who, who, protocol, 0);
@@ -426,7 +426,7 @@ void CYahooProto::ext_status_logon(const char *who, int protocol, int stat, cons
ext_status_changed(who, protocol, stat, msg, away, idle, mobile, utf8);
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
debugLogA("[ext_status_logon] Can't find handle for %s??? PANIC!!!", who);
return;
@@ -569,7 +569,7 @@ void CYahooProto::ext_got_audible(const char *me, const char *who, const char *a
LOG(("ext_got_audible for %s aud: %s msg:'%s' hash: %s", who, aud, msg, aud_hash));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact == NULL) {
LOG(("Buddy Not Found. Skipping avatar update"));
return;
@@ -600,7 +600,7 @@ void CYahooProto::ext_got_stealth(char *stealthlist)
if (stealthlist)
stealth = y_strsplit(stealthlist, ",", -1);
- 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, YAHOO_LOGINID, &dbv))
continue;
@@ -645,7 +645,7 @@ void CYahooProto::ext_got_buddies(YList * buds)
debugLogA(("[ext_got_buddies] Walking buddy list..."));
for (; buds; buds = buds->next) {
- HCONTACT hContact;
+ MCONTACT hContact;
yahoo_buddy *bud = ( yahoo_buddy* )buds->data;
if (bud == NULL) {
@@ -719,7 +719,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg)
{
LOG(("[ext_rejected] who: %s msg: %s", who, msg));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact != NULL) {
/*
* Make sure the contact is temporary so we could delete it w/o extra traffic
@@ -739,7 +739,7 @@ void CYahooProto::ext_rejected(const char *who, const char *msg)
void CYahooProto::ext_buddy_added(char *myid, char *who, char *group, int status, int auth)
{
- HCONTACT hContact=getbuddyH(who);
+ MCONTACT hContact=getbuddyH(who);
LOG(("[ext_buddy_added] %s authorized you as %s group: %s status: %d auth: %d", who, myid, group, status, auth));
@@ -778,7 +778,7 @@ void CYahooProto::ext_contact_added(const char *myid, const char *who, const cha
{
char nick[128];
BYTE *pCurBlob;
- HCONTACT hContact = NULL;
+ MCONTACT hContact = NULL;
PROTORECVEVENT pre = { 0 };
/* NOTE: Msg is actually in UTF8 unless stated otherwise!! */
@@ -869,7 +869,7 @@ void CYahooProto::ext_typing_notify(const char *me, const char *who, int protoco
{
LOG(("[ext_typing_notify] me: '%s' who: '%s' protocol: %d stat: %d ", me, who, protocol, stat));
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (hContact)
CallService(MS_PROTO_CONTACTISTYPING, (WPARAM)hContact, (LPARAM)stat?10:0);
@@ -904,7 +904,7 @@ void CYahooProto::ext_game_notify(const char *me, const char *who, int stat, con
LOG(("[ext_game_notify] me: %s, who: %s, stat: %d, msg: %s", me, who, stat, msg));
/* FIXME - Not Implemented - this informs you someone else is playing on Yahoo! Games */
/* Also Stubbed in Sample Client */
- HCONTACT hContact = getbuddyH(who);
+ MCONTACT hContact = getbuddyH(who);
if (!hContact)
return;