mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 22:38:38 +00:00
event_socket connection lib for twisted python apps
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@5828 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
01e2f20bc0
commit
bf98f981e1
13 files changed
+2347
No files matched your search
@@ -0,0 +1,96 @@
|
||||
%start MainMap::Startup
|
||||
%class ApiRequest
|
||||
|
||||
%map MainMap
|
||||
%%
|
||||
|
||||
Startup
|
||||
{
|
||||
ApiResponse
|
||||
ApiResponseStarted
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
ApiResponseStarted
|
||||
{
|
||||
ContentLength
|
||||
ContentPreStarted
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ContentPreStarted
|
||||
{
|
||||
BlankLine
|
||||
ContentStarted
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ContentStarted
|
||||
{
|
||||
ProcessLine(line)
|
||||
[ctxt.add_content(line) == True]
|
||||
Startup
|
||||
{
|
||||
setRequestFinished(); callbackDeferred(ctxt.getResponse());
|
||||
}
|
||||
|
||||
ProcessLine(line)
|
||||
nil
|
||||
{
|
||||
// for some reason, have to add doNothing() here or
|
||||
// importing smc will fail. looks like smc bug.
|
||||
doNothing();
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Default
|
||||
{
|
||||
BlankLine
|
||||
nil
|
||||
{
|
||||
setRequestFinished();
|
||||
errbackDeferred("Protocol failure");
|
||||
}
|
||||
|
||||
ContentFinished
|
||||
nil
|
||||
{
|
||||
setRequestFinished();
|
||||
errbackDeferred("Protocol failure");
|
||||
}
|
||||
|
||||
ContentLength
|
||||
nil
|
||||
{
|
||||
setRequestFinished();
|
||||
errbackDeferred("Protocol failure");
|
||||
}
|
||||
|
||||
ApiResponse
|
||||
nil
|
||||
{
|
||||
setRequestFinished();
|
||||
errbackDeferred("Protocol failure");
|
||||
}
|
||||
|
||||
ProcessLine(line)
|
||||
nil
|
||||
{
|
||||
setRequestFinished();
|
||||
errbackDeferred("Protocol failure");
|
||||
}
|
||||
}
|
||||
|
||||
%%
|
||||
Reference in new issue
Block a user