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

📄 autoredialattempt.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 2 页
字号:
/*****************************************************************************
*  Copyright Statement:
*  --------------------
*  This software is protected by Copyright and the information contained
*  herein is confidential. The software may not be copied and the information
*  contained herein may not be used or disclosed except with the written
*  permission of MediaTek Inc. (C) 2005
*
*  BY OPENING THIS FILE, BUYER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
*  THAT THE SOFTWARE/FIRMWARE AND ITS DOCUMENTATIONS ("MEDIATEK SOFTWARE")
*  RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE PROVIDED TO BUYER ON
*  AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS ANY AND ALL WARRANTIES,
*  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF
*  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NONINFRINGEMENT.
*  NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH RESPECT TO THE
*  SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY, INCORPORATED IN, OR
*  SUPPLIED WITH THE MEDIATEK SOFTWARE, AND BUYER AGREES TO LOOK ONLY TO SUCH
*  THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO. MEDIATEK SHALL ALSO
*  NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE RELEASES MADE TO BUYER'S
*  SPECIFICATION OR TO CONFORM TO A PARTICULAR STANDARD OR OPEN FORUM.
*
*  BUYER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S ENTIRE AND CUMULATIVE
*  LIABILITY WITH RESPECT TO THE MEDIATEK SOFTWARE RELEASED HEREUNDER WILL BE,
*  AT MEDIATEK'S OPTION, TO REVISE OR REPLACE THE MEDIATEK SOFTWARE AT ISSUE,
*  OR REFUND ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY BUYER TO
*  MEDIATEK FOR SUCH MEDIATEK SOFTWARE AT ISSUE. 
*
*  THE TRANSACTION CONTEMPLATED HEREUNDER SHALL BE CONSTRUED IN ACCORDANCE
*  WITH THE LAWS OF THE STATE OF CALIFORNIA, USA, EXCLUDING ITS CONFLICT OF
*  LAWS PRINCIPLES.  ANY DISPUTES, CONTROVERSIES OR CLAIMS ARISING THEREOF AND
*  RELATED THERETO SHALL BE SETTLED BY ARBITRATION IN SAN FRANCISCO, CA, UNDER
*  THE RULES OF THE INTERNATIONAL CHAMBER OF COMMERCE (ICC).
*
*****************************************************************************/
/*******************************************************************************
 *  Modification Notice:
 *  --------------------------
 *  This software is modified by MediaTek Inc. and the information contained
 *  herein is confidential. The software may not be copied and the information
 *  contained herein may not be used or disclosed except with the written
 *  permission of MediaTek Inc. (C) 2001
 *
 *******************************************************************************/

 /*******************************************************************************
 * Filename:
 * ---------
 *   AutoRedialAttempt.c
 *
 * Project:
 * --------
 *   Maui_Software
 *
 * Description:
 * ------------
 *  .......
 *
 * Author:
 * -------
 * -------
 *
 *------------------------------------------------------------------------------
 * $Log$
 *
 * removed!
 * removed!
 * set new maximun attempt value everytime there comes new cause. 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 *******************************************************************************/

 /**
 * Copyright Notice
 * ?2002 - 2003, Pixtel Communications, Inc., 1489 43rd Ave. W.,
 * Vancouver, B.C. V6M 4K8 Canada. All Rights Reserved.
 *  (It is illegal to remove this copyright notice from this software or any
 *  portion of it)
 */

/**************************************************************

   FILENAME : AutoRedialAttempt.c

   PURPOSE     : Redial attempts api

   REMARKS     : nil

   AUTHOR      : Ashish

   DATE     : Nov 8,02

**************************************************************/
#include "stdC.h"
#include "MMI_Features.h"
#include "L4Dr.h"
#include "L4Dr1.h"
#include "PixtelDataTypes.h"
#include "GlobalDefs.h"
#include "GlobalConstants.h"
#include "EventsGprot.h"
#include "HistoryGprot.h"
#include "DebugInitDef.h"
#include "MMI_trc.h"
#include "Wgui_categories.h"
#include "TimerEvents.h"

#include "SATGProts.h"
#include "SettingGprots.h"
#include "PhonebookTypes.h"

