trait for claim token
This commit is contained in:
parent
7a9086fa18
commit
efa567fbb4
@ -2973,6 +2973,35 @@ TALER_TESTING_make_trait_uuid (unsigned int index,
|
|||||||
const struct GNUNET_Uuid *uuid);
|
const struct GNUNET_Uuid *uuid);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain a claim token from @a cmd.
|
||||||
|
*
|
||||||
|
* @param cmd command to extract the token from.
|
||||||
|
* @param index which amount to pick if @a cmd has multiple
|
||||||
|
* on offer
|
||||||
|
* @param[out] ct where to write the token.
|
||||||
|
* @return #GNUNET_OK on success.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
TALER_TESTING_get_trait_claim_token (const struct TALER_TESTING_Command *cmd,
|
||||||
|
unsigned int index,
|
||||||
|
const struct TALER_ClaimTokenP **ct);
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offer a claim token in a trait.
|
||||||
|
*
|
||||||
|
* @param index which token to offer, in case there are
|
||||||
|
* multiple available.
|
||||||
|
* @param ct the token to offer.
|
||||||
|
*
|
||||||
|
* @return the trait.
|
||||||
|
*/
|
||||||
|
struct TALER_TESTING_Trait
|
||||||
|
TALER_TESTING_make_trait_claim_token (unsigned int index,
|
||||||
|
const struct TALER_ClaimTokenP *ct);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Obtain a absolute time from @a cmd.
|
* Obtain a absolute time from @a cmd.
|
||||||
*
|
*
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define TALER_TESTING_TRAIT_UUID "uuid"
|
#define TALER_TESTING_TRAIT_UUID "uuid"
|
||||||
|
#define TALER_TESTING_TRAIT_CLAIM_TOKEN "claim_token"
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,3 +72,46 @@ TALER_TESTING_make_trait_uuid (unsigned int index,
|
|||||||
};
|
};
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Obtain a claim token from @a cmd.
|
||||||
|
*
|
||||||
|
* @param cmd command to extract the token from.
|
||||||
|
* @param index which amount to pick if @a cmd has multiple
|
||||||
|
* on offer
|
||||||
|
* @param[out] ct where to write the token.
|
||||||
|
* @return #GNUNET_OK on success.
|
||||||
|
*/
|
||||||
|
int
|
||||||
|
TALER_TESTING_get_trait_claim_token (const struct TALER_TESTING_Command *cmd,
|
||||||
|
unsigned int index,
|
||||||
|
const struct TALER_ClaimTokenP **ct)
|
||||||
|
{
|
||||||
|
return cmd->traits (cmd->cls,
|
||||||
|
(const void **) ct,
|
||||||
|
TALER_TESTING_TRAIT_CLAIM_TOKEN,
|
||||||
|
index);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Offer a claim token in a trait.
|
||||||
|
*
|
||||||
|
* @param index which token to offer, in case there are
|
||||||
|
* multiple available.
|
||||||
|
* @param ct the token to offer.
|
||||||
|
*
|
||||||
|
* @return the trait.
|
||||||
|
*/
|
||||||
|
struct TALER_TESTING_Trait
|
||||||
|
TALER_TESTING_make_trait_claim_token (unsigned int index,
|
||||||
|
const struct TALER_ClaimTokenP *ct)
|
||||||
|
{
|
||||||
|
struct TALER_TESTING_Trait ret = {
|
||||||
|
.index = index,
|
||||||
|
.trait_name = TALER_TESTING_TRAIT_CLAIM_TOKEN,
|
||||||
|
.ptr = (const void *) ct
|
||||||
|
};
|
||||||
|
return ret;
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user