Changeset 876f5561 in mainline for uspace/lib/hound/include
- Timestamp:
- 2013-04-10T23:06:52Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f0a647c
- Parents:
- eb0ef51
- Location:
- uspace/lib/hound/include/hound
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/include/hound/client.h
reb0ef51 r876f5561 54 54 void hound_context_destroy(hound_context_t *hound); 55 55 56 int hound_context_set_main_stream_ format(hound_context_t *hound,57 unsigned channels, unsigned rate, pcm_sample_format_t format);56 int hound_context_set_main_stream_params(hound_context_t *hound, 57 pcm_format_t format, size_t bsize); 58 58 59 59 int hound_context_get_available_targets(hound_context_t *hound, -
uspace/lib/hound/include/hound/protocol.h
reb0ef51 r876f5561 41 41 #include <pcm/format.h> 42 42 43 const char *HOUND_SERVICE;43 extern const char *HOUND_SERVICE; 44 44 45 enum {45 typedef enum { 46 46 HOUND_SINK_APPS = 0x1, 47 47 HOUND_SINK_DEVS = 0x2, … … 53 53 HOUND_STREAM_IGNORE_UNDERFLOW = 0x2, 54 54 HOUND_STREAM_IGNORE_OVERFLOW = 0x4, 55 } ;55 } hound_flags_t; 56 56 57 57 typedef async_sess_t hound_sess_t; 58 58 typedef intptr_t hound_context_id_t; 59 59 60 /** 61 * Check context id for errors. 62 * @param id Context id 63 * @return Error code. 64 */ 60 65 static inline int hound_context_id_err(hound_context_id_t id) 61 66 { … … 72 77 int hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count, 73 78 int flags, const char *connection); 79 80 /** 81 * Wrapper for list queries with no connection parameter. 82 * @param[in] sess hound daemon session. 83 * @param[out] ids list of string identifiers 84 * @param[out] count Number of elements in @p ids 85 * @param[in] flags Flags limiting the query. 86 * @return Error code. 87 */ 74 88 static inline int hound_service_get_list_all(hound_sess_t *sess, 75 89 const char ***ids, size_t *count, int flags) … … 92 106 93 107 /* Server */ 108 109 /** Hound server interace structure */ 94 110 typedef struct hound_server_iface { 111 /** Create new context */ 95 112 int (*add_context)(void *, hound_context_id_t *, const char *, bool); 113 /** Destroy existing context */ 96 114 int (*rem_context)(void *, hound_context_id_t); 115 /** Query context direction */ 97 116 bool (*is_record_context)(void *, hound_context_id_t); 117 /** Get string identifiers of specified objects */ 98 118 int (*get_list)(void *, const char ***, size_t *, const char *, int); 119 /** Create connection between source and sink */ 99 120 int (*connect)(void *, const char *, const char *); 121 /** Destroy connection between source and sink */ 100 122 int (*disconnect)(void *, const char *, const char *); 123 /** Create new stream tied to the context */ 101 124 int (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t, 102 125 void **); 126 /** Destroy existing stream */ 103 127 int (*rem_stream)(void *, void *); 128 /** Block until the stream buffer is empty */ 104 129 int (*drain_stream)(void *); 130 /** Write new data to the stream */ 105 131 int (*stream_data_write)(void *, const void *, size_t); 132 /** Read data from the stream */ 106 133 int (*stream_data_read)(void *, void *, size_t); 107 134 void *server;
Note:
See TracChangeset
for help on using the changeset viewer.