⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http_get_config_status.hxx

📁 模拟移动客户端软件飞信登录的状态机器定义代码。
💻 HXX
字号:
//====================================================================//                // Copyright (C) 2006-2007,  Frank.Ning//                // Filename:      http_get_config_status.hxx// Author:        Frank.Ning <zegong.ning@dinglicom.com>// Description:   //                // $Id:$//                //====================================================================#ifndef __HTTP_GET_CONFIG_STATUS_HXX__#define __HTTP_GET_CONFIG_STATUS_HXX__static const char* const http_get_config_status_hxx_version =   "$Id:$";#include "status.hxx"struct http_get_config_status : public fsm::state<http_get_config_status, RegisterList, bool>{      bool on_process( shared_ptr<event> evt )      {         shared_ptr<http_event> he;         he.reset( evt );         if( !he )            return false ;         shared_ptr<http_msg<http_hdr> > msg = he->get_msg( );         if( !msg )            return false ;         shared_ptr<http_request<http_hdr> > request;         request.reset( msg );         if( request )            return on_process( request );         shared_ptr<http_status<http_hdr> > status ;         status.reset( msg );         if( status )            return on_process( status );         return false ;      }      bool on_process( shared_ptr<http_request<http_hdr> > request )      {         ua_callctl& ua = ua_callctl::instance( );                  if( ua.has_server_config( ) )            return true ;                  ua.set_last_http_request( request );                  ua.get_output_channel( )->add( shared_ptr<http_event>( request ) );         return true ;               }      bool on_process( shared_ptr<http_status<http_hdr> > status )      {         ua_callctl& ua = ua_callctl::instance( );         ua.set_last_http_status( status );         if( ua.check_server_config( ) )         {                        switch_to<http_ssi_protal_status>( );            return true ;         }         else            // resend get config            ua.get_output_channel( )->add( shared_ptr<http_event>( ua.get_last_http_request( ) ) );                  return false ;      }};#endif            

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -