hotspotfw/hsserver/inc/hotspotserver.h
branchRCL_3
changeset 10 dff6ebfd236f
parent 2 6e4b6261703d
child 23 b852595f5cbe
equal deleted inserted replaced
8:c2bc3f8c7777 10:dff6ebfd236f
    84 	EPanicIllegalFunction
    84 	EPanicIllegalFunction
    85 	};
    85 	};
    86 
    86 
    87 void PanicClient(const RMessagePtr2& aMessage,THotspotPanic aPanic);
    87 void PanicClient(const RMessagePtr2& aMessage,THotspotPanic aPanic);
    88 
    88 
       
    89 /**
       
    90 * Stores RMessage entries
       
    91 */
    89 struct SRequestMapEntry
    92 struct SRequestMapEntry
    90         {
    93         {
    91         RMessagePtr2 iMessage;
    94         RMessagePtr2 iMessage;
    92         THotSpotCommands iFunction;
    95         THotSpotCommands iFunction;
    93         TUint iIapId;
    96         TUint iIapId;
    94         };
    97         };
    95 	
    98 /**
       
    99 * Stores timer values for each client
       
   100 */	
    96 struct SLoginLogoutTimers
   101 struct SLoginLogoutTimers
    97         {
   102         {
    98         TUid clientUid;
   103         TBuf<KUidLength> iClientUid;
    99         TUint loginTimeMicroSecs;
   104         TUint iLoginTimeMicroSecs;
   100         TUint logoutTimeMicroSecs;
   105         TUint iLogoutTimeMicroSecs;
   101         };
   106         };
   102     
   107 
       
   108 /**
       
   109 * Stores all registered IAPs and their client UIDs
       
   110 */
       
   111 struct SClientIaps
       
   112         {
       
   113         TUint iIapId;
       
   114         TBuf<KUidLength> iClientUid;
       
   115         };
       
   116 
   103 // CLASS DECLARATION
   117 // CLASS DECLARATION
   104 
   118 
   105 /**
   119 /**
   106 *  The server of HotSpot services.
   120 *  The server of HotSpot services.
   107 *
   121 *
   207         /**
   221         /**
   208         * Gets value whether WLAN association status can be sent
   222         * Gets value whether WLAN association status can be sent
   209         * @return ETrue if can be sent. Otherwise EFalse.
   223         * @return ETrue if can be sent. Otherwise EFalse.
   210         */
   224         */
   211         TBool GetAssociationFlagValue();
   225         TBool GetAssociationFlagValue();
   212         
   226    
   213         /**
   227         /**
   214         * Set service id of IAP in use
   228         * Finds HotspotFW created client IAPs.
   215         * @since Series 60 3.0
   229         * @since Series 60 5.2
   216         * @param aServiceId service id
   230         * @return None
   217         * @return None
   231         */
   218         */
   232         void FindClientIapsL();
   219         void SetServiceId( TInt aServiceId );
   233         
   220         
   234         /**
   221         /**
   235         * Checks IAPs if there's any unused Hotspot IAPs.
   222         * Gets service id of IAP in use
   236         * @since Series 60 3.2
   223         * @since Series 60 3.0
   237         * @return None
   224         * @return service ID
   238         */
   225         */
   239         void CheckIapsL();
   226         TInt GetServiceId();
   240         
       
   241         /**
       
   242         * Get login timer value for the specified client.
       
   243         * @since Series 60 5.2
       
   244         * @param aClientUid, clients user id
       
   245         * @return Login timer value.
       
   246         */        
       
   247         TUint GetLoginTimeMicroSecs( TDes& aClientUid );
   227     
   248     
   228         /**
   249         /**
   229         * Checks IAPs if there's any unused Hotspot IAPs.
       
   230         * @since Series 60 3.0
       
   231         * @return None
       
   232         */
       
   233         void CheckIapsL();
       
   234         
       
   235         /**
       
   236         * Get login timer value for the specified client.
       
   237         * @param aClientUid, client's user ID,
       
   238         * @return Login timer value.
       
   239         */        
       
   240         TUint GetLoginTimeMicroSecs( TUid aClientUid );
       
   241     
       
   242         /**
       
   243         * Get logout timer value for the specified client.
   250         * Get logout timer value for the specified client.
   244         * @param aClientUid, client's user ID,
   251         * @since Series 60 5.2
       
   252         * @param aClientUid, clients user id
   245         * @return Logout timer value.
   253         * @return Logout timer value.
   246         */        
   254         */        
   247         TUint GetLogoutTimeMicroSecs( TUid aClientUid );
   255         TUint GetLogoutTimeMicroSecs( TDes& aClientUid );
   248 
   256 
   249         /**
   257         /**
   250         * Set both login and logout timer values for the specified client.
   258         * Set both login and logout timer values for the specified client.
   251         * @param aClientUid, client's user ID,
   259         * @since Series 60 5.2
   252         * @param aLoginTimerValue, set login timer value,
   260         * @param aClientUid, clients user id
       
   261         * @param aLoginTimerValue, set login timer value
   253         * @param aLogoutTimerValue, set logout timer value.
   262         * @param aLogoutTimerValue, set logout timer value.
   254         */        
   263         */        
   255         void CHotSpotServer::SetTimerValues(
   264         void SetTimerValues(
   256                 TUid aClientUid,
   265                 TDes& aClientUid,
   257                 TUint aLoginTimerValue,
   266                 TUint aLoginTimerValue,
   258                 TUint aLogoutTimerValue );
   267                 TUint aLogoutTimerValue );
       
   268         
       
   269         /**
       
   270         * Finds if given IAP id has an existing client.
       
   271         * @since Series 60 5.2
       
   272         * @param aClientUid, clients user id
       
   273         * @return KErrNone if client is found, otherwise KErrNotFound
       
   274         */        
       
   275         TInt GetClientUid( TUint aIapId, TDes& aUid );
       
   276 
       
   277         /**
       
   278         * Adds client IAP to the array.
       
   279         * @since Series 60 5.2
       
   280         * @param aIapId, IAP id
       
   281         * @param aUid, clients user id
       
   282         */        
       
   283         void SetClientIap( TUint aIapId, TDes& aUid );
       
   284 
       
   285         /**
       
   286         * Removes client IAP from the array.
       
   287         * @since Series 60 5.2
       
   288         * @param aIapId, IAP id
       
   289         */        
       
   290         void RemoveClientIap( TUint aIapId );
       
   291 
       
   292         /**
       
   293         * Returns Easy WLAN IAP id.
       
   294         * @since Series 60 5.2
       
   295         * @return Easy WLAN id
       
   296         */        
       
   297         TInt GetEasyWlanId();
   259         
   298         
   260     private:
   299     private:
   261         
   300         
   262         /**
   301         /**
   263         * Find matching Client UID from the timer array.
   302         * Find matching Client UID from the timer array.
   264         * @param aClientUid, client UID to find.
   303         * @param aClientUid, client UID to find.
   265         * @return matching index if UID was found, otherwise KErrNotFound.
   304         * @return matching index if UID was found, otherwise KErrNotFound.
   266         */        
   305         */        
   267         TInt CHotSpotServer::FindClientUid( TUid aClientUid );
   306         TInt FindClientUid( TDes& aClientUid );
   268         
   307         
   269     public: // Functions from base classes
   308     public: // Functions from base classes
   270 
   309 
   271         /**
   310         /**
   272         * From CServer creates a new session
   311         * From CServer creates a new session
   329         * Flag for sending WLAN association status to client
   368         * Flag for sending WLAN association status to client
   330         */
   369         */
   331         TBool iAssociationValue;
   370         TBool iAssociationValue;
   332         
   371         
   333         /**
   372         /**
   334         * Boolean flag whether the IAPs has been checked or not
   373         * Flag for the IAP check
   335         */
   374         */
   336         TBool iIapCheckValue;
   375         TBool iIapCheckValue;
       
   376         
       
   377         /**
       
   378         * Flag for client IAP search
       
   379         */
       
   380         TInt iClientIapsChecked;
   337 
   381 
   338         /**
   382         /**
   339         * WLAN management API
   383         * WLAN management API
   340         */
   384         */
   341         CWlanMgmtClient* iMgtClient;
   385         CWlanMgmtClient* iMgtClient;
   342         
   386        
   343         /**
       
   344         * Service id of IAP in use
       
   345         */
       
   346         TInt iCurrentServiceIdInUse;
       
   347         
       
   348         /**
   387         /**
   349         * Array for storing client dependent login and logout timer values.
   388         * Array for storing client dependent login and logout timer values.
   350         */
   389         */
   351         RArray<SLoginLogoutTimers> iLoginLogoutTimerArray;
   390         RArray<SLoginLogoutTimers> iLoginLogoutTimerArray;
       
   391         
       
   392         /**
       
   393         * Array for storing client IAPs and their UIDs.
       
   394         */
       
   395         RArray<SClientIaps> iClientIaps;
       
   396         
       
   397         /**
       
   398         * Easy WLAN IAP Id
       
   399         */
       
   400         TInt iEasyWlanId;
   352 	};
   401 	};
   353 
   402 
   354 #endif
   403 #endif