telephonyserverplugins/simtsy/inc/CSimPhoneUSimApp.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __SIMPHONEUSIMAPP_H_
       
    17 #define __SIMPHONEUSIMAPP_H_
       
    18 
       
    19 /**
       
    20  * @file
       
    21  *
       
    22  * Contains the class definitions required for the Phone USim applications.
       
    23  * @internalAll
       
    24  */
       
    25 
       
    26 #include <etelmm.h>
       
    27 #include <et_phone.h>
       
    28 #include <mpbutil.h>
       
    29 #include "csimtimer.h"
       
    30 #include "CSimPhone.h"
       
    31 
       
    32 const TInt KMaxUSimApps = 3;
       
    33 
       
    34 /**
       
    35  * The main Phone USim applications class which simulates USim applications features.
       
    36  */
       
    37 class CSimPhone;
       
    38 class CTestConfigSection;
       
    39 class CTestConfigItem;
       
    40 class CSimPhoneUSimApp : public CSubSessionExtBase, public MTimerCallBack
       
    41 	{
       
    42 public:
       
    43 	static CSimPhoneUSimApp* NewL(CSimPhone* aPhone);
       
    44 	CSimPhoneUSimApp(CSimPhone* aPhone);
       
    45 	~CSimPhoneUSimApp();
       
    46 
       
    47 	virtual CTelObject::TReqMode ReqModeL(const TInt aIpc);
       
    48 // MTelObjectTSY pure virtual
       
    49 	virtual TInt RegisterNotification(const TInt aIpc);
       
    50 	virtual TInt DeregisterNotification(const TInt aIpc);
       
    51 	virtual void Init();
       
    52 	virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName);
       
    53 	virtual CTelObject* OpenNewObjectL(TDes& aNewName);
       
    54 	virtual TInt NumberOfSlotsL(const TInt aIpc);
       
    55 	virtual TInt CancelService(const TInt aIpc, const TTsyReqHandle aTsyReqHandle);
       
    56 
       
    57 // MSubSessionExtBaseTSY pure virtual
       
    58 	virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage);
       
    59 	virtual void TimerCallBack(TInt aId);
       
    60 	const CTestConfigSection* CfgFile();
       
    61 	RMobilePhone::TAID GetActiveUSim();
       
    62 	
       
    63 	TBool FoundUSimAppTags();
       
    64 
       
    65 protected:
       
    66 	void ConstructL();
       
    67 	
       
    68 private:
       
    69 	class TUSimAppEvent 
       
    70 	{
       
    71 	public:
       
    72 		TUint32 iDuration;
       
    73 		RMobilePhone::TAID iAid;
       
    74 	};
       
    75 	
       
    76 	class TUSimNotifyData
       
    77 	{	
       
    78 	public:
       
    79 		TBool iNotifyPending;  //indicates if a notification is pending
       
    80 		TTsyReqHandle iNotifyHandle; //the TSY notification handle
       
    81 		TAny* iNotifyData;  //Holds the data for the notification pending
       
    82 		TAny* iNotifyDataXtra;  //Holds the data for the notification pending
       
    83 	};
       
    84 
       
    85 	TInt EnumerateUSimApplications(const TTsyReqHandle aTsyReqHandle, TInt* aCount, RMobilePhone::TAID* aActiveAID);
       
    86 	TInt EnumerateUSimApplicationsCancel(const TTsyReqHandle aTsyReqHandle);
       
    87 	TInt GetUSimApplicationInfo(const TTsyReqHandle aTsyReqHandle, TInt* aUSimAppIndex, TDes8* aInfo);
       
    88 	TInt GetUSimApplicationInfoCancel(const TTsyReqHandle aTsyReqHandle);
       
    89 	TInt NotifyUSimApplicationsInfoChange(const TTsyReqHandle aTsyReqHandle, TInt* aCount, RMobilePhone::TAID* aActiveAID);
       
    90 	TInt NotifyUSimApplicationsInfoChangeCancel(const TTsyReqHandle aTsyReqHandle);
       
    91 	TInt SetUSimApplicationStatus(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TAID* aAID, RMobilePhone::TUSimAppAction* aUsimAppAction);
       
    92 	TInt SetUSimApplicationStatusCancel(const TTsyReqHandle aTsyReqHandle);
       
    93 	TInt SetUSimAppsSelectionMode(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TUSimSelectionMode* aUSimSelectionMode);
       
    94 	TInt GetUSimAppsSelectionMode(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TUSimSelectionMode* aUSimSelectionMode);
       
    95 	TInt NotifyUSIMAppsSelectionModeChange(const TTsyReqHandle aTsyReqHandle, RMobilePhone::TUSimSelectionMode* aUSimSelectionMode);
       
    96 	TInt NotifyUSIMAppsSelectionModeChangeCancel(const TTsyReqHandle aTsyReqHandle);
       
    97 
       
    98 	
       
    99 private:
       
   100 	CSimPhone* iPhone;
       
   101 	CSimTimer* iTimer;
       
   102 	RMobilePhone::TUSimSelectionMode iCurrentSelection;
       
   103 	RMobilePhone::TAID iActiveAID;
       
   104 	CArrayFixFlat<TUSimAppEvent>* iUSimAppEventList;
       
   105 	TInt iEventPointer;
       
   106 	CArrayFixFlat<RMobilePhone::TUSimApplicationInfoV2>* iUSimAppInfo;
       
   107 	TUSimNotifyData iNotifyInfo;
       
   108 	TNotifyData iNotifyMode;
       
   109 	TBool iTimerStarted;
       
   110 	TBool iFoundUSimAppTags;
       
   111 	};
       
   112 
       
   113 #endif