亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? netdiagnostics.c

?? 基于高通的brew平臺上的手機網絡診斷程序netdiagnostics
?? C
?? 第 1 頁 / 共 4 頁
字號:
   }

   for (i = 0; i < ARRAY_SIZE(pApp->m_ppszHistory); ++i) {
      FREE(pApp->m_ppszHistory[i]);
   }
   
   // Release memory buffers
   FREE(pApp->m_pszFormData);    // FREE(NULL) is okay in BREW

   // Release other interfaces
   ReleaseObj((void**)&pApp->m_pFileMgr);
   ReleaseObj((void**)&pApp->m_pHTMLViewer);
   ReleaseObj((void**)&pApp->m_pINetMgr);
   ReleaseObj((void**)&pApp->m_pIWeb);
}

//*****************************************************************************
// EVENT HANDLING FUNCTIONS
//*****************************************************************************

/*===========================================================================

FUNCTION: ND_HandleEvent

DESCRIPTION:
	This is the main EventHandler for this app. All events to this app are handled in this
	function. All APPs must supply an Event Handler.  Key events are passed to specific
  event-handers depending on the current state of the application.

PARAMETERS:
	pi [in] - Pointer to the AEEApplet structure. This structure contains information specific
  	to this applet. It was initialized during the AEEClsCreateInstance() function.

	eCode [in] - Specifies the Event sent to this applet

  wParam [in] - Event specific data.

  dwParam [in] - Event specific data.

DEPENDENCIES:
  None

RETURN VALUE:
  TRUE - If the app has processed the event
  FALSE - If the app did not process the event

SIDE EFFECTS:
  None
===========================================================================*/

static boolean ND_HandleEvent(CNetDiagnosticsApp* pApp, AEEEvent eCode, uint16 wParam, uint32 dwParam )
{
   if (pApp->m_pIStatic && ISTATIC_HandleEvent(pApp->m_pIStatic, eCode, wParam, dwParam))
      return TRUE;
   if (IHTMLVIEWER_HandleEvent(pApp->m_pHTMLViewer, eCode, wParam, dwParam))
      return TRUE;

   switch(eCode)
   {
      case EVT_APP_START:
         ND_DisplaySplashScreen(pApp);
         return TRUE;

      case EVT_APP_STOP:
         return TRUE;

      case EVT_APP_SUSPEND:
         // Stop any current network or web access processes.  These functions
         // also cancel all appropriate callbacks.

         ND_EchoCleanup( pApp);
         ND_HTTPCleanup( pApp);

         // Cleanup all timers

         ISHELL_CancelTimer( pApp->a.m_pIShell, (PFNNOTIFY)ND_DisplaySplashScreenCB, pApp);

         // Set all controls to the inactive state

         if( pApp->m_pHTMLViewer )
            IHTMLVIEWER_SetActive( pApp->m_pHTMLViewer, FALSE );

         return TRUE;

      case EVT_APP_RESUME:
         IHTMLVIEWER_SetRect( pApp->m_pHTMLViewer, &pApp->m_rc );
         IHTMLVIEWER_SetActive( pApp->m_pHTMLViewer, TRUE );
         return TRUE;

      case EVT_KEY:
         switch (wParam)
         {
            case AVK_CLR:
               // call cleanup function
               if( pApp->m_cntHistory > 1 )
               {
                 ND_GoTo(pApp, NULL);
                 return TRUE;
               }
         }
         break;
   }
   return FALSE;
}

//*****************************************************************************
// HTML VIEWER NOTIFICATION CALLBACK FUNCTIONS
//****************************************************************************
static void ND_NotifyCB( void* pvUser, HViewNotify* pNotify )
{
   CNetDiagnosticsApp* pApp = (CNetDiagnosticsApp*) pvUser;

   switch( pNotify->code )
   {

   case HVN_REDRAW_SCREEN:
      IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);
      IHTMLVIEWER_Redraw(pApp->m_pHTMLViewer);
      break;

   case HVN_JUMP:
   case HVN_SUBMIT:
      ND_GoTo(pApp, pNotify->u.jump.pszURL);
      break;

   case HVN_DONE:
      IHTMLVIEWER_SetRect(pApp->m_pHTMLViewer, &pApp->m_rc);
      IHTMLVIEWER_Redraw( pApp->m_pHTMLViewer );
      break;

   }
}



