Merge #11603: Move RPC registration out of AppInitParameterInteraction
[bitcoinplatinum.git] / src / init.h
bloba0a824738cfe723ce68bbf0d1f01e3f508e1f85c
1 // Copyright (c) 2009-2010 Satoshi Nakamoto
2 // Copyright (c) 2009-2016 The Bitcoin Core developers
3 // Distributed under the MIT software license, see the accompanying
4 // file COPYING or http://www.opensource.org/licenses/mit-license.php.
6 #ifndef BITCOIN_INIT_H
7 #define BITCOIN_INIT_H
9 #include <string>
11 class CScheduler;
12 class CWallet;
14 namespace boost
16 class thread_group;
17 } // namespace boost
19 void StartShutdown();
20 bool ShutdownRequested();
21 /** Interrupt threads */
22 void Interrupt(boost::thread_group& threadGroup);
23 void Shutdown();
24 //!Initialize the logging infrastructure
25 void InitLogging();
26 //!Parameter interaction: change current parameters depending on various rules
27 void InitParameterInteraction();
29 /** Initialize bitcoin core: Basic context setup.
30 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
31 * @pre Parameters should be parsed and config file should be read.
33 bool AppInitBasicSetup();
34 /**
35 * Initialization: parameter interaction.
36 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
37 * @pre Parameters should be parsed and config file should be read, AppInitBasicSetup should have been called.
39 bool AppInitParameterInteraction();
40 /**
41 * Initialization sanity checks: ecc init, sanity checks, dir lock.
42 * @note This can be done before daemonization. Do not call Shutdown() if this function fails.
43 * @pre Parameters should be parsed and config file should be read, AppInitParameterInteraction should have been called.
45 bool AppInitSanityChecks();
46 /**
47 * Lock bitcoin core data directory.
48 * @note This should only be done after daemonization. Do not call Shutdown() if this function fails.
49 * @pre Parameters should be parsed and config file should be read, AppInitSanityChecks should have been called.
51 bool AppInitLockDataDirectory();
52 /**
53 * Bitcoin core main initialization.
54 * @note This should only be done after daemonization. Call Shutdown() if this function fails.
55 * @pre Parameters should be parsed and config file should be read, AppInitLockDataDirectory should have been called.
57 bool AppInitMain(boost::thread_group& threadGroup, CScheduler& scheduler);
59 /** The help message mode determines what help message to show */
60 enum HelpMessageMode {
61 HMM_BITCOIND,
62 HMM_BITCOIN_QT
65 /** Help for options shared between UI and daemon (for -help) */
66 std::string HelpMessage(HelpMessageMode mode);
67 /** Returns licensing information (for -version) */
68 std::string LicenseInfo();
70 #endif // BITCOIN_INIT_H