menucontentsrv/enginc/menuengobject.h
author Pat Downey <patd@symbian.org>
Wed, 01 Sep 2010 12:22:09 +0100
branchRCL_3
changeset 114 a5a39a295112
permissions -rw-r--r--
Revert incorrect RCL_3 drop: Revision: 201033 Kit: 201035
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
114
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     1
/*
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     2
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     3
* All rights reserved.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     4
* This component and the accompanying materials are made available
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     6
* which accompanies this distribution, and is available
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     8
*
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
     9
* Initial Contributors:
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    11
*
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    12
* Contributors:
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    13
*
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    14
* Description:
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    15
*
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    16
*/
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    17
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    18
#ifndef __MENUENGOBJECT_H__
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    19
#define __MENUENGOBJECT_H__
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    20
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    21
#include <e32base.h>
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    22
#include <gecoobjectbase.h>
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    23
#include <gecodefaultobject.h>
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    24
#include <gecoattributeprovider.h>
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    25
#include "menuengobjectattr.h"
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    26
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    27
// FORWARD DECLARATION
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    28
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    29
class CMenuEng;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    30
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    31
/**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    32
* Menu Engine Object.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    33
* Menu Engine Object represent menu items in the Engine. Object are normally
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    34
* owned by the Engine; exception are the items that are created but not yet
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    35
* added to the Engine (these are temporarily owned by the client.)
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    36
* The primary identity of objects is the Id(), this is persistent and unique.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    37
* 0 is not a valid ID.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    38
*/
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    39
NONSHARABLE_CLASS( CMenuEngObject ): public CGECODefaultObject
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    40
    {
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    41
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    42
public:     // construction
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    43
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    44
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    45
    * Enum indicating type of application.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    46
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    47
    enum TAppType
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    48
        {
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    49
        ENoTypeApp,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    50
        ENativeApp,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    51
        EJavaApp,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    52
        EWidgetApp
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    53
        };
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    54
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    55
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    56
    * Destructor.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    57
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    58
    IMPORT_C virtual ~CMenuEngObject();
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    59
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    60
protected:  // construction
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    61
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    62
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    63
    * Constructor.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    64
    * @param aEng Engine.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    65
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    66
    CMenuEngObject( CMenuEng& aEng );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    67
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    68
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    69
    * Second phase constructor.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    70
    * @param aType Type.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    71
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    72
    void ConstructL( const TDesC& aType );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    73
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    74
public:     // new methods
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    75
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    76
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    77
    * Get ID. The object always has a valid unique ID (even if the object is
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    78
    * not added to the Engine yet).
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    79
    * @return ID.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    80
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    81
    IMPORT_C TInt Id() const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    82
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    83
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    84
    * Get flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    85
    * @param aFactoryCall for call from factory object(used to skip central repository check).
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    86
    * @return Flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    87
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    88
    IMPORT_C TUint32 Flags( TBool aFactoryCall = EFalse ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    89
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    90
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    91
    * Get type.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    92
    * @return Type.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    93
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    94
    IMPORT_C TPtrC Type() const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    95
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    96
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    97
    * Get number of attributes.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    98
    * @return Number of attributes.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
    99
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   100
    IMPORT_C TInt NumAttributes() const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   101
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   102
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   103
    * Get attribute by index.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   104
    * @param aIndex Attribute index.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   105
    * @param aName Name is returned here.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   106
    * @param aValue Value is returned here.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   107
    * @param aLocalized ETrue if attribute is localized.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   108
    * @return ETrue (unless aIndex is not valid).
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   109
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   110
    IMPORT_C TBool GetAttribute(
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   111
        TInt aIndex,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   112
        TPtrC& aName,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   113
        TPtrC& aValue,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   114
        TBool& aLocalized ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   115
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   116
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   117
    * Find attribute by name.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   118
    * @param aName Name.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   119
    * @param aValue Value is returned here.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   120
    * @param aLocalized Etrue if attribute is localized.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   121
    * @return ETrue if found.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   122
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   123
    IMPORT_C TBool FindAttribute(
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   124
        const TDesC& aName,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   125
        TPtrC& aValue,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   126
        TBool& aLocalized ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   127
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   128
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   129
    * Set or clear flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   130
    * @param aMask Flags to set or clear.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   131
    * @param aOn ETrue to set, EFalse to clear.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   132
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   133
    IMPORT_C void SetFlags( TUint32 aMask, TBool aOn );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   134
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   135
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   136
    * Set attribute value. Old value, if any, is replaced.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   137
    * @param aAttrName Name.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   138
    * @param aAttrValue Value.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   139
    * @param aLocalized ETrue if attribute is localized.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   140
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   141
    IMPORT_C void SetAttributeL(
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   142
        const TDesC& aAttrName,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   143
        const TDesC& aAttrValue,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   144
        TBool aLocalized ); // Set attribute value.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   145
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   146
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   147
    * Set attribute value. Old value, if any, is replaced.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   148
    * For use when reading xml file with initial data
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   149
    * and as a helper method for SetAttributeL.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   150
    * @param aAttrName Name.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   151
    * @param aAttrValue Value.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   152
    * @param aLocalized ETrue if attribute is localized.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   153
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   154
    void SetInitialAttributeL(
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   155
        const TDesC& aAttrName,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   156
        const TDesC& aAttrValue,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   157
        TBool aLocalized ); // Set attribute value.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   158
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   159
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   160
    * Method to set iNative for apps.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   161
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   162
    IMPORT_C void SetAppType( TAppType aNative );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   163
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   164
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   165
    * Method to get iNative for apps.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   166
    * @return ETrue if app is native.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   167
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   168
    IMPORT_C TAppType GetAppType() const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   169
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   170
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   171
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   172
    * Remove attribute.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   173
    * @param aAttrName Name.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   174
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   175
    IMPORT_C void RemoveAttribute( const TDesC& aAttrName );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   176
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   177
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   178
    * Remove all attributes and flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   179
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   180
    IMPORT_C void Reset(); // Remove all attributes and clear all flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   181
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   182
public:     // but not imported: for the engine's use only.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   183
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   184
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   185
    * Two-phased constructor.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   186
    * @param aEng Engine.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   187
    * @param aType Type.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   188
    * @return The created object.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   189
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   190
    static CMenuEngObject* NewL( CMenuEng& aEng, const TDesC& aType );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   191
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   192
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   193
    * Set ID.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   194
    * @param aId ID.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   195
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   196
    void SetId( TInt aId );
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   197
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   198
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   199
    * Get engine.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   200
    * @return Engine.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   201
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   202
    CMenuEng& Engine();
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   203
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   204
private:    // from CGECOObjectBase
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   205
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   206
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   207
    * Get type identifier.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   208
    * @return Type identifier.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   209
    */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   210
    const TDesC& TypeIdentifier();
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   211
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   212
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   213
     * Updates flags with hidden flag from central repository if nececerry.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   214
     * @param aFlags flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   215
     */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   216
    void UpdateCrHiddenFlagL( TUint32& aFlags ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   217
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   218
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   219
     * Parses descriptor containing folders hidden in central repository.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   220
     * @param aHiddenFolders descriptor containing folders hidden in central repository.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   221
     * @param aHiddenFoldersArray array to fill with names of folders hidden in central repository.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   222
     */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   223
    void ParseHiddenFoldersL(
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   224
                const TDesC& aHiddenFolders,
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   225
                RArray<TPtrC>& aHiddenFoldersArray ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   226
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   227
    /**
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   228
     * Checks wether folder name is in Central Repository.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   229
     * @param aFolderName descriptor containing name of a folder.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   230
     * @return ETrue if folder is in array, EFalse otherwise.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   231
     */
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   232
    TBool IsInCrL( const TDesC& aFolderName ) const;
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   233
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   234
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   235
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   236
private:    // data
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   237
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   238
    TInt iId; ///< ID.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   239
    CMenuEng& iEng; ///< Engine. DO NOT USE! Only needed to check ID-generator.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   240
    RBuf iType; /// Type. Own.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   241
    RMenuEngObjectAttrArray iAttributes; ///< Attributes. Own.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   242
    TUint32 iFlags; ///< Flags.
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   243
    TAppType iAppType;	///< app type
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   244
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   245
    };
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   246
a5a39a295112 Revert incorrect RCL_3 drop:
Pat Downey <patd@symbian.org>
parents:
diff changeset
   247
#endif // __MENUENGOBJECT_H__