sysstatemgmt/ssmmapperutility/inc/ssmmapperutilitystatic.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     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:
       
    15 * Declaration of SsmMapperUtility class.
       
    16 *
       
    17 */
       
    18 
       
    19 #ifndef SSMMAPPERUTILITYSTATIC_H
       
    20 #define SSMMAPPERUTILITYSTATIC_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class TSsmState;
       
    25 
       
    26 /**
       
    27 * Utility class for mapping Uids, getting feature and system states and
       
    28 * cenrep values.
       
    29 * This class contains static versions of the utilities provided by
       
    30 * CSSmMapperUtility. Use static functions provided here sparingly,
       
    31 * because each function creates own instance of CSSmMapperUtility.
       
    32 */
       
    33 class SsmMapperUtility
       
    34     {
       
    35 public:
       
    36 
       
    37     /**
       
    38      * Methods for mapping p&s, cenrep and feature Uids
       
    39      *
       
    40      * @param aUid The Uid to map
       
    41      * @return The mapped Uid
       
    42      */
       
    43     IMPORT_C static TUid PsUid( const TUid& aUid );
       
    44     IMPORT_C static TUid CrUid( const TUid& aUid );
       
    45     IMPORT_C static TUid FeatureUid( const TUid& aUid );
       
    46 
       
    47     /**
       
    48      * Get the current system state
       
    49      *
       
    50      * @param aState On return contains the current state
       
    51      * @return KErrNone if system state read successfully.
       
    52      *         Otherwise one of Symbian error codes. 
       
    53      */
       
    54     IMPORT_C static TInt GetCurrentState( TSsmState& aState );
       
    55 
       
    56     /**
       
    57      * Gets the requested feature Uid's status
       
    58      *
       
    59      * @param aUid Requested feature Uid
       
    60      * @return ETrue if feature supported, otherwise EFalse
       
    61      */
       
    62     IMPORT_C static TBool FeatureStatus( const TUid& aUid );
       
    63 
       
    64     /**
       
    65      * Gets the requested cenrep key's value
       
    66      *
       
    67      * @param aUid Requested cenrep Uid
       
    68      * @param aKey Requested cenrep key
       
    69      * @param aValue On return contains value of requested key
       
    70      * @return KErrNone if value read successfully.
       
    71      *         Otherwise one of Symbian error codes.
       
    72      */
       
    73     IMPORT_C static TInt CrValue( const TUid& aUid, TUint32 aKey, TInt& aValue );
       
    74 
       
    75     /**
       
    76      * Gets the requested cenrep key's value
       
    77      *
       
    78      * @param aUid Requested cenrep Uid
       
    79      * @param aKey Requested cenrep key
       
    80      * @param aValue On return contains value of requested key
       
    81      * @return KErrNone if descriptor read successfully.
       
    82      *         Otherwise one of Symbian error codes.
       
    83      */
       
    84     IMPORT_C static TInt CrValue( const TUid& aUid, TUint32 aKey, TDes& aValue );
       
    85 
       
    86     /**
       
    87      * Gets the path to command lists
       
    88      *
       
    89      * @param aCmdListPath Default path. Will be modified if called from test code.
       
    90      */
       
    91     IMPORT_C static void GetCommandListPath( TDes& aCmdListPath );
       
    92 
       
    93     /**
       
    94      * Checks the capabilities of client
       
    95      *
       
    96      * @aMessage Client message
       
    97      * @return ETrue if capabilities ok, otherwise EFalse
       
    98      */
       
    99     IMPORT_C static TBool CheckCaps( const RMessagePtr2& aMessage );
       
   100     };
       
   101 
       
   102 #endif // SSMMAPPERUTILITYSTATIC_H