src/test/tests_stub_async.c
void
this_callbackfn(struct getdns_context *this_context,
	getdns_callback_type_t this_callback_type,
	struct getdns_dict *this_response,
	void *this_userarg, getdns_transaction_t this_transaction_id)
{
	if (this_callback_type == GETDNS_CALLBACK_COMPLETE) {	/* This is a callback with data */
		char *res = getdns_pretty_print_dict(this_response);
		fprintf(stdout, "%s\n", res);
		free(res);

	} else if (this_callback_type == GETDNS_CALLBACK_CANCEL)
		fprintf(stderr,
			"The callback with ID %llu was cancelled. Exiting.",
			(unsigned long long)this_transaction_id);
	else
		fprintf(stderr,
			"The callback got a callback_type of %d. Exiting.",
			this_callback_type);
	getdns_dict_destroy(this_response);
}
/* Set up the callback function, which will also do the processing of the results */
Set up the callback function, which will also do the processing of the results
Set up the callback function which will also do the processing of the results
void
this_callbackfn(struct getdns_context *this_context,
	getdns_callback_type_t this_callback_type,
	struct getdns_dict *this_response,
	void *this_userarg, getdns_transaction_t this_transaction_id)
{
	if (this_callback_type == GETDNS_CALLBACK_COMPLETE) {	
		char *res = getdns_pretty_print_dict(this_response);
		fprintf(stdout, "%s\n", res);
		free(res);
	} else if (this_callback_type == GETDNS_CALLBACK_CANCEL)
		fprintf(stderr,
			"The callback with ID %llu was cancelled. Exiting.",
			(unsigned long long)this_transaction_id);
	else
		fprintf(stderr,
			"The callback got a callback_type of %d. Exiting.",
			this_callback_type);
	getdns_dict_destroy(this_response);
}
void this_callbackfn ( struct getdns_context * this_context , getdns_callback_type_t this_callback_type , struct getdns_dict * this_response , void * this_userarg , getdns_transaction_t this_transaction_id ) { if ( this_callback_type == GETDNS_CALLBACK_COMPLETE ) { char * res = getdns_pretty_print_dict ( this_response ) ; fprintf ( stdout , " \n " , res ) ; free ( res ) ; } else if ( this_callback_type == GETDNS_CALLBACK_CANCEL ) fprintf ( stderr , " " , ( unsigned long long ) this_transaction_id ) ; else fprintf ( stderr , " " , this_callback_type ) ; getdns_dict_destroy ( this_response ) ; }
Set up the callback function, which will also do the processing of the results
Set up the callback function which will also do the processing of the results
/* This is a callback with data */