jrt_plat/java_registry_api/inc/javaattribute.h
branchRCL_3
changeset 8 014f8c42e1d4
parent 1 53c80e845d7c
equal deleted inserted replaced
7:9d598f7f02da 8:014f8c42e1d4
       
     1 /*
       
     2 * Copyright (c) 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: Java Registy API header file
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef JAVAATTRIBUTE_H
       
    20 #define JAVAATTRIBUTE_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include "mjavaattribute.h"
       
    25 
       
    26 /**
       
    27  * This class is used to access Java application attributes.
       
    28  * In case of MIDlets, these attributes are defined in
       
    29  * Java Application Descriptor (JAD) and JAR manifest files.
       
    30  */
       
    31 namespace Java
       
    32 {
       
    33 class CJavaAttribute: public CBase, public MJavaAttribute
       
    34 {
       
    35 public:
       
    36 
       
    37     IMPORT_C virtual ~CJavaAttribute();
       
    38 
       
    39     /**
       
    40      * Construct a new attribute using the given name, value and trusted
       
    41      *
       
    42      * @since S60 v5.0
       
    43      * @param aName is attribute name
       
    44      * @param aValue is attribute value
       
    45      * @param aTrusted is true if attribute can be trusted.
       
    46      * @return a new CJavaAttribute object
       
    47      */
       
    48     IMPORT_C static CJavaAttribute* NewL(const TDesC& aName, const TDesC& aValue, TBool aTrusted);
       
    49     /**
       
    50      * Construct a new attribute using the given name, value and trusted
       
    51      * and leaves the object on the cleanup stack
       
    52      *
       
    53      * @since S60 v5.0
       
    54      * @param aName is attribute name
       
    55      * @param aValue is attribute value
       
    56      * @param aTrusted is true if attribute can be trusted
       
    57      * @return a new CJavaAttribute object
       
    58      */
       
    59     IMPORT_C static CJavaAttribute* NewLC(const TDesC& aName, const TDesC& aValue, TBool aTrusted);
       
    60 
       
    61     /**
       
    62      * from MJavaAttribute
       
    63      */
       
    64 public:
       
    65     virtual const TDesC& Name() const;
       
    66     virtual const TDesC& Value() const;
       
    67     virtual TBool Trusted() const;
       
    68 
       
    69 
       
    70 private:
       
    71     /**
       
    72      * ConstructL
       
    73      *
       
    74      * @since S60 v5.0
       
    75      * @param aName
       
    76      * @param aValue
       
    77      * @param aTrusted
       
    78      */
       
    79     void ConstructL(const TDesC& aName, const TDesC& aValue, TBool aTrusted);
       
    80 
       
    81 private:
       
    82     /**
       
    83      * Attribute name
       
    84      */
       
    85     HBufC* iName;
       
    86     /**
       
    87      * Attribute value
       
    88      */
       
    89     HBufC* iValue;
       
    90     /**
       
    91      * this value indicate, if attribute is trusted (= signed JAR file +
       
    92      * attribute present in JAR manifest) or not
       
    93      */
       
    94     TBool iTrusted;
       
    95 };
       
    96 } // namespace Java
       
    97 
       
    98 #endif // JAVAATTRIBUTE_H
       
    99 
       
   100 
       
   101 // End of File