summaryrefslogtreecommitdiff
path: root/protocols/Gadu-Gadu/src/gg_proto.h
diff options
context:
space:
mode:
authorGoraf <22941576+Goraf@users.noreply.github.com>2018-01-08 22:48:19 +0100
committerGoraf <22941576+Goraf@users.noreply.github.com>2018-01-19 01:39:33 +0100
commitdb084380729ecb18021aa0a5b3074c1faffb18c1 (patch)
tree91c49c311598f0abc294f4dfb8c7ea625f2085d6 /protocols/Gadu-Gadu/src/gg_proto.h
parent44a8248b1b19375130144a783d1758e1f83d3c88 (diff)
Gadu-Gadu: code cleaning
Diffstat (limited to 'protocols/Gadu-Gadu/src/gg_proto.h')
-rw-r--r--protocols/Gadu-Gadu/src/gg_proto.h59
1 files changed, 31 insertions, 28 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h
index 7c5b08cfde..fc6c5de185 100644
--- a/protocols/Gadu-Gadu/src/gg_proto.h
+++ b/protocols/Gadu-Gadu/src/gg_proto.h
@@ -24,41 +24,41 @@
struct GGPROTO : public PROTO<GGPROTO>
{
- GGPROTO( const char*, const wchar_t* );
- ~GGPROTO();
+ GGPROTO(const char*, const wchar_t*);
+ ~GGPROTO();
//====================================================================================
// PROTO_INTERFACE
//====================================================================================
- virtual MCONTACT __cdecl AddToList( int flags, PROTOSEARCHRESULT* psr );
-
- virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath );
- virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer );
- virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason );
+ virtual MCONTACT __cdecl AddToList(int flags, PROTOSEARCHRESULT* psr);
- virtual DWORD_PTR __cdecl GetCaps( int type, MCONTACT hContact = NULL );
- virtual int __cdecl GetInfo(MCONTACT hContact, int infoType );
+ virtual HANDLE __cdecl FileAllow(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szPath);
+ virtual int __cdecl FileCancel(MCONTACT hContact, HANDLE hTransfer);
+ virtual int __cdecl FileDeny(MCONTACT hContact, HANDLE hTransfer, const wchar_t* szReason);
- virtual HANDLE __cdecl SearchBasic( const wchar_t* id );
- virtual HANDLE __cdecl SearchByName( const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName );
- virtual HWND __cdecl SearchAdvanced( HWND owner );
- virtual HWND __cdecl CreateExtendedSearchUI( HWND owner );
+ virtual DWORD_PTR __cdecl GetCaps(int type, MCONTACT hContact = NULL);
+ virtual int __cdecl GetInfo(MCONTACT hContact, int infoType);
- virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET* );
+ virtual HANDLE __cdecl SearchBasic(const wchar_t* id);
+ virtual HANDLE __cdecl SearchByName(const wchar_t* nick, const wchar_t* firstName, const wchar_t* lastName);
+ virtual HWND __cdecl SearchAdvanced(HWND owner);
+ virtual HWND __cdecl CreateExtendedSearchUI(HWND owner);
- virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles );
- virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg );
+ virtual int __cdecl RecvFile(MCONTACT hContact, PROTORECVFILET*);
- virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode );
- virtual int __cdecl SetStatus( int iNewStatus );
+ virtual HANDLE __cdecl SendFile(MCONTACT hContact, const wchar_t* szDescription, wchar_t** ppszFiles);
+ virtual int __cdecl SendMsg(MCONTACT hContact, int flags, const char* msg);
- virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact );
- virtual int __cdecl SetAwayMsg( int m_iStatus, const wchar_t* msg );
+ virtual int __cdecl SetApparentMode(MCONTACT hContact, int mode);
+ virtual int __cdecl SetStatus(int iNewStatus);
- virtual int __cdecl UserIsTyping(MCONTACT hContact, int type );
+ virtual HANDLE __cdecl GetAwayMsg(MCONTACT hContact);
+ virtual int __cdecl SetAwayMsg(int m_iStatus, const wchar_t* msg);
- virtual int __cdecl OnEvent( PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam );
+ virtual int __cdecl UserIsTyping(MCONTACT hContact, int type);
+
+ virtual int __cdecl OnEvent(PROTOEVENTTYPE eventType, WPARAM wParam, LPARAM lParam);
//////////////////////////////////////////////////////////////////////////////////////
// Services
@@ -242,7 +242,7 @@ struct GGPROTO : public PROTO<GGPROTO>
wchar_t *invisible;
wchar_t *offline;
} modemsg;
-
+
HGENMENU hMainMenu[7];
HGENMENU hBlockMenuItem, hImageMenuItem, hInstanceMenuItem;
HANDLE hPrebuildMenuHook;
@@ -270,14 +270,15 @@ inline void GGPROTO::gg_EnterCriticalSection(CRITICAL_SECTION* mutex, char*, int
#ifdef DEBUGMODE
int logAfter = 0;
extendedLogging = 1;
- if(logging == 1 && mutex->LockCount != -1) {
+ if (logging == 1 && mutex->LockCount != -1) {
logAfter = 1;
debugLogA("%s(): %i before EnterCriticalSection %s LockCount=%ld RecursionCount=%ld OwningThread=%ld", callingFunction, sectionNumber, mutexName, mutex->LockCount, mutex->RecursionCount, mutex->OwningThread);
}
#endif
EnterCriticalSection(mutex);
#ifdef DEBUGMODE
- if(logging == 1 && logAfter == 1) debugLogA("%s(): %i after EnterCriticalSection %s LockCount=%ld RecursionCount=%ld OwningThread=%ld", callingFunction, sectionNumber, mutexName, mutex->LockCount, mutex->RecursionCount, mutex->OwningThread);
+ if (logging == 1 && logAfter == 1)
+ debugLogA("%s(): %i after EnterCriticalSection %s LockCount=%ld RecursionCount=%ld OwningThread=%ld", callingFunction, sectionNumber, mutexName, mutex->LockCount, mutex->RecursionCount, mutex->OwningThread);
extendedLogging = 0;
#endif
@@ -290,19 +291,21 @@ inline void GGPROTO::gg_LeaveCriticalSection(CRITICAL_SECTION* mutex, char *, in
#endif
{
#ifdef DEBUGMODE
- if(logging == 1 && extendedLogging == 1) debugLogA("%s(): %i.%i LeaveCriticalSection %s", callingFunction, sectionNumber, returnNumber, mutexName);
+ if (logging == 1 && extendedLogging == 1)
+ debugLogA("%s(): %i.%i LeaveCriticalSection %s", callingFunction, sectionNumber, returnNumber, mutexName);
#endif
LeaveCriticalSection(mutex);
}
#ifdef DEBUGMODE
-inline void GGPROTO::gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging){
+inline void GGPROTO::gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging) {
#else
inline void GGPROTO::gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int, int) {
#endif
SleepEx(miliseconds, alterable);
#ifdef DEBUGMODE
- if(logging == 1 && extendedLogging == 1) debugLogA("%s(): %i after SleepEx(%ld,%u)", callingFunction, sleepNumber, miliseconds, alterable);
+ if (logging == 1 && extendedLogging == 1)
+ debugLogA("%s(): %i after SleepEx(%ld,%u)", callingFunction, sleepNumber, miliseconds, alterable);
#endif
}