2007-10-07 12:47:10 -04:00
|
|
|
%start MainMap::Startup
|
|
|
|
%class BgApiRequest
|
|
|
|
|
|
|
|
%map MainMap
|
|
|
|
%%
|
|
|
|
|
|
|
|
Startup
|
|
|
|
{
|
|
|
|
CommandReply
|
|
|
|
ApiResponseStarted
|
|
|
|
{
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ApiResponseStarted
|
|
|
|
{
|
|
|
|
ReplyText
|
|
|
|
GotReplyText
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
GotReplyText
|
|
|
|
{
|
|
|
|
BlankLine
|
2008-07-13 00:10:52 -04:00
|
|
|
nil
|
2007-10-07 12:47:10 -04:00
|
|
|
{
|
2008-07-13 00:10:52 -04:00
|
|
|
|
2007-10-07 12:47:10 -04:00
|
|
|
}
|
|
|
|
|
2008-07-13 00:10:52 -04:00
|
|
|
JobUuid
|
|
|
|
Startup
|
|
|
|
{
|
|
|
|
setRequestFinished(); callOrErrback();
|
|
|
|
}
|
2007-10-07 12:47:10 -04:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Default
|
|
|
|
{
|
|
|
|
BlankLine
|
|
|
|
nil
|
|
|
|
{
|
|
|
|
setRequestFinished();
|
2008-07-13 00:10:52 -04:00
|
|
|
errbackDeferred("Protocol failure - was not expecting blank line"); }
|
2007-10-07 12:47:10 -04:00
|
|
|
|
|
|
|
CommandReply
|
|
|
|
nil
|
|
|
|
{
|
|
|
|
setRequestFinished();
|
2008-07-12 23:14:44 -04:00
|
|
|
errbackDeferred("Protocol failure - was not expecting command reply");
|
2007-10-07 12:47:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ReplyText
|
|
|
|
nil
|
|
|
|
{
|
|
|
|
setRequestFinished();
|
2008-07-12 23:14:44 -04:00
|
|
|
errbackDeferred("Protocol failure - was not expecting reply text");
|
2007-10-07 12:47:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
ProcessLine(line)
|
|
|
|
nil
|
|
|
|
{
|
|
|
|
setRequestFinished();
|
2008-07-13 00:10:52 -04:00
|
|
|
errbackDeferred("Protocol failure handling bgapi response - was not expecting line needing to be processed");
|
2007-10-07 12:47:10 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
%%
|