diff options
author | George Hazan <george.hazan@gmail.com> | 2012-11-15 21:18:48 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-11-15 21:18:48 +0000 |
commit | 7ebaebba8520e457bf374ca245f52332fbb008be (patch) | |
tree | 55cf960e4981d9413befb1bf275a3fd067bf2534 /protocols/JabberG/src/jabber_message_manager.h | |
parent | 8353de363fc22940685b334cbb38c0378e9c1b71 (diff) |
bye-bye old coding style in Jabber
git-svn-id: http://svn.miranda-ng.org/main/trunk@2322 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_message_manager.h')
-rw-r--r-- | protocols/JabberG/src/jabber_message_manager.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/protocols/JabberG/src/jabber_message_manager.h b/protocols/JabberG/src/jabber_message_manager.h index dd52b50683..f45a3227b3 100644 --- a/protocols/JabberG/src/jabber_message_manager.h +++ b/protocols/JabberG/src/jabber_message_manager.h @@ -1,15 +1,15 @@ /*
Jabber Protocol Plugin for Miranda IM
-Copyright ( C ) 2002-04 Santithorn Bunchua
-Copyright ( C ) 2005-08 George Hazan
-Copyright ( C ) 2007 Maxim Mluhov
-Copyright ( C ) 2008-09 Dmitriy Chervov
+Copyright (C) 2002-04 Santithorn Bunchua
+Copyright (C) 2005-08 George Hazan
+Copyright (C) 2007 Maxim Mluhov
+Copyright (C) 2008-09 Dmitriy Chervov
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
-of the License, or ( at your option ) any later version.
+of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -28,12 +28,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "jabber_xml.h"
struct CJabberProto;
-typedef void ( CJabberProto::*JABBER_MESSAGE_PFUNC )( HXML messageNode, void *usedata );
-typedef void ( *MESSAGE_USER_DATA_FREE_FUNC )( void *pUserData );
+typedef void (CJabberProto::*JABBER_MESSAGE_PFUNC)(HXML messageNode, void *usedata);
+typedef void (*MESSAGE_USER_DATA_FREE_FUNC)(void *pUserData);
class CJabberMessageInfo;
-typedef BOOL ( CJabberProto::*JABBER_PERMANENT_MESSAGE_HANDLER )( HXML messageNode, ThreadData *pThreadData, CJabberMessageInfo* pInfo );
+typedef BOOL (CJabberProto::*JABBER_PERMANENT_MESSAGE_HANDLER)(HXML messageNode, ThreadData *pThreadData, CJabberMessageInfo* pInfo);
#define JABBER_MESSAGE_PARSE_FROM (1<<3)
#define JABBER_MESSAGE_PARSE_HCONTACT ((1<<4)|JABBER_MESSAGE_PARSE_FROM)
@@ -123,7 +123,7 @@ public: }
~CJabberMessagePermanentInfo()
{
- if ( m_pUserDataFree )
+ if (m_pUserDataFree)
m_pUserDataFree(m_pUserData);
mir_free(m_szXmlns);
mir_free(m_szTag);
@@ -138,7 +138,7 @@ protected: CJabberMessagePermanentInfo* m_pPermanentHandlers;
public:
- CJabberMessageManager( CJabberProto* proto )
+ CJabberMessageManager(CJabberProto* proto)
{
InitializeCriticalSection(&m_cs);
m_pPermanentHandlers = NULL;
@@ -148,7 +148,7 @@ public: {
Lock();
CJabberMessagePermanentInfo *pInfo = m_pPermanentHandlers;
- while ( pInfo )
+ while (pInfo)
{
CJabberMessagePermanentInfo *pTmp = pInfo->m_pNext;
delete pInfo;
@@ -174,24 +174,24 @@ public: {
LeaveCriticalSection(&m_cs);
}
- CJabberMessagePermanentInfo* AddPermanentHandler(JABBER_PERMANENT_MESSAGE_HANDLER pHandler, int nMessageTypes, DWORD dwParamsToParse, const TCHAR* szXmlns, BOOL bAllowPartialNs, const TCHAR* szTag, void *pUserData = NULL, MESSAGE_USER_DATA_FREE_FUNC pUserDataFree = NULL, int iPriority = JH_PRIORITY_DEFAULT)
+ CJabberMessagePermanentInfo* AddPermanentHandler(JABBER_PERMANENT_MESSAGE_HANDLER pHandler, int nMessageTypes, DWORD dwParamsToParse, const TCHAR *szXmlns, BOOL bAllowPartialNs, const TCHAR *szTag, void *pUserData = NULL, MESSAGE_USER_DATA_FREE_FUNC pUserDataFree = NULL, int iPriority = JH_PRIORITY_DEFAULT)
{
CJabberMessagePermanentInfo* pInfo = new CJabberMessagePermanentInfo();
- if (!pInfo)
+ if ( !pInfo)
return NULL;
pInfo->m_pHandler = pHandler;
pInfo->m_nMessageTypes = nMessageTypes ? nMessageTypes : JABBER_MESSAGE_TYPE_ANY;
- replaceStrT( pInfo->m_szXmlns, szXmlns );
+ replaceStrT(pInfo->m_szXmlns, szXmlns);
pInfo->m_bAllowPartialNs = bAllowPartialNs;
- replaceStrT( pInfo->m_szTag, szTag );
+ replaceStrT(pInfo->m_szTag, szTag);
pInfo->m_dwParamsToParse = dwParamsToParse;
pInfo->m_pUserData = pUserData;
pInfo->m_pUserDataFree = pUserDataFree;
pInfo->m_iPriority = iPriority;
Lock();
- if (!m_pPermanentHandlers)
+ if ( !m_pPermanentHandlers)
m_pPermanentHandlers = pInfo;
else
{
@@ -214,7 +214,7 @@ public: BOOL DeletePermanentHandler(CJabberMessagePermanentInfo *pInfo)
{ // returns TRUE when pInfo found, or FALSE otherwise
Lock();
- if (!m_pPermanentHandlers)
+ if ( !m_pPermanentHandlers)
{
Unlock();
return FALSE;
|