javaextensions/satsa/apdu/src.s60/cstsmidletinfo.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     1 /*
       
     2 * Copyright (c) 2008 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  *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSTSMIDLETINFO_H
       
    20 #define CSTSMIDLETINFO_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include "cstsasn1sequence.h"
       
    24 
       
    25 namespace java
       
    26 {
       
    27 namespace satsa
       
    28 {
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  *  Capsulated current midlet related info for native side needs.
       
    33  *
       
    34  *  @since 3.0
       
    35  */
       
    36 NONSHARABLE_CLASS(CSTSMidletInfo): public CBase
       
    37 {
       
    38 public: // Constructors and destructor
       
    39     /**
       
    40      * Two-phased constructor.
       
    41      */
       
    42 
       
    43     static CSTSMidletInfo* NewLC(const TDesC& aName,
       
    44     const TDesC& aVendor,
       
    45     const TDesC& aVersion,
       
    46     const TDesC& aDomain,
       
    47     const TDesC& aRoot,
       
    48     const TDesC& aEnd);
       
    49 
       
    50     static CSTSMidletInfo* NewL(const TDesC& aName,
       
    51                                 const TDesC& aVendor,
       
    52                                 const TDesC& aVersion,
       
    53                                 const TDesC& aDomain,
       
    54                                 const TDesC& aRoot,
       
    55                                 const TDesC& aEnd);
       
    56 
       
    57     /**
       
    58      * Destructor.
       
    59      */
       
    60     virtual ~CSTSMidletInfo();
       
    61 
       
    62 public: // New functions
       
    63 
       
    64     /**
       
    65      * Getter for midlet name
       
    66      * @since 3.0
       
    67      * @return Name in TDesC reference
       
    68      */
       
    69     const TDesC& Name() const;
       
    70 
       
    71     /**
       
    72      * Getter for midlet vendor
       
    73      * @since 3.0
       
    74      * @return Vendor in TDesC reference
       
    75      */
       
    76     const TDesC& Vendor() const;
       
    77 
       
    78     /**
       
    79      * Getter for midlet version
       
    80      * @since 3.0
       
    81      * @return Version in TDesC reference
       
    82      */
       
    83     const TDesC& Version() const;
       
    84 
       
    85     /**
       
    86      * Getter for midlet domain
       
    87      * @since 3.0
       
    88      * @return Domain in TDesC reference
       
    89      */
       
    90     const TDesC& Domain() const;
       
    91     /**
       
    92      * Getter for midlet domain OID value
       
    93      * @since 3.0
       
    94      * @return Domain OID in TDesC reference
       
    95      */
       
    96     const TDesC& DomainOID();
       
    97 
       
    98     /**
       
    99      * Getter for midlet root ID value
       
   100      * @since 3.0
       
   101      * @return Root ID in TDesC reference
       
   102      */
       
   103     //const RPointerArray< HBufC8 >& RootID() const;
       
   104     const TDesC& RootID() const;
       
   105     /**
       
   106      * Getter for midlet end entity ID value
       
   107      * @since 3.0
       
   108      * @return End entity ID in TDesC reference
       
   109      */
       
   110     //const RPointerArray< HBufC8 >& EndEntityID() const;
       
   111     const TDesC& EndEntityID() const;
       
   112     /**
       
   113      * Sets Domain OID value
       
   114      * @since 3.0
       
   115      * @param aDomainOID Domain OID value
       
   116      */
       
   117     void SetDomainOIDL(const TDesC& aDomainOID);
       
   118 
       
   119     /**
       
   120      * Appends midlet end entity ID value to member array.
       
   121      * Ownership transferred.
       
   122      * @since 3.0
       
   123      * @param aEndEntityId Pointer to End entity Id value
       
   124      */
       
   125     void AppendEndEntityIdL(const TDesC8& aEndEntityId);
       
   126 
       
   127     /**
       
   128      * Appends midlet root ID value to member array.
       
   129      * Ownership transferred.
       
   130      * @since 3.0
       
   131      * @param aRootId Pointer to Root Id value
       
   132      */
       
   133     void AppendRootIdL(const TDesC8& aRootId);
       
   134 
       
   135 protected: // New functions
       
   136 
       
   137     /**
       
   138      * Protected construction to allow derivation
       
   139      */
       
   140     void ConstructL(const TDesC& aName,
       
   141                     const TDesC& aVendor,
       
   142                     const TDesC& aVersion,
       
   143                     const TDesC& aDomain,
       
   144                     const TDesC& aRoot,
       
   145                     const TDesC& aEnd);
       
   146 
       
   147     /**
       
   148      * C++ default constructor.
       
   149      */
       
   150     CSTSMidletInfo();
       
   151 
       
   152 protected: // Data
       
   153 
       
   154     // Midlet name, owned
       
   155     HBufC* iName;
       
   156     // Midlet vendor, owned
       
   157     HBufC* iVendor;
       
   158     // Midlet version, owned
       
   159     HBufC* iVersion;
       
   160     // Midlet domain, owned
       
   161     HBufC* iDomain;
       
   162     // Midlet root cert hash, owned
       
   163     HBufC* iRootCert;
       
   164     // Midlet end-entity cert hash, owned
       
   165     HBufC* iSignCert;
       
   166 
       
   167     // Midlet domain OID value
       
   168     HBufC* iDomainOID; //owned
       
   169     // Array of Midlet root ID values
       
   170     RPointerArray< HBufC8> iRootIds;
       
   171     // Array of Midlet end entity ID values
       
   172     RPointerArray< HBufC8> iEndEntityIds;
       
   173 
       
   174 };
       
   175 
       
   176 } // namespace satsa
       
   177 } // namespace java
       
   178 #endif // CSTSMIDLETINFO_H
       
   179 // End of File