summaryrefslogtreecommitdiff
path: root/protocols/Tlen
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-02-23 19:43:21 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-02-23 19:43:21 +0000
commitaa387fa04aa096d163932d3f5f9711a2f146c6f0 (patch)
tree7efe5dabf5bf5b9a78f8f991522487814bfc8cb0 /protocols/Tlen
parent139c2c1a61d9f765704a2001199c2712d6587fb4 (diff)
- PROTO_INTERFACE::GetIcon removed and replaced with the standard implementation;
- PS_LOADICON also replaced with the standard function; - ProtoConstructor() & ProtoDestructor() macroses are introduced to simplify protocols' code; - GetIcon() method implementation removed from all protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@3739 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
-rw-r--r--protocols/Tlen/src/jabber.h2
-rw-r--r--protocols/Tlen/src/jabber_svc.cpp19
2 files changed, 2 insertions, 19 deletions
diff --git a/protocols/Tlen/src/jabber.h b/protocols/Tlen/src/jabber.h
index 450b84c1f8..caade83f3a 100644
--- a/protocols/Tlen/src/jabber.h
+++ b/protocols/Tlen/src/jabber.h
@@ -242,7 +242,6 @@ struct TlenProtocol : public PROTO_INTERFACE, public MZeroedObject
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const PROTOCHAR** szFilename);
virtual DWORD_PTR __cdecl GetCaps(int type, HANDLE hContact = NULL);
- virtual HICON __cdecl GetIcon(int iconIndex);
virtual int __cdecl GetInfo(HANDLE hContact, int infoType);
virtual HANDLE __cdecl SearchBasic(const PROTOCHAR* id);
@@ -504,4 +503,3 @@ char *TlenAdvSearchCreateQuery(HWND hwndDlg, int iqId);
#endif
-
diff --git a/protocols/Tlen/src/jabber_svc.cpp b/protocols/Tlen/src/jabber_svc.cpp
index 450446f640..b0a284c9e1 100644
--- a/protocols/Tlen/src/jabber_svc.cpp
+++ b/protocols/Tlen/src/jabber_svc.cpp
@@ -64,17 +64,6 @@ INT_PTR TlenGetName(void *ptr, LPARAM wParam, LPARAM lParam)
return 0;
}
-HICON __cdecl TlenProtocol::GetIcon(int iconIndex)
-{
- if ((iconIndex&0xffff) == PLI_PROTOCOL) {
- HICON hIcon = GetIcolibIcon(IDI_TLEN);
- HICON hIconCopy = CopyIcon(hIcon);
- ReleaseIcolibIcon(hIcon);
- return hIconCopy;
- }
- return (HICON) NULL;
-}
-
int TlenRunSearch(TlenProtocol *proto) {
int iqId = 0;
if (!proto->isOnline) return 0;
@@ -1286,14 +1275,11 @@ void TlenInitServicesVTbl(TlenProtocol *proto) {
TlenProtocol::TlenProtocol( const char* aProtoName, const TCHAR* aUserName )
{
+ ProtoConstructor(this, aProtoName, aUserName);
- m_iVersion = 2;
- m_tszUserName = mir_tstrdup(aUserName);
- m_szModuleName = mir_strdup(aProtoName);
m_szProtoName = mir_strdup(aProtoName);
_strlwr( m_szProtoName );
m_szProtoName[0] = toupper( m_szProtoName[0] );
- m_iStatus = ID_STATUS_OFFLINE;
TlenInitServicesVTbl(this);
@@ -1358,6 +1344,5 @@ TlenProtocol::~TlenProtocol()
mir_free(modeMsgs.szFreechat);
mir_free(modeMsgs.szInvisible);
+ ProtoDestructor(this);
}
-
-