diff options
Diffstat (limited to 'tests/test_callbacks.c')
-rw-r--r-- | tests/test_callbacks.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/tests/test_callbacks.c b/tests/test_callbacks.c deleted file mode 100644 index 6f4cd40..0000000 --- a/tests/test_callbacks.c +++ /dev/null @@ -1,30 +0,0 @@ -#include <stdio.h> -#include <unistd.h> - -#include <dapi/comm.h> -#include <dapi/calls.h> -#include <dapi/callbacks.h> - -static void callback( DapiConnection* conn, int seq, int ord ) - { - printf( "Order async: %d %d (%s)\n", seq, ord, ord == 0 ? "Failed" : ord == 1 ? "Ok/Cancel" : "Cancel/Ok" ); - } - -int main() - { - int seq; - DapiConnection* conn = dapi_connectAndInit(); - if( conn == NULL ) - { - fprintf( stderr, "Cannot connect!\n" ); - return 1; - } - seq = dapi_callbackButtonOrder( conn, callback ); - printf( "Order call1: %d\n", seq ); - seq = dapi_callbackButtonOrder( conn, callback ); - printf( "Order call2: %d\n", seq ); - sleep( 1 ); /* give time to process */ - dapi_processData( conn ); - dapi_close( conn ); - return 0; - } |