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

📄 wap_csf.c

📁 是一个手机功能的模拟程序
💻 C
字号:
/*
+-----------------------------------------------------------------------------
|  File    : wap_cfs.h
+-----------------------------------------------------------------------------
|                 Copyright 2000 Condat AG
|                 All rights reserved.
|
|                 This file is confidential and a trade secret of Condat AG
|                 The receipt of or possession of this file does not convey
|                 any rights to reproduce or disclose its contents or to
|                 manufacture, use, or sell anything it may describe, in
|                 whole, or in part, without the specific written consent of
|                 Condat AG.
+-----------------------------------------------------------------------------
|  Purpose : This Modul defines the custom specific functions
|            for the component WAP
|
+-----------------------------------------------------------------------------
*/


#ifndef WAP_CSF_C
#define WAP_CSF_C
#endif

#define ENTITY_WAP

/*==== INCLUDES ===================================================*/
#if defined (NEW_FRAME)

#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include <stddef.h>
#include "typedefs.h"
#include "pcm.h"
#include "pconst.cdg"
#include "mconst.cdg"
#include "message.h"
#include "ccdapi.h"
#include "vsi.h"
#include "custom.h"
#include "gsm.h"
#include "prim.h"
#include "cnf_wap.h"
#include "mon_wap.h"
#include "pei.h"
#include "tok.h"
#include "dti.h"      /* functionality of the dti library */
 
#else

#include <string.h>
#include "stddefs.h"
#include "pconst.cdg"
#include "mconst.cdg"
#include "message.h"
#include "ccdapi.h"
#include "custom.h"
#include "gsm.h"
#include "prim.h"
#include "cnf_wap.h"
#include "mon_wap.h"
#include "vsi.h"
#include "pei.h"
#include "tok.h"

#endif


#include "wap.h"
#include "capiclnt.h"

/*==== EXPORT =====================================================*/

/*==== PRIVAT =====================================================*/
T_VSI_THANDLE twap_handle = VSI_ERROR;

#define WAP_TIMER_ID      0

/*==== VARIABLES ==================================================*/

/*==== FUNCTIONS ==================================================*/
/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF             |
| STATE   : code                       ROUTINE : wap_init_timer      |
+--------------------------------------------------------------------+

  PURPOSE : Initialize the timer for the browser

*/

GLOBAL BOOL wap_init_timer (void)
{
#if !defined (NEW_FRAME)
  twap_handle = vsi_t_open (VSI_CALLER "TWAP");

  if (twap_handle < VSI_OK)
    return FALSE;
#endif
  return TRUE;
}

/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF             |
| STATE   : code                       ROUTINE : wap_close_timer     |
+--------------------------------------------------------------------+

  PURPOSE : Closes the timer for the browser

*/

GLOBAL void wap_close_timer (void)
{
#ifdef TRACE_WAP_FRAME
  TRACE_FUNCTION ("wap_close_timer()");
#endif

#if !defined (NEW_FRAME)
  vsi_t_close (VSI_CALLER twap_handle);
#endif
}

/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF             |
| STATE   : code                       ROUTINE : wap_timer_expired   |
+--------------------------------------------------------------------+

  PURPOSE : Indication that WAP timer has expired.
  
*/

GLOBAL void wap_timer_expired (void)
{
#ifdef TRACE_WAP_FRAME
  TRACE_FUNCTION("CLNTc_timerExpired()");
#endif

  CLNTc_timerExpired();
  wap_lib_run_aus_callback();
}

/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF             |
| STATE   : code                       ROUTINE : wap_stop_timer      |
+--------------------------------------------------------------------+

  PURPOSE : The function stops a timer.

*/

GLOBAL void wap_stop_timer(void)
{
#if defined (NEW_FRAME)
  vsi_t_stop (VSI_CALLER WAP_TIMER_ID);
#else
  vsi_t_stop (VSI_CALLER twap_handle);
#endif
}

/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF             |
| STATE   : code                       ROUTINE : wap_start_timer     |
+--------------------------------------------------------------------+

  PURPOSE : The function starts a timer.

  timeInterval -> The time is given as an interval of 100 millisecond units, e.g.,
    if a timer shall expire in one second an interval of 10 is given.

*/

GLOBAL void wap_start_timer(ULONG timeInterval)
{
#if defined (NEW_FRAME)
  vsi_t_start (VSI_CALLER WAP_TIMER_ID, (T_TIME)(timeInterval * 100));
#else
  vsi_t_start (VSI_CALLER twap_handle, (T_VSI_TVALUE)(timeInterval * 100));
#endif
}

/*
+--------------------------------------------------------------------+
| PROJECT : GSM-WAP (8444)             MODULE  : WAP_CSF           |
| STATE   : code                       ROUTINE : wap_suspend_timer    |
+--------------------------------------------------------------------+

  PURPOSE : The function suspends a timer and returns the remaining time.

*/
/*
GLOBAL ULONG wap_suspend_timer(void)
{

	ULONG tvalue;

#if defined (NEW_FRAME)
  
 if (vsi_t_status (VSI_CALLER WAP_TIMER_ID, (T_TIME)(&tvalue))==VSI_OK)
	return tvalue;
 else
	return 0;
#else
  if (vsi_t_status (VSI_CALLER twap_handle, (T_TIME)(&tvalue))==VSI_OK)
	return tvalue;
 else
	return 0;
#endif
}
*/

⌨️ 快捷键说明

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