LCOV - code coverage report
Current view: top level - testing - testing_api_trait_account_priv.c (source / functions) Hit Total Coverage
Test: GNU Taler sync coverage report Lines: 0 5 0.0 %
Date: 2022-08-25 06:17:07 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) 2019 Taler Systems SA
       4             : 
       5             :   TALER is free software; you can redistribute it and/or modify it
       6             :   under the terms of the GNU General Public License as published
       7             :   by the Free Software Foundation; either version 3, or (at your
       8             :   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 GNU
      13             :   General Privlic License for more details.
      14             : 
      15             :   You should have received a copy of the GNU General Privlic
      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_account_priv.c
      21             :  * @brief traits to offer a account_priv
      22             :  * @author Christian Grothoff
      23             :  */
      24             : #include "platform.h"
      25             : #include "sync_service.h"
      26             : #include "sync_testing_lib.h"
      27             : 
      28             : #define SYNC_TESTING_TRAIT_ACCOUNT_PRIV "sync-account_priv"
      29             : 
      30             : 
      31             : /**
      32             :  * Obtain an account private key from @a cmd.
      33             :  *
      34             :  * @param cmd command to extract the private key from.
      35             :  * @param index the private key's index number.
      36             :  * @param n[out] set to the private key coming from @a cmd.
      37             :  * @return #GNUNET_OK on success.
      38             :  */
      39             : int
      40           0 : SYNC_TESTING_get_trait_account_priv
      41             :   (const struct TALER_TESTING_Command *cmd,
      42             :   unsigned int index,
      43             :   const struct SYNC_AccountPrivateKeyP **priv)
      44             : {
      45           0 :   return cmd->traits (cmd->cls,
      46             :                       (const void **) priv,
      47             :                       SYNC_TESTING_TRAIT_ACCOUNT_PRIV,
      48             :                       index);
      49             : }
      50             : 
      51             : 
      52             : /**
      53             :  * Offer an account private key.
      54             :  *
      55             :  * @param index usually zero
      56             :  * @param priv the account_priv to offer.
      57             :  * @return #GNUNET_OK on success.
      58             :  */
      59             : struct TALER_TESTING_Trait
      60           0 : SYNC_TESTING_make_trait_account_priv
      61             :   (unsigned int index,
      62             :   const struct SYNC_AccountPrivateKeyP *priv)
      63             : {
      64           0 :   struct TALER_TESTING_Trait ret = {
      65             :     .index = index,
      66             :     .trait_name = SYNC_TESTING_TRAIT_ACCOUNT_PRIV,
      67             :     .ptr = (const void *) priv
      68             :   };
      69           0 :   return ret;
      70             : }
      71             : 
      72             : 
      73             : /* end of testing_api_trait_account_priv.c */

Generated by: LCOV version 1.14