Author: derek Date: Mon Aug 6 01:10:17 2007 New Revision: 392 Modified: sofaswitch/trunk/sofa/include/sofa/messages.h sofaswitch/trunk/sofa/include/sofa/messlist.h sofaswitch/trunk/sofa/src/messages.cxx sofaswitch/trunk/sofa/src/messlist.cxx Log: Make the ProcessAnswer method virtual. Fix follow on things. Modified: sofaswitch/trunk/sofa/include/sofa/messages.h ============================================================================== --- sofaswitch/trunk/sofa/include/sofa/messages.h (original) +++ sofaswitch/trunk/sofa/include/sofa/messages.h Mon Aug 6 01:10:17 2007 @@ -185,7 +185,7 @@ /**we have received a command advising us how to answer to the incoming call, so we act as required and reply accordingly*/ - virtual void ProcessAnswer(PStringArray &cmds, PString & sender); + virtual void ProcessAnswer(PStringArray &cmds, PString & sender) = 0; /**we have received a command advising us that we are to install udp comms with a particular remote node id. Now, we have to reply Modified: sofaswitch/trunk/sofa/include/sofa/messlist.h ============================================================================== --- sofaswitch/trunk/sofa/include/sofa/messlist.h (original) +++ sofaswitch/trunk/sofa/include/sofa/messlist.h Mon Aug 6 01:10:17 2007 @@ -172,8 +172,11 @@ /**Do the work of actually building a new MessageFrame. This method will be overridden, to create descendants of MessageFrames, and - store them in this list. */ - virtual MessageFrame *BuildMessageFrame(); + store them in this list. + + This method is pure virtual. We DEMAND that the user provides their own + interpretation of this method.*/ + virtual MessageFrame *BuildMessageFrame() = 0; #ifdef DOC_PLUS_PLUS /**The thread, which runs to create new and ready to go instances, runs in here */ Modified: sofaswitch/trunk/sofa/src/messages.cxx ============================================================================== --- sofaswitch/trunk/sofa/src/messages.cxx (original) +++ sofaswitch/trunk/sofa/src/messages.cxx Mon Aug 6 01:10:17 2007 @@ -680,12 +680,13 @@ SendThisMessageTo(PString("Command ") + cmds[0] + PString(" not handled"), sender); } +/* void MessageFrame::ProcessAnswer(PStringArray &cmds, PString & sender) { PTRACE(3, "Messages\tCommand::ProcessAnswer(PStringArray &cmds, PString & sender) Is not overridden. It should be\n"); SendThisMessageTo(PString("Command ") + cmds[0] + PString(" not handled"), sender); } - +*/ void MessageFrame::ProcessTransferUdp(PStringArray &cmds, PString & sender) { Modified: sofaswitch/trunk/sofa/src/messlist.cxx ============================================================================== --- sofaswitch/trunk/sofa/src/messlist.cxx (original) +++ sofaswitch/trunk/sofa/src/messlist.cxx Mon Aug 6 01:10:17 2007 @@ -119,6 +119,7 @@ return NULL; } + MessageFrame *MessageFrameList::GetTheNextMessageFrame() { PWaitAndSignal m(mutex); @@ -257,6 +258,8 @@ return NULL; } +/* + MessageFrame *MessageFrameListProvider::BuildMessageFrame() { PTRACE(3, "Build a mesasge frame "); @@ -266,6 +269,9 @@ mf->WaitUntilInitialised(); return mf; } +*/ + + ///////////////////////////////////////////////////////////////////////////// MessageFrameListPending::MessageFrameListPending() {