summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_utils.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-01 09:23:58 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-01 09:23:58 +0000
commit09fa77d73829e76123ac7a9b73bc90def12e9d9c (patch)
tree20c5e5a4fc83c672e0505db662e88c16635c5d9d /protocols/Tox/src/tox_utils.cpp
parenta76b0175b2cb203f4a0cc68c99588f23ef945eb6 (diff)
Tox:
- refactoring - updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@11970 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_utils.cpp')
-rw-r--r--protocols/Tox/src/tox_utils.cpp37
1 files changed, 0 insertions, 37 deletions
diff --git a/protocols/Tox/src/tox_utils.cpp b/protocols/Tox/src/tox_utils.cpp
index e3bf7d9707..14caa84026 100644
--- a/protocols/Tox/src/tox_utils.cpp
+++ b/protocols/Tox/src/tox_utils.cpp
@@ -73,43 +73,6 @@ MEVENT CToxProto::AddDbEvent(MCONTACT hContact, WORD type, DWORD timestamp, DWOR
return db_event_add(hContact, &dbei);
}
-std::vector<uint8_t> CToxProto::HexStringToData(std::string hex)
-{
- std::stringstream ss;
- std::vector<uint8_t> data;
-
- size_t count = hex.length() / 2;
- for (size_t i = 0; i < count; i++)
- {
- unsigned byte;
- std::istringstream hex_byte(hex.substr(i * 2, 2));
- hex_byte >> std::hex >> byte;
- data.push_back(static_cast<unsigned char>(byte));
- }
-
- return data;
-}
-
-std::string CToxProto::DataToHexString(std::vector<uint8_t> data)
-{
- std::ostringstream oss;
- oss << std::hex << std::uppercase << std::setfill('0');
- for (size_t i = 0; i < data.size(); i++)
- {
- oss << std::setw(2) << static_cast<int>(data[i]);
- }
- return oss.str();
-}
-
-std::string CToxProto::ToxAddressToId(std::string address)
-{
- if (address.length() > TOX_CLIENT_ID_SIZE * 2)
- {
- address.erase(address.begin() + TOX_CLIENT_ID_SIZE * 2, address.end());
- }
- return address;
-}
-
bool CToxProto::IsFileExists(std::tstring path)
{
//return ::GetFileAttributes(fileName) != DWORD(-1)