LCOV - code coverage report
Current view: top level - sync - sync-httpd_terms.c (source / functions) Hit Total Coverage
Test: GNU Taler sync coverage report Lines: 0 2 0.0 %
Date: 2021-05-09 06:21:04 Functions: 0 1 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   This file is part of TALER
       3             :   (C) 2019 Taler Systems SA
       4             : 
       5             :   TALER is free software; you can redistribute it and/or modify it under the
       6             :   terms of the GNU General Public License as published by the Free Software
       7             :   Foundation; either version 3, or (at your option) any later version.
       8             : 
       9             :   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
      10             :   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
      11             :   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
      12             : 
      13             :   You should have received a copy of the GNU General Public License along with
      14             :   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
      15             : */
      16             : /**
      17             :  * @file sync/sync-httpd_terms.c
      18             :  * @brief headers for /terms handler
      19             :  * @author Christian Grothoff
      20             :  */
      21             : #include "platform.h"
      22             : #include "sync-httpd_terms.h"
      23             : #include <taler/taler_json_lib.h>
      24             : 
      25             : /**
      26             :  * Manages a /terms call.
      27             :  *
      28             :  * @param rh context of the handler
      29             :  * @param connection the MHD connection to handle
      30             :  * @param[in,out] connection_cls the connection's closure (can be updated)
      31             :  * @param upload_data upload data
      32             :  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
      33             :  * @param mi merchant backend instance, never NULL
      34             :  * @return MHD result code
      35             :  */
      36             : MHD_RESULT
      37           0 : SH_handler_terms (struct SH_RequestHandler *rh,
      38             :                   struct MHD_Connection *connection,
      39             :                   void **connection_cls,
      40             :                   const char *upload_data,
      41             :                   size_t *upload_data_size)
      42             : {
      43           0 :   return TALER_MHD_reply_json_pack (connection,
      44             :                                     MHD_HTTP_OK,
      45             :                                     "{s:I, s:o, s:s}",
      46             :                                     "storage_limit_in_megabytes",
      47             :                                     (json_int_t) SH_upload_limit_mb,
      48             :                                     "annual_fee",
      49             :                                     TALER_JSON_from_amount (&SH_annual_fee),
      50             :                                     "version",
      51             :                                     "0.0");
      52             : }

Generated by: LCOV version 1.14