Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/src/client.c

    r33b8d024 rcf13b17  
    7676        hound_sess_t *session;
    7777        /** context name, reported to the daemon */
    78         char *name;
     78        const char *name;
    7979        /** True if the instance is record context */
    8080        bool record;
     
    123123                        return NULL;
    124124                }
    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) {
    129128                        hound_service_disconnect(new_context->session);
    130129                        free(new_context->name);
     
    195194 * The function will return deice sinks or source based on the context type.
    196195 */
    197 errno_t hound_context_get_available_targets(hound_context_t *hound,
    198     char ***names, size_t *count)
     196int hound_context_get_available_targets(hound_context_t *hound,
     197    const char ***names, size_t *count)
    199198{
    200199        assert(hound);
     
    212211 * @return Error code.
    213212 */
    214 errno_t hound_context_get_connected_targets(hound_context_t *hound,
    215     char ***names, size_t *count)
     213int hound_context_get_connected_targets(hound_context_t *hound,
     214    const char ***names, size_t *count)
    216215{
    217216        assert(hound);
     
    232231 * connect to the first possible target if it is passed this value.
    233232 */
    234 errno_t hound_context_connect_target(hound_context_t *hound, const char* target)
     233int hound_context_connect_target(hound_context_t *hound, const char* target)
    235234{
    236235        assert(hound);
    237236        assert(target);
    238237
    239         char **tgt = NULL;
     238        const char **tgt = NULL;
    240239        size_t count = 1;
    241         errno_t ret = EOK;
     240        int ret = EOK;
    242241        if (str_cmp(target, HOUND_DEFAULT_TARGET) == 0) {
    243242                ret = hound_context_get_available_targets(hound, &tgt, &count);
     
    269268 * @return Error code.
    270269 */
    271 errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target)
     270int hound_context_disconnect_target(hound_context_t *hound, const char* target)
    272271{
    273272        assert(hound);
     
    305304                new_stream->context = hound;
    306305                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,
    308307                    hound->id, flags, format, bsize);
    309308                if (ret != EOK) {
     
    343342 * @return error code.
    344343 */
    345 errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size)
     344int hound_stream_write(hound_stream_t *stream, const void *data, size_t size)
    346345{
    347346        assert(stream);
     
    358357 * @return error code.
    359358 */
    360 errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size)
     359int hound_stream_read(hound_stream_t *stream, void *data, size_t size)
    361360{
    362361        assert(stream);
     
    371370 * @return Error code.
    372371 */
    373 errno_t hound_stream_drain(hound_stream_t *stream)
     372int hound_stream_drain(hound_stream_t *stream)
    374373{
    375374        assert(stream);
     
    402401 * @return error code.
    403402 */
    404 errno_t hound_write_main_stream(hound_context_t *hound,
     403int hound_write_main_stream(hound_context_t *hound,
    405404    const void *data, size_t size)
    406405{
     
    422421 * @return error code.
    423422 */
    424 errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size)
     423int hound_read_main_stream(hound_context_t *hound, void *data, size_t size)
    425424{
    426425        assert(hound);
     
    442441 * NOT IMPLEMENTED
    443442 */
    444 errno_t hound_write_replace_main_stream(hound_context_t *hound,
     443int hound_write_replace_main_stream(hound_context_t *hound,
    445444    const void *data, size_t size)
    446445{
     
    460459 * NOT IMPLEMENTED
    461460 */
    462 errno_t hound_context_set_main_stream_params(hound_context_t *hound,
     461int hound_context_set_main_stream_params(hound_context_t *hound,
    463462    pcm_format_t format, size_t bsize)
    464463{
     
    479478 * to drain and destroys it before returning.
    480479 */
    481 errno_t hound_write_immediate(hound_context_t *hound, pcm_format_t format,
     480int hound_write_immediate(hound_context_t *hound, pcm_format_t format,
    482481    const void *data, size_t size)
    483482{
     
    488487        if (!tmpstream)
    489488                return ENOMEM;
    490         const errno_t ret = hound_stream_write(tmpstream, data, size);
     489        const int ret = hound_stream_write(tmpstream, data, size);
    491490        if (ret == EOK) {
    492491                //TODO drain?
Note: See TracChangeset for help on using the changeset viewer.