wsp_server_push_states.def
上传用户:gzpyjq
上传日期:2013-01-31
资源大小:1852k
文件大小:2k
源码类别:

手机WAP编程

开发平台:

WINDOWS

  1. /*
  2.  * wsp_push_server_states.def - macro calls to generate rows of the state 
  3.  * table. See the documentation for guidance how to use and update these.
  4.  *
  5.  * Note that NULL state is called here SERVER_PUSH_NULL_STATE. Condition 1
  6.  * means that an action is unconditional.
  7.  *
  8.  * By Aarno Syv鋘en for Wapit Ltd
  9.  */
  10. STATE_NAME(SERVER_PUSH_NULL_STATE)
  11. STATE_NAME(SERVER_PUSH_PUSHING)
  12. ROW(SERVER_PUSH_NULL_STATE,
  13.     S_ConfirmedPush_Req,
  14.     1,
  15.     {
  16.      WSP_PDU *pdu;
  17.      pdu = make_confirmedpush_pdu(current_event);
  18.      send_invoke(sm, pdu, current_event, TRANSACTION_CLASS_1);
  19.     },
  20.     SERVER_PUSH_PUSHING)
  21. ROW(SERVER_PUSH_PUSHING,
  22.     Push_Abort,
  23.     1,
  24.     {
  25.      send_abort_to_initiator(current_event->u.Push_Abort.reason, 
  26.          pm->transaction_id);
  27.      indicate_pushabort(pm, current_event->u.Push_Abort.reason);
  28.     },
  29.     SERVER_PUSH_NULL_STATE)
  30. ROW(SERVER_PUSH_PUSHING,
  31.     TR_Invoke_Cnf,
  32.     1,
  33.     {
  34.      confirm_push(pm);
  35.     },
  36.     SERVER_PUSH_NULL_STATE)
  37. ROW(SERVER_PUSH_PUSHING,
  38.     TR_Abort_Ind,
  39.     current_event->u.TR_Abort_Ind.abort_code == WSP_ABORT_DISCONNECT,
  40.     {
  41.      WAPEvent *wsp_event;
  42.      
  43.      wsp_event = wap_event_create(Disconnect_Event);
  44.      wsp_event->u.Disconnect_Event.session_handle = pm->server_push_id;
  45.      list_append(queue, wsp_event);
  46.     },
  47.     SERVER_PUSH_NULL_STATE)
  48. ROW(SERVER_PUSH_PUSHING,
  49.     TR_Abort_Ind,
  50.     current_event->u.TR_Abort_Ind.abort_code == WSP_ABORT_SUSPEND,
  51.     {
  52.      WAPEvent *wsp_event;
  53.      wsp_event = wap_event_create(Suspend_Event);
  54.      wsp_event->u.Suspend_Event.session_handle = pm->server_push_id;
  55.      list_append(queue, wsp_event);
  56.     },
  57.     SERVER_PUSH_NULL_STATE)
  58. ROW(SERVER_PUSH_PUSHING,
  59.     TR_Abort_Ind,
  60.     current_event->u.TR_Abort_Ind.abort_code != WSP_ABORT_DISCONNECT  &&
  61.     current_event->u.TR_Abort_Ind.abort_code != WSP_ABORT_SUSPEND,
  62.     {
  63.      indicate_pushabort(pm, current_event->u.Push_Abort.reason);
  64.     },
  65.     SERVER_PUSH_NULL_STATE)
  66. #undef STATE_NAME
  67. #undef ROW