diff options
author | Szymon Tokarz <wsx22@o2.pl> | 2012-12-05 01:10:24 +0000 |
---|---|---|
committer | Szymon Tokarz <wsx22@o2.pl> | 2012-12-05 01:10:24 +0000 |
commit | e5602ebb20922f0ba0c9ef8fc9da03e712ddd67a (patch) | |
tree | 4e6c8e5170b275e5e91853b69228a19c7177544b /protocols/Gadu-Gadu/src/gg_proto.h | |
parent | 565aef440e39cf0ee2f25f689934478c979875a5 (diff) |
Gadu-Gadu protocol: account avatar work
- fixes with groupchats support
- fixed import/export contact list to text file
- Nick, MyHandle, ChatRoomID stored in db as unicode
(1st step to implement unicode support in GG protocol)
git-svn-id: http://svn.miranda-ng.org/main/trunk@2646 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Gadu-Gadu/src/gg_proto.h')
-rw-r--r-- | protocols/Gadu-Gadu/src/gg_proto.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index e1be4c2cff..10ca4efafa 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -111,6 +111,9 @@ struct GGPROTO : public PROTO_INTERFACE, public MZeroedObject HANDLE forkthreadex(GGThreadFunc pFunc, void *param, UINT *threadId);
void threadwait(GGTHREAD *thread);
+#ifdef DEBUGMODE
+ volatile int extendedLogging;
+#endif
void gg_EnterCriticalSection(CRITICAL_SECTION* mutex, char* callingFunction, int sectionNumber, char* mutexName, int logging);
void gg_LeaveCriticalSection(CRITICAL_SECTION* mutex, char* callingFunction, int sectionNumber, int returnNumber, char* mutexName, int logging);
void gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging);
@@ -217,9 +220,9 @@ struct GGPROTO : public PROTO_INTERFACE, public MZeroedObject int gc_init();
void gc_menus_init(HGENMENU hRoot);
int gc_destroy();
- char * gc_getchat(uin_t sender, uin_t *recipients, int recipients_count);
- GGGC *gc_lookup(char *id);
- int gc_changenick(HANDLE hContact, char *pszNick);
+ TCHAR * gc_getchat(uin_t sender, uin_t *recipients, int recipients_count);
+ GGGC *gc_lookup(TCHAR *id);
+ int gc_changenick(HANDLE hContact, TCHAR *ptszNick);
#define UIN2ID(uin,id) _itoa(uin,id,10)
int __cdecl gc_event(WPARAM wParam, LPARAM lParam);
@@ -301,6 +304,7 @@ inline void GGPROTO::gg_EnterCriticalSection(CRITICAL_SECTION* mutex, char* call {
#ifdef DEBUGMODE
int logAfter = 0;
+ extendedLogging = 1;
if(logging == 1 && mutex->LockCount != -1) {
logAfter = 1;
netlog("%s(): %i before EnterCriticalSection %s LockCount=%ld RecursionCount=%ld OwningThread=%ld", callingFunction, sectionNumber, mutexName, mutex->LockCount, mutex->RecursionCount, mutex->OwningThread);
@@ -309,13 +313,15 @@ inline void GGPROTO::gg_EnterCriticalSection(CRITICAL_SECTION* mutex, char* call EnterCriticalSection(mutex);
#ifdef DEBUGMODE
if(logging == 1 && logAfter == 1) netlog("%s(): %i after EnterCriticalSection %s LockCount=%ld RecursionCount=%ld OwningThread=%ld", callingFunction, sectionNumber, mutexName, mutex->LockCount, mutex->RecursionCount, mutex->OwningThread);
+ extendedLogging = 0;
#endif
+
}
inline void GGPROTO::gg_LeaveCriticalSection(CRITICAL_SECTION* mutex, char* callingFunction, int sectionNumber, int returnNumber, char* mutexName, int logging) /*0-never, 1-debug, 2-all*/
{
#ifdef DEBUGMODE
- if(logging == 1) netlog("%s(): %i.%i LeaveCriticalSection %s", callingFunction, sectionNumber, returnNumber, mutexName);
+ if(logging == 1 && extendedLogging == 1) netlog("%s(): %i.%i LeaveCriticalSection %s", callingFunction, sectionNumber, returnNumber, mutexName);
#endif
LeaveCriticalSection(mutex);
}
@@ -323,7 +329,7 @@ inline void GGPROTO::gg_LeaveCriticalSection(CRITICAL_SECTION* mutex, char* call inline void GGPROTO::gg_sleep(DWORD miliseconds, BOOL alterable, char* callingFunction, int sleepNumber, int logging){
SleepEx(miliseconds, alterable);
#ifdef DEBUGMODE
- if(logging == 1) netlog("%s(): %i after SleepEx(%ld,%u)", callingFunction, sleepNumber, miliseconds, alterable);
+ if(logging == 1 && extendedLogging == 1) netlog("%s(): %i after SleepEx(%ld,%u)", callingFunction, sleepNumber, miliseconds, alterable);
#endif
}
|