Changeset 5982:c38f275b38ae in roaraudio for libroar
- Timestamp:
- 02/23/14 15:46:19 (10 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libroar/roardl.c
r5961 r5982 1117 1117 } 1118 1118 1119 1120 int roar_dl_query_fn(struct roar_dl_lhandle ** lhandle, int fn, int subtype, const void ** object, size_t * objectlen, int version, int * options, ssize_t index) { 1121 struct __fnregs * c = NULL; 1122 ssize_t found = 0; 1123 size_t j; 1124 1125 if ( lhandle == NULL || object == NULL || objectlen == NULL || options == NULL ) { 1126 roar_err_set(ROAR_ERROR_FAULT); 1127 return -1; 1128 } 1129 1130 if ( fn <= 0 || fn >= ROAR_DL_FN_MAX || index < 0 || index >= __MAX_FNREGS ) { 1131 roar_err_set(ROAR_ERROR_INVAL); 1132 return -1; 1133 } 1134 1135 for (j = 0; j < __MAX_FNREGS; j++) { 1136 c = &(__fnrefs[fn][j]); 1137 1138 if ( c->lhandle == NULL ) 1139 continue; 1140 if ( c->subtype != subtype ) 1141 continue; 1142 if ( c->version != version ) 1143 continue; 1144 1145 if ( index == found++ ) { 1146 *lhandle = c->lhandle; 1147 *object = c->object; 1148 *objectlen = c->objectlen; 1149 *options = c->options; 1150 return 0; 1151 } 1152 } 1153 1154 roar_err_set(ROAR_ERROR_NOENT); 1155 return -1; 1156 } 1157 1119 1158 static inline int __load_plugin_any_get_api(struct roar_dl_librarypara * para, const char * appname, const char * appabi, const char * servicename, const char * serviceabi, int universal, struct roar_dl_service_api * api) { 1120 1159 struct roar_dl_lhandle * lhandle = NULL;
Note: See TracChangeset
for help on using the changeset viewer.