/*===========================================================================

FUNCTION: ND_GoTo

DESCRIPTION:

   Activate the appropriate view as described by the given URL.  This adds an
   entry onto the history list, or returns to the previous history entry.

PARAMETERS:
   pszURL = URL describing the view to activate and add to the history,
            or NULL to indicate that the previous history entry should be used

   pData [in] - The user data pointer that is passed as the only parameter
    to the callback.

DEPENDENCIES:
  None

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/

static void ND_GoTo(CNetDiagnosticsApp *pApp, const char *pszURL)
{
   int pos = pApp->m_cntHistory;    // pos = number of hist entries = next history entry

   if (pszURL == NULL) {
      // go back
      if (pos < 2)
         return;
      --pos;
      pszURL = pApp->m_ppszHistory[pos-1];   // use 'top' entry
   } else {
      // add new entry to history
      if (pos >= MAX_HIST)
         return;
      ++pos;
      StrReplace(&pApp->m_ppszHistory[pos-1], pszURL);
   }

   // Cleanup previous state

   if (pApp->m_pfnViewCleanup) {
      pApp->m_pfnViewCleanup(pApp);
      pApp->m_pfnViewCleanup = NULL;
   }

   // Activate appropriate state
   
   pApp->m_cntHistory = pos;

   if (STRBEGINS("test:", pszURL)) {
      // read form data and begin test
      ND_StartTest(pApp, pszURL);
   } else /*if (STRBEGINS("file:", pszURL))*/ {
      // read and display file
      ND_DisplayMenu(pApp, pszURL);
   }
}


//*****************************************************************************
// DISPLAY MANIPULATION FUNCTIONS
//****************************************************************************

