LCOV - code coverage report
Current view: top level - testing - testing_api_trait_refund_entry.c (source / functions) Hit Total Coverage
Test: GNU Taler coverage report Lines: 0 5 0.0 %
Date: 2020-08-15 06:12:35 Functions: 0 2 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :   This file is part of TALER
       3             :   Copyright (C) 2014-2018 Taler Systems SA
       4             : 
       5             :   TALER is free software; you can redistribute it and/or modify
       6             :   it under the terms of the GNU General Public License as
       7             :   published by the Free Software Foundation; either version 3, or
       8             :   (at your option) any later version.
       9             : 
      10             :   TALER is distributed in the hope that it will be useful, but
      11             :   WITHOUT ANY WARRANTY; without even the implied warranty of
      12             :   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      13             :   GNU General Public License for more details.
      14             : 
      15             :   You should have received a copy of the GNU General Public
      16             :   License along with TALER; see the file COPYING.  If not, see
      17             :   <http://www.gnu.org/licenses/>
      18             : */
      19             : 
      20             : /**
      21             :  * @file lib/testing_api_trait_refund_entry.c
      22             :  * @brief command to offer refund entry trait.
      23             :  * @author Marcello Stanisci
      24             :  */
      25             : 
      26             : #include "platform.h"
      27             : #include <taler/taler_signatures.h>
      28             : #include <taler/taler_exchange_service.h>
      29             : #include <taler/taler_testing_lib.h>
      30             : #include "taler_merchant_service.h"
      31             : 
      32             : // FIXME: rename: entry->detail!
      33             : 
      34             : #define TALER_TESTING_TRAIT_REFUND_ENTRY "refund-entry"
      35             : 
      36             : /**
      37             :  * Obtain refund entry from a @a cmd.
      38             :  *
      39             :  * @param cmd command to extract the trait from.
      40             :  * @param index the trait index.
      41             :  * @param refund_entry[out] set to the wanted data.
      42             :  *
      43             :  * @return #GNUNET_OK on success
      44             :  */
      45             : int
      46           0 : TALER_TESTING_get_trait_refund_entry (
      47             :   const struct TALER_TESTING_Command *cmd,
      48             :   unsigned int index,
      49             :   const struct TALER_MERCHANT_RefundDetail **refund_entry)
      50             : {
      51           0 :   return cmd->traits (cmd->cls,
      52             :                       (const void **) refund_entry,
      53             :                       TALER_TESTING_TRAIT_REFUND_ENTRY,
      54             :                       index);
      55             : }
      56             : 
      57             : 
      58             : /**
      59             :  * Offer refund entry.
      60             :  *
      61             :  * @param index index number of the trait to offer.
      62             :  * @param refund_entry set to the offered refund entry.
      63             :  *
      64             :  * @return the trait
      65             :  */
      66             : struct TALER_TESTING_Trait
      67           0 : TALER_TESTING_make_trait_refund_entry (
      68             :   unsigned int index,
      69             :   const struct TALER_MERCHANT_RefundDetail *refund_entry)
      70             : {
      71           0 :   struct TALER_TESTING_Trait ret = {
      72             :     .index = index,
      73             :     .trait_name = TALER_TESTING_TRAIT_REFUND_ENTRY,
      74             :     .ptr = (const void *) refund_entry
      75             :   };
      76           0 :   return ret;
      77             : }
      78             : 
      79             : 
      80             : /* end of testing_api_trait_refund_entry.c */

Generated by: LCOV version 1.14