diff options
Diffstat (limited to 'toxcore/Messenger.h')
-rw-r--r-- | toxcore/Messenger.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 3851edf7..a9931d1f 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h | |||
@@ -191,7 +191,7 @@ enum { | |||
191 | typedef struct Messenger Messenger; | 191 | typedef struct Messenger Messenger; |
192 | 192 | ||
193 | typedef struct { | 193 | typedef struct { |
194 | uint8_t client_id[crypto_box_PUBLICKEYBYTES]; | 194 | uint8_t real_pk[crypto_box_PUBLICKEYBYTES]; |
195 | int friendcon_id; | 195 | int friendcon_id; |
196 | 196 | ||
197 | uint64_t friendrequest_lastsent; // Time at which the last friend request was sent. | 197 | uint64_t friendrequest_lastsent; // Time at which the last friend request was sent. |
@@ -313,7 +313,7 @@ struct Messenger { | |||
313 | Messenger_Options options; | 313 | Messenger_Options options; |
314 | }; | 314 | }; |
315 | 315 | ||
316 | /* Format: [client_id (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] | 316 | /* Format: [real_pk (32 bytes)][nospam number (4 bytes)][checksum (2 bytes)] |
317 | * | 317 | * |
318 | * return FRIEND_ADDRESS_SIZE byte address to give to others. | 318 | * return FRIEND_ADDRESS_SIZE byte address to give to others. |
319 | */ | 319 | */ |
@@ -342,20 +342,20 @@ int32_t m_addfriend(Messenger *m, const uint8_t *address, const uint8_t *data, u | |||
342 | * return the friend number if success. | 342 | * return the friend number if success. |
343 | * return -1 if failure. | 343 | * return -1 if failure. |
344 | */ | 344 | */ |
345 | int32_t m_addfriend_norequest(Messenger *m, const uint8_t *client_id); | 345 | int32_t m_addfriend_norequest(Messenger *m, const uint8_t *real_pk); |
346 | 346 | ||
347 | /* return the friend number associated to that client id. | 347 | /* return the friend number associated to that client id. |
348 | * return -1 if no such friend. | 348 | * return -1 if no such friend. |
349 | */ | 349 | */ |
350 | int32_t getfriend_id(const Messenger *m, const uint8_t *client_id); | 350 | int32_t getfriend_id(const Messenger *m, const uint8_t *real_pk); |
351 | 351 | ||
352 | /* Copies the public key associated to that friend id into client_id buffer. | 352 | /* Copies the public key associated to that friend id into real_pk buffer. |
353 | * Make sure that client_id is of size CLIENT_ID_SIZE. | 353 | * Make sure that real_pk is of size crypto_box_PUBLICKEYBYTES. |
354 | * | 354 | * |
355 | * return 0 if success | 355 | * return 0 if success |
356 | * return -1 if failure | 356 | * return -1 if failure |
357 | */ | 357 | */ |
358 | int getclient_id(const Messenger *m, int32_t friendnumber, uint8_t *client_id); | 358 | int get_real_pk(const Messenger *m, int32_t friendnumber, uint8_t *real_pk); |
359 | 359 | ||
360 | /* return friend connection id on success. | 360 | /* return friend connection id on success. |
361 | * return -1 if failure. | 361 | * return -1 if failure. |