diff options
-rw-r--r-- | protocols/Tox/src/tox_address.h | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/protocols/Tox/src/tox_address.h b/protocols/Tox/src/tox_address.h index b8ceccefae..2bd0d82bbe 100644 --- a/protocols/Tox/src/tox_address.h +++ b/protocols/Tox/src/tox_address.h @@ -86,65 +86,4 @@ ToxBinAddress ToxHexAddress::ToBin() const return bin;
}
-/*class ToxAddress
-{
-private:
- std::string hexData;
-
- class ToxBytes
- {
- private:
- uint8_t *bytes;
-
- public:
- ToxBytes(uint8_t *bytes) : bytes(bytes) { }
- ~ToxBytes() { if (bytes) mir_free(bytes); }
-
- operator const uint8_t*() { return bytes; }
- };
-
-public:
- ToxAddress(const char *hex) : hexData(hex) { }
- ToxAddress(const std::string &hex) : hexData(hex) { }
- ToxAddress(const ToxAddress &address) : hexData(address.hexData) { }
- ToxAddress(const uint8_t *bin, int size = TOX_FRIEND_ADDRESS_SIZE)
- //: binData(bin, bin + size)
- {
- char *hex = (char*)mir_alloc(size * 2 + 1);
- std::string hexData = bin2hex(bin, size, hex);
- std::transform(hexData.begin(), hexData.end(), hexData.begin(), ::toupper);
- //mir_free(hex);
- }
-
- ~ToxAddress()
- {
- int i = 0;
- }
-
- operator const char*() const
- {
- return hexData.c_str();
- }
-
- ToxBytes AsBytes() const
- {
- char *endptr;
- const char *pos = hexData.c_str();
- int size = hexData.length() / 2;
- uint8_t *result = (uint8_t*)mir_alloc(size);
- for (int i = 0; i < size; i++)
- {
- char buf[5] = { '0', 'x', pos[0], pos[1], 0 };
- result[i] = (uint8_t)strtol(buf, &endptr, 0);
- pos += 2;
- }
- return ToxBytes(result);
- }
-
- std::string AsPubKey() const
- {
- return hexData.substr(0, TOX_PUBLIC_KEY_SIZE * 2).c_str();
- }
-};*/
-
#endif //_TOX_ADDRESS_H_
\ No newline at end of file |