LCOV - code coverage report
Current view: top level - sync - sync-httpd_config.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 Sync
       3             :   Copyright (C) 2020 Taler Systems SA
       4             : 
       5             :   Sync is free software; you can redistribute it and/or modify it under the
       6             :   terms of the GNU Lesser General Public License as published by the Free Software
       7             :   Foundation; either version 3, or (at your option) any later version.
       8             : 
       9             :   Sync 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             :   Sync; see the file COPYING.GPL.  If not, see <http://www.gnu.org/licenses/>
      15             : */
      16             : /**
      17             :  * @file backend/sync-httpd_config.c
      18             :  * @brief headers for /config handler
      19             :  * @author Christian Grothoff
      20             :  */
      21             : #include "platform.h"
      22             : #include "sync-httpd_config.h"
      23             : #include <taler/taler_json_lib.h>
      24             : 
      25             : 
      26             : /*
      27             :  * Protocol version history:
      28             :  *
      29             :  * 0: original design
      30             :  * 1: adds ?fresh=y to POST backup operation to force fresh contract
      31             :  *    to be created
      32             :  */
      33             : 
      34             : /**
      35             :  * Manages a /config call.
      36             :  *
      37             :  * @param rh context of the handler
      38             :  * @param connection the MHD connection to handle
      39             :  * @param[in,out] connection_cls the connection's closure (can be updated)
      40             :  * @param upload_data upload data
      41             :  * @param[in,out] upload_data_size number of bytes (left) in @a upload_data
      42             :  * @param mi merchant backend instance, never NULL
      43             :  * @return MHD result code
      44             :  */
      45             : MHD_RESULT
      46           0 : SH_handler_config (struct SH_RequestHandler *rh,
      47             :                    struct MHD_Connection *connection,
      48             :                    void **connection_cls,
      49             :                    const char *upload_data,
      50             :                    size_t *upload_data_size)
      51             : {
      52           0 :   return TALER_MHD_reply_json_pack (connection,
      53             :                                     MHD_HTTP_OK,
      54             :                                     "{s:s, s:s}",
      55             :                                     "name",
      56             :                                     "sync",
      57             :                                     "version",
      58             :                                     "1:0:1");
      59             : }
      60             : 
      61             : 
      62             : /* end of sync-httpd_config.c */

Generated by: LCOV version 1.14