LCOV - code coverage report
Current view: top level - testing - testing_api_trait_planchet.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) 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             :  * @file lib/testing_api_trait_planchet.c
      21             :  * @brief offer planchet secrets as trait.
      22             :  * @author Marcello Stanisci
      23             :  */
      24             : #include "platform.h"
      25             : #include <taler/taler_signatures.h>
      26             : #include <taler/taler_exchange_service.h>
      27             : #include <taler/taler_testing_lib.h>
      28             : 
      29             : #define TALER_TESTING_TRAIT_PLANCHET_SECRETS "planchet-secrets"
      30             : 
      31             : /**
      32             :  * Obtain planchet secrets from a @a cmd.
      33             :  *
      34             :  * @param cmd command to extract trait from.
      35             :  * @param index index of the trait.
      36             :  * @param planchet_secrets[out] set to the wanted secrets.
      37             :  *
      38             :  * @return #GNUNET_OK on success
      39             :  */
      40             : int
      41           0 : TALER_TESTING_get_trait_planchet_secrets
      42             :   (const struct TALER_TESTING_Command *cmd,
      43             :   unsigned int index,
      44             :   struct TALER_PlanchetSecretsP **planchet_secrets)
      45             : {
      46           0 :   return cmd->traits (cmd->cls,
      47             :                       (const void **) planchet_secrets,
      48             :                       TALER_TESTING_TRAIT_PLANCHET_SECRETS,
      49             :                       index);
      50             : }
      51             : 
      52             : 
      53             : /**
      54             :  * Offer planchet secrets.
      55             :  *
      56             :  * @param index of the trait.
      57             :  * @param planchet_secrets set to the offered secrets.
      58             :  *
      59             :  * @return the trait
      60             :  */
      61             : struct TALER_TESTING_Trait
      62           0 : TALER_TESTING_make_trait_planchet_secrets
      63             :   (unsigned int index,
      64             :   const struct TALER_PlanchetSecretsP *planchet_secrets)
      65             : {
      66           0 :   struct TALER_TESTING_Trait ret = {
      67             :     .index = index,
      68             :     .trait_name = TALER_TESTING_TRAIT_PLANCHET_SECRETS,
      69             :     .ptr = (const void *) planchet_secrets
      70             :   };
      71           0 :   return ret;
      72             : }
      73             : 
      74             : 
      75             : /* end of testing_api_trait_planchet.c */

Generated by: LCOV version 1.14