void CLogServer::ControlComplete(CLogSession& aControl) /** * @param aControl - Logfile control class reference * * Checks to see if this control session can be removed */ { if(aControl.SessionCount()) return; // There are no subsessions mapped to the logfile control class and // no data buffers on its write queue // Loop through the server's control array and remove it then delete it TInt i; for(i=0; i<LogControl().Count(); i++) { if(&aControl == LogControl()[i]) { // Done LogControl().Remove(i); delete &aControl; break; } } // If it's the last one then exit the server if(!LogControl().Count()) CActiveScheduler::Stop(); }
CLogServer::~CLogServer() /** * Destructor */ { // Close the array of control structures LogControl().Close(); //Fs().Close(); }
/** Singleton access. */ static LogControl instance() { return LogControl(); }