mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 11:05:54 +00:00
61 lines
1.2 KiB
C++
61 lines
1.2 KiB
C++
#ifndef __APPLICATION__
|
|
#define __APPLICATION__
|
|
|
|
#include "UniqueNodeList.h"
|
|
#include "ConnectionPool.h"
|
|
#include "KnownNodeList.h"
|
|
#include "TimingService.h"
|
|
#include "PubKeyCache.h"
|
|
#include "ScopedLock.h"
|
|
#include "Wallet.h"
|
|
#include "database/database.h"
|
|
|
|
#include <boost/asio.hpp>
|
|
|
|
class RPCDoor;
|
|
class PeerDoor;
|
|
|
|
|
|
class Application
|
|
{
|
|
TimingService mTimingService;
|
|
UniqueNodeList mUNL;
|
|
KnownNodeList mKnownNodes;
|
|
Wallet mWallet;
|
|
PubKeyCache mPKCache;
|
|
Database* mDatabase;
|
|
|
|
|
|
ConnectionPool mConnectionPool;
|
|
PeerDoor* mPeerDoor;
|
|
RPCDoor* mRPCDoor;
|
|
//Serializer* mSerializer;
|
|
|
|
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; }
|
|
Database* getDB() { return(mDatabase); }
|
|
ScopedLock getDBLock() { return ScopedLock(dbLock); }
|
|
|
|
void setDB(Database* db) { mDatabase=db; }
|
|
|
|
//Serializer* getSerializer(){ return(mSerializer); }
|
|
//void setSerializer(Serializer* ser){ mSerializer=ser; }
|
|
|
|
|
|
void run();
|
|
|
|
|
|
};
|
|
|
|
extern Application* theApp;
|
|
|
|
#endif |