Commit Graph

250 Commits

Author SHA1 Message Date
mannol
b2b11f0fba Added many test and fixed various warnings 2015-04-30 00:40:30 +02:00
mannol
9bba7a0434 Done 2015-04-29 01:01:25 +02:00
irungentoo
c3a6c5b92e
Small change to TCP test. 2015-04-08 20:50:19 -04:00
irungentoo
cf436fde12
Fixed onion test. 2015-04-06 15:57:23 -04:00
Dubslow
f7beee495e
Make keys into a struct for more programmer safety 2015-03-31 21:16:04 -05:00
Dubslow
9b66c57bd0
Fix minor code duplication 2015-03-31 19:30:09 -05:00
irungentoo
99e0fde297
Merge branch 'master' of https://github.com/dubslow/toxcore 2015-03-31 19:44:51 -04:00
Dubslow
e998aca8f7
Fix toxencryptsave to be consistent with new_api
Upon my own decision, the two tox_encryped_new convenience functions were removed due to basically needing two different sets of error codes.
At iphydf's suggestion the corresponding tox_get_encrypted_savedata convenience functions were removed as well.
2015-03-31 18:31:23 -05:00
irungentoo
06b389ea5e
Making tox_encrypted_new() use the same error codes as tox_new was a bad idea.
They now have their own error codes.
2015-03-26 12:39:09 -04:00
irungentoo
b0983104d5
Renamed tox_file_send_control to tox_file_control.
Renamed tox_file_send_seek to tox_file_seek.
2015-03-21 08:58:54 -04:00
irungentoo
8c2347222a
Transfers with filelength == 0 now behave exactly like transfers of every
other size (except streaming of course).
2015-03-21 08:35:31 -04:00
irungentoo
f2a017c055
Allow sending of file transfer requests with length 0 but don't allocate
any file number for them in core.

These can be used to tell friends we don't have an avatar set or to unset
a set avatar.
2015-03-20 21:15:44 -04:00
irungentoo
b1ec157175
For file transfers UINT64_MAX is now used as the size for streaming
transfers instead of 0.

For avatar transfers file size 0 now means that the client has no avatar
set.

Added a test for streaming transfers.
2015-03-20 20:12:07 -04:00
Dubslow
d8da9bf709
callback_file_request_chunk -> callback_file_chunk_request
A couple of minor reasons, combined warrant a PR imo:
a) fileChunkRequested is a better signal name than fileRequestChunkReceived, and I don't want to break consistency by reordering words for just this signal
b) "request chunk" is parsed by English speakers as a verb-object combination,
   implying sending the request, not receiving, whereas "chunk requested" is
   parsed (more correctly) as an adjective-noun combo (in particular, request is
   a noun not a verb), and thus reads far more like "hey heads up we just got a request"

For instance some tests/testing code had some callbacks to *receive* chunk requests, and they were called "tox_file_request_chunk"... to receive a chunk, not request it. Now they're called "tox_file_chunk_request".

So yeah...
2015-03-19 08:38:27 -05:00
irungentoo
e0bd6ef4e0
Renamed TOX_MESSAGE_TYPE_MESSAGE to TOX_MESSAGE_TYPE_NORMAL. 2015-03-18 17:14:57 -04:00
irungentoo
45cf8a744c
Merge branch 'one_more_rename' of https://github.com/dubslow/toxcore into new_api 2015-03-18 16:15:36 -04:00
irungentoo
d711362622
Merged normal message function and send action function into one
messaging function.

This removes code duplication and allows us to easily add new message
types to the api without having to add new functions.
2015-03-18 15:32:53 -04:00
Dubslow
2f65de6fd1
Move get_connection_status to self pseudonamespace, to contrast friend_get_connection_status 2015-03-18 14:18:36 -05:00
irungentoo
5b7cbc8956
Api changes.
receive to recv in file receive functions.

Added TOX_MAX_FILENAME_LENGTH define.
2015-03-18 12:54:00 -04:00
irungentoo
8286c2c22f
Save function renamed to tox_get_savedata() 2015-03-17 16:20:38 -04:00
irungentoo
ea8d27259f
Added tox_file_send_seek() function to api.
This function can be used to seek an incoming file tranfer right
before accepting it.

