summaryrefslogtreecommitdiff
path: root/toxcore/tox.h
AgeCommit message (Collapse)Author
2014-01-19proper windows preprocessor detectionBen Iofel
2013-12-24Added the shell of onion.{c, h}irungentoo
2013-12-21Added function to save an encrypted version of the messenger.irungentoo
Also added some tests.
2013-12-17Added simple test for tox.irungentoo
2013-12-13added groupchat actionsJfreegman
2013-12-10More API consistent fix.AZ Huang
2013-12-07Added/updated some basic docs and cleaned up some things.irungentoo
2013-12-06Merge branch 'master' into hardenirungentoo
2013-12-03fix naming inconsistency in tox.halexandervdm
2013-11-29Fix typo.AZ Huang
2013-11-29Fix API name consistency.AZ Huang
2013-11-29Should return 0 for tox_file_dataremaining since it returns unsignedAZ Huang
2013-11-29Fix return code inconsistency.AZ Huang
2013-11-27Various changes to nTox including a potential crash (also possible from ↵Coren[m]
remote!), and a tiny change to toxcore. Crash stuff: nTox.c: - do_refresh(): avoid crashes (input a "%" and the client goes "boom!", send someone a string with embedded "%" and see him blow up...) Other stuff: toxcore: tox.h (doc.)/network.c (code): - networking_wait_prepare(): return -1 if lenptr was NULL and therefore not settable nTox.c: - fraddr_to_str(): function to convert a TOX_FRIEND_ADDRESS into a segmented (and therefore line-breakable) string - print_friendlist(): print index of friend on name line, print id on 2nd line - command /f: skip spaces (and +) inside a friend id - command /r (new): "/r #" to remove a friend - main(): reduce cpu consumption if we're not currently sending files
2013-11-24group_namelistchange(): for ui reasons, divulge the peernumber and the ↵Coren[m]
nature of the change (add, del, name change). tox.*, Messenger.*, group_chats.*: - expand interface of callback by peernumber/change groupchats.c: - call callback in addpeer/delpeer/setnick with peernumber and flag nTox.c: - print_groupchatpeers(): print as many names on a line as possible, not one peer per line - print_groupnamelistchange(): only print the change, if possible (i.e. "new peer", "peer's new name") - added command "/p" to print the list of peers
2013-11-23Added callback that tells you when the peer name list of a group chat changes.irungentoo
2013-11-22Added function to get the number of peers and list of names for group chats.irungentoo
2013-11-18Fixed a few typos.Jman012
2013-11-18Added functions tox_count_chatlist and tox_copy_chatlist.Jman012
These functions are akin to the tox_count_friendlist and tox_copy_friendlist, made available on the public API.
2013-11-10Merge branch 'master' into hardenirungentoo
Conflicts: toxcore/DHT.c
2013-10-27Cleaned up some code/fixed some warnings.irungentoo
I'm sure nobody has any of the old save files anymore so I removed the functions.
2013-10-26Clarified a comment.irungentoo
2013-10-20Merge branch 'Cleanup-defines' of ↵irungentoo
https://github.com/FullName/ProjectTox-Core into FullName-Cleanup-defines
2013-10-20Main: Eliminate TOX_ENABLE_IPV6 (then always on), CLIENT_ONETOONE_IP (then ↵Coren[m]
always off). Additionally (besides cleanups): network.h/tox.h: - WIN32: fix a strange sa_family_t definition - WIN32: define EWOULDBLOCK to WSAEWOULDBLOCK - WIN32: kill macro for an existing function (IN6_ADDR_EQUAL) network.c: - use EWOULDBLOCK instead of EAGAIN (same value, but EWOULDBLOCK is more "popular") - new_networking(): only try to enable IPv4-in-IPv6 if it's not already enabled per default - inet_ntop()/inet_pton(): WIN32: remove partial initializers in favor of a simple memset() - ip_equal(): WIN32: use an existing function - logging: networking_wait_execute(): only dump result if not timeout - logging: loglogdata(): kill an unused variable LAN_discovery.c: - send_broadcasts(): re-enabled, can only support IPv4 by principle, split into fetch_broadcast_info() (to fetch the addresses once) and send_broadcasts() (actual sending) DHT.c: - DHT_load_state_callback(): enclosed a fprintf(stderr, ...) into #ifdef DEBUG Lossless_UDP.c: - change_handshake(): harden against strange sa_family_t definitions Messenger.c: - logging: fix ID to string conversion util.c: - logging: eliminate a signed-warning
2013-10-18Removed bad function from public API (This breaks toxic.)irungentoo
2013-10-15Updated public api.irungentoo
2013-10-10Added message ids to action messagesMaxim Biro
2013-10-08Added function to get the piece size for sending files.irungentoo
2013-10-06Merge remote-tracking branch 'upstream/master' into wait: replace void *tox ↵Coren[m]
with Tox *tox in tox.c (which now includes the declarations from tox.h)
2013-10-06sendqueue_length no longer determines if we check for socket-can-write, but ↵Coren[m]
sendpacket() sets a timestamp if it happened network.*: - sendpacket(): checks result and on EAGAIN, stores time of this event - networking_wait_prepare(): uses the time if set to check up to 500ms later for the socket to be writeable again - networking_wait_cleanup(): clears the time if the socket was writeable - fixed some accidental tabs Messenger.*, tox.*: - pass-through functions to reach networking_wait_cleanup() - fixed some accidental tabs
2013-10-05Broken *_wait() into *_wait_prepare() and *_wait_execute()Coren[m]
To allow the actual waiting to run without any locking, split it into preparing the data it uses and the execution of the wait. The caller must provide with the buffer to store whatever data it requires to wait. Completely eliminates any reliance on the existence of anything but that data in the actual wait routine. Also fixed a few argument type warnings inside LOGGING.
2013-10-02File sending added to public api.irungentoo
2013-10-02Add tox_wait() for socket, allow tox.h include in tox.cCoren[m]
tox.*, Messenger.*, network.*; - new function tox_wait() => waitMessenger() => networking_wait(): - waits for a given amount of time for any sort of socket activity - mustn't change anything inside, mustn't poll or do other stuff - the point is to be able to call this asynchronously from a second thread - the outside shall follow up with an immediate tox_do() when there's socket activity tox.*: - allow inclusion of tox.h into tox.c, ensuring that the outside interface and the internal always match util.c: - squished a few warnings about questionable format strings
2013-09-24Fixed windows build.irungentoo
2013-09-23made setfriendname part of public apiJfreegman
2013-09-22Keep the code consistent.irungentoo
2013-09-21Change tox_get_friendlist API.Sebastian Stal
tox_get_friendlist() -> tox_copy_friendlist(). You now have to allocate your own memory to pass into tox_copy_friendlist. To help with this, tox_count_friendlist() has been added to get the length of the friend list.
2013-09-17astyled everything.irungentoo
2013-09-16Functions to get name of peer in group chat added.irungentoo
Group message callback modified.
2013-09-15Fixed portablity problems.irungentoo
struct in6_addr member names can differ per platform.
2013-09-14astyled everything.irungentoo
2013-09-13Merge remote-tracking branch 'upstream/master' into IntegrationCoren[m]
2013-09-13TOX_ENABLE_IPV6 is now #define'd per default. Added some logging and error ↵Coren[m]
messages.
2013-09-12Put group chat functions in the public API.irungentoo
Group chats are not complete, they seem to work very well though. This means that the functions will change.
2013-09-12tox.h:Coren[m]
- #define'd tox's network port (as range) - finally killed tox_new_ex() in favor of changing tox_new()'s signature - renamed tox_bootstrap() to tox_bootstrap_from_ip() network.h: - #define'd tox's network port (as range) - renamed SEND_NODES_EX to SEND_NODES_IPV6 - bind() loop uses #define'd port range DHT.c: - renamed SEND_NODES_EX to SEND_NODES_IPV6 - sending ipv6 node addresses even if can't use them ourselves nTox.c: - adapted to changed tox_new()
2013-09-11tox.h, DHT.h:Coren[m]
- tox_bootstrap_ex(), DHT_bootstrap_ex() renamed to tox_bootstrap_from_address(), DHT_bootstrap_from_address() - (handle_)sendnodes_ex() renamed to (handle_)sendnodes_ipv6() - only sending sendnodes_ipv6() if we're actually IPv6 enabled - changed comments to conform better nTox.c, Messenger_text.c, DHT_test.c, DHT_bootstrap.c: - fallout from *_ex() to *_from_address() DHT_bootstrap.c: - corrected a potentially wrong info message util.c: - fixed logfile name: now (funcptr) => now() (number) network.c: - addead comment about the necessity of bind() to succeed auto_test/messenger_test.c: - defaulting ipv6enabled to TOX_ENABLE_IPV6_DEFAULT LAN_discovery.c: - slight cleanup and comments for clarity
2013-09-10tox.*, DHT.*:Coren[m]
- return to the caller if the string could be resolved into an IP other/DHT_bootstrap.c, testing/*_test.c, testing/nTox.c: - parse cmdline for --ipv4/--ipv6 switch to allow user a choice util.h: - proper old-style C-comment
2013-09-10util.*:Coren[m]
- added logging functions, default off tox.h: - added includes for sockaddr_in/6 network.c: - added logging functions, default off (#define in util.h) - IPv6: activating site-local all-nodes multicast address (i.e. IPv6 equivalent of broadcast)
2013-09-10big push, putting all the infrastructure in place behind TOX_ENABLE_IPV6Coren[m]
2013-09-09tox.*, Messenger.*:Coren[m]
- initialisation: argument added to enable/disable ipv6 as socket Messenger_test.c: - initialisation: ipv4 hardcoded for now - delegating IP resolution to DHT_bootstrap_ex()