diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-10 20:29:30 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-10 20:29:30 +0000 |
commit | 9b11e2e558cdee65b42ffd56601488ec3cbce534 (patch) | |
tree | cfac16c5acaf8c34350246e08c04960b8d9ae356 /protocols/Tox/src/tox_proto.cpp | |
parent | b8a7168685627ff4ea79dcaf3d917f6b40a23f3b (diff) |
Tox:
- reworked searching
- updated tox core
- updated icon
git-svn-id: http://svn.miranda-ng.org/main/trunk@10423 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r-- | protocols/Tox/src/tox_proto.cpp | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 83163a9670..4bd9ca4efc 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -157,72 +157,6 @@ HANDLE __cdecl CToxProto::ChangeInfo(int iInfoType, void* pInfoData) { return 0; int __cdecl CToxProto::GetInfo(MCONTACT hContact, int infoType) { return 0; }
-HANDLE __cdecl CToxProto::SearchBasic(const PROTOCHAR* id) { return 0; }
-
-HANDLE __cdecl CToxProto::SearchByEmail(const PROTOCHAR* email) { return 0; }
-
-HANDLE __cdecl CToxProto::SearchByName(const PROTOCHAR* nick, const PROTOCHAR* firstName, const PROTOCHAR* lastName) { return 0; }
-
-HWND __cdecl CToxProto::SearchAdvanced(HWND owner)
-{
- if (!IsOnline())
- {
- // we cannot add someone to friend list while tox is offline
- return NULL;
- }
-
- std::smatch match;
- std::regex regex("^\\s*([A-Fa-f0-9]{76})\\s*$");
-
- char text[TOX_FRIEND_ADDRESS_SIZE * 2 + 1];
- GetDlgItemTextA(owner, IDC_SEARCH, text, SIZEOF(text));
-
- const std::string query = text;
- if (std::regex_search(query, match, regex))
- {
- std::string address = match[1];
- std::vector<uint8_t> id = HexStringToData(address);
- MCONTACT hContact = FindContact(id);
- if (!hContact)
- {
- PROTOSEARCHRESULT psr = { sizeof(psr) };
- psr.flags = PSR_TCHAR;
- psr.id = mir_a2t(query.c_str());
-
- ADDCONTACTSTRUCT acs = { HANDLE_SEARCHRESULT };
- acs.szProto = m_szModuleName;
- acs.psr = &psr;
-
- CallService(MS_ADDCONTACT_SHOW, (WPARAM)owner, (LPARAM)&acs);
- }
- else
- {
- ShowNotification(TranslateT("Contact already in your contact list"), 0, hContact);
- }
- ForkThread(&CToxProto::SearchByIdAsync, mir_strdup(query.c_str()));
- }
- else
- {
- regex = "^\\s*([^ @/:;()\"']+)(@toxme.se)?\\s*$";
- if (std::regex_search(query, match, regex))
- {
- std::string query = match[1];
- ForkThread(&CToxProto::SearchByNameAsync, mir_strdup(query.c_str()));
- }
- }
- return (HWND)1;
-}
-
-HWND __cdecl CToxProto::CreateExtendedSearchUI(HWND owner)
-{
- return CreateDialogParam(
- g_hInstance,
- MAKEINTRESOURCE(IDD_SEARCH),
- owner,
- SearchDlgProc,
- (LPARAM)this);
-}
-
int __cdecl CToxProto::RecvContacts(MCONTACT hContact, PROTORECVEVENT*) { return 0; }
int __cdecl CToxProto::RecvFile(MCONTACT hContact, PROTOFILEEVENT *pre)
|