Changes in uspace/lib/hound/src/client.c [33b8d024:cf13b17] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/client.c
r33b8d024 rcf13b17 76 76 hound_sess_t *session; 77 77 /** context name, reported to the daemon */ 78 c har *name;78 const char *name; 79 79 /** True if the instance is record context */ 80 80 bool record; … … 123 123 return NULL; 124 124 } 125 errno_t rc = hound_service_register_context( 126 new_context->session, new_context->name, record, 127 &new_context->id); 128 if (rc != EOK) { 125 new_context->id = hound_service_register_context( 126 new_context->session, new_context->name, record); 127 if (hound_context_id_err(new_context->id) != EOK) { 129 128 hound_service_disconnect(new_context->session); 130 129 free(new_context->name); … … 195 194 * The function will return deice sinks or source based on the context type. 196 195 */ 197 errno_t hound_context_get_available_targets(hound_context_t *hound,198 c har ***names, size_t *count)196 int hound_context_get_available_targets(hound_context_t *hound, 197 const char ***names, size_t *count) 199 198 { 200 199 assert(hound); … … 212 211 * @return Error code. 213 212 */ 214 errno_t hound_context_get_connected_targets(hound_context_t *hound,215 c har ***names, size_t *count)213 int hound_context_get_connected_targets(hound_context_t *hound, 214 const char ***names, size_t *count) 216 215 { 217 216 assert(hound); … … 232 231 * connect to the first possible target if it is passed this value. 233 232 */ 234 errno_t hound_context_connect_target(hound_context_t *hound, const char* target)233 int hound_context_connect_target(hound_context_t *hound, const char* target) 235 234 { 236 235 assert(hound); 237 236 assert(target); 238 237 239 c har **tgt = NULL;238 const char **tgt = NULL; 240 239 size_t count = 1; 241 errno_t ret = EOK;240 int ret = EOK; 242 241 if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) { 243 242 ret = hound_context_get_available_targets(hound, &tgt, &count); … … 269 268 * @return Error code. 270 269 */ 271 errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target)270 int hound_context_disconnect_target(hound_context_t *hound, const char* target) 272 271 { 273 272 assert(hound); … … 305 304 new_stream->context = hound; 306 305 new_stream->flags = flags; 307 const errno_t ret = hound_service_stream_enter(new_stream->exch,306 const int ret = hound_service_stream_enter(new_stream->exch, 308 307 hound->id, flags, format, bsize); 309 308 if (ret != EOK) { … … 343 342 * @return error code. 344 343 */ 345 errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size)344 int hound_stream_write(hound_stream_t *stream, const void *data, size_t size) 346 345 { 347 346 assert(stream); … … 358 357 * @return error code. 359 358 */ 360 errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size)359 int hound_stream_read(hound_stream_t *stream, void *data, size_t size) 361 360 { 362 361 assert(stream); … … 371 370 * @return Error code. 372 371 */ 373 errno_t hound_stream_drain(hound_stream_t *stream)372 int hound_stream_drain(hound_stream_t *stream) 374 373 { 375 374 assert(stream); … … 402 401 * @return error code. 403 402 */ 404 errno_t hound_write_main_stream(hound_context_t *hound,403 int hound_write_main_stream(hound_context_t *hound, 405 404 const void *data, size_t size) 406 405 { … … 422 421 * @return error code. 423 422 */ 424 errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size)423 int hound_read_main_stream(hound_context_t *hound, void *data, size_t size) 425 424 { 426 425 assert(hound); … … 442 441 * NOT IMPLEMENTED 443 442 */ 444 errno_t hound_write_replace_main_stream(hound_context_t *hound,443 int hound_write_replace_main_stream(hound_context_t *hound, 445 444 const void *data, size_t size) 446 445 { … … 460 459 * NOT IMPLEMENTED 461 460 */ 462 errno_t hound_context_set_main_stream_params(hound_context_t *hound,461 int hound_context_set_main_stream_params(hound_context_t *hound, 463 462 pcm_format_t format, size_t bsize) 464 463 { … … 479 478 * to drain and destroys it before returning. 480 479 */ 481 errno_t hound_write_immediate(hound_context_t *hound, pcm_format_t format,480 int hound_write_immediate(hound_context_t *hound, pcm_format_t format, 482 481 const void *data, size_t size) 483 482 { … … 488 487 if (!tmpstream) 489 488 return ENOMEM; 490 const errno_t ret = hound_stream_write(tmpstream, data, size);489 const int ret = hound_stream_write(tmpstream, data, size); 491 490 if (ret == EOK) { 492 491 //TODO drain?
Note:
See TracChangeset
for help on using the changeset viewer.