It is meant to be used to resume incomplete file tranfers by clients.
2015-03-17 15:05:17 -04:00
irungentoo
24c70c9e84
Added and implemented file_id parameter to file tranfers.
file_id is a 32byte identifier that can be used by users to identify
file tranfers across core/client restarts in order to resume broken
file tranfers.

In avatar tranfers it corresponds to the hash of the avatar.

Added tox_file_get_file_id() function to api to obtain the file_id
of an ongoing file transfer.

If not set, core will generate a random one.
2015-03-17 13:44:48 -04:00
iphydf
fa7c21f95c New API fixups. 2015-03-16 13:12:25 +00:00
irungentoo
29857a3da4
This belongs in the previous commit. 2015-03-13 16:33:55 -04:00
irungentoo
8e2957ec50
Merge branch 'newer_api' of https://github.com/dubslow/toxcore into new_api 2015-03-13 15:29:34 -04:00
Dubslow
64fefb6f43
revert to TOX_FILE_KIND 2015-03-13 12:34:14 -05:00
Dubslow
3bf259f69d Convert core code depending on the api 2015-03-12 18:23:14 -05:00
irungentoo
334cb9c8db
Check more ports in tox_test.c 2015-03-12 19:04:49 -04:00
irungentoo
8dc2db2025
Added position parameter to tox_file_send_chunk().
This is done so that the function now has the same parameters as the
request chunk callback.
2015-03-12 15:17:34 -04:00
irungentoo
7afab000f7
tox_new now sets error to TOX_ERR_NEW_PORT_ALLOC when binding to port fails. 2015-03-12 13:03:14 -04:00
irungentoo
1eca7b8e67
Added simple status message test to tox_test.c 2015-03-12 12:18:52 -04:00
irungentoo
43fe6e71bd
tox_callback_connection_status() implemented.
Attempted fix of connection checking to make it more stable.
2015-03-11 15:37:25 -04:00
irungentoo
88a8a079b6
Implemented the 3 low level network information functions.
Added tox_get_udp_port() to tests.
2015-03-11 08:09:45 -04:00
irungentoo
0207fcdfb0
Implementation of new api file transfers.
Everything should work except resuming.
2015-03-10 17:31:50 -04:00
irungentoo
36c3a270fd
Properly fixed encryptsave_test.c 2015-03-01 20:31:55 -05:00
irungentoo
680c7c2ecd
Merge branch 'new_api' of https://github.com/dubslow/toxcore into new_api 2015-03-01 20:14:01 -05:00
Dubslow
2d3077904e
Update encryption autotest 2015-02-28 12:55:40 -06:00
irungentoo
d015879cd3
Test fixes. 2015-02-27 20:33:43 -05:00
irungentoo
e61e2919a9
More tests ported to new api. 2015-02-26 08:24:19 -05:00
irungentoo
76dfccf2d6
Ported some tests to the new api. 2015-02-25 21:09:14 -05:00
irungentoo
78ea33b3f0
Fixed test. 2015-02-08 17:34:49 -05:00
irungentoo
23d76f484a
Fixed memory leak in test. 2015-02-08 16:30:48 -05:00
irungentoo
d9ea6e9485
Properly free everything at the end of each test. 2015-02-07 22:57:04 -05:00
irungentoo
f463cb52a2
Code cleanups.
Rename array in Node_format from client_id to public_key.
2015-01-29 19:38:44 -05:00
irungentoo
dd59d99a7a
Fixed bug in tox_load where names of size TOX_MAX_NAME_LENGTH didn't
load.
2014-12-21 22:12:12 -05:00
irungentoo
d1eb793a9c
auto test group titles. 2014-12-20 23:12:43 -05:00
irungentoo
82ba83e526
cs_set_video_encoder_resolution improvements. 2014-12-16 13:10:28 -05:00
irungentoo
d6da08fe9d
Fixed test. 2014-12-15 19:04:56 -05:00
irungentoo
015a8b7d75
Sendback data size is always 8 bytes. 2014-12-14 20:33:31 -05:00
irungentoo
6f3312c137
More group auto testing. 2014-12-13 21:56:36 -05:00