diff options
author | irungentoo <irungentoo@gmail.com> | 2013-09-05 17:02:23 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2013-09-05 17:02:23 -0400 |
commit | bb35305d944da1a387524fa33fe58ab6d8bc7ff2 (patch) | |
tree | 00bca358a1add65de6b866d91c8455506fcb0b2e /toxcore/net_crypto.h | |
parent | c78b2352ab26c0aba0da09db1a35432aeb1ca6b2 (diff) | |
parent | cc8a536cb07484396354c4880f3631666a1cf874 (diff) |
Merge branch 'group-chats'
Diffstat (limited to 'toxcore/net_crypto.h')
-rw-r--r-- | toxcore/net_crypto.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/toxcore/net_crypto.h b/toxcore/net_crypto.h index 030cc678..e5dfcae0 100644 --- a/toxcore/net_crypto.h +++ b/toxcore/net_crypto.h | |||
@@ -139,6 +139,12 @@ int write_cryptpacket(Net_Crypto *c, int crypt_connection_id, uint8_t *data, uin | |||
139 | int create_request(uint8_t *send_public_key, uint8_t *send_secret_key, uint8_t *packet, uint8_t *recv_public_key, | 139 | int create_request(uint8_t *send_public_key, uint8_t *send_secret_key, uint8_t *packet, uint8_t *recv_public_key, |
140 | uint8_t *data, uint32_t length, uint8_t request_id); | 140 | uint8_t *data, uint32_t length, uint8_t request_id); |
141 | 141 | ||
142 | /* puts the senders public key in the request in public_key, the data from the request | ||
143 | in data if a friend or ping request was sent to us and returns the length of the data. | ||
144 | packet is the request packet and length is its length | ||
145 | return -1 if not valid request. */ | ||
146 | int handle_request(uint8_t *self_public_key, uint8_t *self_secret_key, uint8_t *public_key, uint8_t *data, | ||
147 | uint8_t *request_id, uint8_t *packet, uint16_t length); | ||
142 | 148 | ||
143 | /* Function to call when request beginning with byte is received. */ | 149 | /* Function to call when request beginning with byte is received. */ |
144 | void cryptopacket_registerhandler(Net_Crypto *c, uint8_t byte, cryptopacket_handler_callback cb, void *object); | 150 | void cryptopacket_registerhandler(Net_Crypto *c, uint8_t byte, cryptopacket_handler_callback cb, void *object); |