Changeset 46577995 in mainline for uspace/lib/hound/src/client.c
- Timestamp:
- 2018-01-04T20:50:52Z (7 years ago)
- Children:
- e211ea04
- Parents:
- facacc71
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:47:53)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-01-04 20:50:52)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/client.c
rfacacc71 r46577995 123 123 return NULL; 124 124 } 125 int rc = hound_service_register_context(125 errno_t rc = hound_service_register_context( 126 126 new_context->session, new_context->name, record, 127 127 &new_context->id); … … 195 195 * The function will return deice sinks or source based on the context type. 196 196 */ 197 int hound_context_get_available_targets(hound_context_t *hound,197 errno_t hound_context_get_available_targets(hound_context_t *hound, 198 198 const char ***names, size_t *count) 199 199 { … … 212 212 * @return Error code. 213 213 */ 214 int hound_context_get_connected_targets(hound_context_t *hound,214 errno_t hound_context_get_connected_targets(hound_context_t *hound, 215 215 const char ***names, size_t *count) 216 216 { … … 232 232 * connect to the first possible target if it is passed this value. 233 233 */ 234 int hound_context_connect_target(hound_context_t *hound, const char* target)234 errno_t hound_context_connect_target(hound_context_t *hound, const char* target) 235 235 { 236 236 assert(hound); … … 239 239 const char **tgt = NULL; 240 240 size_t count = 1; 241 int ret = EOK;241 errno_t ret = EOK; 242 242 if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) { 243 243 ret = hound_context_get_available_targets(hound, &tgt, &count); … … 269 269 * @return Error code. 270 270 */ 271 int hound_context_disconnect_target(hound_context_t *hound, const char* target)271 errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target) 272 272 { 273 273 assert(hound); … … 305 305 new_stream->context = hound; 306 306 new_stream->flags = flags; 307 const int ret = hound_service_stream_enter(new_stream->exch,307 const errno_t ret = hound_service_stream_enter(new_stream->exch, 308 308 hound->id, flags, format, bsize); 309 309 if (ret != EOK) { … … 343 343 * @return error code. 344 344 */ 345 int hound_stream_write(hound_stream_t *stream, const void *data, size_t size)345 errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size) 346 346 { 347 347 assert(stream); … … 358 358 * @return error code. 359 359 */ 360 int hound_stream_read(hound_stream_t *stream, void *data, size_t size)360 errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size) 361 361 { 362 362 assert(stream); … … 371 371 * @return Error code. 372 372 */ 373 int hound_stream_drain(hound_stream_t *stream)373 errno_t hound_stream_drain(hound_stream_t *stream) 374 374 { 375 375 assert(stream); … … 402 402 * @return error code. 403 403 */ 404 int hound_write_main_stream(hound_context_t *hound,404 errno_t hound_write_main_stream(hound_context_t *hound, 405 405 const void *data, size_t size) 406 406 { … … 422 422 * @return error code. 423 423 */ 424 int hound_read_main_stream(hound_context_t *hound, void *data, size_t size)424 errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size) 425 425 { 426 426 assert(hound); … … 442 442 * NOT IMPLEMENTED 443 443 */ 444 int hound_write_replace_main_stream(hound_context_t *hound,444 errno_t hound_write_replace_main_stream(hound_context_t *hound, 445 445 const void *data, size_t size) 446 446 { … … 460 460 * NOT IMPLEMENTED 461 461 */ 462 int hound_context_set_main_stream_params(hound_context_t *hound,462 errno_t hound_context_set_main_stream_params(hound_context_t *hound, 463 463 pcm_format_t format, size_t bsize) 464 464 { … … 479 479 * to drain and destroys it before returning. 480 480 */ 481 int hound_write_immediate(hound_context_t *hound, pcm_format_t format,481 errno_t hound_write_immediate(hound_context_t *hound, pcm_format_t format, 482 482 const void *data, size_t size) 483 483 { … … 488 488 if (!tmpstream) 489 489 return ENOMEM; 490 const int ret = hound_stream_write(tmpstream, data, size);490 const errno_t ret = hound_stream_write(tmpstream, data, size); 491 491 if (ret == EOK) { 492 492 //TODO drain?
Note:
See TracChangeset
for help on using the changeset viewer.