Changeset 13318d1 in mainline for uspace/lib/hound/include


Ignore:
Timestamp:
2013-03-24T03:44:11Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
7294b5b
Parents:
fd7c98b
Message:

libhound: Implement client side connection controls

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/hound/include/hound/protocol.h

    rfd7c98b r13318d1  
    4242const char *HOUND_SERVICE;
    4343
     44enum {
     45        HOUND_SINK_APPS = 0x1,
     46        HOUND_SINK_DEVS = 0x2,
     47        HOUND_SOURCE_APPS = 0x4,
     48        HOUND_SOURCE_DEVS = 0x8,
     49        HOUND_CONNECTED = 0x10,
     50
     51        HOUND_STREAM_DRAIN_ON_EXIT = 0x1,
     52        HOUND_STREAM_IGNORE_UNDERFLOW = 0x2,
     53        HOUND_STREAM_IGNORE_OVERFLOW = 0x4,
     54};
     55
    4456typedef async_sess_t hound_sess_t;
    4557typedef int hound_context_id_t;
     58
     59static inline int hound_context_id_err(hound_context_id_t id)
     60{
     61        return id > 0 ? EOK : (id == 0 ? ENOENT : id);
     62}
    4663
    4764hound_sess_t *hound_service_connect(const char *service);
     
    5168    const char *name, bool record);
    5269int hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);
     70
     71int hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,
     72    int flags, const char *connection);
     73static inline int hound_service_get_list_all(hound_sess_t *sess,
     74    const char ***ids, size_t *count, int flags)
     75{
     76        return hound_service_get_list(sess, ids, count, flags, NULL);
     77}
     78
     79int hound_service_connect_source_sink(hound_sess_t *sess, const char *source,
     80    const char *sink);
     81int hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,
     82    const char *sink);
    5383
    5484int hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,
     
    6595        int (*rem_context)(void *, hound_context_id_t);
    6696        bool (*is_record_context)(void *, hound_context_id_t);
     97        int (*connect)(void *, const char *, const char *);
     98        int (*disconnect)(void *, const char *, const char *);
    6799        int (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t,
    68100            void **);
Note: See TracChangeset for help on using the changeset viewer.