summaryrefslogtreecommitdiff
path: root/protocols/Twitter
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/Twitter
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/Twitter')
-rw-r--r--protocols/Twitter/src/chat.cpp4
-rw-r--r--protocols/Twitter/src/connection.cpp18
-rw-r--r--protocols/Twitter/src/contacts.cpp36
-rw-r--r--protocols/Twitter/src/proto.cpp20
-rw-r--r--protocols/Twitter/src/proto.h52
-rw-r--r--protocols/Twitter/src/stubs.cpp30
-rw-r--r--protocols/Twitter/src/theme.cpp6
-rw-r--r--protocols/Twitter/src/ui.cpp2
8 files changed, 84 insertions, 84 deletions
diff --git a/protocols/Twitter/src/chat.cpp b/protocols/Twitter/src/chat.cpp
index df581c8586..d08e1c81e7 100644
--- a/protocols/Twitter/src/chat.cpp
+++ b/protocols/Twitter/src/chat.cpp
@@ -39,7 +39,7 @@ void TwitterProto::UpdateChat(const twitter_user &update)
gce.time = static_cast<DWORD>(update.status.time);
DBVARIANT nick;
- HCONTACT hContact = UsernameToHContact(update.username.c_str());
+ MCONTACT hContact = UsernameToHContact(update.username.c_str());
if(hContact && !db_get_s(hContact,"CList","MyHandle",&nick))
{
gce.ptszNick = mir_a2t(nick.pszVal);
@@ -163,7 +163,7 @@ void TwitterProto::SetChatStatus(int status)
if(status == ID_STATUS_ONLINE)
{
// Add all friends to contact list
- 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)) {
if( isChatRoom(hContact))
continue;
diff --git a/protocols/Twitter/src/connection.cpp b/protocols/Twitter/src/connection.cpp
index bb332624e4..e13ee2a66b 100644
--- a/protocols/Twitter/src/connection.cpp
+++ b/protocols/Twitter/src/connection.cpp
@@ -25,7 +25,7 @@ void CALLBACK TwitterProto::APC_callback(ULONG_PTR p)
}
template<typename T>
-inline static T db_pod_get(HCONTACT hContact,const char *module,const char *setting,T errorValue)
+inline static T db_pod_get(MCONTACT hContact,const char *module,const char *setting,T errorValue)
{
DBVARIANT dbv;
if(db_get(hContact, module, setting, &dbv))
@@ -41,7 +41,7 @@ inline static T db_pod_get(HCONTACT hContact,const char *module,const char *sett
}
template<typename T>
-inline static INT_PTR db_pod_set(HCONTACT hContact,const char *module,const char *setting,T val)
+inline static INT_PTR db_pod_set(MCONTACT hContact,const char *module,const char *setting,T val)
{
return db_set_blob(hContact, module, setting, &val, sizeof(T));
}
@@ -401,8 +401,8 @@ void TwitterProto::MessageLoop(void*)
struct update_avatar
{
- update_avatar(HCONTACT hContact,const std::string &url) : hContact(hContact),url(url) {}
- HCONTACT hContact;
+ update_avatar(MCONTACT hContact,const std::string &url) : hContact(hContact),url(url) {}
+ MCONTACT hContact;
std::string url;
};
@@ -454,7 +454,7 @@ void TwitterProto::UpdateAvatarWorker(void *p)
debugLogA( _T("***** Done avatar: %s"),data->url.c_str());
}
-void TwitterProto::UpdateAvatar(HCONTACT hContact,const std::string &url,bool force)
+void TwitterProto::UpdateAvatar(MCONTACT hContact,const std::string &url,bool force)
{
DBVARIANT dbv = {0};
@@ -493,7 +493,7 @@ void TwitterProto::UpdateFriends()
if(i->username == twit_.get_username())
continue;
- HCONTACT hContact = AddToClientList(i->username.c_str(),i->status.text.c_str());
+ MCONTACT hContact = AddToClientList(i->username.c_str(),i->status.text.c_str());
UpdateAvatar(hContact,i->profile_image_url);
}
disconnectionCount = 0;
@@ -516,7 +516,7 @@ void TwitterProto::UpdateFriends()
}
-void TwitterProto::ShowContactPopup(HCONTACT hContact,const std::string &text)
+void TwitterProto::ShowContactPopup(MCONTACT hContact,const std::string &text)
{
if(!ServiceExists(MS_POPUP_ADDPOPUPT) || db_get_b(0,m_szModuleName,TWITTER_KEY_POPUP_SHOW,0) == 0)
{
@@ -565,7 +565,7 @@ void TwitterProto::UpdateStatuses(bool pre_read, bool popups, bool tweetToMsg)
if(i->username == twit_.get_username())
continue;
- HCONTACT hContact = AddToClientList(i->username.c_str(),"");
+ MCONTACT hContact = AddToClientList(i->username.c_str(),"");
UpdateAvatar(hContact,i->profile_image_url); // as UpdateFriends() doesn't work at the moment, i'm going to update the avatars here
// i think we maybe should just do that DBEF_READ line instead of stopping ALL this code. have to test.
@@ -620,7 +620,7 @@ void TwitterProto::UpdateMessages(bool pre_read)
for(twitter::status_list::reverse_iterator i=messages.rbegin(); i!=messages.rend(); ++i)
{
- HCONTACT hContact = AddToClientList(i->username.c_str(),"");
+ MCONTACT hContact = AddToClientList(i->username.c_str(),"");
PROTORECVEVENT recv = { 0 };
recv.flags = PREF_UTF;
diff --git a/protocols/Twitter/src/contacts.cpp b/protocols/Twitter/src/contacts.cpp
index 3cb24db577..c78c28f914 100644
--- a/protocols/Twitter/src/contacts.cpp
+++ b/protocols/Twitter/src/contacts.cpp
@@ -32,7 +32,7 @@ void TwitterProto::AddToListWorker(void *p)
twitter_user user = twit_.add_friend(name);
s.Unlock();
- HCONTACT hContact = UsernameToHContact(name);
+ MCONTACT hContact = UsernameToHContact(name);
UpdateAvatar(hContact,user.profile_image_url);
}
catch(const std::exception &e)
@@ -43,7 +43,7 @@ void TwitterProto::AddToListWorker(void *p)
mir_free(name);
}
-HCONTACT TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
+MCONTACT TwitterProto::AddToList(int flags,PROTOSEARCHRESULT *result)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -60,7 +60,7 @@ void TwitterProto::UpdateInfoWorker(void *hContact)
std::string username;
DBVARIANT dbv;
- if (!db_get_s((HCONTACT)hContact, m_szModuleName, TWITTER_KEY_UN, &dbv))
+ if (!db_get_s((MCONTACT)hContact, m_szModuleName, TWITTER_KEY_UN, &dbv))
{
username = dbv.pszVal;
db_free(&dbv);
@@ -73,11 +73,11 @@ void TwitterProto::UpdateInfoWorker(void *hContact)
twit_.get_info(username,&user);
}
- UpdateAvatar((HCONTACT)hContact, user.profile_image_url, true);
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, 0, 0);
+ UpdateAvatar((MCONTACT)hContact, user.profile_image_url, true);
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_GETINFO, ACKRESULT_SUCCESS, 0, 0);
}
-int TwitterProto::GetInfo(HCONTACT hContact,int info_type)
+int TwitterProto::GetInfo(MCONTACT hContact,int info_type)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 1;
@@ -170,14 +170,14 @@ void TwitterProto::GetAwayMsgWorker(void *hContact)
return;
DBVARIANT dbv;
- if (!db_get_ts((HCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
- ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
+ if (!db_get_ts((MCONTACT)hContact, "CList", "StatusMsg", &dbv)) {
+ ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_SUCCESS, (HANDLE)1, (LPARAM)dbv.ptszVal);
db_free(&dbv);
}
- else ProtoBroadcastAck((HCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
+ else ProtoBroadcastAck((MCONTACT)hContact, ACKTYPE_AWAYMSG, ACKRESULT_FAILED, (HANDLE)1, 0);
}
-HANDLE TwitterProto::GetAwayMsg(HCONTACT hContact)
+HANDLE TwitterProto::GetAwayMsg(MCONTACT hContact)
{
ForkThread(&TwitterProto::GetAwayMsgWorker, (void*)hContact);
return (HANDLE)1;
@@ -188,7 +188,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
- const HCONTACT hContact = (HCONTACT)wParam;
+ const MCONTACT hContact = (MCONTACT)wParam;
if(!IsMyContact(hContact))
return 0;
@@ -208,7 +208,7 @@ int TwitterProto::OnContactDeleted(WPARAM wParam,LPARAM lParam)
// *************************
-bool TwitterProto::IsMyContact(HCONTACT hContact,bool include_chat)
+bool TwitterProto::IsMyContact(MCONTACT hContact,bool include_chat)
{
char *proto = GetContactProto(hContact);
if(proto && strcmp(m_szModuleName,proto) == 0) {
@@ -219,9 +219,9 @@ bool TwitterProto::IsMyContact(HCONTACT hContact,bool include_chat)
else return false;
}
-HCONTACT TwitterProto::UsernameToHContact(const char *name)
+MCONTACT TwitterProto::UsernameToHContact(const char *name)
{
- 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))
{
if( db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
continue;
@@ -242,10 +242,10 @@ HCONTACT TwitterProto::UsernameToHContact(const char *name)
return 0;
}
-HCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
+MCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
{
// First, check if this contact exists
- HCONTACT hContact = UsernameToHContact(name);
+ MCONTACT hContact = UsernameToHContact(name);
if(hContact)
return hContact;
@@ -253,7 +253,7 @@ HCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
AddChatContact(name);
// If not, make a new contact!
- hContact = (HCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
if(hContact)
{
if(CallService(MS_PROTO_ADDTOCONTACT,(WPARAM)hContact,(LPARAM)m_szModuleName) == 0)
@@ -282,7 +282,7 @@ HCONTACT TwitterProto::AddToClientList(const char *name, const char *status)
void TwitterProto::SetAllContactStatuses(int status)
{
- 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))
if( !db_get_b(hContact, m_szModuleName, "ChatRoom", 0))
db_set_w(hContact,m_szModuleName,"Status",status);
diff --git a/protocols/Twitter/src/proto.cpp b/protocols/Twitter/src/proto.cpp
index 6ec565871f..e9ee5618c9 100644
--- a/protocols/Twitter/src/proto.cpp
+++ b/protocols/Twitter/src/proto.cpp
@@ -88,7 +88,7 @@ TwitterProto::~TwitterProto()
// *************************
-DWORD_PTR TwitterProto::GetCaps(int type, HCONTACT)
+DWORD_PTR TwitterProto::GetCaps(int type, MCONTACT)
{
switch(type)
{
@@ -113,7 +113,7 @@ DWORD_PTR TwitterProto::GetCaps(int type, HCONTACT)
// *************************
-int TwitterProto::RecvMsg(HCONTACT hContact,PROTORECVEVENT *pre)
+int TwitterProto::RecvMsg(MCONTACT hContact,PROTORECVEVENT *pre)
{
Proto_RecvMessage(hContact, pre);
return 0;
@@ -123,11 +123,11 @@ int TwitterProto::RecvMsg(HCONTACT hContact,PROTORECVEVENT *pre)
struct send_direct
{
- __inline send_direct(HCONTACT _hContact, const std::string &_msg, int _msgid) :
+ __inline send_direct(MCONTACT _hContact, const std::string &_msg, int _msgid) :
hContact(_hContact), msg(_msg), msgid(_msgid)
{}
- HCONTACT hContact;
+ MCONTACT hContact;
std::string msg;
int msgid;
};
@@ -151,7 +151,7 @@ void TwitterProto::SendSuccess(void *p)
delete data;
}
-int TwitterProto::SendMsg(HCONTACT hContact,int flags,const char *msg)
+int TwitterProto::SendMsg(MCONTACT hContact,int flags,const char *msg)
{
if(m_iStatus != ID_STATUS_ONLINE)
return 0;
@@ -246,7 +246,7 @@ INT_PTR TwitterProto::GetStatus(WPARAM,LPARAM)
INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
{
// TODO: support replying to tweets instead of just users
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
HWND hDlg = CreateDialogParam(g_hInstance,MAKEINTRESOURCE(IDD_TWEET),0,tweet_proc,reinterpret_cast<LPARAM>(this));
@@ -264,7 +264,7 @@ INT_PTR TwitterProto::ReplyToTweet(WPARAM wParam,LPARAM)
INT_PTR TwitterProto::VisitHomepage(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
DBVARIANT dbv;
// TODO: remove this
@@ -398,7 +398,7 @@ int TwitterProto::OnPreShutdown(WPARAM,LPARAM)
int TwitterProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM)
{
- HCONTACT hContact = (HCONTACT)wParam;
+ MCONTACT hContact = (MCONTACT)wParam;
if(IsMyContact(hContact))
ShowContactMenus(true);
@@ -495,8 +495,8 @@ void TwitterProto::UpdateSettings()
if(in_chat_)
OnLeaveChat(0,0);
- for(HCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
- HCONTACT hNext = db_find_next(hContact, m_szModuleName);
+ for(MCONTACT hContact = db_find_first(m_szModuleName); hContact; ) {
+ MCONTACT hNext = db_find_next(hContact, m_szModuleName);
if(isChatRoom(hContact))
CallService(MS_DB_CONTACT_DELETE, WPARAM(hContact), 0);
hContact = hNext;
diff --git a/protocols/Twitter/src/proto.h b/protocols/Twitter/src/proto.h
index 68a7cb3b27..7ad5188626 100644
--- a/protocols/Twitter/src/proto.h
+++ b/protocols/Twitter/src/proto.h
@@ -36,23 +36,23 @@ public:
//PROTO_INTERFACE
- virtual HCONTACT __cdecl AddToList(int,PROTOSEARCHRESULT *);
- virtual HCONTACT __cdecl AddToListByEvent(int,int,HANDLE);
+ virtual MCONTACT __cdecl AddToList(int,PROTOSEARCHRESULT *);
+ virtual MCONTACT __cdecl AddToListByEvent(int,int,HANDLE);
virtual int __cdecl Authorize(HANDLE);
virtual int __cdecl AuthDeny(HANDLE,const TCHAR *);
- virtual int __cdecl AuthRecv(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl AuthRequest(HCONTACT, const TCHAR *);
+ virtual int __cdecl AuthRecv(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl AuthRequest(MCONTACT, const TCHAR *);
virtual HANDLE __cdecl ChangeInfo(int,void *);
- virtual HANDLE __cdecl FileAllow(HCONTACT, HANDLE, const TCHAR *);
- virtual int __cdecl FileCancel(HCONTACT, HANDLE);
- virtual int __cdecl FileDeny(HCONTACT, HANDLE, const TCHAR *);
+ virtual HANDLE __cdecl FileAllow(MCONTACT, HANDLE, const TCHAR *);
+ virtual int __cdecl FileCancel(MCONTACT, HANDLE);
+ virtual int __cdecl FileDeny(MCONTACT, HANDLE, const TCHAR *);
virtual int __cdecl FileResume(HANDLE, int *, const TCHAR **);
- virtual DWORD_PTR __cdecl GetCaps(int, HCONTACT = 0);
- virtual int __cdecl GetInfo(HCONTACT, int);
+ virtual DWORD_PTR __cdecl GetCaps(int, MCONTACT = 0);
+ virtual int __cdecl GetInfo(MCONTACT, int);
virtual HANDLE __cdecl SearchBasic(const TCHAR *);
virtual HANDLE __cdecl SearchByEmail(const TCHAR *);
@@ -60,24 +60,24 @@ public:
virtual HWND __cdecl SearchAdvanced(HWND);
virtual HWND __cdecl CreateExtendedSearchUI(HWND);
- virtual int __cdecl RecvContacts(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl RecvFile(HCONTACT, PROTORECVFILET *);
- virtual int __cdecl RecvMsg(HCONTACT, PROTORECVEVENT *);
- virtual int __cdecl RecvUrl(HCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvContacts(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvFile(MCONTACT, PROTORECVFILET *);
+ virtual int __cdecl RecvMsg(MCONTACT, PROTORECVEVENT *);
+ virtual int __cdecl RecvUrl(MCONTACT, PROTORECVEVENT *);
- virtual int __cdecl SendContacts(HCONTACT, int, int, HCONTACT*);
- virtual HANDLE __cdecl SendFile(HCONTACT, const TCHAR *, TCHAR **);
- virtual int __cdecl SendMsg(HCONTACT, int, const char *);
- virtual int __cdecl SendUrl(HCONTACT, int, const char *);
+ virtual int __cdecl SendContacts(MCONTACT, int, int, MCONTACT*);
+ virtual HANDLE __cdecl SendFile(MCONTACT, const TCHAR *, TCHAR **);
+ virtual int __cdecl SendMsg(MCONTACT, int, const char *);
+ virtual int __cdecl SendUrl(MCONTACT, int, const char *);
- virtual int __cdecl SetApparentMode(HCONTACT, int);
+ virtual int __cdecl SetApparentMode(MCONTACT, int);
virtual int __cdecl SetStatus(int);
- virtual HANDLE __cdecl GetAwayMsg(HCONTACT);
- virtual int __cdecl RecvAwayMsg(HCONTACT, int, PROTORECVEVENT *);
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT);
+ virtual int __cdecl RecvAwayMsg(MCONTACT, int, PROTORECVEVENT *);
virtual int __cdecl SetAwayMsg(int,const TCHAR *);
- virtual int __cdecl UserIsTyping(HCONTACT, int);
+ virtual int __cdecl UserIsTyping(MCONTACT, int);
virtual int __cdecl OnEvent(PROTOEVENTTYPE,WPARAM,LPARAM);
@@ -123,16 +123,16 @@ private:
void UpdateStatuses(bool pre_read,bool popups, bool tweetToMsg);
void UpdateMessages(bool pre_read);
void UpdateFriends();
- void UpdateAvatar(HCONTACT, const std::string &, bool force = false);
+ void UpdateAvatar(MCONTACT, const std::string &, bool force = false);
int ShowPinDialog();
void ShowPopup(const wchar_t *, int Error = 0);
void ShowPopup(const char *, int Error = 0);
- void ShowContactPopup(HCONTACT, const std::string &);
+ void ShowContactPopup(MCONTACT, const std::string &);
- bool IsMyContact(HCONTACT, bool include_chat = false);
- HCONTACT UsernameToHContact(const char *);
- HCONTACT AddToClientList(const char *, const char *);
+ bool IsMyContact(MCONTACT, bool include_chat = false);
+ MCONTACT UsernameToHContact(const char *);
+ MCONTACT AddToClientList(const char *, const char *);
void SetAllContactStatuses(int);
void debugLogA(TCHAR *fmt,...);
diff --git a/protocols/Twitter/src/stubs.cpp b/protocols/Twitter/src/stubs.cpp
index 9b8fc7deea..a959f6d487 100644
--- a/protocols/Twitter/src/stubs.cpp
+++ b/protocols/Twitter/src/stubs.cpp
@@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "proto.h"
-HCONTACT TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
+MCONTACT TwitterProto::AddToListByEvent(int flags,int iContact,HANDLE hDbEvent)
{
return NULL;
}
@@ -32,12 +32,12 @@ int TwitterProto::AuthDeny(HANDLE hDbEvent,const TCHAR *reason)
return 1;
}
-int TwitterProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::AuthRecv(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::AuthRequest(HCONTACT hContact,const TCHAR *message)
+int TwitterProto::AuthRequest(MCONTACT hContact,const TCHAR *message)
{
return 1;
}
@@ -48,17 +48,17 @@ HANDLE TwitterProto::ChangeInfo(int type,void *info_data)
return NULL;
}
-HANDLE TwitterProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const TCHAR *path)
+HANDLE TwitterProto::FileAllow(MCONTACT hContact,HANDLE hTransfer,const TCHAR *path)
{
return NULL;
}
-int TwitterProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
+int TwitterProto::FileCancel(MCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int TwitterProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const TCHAR *reason)
+int TwitterProto::FileDeny(MCONTACT hContact,HANDLE hTransfer,const TCHAR *reason)
{
return 1;
}
@@ -83,42 +83,42 @@ HWND TwitterProto::CreateExtendedSearchUI(HWND owner)
return NULL;
}
-int TwitterProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::RecvContacts(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
+int TwitterProto::RecvFile(MCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int TwitterProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
+int TwitterProto::RecvUrl(MCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int TwitterProto::SendContacts(HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList)
+int TwitterProto::SendContacts(MCONTACT hContact, int flags, int nContacts, MCONTACT *hContactsList)
{
return 1;
}
-HANDLE TwitterProto::SendFile(HCONTACT hContact,const TCHAR *desc, TCHAR **files)
+HANDLE TwitterProto::SendFile(MCONTACT hContact,const TCHAR *desc, TCHAR **files)
{
return NULL;
}
-int TwitterProto::SendUrl(HCONTACT hContact,int flags,const char *url)
+int TwitterProto::SendUrl(MCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int TwitterProto::SetApparentMode(HCONTACT hContact,int mode)
+int TwitterProto::SetApparentMode(MCONTACT hContact,int mode)
{
return 1;
}
-int TwitterProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
+int TwitterProto::RecvAwayMsg(MCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
@@ -128,7 +128,7 @@ int TwitterProto::SetAwayMsg(int status,const TCHAR *msg)
return 1;
}
-int TwitterProto::UserIsTyping(HCONTACT hContact,int type)
+int TwitterProto::UserIsTyping(MCONTACT hContact,int type)
{
return 1;
} \ No newline at end of file
diff --git a/protocols/Twitter/src/theme.cpp b/protocols/Twitter/src/theme.cpp
index 81891adc44..7b0a6a6eac 100644
--- a/protocols/Twitter/src/theme.cpp
+++ b/protocols/Twitter/src/theme.cpp
@@ -52,7 +52,7 @@ static HGENMENU g_hMenuItems[2];
static HANDLE g_hMenuEvts[3];
// Helper functions
-static TwitterProto * GetInstanceByHContact(HCONTACT hContact)
+static TwitterProto * GetInstanceByHContact(MCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if(!proto)
@@ -68,7 +68,7 @@ static TwitterProto * GetInstanceByHContact(HCONTACT hContact)
template<INT_PTR (__cdecl TwitterProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- TwitterProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ TwitterProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
@@ -76,7 +76,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
ShowContactMenus(false);
- TwitterProto *proto = GetInstanceByHContact(HCONTACT(wParam));
+ TwitterProto *proto = GetInstanceByHContact(MCONTACT(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
diff --git a/protocols/Twitter/src/ui.cpp b/protocols/Twitter/src/ui.cpp
index 91c5f96ec5..9d8dfdd924 100644
--- a/protocols/Twitter/src/ui.cpp
+++ b/protocols/Twitter/src/ui.cpp
@@ -385,7 +385,7 @@ namespace popup_options
POPUPDATAT popup = {};
// Pick a random contact
- HCONTACT hContact = 0;
+ MCONTACT hContact = 0;
int n_contacts = (int)CallService(MS_DB_CONTACT_GETCOUNT,0,0);
if(n_contacts != 0)