vncserver.hh (11168:f98eb2da15a4) vncserver.hh (12020:9f290c45493f)
1/*
2 * Copyright (c) 2010, 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 202 unchanged lines hidden (view full) ---

211 /** Send an error message to the client
212 * @param error_msg text to send describing the error
213 */
214 void sendError(const char* error_msg);
215
216 /** Read some data from the client
217 * @param buf the data to read
218 * @param len the amount of data to read
1/*
2 * Copyright (c) 2010, 2015 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 202 unchanged lines hidden (view full) ---

211 /** Send an error message to the client
212 * @param error_msg text to send describing the error
213 */
214 void sendError(const char* error_msg);
215
216 /** Read some data from the client
217 * @param buf the data to read
218 * @param len the amount of data to read
219 * @return length read
219 * @return whether the read was successful
220 */
220 */
221 size_t read(uint8_t *buf, size_t len);
221 bool read(uint8_t *buf, size_t len);
222
223 /** Read len -1 bytes from the client into the buffer provided + 1
224 * assert that we read enough bytes. This function exists to handle
225 * reading all of the protocol structs above when we've already read
226 * the first byte which describes which one we're reading
227 * @param buf the address of the buffer to add one to and read data into
228 * @param len the amount of data + 1 to read
222
223 /** Read len -1 bytes from the client into the buffer provided + 1
224 * assert that we read enough bytes. This function exists to handle
225 * reading all of the protocol structs above when we've already read
226 * the first byte which describes which one we're reading
227 * @param buf the address of the buffer to add one to and read data into
228 * @param len the amount of data + 1 to read
229 * @return length read
229 * @return whether the read was successful.
230 */
230 */
231 size_t read1(uint8_t *buf, size_t len);
231 bool read1(uint8_t *buf, size_t len);
232
233
234 /** Templated version of the read function above to
235 * read simple data to the client
236 * @param val data to recv from the client
237 */
232
233
234 /** Templated version of the read function above to
235 * read simple data to the client
236 * @param val data to recv from the client
237 */
238 template <typename T> size_t read(T* val);
238 template <typename T> bool read(T* val);
239
240
241 /** Write a buffer to the client.
242 * @param buf buffer to send
243 * @param len length of the buffer
239
240
241 /** Write a buffer to the client.
242 * @param buf buffer to send
243 * @param len length of the buffer
244 * @return number of bytes sent
244 * @return whether the write was successful
245 */
245 */
246 size_t write(const uint8_t *buf, size_t len);
246 bool write(const uint8_t *buf, size_t len);
247
248 /** Templated version of the write function above to
249 * write simple data to the client
250 * @param val data to send to the client
251 */
247
248 /** Templated version of the write function above to
249 * write simple data to the client
250 * @param val data to send to the client
251 */
252 template <typename T> size_t write(T* val);
252 template <typename T> bool write(T* val);
253
254 /** Send a string to the client
255 * @param str string to transmit
256 */
253
254 /** Send a string to the client
255 * @param str string to transmit
256 */
257 size_t write(const char* str);
257 bool write(const char* str);
258
259 /** Check the client's protocol verion for compatibility and send
260 * the security types we support
261 */
262 void checkProtocolVersion();
263
264 /** Check that the security exchange was successful
265 */

--- 49 unchanged lines hidden ---
258
259 /** Check the client's protocol verion for compatibility and send
260 * the security types we support
261 */
262 void checkProtocolVersion();
263
264 /** Check that the security exchange was successful
265 */

--- 49 unchanged lines hidden ---