[Sofaswitch-svn] [commit] r248 - in sofaswitch/trunk/sofa: include/sofa src
Author: derek Date: Mon May 14 22:16:25 2007 New Revision: 248 Modified: sofaswitch/trunk/sofa/include/sofa/messages.h sofaswitch/trunk/sofa/src/messages.cxx Log: Change some args to const PString &, which saves on CPU. Modified: sofaswitch/trunk/sofa/include/sofa/messages.h ============================================================================== --- sofaswitch/trunk/sofa/include/sofa/messages.h (original) +++ sofaswitch/trunk/sofa/include/sofa/messages.h Mon May 14 22:16:25 2007 @@ -220,7 +220,7 @@ application would not override this method, as this mthod does check that a file name is provided. This method will call SetReadFile, which the application will override */ - virtual void ProcessSetWriteFile(PStringArray &cmds, PString & sender); + virtual void ProcessSetWriteFile(PStringArray &cmds, const PString & sender); /**we have received a command asking us to set the file that we read from and then transmit over ethernet to the remote @@ -229,7 +229,7 @@ method, as this mthod does check that a file name is provided. This method will call SetWriteFile, which the application will override */ - virtual void ProcessSetReadFile(PStringArray &cmds, PString & sender); + virtual void ProcessSetReadFile(PStringArray &cmds, const PString & sender); #ifdef PMEMORY_CHECK /**we have received a command asking us to write all current allocations to the specified @@ -244,7 +244,7 @@ for the answering machine. The method name (SetWriteFile) describes what we do to the specified file - we are writing to this file*/ - virtual void SetWriteFile(PString & newWriteFile); + virtual void SetWriteFile(const PString & newWriteFile); /**Actually set the read file. We will extract PCM data from this file. An application will override this method, if it is @@ -252,7 +252,7 @@ answering machine. The method name (SetReadFile) describes what we do to the specified file - we are reading from this file*/ - virtual void SetReadFile(PString & newReadFile); + virtual void SetReadFile(const PString & newReadFile); /**Send this dtmf string to the remote node. Returns TRUE on success, FALSE on failure. Modified: sofaswitch/trunk/sofa/src/messages.cxx ============================================================================== --- sofaswitch/trunk/sofa/src/messages.cxx (original) +++ sofaswitch/trunk/sofa/src/messages.cxx Mon May 14 22:16:25 2007 @@ -803,7 +803,7 @@ } -void MessageFrame::ProcessSetReadFile(PStringArray &cmds, PString & sender) +void MessageFrame::ProcessSetReadFile(PStringArray &cmds, const PString & sender) { if (cmds.GetSize() != 2) { PTRACE(3, cmds[0] << " Failed - Read file not correctly specified" @@ -814,7 +814,7 @@ SetReadFile(cmds[1]); } -void MessageFrame::ProcessSetWriteFile(PStringArray &cmds, PString & sender) +void MessageFrame::ProcessSetWriteFile(PStringArray &cmds, const PString & sender) { if (cmds.GetSize() != 2) { PTRACE(3, cmds[0] << " Failed - Read file not correctly specified" @@ -890,12 +890,12 @@ return TRUE; } -void MessageFrame::SetWriteFile(PString & newWriteFile) +void MessageFrame::SetWriteFile(const PString & newWriteFile) { PTRACE(1, "SetWriteFile() is not implemented, and it should be"); } -void MessageFrame::SetReadFile(PString & newReadFile) +void MessageFrame::SetReadFile(const PString & newReadFile) { PTRACE(1, "SetReadFile() is not implemented, and it should be"); }
participants (1)
-
SofaSWITCH SVN