summaryrefslogtreecommitdiff
path: root/protocols/Omegle/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /protocols/Omegle/src
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Omegle/src')
-rw-r--r--protocols/Omegle/src/chat.cpp4
-rw-r--r--protocols/Omegle/src/messages.cpp2
-rw-r--r--protocols/Omegle/src/proto.cpp4
-rw-r--r--protocols/Omegle/src/proto.h38
-rw-r--r--protocols/Omegle/src/stubs.cpp34
-rw-r--r--protocols/Omegle/src/theme.cpp2
6 files changed, 42 insertions, 42 deletions
diff --git a/protocols/Omegle/src/chat.cpp b/protocols/Omegle/src/chat.cpp
index 31fb4ae58b..1c14409e74 100644
--- a/protocols/Omegle/src/chat.cpp
+++ b/protocols/Omegle/src/chat.cpp
@@ -366,7 +366,7 @@ HANDLE OmegleProto::GetChatHandle()
/*if (facy.chatHandle_ != NULL)
return facy.chatHandle_;
- for (HANDLE hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
+ for (HCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) {
if (db_get_b(hContact, m_szModuleName, "ChatRoom", 0) > 0) {
ptrA id = db_get_sa(hContact, m_szModuleName, "ChatRoomId");
if (id != NULL && !strcmp(id, m_szModuleName))
@@ -377,7 +377,7 @@ HANDLE OmegleProto::GetChatHandle()
return NULL;*/
GC_INFO gci = {0};
- gci.Flags = HCONTACT;
+ gci.Flags = GCF_HCONTACT;
gci.pszModule = m_szModuleName;
gci.pszID = m_tszUserName;
CallService(MS_GC_GETINFO, 0, (LPARAM)&gci);
diff --git a/protocols/Omegle/src/messages.cpp b/protocols/Omegle/src/messages.cpp
index 90049ab2cd..e98fa84271 100644
--- a/protocols/Omegle/src/messages.cpp
+++ b/protocols/Omegle/src/messages.cpp
@@ -79,7 +79,7 @@ void OmegleProto::StopChatWorker(void*p)
StopChat();
}
-int OmegleProto::SendMsg(HANDLE hContact, int flags, const char *msg)
+int OmegleProto::SendMsg(HCONTACT hContact, int flags, const char *msg)
{
// TODO: msg comes as Unicode (retyped wchar_t*), why should we convert it as ANSI to UTF-8? o_O
/* if ( flags & PREF_UNICODE )
diff --git a/protocols/Omegle/src/proto.cpp b/protocols/Omegle/src/proto.cpp
index 245fa749ea..ef213f5066 100644
--- a/protocols/Omegle/src/proto.cpp
+++ b/protocols/Omegle/src/proto.cpp
@@ -82,7 +82,7 @@ OmegleProto::~OmegleProto( )
//////////////////////////////////////////////////////////////////////////////
-DWORD_PTR OmegleProto::GetCaps( int type, HANDLE hContact )
+DWORD_PTR OmegleProto::GetCaps( int type, HCONTACT hContact )
{
switch(type) {
case PFLAGNUM_1:
@@ -210,7 +210,7 @@ int OmegleProto::OnPreShutdown(WPARAM wParam,LPARAM lParam)
int OmegleProto::OnContactDeleted(WPARAM wparam,LPARAM)
{
- //HANDLE hContact = (HANDLE)wparam;
+ //HCONTACT hContact = (HCONTACT)wparam;
OnLeaveChat(NULL, NULL);
return 0;
diff --git a/protocols/Omegle/src/proto.h b/protocols/Omegle/src/proto.h
index dc774a56b3..507faea578 100644
--- a/protocols/Omegle/src/proto.h
+++ b/protocols/Omegle/src/proto.h
@@ -49,18 +49,18 @@ public:
virtual int __cdecl Authorize( HANDLE hDbEvent );
virtual int __cdecl AuthDeny( HANDLE hDbEvent, const PROTOCHAR* szReason );
- virtual int __cdecl AuthRecv( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl AuthRequest( HANDLE hContact, const PROTOCHAR* szMessage );
+ virtual int __cdecl AuthRecv( HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl AuthRequest( HCONTACT hContact, const PROTOCHAR* szMessage );
virtual HANDLE __cdecl ChangeInfo( int iInfoType, void* pInfoData );
- virtual HANDLE __cdecl FileAllow( HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
- virtual int __cdecl FileCancel( HANDLE hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny( HANDLE hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
+ virtual HANDLE __cdecl FileAllow( HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szPath );
+ virtual int __cdecl FileCancel( HCONTACT hContact, HANDLE hTransfer );
+ virtual int __cdecl FileDeny( HCONTACT hContact, HANDLE hTransfer, const PROTOCHAR* szReason );
virtual int __cdecl FileResume( HANDLE hTransfer, int* action, const PROTOCHAR** szFilename );
- virtual DWORD_PTR __cdecl GetCaps( int type, HANDLE hContact = NULL );
- virtual int __cdecl GetInfo( HANDLE hContact, int infoType );
+ virtual DWORD_PTR __cdecl GetCaps( int type, HCONTACT hContact = NULL );
+ virtual int __cdecl GetInfo( HCONTACT hContact, int infoType );
virtual HANDLE __cdecl SearchBasic( const PROTOCHAR* id );
virtual HANDLE __cdecl SearchByEmail( const PROTOCHAR* email );
@@ -68,24 +68,24 @@ public:
virtual HWND __cdecl SearchAdvanced( HWND owner );
virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
- virtual int __cdecl RecvContacts( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvFile( HANDLE hContact, PROTOFILEEVENT* );
- virtual int __cdecl RecvMsg( HANDLE hContact, PROTORECVEVENT* );
- virtual int __cdecl RecvUrl( HANDLE hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvContacts( HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvFile( HCONTACT hContact, PROTOFILEEVENT* );
+ virtual int __cdecl RecvMsg( HCONTACT hContact, PROTORECVEVENT* );
+ virtual int __cdecl RecvUrl( HCONTACT hContact, PROTORECVEVENT* );
- virtual int __cdecl SendContacts( HANDLE hContact, int flags, int nContacts, HANDLE* hContactsList );
- virtual HANDLE __cdecl SendFile( HANDLE hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles );
- virtual int __cdecl SendMsg( HANDLE hContact, int flags, const char* msg );
- virtual int __cdecl SendUrl( HANDLE hContact, int flags, const char* url );
+ virtual int __cdecl SendContacts( HCONTACT hContact, int flags, int nContacts, HCONTACT *hContactsList );
+ virtual HANDLE __cdecl SendFile( HCONTACT hContact, const PROTOCHAR* szDescription, PROTOCHAR** ppszFiles );
+ virtual int __cdecl SendMsg( HCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl SendUrl( HCONTACT hContact, int flags, const char* url );
- virtual int __cdecl SetApparentMode( HANDLE hContact, int mode );
+ virtual int __cdecl SetApparentMode( HCONTACT hContact, int mode );
virtual int __cdecl SetStatus( int iNewStatus );
- virtual HANDLE __cdecl GetAwayMsg( HANDLE hContact );
- virtual int __cdecl RecvAwayMsg( HANDLE hContact, int mode, PROTORECVEVENT* evt );
+ virtual HANDLE __cdecl GetAwayMsg( HCONTACT hContact );
+ virtual int __cdecl RecvAwayMsg( HCONTACT hContact, int mode, PROTORECVEVENT* evt );
virtual int __cdecl SetAwayMsg( int iStatus, const PROTOCHAR* msg );
- virtual int __cdecl UserIsTyping( HANDLE hContact, int type );
+ virtual int __cdecl UserIsTyping( HCONTACT hContact, int type );
virtual int __cdecl OnEvent( PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM lParam );
diff --git a/protocols/Omegle/src/stubs.cpp b/protocols/Omegle/src/stubs.cpp
index 1bad2bfca9..817c2c02a9 100644
--- a/protocols/Omegle/src/stubs.cpp
+++ b/protocols/Omegle/src/stubs.cpp
@@ -42,12 +42,12 @@ int OmegleProto::AuthDeny(HANDLE hDbEvent,const PROTOCHAR *reason)
return 1;
}
-int OmegleProto::AuthRecv(HANDLE hContact,PROTORECVEVENT *)
+int OmegleProto::AuthRecv(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::AuthRequest(HANDLE hContact,const PROTOCHAR *message)
+int OmegleProto::AuthRequest(HCONTACT hContact,const PROTOCHAR *message)
{
return 1;
}
@@ -57,17 +57,17 @@ HANDLE OmegleProto::ChangeInfo(int type,void *info_data)
return NULL;
}
-HANDLE OmegleProto::FileAllow(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *path)
+HANDLE OmegleProto::FileAllow(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *path)
{
return NULL;
}
-int OmegleProto::FileCancel(HANDLE hContact,HANDLE hTransfer)
+int OmegleProto::FileCancel(HCONTACT hContact,HANDLE hTransfer)
{
return 1;
}
-int OmegleProto::FileDeny(HANDLE hContact,HANDLE hTransfer,const PROTOCHAR *reason)
+int OmegleProto::FileDeny(HCONTACT hContact,HANDLE hTransfer,const PROTOCHAR *reason)
{
return 1;
}
@@ -77,7 +77,7 @@ int OmegleProto::FileResume(HANDLE hTransfer,int *action,const PROTOCHAR **filen
return 1;
}
-int OmegleProto::GetInfo( HANDLE hContact, int infoType )
+int OmegleProto::GetInfo( HCONTACT hContact, int infoType )
{
return 1;
}
@@ -107,47 +107,47 @@ HWND OmegleProto::CreateExtendedSearchUI(HWND owner)
return NULL;
}
-int OmegleProto::RecvContacts(HANDLE hContact,PROTORECVEVENT *)
+int OmegleProto::RecvContacts(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::RecvFile(HANDLE hContact,PROTORECVFILET *)
+int OmegleProto::RecvFile(HCONTACT hContact,PROTORECVFILET *)
{
return 1;
}
-int OmegleProto::RecvUrl(HANDLE hContact,PROTORECVEVENT *)
+int OmegleProto::RecvUrl(HCONTACT hContact,PROTORECVEVENT *)
{
return 1;
}
-int OmegleProto::SendContacts(HANDLE hContact,int flags,int nContacts,HANDLE *hContactsList)
+int OmegleProto::SendContacts(HCONTACT hContact,int flags,int nContacts,HCONTACT *hContactsList)
{
return 1;
}
-HANDLE OmegleProto::SendFile(HANDLE hContact,const PROTOCHAR *desc, PROTOCHAR **files)
+HANDLE OmegleProto::SendFile(HCONTACT hContact,const PROTOCHAR *desc, PROTOCHAR **files)
{
return NULL;
}
-int OmegleProto::SendUrl(HANDLE hContact,int flags,const char *url)
+int OmegleProto::SendUrl(HCONTACT hContact,int flags,const char *url)
{
return 1;
}
-int OmegleProto::SetApparentMode(HANDLE hContact,int mode)
+int OmegleProto::SetApparentMode(HCONTACT hContact,int mode)
{
return 1;
}
-int OmegleProto::RecvAwayMsg(HANDLE hContact,int mode,PROTORECVEVENT *evt)
+int OmegleProto::RecvAwayMsg(HCONTACT hContact,int mode,PROTORECVEVENT *evt)
{
return 1;
}
-int OmegleProto::UserIsTyping(HANDLE hContact, int type)
+int OmegleProto::UserIsTyping(HCONTACT hContact, int type)
{
return 1;
}
@@ -157,12 +157,12 @@ int OmegleProto::SetAwayMsg(int iStatus, const PROTOCHAR* msg)
return 1;
}
-HANDLE OmegleProto::GetAwayMsg( HANDLE hContact )
+HANDLE OmegleProto::GetAwayMsg( HCONTACT hContact )
{
return NULL;
}
-int OmegleProto::RecvMsg(HANDLE hContact, PROTORECVEVENT *pre)
+int OmegleProto::RecvMsg(HCONTACT hContact, PROTORECVEVENT *pre)
{
return 1;
}
diff --git a/protocols/Omegle/src/theme.cpp b/protocols/Omegle/src/theme.cpp
index 786e2c2340..78e1f9d135 100644
--- a/protocols/Omegle/src/theme.cpp
+++ b/protocols/Omegle/src/theme.cpp
@@ -47,7 +47,7 @@ HANDLE GetIconHandle(const char* name)
}
// Helper functions
-static OmegleProto * GetInstanceByHContact(HANDLE hContact)
+static OmegleProto * GetInstanceByHContact(HCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if (!proto)