changeset 125:d5bbfb9649d5

src/aci2/mfw: file renames to make filename case consistent
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 07 Oct 2016 05:33:56 +0000
parents 61f9999385c0
children 8dcbb050c4c6
files src/aci2/mfw/Mfw_band.c src/aci2/mfw/Mfw_band.h src/aci2/mfw/Mfw_em.c src/aci2/mfw/Mfw_em.h src/aci2/mfw/Mfw_td.h src/aci2/mfw/mfw_band.c src/aci2/mfw/mfw_band.h src/aci2/mfw/mfw_em.c src/aci2/mfw/mfw_em.h src/aci2/mfw/mfw_td.h
diffstat 10 files changed, 1058 insertions(+), 1058 deletions(-) [+]
line wrap: on
line diff
--- a/src/aci2/mfw/Mfw_band.c	Fri Oct 07 05:17:02 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,167 +0,0 @@
-/*
-+--------------------------------------------------------------------+
-| PROJECT: GSM-MFW                   $Workfile:: Mfw_band.c           $|
-| $Author:: MC/SH                          $Revision::  1              $|
-| STATE  : code                                                       |
-+--------------------------------------------------------------------+
-
-   MODULE  : MFW_BAND
-
-   PURPOSE : AT%BAND functionality for MFW
-
-
-   $History: Mfw_band.c                                              $
-
-*/
-
-
-#define ENTITY_MFW
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "typedefs.h"
-#include "vsi.h"
-#include "pei.h"
-#include "custom.h"
-#include "gsm.h"
-
-#include "prim.h"
-#ifndef PCM_2_FFS
-#include "pcm.h"
-#endif
-
-/* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
-#ifndef NEPTUNE_BOARD
-/* END ADD: Sumit : Req ID: : 31-Mar-2005*/
-#include "ffs/ffs.h"
-/* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
-#else
-#include "ffs.h"
-#endif
-/* END ADD: Sumit : Req ID: : 31-Mar-2005*/
-
-
-/* SPR#1470 - SH - these includes are now outside of
- * FAX_AND_DATA switch */
-#include "message.h"
-#include "prim.h"
-#include "aci_cmh.h"
-
-#if defined (FAX_AND_DATA)
-/*#include "message.h"
-#include "prim.h"
-#include "aci_cmh.h"  SPR#1470 - SH */
-#include "aci_fd.h"
-#endif
-
-#ifdef GPRS
-#include "gprs.h"
-#endif
-#include "dti_conn_mng.h"
-
-#include "phb.h"
-#include "psa.h"
-#include "cmh.h"
-#include "cmh_phb.h"
-#include "psa.h"
-#include "psa_sim.h"
-#include "cus_aci.h"
-#include "cmh_mm.h"
-#include "cmh_sim.h"
-
-#include "Mfw_band.h"
-
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND          |
-| STATE  : code                         ROUTINE: band_radio_mode_switch|
-+--------------------------------------------------------------------+
-
-
-   PURPOSE :   Set radio band and mode
-
-*/
-
-T_MFW_BAND_RET band_radio_mode_switch(T_MFW_BAND_MODE mode, UBYTE band)
-{
-	T_ACI_RETURN ret;
-
-	TRACE_FUNCTION("band_radio_mode_switch");
-
-	ret = sAT_PercentBAND(CMD_SRC_LCL, mode, band); /*radio mode set without errors*/
-
-	TRACE_EVENT_P1("Band: %d", band);
-	TRACE_EVENT_P1("Return val: %d", ret);
-
-	switch(ret)
-	{
-		case (AT_BUSY):
-			return MFW_BAND_Busy;
-//			break;  // RAVI
-		case (AT_FAIL):
-			return MFW_BAND_Fail;
-//			break;   // RAVI
-		case (AT_CMPL):
-			return MFW_BAND_OK;
-//			break;  // RAVI
-		case (AT_EXCT):
-			return MFW_BAND_InProgress;
-//			break;   // RAVI
-		default:
-			return MFW_BAND_Fail;
-//			break;     // RAVI
-	}
-}
-
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND          |
-| STATE  : code                         ROUTINE: band_get_radio_modes  |
-+--------------------------------------------------------------------+
-
-
-   PURPOSE :   Get list of possible bands
-
-*/
-
-T_MFW_BAND_RET band_get_radio_modes(T_MFW_BAND_MODE* maxMode, UBYTE *band)
-{
-	T_ACI_RETURN ret;
-
-	ret = tAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)maxMode, (UBYTE*)band);
-
-	if (ret == AT_CMPL)
-		return MFW_BAND_OK;
-	else
-		return MFW_BAND_Fail;
-}
-
-/*
-+--------------------------------------------------------------------------+
-| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND                |
-| STATE  : code                         ROUTINE: band_get_current_radio_mode  |
-+---------------------------------------------------------------------------+
-
-
-   PURPOSE :   Get current band setting
-
-*/
-T_MFW_BAND_RET band_get_current_radio_mode(T_MFW_BAND_MODE* mode, UBYTE* band)
-{
-	T_ACI_RETURN ret;
-
-	ret = qAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)mode, (UBYTE*)band);
-
-	if (ret == AT_CMPL)
-		return MFW_BAND_OK;
-	else
-		return MFW_BAND_Fail;
-
-}
-
-
--- a/src/aci2/mfw/Mfw_band.h	Fri Oct 07 05:17:02 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#ifndef _MFW_BAND_H_
-#define _MFW_BAND_H_
-
-typedef enum
-{	MFW_BAND_Busy= -2,
-	MFW_BAND_Fail = -1,
-	MFW_BAND_OK,
-	MFW_BAND_InProgress
-} T_MFW_BAND_RET;
-
-typedef enum
-{
-	MFW_BAND_MODE_Auto	=  0,
-	MFW_BAND_MODE_Manual	=  1
-} T_MFW_BAND_MODE;
-
-/* SPR919 - SH - Band is now a bit field*/
-typedef enum
-{
-	MFW_BAND_GSM_900		=	1,
-	MFW_BAND_DCS_1800		=	2,
-	MFW_BAND_PCS_1900		=	4,
-	MFW_BAND_E_GSM			=	8,
-	MFW_BAND_GSM_850		=	16
-};
-
-T_MFW_BAND_RET band_radio_mode_switch(T_MFW_BAND_MODE mode, UBYTE band);
-
-T_MFW_BAND_RET band_get_radio_modes(T_MFW_BAND_MODE* maxMode, UBYTE *band);
-
-T_MFW_BAND_RET band_get_current_radio_mode(T_MFW_BAND_MODE* mode, UBYTE *band);
-#endif /* _MFW_BAND_H_*/
--- a/src/aci2/mfw/Mfw_em.c	Fri Oct 07 05:17:02 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,607 +0,0 @@
-/*
-+--------------------------------------------------------------------+
-| PROJECT: MMI-Framework (8417)         $Workfile:: mfw_em.c         $|
-| $Author:: MC  $ CONDAT UK          $Revision:: 1                  $|
-| CREATED: 23.09.02                                                 $|
-| STATE  : code                                                      |
-+--------------------------------------------------------------------+
-
-   MODULE  : MFW_EM
-
-   PURPOSE : Engineering Mode functions
-
-*/
-
-/*
-********************************Include Files**********************************************
-**/
-
-#define ENTITY_MFW
-
-
-#include <string.h>
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "typedefs.h"
-#include "vsi.h"
-#include "pei.h"
-#include "custom.h"
-#include "gsm.h"
-
-#ifndef PCM_2_FFS
-#include "pcm.h"
-#endif
-
-#include "ffs/ffs.h"
-
-#include "message.h"
-#include "prim.h"
-#include "aci_cmh.h"
-#if defined (FAX_AND_DATA)
-#include "aci_fd.h"
-#endif
-
-#ifdef GPRS
-#include "gprs.h"
-#endif
-#include "dti_conn_mng.h"
-#include "phb.h"
-#include "psa.h"
-#include "cmh.h"
-#include "cmh_phb.h"
-#include "psa.h"
-#include "psa_sim.h"
-#include "cus_aci.h"
-#include "cmh_mm.h"
-#include "cmh_sim.h"
-#include "Mfw_em.h"
-#include "aci_em.h" 
-#include "mfw_win.h"
-
-
-
-#define ASCII_OFFSET 0x30 /*SPR 1554*/
-
-/*
-********************************Internal data types**********************************************
-**/
-
-
-typedef union
-{
-	MFW_EM_Mobile_Info MobileInfo;
-	MFW_EM_Serving_Cell_Parameters SCInfo;
-	MFW_EM_Neighbour_Cell_Parameters NCInfo;
-	MFW_EM_Location_Parameters	LocInfo;
-	MFW_EM_Ciph_hop_DTX_Parameters CHDTXInfo;
-	MFW_EM_GPRS_Parameter GPRSInfo;
-}
-	T_MFW_EM_PARA;
-
-typedef struct
-{
-    T_MFW_EVENT     emask;          /* events of interest */
-    T_MFW_EVENT     event;          /* current event */
-    T_MFW_CB        handler;
-    T_MFW_EM_PARA  para;
-} T_MFW_EM;
-/*
-********************************Global variables**********************************************
-**/
-MFW_EM_Data* MfwEmData= NULL;
-
-EXTERN MfwHdr *current_mfw_elem;
-
-/*
-********************************Prototypes**********************************************
-**/
-int Mfw_em_sign_exec(T_MFW_HDR * hdr, T_MFW_EVENT event,T_MFW_EM_PARA *para); 
-void Mfw_em_signal(MfwEvt event, void *para);
-void Mfw_em_cb(T_DRV_SIGNAL_EM* signal);
-static int emCommand (U32 cmd, void *h);
-
-/**************************************Public Functions*****************************************/
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_init           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : initialise module
-
-*/
-int Mfw_em_init()
-{	TRACE_EVENT("Mfw_em_init()");
-	em_Init(Mfw_em_cb, NULL); /*init EM driver*/	
-	mfwCommand[MfwTypEm] = (MfwCb) emCommand;
-	return TRUE;
-}
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_create           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : binds passed callback function to event mask
-
-*/
-MfwHnd Mfw_em_create(MfwHnd hWin, MfwEvt event,  MfwCb cb_func)
-{
-	MfwHdr *hdr;
-    T_MFW_EM *em_para;
-
-    TRACE_EVENT("em_create()");
-
-    hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
-    em_para = (T_MFW_EM *) mfwAlloc(sizeof(T_MFW_EM));
-
-    if (!hdr || !em_para)
-        return 0;
-
-    em_para->emask = event;
-    em_para->handler = cb_func;
-
-    hdr->data = em_para;
-    hdr->type = MfwTypEm;
-
-    return mfwInsert((MfwHdr *) hWin,hdr);
-}
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_exit           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : exit module
-
-*/
-void Mfw_em_exit()
-{	TRACE_EVENT("Mfw_em_exit()");
-	if (MfwEmData != NULL)
-		mfwFree((void*)MfwEmData, sizeof(MFW_EM_Data));
-	
-	em_Exit();
-}
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_get_data           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : requests data from ACI EM driver
-
-*/
-int Mfw_em_get_data(MfwEmDataType type)
-{
-TRACE_EVENT("Mfw_em_get_data()");
-
-//#define _EM_MMI_MFW_TEST	
-
-#ifndef _EM_MMI_MFW_TEST
-/*If not already allocated, Allocate memory to store data in*/
-if (MfwEmData == NULL)	
-	if ((MfwEmData = (MFW_EM_Data*)mfwAlloc(sizeof(MFW_EM_Data))) == NULL)
-		return FALSE;
-	/*Request appropriate data from Em driver*/
-	switch(type)
-	{
-		case EM_MOBILE_INFO: 
-			/*MC SPR 1554, added call to request software version and identity param*/
-			em_Read_Data_Parameter(EM_CLASS_MOBILE_DATA, EM_SUBCLASS_SW_VERSION, 1,Mfw_em_cb);
-			em_Read_Data_Parameter(EM_CLASS_MOBILE_DATA,EM_SUBCLASS_ID, 1, Mfw_em_cb);
-		break;
-		case EM_SERVING_CELL_PARAMS:
-			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
-		break;
-		case EM_NEIGHBOURING_CELL_PARAMS:
-			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
-      em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_NC, 1, Mfw_em_cb);
-		break;
-		case EM_LOCATION_PARAMS:
-			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_LOC_PAG, 1, Mfw_em_cb);
-      em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
-		break;
-		case EM_CIPH_HOP_DTX_PARAMS:
-			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_CIPH_HOP_DTX, 1, Mfw_em_cb);
-		break;
-		case EM_GPRS_PARAMS:
-			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC_GPRS, 1, Mfw_em_cb);
-		break;
-	}
-	return TRUE;
-#endif 
-
-
-			
-#ifdef _EM_MMI_MFW_TEST
-/*Test harness, just returns made-up data to MMI*/
-if (MfwEmData == NULL)	
-	if ((MfwEmData = (MFW_EM_Data*)mfwAlloc(sizeof(MFW_EM_Data))) == NULL)
-		return FALSE;
-	switch(type)
-	{
-		case EM_MOBILE_INFO:
-		{	//MfwEmData->MobileInfo.software_version = 0x44;
-			strcpy(MfwEmData->MobileInfo.IMEI,  "123456789ABC");
-			strcpy(MfwEmData->MobileInfo.IMSI,  "123456789ABC");
-			MfwEmData->MobileInfo.TMSI = 76;
-			Mfw_em_signal(EM_MOBILE_INFO, (void*)&MfwEmData->MobileInfo);
-		}
-		break;
-		case EM_SERVING_CELL_PARAMS:
-		{	
-			MfwEmData->SCInfo.arfcn= 0x44;
-			MfwEmData->SCInfo.RSSI= 86;
-			MfwEmData->SCInfo.RXQ = 67;
-			MfwEmData->SCInfo.RLT = 67;
-			Mfw_em_signal(EM_SERVING_CELL_PARAMS, (void*)&MfwEmData->SCInfo);
-		}
-		break;		
-		case EM_NEIGHBOURING_CELL_PARAMS:
-		{	MfwEmData->NCInfo.NUM= 0x05;
-			strcpy((char*)MfwEmData->NCInfo.arfcn, "WERTYUIOPAS");
-			strcpy((char*)MfwEmData->NCInfo.RSSI, "12345");
-			
-			Mfw_em_signal(EM_NEIGHBOURING_CELL_PARAMS, (void*)&MfwEmData->NCInfo);
-				
-		}
-		break;
-		case EM_LOCATION_PARAMS:
-		{	strcpy((char*)MfwEmData->LocInfo.MCC, "123");
-			strcpy((char*)MfwEmData->LocInfo.MNC, "456");
-			MfwEmData->LocInfo.LAC = 12345;
-			MfwEmData->LocInfo.CI = 12045;
-			
-			Mfw_em_signal(EM_LOCATION_PARAMS, (void*)&MfwEmData->LocInfo);
-				
-		}
-		break;
-		case EM_GPRS_PARAMS:
-		{	MfwEmData->GPRSInfo.ULS= 0;
-			MfwEmData->GPRSInfo.DLS= 0;
-			MfwEmData->GPRSInfo.coding_scheme = 0;
-			Mfw_em_signal(EM_GPRS_PARAMS, (void*)&MfwEmData->GPRSInfo);
-				
-		}
-		break;
-		case EM_CIPH_HOP_DTX_PARAMS:
-		{	MfwEmData->CHDTXInfo.ciph_status= 0;
-			MfwEmData->CHDTXInfo.hopping_channels= 0;
-			MfwEmData->CHDTXInfo.DTX_status = 1;
-			Mfw_em_signal(EM_CIPH_HOP_DTX_PARAMS, (void*)&MfwEmData->CHDTXInfo);
-				
-		}
-		break;
-	}
-	return TRUE;
-#endif
-}
-
-/***********************************************Private functions:********************************/
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : emCommand         |
-+--------------------------------------------------------------------+
-
-  PURPOSE : handle mfw windows command
-
-*/
-
-static int emCommand (U32 cmd, void *h)
-{TRACE_EVENT("emCommand()");
-    switch (cmd)
-    {
-        case MfwCmdDelete:              /* delete me                */
-            if (!h)
-                return 0;
-            em_delete(h);
-            return 1;
-        default:
-            break;
-    }
-
-    return 0;
-}
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : em_delete         |
-+--------------------------------------------------------------------+
-
-  PURPOSE : delete EM event handler
-
-*/
-
-MfwRes em_delete (MfwHnd h)
-{
-    TRACE_EVENT("em_delete()");
-
-    if (!h || !((MfwHdr *) h)->data)
-        return MfwResIllHnd;
-
-    if (!mfwRemove((MfwHdr *) h))
-        return MfwResIllHnd;
-
-    mfwFree((U8 *) ((MfwHdr *) h)->data,sizeof(T_MFW_EM));
-    mfwFree((U8 *) h,sizeof(MfwHdr));
-
-    return MfwResOk;
-}
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_sign_exec           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : send event to MMI
-
-*/
-int Mfw_em_sign_exec(T_MFW_HDR * cur_elem, T_MFW_EVENT event,T_MFW_EM_PARA *para)
-{
- TRACE_EVENT("Mfw_em_sign_exec()");
-
-    while (cur_elem)
-    {
-        if (cur_elem->type == MfwTypEm)
-        {
-            T_MFW_EM *em_data;
-            em_data = (T_MFW_EM *) cur_elem->data;
-            if (em_data->emask & event)
-            {
-                em_data->event = event;
-                switch (event)
-                {
-                    case EM_MOBILE_INFO:
-                        memcpy(&em_data->para.MobileInfo,
-                                para,sizeof(MFW_EM_Mobile_Info));
-                        break;
-                   
-                    case EM_SERVING_CELL_PARAMS:
-                        memcpy(&em_data->para.SCInfo,
-                                para,sizeof(MFW_EM_Serving_Cell_Parameters));
-                        break;
-                    case EM_NEIGHBOURING_CELL_PARAMS:
-                        memcpy(&em_data->para.NCInfo,
-                                para,sizeof(MFW_EM_Neighbour_Cell_Parameters));
-                        break;
-                   
-                    case EM_LOCATION_PARAMS:
-                        memcpy(&em_data->para.LocInfo,
-                                para,sizeof(MFW_EM_Location_Parameters));
-                        break;
-                     case EM_CIPH_HOP_DTX_PARAMS:
-                        memcpy(&em_data->para.CHDTXInfo,
-                                para,sizeof(MFW_EM_Ciph_hop_DTX_Parameters));
-                        break;
-                   
-                    case EM_GPRS_PARAMS:
-                        memcpy(&em_data->para.GPRSInfo,
-                                para,sizeof(MFW_EM_GPRS_Parameter));
-                        break;
-                }
-                if (em_data->handler)
-                {
-                
-                  // store current mfw elem
-                  current_mfw_elem = cur_elem;
-             
-                  if ((*(em_data->handler))(em_data->event,
-                                             (void *) &em_data->para))
-                    return TRUE;
-                }
-            }
-        }
-        cur_elem = cur_elem->next;
-    }
-
-    return FALSE;
-
-
-}
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_signal           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : sends event to MMi via Mfw_em_sign_exec()
-
-*/
-void Mfw_em_signal(MfwEvt event, void *para)
-{
- UBYTE temp = dspl_Enable(0);
-    TRACE_EVENT ("em_signal()");
-
-  if (mfwSignallingMethod EQ 0)
-  {
-    if (mfwFocus)
-        if (Mfw_em_sign_exec(mfwFocus,event,para))
-			{
-				dspl_Enable(temp);            
-				return;
-			}
-    if (mfwRoot)
-        Mfw_em_sign_exec(mfwRoot,event,para);
-  }
-  else
-    {
-      MfwHdr * h = 0;
-
-      /*
-       * Focus set, then start here
-       */
-      if (mfwFocus)
-        h = mfwFocus;
-      /*
-       * Focus not set, then start root
-       */
-      if (!h)
-        h = mfwRoot;
-
-      /*
-       * No elements available, return
-       */
-
-      while (h)
-
-
-      {
-        /*
-         * Signal consumed, then return
-         */
-        if (Mfw_em_sign_exec (h, event, para))
-			{
-				dspl_Enable(temp);            
-				return;
-			}
-
-        /*
-         * All windows tried inclusive root
-         */
-        if (h == mfwRoot)
-			{
-				dspl_Enable(temp);            
-				return;
-			}
-
-        /*
-         * get parent window
-         */
-        h = mfwParent(mfwParent(h));
-		if(h)
-			h = ((MfwWin * )(h->data))->elems;
-      }
-      Mfw_em_sign_exec (mfwRoot, event, para);
-    }      
-	dspl_Enable(temp);            
-	return;
-
-
-}
-/*
-+--------------------------------------------------------------------+
-| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
-| STATE   : code                        ROUTINE : Mfw_em_cb           |
-+--------------------------------------------------------------------+
-
-  PURPOSE : Handles events from the ACI EM driver
-
-*/
-void Mfw_em_cb(T_DRV_SIGNAL_EM* signal)
-{
-	TRACE_EVENT_P1("Mfw_em_cb, signalType: %d", signal->SignalType);
-	
-	switch(signal->SignalType)
-	{
-		case EM_SUBCLASS_SC:
-		{	/*copy Serving Cell Information to appropriate data structure*/
-
-            T_EM_SC_INFO_CNF *serv_cell = (T_EM_SC_INFO_CNF*)&signal->UserData.sc;
-               
-			MfwEmData->SCInfo.arfcn = serv_cell->arfcn;
-			MfwEmData->SCInfo.RSSI = serv_cell->rxlev;
-			MfwEmData->SCInfo.RXQ = serv_cell->rxqual_f;
-			MfwEmData->SCInfo.RLT = serv_cell->rlt;
-      MfwEmData->SCInfo.C1  = serv_cell->c1;
-      MfwEmData->SCInfo.C2  = serv_cell->c2;
-      MfwEmData->SCInfo.BSIC  = serv_cell->bsic;
-      MfwEmData->SCInfo.TAV  = serv_cell->tav;
-      MfwEmData->SCInfo.LAC  = serv_cell->lac;
-      
-      MfwEmData->NCInfo.arfcn[6] = MfwEmData->SCInfo.arfcn;
-      MfwEmData->NCInfo.RSSI[6] = MfwEmData->SCInfo.RSSI;
-      MfwEmData->NCInfo.C2[6] = MfwEmData->SCInfo.C2;
-      MfwEmData->NCInfo.LAC_NC[6] = MfwEmData->SCInfo.LAC;
-      MfwEmData->NCInfo.BSIC_NC[6] = MfwEmData->SCInfo.BSIC;
-
-			/* copy Location Info*/
-			MfwEmData->LocInfo.LAC = serv_cell->lac;
-
-      			/*send event to MMI*/
-			Mfw_em_signal(EM_SERVING_CELL_PARAMS, (void*)&MfwEmData->SCInfo);
-		}		
-		break;	
-		case EM_SUBCLASS_SC_GPRS:
-		{	/*MC, SPR 1554 added code to copy NMOinto GPRS data structure*/
-
-			T_EM_SC_GPRS_INFO_CNF *gprs_info = (T_EM_SC_GPRS_INFO_CNF*)&signal->UserData.sc_gprs;
-
-			MfwEmData->GPRSInfo.NMO = gprs_info->nmo;
-      MfwEmData->GPRSInfo.NDTS = gprs_info->tn;
-      MfwEmData->GPRSInfo.RAC = gprs_info->rac;
-      MfwEmData->GPRSInfo.C31 = gprs_info->c31;
-      MfwEmData->GPRSInfo.C32 = gprs_info->c32;
-
-			Mfw_em_signal(EM_GPRS_PARAMS, (void*)&MfwEmData->GPRSInfo);
-		}
-		break;
-		case EM_SUBCLASS_NC:
-		{	T_EM_NC_INFO_CNF *neighbour_cell = (T_EM_NC_INFO_CNF*)&signal->UserData.nc;
-			MfwEmData->NCInfo.NUM = neighbour_cell->no_ncells;
-			memcpy(MfwEmData->NCInfo.arfcn, neighbour_cell->arfcn_nc, 6*sizeof(USHORT));
-			memcpy(MfwEmData->NCInfo.RSSI, neighbour_cell->rxlev_nc, 6*sizeof(UBYTE));
-			memcpy(MfwEmData->NCInfo.C2, neighbour_cell->c2_nc, 6*sizeof(SHORT));
-			memcpy(MfwEmData->NCInfo.LAC_NC, neighbour_cell->lac_nc, 6*sizeof(USHORT));
-			memcpy(MfwEmData->NCInfo.BSIC_NC, neighbour_cell->bsic_nc, 6*sizeof(UBYTE));
-     Mfw_em_signal(EM_NEIGHBOURING_CELL_PARAMS, (void*)&MfwEmData->NCInfo);
-		}
-		case EM_SUBCLASS_LOC_PAG:
-		{	MfwEmData->LocInfo.LUP = signal->UserData.log_pag.t3212;
-			/*Convert MCC & MNC to ASCII strings from BCD*/
-			utl_BCD2DialStr (signal->UserData.log_pag.mcc, MfwEmData->LocInfo.MCC, 3);
-			utl_BCD2DialStr (signal->UserData.log_pag.mnc, MfwEmData->LocInfo.MNC, 3);
-			Mfw_em_signal(EM_LOCATION_PARAMS, (void*)&MfwEmData->LocInfo);
-		}
-		case EM_SUBCLASS_CIPH_HOP_DTX:
-		{	MfwEmData->CHDTXInfo.ciph_status = signal->UserData.cip.ciph_stat;
-			MfwEmData->CHDTXInfo.HSN = signal->UserData.cip.hsn;
-			//!!!!!HOPPING CHANNELS!!!!!!!!!!!!!!
- /*     memcpy(MfwEmData->CHDTXInfo.ma, signal->UserData.cip.hop_chn.ma, 65);
-      if (signal->UserData.cip.hop_chn.v_start)
-      {
-			  memcpy(MfwEmData->CHDTXInfo.ma2, signal->UserData.cip.hop_chn.ma2, 65);
-      }*/
-      MfwEmData->CHDTXInfo.DTX_status = signal->UserData.cip.dtx_stat;
-			Mfw_em_signal(EM_CIPH_HOP_DTX_PARAMS, (void*)&MfwEmData->CHDTXInfo);
-		}
-		case EM_SUBCLASS_ID:
-		{	/*MC, SPR 1554 added conversion of IMEI and IMSI from numbers to ASCII*/
-			
-			int i;
-			/*convert to ASCII digits*/
-			for (i=0; i < 15; i++)
-			{
-				MfwEmData->MobileInfo.IMEI[i]= signal->UserData.id.em_imeisv.ident_dig[i] + ASCII_OFFSET;
-				MfwEmData->MobileInfo.IMSI[i]=signal->UserData.id.em_imsi.ident_dig[i] +ASCII_OFFSET;
-			}
-			MfwEmData->MobileInfo.IMEI[15] = NULL;
-			MfwEmData->MobileInfo.IMSI[15] = NULL;	
-	
-			MfwEmData->MobileInfo.TMSI = signal->UserData.id.tmsi;
-			
-			Mfw_em_signal(EM_MOBILE_INFO, (void*)&MfwEmData->MobileInfo);
-		}
-		case EM_SUBCLASS_SW_VERSION:
-		{	
-			T_EM_SW_VER* sw_ver = &signal->UserData.version;
-			memcpy(MfwEmData->MobileInfo.SIM_version, sw_ver->sim, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.CC_version , sw_ver->cc, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.SS_version , sw_ver->ss, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.SMS_version , sw_ver->sms, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.MM_version, sw_ver->mm, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.RR_version , sw_ver->rr, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.DL_version , sw_ver->dl, MAX_VER*sizeof(char));
-			memcpy(MfwEmData->MobileInfo.ALR_version , sw_ver->alr, MAX_VER*sizeof(char));
-		}
-		default:
-			TRACE_EVENT("Unknown EM data type");
-
-	}
-
-}
--- a/src/aci2/mfw/Mfw_em.h	Fri Oct 07 05:17:02 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,137 +0,0 @@
-#ifndef _MFW_EM_H_
-#define MFW_EM_H_
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT: MMI-Framework (8417)         $Workfile:: mfw_em.h      $|
-| $Author: KGT                          $Revision:: 1               $|
-| CREATED: 13.02.2001                   $Modtime::  13.02.2001      $|
-| STATE  : code                                                      |
-+--------------------------------------------------------------------+
-
-   MODULE  : MFW_EM
-
-   PURPOSE : Interfaces between ACI EM Driver and MMI.
-
-*/
-/*
-*************************************Includes*************************************
-*/
-
-#include "mfw_mfw.h"
-#include "mfw_sys.h"
-
-/*
-*************************************Datatypes*************************************
-*/
-
-typedef enum MFW_EM_DataType
-{
-	EM_MOBILE_INFO = 0x01,
-	EM_SERVING_CELL_PARAMS = 0x02,
-	EM_NEIGHBOURING_CELL_PARAMS = 0x04,
-	EM_LOCATION_PARAMS = 0x08, 
-	EM_CIPH_HOP_DTX_PARAMS = 0x10,
-	EM_GPRS_PARAMS = 0x20
-}	MfwEmDataType;
-
-typedef struct 
-{
-	/*software_versions*/
-	char		SIM_version[MAX_VER];
-	char		CC_version[MAX_VER];
-	char		SS_version[MAX_VER];
-	char		SMS_version[MAX_VER];
-	char		MM_version[MAX_VER];
-	char		RR_version[MAX_VER];
-	char		DL_version[MAX_VER];
-	char		ALR_version[MAX_VER];
-	
-	char		IMEI[16];
-	char 		IMSI[16];
-	ULONG 	TMSI; /*SPR 1554, changed from LONG to ULONG*/
-}MFW_EM_Mobile_Info;
-
-typedef struct
-{
-	USHORT		arfcn;
-	UBYTE		RSSI; //Received field strength
-	UBYTE		RXQ; //received quality
-	UBYTE		RLT; //radio link timeout counter
-  SHORT   C1; //C1 Path lost criterion
-  SHORT   C2; //C2 Parameter - often the same as RSSI for SC
-  UBYTE   BSIC; //Base Station ID Code
-  UBYTE   TAV;    //Timing Advanced
-  USHORT  LAC;  //Location Area Code
-}MFW_EM_Serving_Cell_Parameters;
-
-typedef struct
-{
-	UBYTE   NUM; //number of neighbouring cells
-	USHORT  arfcn[7];//channel numbers
-	UBYTE   RSSI[7];//received signal strength
-  SHORT   C2[7];//received C2 Parameter
-  USHORT  LAC_NC[7]; //Location Area Code
-  UBYTE   BSIC_NC[7];  //Base Station ID Code  
-}	MFW_EM_Neighbour_Cell_Parameters;
-
-typedef struct
-{
-	UBYTE LUP;//Location update period
-	UBYTE MCC[4];//mobile country code
-	UBYTE MNC[4];//mobile network code
-	USHORT LAC; //location area code
-	/*SPR 1554, removed cell id */
-}MFW_EM_Location_Parameters;
-
-typedef struct
-{
-	UBYTE ciph_status; //ciphering status
-	/*USHORT ma[65]; //MA list after time
-  USHORT ma2[65];//MA list before  time*/
-	USHORT HSN; //hopping sequence number
- 	UBYTE DTX_status;
-}MFW_EM_Ciph_hop_DTX_Parameters;
-
-typedef struct
-{	/*SPR 1554, changed the data structure to only include the NMO*/
-	UBYTE NMO; //network mode of operation
-  UBYTE NDTS; //number of Downlink Timeslots
-  UBYTE RAC;  //Routing Area Color
-  SHORT C31; //C31 Criterion
-  SHORT C32; //C32 Criterion
-}
-MFW_EM_GPRS_Parameter;
-
-typedef struct
-{
-	MFW_EM_Mobile_Info MobileInfo;
-	MFW_EM_Serving_Cell_Parameters SCInfo;
-	MFW_EM_Neighbour_Cell_Parameters NCInfo;
-	MFW_EM_Location_Parameters	LocInfo;
-	MFW_EM_Ciph_hop_DTX_Parameters CHDTXInfo;
-	MFW_EM_GPRS_Parameter GPRSInfo;
-}
-	MFW_EM_Data;
-
-
-
-/*
-*************************************Prototypes*************************************
-*/
-
-/* Initialise mfw_em module(which initialises EM driver);*/
-int Mfw_em_init();
-
-/* Bind events specified by mask to an MMI call-back function.*/
-MfwHnd Mfw_em_create(MfwHnd hWin, MfwEvt event,  MfwCb cb_func);
-
-/*Deallocate any memory for the module.*/
-void Mfw_em_exit();
-
-/* Request specified data from EM Driver.*/
-int Mfw_em_get_data(MfwEmDataType type);
-
-
-#endif
-
--- a/src/aci2/mfw/Mfw_td.h	Fri Oct 07 05:17:02 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,115 +0,0 @@
-#ifndef _MFW_TD_H_
-#define _MFW_TD_H_
-
-/*
-+--------------------------------------------------------------------+
-| PROJECT: MMI-Framework (8417) 	$Workfile:: mfw_td.c			$|
-| $Author:: NDH						$Revision:: 1					$|
-| CREATED: 03.03.2003		       		$Modtime:: 10.04.00 14:58		$|
-| STATE  : code														$|
-+--------------------------------------------------------------------+
-
-   MODULE  : MFW_TD
-
-   PURPOSE : This modul contains Time and Date functionality.
-
-*/
-
-#include <string.h>
-
-
-#if defined (NEW_FRAME)
-
-#include "typedefs.h"
-#include "vsi.h"
-#include "pei.h"
-#include "custom.h"
-#include "gsm.h"
-
-#else
-
-#include "STDDEFS.H"
-#include "custom.h"
-#include "gsm.h"
-#include "vsi.h"
-
-#endif
-
-#include "mfw_mfw.h"
-#include "mfw_utils.h"
-
-#include "cus_aci.h"
-#include "prim.h"
-#include "pcm.h"
-#include "rtc.h"
-
-/***************************Data types****************************************
-**/
-
-
-#define T_MFW_TIME T_RTC_TIME
-#define T_MFW_DATE T_RTC_DATE
-
-typedef enum 
-{
-	MFW_TIME_FORMAT_12HOUR,
-	MFW_TIME_FORMAT_24HOUR
-} T_MFW_TIME_FORMAT;
-/*SPR 2639, added data structure definition for writing to FFS*/
-typedef struct
-{	T_MFW_TIME alarm_time;
-	T_MFW_DATE alarm_date;
-
-}	T_MFW_ALARM_INFO;
-
-/*
- * TD Parameter
- */
-#define T_MFW_TD_PARA UBYTE
-
-/*
- *  Time and date Control Block
- */
-typedef struct
-{
-    T_MFW_EVENT     emask;          /* events of interest */
-    T_MFW_EVENT     event;          /* current event */
-    T_MFW_CB        handler;
-    T_MFW_TD_PARA  para;
-} T_MFW_TD;
-/*************************************Events**********************************************/
-
-#define MFW_TD_ALARM 		1
-
-/***************************Prototypes****************************************
-**/
-void mfw_td_init(void); // Initialise time and date on ME switch-on  // RAVI
-
-
-T_MFW_HND mfw_td_create(MfwHnd hWin, MfwEvt event, MfwCb cbfunc);//specify MFW event handler
-MfwRes mfw_td_delete (MfwHnd h);//delete event handler
-MfwRes mfw_td_set_time(T_MFW_TIME* time);//set the current time
-MfwRes mfw_td_set_date(T_MFW_DATE* date);//et the current date
-
-
-
-char* mfw_td_get_clock_str(void); // return clock string (ASCII).Used by MmiIdle // RAVI
-char* mfw_td_get_date_str(void); // return date string(ASCII) // RAVI
-
-T_MFW_DATE* mfw_td_get_date(void);//return date structure .Used by MmiTimeDate  // RAVI
-T_MFW_TIME* mfw_td_get_time(void);//return time structure  // RAVI
-
-MfwRes mfw_td_set_alarm(T_MFW_TIME* time, T_MFW_DATE* date);//set alarm
-
-MfwRes mfw_td_cancel_alarm(void);//cancel alarm  // RAVI
-
-MfwRes mfw_td_get_alarm(T_MFW_TIME* time, T_MFW_DATE* date);// MmiTimeDate, editing
-
-MfwRes mfw_td_set_time_format(T_MFW_TIME_FORMAT format);//set time format
-/*SPR 2639, added prototype for this function so it can be called from outside the module */
-UBYTE mfw_td_convert_to_24_hour(T_MFW_TIME* time);//returns the hour value in 24-hour clock format
-
-void mfw_td_exit(void); //kill any data structures  // RAVI
-
-
-#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aci2/mfw/mfw_band.c	Fri Oct 07 05:33:56 2016 +0000
@@ -0,0 +1,167 @@
+/*
++--------------------------------------------------------------------+
+| PROJECT: GSM-MFW                   $Workfile:: Mfw_band.c           $|
+| $Author:: MC/SH                          $Revision::  1              $|
+| STATE  : code                                                       |
++--------------------------------------------------------------------+
+
+   MODULE  : MFW_BAND
+
+   PURPOSE : AT%BAND functionality for MFW
+
+
+   $History: Mfw_band.c                                              $
+
+*/
+
+
+#define ENTITY_MFW
+
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "typedefs.h"
+#include "vsi.h"
+#include "pei.h"
+#include "custom.h"
+#include "gsm.h"
+
+#include "prim.h"
+#ifndef PCM_2_FFS
+#include "pcm.h"
+#endif
+
+/* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
+#ifndef NEPTUNE_BOARD
+/* END ADD: Sumit : Req ID: : 31-Mar-2005*/
+#include "ffs/ffs.h"
+/* BEGIN ADD: Sumit : Req ID: : 31-Mar-2005*/
+#else
+#include "ffs.h"
+#endif
+/* END ADD: Sumit : Req ID: : 31-Mar-2005*/
+
+
+/* SPR#1470 - SH - these includes are now outside of
+ * FAX_AND_DATA switch */
+#include "message.h"
+#include "prim.h"
+#include "aci_cmh.h"
+
+#if defined (FAX_AND_DATA)
+/*#include "message.h"
+#include "prim.h"
+#include "aci_cmh.h"  SPR#1470 - SH */
+#include "aci_fd.h"
+#endif
+
+#ifdef GPRS
+#include "gprs.h"
+#endif
+#include "dti_conn_mng.h"
+
+#include "phb.h"
+#include "psa.h"
+#include "cmh.h"
+#include "cmh_phb.h"
+#include "psa.h"
+#include "psa_sim.h"
+#include "cus_aci.h"
+#include "cmh_mm.h"
+#include "cmh_sim.h"
+
+#include "Mfw_band.h"
+
+
+/*
++--------------------------------------------------------------------+
+| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND          |
+| STATE  : code                         ROUTINE: band_radio_mode_switch|
++--------------------------------------------------------------------+
+
+
+   PURPOSE :   Set radio band and mode
+
+*/
+
+T_MFW_BAND_RET band_radio_mode_switch(T_MFW_BAND_MODE mode, UBYTE band)
+{
+	T_ACI_RETURN ret;
+
+	TRACE_FUNCTION("band_radio_mode_switch");
+
+	ret = sAT_PercentBAND(CMD_SRC_LCL, mode, band); /*radio mode set without errors*/
+
+	TRACE_EVENT_P1("Band: %d", band);
+	TRACE_EVENT_P1("Return val: %d", ret);
+
+	switch(ret)
+	{
+		case (AT_BUSY):
+			return MFW_BAND_Busy;
+//			break;  // RAVI
+		case (AT_FAIL):
+			return MFW_BAND_Fail;
+//			break;   // RAVI
+		case (AT_CMPL):
+			return MFW_BAND_OK;
+//			break;  // RAVI
+		case (AT_EXCT):
+			return MFW_BAND_InProgress;
+//			break;   // RAVI
+		default:
+			return MFW_BAND_Fail;
+//			break;     // RAVI
+	}
+}
+
+
+/*
++--------------------------------------------------------------------+
+| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND          |
+| STATE  : code                         ROUTINE: band_get_radio_modes  |
++--------------------------------------------------------------------+
+
+
+   PURPOSE :   Get list of possible bands
+
+*/
+
+T_MFW_BAND_RET band_get_radio_modes(T_MFW_BAND_MODE* maxMode, UBYTE *band)
+{
+	T_ACI_RETURN ret;
+
+	ret = tAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)maxMode, (UBYTE*)band);
+
+	if (ret == AT_CMPL)
+		return MFW_BAND_OK;
+	else
+		return MFW_BAND_Fail;
+}
+
+/*
++--------------------------------------------------------------------------+
+| PROJECT: GSM-MFW (8417)               MODULE:  MFW_BAND                |
+| STATE  : code                         ROUTINE: band_get_current_radio_mode  |
++---------------------------------------------------------------------------+
+
+
+   PURPOSE :   Get current band setting
+
+*/
+T_MFW_BAND_RET band_get_current_radio_mode(T_MFW_BAND_MODE* mode, UBYTE* band)
+{
+	T_ACI_RETURN ret;
+
+	ret = qAT_PercentBAND(CMD_SRC_LCL, (T_ACI_BAND_MODE*)mode, (UBYTE*)band);
+
+	if (ret == AT_CMPL)
+		return MFW_BAND_OK;
+	else
+		return MFW_BAND_Fail;
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aci2/mfw/mfw_band.h	Fri Oct 07 05:33:56 2016 +0000
@@ -0,0 +1,32 @@
+#ifndef _MFW_BAND_H_
+#define _MFW_BAND_H_
+
+typedef enum
+{	MFW_BAND_Busy= -2,
+	MFW_BAND_Fail = -1,
+	MFW_BAND_OK,
+	MFW_BAND_InProgress
+} T_MFW_BAND_RET;
+
+typedef enum
+{
+	MFW_BAND_MODE_Auto	=  0,
+	MFW_BAND_MODE_Manual	=  1
+} T_MFW_BAND_MODE;
+
+/* SPR919 - SH - Band is now a bit field*/
+typedef enum
+{
+	MFW_BAND_GSM_900		=	1,
+	MFW_BAND_DCS_1800		=	2,
+	MFW_BAND_PCS_1900		=	4,
+	MFW_BAND_E_GSM			=	8,
+	MFW_BAND_GSM_850		=	16
+};
+
+T_MFW_BAND_RET band_radio_mode_switch(T_MFW_BAND_MODE mode, UBYTE band);
+
+T_MFW_BAND_RET band_get_radio_modes(T_MFW_BAND_MODE* maxMode, UBYTE *band);
+
+T_MFW_BAND_RET band_get_current_radio_mode(T_MFW_BAND_MODE* mode, UBYTE *band);
+#endif /* _MFW_BAND_H_*/
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aci2/mfw/mfw_em.c	Fri Oct 07 05:33:56 2016 +0000
@@ -0,0 +1,607 @@
+/*
++--------------------------------------------------------------------+
+| PROJECT: MMI-Framework (8417)         $Workfile:: mfw_em.c         $|
+| $Author:: MC  $ CONDAT UK          $Revision:: 1                  $|
+| CREATED: 23.09.02                                                 $|
+| STATE  : code                                                      |
++--------------------------------------------------------------------+
+
+   MODULE  : MFW_EM
+
+   PURPOSE : Engineering Mode functions
+
+*/
+
+/*
+********************************Include Files**********************************************
+**/
+
+#define ENTITY_MFW
+
+
+#include <string.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "typedefs.h"
+#include "vsi.h"
+#include "pei.h"
+#include "custom.h"
+#include "gsm.h"
+
+#ifndef PCM_2_FFS
+#include "pcm.h"
+#endif
+
+#include "ffs/ffs.h"
+
+#include "message.h"
+#include "prim.h"
+#include "aci_cmh.h"
+#if defined (FAX_AND_DATA)
+#include "aci_fd.h"
+#endif
+
+#ifdef GPRS
+#include "gprs.h"
+#endif
+#include "dti_conn_mng.h"
+#include "phb.h"
+#include "psa.h"
+#include "cmh.h"
+#include "cmh_phb.h"
+#include "psa.h"
+#include "psa_sim.h"
+#include "cus_aci.h"
+#include "cmh_mm.h"
+#include "cmh_sim.h"
+#include "Mfw_em.h"
+#include "aci_em.h" 
+#include "mfw_win.h"
+
+
+
+#define ASCII_OFFSET 0x30 /*SPR 1554*/
+
+/*
+********************************Internal data types**********************************************
+**/
+
+
+typedef union
+{
+	MFW_EM_Mobile_Info MobileInfo;
+	MFW_EM_Serving_Cell_Parameters SCInfo;
+	MFW_EM_Neighbour_Cell_Parameters NCInfo;
+	MFW_EM_Location_Parameters	LocInfo;
+	MFW_EM_Ciph_hop_DTX_Parameters CHDTXInfo;
+	MFW_EM_GPRS_Parameter GPRSInfo;
+}
+	T_MFW_EM_PARA;
+
+typedef struct
+{
+    T_MFW_EVENT     emask;          /* events of interest */
+    T_MFW_EVENT     event;          /* current event */
+    T_MFW_CB        handler;
+    T_MFW_EM_PARA  para;
+} T_MFW_EM;
+/*
+********************************Global variables**********************************************
+**/
+MFW_EM_Data* MfwEmData= NULL;
+
+EXTERN MfwHdr *current_mfw_elem;
+
+/*
+********************************Prototypes**********************************************
+**/
+int Mfw_em_sign_exec(T_MFW_HDR * hdr, T_MFW_EVENT event,T_MFW_EM_PARA *para); 
+void Mfw_em_signal(MfwEvt event, void *para);
+void Mfw_em_cb(T_DRV_SIGNAL_EM* signal);
+static int emCommand (U32 cmd, void *h);
+
+/**************************************Public Functions*****************************************/
+
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_init           |
++--------------------------------------------------------------------+
+
+  PURPOSE : initialise module
+
+*/
+int Mfw_em_init()
+{	TRACE_EVENT("Mfw_em_init()");
+	em_Init(Mfw_em_cb, NULL); /*init EM driver*/	
+	mfwCommand[MfwTypEm] = (MfwCb) emCommand;
+	return TRUE;
+}
+
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_create           |
++--------------------------------------------------------------------+
+
+  PURPOSE : binds passed callback function to event mask
+
+*/
+MfwHnd Mfw_em_create(MfwHnd hWin, MfwEvt event,  MfwCb cb_func)
+{
+	MfwHdr *hdr;
+    T_MFW_EM *em_para;
+
+    TRACE_EVENT("em_create()");
+
+    hdr = (MfwHdr *) mfwAlloc(sizeof(MfwHdr));
+    em_para = (T_MFW_EM *) mfwAlloc(sizeof(T_MFW_EM));
+
+    if (!hdr || !em_para)
+        return 0;
+
+    em_para->emask = event;
+    em_para->handler = cb_func;
+
+    hdr->data = em_para;
+    hdr->type = MfwTypEm;
+
+    return mfwInsert((MfwHdr *) hWin,hdr);
+}
+
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_exit           |
++--------------------------------------------------------------------+
+
+  PURPOSE : exit module
+
+*/
+void Mfw_em_exit()
+{	TRACE_EVENT("Mfw_em_exit()");
+	if (MfwEmData != NULL)
+		mfwFree((void*)MfwEmData, sizeof(MFW_EM_Data));
+	
+	em_Exit();
+}
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_get_data           |
++--------------------------------------------------------------------+
+
+  PURPOSE : requests data from ACI EM driver
+
+*/
+int Mfw_em_get_data(MfwEmDataType type)
+{
+TRACE_EVENT("Mfw_em_get_data()");
+
+//#define _EM_MMI_MFW_TEST	
+
+#ifndef _EM_MMI_MFW_TEST
+/*If not already allocated, Allocate memory to store data in*/
+if (MfwEmData == NULL)	
+	if ((MfwEmData = (MFW_EM_Data*)mfwAlloc(sizeof(MFW_EM_Data))) == NULL)
+		return FALSE;
+	/*Request appropriate data from Em driver*/
+	switch(type)
+	{
+		case EM_MOBILE_INFO: 
+			/*MC SPR 1554, added call to request software version and identity param*/
+			em_Read_Data_Parameter(EM_CLASS_MOBILE_DATA, EM_SUBCLASS_SW_VERSION, 1,Mfw_em_cb);
+			em_Read_Data_Parameter(EM_CLASS_MOBILE_DATA,EM_SUBCLASS_ID, 1, Mfw_em_cb);
+		break;
+		case EM_SERVING_CELL_PARAMS:
+			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
+		break;
+		case EM_NEIGHBOURING_CELL_PARAMS:
+			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
+      em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_NC, 1, Mfw_em_cb);
+		break;
+		case EM_LOCATION_PARAMS:
+			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_LOC_PAG, 1, Mfw_em_cb);
+      em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC, 1, Mfw_em_cb);
+		break;
+		case EM_CIPH_HOP_DTX_PARAMS:
+			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_CIPH_HOP_DTX, 1, Mfw_em_cb);
+		break;
+		case EM_GPRS_PARAMS:
+			em_Read_Data_Parameter(EM_CLASS_INFRA_DATA, EM_SUBCLASS_SC_GPRS, 1, Mfw_em_cb);
+		break;
+	}
+	return TRUE;
+#endif 
+
+
+			
+#ifdef _EM_MMI_MFW_TEST
+/*Test harness, just returns made-up data to MMI*/
+if (MfwEmData == NULL)	
+	if ((MfwEmData = (MFW_EM_Data*)mfwAlloc(sizeof(MFW_EM_Data))) == NULL)
+		return FALSE;
+	switch(type)
+	{
+		case EM_MOBILE_INFO:
+		{	//MfwEmData->MobileInfo.software_version = 0x44;
+			strcpy(MfwEmData->MobileInfo.IMEI,  "123456789ABC");
+			strcpy(MfwEmData->MobileInfo.IMSI,  "123456789ABC");
+			MfwEmData->MobileInfo.TMSI = 76;
+			Mfw_em_signal(EM_MOBILE_INFO, (void*)&MfwEmData->MobileInfo);
+		}
+		break;
+		case EM_SERVING_CELL_PARAMS:
+		{	
+			MfwEmData->SCInfo.arfcn= 0x44;
+			MfwEmData->SCInfo.RSSI= 86;
+			MfwEmData->SCInfo.RXQ = 67;
+			MfwEmData->SCInfo.RLT = 67;
+			Mfw_em_signal(EM_SERVING_CELL_PARAMS, (void*)&MfwEmData->SCInfo);
+		}
+		break;		
+		case EM_NEIGHBOURING_CELL_PARAMS:
+		{	MfwEmData->NCInfo.NUM= 0x05;
+			strcpy((char*)MfwEmData->NCInfo.arfcn, "WERTYUIOPAS");
+			strcpy((char*)MfwEmData->NCInfo.RSSI, "12345");
+			
+			Mfw_em_signal(EM_NEIGHBOURING_CELL_PARAMS, (void*)&MfwEmData->NCInfo);
+				
+		}
+		break;
+		case EM_LOCATION_PARAMS:
+		{	strcpy((char*)MfwEmData->LocInfo.MCC, "123");
+			strcpy((char*)MfwEmData->LocInfo.MNC, "456");
+			MfwEmData->LocInfo.LAC = 12345;
+			MfwEmData->LocInfo.CI = 12045;
+			
+			Mfw_em_signal(EM_LOCATION_PARAMS, (void*)&MfwEmData->LocInfo);
+				
+		}
+		break;
+		case EM_GPRS_PARAMS:
+		{	MfwEmData->GPRSInfo.ULS= 0;
+			MfwEmData->GPRSInfo.DLS= 0;
+			MfwEmData->GPRSInfo.coding_scheme = 0;
+			Mfw_em_signal(EM_GPRS_PARAMS, (void*)&MfwEmData->GPRSInfo);
+				
+		}
+		break;
+		case EM_CIPH_HOP_DTX_PARAMS:
+		{	MfwEmData->CHDTXInfo.ciph_status= 0;
+			MfwEmData->CHDTXInfo.hopping_channels= 0;
+			MfwEmData->CHDTXInfo.DTX_status = 1;
+			Mfw_em_signal(EM_CIPH_HOP_DTX_PARAMS, (void*)&MfwEmData->CHDTXInfo);
+				
+		}
+		break;
+	}
+	return TRUE;
+#endif
+}
+
+/***********************************************Private functions:********************************/
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : emCommand         |
++--------------------------------------------------------------------+
+
+  PURPOSE : handle mfw windows command
+
+*/
+
+static int emCommand (U32 cmd, void *h)
+{TRACE_EVENT("emCommand()");
+    switch (cmd)
+    {
+        case MfwCmdDelete:              /* delete me                */
+            if (!h)
+                return 0;
+            em_delete(h);
+            return 1;
+        default:
+            break;
+    }
+
+    return 0;
+}
+
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : em_delete         |
++--------------------------------------------------------------------+
+
+  PURPOSE : delete EM event handler
+
+*/
+
+MfwRes em_delete (MfwHnd h)
+{
+    TRACE_EVENT("em_delete()");
+
+    if (!h || !((MfwHdr *) h)->data)
+        return MfwResIllHnd;
+
+    if (!mfwRemove((MfwHdr *) h))
+        return MfwResIllHnd;
+
+    mfwFree((U8 *) ((MfwHdr *) h)->data,sizeof(T_MFW_EM));
+    mfwFree((U8 *) h,sizeof(MfwHdr));
+
+    return MfwResOk;
+}
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_sign_exec           |
++--------------------------------------------------------------------+
+
+  PURPOSE : send event to MMI
+
+*/
+int Mfw_em_sign_exec(T_MFW_HDR * cur_elem, T_MFW_EVENT event,T_MFW_EM_PARA *para)
+{
+ TRACE_EVENT("Mfw_em_sign_exec()");
+
+    while (cur_elem)
+    {
+        if (cur_elem->type == MfwTypEm)
+        {
+            T_MFW_EM *em_data;
+            em_data = (T_MFW_EM *) cur_elem->data;
+            if (em_data->emask & event)
+            {
+                em_data->event = event;
+                switch (event)
+                {
+                    case EM_MOBILE_INFO:
+                        memcpy(&em_data->para.MobileInfo,
+                                para,sizeof(MFW_EM_Mobile_Info));
+                        break;
+                   
+                    case EM_SERVING_CELL_PARAMS:
+                        memcpy(&em_data->para.SCInfo,
+                                para,sizeof(MFW_EM_Serving_Cell_Parameters));
+                        break;
+                    case EM_NEIGHBOURING_CELL_PARAMS:
+                        memcpy(&em_data->para.NCInfo,
+                                para,sizeof(MFW_EM_Neighbour_Cell_Parameters));
+                        break;
+                   
+                    case EM_LOCATION_PARAMS:
+                        memcpy(&em_data->para.LocInfo,
+                                para,sizeof(MFW_EM_Location_Parameters));
+                        break;
+                     case EM_CIPH_HOP_DTX_PARAMS:
+                        memcpy(&em_data->para.CHDTXInfo,
+                                para,sizeof(MFW_EM_Ciph_hop_DTX_Parameters));
+                        break;
+                   
+                    case EM_GPRS_PARAMS:
+                        memcpy(&em_data->para.GPRSInfo,
+                                para,sizeof(MFW_EM_GPRS_Parameter));
+                        break;
+                }
+                if (em_data->handler)
+                {
+                
+                  // store current mfw elem
+                  current_mfw_elem = cur_elem;
+             
+                  if ((*(em_data->handler))(em_data->event,
+                                             (void *) &em_data->para))
+                    return TRUE;
+                }
+            }
+        }
+        cur_elem = cur_elem->next;
+    }
+
+    return FALSE;
+
+
+}
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_signal           |
++--------------------------------------------------------------------+
+
+  PURPOSE : sends event to MMi via Mfw_em_sign_exec()
+
+*/
+void Mfw_em_signal(MfwEvt event, void *para)
+{
+ UBYTE temp = dspl_Enable(0);
+    TRACE_EVENT ("em_signal()");
+
+  if (mfwSignallingMethod EQ 0)
+  {
+    if (mfwFocus)
+        if (Mfw_em_sign_exec(mfwFocus,event,para))
+			{
+				dspl_Enable(temp);            
+				return;
+			}
+    if (mfwRoot)
+        Mfw_em_sign_exec(mfwRoot,event,para);
+  }
+  else
+    {
+      MfwHdr * h = 0;
+
+      /*
+       * Focus set, then start here
+       */
+      if (mfwFocus)
+        h = mfwFocus;
+      /*
+       * Focus not set, then start root
+       */
+      if (!h)
+        h = mfwRoot;
+
+      /*
+       * No elements available, return
+       */
+
+      while (h)
+
+
+      {
+        /*
+         * Signal consumed, then return
+         */
+        if (Mfw_em_sign_exec (h, event, para))
+			{
+				dspl_Enable(temp);            
+				return;
+			}
+
+        /*
+         * All windows tried inclusive root
+         */
+        if (h == mfwRoot)
+			{
+				dspl_Enable(temp);            
+				return;
+			}
+
+        /*
+         * get parent window
+         */
+        h = mfwParent(mfwParent(h));
+		if(h)
+			h = ((MfwWin * )(h->data))->elems;
+      }
+      Mfw_em_sign_exec (mfwRoot, event, para);
+    }      
+	dspl_Enable(temp);            
+	return;
+
+
+}
+/*
++--------------------------------------------------------------------+
+| PROJECT : MMI-Framework (8417)        MODULE  : MFW_EM            |
+| STATE   : code                        ROUTINE : Mfw_em_cb           |
++--------------------------------------------------------------------+
+
+  PURPOSE : Handles events from the ACI EM driver
+
+*/
+void Mfw_em_cb(T_DRV_SIGNAL_EM* signal)
+{
+	TRACE_EVENT_P1("Mfw_em_cb, signalType: %d", signal->SignalType);
+	
+	switch(signal->SignalType)
+	{
+		case EM_SUBCLASS_SC:
+		{	/*copy Serving Cell Information to appropriate data structure*/
+
+            T_EM_SC_INFO_CNF *serv_cell = (T_EM_SC_INFO_CNF*)&signal->UserData.sc;
+               
+			MfwEmData->SCInfo.arfcn = serv_cell->arfcn;
+			MfwEmData->SCInfo.RSSI = serv_cell->rxlev;
+			MfwEmData->SCInfo.RXQ = serv_cell->rxqual_f;
+			MfwEmData->SCInfo.RLT = serv_cell->rlt;
+      MfwEmData->SCInfo.C1  = serv_cell->c1;
+      MfwEmData->SCInfo.C2  = serv_cell->c2;
+      MfwEmData->SCInfo.BSIC  = serv_cell->bsic;
+      MfwEmData->SCInfo.TAV  = serv_cell->tav;
+      MfwEmData->SCInfo.LAC  = serv_cell->lac;
+      
+      MfwEmData->NCInfo.arfcn[6] = MfwEmData->SCInfo.arfcn;
+      MfwEmData->NCInfo.RSSI[6] = MfwEmData->SCInfo.RSSI;
+      MfwEmData->NCInfo.C2[6] = MfwEmData->SCInfo.C2;
+      MfwEmData->NCInfo.LAC_NC[6] = MfwEmData->SCInfo.LAC;
+      MfwEmData->NCInfo.BSIC_NC[6] = MfwEmData->SCInfo.BSIC;
+
+			/* copy Location Info*/
+			MfwEmData->LocInfo.LAC = serv_cell->lac;
+
+      			/*send event to MMI*/
+			Mfw_em_signal(EM_SERVING_CELL_PARAMS, (void*)&MfwEmData->SCInfo);
+		}		
+		break;	
+		case EM_SUBCLASS_SC_GPRS:
+		{	/*MC, SPR 1554 added code to copy NMOinto GPRS data structure*/
+
+			T_EM_SC_GPRS_INFO_CNF *gprs_info = (T_EM_SC_GPRS_INFO_CNF*)&signal->UserData.sc_gprs;
+
+			MfwEmData->GPRSInfo.NMO = gprs_info->nmo;
+      MfwEmData->GPRSInfo.NDTS = gprs_info->tn;
+      MfwEmData->GPRSInfo.RAC = gprs_info->rac;
+      MfwEmData->GPRSInfo.C31 = gprs_info->c31;
+      MfwEmData->GPRSInfo.C32 = gprs_info->c32;
+
+			Mfw_em_signal(EM_GPRS_PARAMS, (void*)&MfwEmData->GPRSInfo);
+		}
+		break;
+		case EM_SUBCLASS_NC:
+		{	T_EM_NC_INFO_CNF *neighbour_cell = (T_EM_NC_INFO_CNF*)&signal->UserData.nc;
+			MfwEmData->NCInfo.NUM = neighbour_cell->no_ncells;
+			memcpy(MfwEmData->NCInfo.arfcn, neighbour_cell->arfcn_nc, 6*sizeof(USHORT));
+			memcpy(MfwEmData->NCInfo.RSSI, neighbour_cell->rxlev_nc, 6*sizeof(UBYTE));
+			memcpy(MfwEmData->NCInfo.C2, neighbour_cell->c2_nc, 6*sizeof(SHORT));
+			memcpy(MfwEmData->NCInfo.LAC_NC, neighbour_cell->lac_nc, 6*sizeof(USHORT));
+			memcpy(MfwEmData->NCInfo.BSIC_NC, neighbour_cell->bsic_nc, 6*sizeof(UBYTE));
+     Mfw_em_signal(EM_NEIGHBOURING_CELL_PARAMS, (void*)&MfwEmData->NCInfo);
+		}
+		case EM_SUBCLASS_LOC_PAG:
+		{	MfwEmData->LocInfo.LUP = signal->UserData.log_pag.t3212;
+			/*Convert MCC & MNC to ASCII strings from BCD*/
+			utl_BCD2DialStr (signal->UserData.log_pag.mcc, MfwEmData->LocInfo.MCC, 3);
+			utl_BCD2DialStr (signal->UserData.log_pag.mnc, MfwEmData->LocInfo.MNC, 3);
+			Mfw_em_signal(EM_LOCATION_PARAMS, (void*)&MfwEmData->LocInfo);
+		}
+		case EM_SUBCLASS_CIPH_HOP_DTX:
+		{	MfwEmData->CHDTXInfo.ciph_status = signal->UserData.cip.ciph_stat;
+			MfwEmData->CHDTXInfo.HSN = signal->UserData.cip.hsn;
+			//!!!!!HOPPING CHANNELS!!!!!!!!!!!!!!
+ /*     memcpy(MfwEmData->CHDTXInfo.ma, signal->UserData.cip.hop_chn.ma, 65);
+      if (signal->UserData.cip.hop_chn.v_start)
+      {
+			  memcpy(MfwEmData->CHDTXInfo.ma2, signal->UserData.cip.hop_chn.ma2, 65);
+      }*/
+      MfwEmData->CHDTXInfo.DTX_status = signal->UserData.cip.dtx_stat;
+			Mfw_em_signal(EM_CIPH_HOP_DTX_PARAMS, (void*)&MfwEmData->CHDTXInfo);
+		}
+		case EM_SUBCLASS_ID:
+		{	/*MC, SPR 1554 added conversion of IMEI and IMSI from numbers to ASCII*/
+			
+			int i;
+			/*convert to ASCII digits*/
+			for (i=0; i < 15; i++)
+			{
+				MfwEmData->MobileInfo.IMEI[i]= signal->UserData.id.em_imeisv.ident_dig[i] + ASCII_OFFSET;
+				MfwEmData->MobileInfo.IMSI[i]=signal->UserData.id.em_imsi.ident_dig[i] +ASCII_OFFSET;
+			}
+			MfwEmData->MobileInfo.IMEI[15] = NULL;
+			MfwEmData->MobileInfo.IMSI[15] = NULL;	
+	
+			MfwEmData->MobileInfo.TMSI = signal->UserData.id.tmsi;
+			
+			Mfw_em_signal(EM_MOBILE_INFO, (void*)&MfwEmData->MobileInfo);
+		}
+		case EM_SUBCLASS_SW_VERSION:
+		{	
+			T_EM_SW_VER* sw_ver = &signal->UserData.version;
+			memcpy(MfwEmData->MobileInfo.SIM_version, sw_ver->sim, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.CC_version , sw_ver->cc, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.SS_version , sw_ver->ss, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.SMS_version , sw_ver->sms, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.MM_version, sw_ver->mm, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.RR_version , sw_ver->rr, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.DL_version , sw_ver->dl, MAX_VER*sizeof(char));
+			memcpy(MfwEmData->MobileInfo.ALR_version , sw_ver->alr, MAX_VER*sizeof(char));
+		}
+		default:
+			TRACE_EVENT("Unknown EM data type");
+
+	}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aci2/mfw/mfw_em.h	Fri Oct 07 05:33:56 2016 +0000
@@ -0,0 +1,137 @@
+#ifndef _MFW_EM_H_
+#define MFW_EM_H_
+
+/*
++--------------------------------------------------------------------+
+| PROJECT: MMI-Framework (8417)         $Workfile:: mfw_em.h      $|
+| $Author: KGT                          $Revision:: 1               $|
+| CREATED: 13.02.2001                   $Modtime::  13.02.2001      $|
+| STATE  : code                                                      |
++--------------------------------------------------------------------+
+
+   MODULE  : MFW_EM
+
+   PURPOSE : Interfaces between ACI EM Driver and MMI.
+
+*/
+/*
+*************************************Includes*************************************
+*/
+
+#include "mfw_mfw.h"
+#include "mfw_sys.h"
+
+/*
+*************************************Datatypes*************************************
+*/
+
+typedef enum MFW_EM_DataType
+{
+	EM_MOBILE_INFO = 0x01,
+	EM_SERVING_CELL_PARAMS = 0x02,
+	EM_NEIGHBOURING_CELL_PARAMS = 0x04,
+	EM_LOCATION_PARAMS = 0x08, 
+	EM_CIPH_HOP_DTX_PARAMS = 0x10,
+	EM_GPRS_PARAMS = 0x20
+}	MfwEmDataType;
+
+typedef struct 
+{
+	/*software_versions*/
+	char		SIM_version[MAX_VER];
+	char		CC_version[MAX_VER];
+	char		SS_version[MAX_VER];
+	char		SMS_version[MAX_VER];
+	char		MM_version[MAX_VER];
+	char		RR_version[MAX_VER];
+	char		DL_version[MAX_VER];
+	char		ALR_version[MAX_VER];
+	
+	char		IMEI[16];
+	char 		IMSI[16];
+	ULONG 	TMSI; /*SPR 1554, changed from LONG to ULONG*/
+}MFW_EM_Mobile_Info;
+
+typedef struct
+{
+	USHORT		arfcn;
+	UBYTE		RSSI; //Received field strength
+	UBYTE		RXQ; //received quality
+	UBYTE		RLT; //radio link timeout counter
+  SHORT   C1; //C1 Path lost criterion
+  SHORT   C2; //C2 Parameter - often the same as RSSI for SC
+  UBYTE   BSIC; //Base Station ID Code
+  UBYTE   TAV;    //Timing Advanced
+  USHORT  LAC;  //Location Area Code
+}MFW_EM_Serving_Cell_Parameters;
+
+typedef struct
+{
+	UBYTE   NUM; //number of neighbouring cells
+	USHORT  arfcn[7];//channel numbers
+	UBYTE   RSSI[7];//received signal strength
+  SHORT   C2[7];//received C2 Parameter
+  USHORT  LAC_NC[7]; //Location Area Code
+  UBYTE   BSIC_NC[7];  //Base Station ID Code  
+}	MFW_EM_Neighbour_Cell_Parameters;
+
+typedef struct
+{
+	UBYTE LUP;//Location update period
+	UBYTE MCC[4];//mobile country code
+	UBYTE MNC[4];//mobile network code
+	USHORT LAC; //location area code
+	/*SPR 1554, removed cell id */
+}MFW_EM_Location_Parameters;
+
+typedef struct
+{
+	UBYTE ciph_status; //ciphering status
+	/*USHORT ma[65]; //MA list after time
+  USHORT ma2[65];//MA list before  time*/
+	USHORT HSN; //hopping sequence number
+ 	UBYTE DTX_status;
+}MFW_EM_Ciph_hop_DTX_Parameters;
+
+typedef struct
+{	/*SPR 1554, changed the data structure to only include the NMO*/
+	UBYTE NMO; //network mode of operation
+  UBYTE NDTS; //number of Downlink Timeslots
+  UBYTE RAC;  //Routing Area Color
+  SHORT C31; //C31 Criterion
+  SHORT C32; //C32 Criterion
+}
+MFW_EM_GPRS_Parameter;
+
+typedef struct
+{
+	MFW_EM_Mobile_Info MobileInfo;
+	MFW_EM_Serving_Cell_Parameters SCInfo;
+	MFW_EM_Neighbour_Cell_Parameters NCInfo;
+	MFW_EM_Location_Parameters	LocInfo;
+	MFW_EM_Ciph_hop_DTX_Parameters CHDTXInfo;
+	MFW_EM_GPRS_Parameter GPRSInfo;
+}
+	MFW_EM_Data;
+
+
+
+/*
+*************************************Prototypes*************************************
+*/
+
+/* Initialise mfw_em module(which initialises EM driver);*/
+int Mfw_em_init();
+
+/* Bind events specified by mask to an MMI call-back function.*/
+MfwHnd Mfw_em_create(MfwHnd hWin, MfwEvt event,  MfwCb cb_func);
+
+/*Deallocate any memory for the module.*/
+void Mfw_em_exit();
+
+/* Request specified data from EM Driver.*/
+int Mfw_em_get_data(MfwEmDataType type);
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/aci2/mfw/mfw_td.h	Fri Oct 07 05:33:56 2016 +0000
@@ -0,0 +1,115 @@
+#ifndef _MFW_TD_H_
+#define _MFW_TD_H_
+
+/*
++--------------------------------------------------------------------+
+| PROJECT: MMI-Framework (8417) 	$Workfile:: mfw_td.c			$|
+| $Author:: NDH						$Revision:: 1					$|
+| CREATED: 03.03.2003		       		$Modtime:: 10.04.00 14:58		$|
+| STATE  : code														$|
++--------------------------------------------------------------------+
+
+   MODULE  : MFW_TD
+
+   PURPOSE : This modul contains Time and Date functionality.
+
+*/
+
+#include <string.h>
+
+
+#if defined (NEW_FRAME)
+
+#include "typedefs.h"
+#include "vsi.h"
+#include "pei.h"
+#include "custom.h"
+#include "gsm.h"
+
+#else
+
+#include "STDDEFS.H"
+#include "custom.h"
+#include "gsm.h"
+#include "vsi.h"
+
+#endif
+
+#include "mfw_mfw.h"
+#include "mfw_utils.h"
+
+#include "cus_aci.h"
+#include "prim.h"
+#include "pcm.h"
+#include "rtc.h"
+
+/***************************Data types****************************************
+**/
+
+
+#define T_MFW_TIME T_RTC_TIME
+#define T_MFW_DATE T_RTC_DATE
+
+typedef enum 
+{
+	MFW_TIME_FORMAT_12HOUR,
+	MFW_TIME_FORMAT_24HOUR
+} T_MFW_TIME_FORMAT;
+/*SPR 2639, added data structure definition for writing to FFS*/
+typedef struct
+{	T_MFW_TIME alarm_time;
+	T_MFW_DATE alarm_date;
+
+}	T_MFW_ALARM_INFO;
+
+/*
+ * TD Parameter
+ */
+#define T_MFW_TD_PARA UBYTE
+
+/*
+ *  Time and date Control Block
+ */
+typedef struct
+{
+    T_MFW_EVENT     emask;          /* events of interest */
+    T_MFW_EVENT     event;          /* current event */
+    T_MFW_CB        handler;
+    T_MFW_TD_PARA  para;
+} T_MFW_TD;
+/*************************************Events**********************************************/
+
+#define MFW_TD_ALARM 		1
+
+/***************************Prototypes****************************************
+**/
+void mfw_td_init(void); // Initialise time and date on ME switch-on  // RAVI
+
+
+T_MFW_HND mfw_td_create(MfwHnd hWin, MfwEvt event, MfwCb cbfunc);//specify MFW event handler
+MfwRes mfw_td_delete (MfwHnd h);//delete event handler
+MfwRes mfw_td_set_time(T_MFW_TIME* time);//set the current time
+MfwRes mfw_td_set_date(T_MFW_DATE* date);//et the current date
+
+
+
+char* mfw_td_get_clock_str(void); // return clock string (ASCII).Used by MmiIdle // RAVI
+char* mfw_td_get_date_str(void); // return date string(ASCII) // RAVI
+
+T_MFW_DATE* mfw_td_get_date(void);//return date structure .Used by MmiTimeDate  // RAVI
+T_MFW_TIME* mfw_td_get_time(void);//return time structure  // RAVI
+
+MfwRes mfw_td_set_alarm(T_MFW_TIME* time, T_MFW_DATE* date);//set alarm
+
+MfwRes mfw_td_cancel_alarm(void);//cancel alarm  // RAVI
+
+MfwRes mfw_td_get_alarm(T_MFW_TIME* time, T_MFW_DATE* date);// MmiTimeDate, editing
+
+MfwRes mfw_td_set_time_format(T_MFW_TIME_FORMAT format);//set time format
+/*SPR 2639, added prototype for this function so it can be called from outside the module */
+UBYTE mfw_td_convert_to_24_hour(T_MFW_TIME* time);//returns the hour value in 24-hour clock format
+
+void mfw_td_exit(void); //kill any data structures  // RAVI
+
+
+#endif