Changeset 7294b5b in mainline for uspace/lib/hound/src/client.c
- Timestamp:
- 2013-03-24T13:04:04Z (12 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- ec81221
- Parents:
- 13318d1
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/hound/src/client.c
r13318d1 r7294b5b 95 95 new_context->id = hound_service_register_context( 96 96 new_context->session, new_context->name, record); 97 if ( new_context->id <= 0) {97 if (hound_context_id_err(new_context->id) != EOK) { 98 98 free(new_context->name); 99 99 free(new_context); … … 136 136 } 137 137 138 int hound_get_output_targets(const char **names, size_t *count) 139 { 138 int hound_context_get_available_targets(hound_context_t *hound, 139 const char ***names, size_t *count) 140 { 141 assert(hound); 140 142 assert(names); 141 143 assert(count); 142 return ENOTSUP; 143 } 144 145 int hound_get_input_targets(const char **names, size_t *count) 146 { 144 return hound_service_get_list_all(hound->session, names, count, 145 hound->record ? HOUND_SOURCE_DEVS : HOUND_SINK_DEVS); 146 } 147 148 int hound_context_get_connected_targets(hound_context_t *hound, 149 const char ***names, size_t *count) 150 { 151 assert(hound); 147 152 assert(names); 148 153 assert(count); 149 return ENOTSUP; 154 return hound_service_get_list(hound->session, names, count, 155 HOUND_CONNECTED | (hound->record ? 156 HOUND_SOURCE_DEVS : HOUND_SINK_DEVS), hound->name); 150 157 } 151 158 … … 153 160 { 154 161 assert(hound); 155 return ENOTSUP; 162 if (hound->record) 163 return hound_service_connect_source_sink( 164 hound->session, target, hound->name); 165 else 166 return hound_service_connect_source_sink( 167 hound->session, hound->name, target); 156 168 } 157 169 … … 159 171 { 160 172 assert(hound); 161 return ENOTSUP; 173 if (hound->record) 174 return hound_service_disconnect_source_sink( 175 hound->session, target, hound->name); 176 else 177 return hound_service_disconnect_source_sink( 178 hound->session, hound->name, target); 162 179 } 163 180
Note:
See TracChangeset
for help on using the changeset viewer.