summaryrefslogtreecommitdiff
path: root/plugins/IEView/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /plugins/IEView/src
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 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.h2
-rw-r--r--plugins/IEView/src/TemplateHTMLBuilder.cpp8
-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, 43 insertions, 45 deletions
diff --git a/plugins/IEView/src/HTMLBuilder.cpp b/plugins/IEView/src/HTMLBuilder.cpp
index d26272f9c2..d8ae83bc32 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(HANDLE hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent)
+bool HTMLBuilder::encode(HCONTACT 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(HANDLE hContact, const char *proto, const wchar_t *text
return false;
}
-wchar_t* HTMLBuilder::encode(HANDLE hContact, const char *proto, const wchar_t *text, int flags, bool isSent)
+wchar_t* HTMLBuilder::encode(HCONTACT 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(HANDLE hContact, const char *proto, const wchar_t *
return output;
}
-char* HTMLBuilder::encodeUTF8(HANDLE hContact, const char *proto, const wchar_t *wtext, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(HCONTACT 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(HANDLE hContact, const char *proto, const wchar_t
return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HANDLE hContact, const char *proto, const char *text, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(HCONTACT hContact, const char *proto, const char *text, int flags, bool isSent)
{
char *outputStr = NULL;
if (text != NULL) {
@@ -118,7 +118,7 @@ char* HTMLBuilder::encodeUTF8(HANDLE hContact, const char *proto, const char *te
return outputStr;
}
-char* HTMLBuilder::encodeUTF8(HANDLE hContact, const char *proto, const char *text, int cp, int flags, bool isSent)
+char* HTMLBuilder::encodeUTF8(HCONTACT 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(HANDLE hContact, const char *proto, const char *te
return outputStr;
}
-char* HTMLBuilder::getProto(HANDLE hContact)
+char* HTMLBuilder::getProto(HCONTACT hContact)
{
return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getProto(const char *proto, HANDLE hContact)
+char* HTMLBuilder::getProto(const char *proto, HCONTACT hContact)
{
if (proto != NULL)
return mir_strdup(proto);
@@ -142,14 +142,14 @@ char* HTMLBuilder::getProto(const char *proto, HANDLE hContact)
return mir_strdup(GetContactProto(hContact));
}
-char* HTMLBuilder::getRealProto(HANDLE hContact)
+char* HTMLBuilder::getRealProto(HCONTACT hContact)
{
if (hContact == NULL)
return NULL;
char *szProto = mir_strdup(GetContactProto(hContact));
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
+ hContact = (HCONTACT)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(HANDLE hContact)
return szProto;
}
-char *HTMLBuilder::getRealProto(HANDLE hContact, const char *szProto)
+char *HTMLBuilder::getRealProto(HCONTACT hContact, const char *szProto)
{
if (szProto != NULL && !strcmp(szProto, "MetaContacts")) {
- hContact = (HANDLE)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
+ hContact = (HCONTACT)CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM)hContact, 0);
if (hContact != NULL)
return mir_strdup(GetContactProto(hContact));
}
return mir_strdup(szProto);
}
-HANDLE HTMLBuilder::getRealContact(HANDLE hContact)
+HCONTACT HTMLBuilder::getRealContact(HCONTACT hContact)
{
char *szProto = GetContactProto(hContact);
if (szProto != NULL && !strcmp(szProto,"MetaContacts"))
- hContact = (HANDLE) CallService(MS_MC_GETMOSTONLINECONTACT, (WPARAM) hContact, 0);
+ hContact = (HCONTACT)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(HANDLE hContact, char *&uinIn, char *&uinOut)
+void HTMLBuilder::getUINs(HCONTACT hContact, char *&uinIn, char *&uinOut)
{
CONTACTINFO ci;
char buf[128];
@@ -250,7 +250,7 @@ void HTMLBuilder::getUINs(HANDLE hContact, char *&uinIn, char *&uinOut)
mir_free(szProto);
}
-wchar_t *HTMLBuilder::getContactName(HANDLE hContact, const char *szProto)
+wchar_t *HTMLBuilder::getContactName(HCONTACT hContact, const char *szProto)
{
CONTACTINFO ci = {0};
wchar_t *szName = NULL;
@@ -287,7 +287,7 @@ wchar_t *HTMLBuilder::getContactName(HANDLE hContact, const char *szProto)
return mir_tstrdup(TranslateT("(Unknown Contact)"));
}
-char *HTMLBuilder::getEncodedContactName(HANDLE hContact, const char* szProto, const char* szSmileyProto)
+char *HTMLBuilder::getEncodedContactName(HCONTACT 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(HANDLE hContact)
+ProtocolSettings* HTMLBuilder::getSRMMProtocolSettings(HCONTACT hContact)
{
return getSRMMProtocolSettings( ptrA(getRealProto(hContact)));
}
@@ -446,7 +446,7 @@ ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(const char *protocolNa
return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(HANDLE hContact)
+ProtocolSettings* HTMLBuilder::getHistoryProtocolSettings(HCONTACT hContact)
{
if (hContact != NULL)
return getHistoryProtocolSettings( ptrA(getRealProto(hContact)));
@@ -463,7 +463,7 @@ ProtocolSettings* HTMLBuilder::getChatProtocolSettings(const char *protocolName)
return protoSettings;
}
-ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HANDLE hContact)
+ProtocolSettings* HTMLBuilder::getChatProtocolSettings(HCONTACT hContact)
{
return getChatProtocolSettings( ptrA(getRealProto(hContact)));
}
diff --git a/plugins/IEView/src/HTMLBuilder.h b/plugins/IEView/src/HTMLBuilder.h
index a5bdf24329..4c082c0f47 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(HANDLE hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual char *encodeUTF8(HANDLE hContact, const char *proto, const char *text, int flags, bool isSent);
- virtual char *encodeUTF8(HANDLE hContact, const char *proto, const char *text, int cp, int flags, bool isSent);
- virtual wchar_t *encode(HANDLE hContact, const char *proto, const wchar_t *text, int flags, bool isSent);
- virtual bool encode(HANDLE hContact, const char *proto, const wchar_t *text, wchar_t **output, int *outputSize, int level, int flags, bool isSent);
- virtual char* getProto(HANDLE hContact);
- virtual char* getProto(const char *proto, HANDLE hContact);
- virtual char* getRealProto(HANDLE hContact);
- virtual char* getRealProto(HANDLE hContact, const char *proto);
- virtual wchar_t *getContactName(HANDLE hContact, const char* szProto);
- virtual char *getEncodedContactName(HANDLE hContact, const char *szProto, const char *szSmileyProto);
- virtual void getUINs(HANDLE hContact, char *&uinIn, char *&uinOut);
- virtual HANDLE getRealContact(HANDLE hContact);
+ 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 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(HANDLE hContact);
+ virtual ProtocolSettings *getSRMMProtocolSettings(HCONTACT hContact);
virtual ProtocolSettings *getHistoryProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getHistoryProtocolSettings(HANDLE hContact);
+ virtual ProtocolSettings *getHistoryProtocolSettings(HCONTACT hContact);
virtual ProtocolSettings *getChatProtocolSettings(const char *protocolName);
- virtual ProtocolSettings *getChatProtocolSettings(HANDLE hContact);
+ virtual ProtocolSettings *getChatProtocolSettings(HCONTACT 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 1925a59f98..8e2212c6cb 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(HANDLE hContact)
+void IEView::setContact(HCONTACT hContact)
{
this->hContact = hContact;
isContactSet = true;
diff --git a/plugins/IEView/src/IEView.h b/plugins/IEView/src/IEView.h
index 156affb2c4..c552525c84 100644
--- a/plugins/IEView/src/IEView.h
+++ b/plugins/IEView/src/IEView.h
@@ -551,7 +551,7 @@ public:
void navigate(IEVIEWNAVIGATE * nav);
void saveDocument();
- void setContact(HANDLE hContact);
+ void setContact(HCONTACT hContact);
static IEView* get(HWND);
static void init();
diff --git a/plugins/IEView/src/TemplateHTMLBuilder.cpp b/plugins/IEView/src/TemplateHTMLBuilder.cpp
index 2a090a77d0..7ab1ee59af 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(HANDLE hContact, const char* szProto)
+char *TemplateHTMLBuilder::getAvatar(HCONTACT hContact, const char* szProto)
{
DBVARIANT dbv;
TCHAR tmpPath[MAX_PATH];
@@ -159,7 +159,6 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
CONTACTINFO ci;
char tempBase[1024];
char tempStr[1024];
- HANDLE hRealContact;
char *szRealProto = NULL;
char *szBase=NULL;
char *szNoAvatar=NULL;
@@ -177,7 +176,7 @@ void TemplateHTMLBuilder::buildHeadTemplate(IEView *view, IEVIEWEVENT *event, Pr
char *output;
output = NULL;
- hRealContact = getRealContact(event->hContact);
+ HCONTACT hRealContact = getRealContact(event->hContact);
szRealProto = getProto(hRealContact);
szProto = getProto(event->pszProto, event->hContact);
tempBase[0]='\0';
@@ -327,7 +326,6 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
{
DBVARIANT dbv;
CONTACTINFO ci;
- HANDLE hRealContact;
char *szRealProto = NULL;
char tempBase[1024];
char *szBase=NULL;
@@ -354,7 +352,7 @@ void TemplateHTMLBuilder::appendEventTemplate(IEView *view, IEVIEWEVENT *event,
if (protoSettings == NULL)
return;
- hRealContact = getRealContact(event->hContact);
+ HCONTACT 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 a6193db6e1..3bde284df3 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(HANDLE hContact, const char *szProto);
+ char *getAvatar(HCONTACT 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 103fcc629c..9c69b927b1 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(HANDLE hContact, const char *proto, const wchar_t *text, bool isSent) {
+TextToken* TextToken::tokenizeSmileys(HCONTACT 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 ad6c46d711..1085fb75f9 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(HANDLE hContact, const char *proto, const wchar_t *wtext, bool isSent);
+ static TextToken* tokenizeSmileys(HCONTACT 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);