summaryrefslogtreecommitdiff
path: root/protocols/MRA/src
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src')
-rw-r--r--protocols/MRA/src/MraProto.cpp24
-rw-r--r--protocols/MRA/src/MraProto.h1
2 files changed, 4 insertions, 21 deletions
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 05a592fa25..42e6b29ada 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -10,10 +10,7 @@ static int MraExtraIconsApplyAll(WPARAM, LPARAM)
CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) :
m_bLoggedIn(false)
{
- m_iVersion = 2;
- m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
- m_szModuleName = mir_strdup(_module);
- m_tszUserName = mir_tstrdup(_displayName);
+ ProtoConstructor(this, _module, _displayName);
InitializeCriticalSectionAndSpinCount(&csCriticalSectionSend, 0);
MraSendQueueInitialize(0, &hSendQueueHandle);
@@ -41,8 +38,7 @@ CMraProto::CMraProto(const char* _module, const TCHAR* _displayName) :
TCHAR name[128];
mir_sntprintf( name, SIZEOF(name), TranslateT("%s connection"), m_tszUserName);
- NETLIBUSER nlu = {0};
- nlu.cbSize = sizeof(nlu);
+ NETLIBUSER nlu = { sizeof(nlu) };
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
nlu.szSettingsModule = m_szModuleName;
nlu.ptszDescriptiveName = name;
@@ -87,6 +83,8 @@ CMraProto::~CMraProto()
MraFilesQueueDestroy(hFilesQueueHandle);
MraSendQueueDestroy(hSendQueueHandle);
DeleteCriticalSection(&csCriticalSectionSend);
+
+ ProtoDestructor(this);
}
INT_PTR CMraProto::MraCreateAccMgrUI(WPARAM wParam,LPARAM lParam)
@@ -375,20 +373,6 @@ DWORD_PTR CMraProto::GetCaps(int type, HANDLE hContact)
}
}
-HICON CMraProto::GetIcon(int iconIndex)
-{
- UINT id;
-
- switch (iconIndex & 0xFFFF) {
- case PLI_PROTOCOL: id = IDI_MRA; break; // IDI_TM is the main icon for the protocol
- default: return NULL;
- }
-
- return (HICON)LoadImage(masMraSettings.hInstance, MAKEINTRESOURCE(id), IMAGE_ICON,
- GetSystemMetrics((iconIndex & PLIF_SMALL) ? SM_CXSMICON : SM_CXICON),
- GetSystemMetrics((iconIndex & PLIF_SMALL) ? SM_CYSMICON : SM_CYICON), 0);
-}
-
int CMraProto::GetInfo(HANDLE hContact, int infoType)
{
return MraUpdateContactInfo(hContact) != 0;
diff --git a/protocols/MRA/src/MraProto.h b/protocols/MRA/src/MraProto.h
index 641938162a..5576640571 100644
--- a/protocols/MRA/src/MraProto.h
+++ b/protocols/MRA/src/MraProto.h
@@ -58,7 +58,6 @@ struct CMraProto : public PROTO_INTERFACE, public MZeroedObject
virtual int __cdecl FileResume(HANDLE hTransfer, int* action, const TCHAR** 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 TCHAR* id);