taler_digitizer_service.h (1903B)
1 #ifndef _TALER_DIGITIZER_SERVICE_H 2 #define _TALER_DIGITIZER_SERVICE_H 3 4 5 #include <taler/taler_bank_service.h> 6 #include <taler/taler_util.h> 7 #include "../lib/bank_api_get_config.h" 8 9 /** 10 * How compatible are the protocol version of the bank and this 11 * client? The bits (1,2,4) can be used to test if the auditor's 12 * version is incompatible, older or newer respectively. 13 */ 14 enum TALER_BANK_VersionCompatibility 15 { 16 17 /** 18 * The bank runs exactly the same protocol version. 19 */ 20 TALER_BANK_VC_MATCH = 0, 21 22 /** 23 * The bank is too old or too new to be compatible with this 24 * implementation (bit) 25 */ 26 TALER_BANK_VC_INCOMPATIBLE = 1, 27 28 /** 29 * The bank is older than this implementation (bit) 30 */ 31 TALER_BANK_VC_OLDER = 2, 32 33 /** 34 * The bank is too old to be compatible with 35 * this implementation. 36 */ 37 TALER_BANK_VC_INCOMPATIBLE_OUTDATED 38 = TALER_BANK_VC_INCOMPATIBLE 39 | TALER_BANK_VC_OLDER, 40 41 /** 42 * The bank is more recent than this implementation (bit). 43 */ 44 TALER_BANK_VC_NEWER = 4, 45 46 /** 47 * The bank is too recent for this implementation. 48 */ 49 TALER_BANK_VC_INCOMPATIBLE_NEWER 50 = TALER_BANK_VC_INCOMPATIBLE 51 | TALER_BANK_VC_NEWER, 52 53 /** 54 * We could not even parse the version data. 55 */ 56 TALER_BANK_VC_PROTOCOL_ERROR = 8 57 58 }; 59 60 61 /** 62 * General information about the HTTP response we obtained 63 * from the bank for a request. 64 */ 65 struct TALER_BANK_HttpResponse 66 { 67 68 /** 69 * Full response, NULL if body was not in JSON format. 70 */ 71 const json_t *response; 72 73 /** 74 * Set to the human-readable 'hint' that is optionally 75 * provided by the exchange together with errors. NULL 76 * if no hint was provided or if there was no error. 77 */ 78 const char *hint; 79 80 /** 81 * HTTP status code for the response. 82 */ 83 unsigned int http_status; 84 85 /** 86 * Taler error code, #TALER_EC_NONE on success. 87 */ 88 enum TALER_ErrorCode ec; 89 90 }; 91 92 93 #endif