diff options
Diffstat (limited to 'src/include/taler_exchange_service.h')
-rw-r--r-- | src/include/taler_exchange_service.h | 72 |
1 files changed, 55 insertions, 17 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index a57a2655a..307a76de8 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h | |||
@@ -1581,31 +1581,67 @@ struct TALER_EXCHANGE_TransfersGetHandle; | |||
1581 | 1581 | ||
1582 | 1582 | ||
1583 | /** | 1583 | /** |
1584 | * Information the exchange returns per wire transfer. | ||
1585 | */ | ||
1586 | struct TALER_EXCHANGE_TransferData | ||
1587 | { | ||
1588 | |||
1589 | /** | ||
1590 | * exchange key used to sign | ||
1591 | */ | ||
1592 | struct TALER_ExchangePublicKeyP exchange_pub; | ||
1593 | |||
1594 | /** | ||
1595 | * exchange signature over the transfer data | ||
1596 | */ | ||
1597 | struct TALER_ExchangeSignatureP exchange_sig; | ||
1598 | |||
1599 | /** | ||
1600 | * hash of the wire transfer address the transfer went to | ||
1601 | */ | ||
1602 | struct GNUNET_HashCode h_wire; | ||
1603 | |||
1604 | /** | ||
1605 | * time when the exchange claims to have performed the wire transfer | ||
1606 | */ | ||
1607 | struct GNUNET_TIME_Absolute execution_time; | ||
1608 | |||
1609 | /** | ||
1610 | * amount of the wire transfer | ||
1611 | */ | ||
1612 | struct TALER_Amount total_amount; | ||
1613 | |||
1614 | /** | ||
1615 | * wire fee that was charged by the exchange | ||
1616 | */ | ||
1617 | struct TALER_Amount wire_fee; | ||
1618 | |||
1619 | /** | ||
1620 | * length of the @e details array | ||
1621 | */ | ||
1622 | unsigned int details_length; | ||
1623 | |||
1624 | /** | ||
1625 | * array with details about the combined transactions | ||
1626 | */ | ||
1627 | const struct TALER_TrackTransferDetails *details; | ||
1628 | |||
1629 | }; | ||
1630 | |||
1631 | |||
1632 | /** | ||
1584 | * Function called with detailed wire transfer data, including all | 1633 | * Function called with detailed wire transfer data, including all |
1585 | * of the coin transactions that were combined into the wire transfer. | 1634 | * of the coin transactions that were combined into the wire transfer. |
1586 | * | 1635 | * |
1587 | * @param cls closure | 1636 | * @param cls closure |
1588 | * @param hr HTTP response data | 1637 | * @param hr HTTP response data |
1589 | * @param sign_key exchange key used to sign @a json, or NULL | 1638 | * @param ta transfer data, (set only if @a http_status is #MHD_HTTP_OK, otherwise NULL) |
1590 | * @param h_wire hash of the wire transfer address the transfer went to, or NULL on error | ||
1591 | * @param execution_time time when the exchange claims to have performed the wire transfer | ||
1592 | * @param total_amount total amount of the wire transfer, or NULL if the exchange could | ||
1593 | * not provide any @a wtid (set only if @a http_status is #MHD_HTTP_OK) | ||
1594 | * @param wire_fee wire fee that was charged by the exchange | ||
1595 | * @param details_length length of the @a details array | ||
1596 | * @param details array with details about the combined transactions | ||
1597 | */ | 1639 | */ |
1598 | typedef void | 1640 | typedef void |
1599 | (*TALER_EXCHANGE_TransfersGetCallback)( | 1641 | (*TALER_EXCHANGE_TransfersGetCallback)( |
1600 | void *cls, | 1642 | void *cls, |
1601 | const struct TALER_EXCHANGE_HttpResponse *hr, | 1643 | const struct TALER_EXCHANGE_HttpResponse *hr, |
1602 | const struct TALER_ExchangePublicKeyP *sign_key, | 1644 | const struct TALER_EXCHANGE_TransferData *ta); |
1603 | const struct GNUNET_HashCode *h_wire, | ||
1604 | struct GNUNET_TIME_Absolute execution_time, | ||
1605 | const struct TALER_Amount *total_amount, | ||
1606 | const struct TALER_Amount *wire_fee, | ||
1607 | unsigned int details_length, | ||
1608 | const struct TALER_TrackTransferDetails *details); | ||
1609 | 1645 | ||
1610 | 1646 | ||
1611 | /** | 1647 | /** |
@@ -1651,17 +1687,19 @@ struct TALER_EXCHANGE_DepositGetHandle; | |||
1651 | * | 1687 | * |
1652 | * @param cls closure | 1688 | * @param cls closure |
1653 | * @param hr HTTP response data | 1689 | * @param hr HTTP response data |
1654 | * @param sign_key exchange key used to sign @a json, or NULL | 1690 | * @param exchange_pub exchange key used to sign @a json, or NULL |
1655 | * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not | 1691 | * @param wtid wire transfer identifier used by the exchange, NULL if exchange did not |
1656 | * yet execute the transaction | 1692 | * yet execute the transaction |
1657 | * @param execution_time actual or planned execution time for the wire transfer | 1693 | * @param execution_time actual or planned execution time for the wire transfer |
1658 | * @param coin_contribution contribution to the total amount by this coin (can be NULL) | 1694 | * @param coin_contribution contribution to the total amount by this coin (can be NULL) |
1695 | * // FIXME: also return the exchange signature | ||
1696 | * // FIXME: combine all of the above (except cls,hr) into a 'struct'! => DepositData | ||
1659 | */ | 1697 | */ |
1660 | typedef void | 1698 | typedef void |
1661 | (*TALER_EXCHANGE_DepositGetCallback)( | 1699 | (*TALER_EXCHANGE_DepositGetCallback)( |
1662 | void *cls, | 1700 | void *cls, |
1663 | const struct TALER_EXCHANGE_HttpResponse *hr, | 1701 | const struct TALER_EXCHANGE_HttpResponse *hr, |
1664 | const struct TALER_ExchangePublicKeyP *sign_key, | 1702 | const struct TALER_ExchangePublicKeyP *exchange_pub, |
1665 | const struct TALER_WireTransferIdentifierRawP *wtid, | 1703 | const struct TALER_WireTransferIdentifierRawP *wtid, |
1666 | struct GNUNET_TIME_Absolute execution_time, | 1704 | struct GNUNET_TIME_Absolute execution_time, |
1667 | const struct TALER_Amount *coin_contribution); | 1705 | const struct TALER_Amount *coin_contribution); |