diff options
author | George Hazan <george.hazan@gmail.com> | 2014-02-24 12:27:21 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-02-24 12:27:21 +0000 |
commit | 9c8e399b431a9b0995efd24752a47efbe6e84ade (patch) | |
tree | 9ee230f9d7cd19b1ff0c6f67a9e754454a059f8c /protocols/Tlen | |
parent | afe5082c1a5126f5ba2973afaeaf16846302a295 (diff) |
- added ME_FILEDLG_CANCELED & ME_FILEDLG_SUCCEEDED events to support async file selection dialog;
- return value of MS_FILE_SENDFILE* services changed: now it returns a dialog handle;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@8253 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tlen')
-rw-r--r-- | protocols/Tlen/src/tlen_misc.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_muc.cpp | 6 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_presence.cpp | 2 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_svc.cpp | 4 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_thread.cpp | 11 | ||||
-rw-r--r-- | protocols/Tlen/src/tlen_voice.cpp | 5 |
6 files changed, 15 insertions, 17 deletions
diff --git a/protocols/Tlen/src/tlen_misc.cpp b/protocols/Tlen/src/tlen_misc.cpp index 2879edfb82..c7205a31cd 100644 --- a/protocols/Tlen/src/tlen_misc.cpp +++ b/protocols/Tlen/src/tlen_misc.cpp @@ -46,7 +46,7 @@ void TlenDBAddAuthRequest(TlenProtocol *proto, char *jid, char *nick) if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)proto->m_szModuleName);
// strip resource if present
s = TlenLoginFromJID(jid);
_strlwr(s);
@@ -114,7 +114,7 @@ MCONTACT TlenDBCreateContact(TlenProtocol *proto, char *jid, char *nick, BOOL te if ((hContact=TlenHContactFromJID(proto, jid)) == NULL) {
hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM)proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if (nick != NULL && nick[0] != '\0')
db_set_s(hContact, proto->m_szModuleName, "Nick", nick);
diff --git a/protocols/Tlen/src/tlen_muc.cpp b/protocols/Tlen/src/tlen_muc.cpp index fc87a29b09..02f4d220df 100644 --- a/protocols/Tlen/src/tlen_muc.cpp +++ b/protocols/Tlen/src/tlen_muc.cpp @@ -244,7 +244,7 @@ int TlenProtocol::MUCHandleEvent(WPARAM wParam, LPARAM lParam) mir_snprintf(str, SIZEOF(str), "%s/%s", mucce->pszID, nick);
hContact = TlenDBCreateContact(this, str, nick, TRUE); //(char *)mucce->pszUID
db_set_b(hContact, m_szModuleName, "bChat", TRUE);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM) hContact, (LPARAM) NULL);
+ CallService(MS_MSG_SENDMESSAGE, hContact, NULL);
}
else {
DBVARIANT dbv;
@@ -253,7 +253,7 @@ int TlenProtocol::MUCHandleEvent(WPARAM wParam, LPARAM lParam) mir_snprintf(str, sizeof(str), "%s@%s", nick, dbv.pszVal);
db_free(&dbv);
hContact = TlenDBCreateContact(this, str, nick, TRUE);
- CallService(MS_MSG_SENDMESSAGE, (WPARAM) hContact, (LPARAM) NULL);
+ CallService(MS_MSG_SENDMESSAGE, hContact, NULL);
}
}
}
@@ -977,7 +977,7 @@ static void __cdecl TlenMUCCSendQueryResultThread(void *ptr) if (!db_get(hContact, szProto, "jid", &dbv)) {
if (strcmp(dbv.pszVal, "b73@tlen.pl")) {
queryResult.pItems[queryResult.iItemsNum].pszID = mir_strdup(dbv.pszVal);
- queryResult.pItems[queryResult.iItemsNum].pszName = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0));
+ queryResult.pItems[queryResult.iItemsNum].pszName = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
queryResult.iItemsNum++;
}
db_free(&dbv);
diff --git a/protocols/Tlen/src/tlen_presence.cpp b/protocols/Tlen/src/tlen_presence.cpp index 57bd773bf0..e36f859f65 100644 --- a/protocols/Tlen/src/tlen_presence.cpp +++ b/protocols/Tlen/src/tlen_presence.cpp @@ -146,7 +146,7 @@ void TlenProcessPresence(XmlNode *node, TlenProtocol *proto) } if (item != NULL && item->isTyping) { item->isTyping = FALSE; - CallService(MS_PROTO_CONTACTISTYPING, (WPARAM) hContact, PROTOTYPE_CONTACTTYPING_OFF); + CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF); } proto->debugLogA("%s offline, set contact status to %d", from, status); } diff --git a/protocols/Tlen/src/tlen_svc.cpp b/protocols/Tlen/src/tlen_svc.cpp index 6221fb5032..53b657bc1e 100644 --- a/protocols/Tlen/src/tlen_svc.cpp +++ b/protocols/Tlen/src/tlen_svc.cpp @@ -184,7 +184,7 @@ static MCONTACT AddToListByJID(TlenProtocol *proto, const char *newJid, DWORD fl // not already there: add
jid = mir_strdup(newJid); _strlwr(jid);
hContact = (MCONTACT) CallService(MS_DB_CONTACT_ADD, 0, 0);
- CallService(MS_PROTO_ADDTOCONTACT, (WPARAM) hContact, (LPARAM) proto->m_szModuleName);
+ CallService(MS_PROTO_ADDTOCONTACT, hContact, (LPARAM) proto->m_szModuleName);
db_set_s(hContact, proto->m_szModuleName, "jid", jid);
if ((nick=TlenNickFromJID(newJid)) == NULL)
nick = mir_strdup(newJid);
@@ -963,7 +963,7 @@ int TlenProtocol::TlenDbSettingChanged(WPARAM wParam, LPARAM lParam) jid = dbv.pszVal;
if ((item=TlenListGetItemPtr(this, LIST_ROSTER, dbv.pszVal)) != NULL) {
if (cws->value.type == DBVT_DELETED) {
- newNick = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, GCDNF_NOMYHANDLE));
+ newNick = mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_NOMYHANDLE));
} else if (cws->value.pszVal != NULL) {
newNick = settingToChar(cws);
} else {
diff --git a/protocols/Tlen/src/tlen_thread.cpp b/protocols/Tlen/src/tlen_thread.cpp index e4eafbda90..d1ad131949 100644 --- a/protocols/Tlen/src/tlen_thread.cpp +++ b/protocols/Tlen/src/tlen_thread.cpp @@ -676,7 +676,7 @@ static void TlenProcessMessage(XmlNode *node, ThreadData *info) if (item->isTyping) {
item->isTyping = FALSE;
if ((hContact=TlenHContactFromJID(info->proto, fromJid)) != NULL)
- CallService(MS_PROTO_CONTACTISTYPING, (WPARAM) hContact, PROTOTYPE_CONTACTTYPING_OFF);
+ CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF);
}
}
@@ -1041,12 +1041,11 @@ static void TlenProcessM(XmlNode *node, ThreadData *info) bAlert = IsAuthorized(info->proto, fLogin);
}
if (bAlert) {
- if (info->proto->tlenOptions.useNudge) {
- NotifyEventHooks(info->proto->hTlenNudge,(WPARAM) hContact,0);
- } else {
- if (info->proto->tlenOptions.logAlerts) {
+ if (info->proto->tlenOptions.useNudge)
+ NotifyEventHooks(info->proto->hTlenNudge, hContact, 0);
+ else {
+ if (info->proto->tlenOptions.logAlerts)
TlenLogMessage(info->proto, hContact, 0, Translate("An alert has been received."));
- }
SkinPlaySound("TlenAlertNotify");
}
}
diff --git a/protocols/Tlen/src/tlen_voice.cpp b/protocols/Tlen/src/tlen_voice.cpp index 148fb26919..ce97653f71 100644 --- a/protocols/Tlen/src/tlen_voice.cpp +++ b/protocols/Tlen/src/tlen_voice.cpp @@ -947,9 +947,8 @@ static char *getDisplayName(TlenProtocol *proto, const char *id) if (!db_get(NULL, proto->m_szModuleName, "LoginServer", &dbv)) {
mir_snprintf(jid, sizeof(jid), "%s@%s", id, dbv.pszVal);
db_free(&dbv);
- if ((hContact=TlenHContactFromJID(proto, jid)) != NULL) {
- return mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM) hContact, 0));
- }
+ if ((hContact=TlenHContactFromJID(proto, jid)) != NULL)
+ return mir_strdup((char *) CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, 0));
}
return mir_strdup(id);
}
|