summaryrefslogtreecommitdiff
path: root/protocols/MSN
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/MSN
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/MSN')
-rw-r--r--protocols/MSN/src/msn_proto.cpp33
-rw-r--r--protocols/MSN/src/msn_proto.h1
2 files changed, 3 insertions, 31 deletions
diff --git a/protocols/MSN/src/msn_proto.cpp b/protocols/MSN/src/msn_proto.cpp
index bea00b586f..6673bb554f 100644
--- a/protocols/MSN/src/msn_proto.cpp
+++ b/protocols/MSN/src/msn_proto.cpp
@@ -45,9 +45,8 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
{
char path[MAX_PATH];
- m_iVersion = 2;
- m_tszUserName = mir_tstrdup(aUserName);
- m_szModuleName = mir_strdup(aProtoName);
+ ProtoConstructor(this, aProtoName, aUserName);
+
m_szProtoName = mir_strdup(aProtoName);
_strlwr(m_szProtoName);
m_szProtoName[0] = (char)toupper(m_szProtoName[0]);
@@ -133,8 +132,6 @@ CMsnProto::CMsnProto(const char* aProtoName, const TCHAR* aUserName) :
mir_snprintf(alertsoundname, 64, "%s:Alerts", m_szModuleName);
SkinAddNewSoundExT(alertsoundname, m_tszUserName, LPGENT("Live Alert"));
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
-
MSN_InitThreads();
Lists_Init();
MsgQueue_Init();
@@ -189,8 +186,6 @@ CMsnProto::~CMsnProto()
mir_free(mailsoundname);
mir_free(alertsoundname);
- mir_free(m_tszUserName);
- mir_free(m_szModuleName);
mir_free(m_szProtoName);
for (int i=0; i < MSN_NUM_MODES; i++)
@@ -205,6 +200,7 @@ CMsnProto::~CMsnProto()
mir_free(storageCacheKey);
FreeAuthTokens();
+ ProtoDestructor(this);
}
@@ -755,29 +751,6 @@ int __cdecl CMsnProto::GetInfo(HANDLE hContact, int infoType)
return 1;
}
-/////////////////////////////////////////////////////////////////////////////////////////
-// MsnLoadIcon - obtain the protocol icon
-
-HICON __cdecl CMsnProto::GetIcon(int iconIndex)
-{
- if (LOWORD(iconIndex) == PLI_PROTOCOL)
- {
- if (iconIndex & PLIF_ICOLIBHANDLE)
- return (HICON)GetIconHandle(IDI_MSN);
-
- bool big = (iconIndex & PLIF_SMALL) == 0;
- HICON hIcon = LoadIconEx("main", big);
-
- if (iconIndex & PLIF_ICOLIB)
- return hIcon;
-
- hIcon = CopyIcon(hIcon);
- ReleaseIconEx("main", big);
- return hIcon;
- }
- return NULL;
-}
-
////////////////////////////////////////////////////////////////////////////////////////
// RecvContacts
diff --git a/protocols/MSN/src/msn_proto.h b/protocols/MSN/src/msn_proto.h
index 2db55f0ee1..1c0bd41fcf 100644
--- a/protocols/MSN/src/msn_proto.h
+++ b/protocols/MSN/src/msn_proto.h
@@ -55,7 +55,6 @@ struct CMsnProto : 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);