Changeset 059490c2 in mainline for uspace/lib/hound/src/client.c


Ignore:
Timestamp:
2013-03-17T13:57:57Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
504f1ea3
Parents:
fe0b448
Message:

libhound: Add protocol header

File:
1 edited

Legend:

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

    rfe0b448 r059490c2  
    4343
    4444#include "client.h"
    45 #include "server.h"
    46 
    47 static const char *HOUND_SERVICE = "audio/hound";
     45#include "protocol.h"
    4846
    4947/***
     
    5755
    5856typedef struct hound_context {
    59         async_sess_t *session;
     57        hound_sess_t *session;
    6058        const char *name;
    6159        bool record;
     
    7169} hound_context_t;
    7270
    73 async_sess_t *hound_get_session(void)
    74 {
    75         service_id_t id = 0;
    76         const int ret =
    77             loc_service_get_id(HOUND_SERVICE, &id, IPC_FLAG_BLOCKING);
    78         if (ret != EOK)
    79                 return NULL;
    80         return loc_service_connect(EXCHANGE_SERIALIZE, id, IPC_FLAG_BLOCKING);
    81 }
    82 
    83 void hound_release_session(async_sess_t *sess)
    84 {
    85         if (sess)
    86                 async_hangup(sess);
    87 }
    8871
    8972static hound_context_t *hound_context_create(const char *name, bool record,
     
    10184                new_context->name = cont_name;
    10285                new_context->record = record;
    103                 new_context->session = hound_get_session();
     86                new_context->session = hound_service_connect(HOUND_SERVICE);
    10487                new_context->main_stream = NULL;
    10588                new_context->main_format.sample = format;
Note: See TracChangeset for help on using the changeset viewer.