dependencies/javaregistryentry.h
author MattD <mattd@symbian.org>
Thu, 01 Apr 2010 14:50:19 +0100
changeset 48 0d4ac38889fc
parent 31 a3e98f9c292b
permissions -rw-r--r--
Merged in kashif's, fdim's and my removal of abld.bat and .cproject files onto the fixed up version of Christian's head.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     1
/*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     2
* Copyright (c) 2005-2007 Nokia Corporation and/or its subsidiary(-ies).
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     3
* All rights reserved.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     4
* This component and the accompanying materials are made available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     5
* under the terms of "Eclipse Public License v1.0"
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     6
* which accompanies this distribution, and is available
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     7
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     8
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
     9
* Initial Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    10
* Nokia Corporation - initial contribution.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    11
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    12
* Contributors:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    13
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    14
* Description: Java Registy API header file
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    15
*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    16
*/
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    17
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    18
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    19
#ifndef JAVAREGISTRYENTRY_H
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    20
#define JAVAREGISTRYENTRY_H
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    21
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    22
#include <e32base.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    23
#include <e32cmn.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    24
#include <f32file.h>
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    25
#include "javaregistryentrytype.h"
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    26
#include "javaattribute.h"
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    27
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    28
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    29
namespace Java
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    30
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    31
namespace Manager
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    32
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    33
namespace Registry
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    34
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    35
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    36
// FORWARD DECLARATION
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    37
class CWriteableJavaRegistryEntry;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    38
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    39
}// namespace Registry
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    40
}// namespace Manager
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    41
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    42
/**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    43
 * This class provides the Domain API for entries in JavaRegistry.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    44
 * This class is intended for further derivation.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    45
 * It supports only those attributes which exist in all types of
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    46
 * entries.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    47
 *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    48
 * @lib javaregistryclient.lib
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    49
 * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    50
 */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    51
class CJavaRegistryEntry : public CBase
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    52
{
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    53
public:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    54
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    55
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    56
     * Gets the Uid of this registry entry.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    57
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    58
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    59
     * @return A TUid object.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    60
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    61
    IMPORT_C TUid Uid() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    62
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    63
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    64
     * Gets the type of this registry entry.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    65
     * Enumeration TJavaRegistryEntryType defines the currently possible
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    66
     * options. Mandatory property.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    67
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    68
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    69
     * @return Type of this registry entry.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    70
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    71
    IMPORT_C TJavaRegistryEntryType Type() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    72
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    73
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    74
     * Gets the drive letter where the content of the installation package
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    75
     * has been installed.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    76
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    77
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    78
     * @return Drive letter where the content of the installation package
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    79
     *         has been installed.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    80
     *         Default value if not set: EDriveC.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    81
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    82
    IMPORT_C TDriveNumber Drive() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    83
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    84
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    85
     * Gets the name of the entity (midlet, suite, etc.) this entry
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    86
     * represents.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    87
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    88
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    89
     * @return Name of the entity this entry represents.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    90
     *         Default value if not set: KNullDesC.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    91
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    92
    IMPORT_C const TDesC& Name() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    93
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    94
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    95
     * Returns the number of certificate chains belonging to the entity
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    96
     * this entry represents.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    97
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    98
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
    99
     * @return Number of certificate chains.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   100
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   101
    IMPORT_C TInt NumberOfCertificateChains() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   102
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   103
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   104
     * Returns the n-th certificate chain of the entity this entry
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   105
     * represents consisting of X.509 version 3 certificates
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   106
     * in their DER encoded format concatenated together
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   107
     * without any separators.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   108
     * All certificate chains are returned indifferent if they could be
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   109
     * validated or not.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   110
     * This format is directly suitable to be used with
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   111
     * function CX509CertChain::DecodeCertsL().
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   112
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   113
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   114
     * @param aChain Zero-based index of the certificate chain to be
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   115
     *               retrieved.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   116
     * @return N-th certificate chain
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   117
     *         Default value if not set: KNullDesC8.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   118
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   119
    IMPORT_C const TDesC8& CertificateChain(TInt aChain) const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   120
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   121
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   122
     * Returns the content id of the entity this entry represents.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   123
     * The content id can be used to check if a DRM protected entity
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   124
     * has enough right to be launched or not.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   125
     * The method can also be used to check if the entity is DRM
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   126
     * protected or not.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   127
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   128
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   129
     * @return Content id of the entity this entry represent or
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   130
     *          KNullDesC if the entity is not DRM protected.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   131
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   132
    IMPORT_C const TDesC& DrmContentId() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   133
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   134
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   135
     * CJavaRegistryEntry::~CJavaRegistryEntry method
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   136
     * Destructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   137
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   138
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   139
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   140
    IMPORT_C ~CJavaRegistryEntry();
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   141
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   142
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   143
     * CJavaRegistryEntry::Attribute method gets the
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   144
     * additional attribute.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   145
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   146
     * @since S60 v5.0
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   147
     * @param aName The name the searched attribute.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   148
     * @return MJavaAttribute poiter to instance, which contain attribute.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   149
     * If attribute doesn't exist return NULL.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   150
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   151
    IMPORT_C const MJavaAttribute*
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   152
    CJavaRegistryEntry::AttributeL(const TDesC& aName) const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   153
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   154
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   155
     * CJavaRegistryEntry::Attributes method gets the
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   156
     * array of additional attributes.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   157
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   158
     * @since S60 v5.0
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   159
     * @return RPointerArray& with all additional attributes.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   160
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   161
    IMPORT_C const RPointerArray<MJavaAttribute>&
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   162
    CJavaRegistryEntry::AttributesL() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   163
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   164
protected:
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   165
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   166
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   167
     * CJavaRegistryEntry::CJavaRegistryEntry constructor
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   168
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   169
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   170
     * @param aWritableEntry Pointer to a writable entry, to delegate
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   171
     *          getter methods. Pointer ownership taken.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   172
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   173
    CJavaRegistryEntry(Java::Manager::Registry::
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   174
                       CWriteableJavaRegistryEntry* aWritableEntry);
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   175
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   176
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   177
     * CJavaRegistryEntry::WritableEntry method returns the member
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   178
     * of this class;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   179
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   180
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   181
     * @return Returns the member of this class.
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   182
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   183
    Java::Manager::Registry::
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   184
    CWriteableJavaRegistryEntry* WritableEntry() const;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   185
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   186
protected: // Data
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   187
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   188
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   189
    /**
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   190
     * CJavaRegistryEntry::iWritableEntry member
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   191
     * Pointer Owned
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   192
     *
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   193
     * @since S60 v3.2
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   194
     */
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   195
    Java::Manager::Registry::CWriteableJavaRegistryEntry* iWritableEntry;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   196
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   197
private: // Data
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   198
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   199
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   200
    RPointerArray<MJavaAttribute> iAttributes;
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   201
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   202
};
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   203
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   204
} // namespace Java
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   205
a3e98f9c292b added missing files
kashif.sayed
parents:
diff changeset
   206
#endif // JAVAREGISTRYENTRY_H