Changeset b7fd2a0 in mainline for uspace/lib/hound/include
- Timestamp:
- 2018-01-13T03:10:29Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a53ed3a
- Parents:
- 36f0738
- Location:
- uspace/lib/hound/include/hound
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/include/hound/client.h
r36f0738 rb7fd2a0 53 53 void hound_context_destroy(hound_context_t *hound); 54 54 55 int hound_context_set_main_stream_params(hound_context_t *hound,55 errno_t hound_context_set_main_stream_params(hound_context_t *hound, 56 56 pcm_format_t format, size_t bsize); 57 57 58 int hound_context_get_available_targets(hound_context_t *hound,58 errno_t hound_context_get_available_targets(hound_context_t *hound, 59 59 const char ***names, size_t *count); 60 int hound_context_get_connected_targets(hound_context_t *hound,60 errno_t hound_context_get_connected_targets(hound_context_t *hound, 61 61 const char ***names, size_t *count); 62 62 63 int hound_context_connect_target(hound_context_t *hound, const char* target);64 int hound_context_disconnect_target(hound_context_t *hound, const char* target);63 errno_t hound_context_connect_target(hound_context_t *hound, const char* target); 64 errno_t hound_context_disconnect_target(hound_context_t *hound, const char* target); 65 65 66 66 hound_stream_t *hound_stream_create(hound_context_t *hound, unsigned flags, … … 68 68 void hound_stream_destroy(hound_stream_t *stream); 69 69 70 int hound_stream_write(hound_stream_t *stream, const void *data, size_t size);71 int hound_stream_read(hound_stream_t *stream, void *data, size_t size);72 int hound_stream_drain(hound_stream_t *stream);70 errno_t hound_stream_write(hound_stream_t *stream, const void *data, size_t size); 71 errno_t hound_stream_read(hound_stream_t *stream, void *data, size_t size); 72 errno_t hound_stream_drain(hound_stream_t *stream); 73 73 74 int hound_write_main_stream(hound_context_t *hound,74 errno_t hound_write_main_stream(hound_context_t *hound, 75 75 const void *data, size_t size); 76 int hound_read_main_stream(hound_context_t *hound, void *data, size_t size);77 int hound_write_replace_main_stream(hound_context_t *hound,76 errno_t hound_read_main_stream(hound_context_t *hound, void *data, size_t size); 77 errno_t hound_write_replace_main_stream(hound_context_t *hound, 78 78 const void *data, size_t size); 79 int hound_write_immediate(hound_context_t *hound,79 errno_t hound_write_immediate(hound_context_t *hound, 80 80 pcm_format_t format, const void *data, size_t size); 81 81 -
uspace/lib/hound/include/hound/protocol.h
r36f0738 rb7fd2a0 61 61 void hound_service_disconnect(hound_sess_t *sess); 62 62 63 int hound_service_register_context(hound_sess_t *sess,63 errno_t hound_service_register_context(hound_sess_t *sess, 64 64 const char *name, bool record, hound_context_id_t *id); 65 int hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id);65 errno_t hound_service_unregister_context(hound_sess_t *sess, hound_context_id_t id); 66 66 67 int hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count,67 errno_t hound_service_get_list(hound_sess_t *sess, const char ***ids, size_t *count, 68 68 int flags, const char *connection); 69 69 … … 76 76 * @return Error code. 77 77 */ 78 static inline int hound_service_get_list_all(hound_sess_t *sess,78 static inline errno_t hound_service_get_list_all(hound_sess_t *sess, 79 79 const char ***ids, size_t *count, int flags) 80 80 { … … 82 82 } 83 83 84 int hound_service_connect_source_sink(hound_sess_t *sess, const char *source,84 errno_t hound_service_connect_source_sink(hound_sess_t *sess, const char *source, 85 85 const char *sink); 86 int hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source,86 errno_t hound_service_disconnect_source_sink(hound_sess_t *sess, const char *source, 87 87 const char *sink); 88 88 89 int hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id,89 errno_t hound_service_stream_enter(async_exch_t *exch, hound_context_id_t id, 90 90 int flags, pcm_format_t format, size_t bsize); 91 int hound_service_stream_drain(async_exch_t *exch);92 int hound_service_stream_exit(async_exch_t *exch);91 errno_t hound_service_stream_drain(async_exch_t *exch); 92 errno_t hound_service_stream_exit(async_exch_t *exch); 93 93 94 int hound_service_stream_write(async_exch_t *exch, const void *data, size_t size);95 int hound_service_stream_read(async_exch_t *exch, void *data, size_t size);94 errno_t hound_service_stream_write(async_exch_t *exch, const void *data, size_t size); 95 errno_t hound_service_stream_read(async_exch_t *exch, void *data, size_t size); 96 96 97 97 /* Server */ … … 100 100 typedef struct hound_server_iface { 101 101 /** Create new context */ 102 int (*add_context)(void *, hound_context_id_t *, const char *, bool);102 errno_t (*add_context)(void *, hound_context_id_t *, const char *, bool); 103 103 /** Destroy existing context */ 104 int (*rem_context)(void *, hound_context_id_t);104 errno_t (*rem_context)(void *, hound_context_id_t); 105 105 /** Query context direction */ 106 106 bool (*is_record_context)(void *, hound_context_id_t); 107 107 /** Get string identifiers of specified objects */ 108 int (*get_list)(void *, const char ***, size_t *, const char *, int);108 errno_t (*get_list)(void *, const char ***, size_t *, const char *, int); 109 109 /** Create connection between source and sink */ 110 int (*connect)(void *, const char *, const char *);110 errno_t (*connect)(void *, const char *, const char *); 111 111 /** Destroy connection between source and sink */ 112 int (*disconnect)(void *, const char *, const char *);112 errno_t (*disconnect)(void *, const char *, const char *); 113 113 /** Create new stream tied to the context */ 114 int (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t,114 errno_t (*add_stream)(void *, hound_context_id_t, int, pcm_format_t, size_t, 115 115 void **); 116 116 /** Destroy existing stream */ 117 int (*rem_stream)(void *, void *);117 errno_t (*rem_stream)(void *, void *); 118 118 /** Block until the stream buffer is empty */ 119 int (*drain_stream)(void *);119 errno_t (*drain_stream)(void *); 120 120 /** Write new data to the stream */ 121 int (*stream_data_write)(void *, const void *, size_t);121 errno_t (*stream_data_write)(void *, const void *, size_t); 122 122 /** Read data from the stream */ 123 int (*stream_data_read)(void *, void *, size_t);123 errno_t (*stream_data_read)(void *, void *, size_t); 124 124 void *server; 125 125 } hound_server_iface_t; -
uspace/lib/hound/include/hound/server.h
r36f0738 rb7fd2a0 41 41 42 42 typedef void (*dev_change_callback_t)(void); 43 typedef int (*device_callback_t)(service_id_t, const char *);43 typedef errno_t (*device_callback_t)(service_id_t, const char *); 44 44 45 int hound_server_register(const char *name, service_id_t *id);45 errno_t hound_server_register(const char *name, service_id_t *id); 46 46 void hound_server_unregister(service_id_t id); 47 int hound_server_set_device_change_callback(dev_change_callback_t cb);48 int hound_server_devices_iterate(device_callback_t callback);47 errno_t hound_server_set_device_change_callback(dev_change_callback_t cb); 48 errno_t hound_server_devices_iterate(device_callback_t callback); 49 49 50 50 #endif
Note:
See TracChangeset
for help on using the changeset viewer.