diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-31 11:46:05 +0000 |
commit | 1ce3da1cca093143d9629bc46e221dd8be962e12 (patch) | |
tree | b99d12d635a65f8c78499137137df2bd591b50be /protocols/FacebookRM | |
parent | 03512ff2ed0f3d1ed6857ee85b0eb7268931ec3f (diff) |
- MAllStrings: a handy union to hold an incoming string parameter of any type;
- FNAMECHAR: atavism extincted;
- PROTOSEARCHRESULT: structure prepared to use results of any type, including utf
git-svn-id: http://svn.miranda-ng.org/main/trunk@13932 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 34 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 6 |
2 files changed, 19 insertions, 21 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index cd76503b21..e798d007d2 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -1287,16 +1287,15 @@ void FacebookProto::SearchAckThread(void *targ) ptrT tnick(mir_utf8decodeT(utils::text::html_entities_decode(nick).c_str())); ptrT tcommon(mir_utf8decodeT(utils::text::html_entities_decode(common).c_str())); - PROTOSEARCHRESULT isr = { 0 }; - isr.cbSize = sizeof(isr); - isr.flags = PSR_TCHAR; - isr.id = tid; - isr.nick = tnick; - isr.firstName = tname; - isr.lastName = tsurname; - isr.email = tcommon; - - ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr); + PROTOSEARCHRESULT psr = { 0 }; + psr.cbSize = sizeof(psr); + psr.flags = PSR_TCHAR; + psr.id.t = tid; + psr.nick.t = tnick; + psr.firstName.t = tname; + psr.lastName.t = tsurname; + psr.email.t = tcommon; + ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&psr); } ssid = utils::text::source_get_value(&items, 3, "id=\"more_objects\"", "ssid=", "&"); @@ -1349,14 +1348,13 @@ void FacebookProto::SearchIdAckThread(void *targ) ptrT tname(mir_utf8decodeT(name.c_str())); ptrT tsurname(mir_utf8decodeT(surname.c_str())); - PROTOSEARCHRESULT isr = { 0 }; - isr.cbSize = sizeof(isr); - isr.flags = PSR_TCHAR; - isr.id = tid; - isr.firstName = tname; - isr.lastName = tsurname; - - ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&isr); + PROTOSEARCHRESULT psr = { 0 }; + psr.cbSize = sizeof(psr); + psr.flags = PSR_TCHAR; + psr.id.t = tid; + psr.firstName.t = tname; + psr.lastName.t = tsurname; + ProtoBroadcastAck(NULL, ACKTYPE_SEARCH, ACKRESULT_DATA, targ, (LPARAM)&psr); } } } diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c1181c307c..6f3e29b71c 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -284,9 +284,9 @@ HANDLE FacebookProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* first MCONTACT FacebookProto::AddToList(int flags, PROTOSEARCHRESULT* psr) { - ptrA id(mir_t2a_cp(psr->id, CP_UTF8)); - ptrA name(mir_t2a_cp(psr->firstName, CP_UTF8)); - ptrA surname(mir_t2a_cp(psr->lastName, CP_UTF8)); + ptrA id(mir_t2a_cp(psr->id.t, CP_UTF8)); + ptrA name(mir_t2a_cp(psr->firstName.t, CP_UTF8)); + ptrA surname(mir_t2a_cp(psr->lastName.t, CP_UTF8)); if (id == NULL) return NULL; |