javaextensions/satsa/apdu/src.s60/cstspkcs15objects.h
changeset 21 2a9601315dfc
equal deleted inserted replaced
18:e8e63152f320 21:2a9601315dfc
       
     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 CSTSPKCS15OBJECTS_H
       
    20 #define CSTSPKCS15OBJECTS_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "mstsasn1module.h"
       
    25 
       
    26 namespace java
       
    27 {
       
    28 namespace satsa
       
    29 {
       
    30 
       
    31 // FORWARD DECLARATIONS
       
    32 class CSTSPath;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36  *  DataType type module
       
    37  *
       
    38  *  ASN.1 Definition:
       
    39  *  PKCS15Objects ::= CHOICE {
       
    40  *      privateKeys         [0] PrivateKeys,
       
    41  *      publicKeys          [1] PublicKeys,
       
    42  *      trustedPublicKeys   [2] PublicKeys,
       
    43  *      secretKeys          [3] SecretKeys,
       
    44  *      certificates        [4] Certificates,
       
    45  *      trustedCertificates [5] Certificates,
       
    46  *      usefulCertificates  [6] Certificates,
       
    47  *      dataObjects         [7] DataObjects,
       
    48  *      authObjects         [8] AuthObjects,
       
    49  *      ... -- For future extensions
       
    50  *  }
       
    51  *  PrivateKeys ::=     PathOrObjects {PrivateKeyType}
       
    52  *  SecretKeys  ::=     PathOrObjects {SecretKeyType}
       
    53  *  PublicKeys  ::=     PathOrObjects {PublicKeyType}
       
    54  *  Certificates ::=    PathOrObjects {CertificateType}
       
    55  *  DataObjects ::=     PathOrObjects {DataType}
       
    56  *  AuthObjects ::=     PathOrObjects {AuthenticationType}
       
    57  *
       
    58  *  PathOrObjects {ObjectType} ::= CHOICE {
       
    59  *      path        Path,
       
    60  *      objects     [0] SEQUENCE OF ObjectType,
       
    61  *      ...,
       
    62  *  indirect-protected [1] ReferencedValue {EnvelopedData {SEQUENCE OF      ObjectType}},
       
    63  *  direct-protected [2] EnvelopedData {SEQUENCE OF ObjectType}
       
    64  *  }
       
    65  *
       
    66  *  @since 3.0
       
    67  */
       
    68 NONSHARABLE_CLASS(CSTSPKCS15Objects): public CBase, MSTSASN1Module
       
    69 {
       
    70 public: // data types
       
    71     enum TType
       
    72     {
       
    73         EDataObjectsPath = 7,
       
    74         EAuthObjectsPath = 8,
       
    75         EOther = 9,
       
    76         ENotInitialized = 10
       
    77     };
       
    78 public: // Constructors and destructor
       
    79     /**
       
    80      * Two-phased constructor.
       
    81      */
       
    82     static CSTSPKCS15Objects* NewLC();
       
    83 
       
    84     /**
       
    85      * Destructor.
       
    86      */
       
    87     virtual ~CSTSPKCS15Objects();
       
    88 
       
    89 public: // New functions
       
    90 
       
    91     /**
       
    92      * Getter for data object type
       
    93      * @since 3.0
       
    94      * @return data object type
       
    95      */
       
    96     CSTSPKCS15Objects::TType Type() const;
       
    97 
       
    98     /**
       
    99      * Getter for Path
       
   100      * @since 3.0
       
   101      * @return Path
       
   102      */
       
   103     const CSTSPath& Path() const;
       
   104 
       
   105 public: // Functions from base classes
       
   106 
       
   107     /**
       
   108      * From MSTSASN1Module
       
   109      * @since 3.0
       
   110      * @param aRawData raw-data to be parsed in this instance
       
   111      */
       
   112     void DecodeL(const TDesC8& aRawData);
       
   113 
       
   114 protected: // New functions
       
   115 
       
   116     /**
       
   117      * Protected construction to allow derivation
       
   118      */
       
   119     void ConstructL();
       
   120 
       
   121     /**
       
   122      * C++ default constructor.
       
   123      */
       
   124     CSTSPKCS15Objects();
       
   125 
       
   126 protected: // Data
       
   127     //type of the choice
       
   128     TType iType;
       
   129     // Path, owned
       
   130     CSTSPath* iPath;
       
   131 };
       
   132 
       
   133 } //namespace satsa
       
   134 } //namespace java
       
   135 #endif // CSTSPKCS15OBJECTS_H
       
   136 // End of File