summaryrefslogtreecommitdiff
path: root/plugins/IEView/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 20:47:51 +0000
commit68d3fd47bb9b75e65859d14199ffee01f16ac9a7 (patch)
treefcc340ad7067561e57733b287f193a7dbed93dd4 /plugins/IEView/src
parent7193759b046338c6f47ff2edb34743a1465791cd (diff)
HCONTACT is not needed anymore
git-svn-id: http://svn.miranda-ng.org/main/trunk@8086 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/IEView/src')
-rw-r--r--plugins/IEView/src/HTMLBuilder.cpp38
-rw-r--r--plugins/IEView/src/HTMLBuilder.h32
-rw-r--r--plugins/IEView/src/IEView.cpp2
-rw-r--r--plugins/IEView/src/IEView.h4
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp6
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.h2
-rw-r--r--plugins/IEView/src/TextToken.cpp2
-rw-r--r--plugins/IEView/src/TextToken.h2
8 files changed, 44 insertions, 44 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index d8ae83bc32..b8fc6eb740 100644
--- a/plugins/IEView/src/HTMLBuilder.cpp
+++ b/plugins/IEView/src/HTMLBuilder.cpp
@@ -41,7 +41,7 @@ HTMLBuilder::~HTMLBuilder()
mir_free((void*)lastIEViewEvent.pszProto);
}
-bool HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
+bool HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
{
TextToken *token = NULL, *token2;
switch (level) {
@@ -86,7 +86,7 @@ bool HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *te
return false;
}
-wchar_t* HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent)
+wchar_t* HTMLBuilder::encode(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent)
{
int outputSize;
wchar_t *output = NULL;
@@ -95,7 +95,7 @@ wchar_t* HTMLBuilder::encode(HCONTACT hContact, const char *proto, const wchar_t
return output;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const wchar_t *wtext, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const wchar_t *wtext, int flags, bool isSent)
{
char *outputStr = NULL;
if (wtext != NULL) {
@@ -107,7 +107,7 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const wchar_
return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
{
char *outputStr = NULL;
if (text != NULL) {
@@ -118,7 +118,7 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *
return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent)
{
char *outputStr = NULL;
if (text != NULL) {
@@ -129,12 +129,12 @@ char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *
return outputStr;
}
-char* HTMLBuilder::getProto(HCONTACT hContact)
+char* HTMLBuilder::getProto(MCONTACT hContact)
{
return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getProto(const char *proto, HCONTACT hContact)
+char* HTMLBuilder::getProto(const char *proto, MCONTACT hContact)
{
if (proto != NULL)
return mir_strdup(proto);
@@ -142,14 +142,14 @@ char* HTMLBuilder::getProto(const char *proto, HCONTACT hContact)
return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getRealProto(HCONTACT hContact)
+char* HTMLBuilder::getRealProto(MCONTACT hContact)
{
if (hContact == NULL)
return NULL;
char *szProto = mir_strdup(GetContactProto(hContact));
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL) {
mir_free(szProto);
szProto = mir_strdup(GetContactProto(hContact));
@@ -158,21 +158,21 @@ char* HTMLBuilder::getRealProto(HCONTACT hContact)
return szProto;
}
-char *HTMLBuilder::getRealProto(HCONTACT hContact, const char *szProto)
+char *HTMLBuilder::getRealProto(MCONTACT hContact, const char *szProto)
{
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL)
return mir_strdup(GetContactProto(hContact));
}
return mir_strdup(szProto);
}
-HCONTACT HTMLBuilder::getRealContact(HCONTACT hContact)
+MCONTACT HTMLBuilder::getRealContact(MCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto,"MetaContacts"))
- hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
+ hContact = (MCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
return hContact;
}
@@ -208,7 +208,7 @@ bool HTMLBuilder::isSameDate(time_t time1, time_t time2)
return false;
}
-void HTMLBuilder::getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut)
+void HTMLBuilder::getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut)
{
CONTACTINFO ci;
char buf[128];
@@ -250,7 +250,7 @@ void HTMLBuilder::getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut)
mir_free(szProto);
}
-wchar_t *HTMLBuilder::getContactName(HCONTACT hContact, const char *szProto)
+wchar_t *HTMLBuilder::getContactName(MCONTACT hContact, const char *szProto)
{
CONTACTINFO ci = {0};
wchar_t *szName = NULL;
@@ -287,7 +287,7 @@ wchar_t *HTMLBuilder::getContactName(HCONTACT hContact, const char *szProto)
return mir_tstrdup(TranslateT("(Unknown Contact)"));
}
-char *HTMLBuilder::getEncodedContactName(HCONTACT hContact, const char* szProto, const char* szSmileyProto)
+char *HTMLBuilder::getEncodedContactName(MCONTACT hContact, const char* szProto, const char* szSmileyProto)
{
char *szName = NULL;
wchar_t *name = getContactName(hContact, szProto);
@@ -432,7 +432,7 @@ ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(const char *protocolName)
return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(MCONTACT hContact)
{
return getSRMMProtocolSettings( ptrA(getRealProto(hContact)));
}
@@ -446,7 +446,7 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa
return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(MCONTACT hContact)
{
if (hContact != NULL)
return getHistoryProtocolSettings( ptrA(getRealProto(hContact)));
@@ -463,7 +463,7 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HCONTACT hContact)
+ProtocolSettings* HTMLBuilder::getChatProtocolSettings(MCONTACT hContact)
{
return getChatProtocolSettings( ptrA(getRealProto(hContact)));
}
diff --git a/plugins/IEView/src/HTMLBuilder.h b/plugins/IEView/src/HTMLBuilder.h
index 4c082c0f47..38152fa163 100644
--- a/plugins/IEView/src/HTMLBuilder.h
+++ b/plugins/IEView/src/HTMLBuilder.h
@@ -50,19 +50,19 @@ protected:
ENF_CHAT_FORMATTING = 256
};
// virtual char *encode(const char *text, const char *proto, bool replaceSmiley);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int flags, bool isSent);
- virtual char *encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
- virtual wchar_t *encode(HCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual bool encode(HCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
- virtual char* getProto(HCONTACT hContact);
- virtual char* getProto(const char *proto, HCONTACT hContact);
- virtual char* getRealProto(HCONTACT hContact);
- virtual char* getRealProto(HCONTACT hContact, const char *proto);
- virtual wchar_t *getContactName(HCONTACT hContact, const char* szProto);
- virtual char *getEncodedContactName(HCONTACT hContact, const char *szProto, const char *szSmileyProto);
- virtual void getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut);
- virtual HCONTACT getRealContact(HCONTACT hContact);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int flags, bool isSent);
+ virtual char *encodeUTF8(MCONTACT hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
+ virtual wchar_t *encode(MCONTACT hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
+ virtual bool encode(MCONTACT hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
+ virtual char* getProto(MCONTACT hContact);
+ virtual char* getProto(const char *proto, MCONTACT hContact);
+ virtual char* getRealProto(MCONTACT hContact);
+ virtual char* getRealProto(MCONTACT hContact, const char *proto);
+ virtual wchar_t *getContactName(MCONTACT hContact, const char* szProto);
+ virtual char *getEncodedContactName(MCONTACT hContact, const char *szProto, const char *szSmileyProto);
+ virtual void getUINs(MCONTACT hContact, char *&uinIn, char *&uinOut);
+ virtual MCONTACT getRealContact(MCONTACT hContact);
virtual DWORD getLastEventTime();
virtual void setLastEventTime(DWORD);
virtual int getLastEventType();
@@ -70,11 +70,11 @@ protected:
virtual bool isSameDate(time_t time1, time_t time2);
virtual bool isDbEventShown(DBEVENTINFO * dbei)=0;
virtual ProtocolSettings *getSRMMProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getSRMMProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getSRMMProtocolSettings(MCONTACT hContact);
virtual ProtocolSettings *getHistoryProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getHistoryProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getHistoryProtocolSettings(MCONTACT hContact);
virtual ProtocolSettings *getChatProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getChatProtocolSettings(HCONTACT hContact);
+ virtual ProtocolSettings *getChatProtocolSettings(MCONTACT hContact);
void setLastIEViewEvent(IEVIEWEVENT *event);
virtual void buildHead(IEView *, IEVIEWEVENT *event)=0;
public:
diff --git a/plugins/IEView/src/IEView.cpp b/plugins/IEView/src/IEView.cpp
index 8e2212c6cb..8f340c3ce7 100644
--- a/plugins/IEView/src/IEView.cpp
+++ b/plugins/IEView/src/IEView.cpp
@@ -1016,7 +1016,7 @@ HWND IEView::getHWND()
return hwnd;
}
-void IEView::setContact(HCONTACT hContact)
+void IEView::setContact(MCONTACT hContact)
{
this->hContact = hContact;
isContactSet = true;
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h
index 2e869b96e7..1d26ac38c4 100644
--- a/plugins/IEView/src/IEView.h
+++ b/plugins/IEView/src/IEView.h
@@ -441,7 +441,7 @@ private:
bool clearRequired;
BSTR selectedText;
bool isContactSet;
- HCONTACT hContact;
+ MCONTACT hContact;
// IUnknown
STDMETHODIMP QueryInterface(REFIID riid, PVOID *ppv);
@@ -551,7 +551,7 @@ public:
void navigate(IEVIEWNAVIGATE * nav);
void saveDocument();
- void setContact(HCONTACT hContact);
+ void setContact(MCONTACT hContact);
static IEView* get(HWND);
static void init();
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 7ab1ee59af..b58a6beddf 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.cpp
+++ b/plugins/IEView/src/TemplateHTMLBuilder.cpp
@@ -40,7 +40,7 @@ TemplateHTMLBuilder::~TemplateHTMLBuilder()
mir_free(flashAvatars[i]);
}
-char *TemplateHTMLBuilder::getAvatar(HCONTACT hContact, const char* szProto)
+char *TemplateHTMLBuilder::getAvatar(MCONTACT hContact, const char* szProto)
{
DBVARIANT dbv;
TCHAR tmpPath[MAX_PATH];
@@ -176,7 +176,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
char *output;
output = NULL;
- HCONTACT hRealContact = getRealContact(event->hContact);
+ MCONTACT hRealContact = getRealContact(event->hContact);
szRealProto = getProto(hRealContact);
szProto = getProto(event->pszProto, event->hContact);
tempBase[0]='\0';
@@ -352,7 +352,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
if (protoSettings == NULL)
return;
- HCONTACT hRealContact = getRealContact(event->hContact);
+ MCONTACT hRealContact = getRealContact(event->hContact);
szRealProto = getProto(hRealContact);
szProto = getProto(event->pszProto, event->hContact);
tempBase[0]='\0';
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.h b/plugins/IEView/src/TemplateHTMLBuilder.h
index 3bde284df3..4063f1f0d6 100644
--- a/plugins/IEView/src/TemplateHTMLBuilder.h
+++ b/plugins/IEView/src/TemplateHTMLBuilder.h
@@ -36,7 +36,7 @@ protected:
time_t flashAvatarsTime[2];
char * flashAvatars[2];
const char *getFlashAvatar(const TCHAR *file, int index);
- char *getAvatar(HCONTACT hContact, const char *szProto);
+ char *getAvatar(MCONTACT hContact, const char *szProto);
void buildHeadTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
void appendEventTemplate(IEView *, IEVIEWEVENT *event, ProtocolSettings* protoSettings);
virtual TemplateMap *getTemplateMap(ProtocolSettings *);
diff --git a/plugins/IEView/src/TextToken.cpp b/plugins/IEView/src/TextToken.cpp
index 9c69b927b1..7b27e70614 100644
--- a/plugins/IEView/src/TextToken.cpp
+++ b/plugins/IEView/src/TextToken.cpp
@@ -425,7 +425,7 @@ TextToken* TextToken::tokenizeLinks(const wchar_t *text) {
return firstToken;
}
-TextToken* TextToken::tokenizeSmileys(HCONTACT hContact, const char *proto, const wchar_t *text, bool isSent) {
+TextToken* TextToken::tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *text, bool isSent) {
TextToken *firstToken = NULL, *lastToken = NULL;
SMADD_BATCHPARSE2 sp;
SMADD_BATCHPARSERES *spRes;
diff --git a/plugins/IEView/src/TextToken.h b/plugins/IEView/src/TextToken.h
index 1085fb75f9..e9b2417ca4 100644
--- a/plugins/IEView/src/TextToken.h
+++ b/plugins/IEView/src/TextToken.h
@@ -82,7 +82,7 @@ public:
// UNICODE
wchar_t * htmlEncode(const wchar_t *str);
static TextToken* tokenizeLinks(const wchar_t *wtext);
- static TextToken* tokenizeSmileys(HCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent);
+ static TextToken* tokenizeSmileys(MCONTACT hContact, const char *proto, const wchar_t *wtext, bool isSent);
static TextToken* tokenizeBBCodes(const wchar_t *text);
static TextToken* tokenizeMath(const wchar_t *text);
static TextToken* tokenizeChatFormatting(const wchar_t *text);