#include "CallmanagementIdDef.h"
#include "HistoryHelperProt.h"
#include "CallManagementStruct.h"
#include "CallStructureManagementProt.h"
#include "CommonStubsProt.h"
#include "CmErrorTypes.h"
#include "CmErrorHandlersProt.h"
#include "PsCallHelperGprot.h"
#include "CallManagementGProt.h"
#include "OutgoingCallHelperProt.h"
#include "OutgoingCallManagementProt.h"

#include "RedialHelperGprot.h"

static U8 gRedialMsgTemp[100];  /* temp array for display redial string */


/*****************************************************************************
 * FUNCTION
 *  EntryScrShowUserTimeToRedial
 * DESCRIPTION
 *  Entry Screen for user notification on time left to redial
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void EntryScrShowUserTimeToRedial(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    EntryNewScreen(CM_SCR_RDL_TIME, ExitScrShowUserTimeToRedial, NULL, NULL);

    MMI_TRACE((MMI_TRACE_G5_CM, MMI_CM_FUNC_EntryScrShowUserTimeToRedial));

    if (GetCurrScrnId() != CM_SCR_RDL_TIME)
    {
        DeleteScreenIfPresent(CM_SCR_RDL_TIME);
    }

    ShowCategory141Screen(0, 0, 0, 0, STR_GLOBAL_ABORT, 0, gRedialMsgTemp, 0, NULL);

    SetRightSoftkeyFunction(ResetRedialAndGoBack, KEY_EVENT_UP);
    SetKeyHandler(ResetRedialAndGoBack, KEY_END, KEY_EVENT_DOWN);
    return;
}


/*****************************************************************************
 * FUNCTION
 *  ExitScrShowUserTimeToRedial
 * DESCRIPTION
 *  Exit Screen for blacklist full
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ExitScrShowUserTimeToRedial(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (GetCurrentState() == CM_INCOMING_STATE)
    {
        return;
    }

    if (cm_p->redial_info.RedialTimer == TRUE)
    {
        history Scr1009;
        S16 nHistory = 0;

        Scr1009.scrnID = CM_SCR_RDL_TIME;
        Scr1009.entryFuncPtr = EntryScrShowUserTimeToRedial;
        pfnUnicodeStrcpy((S8*) Scr1009.inputBuffer, (S8*) & nHistory);
        GetCategoryHistory(Scr1009.guiBuffer);
        AddHistory(Scr1009);
    }
    return;
}


/*****************************************************************************
 * FUNCTION
 *  ResetRedialAndGoBack
 * DESCRIPTION
 *  Entry Screen for user notification on time left to redial
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetRedialAndGoBack(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ResetRedialAttempts();
    GoBackfromNotifyScr();
    return;
}


/*****************************************************************************
 * FUNCTION
 *  ResetRedialAttempts
 * DESCRIPTION
 *  This function resets redial counter for call
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void ResetRedialAttempts(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    cm_p->redial_info.MaxAttempts = 0;
    cm_p->redial_info.CurrentAttempt = 0;
    cm_p->redial_info.RedialTimer = FALSE;
    cm_p->redial_info.ErrRedialScreen = FALSE;
    cm_p->redial_info.DialFromPhb = MMI_PHB_NONE;
    memset(cm_p->redial_info.RedialNum, 0, MAX_NUMBER);
    StopTimer(CM_REDIAL_TIMER);
    return;
}


/*****************************************************************************
 * FUNCTION
 *  SetMaxAttempts
 * DESCRIPTION
 *  Sets the maximum number of attempts for this call
 * PARAMETERS
 *  attempts        [IN]        Number
 * RETURNS
 *  void
 *****************************************************************************/
void SetMaxAttempts(U8 attempts)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

    cm_p->redial_info.MaxAttempts = attempts;
    
    return;
}


/*****************************************************************************
 * FUNCTION
 *  SetRedialNumber
 * DESCRIPTION
 *  To store number to redial
 * PARAMETERS
 *  void
 * RETURNS
 *  void
 *****************************************************************************/
void SetRedialNumber(void)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/

⌨️ 快捷键说明

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