]> gitweb.hhaalo.de Git - sane-kds-s2000w-net.git/commitdiff
no wrap for net read
authorBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 19:13:07 +0000 (20:13 +0100)
committerBastian Dehn <hhaalo@arcor.de>
Sun, 17 Mar 2024 19:13:07 +0000 (20:13 +0100)
tests/kds_s2000w_net_read_tests.c

index b9b907f72d8c49f1adee67c128cdf7eb3b5c9e0f..a1805c0373b9b5b5a84ce83267744c404e47efe6 100644 (file)
@@ -7,80 +7,6 @@
 #include "../src/kds_s2000w_handler.h"
 #include "../src/kds_s2000w_net.h"
 
-void __wrap_load_config(program_config* config, const char* config_stream)
-{
-       config->scanner_url = malloc(sizeof(char) * 28);
-       config->username = malloc(sizeof(char) * 4);
-
-       config->scanner_url = "https://scanner.example.com\0";
-       config->username = "Max\0";
-}
-
-int __wrap_kds_s2000w_client_get_option(int64_t sessionid, response* response)
-{
-       response->data = realloc(response->data, 918);
-       const char* responsedata = "{ \
-               \"Status\": { \
-                       \"NumImagesScanned\": 0, \
-                       \"NumImagesStored\": 0, \
-                       \"State\": \"In Session\", \
-                       \"ErrorNum\": 0, \
-                       \"LastError\": \"Status: 200 Success\", \
-                       \"PaperDetected\": \"0\", \
-                       \"PercentAvailable\": 99 \
-               }, \
-               \"Configuration\": { \
-                       \"DPI\": 200, \
-                       \"ScanSide\": \"Duplex\", \
-                       \"ColorMode\": \"Color\", \
-                       \"SkipBlankPages\": 0, \
-                       \"AutoStart\": 0, \
-                       \"ColorDropOut\": \"None\", \
-                       \"ColorDropOutAggressiveness\": 0, \
-                       \"OutputType\": \"Images\", \
-                       \"ColorAutoBrightnessMode\": \"Automatic\", \
-                       \"ColorBalanceMode\": \"Automatic\", \
-                       \"ColorBalanceAggressiveness\": 0, \
-                       \"ColorBalanceRed\": 0, \
-                       \"ColorBalanceGreen\": 0, \
-                       \"ColorBalanceBlue\": 0, \
-                       \"ForegroundBoldnessMode\": \"None\", \
-                       \"ForegroundBoldnessAggressiveness\": 0, \
-                       \"BackgroundSmoothingMode\": \"None\", \
-                       \"BackgroundSmoothingAggressiveness\": 0, \
-                       \"BinarizationMode\": \"iThresholding\", \
-                       \"BinarizationContrast\": 0, \
-                       \"MaxDocumentLength\": 140, \
-                       \"ScanSource\": \"DocumentFeeder\" \
-               } \
-       }\0";
-
-       memcpy(response->data, responsedata, 918);
-
-       response->code = 200;
-       response->size = sizeof(response->data);
-
-       return mock_type(int);
-}
-
-int __wrap_kds_s2000w_client_stop_scan(int64_t sessionid, response* response)
-{
-       return mock_type(int);
-}
-
-int __wrap_kds_s2000w_client_open_session(response* response)
-{
-       response->data = realloc(response->data, 27);
-       const char* responsedata = "{\"SessionId\":\"1251877821\"}\0";
-
-       memcpy(response->data, responsedata, 27);
-
-       response->code = 200;
-       response->size = sizeof(response->data);
-
-       return mock_type(int);
-}
-
 void sane_kds_s2000w_net_read_cancel_test()
 {
        handler* h = init_handler();