wsp_server_push_states.def
资源名称:gateway-1.2.1 [点击查看]
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:2k
源码类别:
手机WAP编程
开发平台:
WINDOWS
- /*
- * wsp_push_server_states.def - macro calls to generate rows of the state
- * table. See the documentation for guidance how to use and update these.
- *
- * Note that NULL state is called here SERVER_PUSH_NULL_STATE. Condition 1
- * means that an action is unconditional.
- *
- * By Aarno Syv鋘en for Wapit Ltd
- */
- STATE_NAME(SERVER_PUSH_NULL_STATE)
- STATE_NAME(SERVER_PUSH_PUSHING)
- ROW(SERVER_PUSH_NULL_STATE,
- S_ConfirmedPush_Req,
- 1,
- {
- WSP_PDU *pdu;
- pdu = make_confirmedpush_pdu(current_event);
- send_invoke(sm, pdu, current_event, TRANSACTION_CLASS_1);
- },
- SERVER_PUSH_PUSHING)
- ROW(SERVER_PUSH_PUSHING,
- Push_Abort,
- 1,
- {
- send_abort_to_initiator(current_event->u.Push_Abort.reason,
- pm->transaction_id);
- indicate_pushabort(pm, current_event->u.Push_Abort.reason);
- },
- SERVER_PUSH_NULL_STATE)
- ROW(SERVER_PUSH_PUSHING,
- TR_Invoke_Cnf,
- 1,
- {
- confirm_push(pm);
- },
- SERVER_PUSH_NULL_STATE)
- ROW(SERVER_PUSH_PUSHING,
- TR_Abort_Ind,
- current_event->u.TR_Abort_Ind.abort_code == WSP_ABORT_DISCONNECT,
- {
- WAPEvent *wsp_event;
- wsp_event = wap_event_create(Disconnect_Event);
- wsp_event->u.Disconnect_Event.session_handle = pm->server_push_id;
- list_append(queue, wsp_event);
- },
- SERVER_PUSH_NULL_STATE)
- ROW(SERVER_PUSH_PUSHING,
- TR_Abort_Ind,
- current_event->u.TR_Abort_Ind.abort_code == WSP_ABORT_SUSPEND,
- {
- WAPEvent *wsp_event;
- wsp_event = wap_event_create(Suspend_Event);
- wsp_event->u.Suspend_Event.session_handle = pm->server_push_id;
- list_append(queue, wsp_event);
- },
- SERVER_PUSH_NULL_STATE)
- ROW(SERVER_PUSH_PUSHING,
- TR_Abort_Ind,
- current_event->u.TR_Abort_Ind.abort_code != WSP_ABORT_DISCONNECT &&
- current_event->u.TR_Abort_Ind.abort_code != WSP_ABORT_SUSPEND,
- {
- indicate_pushabort(pm, current_event->u.Push_Abort.reason);
- },
- SERVER_PUSH_NULL_STATE)
- #undef STATE_NAME
- #undef ROW