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

📄 pscallhelper.c

📁 MTK手机平台的MMI部分的源代码
💻 C
📖 第 1 页 / 共 5 页
字号:
/*****************************************************************************
*  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:
 * ---------
 *   PsCallHelper.c
 *
 * Project:
 * --------
 *   Maui_Software
 *
 * Description:
 * ------------
 *  .......
 *
 * Author:
 * -------
 * -------
 *
 *------------------------------------------------------------------------------
 * $Log$
 *
 * removed!
 * removed!
 * Consider "Waiting call -> Incoming call" situation, speech must be turned off.
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * removed!
 * removed!
 * 
 *
 * 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 : PsCallHelper.c

   PURPOSE     : Call Management application

   REMARKS     : nil

   AUTHOR      : Subramanya BG

   DATE     : Nov 12,02

**************************************************************/
#include "stdC.h"
#include "MMI_Features.h"
#include "L4Dr.h"
#include "L4Dr1.h"
#include "PixtelDataTypes.h"
#include "GlobalConstants.h"
#include "GlobalDefs.h"
#include "DebugInitDef.h"
#include "ProtocolEvents.h"
#include "EventsGprot.h"
#include "HistoryGprot.h"
#include "QueueGprot.h"
#include "CommonScreens.h"
#include "Wgui_categories.h"
#include "Wgui_status_icons.h"
#include "KeyBrd.h"
#include "GSM7BitDefaultAlphabet.h"
#include "MMI_trc.h"
#ifdef __MMI_TOUCH_SCREEN__
#include "wgui_touch_screen.h"
#endif 

#include "SettingsGexdcl.h"
#include "CallSetup.h"
#include "ManageCallMain.h"
#include "Mdi_datatype.h"
#include "Mdi_audio.h"
#ifdef __MMI_SOUND_RECORDER__
#include "mdi_datatype.h"
#include "mdi_audio.h"
#include "SoundRecorderDef.h"
#include "SoundRecorderProt.h"
#endif /* __MMI_SOUND_RECORDER__ */ 

#include "CallmanagementIdDef.h"
#include "CallManagementStruct.h"
#include "CallStructureManagementProt.h"
#include "CallManagementGprot.h"
#include "CommonStubsProt.h"
#include "CmErrorTypes.h"
#include "CmErrorHandlersProt.h"
#include "PsCallHelperDef.h"
#include "mmiapi_struct.h"
#include "IncomingCallManagementProt.h"
#include "OutgoingCallHelperProt.h"
#include "OutgoingCallManagementProt.h"

#include "PsCallHelperGprot.h"

#ifdef __MMI_BT_HP_SUPPORT__
#include "BTMMIHPGprots.h"
#endif 

#ifdef __MMI_BT_SUPPORT__
#include "BTMMIScrGprots.h"
#endif 

#ifdef __MMI_BG_SOUND_EFFECT__
#include "BGSoundGProt.h"
#endif 

#if defined (JATAAYU_SUPPORT) && defined (WAP_SUPPORT)
#include "ddl.h"
#include "jcerror.h"
#include "jdd_tapi.h"
#endif


S8 gUSSDbuf[MAX_DIGITS_USSD * ENCODING_LENGTH];

extern U16 gSSEvent;
extern MMI_BOOL gSSEventNotifyPresent;
extern U16 gSSEventNotify;


/*****************************************************************************
 * FUNCTION
 *  MakePsInitiateCall
 * DESCRIPTION
 *  Helper function to Invoke Stack function or pass
 *  the msg structure that can be understandable to Protocol stack.
 *  This is the stack function call to request outgoing call
 *  
 *  We are currently assuming our own msg structure and passing to NSW Task Queue.
 * PARAMETERS
 *  MsgStruct       [?]         
 *  callBack        [?]         
 *  This(?)         [IN]        Contains Telephone number of the outgoing call)
 * RETURNS
 *  void
 *****************************************************************************/
void MakePsInitiateCall(U8 *MsgStruct, void *callBack)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    U16 length;
    U8 IPNum[MAX_IP_NUMBER_LEN + 1];

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    if (MsgStruct)
    {
        ClearKeyEvents();
        SetDialIndication(FALSE);
        memset((PS8) IPNum, 0, MAX_IP_NUMBER_LEN + 1);

    #ifdef __IP_NUMBER__
        if (GetTempUseIPNumber())
        {
            GetCurrIPNumber(IPNum);
        }
    #endif /* __IP_NUMBER__ */ 

        length = strlen((PS8) MsgStruct);
        MakePsSSVUSSDReq(MsgStruct, (PU8) IPNum, length, (void*)PsCBackSetCallFeatures);
    }
    return;
}


/*****************************************************************************
 * FUNCTION
 *  MakePsSSVUSSDReq
 * DESCRIPTION
 *  Helper function to Invoke Stack function or pass
 *  the msg structure that can be understandable to Protocol stack.
 *  This is the stack function call to request outgoing call
 *  
 *  We are currently assuming our own msg structure and passing to NSW Task Queue.
 * PARAMETERS
 *  MsgStruct       [?]         
 *  IPNum           [?]         
 *  length          [IN]        
 *  callBack        [?]         
 *  This(?)         [IN]        Contains Telephone number of the outgoing call)
 * RETURNS
 *  void
 *****************************************************************************/
void MakePsSSVUSSDReq(U8 *MsgStruct, U8 *IPNum, U16 length, void *callBack)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MYQUEUE Message;
    MMI_PARSE_STR *strParse;

    /*----------------------------------------------------------------*/
    /* Code Body                                                      */
    /*----------------------------------------------------------------*/
    ClearInputEventHandler(MMI_DEVICE_ALL);
#ifdef __MMI_TOUCH_SCREEN__
    wgui_clear_pen_handlers();
#endif 

    /* PARSE_SS_REQ */
    Message.oslSrcId = MOD_MMI;
    Message.oslDestId = MOD_L4C;
    Message.oslMsgId = PRT_USSDVSS_REQ;
    Message.oslPeerBuffPtr = NULL;

    if (MsgStruct)
    {
        strParse = (MMI_PARSE_STR*) OslConstructDataPtr(sizeof(MMI_PARSE_STR));
        memset(strParse->input, 0, MAX_DIGITS_USSD);
        strParse->length = (U8) length;
        memcpy(strParse->input, MsgStruct, strParse->length);
        strParse->dcs = 0x0f;
        memcpy(strParse->ip_string, IPNum, sizeof(strParse->ip_string));

        Message.oslDataPtr = (oslParaType*) strParse;
    }
    else
    {
        Message.oslDataPtr = NULL;
    }

    SetProtocolEventHandler((PsFuncPtr) callBack, PRT_USSDVSS_RSP);
    OslMsgSendExtQueue(&Message);
    return;
}


/*****************************************************************************
 * FUNCTION
 *  MakePsCallAcceptIncoming
 * DESCRIPTION
 *  Makes call to Protcol Stack to Accept Incoming Call
 *  
 *  The call back registers a handler with the event dynamically
 * PARAMETERS
 *  callBack        [?]     
 * RETURNS
 *  void
 *****************************************************************************/
void MakePsCallAcceptIncoming(void *callBack)
{
    /*----------------------------------------------------------------*/
    /* Local Variables                                                */
    /*----------------------------------------------------------------*/
    MYQUEUE Message;

⌨️ 快捷键说明

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