#ifndef __APPLICATION__ #define __APPLICATION__ #include "UniqueNodeList.h" #include "ConnectionPool.h" #include "KnownNodeList.h" #include "TimingService.h" #include "PubKeyCache.h" #include "ScopedLock.h" #include "LedgerMaster.h" #include "Wallet.h" #include "Peer.h" #include "database/database.h" #include class RPCDoor; class PeerDoor; class Application { TimingService mTimingService; UniqueNodeList mUNL; KnownNodeList mKnownNodes; Wallet mWallet; PubKeyCache mPKCache; LedgerMaster mMasterLedger; Database* mDatabase; ConnectionPool mConnectionPool; PeerDoor* mPeerDoor; RPCDoor* mRPCDoor; std::map mPeerMap; boost::recursive_mutex mPeerMapLock; boost::asio::io_service mIOService; boost::recursive_mutex dbLock; public: Application(); ConnectionPool& getConnectionPool() { return(mConnectionPool); } UniqueNodeList& getUNL() { return(mUNL); } Wallet& getWallet() { return(mWallet); } PubKeyCache& getPubKeyCache() { return mPKCache; } boost::asio::io_service& getIOService() { return mIOService; } LedgerMaster& getMasterLedger() { return mMasterLedger; } ScopedLock getDBLock() { return ScopedLock(dbLock); } void setDB(Database* db) { mDatabase=db; } Database* getDB() { return(mDatabase); } //Serializer* getSerializer(){ return(mSerializer); } //void setSerializer(Serializer* ser){ mSerializer=ser; } void run(); }; extern Application* theApp; #endif