2018-07-27 00:36:45 +02:00
|
|
|
// Copyright (c) 2017-2018 The Bitcoin Core developers
|
2017-10-08 22:48:07 +02:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2018-03-22 15:19:44 +01:00
|
|
|
#ifndef BITCOIN_WALLET_WALLETUTIL_H
|
|
|
|
#define BITCOIN_WALLET_WALLETUTIL_H
|
2017-10-08 22:48:07 +02:00
|
|
|
|
2018-09-22 01:24:29 +02:00
|
|
|
#include <fs.h>
|
|
|
|
|
|
|
|
#include <vector>
|
2017-10-08 22:48:07 +02:00
|
|
|
|
|
|
|
//! Get the path of the wallet directory.
|
|
|
|
fs::path GetWalletDir();
|
|
|
|
|
2018-09-22 01:24:29 +02:00
|
|
|
//! Get wallets in wallet directory.
|
|
|
|
std::vector<fs::path> ListWalletDir();
|
|
|
|
|
2018-09-28 13:50:04 +02:00
|
|
|
//! The WalletLocation class provides wallet information.
|
|
|
|
class WalletLocation final
|
|
|
|
{
|
|
|
|
std::string m_name;
|
|
|
|
fs::path m_path;
|
|
|
|
|
|
|
|
public:
|
|
|
|
explicit WalletLocation() {}
|
|
|
|
explicit WalletLocation(const std::string& name);
|
|
|
|
|
|
|
|
//! Get wallet name.
|
|
|
|
const std::string& GetName() const { return m_name; }
|
|
|
|
|
|
|
|
//! Get wallet absolute path.
|
|
|
|
const fs::path& GetPath() const { return m_path; }
|
|
|
|
|
|
|
|
//! Return whether the wallet exists.
|
|
|
|
bool Exists() const;
|
|
|
|
};
|
|
|
|
|
2018-03-22 15:19:44 +01:00
|
|
|
#endif // BITCOIN_WALLET_WALLETUTIL_H
|