LCOV - code coverage report
Current view: top level - src - addressbook.h (source / functions) Hit Total Coverage
Test: total_coverage.info Lines: 3 3 100.0 %
Date: 2025-02-23 09:33:43 Functions: 1 1 100.0 %

          Line data    Source code
       1             : // Copyright (c) 2019-2020 The PIVX Core developers
       2             : // Distributed under the MIT software license, see the accompanying
       3             : // file COPYING or http://www.opensource.org/licenses/mit-license.php.
       4             : 
       5             : #ifndef PIVX_ADDRESSBOOK_H
       6             : #define PIVX_ADDRESSBOOK_H
       7             : 
       8             : #include <map>
       9             : #include <string>
      10             : 
      11             : namespace AddressBook {
      12             : 
      13             :     namespace AddressBookPurpose {
      14             :         extern const std::string UNKNOWN;
      15             :         extern const std::string RECEIVE;
      16             :         extern const std::string SEND;
      17             :         extern const std::string DELEGABLE;
      18             :         extern const std::string DELEGATOR;
      19             :         extern const std::string COLD_STAKING;
      20             :         extern const std::string COLD_STAKING_SEND;
      21             :         extern const std::string SHIELDED_RECEIVE;
      22             :         extern const std::string SHIELDED_SEND;
      23             :         extern const std::string EXCHANGE_ADDRESS;
      24             :     }
      25             : 
      26             :     bool IsColdStakingPurpose(const std::string& purpose);
      27             :     bool IsShieldedPurpose(const std::string& purpose);
      28             :     bool IsExchangePurpose(const std::string& purpose);
      29             : 
      30             : /** Address book data */
      31             :     class CAddressBookData {
      32             :     public:
      33             : 
      34             :         std::string name;
      35             :         std::string purpose;
      36             : 
      37        4005 :         CAddressBookData() {
      38        4005 :             purpose = AddressBook::AddressBookPurpose::UNKNOWN;
      39        4005 :         }
      40             : 
      41             :         typedef std::map<std::string, std::string> StringMap;
      42             :         StringMap destdata;
      43             : 
      44             :         bool isSendColdStakingPurpose() const;
      45             :         bool isSendPurpose() const;
      46             :         bool isReceivePurpose() const;
      47             :         bool isShieldedReceivePurpose() const;
      48             :         bool isShielded() const;
      49             :     };
      50             : 
      51             : }
      52             : 
      53             : #endif // PIVX_ADDRESSBOOK_H

Generated by: LCOV version 1.14