diff options
author | Marc Schütz <schuetzm@gmx.net> | 2014-06-10 20:54:48 +0200 |
---|---|---|
committer | Marc Schütz <schuetzm@gmx.net> | 2014-06-10 20:54:48 +0200 |
commit | 99d594014014a37fdee9e83575a8895400c9cd60 (patch) | |
tree | 55152fcfb850511b17ae2af9c77bf30778b465d2 /toxcore/onion_client.h | |
parent | 8bdf487d199b82db85883b613e86deeba15f9b32 (diff) |
Const correctness in various interdependent files
Diffstat (limited to 'toxcore/onion_client.h')
-rw-r--r-- | toxcore/onion_client.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/toxcore/onion_client.h b/toxcore/onion_client.h index 9cf6cf3e..7995fa3a 100644 --- a/toxcore/onion_client.h +++ b/toxcore/onion_client.h | |||
@@ -102,7 +102,7 @@ typedef struct { | |||
102 | uint32_t tcp_relay_node_callback_number; | 102 | uint32_t tcp_relay_node_callback_number; |
103 | } Onion_Friend; | 103 | } Onion_Friend; |
104 | 104 | ||
105 | typedef int (*oniondata_handler_callback)(void *object, uint8_t *source_pubkey, uint8_t *data, uint32_t len); | 105 | typedef int (*oniondata_handler_callback)(void *object, const uint8_t *source_pubkey, const uint8_t *data, uint32_t len); |
106 | 106 | ||
107 | typedef struct { | 107 | typedef struct { |
108 | DHT *dht; | 108 | DHT *dht; |
@@ -136,14 +136,14 @@ typedef struct { | |||
136 | * return -1 on failure. | 136 | * return -1 on failure. |
137 | * return the friend number on success or if the friend was already added. | 137 | * return the friend number on success or if the friend was already added. |
138 | */ | 138 | */ |
139 | int onion_friend_num(Onion_Client *onion_c, uint8_t *client_id); | 139 | int onion_friend_num(const Onion_Client *onion_c, const uint8_t *client_id); |
140 | 140 | ||
141 | /* Add a friend who we want to connect to. | 141 | /* Add a friend who we want to connect to. |
142 | * | 142 | * |
143 | * return -1 on failure. | 143 | * return -1 on failure. |
144 | * return the friend number on success. | 144 | * return the friend number on success. |
145 | */ | 145 | */ |
146 | int onion_addfriend(Onion_Client *onion_c, uint8_t *client_id); | 146 | int onion_addfriend(Onion_Client *onion_c, const uint8_t *client_id); |
147 | 147 | ||
148 | /* Delete a friend. | 148 | /* Delete a friend. |
149 | * | 149 | * |
@@ -190,7 +190,7 @@ int recv_tcp_relay_handler(Onion_Client *onion_c, int friend_num, int (*tcp_rela | |||
190 | * return -1 on failure. | 190 | * return -1 on failure. |
191 | * return 0 on success. | 191 | * return 0 on success. |
192 | */ | 192 | */ |
193 | int onion_set_friend_DHT_pubkey(Onion_Client *onion_c, int friend_num, uint8_t *dht_key, uint64_t timestamp); | 193 | int onion_set_friend_DHT_pubkey(Onion_Client *onion_c, int friend_num, const uint8_t *dht_key, uint64_t timestamp); |
194 | 194 | ||
195 | /* Copy friends DHT public key into dht_key. | 195 | /* Copy friends DHT public key into dht_key. |
196 | * | 196 | * |