Peer::Peer() { m_peerId = 0; m_lastTaskId = 0; m_lastJobId = 0; m_port = 0; m_pMsgQ = MessageQueuePtr(new MessageQueue); m_db = DatabasePtr(new Database); m_pTimerMessages = TimerMessagePtr(new TimerMessage()); }
DatabasePtr MetadataItem::getDatabase() const { if (MetadataItem* m = getParent()) return m->getDatabase(); return DatabasePtr(); }