fotaapplication/fmserver/inc/fmsserversession.h
changeset 44 39aa16f3fdc2
equal deleted inserted replaced
43:c8e5c3d81b42 44:39aa16f3fdc2
       
     1 /*
       
     2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description: Implementation of fotaserver component
       
    15 * 	This is part of fotaapplication.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef __FMS_SESSION_H__
       
    20 #define __FMS_SESSION_H__
       
    21 
       
    22 #include "fmsserver.h"
       
    23 
       
    24 class CFMSSession: public CSession2
       
    25 {
       
    26 	friend class CFMSServer;
       
    27 	public:
       
    28 		/**
       
    29 		 * Destructor
       
    30 		 */
       
    31 		virtual ~CFMSSession();		
       
    32 	
       
    33 	private:
       
    34 		/**
       
    35 		 * Constructor
       
    36 		 */ 
       
    37 		CFMSSession();
       
    38 		
       
    39 		/**
       
    40 		 * Provides FMS Server reference
       
    41 		 * @param None.
       
    42 		 * @return CFMSServer reference
       
    43 		 */ 
       
    44 		CFMSServer& Server();
       
    45 		
       
    46 		/**
       
    47 		 * Called by the framework to handle the request 	 
       
    48 		 * @param aMessage
       
    49 		 * @return None
       
    50 		 */
       
    51 		void ServiceL(const RMessage2& aMessage);
       
    52 		
       
    53 		/**
       
    54 		 * Called from ServiceL to handle the request 
       
    55 		 * @param aMessage
       
    56 		 * @return None
       
    57 		 */
       
    58 		void DispatchMessageL(const RMessage2& aMessage);
       
    59 		
       
    60 		
       
    61 		/**
       
    62 		 * Called when ServiceL leaves
       
    63 		 * @param aMessage
       
    64 		 * @param aError
       
    65 		 * @return None
       
    66 		 */
       
    67 		void ServiceError(const RMessage2 &aMessage, TInt aError);
       
    68 		
       
    69 		/**
       
    70 		 * Checks whether the session started client is secured or not	 
       
    71 		 * @param aMessage
       
    72 		 * @return TBool
       
    73 		 */
       
    74 		TBool CheckClientSecureIdL( const RMessage2 &aMessage );
       
    75 		
       
    76 		/**
       
    77 		 * Finds the bearer id for the corresponding IAP Id		 
       
    78 		 * @param aIapId
       
    79 		 * @return TUint32, bearer id
       
    80 		 */
       
    81 		TUint32 FindBearerIdL(TInt aIapId);
       
    82 		
       
    83 		/**
       
    84 		 * Writes Dummy file in case of unsupported monitoring		 
       
    85 		 * @param None.
       
    86 		 * @return CFMSServer reference
       
    87 		 */
       
    88 		void WriteDummyFile();
       
    89 		
       
    90 		/**
       
    91 		 * Checks whether the phone is in 2G or 3G mode
       
    92 		 * sets the member variable iWcdmaBearer
       
    93 		 * @param None.
       
    94 		 * @return CFMSServer reference
       
    95 		 */
       
    96 		void PhoneModeL();
       
    97 		
       
    98 		/**
       
    99 		 * 
       
   100 		 * Handles the service based on bearer type
       
   101 		 * @param aMessage.
       
   102 		 * @return None
       
   103 		 */
       
   104 			void HandleBasedOnBearertypeL(const RMessage2& aMessage);
       
   105 	private:	
       
   106 		TBool iStopServer;
       
   107 		TBool iWlanbearer;
       
   108 		TBool iWcdmaBearer;
       
   109 };
       
   110 
       
   111 
       
   112 #endif