[Sofaswitch-svn] [commit] r137 - sofaswitch/trunk/callflow/src
Author: derek Date: Wed Sep 27 21:34:12 2006 New Revision: 137 Modified: sofaswitch/trunk/callflow/src/Makefile.am sofaswitch/trunk/callflow/src/Makefile.in sofaswitch/trunk/callflow/src/callflow.cpp sofaswitch/trunk/callflow/src/callflow.h sofaswitch/trunk/callflow/src/dnd.cpp sofaswitch/trunk/callflow/src/dnd.h sofaswitch/trunk/callflow/src/drawshape.h Log: Add the death image, and make relevant changes. Modified: sofaswitch/trunk/callflow/src/Makefile.am ============================================================================== --- sofaswitch/trunk/callflow/src/Makefile.am (original) +++ sofaswitch/trunk/callflow/src/Makefile.am Wed Sep 27 21:34:12 2006 @@ -31,6 +31,7 @@ ../bitmaps/Python.xpm \ ../bitmaps/RequestNode.xpm \ ../bitmaps/compile.xpm \ + ../bitmaps/death.xpm \ ../bitmaps/endcall.xpm \ ../bitmaps/eventer.xpm \ ../bitmaps/makecall.xpm \ @@ -50,6 +51,8 @@ canvas.h \ conditional.cpp \ conditional.h \ + death.cpp \ + death.h \ dnd.cpp \ dnd.h \ drawshape.cpp \ Modified: sofaswitch/trunk/callflow/src/Makefile.in ============================================================================== --- sofaswitch/trunk/callflow/src/Makefile.in (original) +++ sofaswitch/trunk/callflow/src/Makefile.in Wed Sep 27 21:34:12 2006 @@ -49,10 +49,10 @@ binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) PROGRAMS = $(bin_PROGRAMS) am_callflow_OBJECTS = callflow.$(OBJEXT) callstartstop.$(OBJEXT) \ - canvas.$(OBJEXT) conditional.$(OBJEXT) dnd.$(OBJEXT) \ - drawshape.$(OBJEXT) endcall.$(OBJEXT) endfor.$(OBJEXT) \ - endhere.$(OBJEXT) eventer.$(OBJEXT) fileio.$(OBJEXT) \ - information.$(OBJEXT) joinblocks.$(OBJEXT) \ + canvas.$(OBJEXT) conditional.$(OBJEXT) death.$(OBJEXT) \ + dnd.$(OBJEXT) drawshape.$(OBJEXT) endcall.$(OBJEXT) \ + endfor.$(OBJEXT) endhere.$(OBJEXT) eventer.$(OBJEXT) \ + fileio.$(OBJEXT) information.$(OBJEXT) joinblocks.$(OBJEXT) \ listpoints.$(OBJEXT) loadnewgraph.$(OBJEXT) makecall.$(OBJEXT) \ python.$(OBJEXT) readfromfile.$(OBJEXT) requestnode.$(OBJEXT) \ senddtmf.$(OBJEXT) shapelist.$(OBJEXT) shapeselect.$(OBJEXT) \ @@ -210,6 +210,7 @@ ../bitmaps/Python.xpm \ ../bitmaps/RequestNode.xpm \ ../bitmaps/compile.xpm \ + ../bitmaps/death.xpm \ ../bitmaps/endcall.xpm \ ../bitmaps/eventer.xpm \ ../bitmaps/makecall.xpm \ @@ -229,6 +230,8 @@ canvas.h \ conditional.cpp \ conditional.h \ + death.cpp \ + death.h \ dnd.cpp \ dnd.h \ drawshape.cpp \ @@ -353,6 +356,7 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callstartstop.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canvas.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/conditional.Po@am__quote@ +@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/death.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dnd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/drawshape.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/endcall.Po@am__quote@ Modified: sofaswitch/trunk/callflow/src/callflow.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/callflow.cpp (original) +++ sofaswitch/trunk/callflow/src/callflow.cpp Wed Sep 27 21:34:12 2006 @@ -39,6 +39,7 @@ #include "bitmaps/Python.xpm" #include "bitmaps/RequestNode.xpm" #include "bitmaps/compile.xpm" +#include "bitmaps/death.xpm" #include "bitmaps/endcall.xpm" #include "bitmaps/eventer.xpm" #include "bitmaps/makecall.xpm" @@ -71,6 +72,7 @@ BEGIN_EVENT_TABLE(MyFrame, wxFrame) EVT_MENU ( wxH_CONTROLSCOMPILE, MyFrame::OnCompile) EVT_MENU ( wxH_CONTROLSCONNECT_OBJECTS, MyFrame::OnControlsConnectObjects) + EVT_MENU ( wxH_CONTROLSDEATH, MyFrame::OnControlsDeath) EVT_MENU ( wxH_CONTROLSENDCALL, MyFrame::OnControlsEndCall) EVT_MENU ( wxH_CONTROLSENDHERE, MyFrame::OnControlsendhere) EVT_MENU ( wxH_CONTROLSEND_FOR, MyFrame::OnControlsend_for) @@ -145,6 +147,7 @@ File_menu -> Append ( wxH_FILESAVE__AS, wxT("Save &As"), wxT("")); File_menu -> Append ( wxH_FILEE_XIT, wxT("E&xit"), wxT("")); Controls_menu -> Append ( wxH_CONTROLSCONNECT_OBJECTS, wxT("connect objects"), wxT("")); + Controls_menu -> Append ( wxH_CONTROLSDEATH, wxT("Terminate all procesing "), wxT("")); Controls_menu -> Append ( wxH_CONTROLSENDCALL, wxT("end a call (send hangup)"), wxT("")); Controls_menu -> Append ( wxH_CONTROLSENDHERE, wxT("end here"), wxT("")); Controls_menu -> Append ( wxH_CONTROLSEND_FOR, wxT("end for"), wxT("")); @@ -318,6 +321,7 @@ toolBar->AddSeparator() ; + toolBar->AddTool(wxH_CONTROLSDEATH, wxBitmap ( death ), wxT("End all processing in this flow chart")); toolBar->AddTool(wxH_CONTROLSENDCALL, wxBitmap ( endcall ), wxT("End a call (send hangup)")); toolBar->AddTool(wxH_CONTROLSSTARTHERE, wxBitmap ( Controlsstart ), wxT("Start processing")); toolBar->AddTool(wxH_CONTROLSENDHERE, wxBitmap ( ControlsEndHere ), wxT("End processing")); @@ -419,6 +423,12 @@ void MyFrame::OnControlspython (wxCommandEvent & WXUNUSED(event)) { imageTypeForPlacing = DndShape::Python; + canvas->SetEditingMode(MyCanvas::PlaceOneShape); +} + +void MyFrame::OnControlsDeath (wxCommandEvent & WXUNUSED(event)) +{ + imageTypeForPlacing = DndShape::Death; canvas->SetEditingMode(MyCanvas::PlaceOneShape); } Modified: sofaswitch/trunk/callflow/src/callflow.h ============================================================================== --- sofaswitch/trunk/callflow/src/callflow.h (original) +++ sofaswitch/trunk/callflow/src/callflow.h Wed Sep 27 21:34:12 2006 @@ -13,6 +13,7 @@ wxH_FILE = 1, wxH_CONTROLSCOMPILE, wxH_CONTROLSCONNECT_OBJECTS, + wxH_CONTROLSDEATH, wxH_CONTROLSENDCALL, wxH_CONTROLSENDHERE, wxH_CONTROLSEND_FOR, @@ -116,6 +117,11 @@ current graph. This widget will cause the dtmf char string to go to the remote sofaswitch worker. */ void OnControlsSendDtmf (wxCommandEvent & event); + + /**Called in response to a user comand to add a "Death" widget to the + current graph. In other words, send a terminate this control flow now + request */ + void OnControlsDeath (wxCommandEvent & event); /**Called in response to a user comand to add a "End Call" widget to the current graph. In other words, send a hangup message to the remote Modified: sofaswitch/trunk/callflow/src/dnd.cpp ============================================================================== --- sofaswitch/trunk/callflow/src/dnd.cpp (original) +++ sofaswitch/trunk/callflow/src/dnd.cpp Wed Sep 27 21:34:12 2006 @@ -384,6 +384,9 @@ if (thisKind == EndCall) return DndShapeEndCall::GetKindName(); + if (thisKind == Death) + return DndShapeDeath::GetKindName(); + if (thisKind == Select) return DndShapeSelect::GetKindName(); @@ -499,6 +502,7 @@ printf("Construct a shape of null\n"); return NULL; case Conditional: return new DndShapeConditional(); + case Death: return new DndShapeDeath(); case EndCall: return new DndShapeEndCall(); case EndFor: return new DndShapeEndFor(); case EndHere: return new DndShapeEndHere(); Modified: sofaswitch/trunk/callflow/src/dnd.h ============================================================================== --- sofaswitch/trunk/callflow/src/dnd.h (original) +++ sofaswitch/trunk/callflow/src/dnd.h Wed Sep 27 21:34:12 2006 @@ -270,7 +270,8 @@ /**17*/ WriteToFile /**Write audio into a .wav file (answering machine specific) */, /**18*/ LoadNewGraph /**Read in an existing graph file (pre compiled) for a new thread of exeuction */, /**19*/ SendDtmf /**Send a dtmf symbol to some sofaswitch worker node */, - /* 20*/ KnownShapes /**Indicates the number of known shapes we can manage */ + /**20*/ Death /**End all processing of this call flow now */, + /* 21*/ KnownShapes /**Indicates the number of known shapes we can manage */ }; /**Constructor to a predefined shape */ Modified: sofaswitch/trunk/callflow/src/drawshape.h ============================================================================== --- sofaswitch/trunk/callflow/src/drawshape.h (original) +++ sofaswitch/trunk/callflow/src/drawshape.h Wed Sep 27 21:34:12 2006 @@ -2,6 +2,7 @@ #define _drawshape_h #include "conditional.h" +#include "death.h" #include "endcall.h" #include "endfor.h" #include "endhere.h"
participants (1)
-
SofaSWITCH SVN