Commit Graph

3588 Commits

Author SHA1 Message Date
irungentoo
6454552de8 tox.h comment fix. 2015-03-23 19:05:05 -04:00
mannol
96ca88a0d6 Make it possible to change channels/sample rate of the decoder 2015-03-23 23:38:04 +01:00
mannol
995bddbc26 Audio works in test 2015-03-23 22:22:17 +01:00
irungentoo
12c7c9130f
Changed the share relay packet id. 2015-03-23 17:05:35 -04:00
irungentoo
3fab804098
Merge branch 'new_api' 2015-03-23 16:57:34 -04:00
irungentoo
47d1c1db7e
Added some more checks for file packets. 2015-03-23 16:56:56 -04:00
irungentoo
8aaddd729c
Merge branch 'anuragagarwal561994-documentation-error' into new_api 2015-03-22 19:57:05 -04:00
mannol
62af82705a Some progress 2015-03-22 23:50:43 +01:00
Anurag Agarwal
4c664fd07a Fixes #1298 2015-03-22 20:36:44 +05:30
Anurag Agarwal
19d2f4db98 Fixes #1297 2015-03-22 20:26:21 +05:30
Anurag Agarwal
79cbad38d0 Fixes #1296 2015-03-22 20:18:47 +05:30
mannol
a4fae8ffd4 Started testing transfer 2015-03-22 00:22:40 +01: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
mannol
4f76a8c89e Updating with master 2015-03-20 19:07:23 +01:00
irungentoo
8c18dd42a7
Fix build warning. 2015-03-19 18:17:27 -04:00
irungentoo
2b2c9f37a6
Fixed group audio issues when getting an old audio packet. 2015-03-19 18:02:46 -04:00
irungentoo
4d242231a8
Merge branch 'dubslow-two_more_rename' into new_api 2015-03-19 17:17:24 -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
dc60d98ff1
Removed TOX_USER_STATUS_INVALID. 2015-03-18 15:47:09 -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
b9e747fd50
When friend goes offline all his file transfers get removed.
This is now documented in the API.

Ported programs in testing/ to this behaviour.
2015-03-18 14:39:52 -04: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
ad87dbb470
Kill all file transfers associated with the friend when friend goes
offline.
2015-03-17 17:23:47 -04:00
irungentoo
0beaa2fdb4
Renamed SEND_FAILED to SENDQ. 2015-03-17 17:13:25 -04:00
irungentoo
8286c2c22f
Save function renamed to tox_get_savedata() 2015-03-17 16:20:38 -04:00
irungentoo
67f6d0857a
Make sure some defines in the public api are always correct.
Make sure some assumptions are always correct.
2015-03-17 16:02:46 -04:00
irungentoo
e778bfb42f
Changed INVALID_LENGTH to TOO_LONG. 2015-03-17 16:00:03 -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
e072079620
Allow file names to be of length 0.
Pointer in callback will be NULL if length is 0.
2015-03-17 13:47:09 -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
irungentoo
2757b254fe
Merge branch 'iphydf-new_api' into new_api 2015-03-16 09:26:05 -04:00
iphydf
fa7c21f95c New API fixups. 2015-03-16 13:12:25 +00:00
irungentoo
08585e5b60
Merge branch 'new_api_patch' of https://github.com/Impyy/toxcore into new_api 2015-03-15 18:41:00 -04:00
irungentoo
ec659491b2
Avatar hash is now the filename of the file transfer instead of the
first 32 bytes.

Enforce length of filename in core when transfer is an avatar type
transfer to make things more safe.
2015-03-15 18:35:22 -04:00
Impyy
409897f7ae Initialize Tox_Options with default values in tox_options_new 2015-03-15 12:47:59 +01:00
irungentoo
518a399eb0
There are many scenarios where the user would want to modify the
contents pointed by proxy_address.
2015-03-14 13:35:50 -04:00
irungentoo
fab2daf57a
Install tox_old.h too. 2015-03-14 10:54:42 -04:00
irungentoo
6cf7270638
Make nTox save on exit. 2015-03-14 10:05:39 -04:00
irungentoo
a1127e63d5
Better DHT distance function. 2015-03-14 10:03:19 -04:00
irungentoo
11e8e8bd3a
When link can't send packets anymore, stop the request chunk callback.
Removed time variable in packet struct and replaced it with sent
variable.
2015-03-13 16:51:41 -04:00
irungentoo
29857a3da4
This belongs in the previous commit. 2015-03-13 16:33:55 -04:00
irungentoo
c3e07b73d3
Remove TOX_FILE_KIND typedef. 2015-03-13 15:38:44 -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