add TALER_yna_to_string()
This commit is contained in:
parent
0276abcd9a
commit
6b6814a205
@ -335,4 +335,15 @@ TALER_arg_to_yna (struct MHD_Connection *connection,
|
||||
enum TALER_EXCHANGE_YesNoAll default_val,
|
||||
enum TALER_EXCHANGE_YesNoAll *yna);
|
||||
|
||||
|
||||
/**
|
||||
* Convert YNA value to a string.
|
||||
*
|
||||
* @param yna value to convert
|
||||
* @return string representation ("yes"/"no"/"all").
|
||||
*/
|
||||
const char *
|
||||
TALER_yna_to_string (enum TALER_EXCHANGE_YesNoAll yna);
|
||||
|
||||
|
||||
#endif
|
||||
|
@ -64,3 +64,25 @@ TALER_arg_to_yna (struct MHD_Connection *connection,
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Convert YNA value to a string.
|
||||
*
|
||||
* @param yna value to convert
|
||||
* @return string representation ("yes"/"no"/"all").
|
||||
*/
|
||||
const char *
|
||||
TALER_yna_to_string (enum TALER_EXCHANGE_YesNoAll yna)
|
||||
{
|
||||
switch (yna)
|
||||
{
|
||||
case TALER_EXCHANGE_YNA_YES:
|
||||
return "yes";
|
||||
case TALER_EXCHANGE_YNA_NO:
|
||||
return "no";
|
||||
case TALER_EXCHANGE_YNA_ALL:
|
||||
return "all";
|
||||
}
|
||||
GNUNET_assert (0);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user