Fork us on GitHub Follow us on Facebook Follow us on Twitter

Changeset 504f1ea3 in mainline for uspace/lib/hound/src/protocol.c


Ignore:
Timestamp:
2013-03-17T16:23:08Z (9 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master
Children:
9e1800c
Parents:
059490c2
Message:

libhound: Add client side protocol skeleton

File:
1 edited

Legend:

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

    r059490c2 r504f1ea3  
    4646#include "server.h"
    4747
     48enum ipc_methods {
     49        IPC_M_HOUND_CONTEXT_REGISTER = IPC_FIRST_USER_METHOD,
     50        IPC_M_HOUND_CONTEXT_UNREGISTER,
     51        IPC_M_HOUND_STREAM_START,
     52        IPC_M_HOUND_STREAM_STOP,
     53        IPC_M_HOUND_STREAM_DRAIN,
     54        IPC_M_HOUND_STREAM_WRITE,
     55        IPC_M_HOUND_STREAM_READ,
     56};
     57
    4858const char *HOUND_SERVICE = "audio/hound";
    4959
     
    6373                async_hangup(sess);
    6474}
     75
     76hound_context_id_t hound_service_register_context(hound_sess_t *sess,
     77    const char *name)
     78{
     79        assert(sess);
     80        assert(name);
     81        async_exch_t *exch = async_exchange_begin(sess);
     82        const int ret =
     83            async_req_1_0(exch, IPC_M_HOUND_CONTEXT_REGISTER, str_size(name));
     84        //TODO send the string
     85        async_exchange_end(exch);
     86        return ret;
     87}
     88
     89int hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id)
     90{
     91        assert(sess);
     92        async_exch_t *exch = async_exchange_begin(sess);
     93        const int ret =
     94            async_req_1_0(exch, IPC_M_HOUND_CONTEXT_UNREGISTER, id);
     95        async_exchange_end(exch);
     96        return ret;
     97}
     98
     99int hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
     100    int flags, pcm_format_t format, size_t bsize)
     101{
     102        return ENOTSUP;
     103}
     104
     105int hound_service_stream_exit(async_exch_t *exch)
     106{
     107        return ENOTSUP;
     108}
     109
     110int hound_service_stream_drain(async_exch_t *exch)
     111{
     112        return ENOTSUP;
     113}
     114
     115int hound_service_stream_write(async_exch_t *exch, const void *data, size_t size)
     116{
     117        return ENOTSUP;
     118}
     119
     120int hound_service_stream_read(async_exch_t *exch, void *data, size_t size)
     121{
     122        return ENOTSUP;
     123}
     124
    65125
    66126/***
Note: See TracChangeset for help on using the changeset viewer.