contextframework/cfwplugins/ApplicationStateSourcePlugIn/inc/cfapplicationstatesettings.h
changeset 0 2e3d3ce01487
child 17 5e7d68cc22e0
equal deleted inserted replaced
-1:000000000000 0:2e3d3ce01487
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  Encapsulates information about application and its views.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CFAPPLICATIONSTATESETTINGS_H
       
    20 #define CFAPPLICATIONSTATESETTINGS_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 
       
    25 #include "cfuidnamepair.h"
       
    26 
       
    27 /**
       
    28 *
       
    29 */
       
    30 /**
       
    31 *  Encapsulates information about application and its views.
       
    32 *
       
    33 *  Contains uid name pairs of application itself and its views.
       
    34 *
       
    35 *  @lib
       
    36 *  @since S60 v4.0
       
    37 */
       
    38 class CCFApplicationStateSettings : public CBase
       
    39     {
       
    40     public:
       
    41 
       
    42         /**
       
    43         * Two phased constructor.
       
    44         *
       
    45         * @since S60 4.0
       
    46         * @param aUid Uid.
       
    47         * @param aName Name.
       
    48         * @return CCFApplicationStateSettings*
       
    49         */
       
    50         static CCFApplicationStateSettings* NewL(
       
    51             const TUid& aUid,
       
    52             const TDesC& aName );
       
    53         static CCFApplicationStateSettings* NewLC(
       
    54             const TUid& aUid,
       
    55             const TDesC& aName );
       
    56 
       
    57         virtual ~CCFApplicationStateSettings();
       
    58 
       
    59     public:
       
    60 
       
    61         /**
       
    62         * Returns application uid.
       
    63         *
       
    64         * @since S60 4.0
       
    65         * @param None
       
    66         * @return const TUid&
       
    67         */
       
    68         const TUid& Uid() const;
       
    69 
       
    70         /**
       
    71         * Returns application name.
       
    72         *
       
    73         * @since S60 4.0
       
    74         * @param None
       
    75         * @return const TDesC&
       
    76         */
       
    77         const TDesC& Name() const;
       
    78 
       
    79         /**
       
    80         * Adds view settings.
       
    81         *
       
    82         * @since S60 4.0
       
    83         * @param aViewSettings Uid and name of the view, ownership is
       
    84         *  transferred.
       
    85         * @return None
       
    86         */
       
    87         void AddViewSettingsL( CCFUidNamePair* aViewSettings );
       
    88 
       
    89         /**
       
    90         * Gets view name.
       
    91         *
       
    92         * @since S60 4.0
       
    93         * @param aUid Defines the view whose name is got.
       
    94         * @param aName Pointer for the view name. Is modified only if the view
       
    95         *  is found.
       
    96         * @return None
       
    97         */
       
    98         void GetViewName( const TUid& aUid, TPtrC& aName ) const;
       
    99 
       
   100     private:
       
   101 
       
   102         CCFApplicationStateSettings();
       
   103 
       
   104         void ConstructL( const TUid& aUid, const TDesC& aName );
       
   105 
       
   106     private: // Data
       
   107 
       
   108         // Application uid name pair.
       
   109         CCFUidNamePair* iApplicationInfo;
       
   110 
       
   111         // Application view's uid name pairs.
       
   112         RUidNamePointerArray iViewInfo;
       
   113     };
       
   114 
       
   115 typedef RPointerArray< CCFApplicationStateSettings > RApplicationStateSettingsPointerArray;
       
   116 
       
   117 #endif // CFAPPLICATIONSTATESETTINGS_H