cbsref/telephonyrefplugins/atltsy/atcommand/pktservice/inc/initialisepdpcontext.h
branchRCL_3
changeset 65 630d2f34d719
equal deleted inserted replaced
61:17af172ffa5f 65:630d2f34d719
       
     1 // Copyright (c) 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 // @file initialisepdpcontext.h
       
    15 // This contains CInitialisePdpContext which is defines the founctions for loan comm port.
       
    16 // 
       
    17 
       
    18 #ifndef __INITIALISEPDPCONTEXT_H__
       
    19 #define __INITIALISEPDPCONTEXT_H__
       
    20 
       
    21 #include <callbacktimer.h>
       
    22 
       
    23 // user include
       
    24 #include "atcommandcontrolbase.h"
       
    25 #include "cltsypacketserviceshandler.h"
       
    26 
       
    27 /**
       
    28  *  CInitialisePdpContext inherits from the MTimerObserver class. 
       
    29  * This class provide the common functionalities for Initialise Pdp Context.
       
    30  */
       
    31 class CInitialisePdpContext : public MTimerObserver,
       
    32                               public CBase
       
    33 {
       
    34 public:
       
    35 	static CInitialisePdpContext* NewL(CGlobalPhonemanager& aGloblePhone, 
       
    36 		                               CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    37 	/**
       
    38 	 * Destructor
       
    39 	 *
       
    40 	 */
       
    41 	~CInitialisePdpContext();
       
    42 
       
    43 	void StartRequest();
       
    44 	/*
       
    45 	 * Set the parameter of AT command 
       
    46 	 * 
       
    47 	 * @param aContext The context to be set configuration
       
    48 	 */
       
    49 	void SetContext(const TInt aContextId);
       
    50 	/**
       
    51 	 * This function will stop the TSY from using the comport 
       
    52 	 * and loan it to the client.
       
    53 	 */
       
    54 	void LoanCommPort();
       
    55 	
       
    56 protected:	
       
    57 	/**
       
    58 	 * Constructor
       
    59 	 *
       
    60 	 * @param aGloblePhone
       
    61 	 * @param aCtsyDispatcherCallback
       
    62 	 */
       
    63 	CInitialisePdpContext(CGlobalPhonemanager& aGloblePhone, 
       
    64 		                  CCtsyDispatcherCallback& aCtsyDispatcherCallback);
       
    65 	/**
       
    66 	 * 2nd Constructor
       
    67 	 */
       
    68 	void ConstructL();
       
    69 private:
       
    70 	//From MTimerObserver
       
    71     virtual void TimerRun(TInt aError);	
       
    72 private:
       
    73 	
       
    74 	CGlobalPhonemanager& iPhoneGlobals;
       
    75 	CCtsyDispatcherCallback& iCtsyDispatcherCallback;
       
    76 	CCallbackTimer* iCallbackTimer;	
       
    77 	/*
       
    78 	 * The context to be set configuration
       
    79 	 */
       
    80 	TInt iContextId;
       
    81     };
       
    82 
       
    83 #endif //__INITIALISEPDPCONTEXT_H__