mirror of
https://github.com/irungentoo/toxcore.git
synced 2024-03-22 13:30:51 +08:00
renamed getname to getfriendname and added a getname function to get the name of our client
This commit is contained in:
parent
d503941f6c
commit
12b19f6910
|
@ -234,12 +234,18 @@ int setname(uint8_t * name, uint16_t length)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int getname(uint8_t *name)
|
||||
{
|
||||
memcpy(name, self_name, sizeof(self_name));
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* get name of friendnumber
|
||||
put it in name
|
||||
name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH bytes.
|
||||
return 0 if success
|
||||
return -1 if failure */
|
||||
int getname(int friendnumber, uint8_t * name)
|
||||
int getfriendname(int friendnumber, uint8_t * name)
|
||||
{
|
||||
if (friendnumber >= numfriends || friendnumber < 0)
|
||||
return -1;
|
||||
|
|
|
@ -92,12 +92,16 @@ int m_sendmessage(int friendnumber, uint8_t *message, uint32_t length);
|
|||
return -1 if failure */
|
||||
int setname(uint8_t *name, uint16_t length);
|
||||
|
||||
/* Get our own nickname
|
||||
Set's name to the our own nickname */
|
||||
int getname(uint8_t *name);
|
||||
|
||||
/* get name of friendnumber
|
||||
put it in name
|
||||
name needs to be a valid memory location with a size of at least MAX_NAME_LENGTH (128) bytes.
|
||||
return 0 if success
|
||||
return -1 if failure */
|
||||
int getname(int friendnumber, uint8_t *name);
|
||||
int getfriendname(int friendnumber, uint8_t *name);
|
||||
|
||||
/* set our user status
|
||||
you are responsible for freeing status after
|
||||
|
|
Loading…
Reference in New Issue
Block a user