-
- /* Check nature of input */
- gboolean isUrl = FALSE;
- int i = 0;
- for (i = 0 ; PROTOS[i] != NULL ; i++)
- {
- const gchar *proto = PROTOS[i];
- if (strncmp (input, proto, strlen(proto)) == 0)
- {
- /* Procotol matches: save result */
- isUrl = TRUE;
- }
- }
-
- /* Do the job */
- if (isUrl)
- return a_babel_convert_from_url (vt, input, input_type, cb, user_data, options);
- else
- return a_babel_convert_from_shellcommand (vt, input, input_type, cb, user_data, options);
+ if ( !process_options ) return FALSE;
+ if ( process_options->url )
+ return a_babel_convert_from_url_filter ( vt, process_options->url, process_options->input_file_type, process_options->babel_filters, cb, user_data, download_options );
+ if ( process_options->babelargs )
+ return a_babel_convert_from_filter ( vt, process_options->babelargs, process_options->filename, process_options->babel_filters, cb, user_data, download_options );
+ if ( process_options->shell_command )
+ return a_babel_convert_from_shellcommand ( vt, process_options->shell_command, process_options->filename, cb, user_data, download_options );
+ return FALSE;