wim/WimServer/inc/WimServer.h
branchRCL_3
changeset 5 3b17fc5c9564
parent 0 164170e6151a
equal deleted inserted replaced
1:d5423fbb4f29 5:3b17fc5c9564
     1 /*
     1 /*
     2 * Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies). 
     2 * Copyright (c) 2003-2010 Nokia Corporation and/or its subsidiary(-ies).
     3 * All rights reserved.
     3 * All rights reserved.
     4 * This component and the accompanying materials are made available
     4 * This component and the accompanying materials are made available
     5 * under the terms of "Eclipse Public License v1.0"
     5 * under the terms of "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
   135  * Implements shutdown of the server.  When the last client disconnects, this
   135  * Implements shutdown of the server.  When the last client disconnects, this
   136  * class is activated, and when the timer expires, causes the server to
   136  * class is activated, and when the timer expires, causes the server to
   137  * close.
   137  * close.
   138  *
   138  *
   139  *  @lib
   139  *  @lib
   140  *  @since S60 
   140  *  @since S60
   141  */
   141  */
   142 class CShutdown : public CTimer
   142 class CShutdown : public CTimer
   143     {  
   143     {
   144     public:
   144     public:
   145     
   145 
   146         inline CShutdown();
   146         inline CShutdown();
   147         
   147 
   148         inline void ConstructL();
   148         inline void ConstructL();
   149         
   149 
   150         inline void Start();
   150         inline void Start();
   151         
   151 
   152     private:
   152     private:
   153         
   153 
   154         void RunL();
   154         void RunL();
   155     };
   155     };
   156 
   156 
   157 #endif //WIMSERVER_SHUTDOWN
   157 #endif //WIMSERVER_SHUTDOWN
   158 
   158 
   217         static CWimServer* Server();
   217         static CWimServer* Server();
   218 
   218 
   219         /**
   219         /**
   220         * Initializes WIMI if not yet initialized.
   220         * Initializes WIMI if not yet initialized.
   221         * In initalization WIM data from card is fetched to WIMI.
   221         * In initalization WIM data from card is fetched to WIMI.
       
   222         * @param aMessage  Client request, completed to return initialization status.
   222         * @return void
   223         * @return void
   223         */
   224         */
   224         void WimInitialize( const RMessage2& aMessage );
   225         void WimInitialize( const RMessage2& aMessage );
   225         
   226 
   226         /**
   227         /**
   227         * Cancel Initializes WIMI if not yet initialized.
   228         * Cancel Initializes WIMI if not yet initialized.
   228         * Stop the apdu sending
   229         * Stop the apdu sending
       
   230         * @param aMessage  Client request, completed with KErrNone.
   229         * @return void
   231         * @return void
   230         */
   232         */
   231         void CancelWimInitialize( const RMessage2& aMessage );
   233         void CancelWimInitialize( const RMessage2& aMessage );
   232 
   234 
   233         /**
   235         /**
   234         * Set WimInitialized flag
   236         * Set WimInitialized flag
   235         * @param aInitialized ETrue/EFalse whether WIM is initialized
   237         * @param aInitialized  ETrue/EFalse whether WIM is initialized
   236         * @return void
   238         * @param aWimStatus    KErrNone or other error code
   237         */
   239         * @return void
   238         static void SetWimInitialized( TBool aInitialized, TInt aStatus  );
   240         */
       
   241         static void SetWimInitialized( TBool aInitialized, TInt aWimStatus );
   239 
   242 
   240         /**
   243         /**
   241         * Get TrustSettingsStore pointer
   244         * Get TrustSettingsStore pointer
   242         * @param void
   245         * @param void
   243         * @return pointer to TrustSettingsStore
   246         * @return pointer to TrustSettingsStore
   274         * Server shall re-initialize itself at earliest convenience.
   277         * Server shall re-initialize itself at earliest convenience.
   275         * @see IsAccessingToken()
   278         * @see IsAccessingToken()
   276         * @param  TBool  Refresh event received from SAT.
   279         * @param  TBool  Refresh event received from SAT.
   277         */
   280         */
   278         void SetRefreshNotificationReceived( TBool aValue );
   281         void SetRefreshNotificationReceived( TBool aValue );
   279         
   282 
   280         /**
   283         /**
   281         * Return the pointer of Timer
   284         * Return the pointer of Timer
   282         */
   285         */
   283         CWimTimer* WimTimer();
   286         CWimTimer* WimTimer();
   284         
   287 
   285         /**
   288         /**
   286         * Interface derived from MWimTimerListener
   289         * Interface derived from MWimTimerListener
   287         */
   290         */
   288         void TimerExpired();
   291         void TimerExpired();
   289         
   292 
   290 #ifdef WIMSERVER_SHUTDOWN
   293 #ifdef WIMSERVER_SHUTDOWN
   291         void AddSession();
   294         void AddSession();
   292 
   295 
   293         void DropSession();
   296         void DropSession();
   294 #endif //WIMSERVER_SHUTDOWN
   297 #endif //WIMSERVER_SHUTDOWN
   419         // Pointer to CWimSessionRegistry
   422         // Pointer to CWimSessionRegistry
   420         CWimSessionRegistry* iWimSessionRegistry;
   423         CWimSessionRegistry* iWimSessionRegistry;
   421         // Pointer to CServer object
   424         // Pointer to CServer object
   422         static CWimServer*   iWimServer;
   425         static CWimServer*   iWimServer;
   423         // Callback structure for WIMI
   426         // Callback structure for WIMI
   424        
   427 
   425         /**
   428         /**
   426         * Current service is accessing physical token.
   429         * Current service is accessing physical token.
   427         * Used to determine if SIM Refresh can be allowed.
   430         * Used to determine if SIM Refresh can be allowed.
   428         */
   431         */
   429         TBool                iIsAccessingToken;
   432         TBool                iIsAccessingToken;
   442         /**
   445         /**
   443         * BT Sap refresh event observer. Owned.
   446         * BT Sap refresh event observer. Owned.
   444         *
   447         *
   445         */
   448         */
   446    		CWimBTSapObserver* iBTSapObserver;
   449    		CWimBTSapObserver* iBTSapObserver;
   447    		  
   450 
   448    		  // Pointer to Timer. Owned
   451         // Pointer to Timer. Owned
   449    		  CWimTimer* iWimTimer;
   452         CWimTimer* iWimTimer;
   450 
   453 
   451 #ifdef WIMSERVER_SHUTDOWN   		  
   454 #ifdef WIMSERVER_SHUTDOWN
   452    		CShutdown iShutdown;
   455    		CShutdown iShutdown;
   453 #endif   		
   456 #endif
   454     };
   457     };
   455 
   458 
   456 #endif      // CWIMSERVER_H
   459 #endif      // CWIMSERVER_H
   457 
   460 
   458 // End of File
   461 // End of File