locationsystemui/locationsysui/locsettingsuiservice/locsettingsuiserver/inc/locsettingsuiservice.h
branchRCL_3
changeset 44 2b4ea9893b66
parent 42 02ba3f1733c6
child 45 6b6920c56e2f
equal deleted inserted replaced
42:02ba3f1733c6 44:2b4ea9893b66
     1 /*
       
     2 * Copyright (c) 2005 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:  The declaration for Service class of Location Settings UI 
       
    15 *                Server
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef C_LOCSETTINGSUISERVICE_H
       
    21 #define C_LOCSETTINGSUISERVICE_H
       
    22 
       
    23 #include <AknServerApp.h>
       
    24 
       
    25 /**
       
    26  *  The service class for Location Settings UI Application Server.
       
    27  *
       
    28  *  The Service class receives requests from the clients. It
       
    29  *  processes these requests to provide the Settings UI Launch
       
    30  *  service.
       
    31  *
       
    32  *  @lib 
       
    33  *  @since S60 v3.1
       
    34  */
       
    35 NONSHARABLE_CLASS(CLocSettingsUIService) : public CAknAppServiceBase
       
    36     {
       
    37 public:
       
    38     /**
       
    39      * Constructor
       
    40      */
       
    41     CLocSettingsUIService();
       
    42 
       
    43     /**
       
    44      * Destructor
       
    45      */
       
    46     virtual ~CLocSettingsUIService();
       
    47 
       
    48 public:
       
    49     /**
       
    50      * Override of CAknAppServiceBase
       
    51      * This function must base-call CAknAppServiceBase::CreateL()
       
    52      *
       
    53      * @param None.
       
    54      * @return None.
       
    55      */
       
    56     void CreateL();
       
    57     
       
    58     /**
       
    59      * Override of CAknAppServiceBase
       
    60      * This function must base-call CAknAppServiceBase::ServiceL()
       
    61      *
       
    62      * @param aMessage The client message
       
    63      * @return None.
       
    64      */
       
    65     void ServiceL(const RMessage2& aMessage);
       
    66 
       
    67     /**
       
    68      * Override of CAknAppServiceBase
       
    69      * This function must base-call CAknAppServiceBase::ServiceError()
       
    70      *
       
    71      * @param aMessage The client message.
       
    72      * @param aError The error code to which occured during message servicing
       
    73      * @return None.
       
    74      */
       
    75     void ServiceError(const RMessage2& aMessage,TInt aError);
       
    76 
       
    77     /**
       
    78      * Override of CApaAppServiceBase
       
    79      * This method is called for every request.
       
    80      * This method checks whether the client has the neccessary
       
    81      * permission to execute this request.
       
    82      *
       
    83      * @param aMessage The client message.
       
    84      * @param aAction The Action to be taken if the security check fails.
       
    85      * This is typically a value from TFailureAction.
       
    86      * @param aMissing A reference to the list of security attributes missing
       
    87      * from the checked process.  The policy server initialises this
       
    88      * object to zero (that is a sid of 0, a vid of 0, and no capabilities).
       
    89      * If derived implementations wish to take advantage of a list of
       
    90      * missing attributes in their implementation of CustomFailureActionL(),
       
    91      * then they should set those missing attributes here in
       
    92      * CustomSecurityCheckL().
       
    93      * @return A value from CPolicyServer::TCustomResult.
       
    94      */
       
    95 	
       
    96 	CPolicyServer::TCustomResult SecurityCheckL(const RMessage2& aMessage,
       
    97 	                                            TInt& aAction,
       
    98 	                                            TSecurityInfo& aMissing);
       
    99     
       
   100 private: // Helper methods
       
   101     /**
       
   102      * This is a helper method to determine whether the passed parameters are
       
   103      * valid or not.
       
   104      *
       
   105      * @param aSettingsUid The UID value for the settings UI.
       
   106      * @param aParams The opaque paramters that are passed from the client
       
   107      * to the Settings UI.
       
   108      * @return Etrue if the parameters valid. EFalse otherwise.
       
   109      */
       
   110     TBool IsLaunchParamsValid(      TInt aSettingsUid,
       
   111                               const TInt aParams);
       
   112 
       
   113 private: // data
       
   114     /**
       
   115      * Boolean to indicate whether a Settings UI has been launched from this
       
   116      * session object or not.
       
   117      */
       
   118     TBool iSettingsUILaunched;
       
   119     };
       
   120 
       
   121 #endif // C_LOCSETTINGSUISERVICE_H