/*===========================================================================

FUNCTION: ND_DisplaySplashScreen

DESCRIPTION:
	This function clears the device screen and displays the application's 
  splash screen in the center of the display.  The function then sets a callback
  ND_DisplaySplashScreenCB to start the application's main menu screen.

  If the splash image fails to load, then just display the menu and 
  skip the callback.

PARAMETERS:
	pData [in] - The user data pointer that is passed as the only parameter
    to the callback.

DEPENDENCIES:
  None

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/
static void ND_DisplaySplashScreenCB(CNetDiagnosticsApp* pApp)
{
   // Display main form
   ND_GoTo(pApp, JUMP_MAIN);
}

static void ND_DisplaySplashScreen(CNetDiagnosticsApp* pApp)
{
   IImage* pSplash = NULL;
   AEEImageInfo rImageInfo;

   if((pSplash = ISHELL_LoadResImage( pApp->a.m_pIShell, NETDIAGNOSTICS_RES_FILE, IDB_SPLASH)) != NULL)
   {
      // Get image information
      IIMAGE_GetInfo(pSplash, &rImageInfo);

      // Clear Device screen
      IDISPLAY_ClearScreen(pApp->a.m_pIDisplay);

      // Draw the image in the center of the screen
      IIMAGE_Draw(pSplash, (pApp->m_rc.dx/2) - (rImageInfo.cx/2), (pApp->m_rc.dy/2) - (rImageInfo.cy/2));

      // The image is no longer needed so release it
      IIMAGE_Release(pSplash);

      // Set the callback timer
      ISHELL_SetTimer( pApp->a.m_pIShell, SPLASH_TIMER_DURATION, (PFNNOTIFY)ND_DisplaySplashScreenCB, pApp);
    
      // Update Display
      IDISPLAY_Update(pApp->a.m_pIDisplay);

      return;
   }
   else
   {
     ND_GoTo( pApp, JUMP_MAIN );
   }
}

/*===========================================================================

FUNCTION: ND_DisplayMenu

DESCRIPTION:
	This function clears the device screen and displays the components of
  the application's Main Menu screen.  This consists of updating the 
  title bar text at the top of the screen and the HTML Viewer Control in the 
  remaining space on the screen.
  
  An HTML file is opened via the IFILE interface and its stream is passed
  to the HTML Viewer control which reads the text and displays it.  This text
  includes links which make up the user selectable options of the Main Menu.

PARAMETERS:
	pApp [in] - Pointer to the CNetDiagnosticsApp structure. This structure contains 
    information specific to this applet. 

DEPENDENCIES:
  Assumes the displayed controls have been previously created and 
  initialized.

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/
static void ND_DisplayMenu(CNetDiagnosticsApp* pApp, const char *pszURL)
{
   IFile *pf;
   const char *pszFileName = pszURL;

   if (STRBEGINS("file:", pszFileName))
      pszFileName += STRLEN("file:");

   if (STRBEGINS("///", pszFileName))
      pszFileName += STRLEN("///");

   pf = IFILEMGR_OpenFile(pApp->m_pFileMgr, pszFileName, _OFM_READ);

   if (pf) {

      // Set the file from which the viewer will get its text
      IHTMLVIEWER_LoadStream( pApp->m_pHTMLViewer, (IAStream*)pf);

      // Release our reference to the file.  (The HTML viewer is responsible for
      // its own reference count while it uses the stream.)
      IFILE_Release(pf);

   } else {
      
      // Set the file from which the viewer will get its text
      IHTMLVIEWER_SetData( pApp->m_pHTMLViewer, "<h1>Error</h1>File Not Found", -1);

   }
}


/*===========================================================================

FUNCTION: ND_EchoCleanup

DESCRIPTION:
	Cleanup when exiting Network Access test state

PARAMETERS:
	pApp [in] - Pointer to the CNetDiagnosticsApp structure. This structure contains 
    information specific to this applet. 

DEPENDENCIES:

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/
static void ND_EchoCleanup(CNetDiagnosticsApp *pApp)
{
   // Note: Socket is being deleted; otherwise we would cancel socket
   // callbacks.

   // Cancel DNS Callback
   CALLBACK_Cancel(&pApp->m_cb);

   // Release Socket
   ReleaseObj((void**)&pApp->m_pISocket);

   // Release Static Control
   ReleaseObj((void**)&pApp->m_pIStatic);
}


/*===========================================================================

FUNCTION: ND_HTTPCleanup

DESCRIPTION:
	Cleanup when exiting the HTTP test state.

PARAMETERS:
	pApp [in] - Pointer to the CNetDiagnosticsApp structure. This structure contains 
    information specific to this applet. 

DEPENDENCIES:
  Assumes the displayed controls have been previously created and 
  initialized.

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/
static void ND_HTTPCleanup(CNetDiagnosticsApp* pApp)
{
   FOR_ALL_WEBACTIONS(pApp, p, WebAction_Stop(p));

   // Release Static Control
   ReleaseObj((void**)&pApp->m_pIStatic);
}


/*===========================================================================

FUNCTION: ND_StartTest

DESCRIPTION:
	Read results submitted from a form, and begin a test.

PARAMETERS:
	pApp [in] - Pointer to the CNetDiagnosticsApp structure. This structure contains 
              information specific to this applet.

   pszSubmit [in] - URL naming the test and including submitted form data.

              "test:echo?..." begins an echo test
              "test:http?..." begins an HTTP test

DEPENDENCIES:
  Assumes the displayed controls have been previously created and 
  initialized.

RETURN VALUE:
  None

SIDE EFFECTS:
  Causes the phone display to be updated.
===========================================================================*/
static void ND_StartTest(CNetDiagnosticsApp* pApp, const char* pszSubmit)
{
   AEERect rc;
   IStatic * pStatic = NULL;
   char *pszIter;

   // Reset values before reading form results

   pApp->m_bRS = pApp->m_bRT = pApp->m_bTCP = FALSE;
   pApp->m_pszHost = "";
   pApp->m_pszURL = "";

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩精品欧美精品| 国产精品1区2区3区| 国产精品美女www爽爽爽| 欧美成人a在线| 欧美丰满美乳xxx高潮www| 91网站在线播放| 欧美在线免费播放| 欧美亚洲一区二区在线观看| 色综合一个色综合| 91久久香蕉国产日韩欧美9色| 色诱亚洲精品久久久久久| 色偷偷一区二区三区| 欧美在线视频全部完| 日韩一区二区免费视频| 精品国产乱码久久久久久蜜臀 | 欧美精品一区二区三区久久久| 欧美一区二区精品在线| 久久免费的精品国产v∧| 欧美国产精品一区二区| 亚洲精品视频在线看| 成人欧美一区二区三区白人| 亚洲欧洲色图综合| 亚洲综合区在线| 日韩精品一级中文字幕精品视频免费观看 | 欧美伊人精品成人久久综合97| 欧洲另类一二三四区| 日韩欧美成人一区二区| 国产亚洲一本大道中文在线| 亚洲视频每日更新| 日韩精品福利网| 国产91丝袜在线播放九色| 一本一本久久a久久精品综合麻豆| 欧美三级欧美一级| 久久免费午夜影院| 欧美本精品男人aⅴ天堂| 精品国内二区三区| 中文成人av在线| 亚洲小说春色综合另类电影| 欧美剧情电影在线观看完整版免费励志电影 | 一区二区三区在线看| 麻豆91免费看| 亚洲精选一二三| 久久99久久99| 色婷婷久久久久swag精品| 精品国产成人系列| 亚洲va欧美va人人爽| www.日韩在线| 久久夜色精品国产噜噜av| 亚洲成人av福利| 成人h精品动漫一区二区三区| 日韩欧美国产综合一区 | av爱爱亚洲一区| 日韩欧美视频一区| 亚洲成人免费影院| 91女神在线视频| 国产精品毛片久久久久久| 久久99国产精品麻豆| 色婷婷综合视频在线观看| 国产日韩综合av| 国产精品中文字幕日韩精品 | 国产欧美一区二区精品性色超碰 | 色婷婷综合久色| 欧美一区二区三级| 久久婷婷综合激情| 五月婷婷欧美视频| 欧美色综合网站| 亚洲欧美另类图片小说| 国产馆精品极品| 久久久久久久综合| 国产一区二区美女诱惑| 精品电影一区二区三区| 久久精品99国产精品| 51久久夜色精品国产麻豆| 日韩精品乱码免费| 欧美视频你懂的| 日韩国产精品久久久| 亚洲成av人综合在线观看| 99精品欧美一区二区三区小说| 久久奇米777| 国产成人精品aa毛片| 亚洲精品在线免费观看视频| 久久成人免费日本黄色| 日韩你懂的在线播放| 久久精品国产精品亚洲精品| 成人黄色小视频在线观看| 欧美日韩精品一区二区三区四区 | 成人午夜精品在线| 久久综合成人精品亚洲另类欧美| 久久精品国产精品亚洲精品 | 欧美亚洲日本国产| 亚洲午夜在线视频| 制服丝袜中文字幕一区| 日本美女一区二区| 精品日韩在线一区| 国产成人福利片| 亚洲欧美一区二区在线观看| 日本精品一级二级| 五月天久久比比资源色| 国产精品白丝av| 国产精品成人一区二区三区夜夜夜| 不卡av在线网| 日韩一区精品视频| 中文文精品字幕一区二区| 波多野结衣的一区二区三区| 性久久久久久久久| 久久久99精品久久| 欧美午夜一区二区三区| 久久99精品久久久久久动态图| 久久精品一区八戒影视| 欧美亚洲一区二区在线| 国产乱一区二区| 亚洲综合小说图片| 国产精品一区二区三区四区| 亚洲欧美日韩中文播放| 日韩精品一区国产麻豆| 在线观看www91| 国产高清精品久久久久| 一区二区三区日韩在线观看| 久久一区二区三区国产精品| 欧美婷婷六月丁香综合色| 国产一区二区三区免费播放| 亚洲国产一区二区三区青草影视| 久久精品亚洲精品国产欧美kt∨| 欧美少妇性性性| 99在线精品免费| 粉嫩绯色av一区二区在线观看| 欧美天堂亚洲电影院在线播放| 精彩视频一区二区| 亚洲综合色自拍一区| 国产欧美日韩麻豆91| 欧美精品一区二区三区蜜臀| 色综合天天狠狠| 国产精品嫩草影院av蜜臀| 日韩视频在线永久播放| 亚洲精品老司机| 欧美色视频一区| 色婷婷综合久久| 久久精品噜噜噜成人av农村| 一级日本不卡的影视| 国产精品你懂的在线欣赏| 久久国产尿小便嘘嘘尿| 亚洲va韩国va欧美va精品| 亚洲欧洲日产国码二区| 久久精品日韩一区二区三区| 欧美zozozo| 欧美成人欧美edvon| 在线综合视频播放| 欧美午夜宅男影院| 精品一区二区av| 久久97超碰色| 一本色道久久加勒比精品| 777a∨成人精品桃花网| 中文字幕乱码亚洲精品一区| 亚洲va欧美va人人爽午夜| 国产一区二区免费在线| 欧美这里有精品| 色婷婷激情一区二区三区| 91精品国产91热久久久做人人 | 91精品国产黑色紧身裤美女| 久久夜色精品一区| 亚洲一二三四在线| 国产乱码精品一区二区三区五月婷| 91麻豆.com| 国产日产亚洲精品系列| 亚洲福利一二三区| av亚洲精华国产精华| 精品国产一区二区精华| 亚洲一区二区精品3399| 视频一区在线视频| 国产精品自拍网站| 欧美日韩国产区一| 中文字幕一区二区5566日韩| 日本伊人色综合网| 色老汉一区二区三区| 国产片一区二区三区| 五月综合激情婷婷六月色窝| 欧美男人的天堂一二区| 午夜精品久久久久久久99樱桃| 国产成人综合在线| 国产性天天综合网| 日韩高清一级片| 欧美日韩国产色站一区二区三区| 久久人人爽爽爽人久久久| 欧美另类z0zxhd电影| 中文字幕一区视频| 国产一区欧美二区| 激情六月婷婷久久| 欧美日本视频在线| 麻豆成人久久精品二区三区小说| 欧美中文字幕不卡| 一区二区三区欧美视频| 9191成人精品久久| 裸体健美xxxx欧美裸体表演| 精品视频一区 二区 三区| 欧美最猛黑人xxxxx猛交| 午夜电影网一区| 精品久久久久久久久久久院品网 | 成人欧美一区二区三区小说| 在线视频亚洲一区| 欧美激情一区二区在线|