java_stubs/javaregistry/clientserver/client/inc/writeablejavaregistrypackageentry.h
branchRCL_3
changeset 8 014f8c42e1d4
parent 0 3fd91c96c86c
child 72 1f0034e370aa
equal deleted inserted replaced
7:9d598f7f02da 8:014f8c42e1d4
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  writeablejavaregistrypackageentry definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WRITEABLEJAVAREGISTRYPACKAGEENTRY_H
       
    20 #define WRITEABLEJAVAREGISTRYPACKAGEENTRY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include "writeablejavaregistryentry.h"
       
    24 #include "javaattributes.h"
       
    25 
       
    26 using namespace Java;
       
    27 
       
    28 // FORWARD DECLARATION
       
    29 class TAppVersion;
       
    30 
       
    31 namespace Java
       
    32 {
       
    33 namespace Manager
       
    34 {
       
    35 namespace Registry
       
    36 {
       
    37 
       
    38 // CLASS DECLARATION
       
    39 /**
       
    40  * This subclass of CWriteableJavaRegistryEntry supports attributes
       
    41  * for packages, that can contain embedded entries.
       
    42  *
       
    43  * @lib javaregistryclient.lib
       
    44  * @since S60 v3.2
       
    45  */
       
    46 class CWriteableJavaRegistryPackageEntry :
       
    47         public CWriteableJavaRegistryEntry
       
    48 {
       
    49 public:
       
    50 
       
    51     // constructors
       
    52 
       
    53     /**
       
    54      * CWriteableJavaRegistryPackageEntry::NewL method creates a
       
    55      * CWriteableJavaRegistryPackageEntry object. This constructor
       
    56      * sets the type-property to EGeneralPackage.
       
    57      * The function may leave with one of the system-wide error codes.
       
    58      *
       
    59      * @since S60 v3.2
       
    60      * @param aUid The Uid of this entry.
       
    61      * @return A pointer to a CWriteableJavaRegistryPackageEntry
       
    62      *         object. Caller takes over the ownership of the object
       
    63      *         being transferred.
       
    64      */
       
    65     IMPORT_C static CWriteableJavaRegistryPackageEntry*
       
    66     NewL(const TUid& aUid);
       
    67 
       
    68     /**
       
    69      * CWriteableJavaRegistryPackageEntry::NewLC method creates a
       
    70      * CWriteableJavaRegistryPackageEntry object. This constructor
       
    71      * sets the type-property to EGeneralPackage.
       
    72      * The function may leave with one of the system-wide error codes.
       
    73      *
       
    74      * @since S60 v3.2
       
    75      * @param aUid The Uid of this entry.
       
    76      * @return A pointer to a CWriteableJavaRegistryPackageEntry
       
    77      *         object. Caller takes over the ownership of the object being
       
    78      *         transferred.
       
    79      */
       
    80     IMPORT_C static CWriteableJavaRegistryPackageEntry*
       
    81     NewLC(const TUid& aUid);
       
    82 
       
    83     // destructor
       
    84 
       
    85     /**
       
    86      * CWriteableJavaRegistryPackageEntry::
       
    87      *                              ~CWriteableJavaRegistryPackageEntry
       
    88      * Destructor
       
    89      *
       
    90      * @since S60 v3.2
       
    91      */
       
    92     IMPORT_C ~CWriteableJavaRegistryPackageEntry();
       
    93 
       
    94     // general methods
       
    95     /**
       
    96      * CWriteableJavaRegistryPackageEntry::VersionL method gets the
       
    97      * version of this install package suite.
       
    98      *
       
    99      * @since S60 v3.2
       
   100      * @return A TAppVersion object that represents the version
       
   101      *         of this install package suite.
       
   102      *         Default value if not set: TAppVersion( 0, 0, 0 ).
       
   103      */
       
   104     IMPORT_C TAppVersion Version() const;
       
   105 
       
   106 
       
   107     /**
       
   108      * CWriteableJavaRegistryPackageEntry::Vendor method gets the
       
   109      * vendor name of this install package suite.
       
   110      *
       
   111      * @since S60 v3.2
       
   112      * @return Vendor name of the installation package.
       
   113      *         Default value if not set: KNullDesC.
       
   114      */
       
   115     IMPORT_C const TDesC& Vendor() const;
       
   116 
       
   117 
       
   118     /**
       
   119      * Tells if this package is uninstallable.
       
   120      *
       
   121      * @since S60 v3.2
       
   122      * @return ETrue if the package is uninstallable, EFalse otherwise.
       
   123      *         Default value if not set: ETrue.
       
   124      */
       
   125     IMPORT_C TBool IsUninstallable() const;
       
   126 
       
   127 
       
   128     /**
       
   129      * CWriteableJavaRegistryPackageEntry::GetEmbeddedEntries method
       
   130      * returns an array of Uids associated with this install package.
       
   131      * E.g. if this entry represents a MIDlet suite this method returns
       
   132      * an array of MIDlet Uids.
       
   133      *
       
   134      * @since S60 v3.2
       
   135      * @param aUids [out] Returns Uids of the embedded entries in this
       
   136      *                    install package.
       
   137      */
       
   138     IMPORT_C void GetEmbeddedEntries(RArray<TUid>& aUids) const;
       
   139 
       
   140 
       
   141     /**
       
   142      * CWriteableJavaRegistryPackageEntry::DownloadPlugin method gets
       
   143      * the downloadplugin of this package.
       
   144      *
       
   145      * @since S60 v3.2
       
   146      * @return Descriptor identifying the downloadplugin of this package.
       
   147      *         Default value if not set: KNullDesC8.
       
   148      */
       
   149     IMPORT_C const TDesC8& DownloadPlugin() const;
       
   150 
       
   151 
       
   152     /**
       
   153      * CWriteableJavaRegistryPackageEntry::InstallPlugin method gets
       
   154      * the installplugin of this package.
       
   155      *
       
   156      * @since S60 v3.2
       
   157      * @return Descriptor identifying the installplugin of this package.
       
   158      *         Default value if not set: KNullDesC8.
       
   159      */
       
   160     IMPORT_C const TDesC8& InstallPlugin() const;
       
   161 
       
   162     /**
       
   163      * CWriteableJavaRegistryPackageEntry::Size method gets the size of
       
   164      * this package.
       
   165      *
       
   166      * @since S60 v3.2
       
   167      * @return The size of this package.
       
   168      *         Default value if not set: 0.
       
   169      */
       
   170     IMPORT_C TInt Size() const;
       
   171 
       
   172     /**
       
   173      * CWriteableJavaRegistryPackageEntry::SetVersionL method sets the
       
   174      * version of this install package suite.
       
   175      * The function may leave with one of the system-wide error codes.
       
   176      *
       
   177      * @since S60 v3.2
       
   178      * @param aVersion the version of this install package suite.
       
   179      */
       
   180     IMPORT_C void SetVersionL(const TAppVersion& aVersion);
       
   181 
       
   182 
       
   183     /**
       
   184      * CWriteableJavaRegistryPackageEntry::SetVendorL method sets the
       
   185      * vendor name of this install package suite.
       
   186      * The function may leave with one of the system-wide error codes.
       
   187      *
       
   188      * @since S60 v3.2
       
   189      * @param aVendor Vendor name of the installation package.
       
   190      */
       
   191     IMPORT_C void SetVendorL(const TDesC& aVendor);
       
   192 
       
   193 
       
   194     /**
       
   195      * Tells if this package is uninstallable.
       
   196      * The function may leave with one of the system-wide error codes.
       
   197      *
       
   198      * @since S60 v3.2
       
   199      * @param aUninstallable ETrue if the package is uninstallable,
       
   200      *                       EFalse otherwise.
       
   201      */
       
   202     IMPORT_C void SetUninstallableL(TBool aUninstallable);
       
   203 
       
   204 
       
   205     /**
       
   206      * CWriteableJavaRegistryPackageEntry::SetDownloadPluginL method sets
       
   207      * the downloadplugin of this package.
       
   208      * The function may leave with one of the system-wide error codes.
       
   209      *
       
   210      * @since S60 v3.2
       
   211      * @param aDownloadPlugin Descriptor identifying the downloadplugin of
       
   212      *          this package.
       
   213      */
       
   214     IMPORT_C void SetDownloadPluginL(const TDesC8& aDownloadPlugin);
       
   215 
       
   216 
       
   217     /**
       
   218      * CWriteableJavaRegistryPackageEntry::SetInstallPluginL method sets
       
   219      * the installplugin of this package.
       
   220      * The function may leave with one of the system-wide error codes.
       
   221      *
       
   222      * @since S60 v3.2
       
   223      * @param aInstallPlugin Descriptor identifying the installplugin of
       
   224      *           this package.
       
   225      */
       
   226     IMPORT_C void SetInstallPluginL(const TDesC8& aInstallPlugin);
       
   227 
       
   228 
       
   229     /**
       
   230      * CWriteableJavaRegistryPackageEntry::SetSizeL method sets the size of
       
   231      * this package.
       
   232      * The function may leave with one of the system-wide error codes.
       
   233      *
       
   234      * @since S60 v3.2
       
   235      * @param aSize The size of this package.
       
   236      */
       
   237     IMPORT_C void SetSizeL(TInt aSize);
       
   238 
       
   239 
       
   240     /**
       
   241      * CWriteableJavaRegistryPackageEntry::AddEmbeddedEntryL method adds
       
   242      * the given Uid to the embedded entries.
       
   243      * The function may leave with one of the system-wide error codes.
       
   244      *
       
   245      * @since S60 v3.2
       
   246      * @param aUid Adds the given Uid to the embedded entries.
       
   247      */
       
   248     IMPORT_C void AddEmbeddedEntryL(const TUid& aUid);
       
   249 
       
   250 
       
   251     /**
       
   252      * CWriteableJavaRegistryPackageEntry::NumberOfEmbeddedEntries method
       
   253      * Gets the number of embedded entries in this install package.
       
   254      *
       
   255      * @since S60 v3.2
       
   256      * @return The number of embedded entries.
       
   257      */
       
   258     IMPORT_C TInt NumberOfEmbeddedEntries() const;
       
   259 
       
   260 
       
   261     /**
       
   262      * CWriteableJavaRegistryPackageEntry::RemoveEmbeddedEntryL method
       
   263      * removes the embedded entry specified by the given Uid.
       
   264      * The function may leave with one of the system-wide error codes.
       
   265      *
       
   266      * @since S60 v3.2
       
   267      * @param aUid The Uid of the embedded entry to be removed.
       
   268      */
       
   269     IMPORT_C void RemoveEmbeddedEntryL(const TUid& aUid);
       
   270 
       
   271 
       
   272     /**
       
   273      * CWriteableJavaRegistryPackageEntry::EmbeddedEntryByUidL method
       
   274      * Returns the corresponding embedded entry for the given Uid.
       
   275      * The returned entry can be casted to the appropriate subclass
       
   276      * according to the type property. If type is in the package range
       
   277      * ( EGeneralPackage <= entryType < EGeneralApplication ), it can
       
   278      * be casted to CWriteableJavaRegistryPackageEntry, and if type is
       
   279      * in the application range ( EGeneralApplication <= entryType ),
       
   280      * it can be casted to CWriteableJavaRegistryApplicationEntry.
       
   281      * The function may leave with one of the system-wide error codes.
       
   282      *
       
   283      * @since S60 v3.2
       
   284      * @param aEntryUid The Uid of the embedded entry to be retrieved.
       
   285      * @return The returned embedded entry or null if entry is not found.
       
   286      *         Caller takes over the ownership of the object being
       
   287      *         transferred.
       
   288      */
       
   289     IMPORT_C CWriteableJavaRegistryEntry* EmbeddedEntryByUidL(
       
   290         const TUid& aEntryUid) const;
       
   291 
       
   292 
       
   293     /**
       
   294      * CWriteableJavaRegistryPackageEntry::EmbeddedEntryByNumberL method
       
   295      * Returns the corresponding embedded entry for the given application
       
   296      * number.
       
   297      * The returned entry can be casted to the appropriate subclass
       
   298      * according to the type property. If type is in the package range
       
   299      * ( EGeneralPackage <= entryType < EGeneralApplication ), it can
       
   300      * be casted to CWriteableJavaRegistryPackageEntry, and if type is
       
   301      * in the application range ( EGeneralApplication <= entryType ),
       
   302      * it can be casted to CWriteableJavaRegistryApplicationEntry.
       
   303      * The function may leave with one of the system-wide error codes.
       
   304      *
       
   305      * @since S60 v3.2
       
   306      * @param aEntryNum Number of the embedded entry to be retrieved
       
   307      *                  ( NOTE: Starting from 0 )
       
   308      * @return The returned embedded entry or null if entry is not found.
       
   309      *         Caller takes over the ownership of the object being
       
   310      *         transferred.
       
   311      */
       
   312     IMPORT_C CWriteableJavaRegistryEntry* EmbeddedEntryByNumberL(
       
   313         TInt aEntryNum) const;
       
   314     /**
       
   315      * CWriteableJavaRegistryPackageEntry::SetPropertyL method sets a new,
       
   316      * or updtates a stored property if already exists.
       
   317      * This is a temporary overload of
       
   318      * CWriteableJavaRegistryEntry::SetPropertyL
       
   319      * The function may leave with one of the system-wide error codes.
       
   320      *
       
   321      * @since S60 v3.2
       
   322      * @param aProperty Property to be setted. Pointer ownership taken.
       
   323      */
       
   324     IMPORT_C virtual void SetPropertyL(CJavaProperty* aProperty);
       
   325 
       
   326     /**
       
   327      * CWriteableJavaRegistryPackageEntry::SetAttribute method sets a new,
       
   328      * or updtates a stored attribute if already exists.
       
   329      * The function may leave with one of the system-wide error codes.
       
   330      *
       
   331      * @since S60 v5.0
       
   332      * @param aProperty Property to be setted. Pointer ownership taken.
       
   333      */
       
   334     IMPORT_C void SetAttributeL(const TDesC& aName, const TDesC& aValue, TBool aTrusted);
       
   335 
       
   336     /**
       
   337      * CWriteableJavaRegistryPackageEntry::Attribute method gets the
       
   338      * additional attribute.
       
   339      *
       
   340      * @since S60 v5.0
       
   341      * @param aName The name the searched attribute.
       
   342      * @return MJavaAttribute poiter to instance, which contain attribute.
       
   343      * If attribute doesn't exist return NULL.
       
   344      */
       
   345     IMPORT_C virtual const MJavaAttribute* AttributeL(const TDesC& aName) const;
       
   346 
       
   347     /**
       
   348      * CWriteableJavaRegistryPackageEntry::Attributes method gets the
       
   349      * additional attributes array.
       
   350      *
       
   351      * @since S60 v5.0
       
   352      * @return RPointerArray& with all additional attributes.
       
   353      */
       
   354     IMPORT_C virtual const RPointerArray<MJavaAttribute>& AttributesL() const;
       
   355 
       
   356     /**
       
   357      * CWriteableJavaRegistryPackageEntry::SerializeAttributes method gets the
       
   358      * streamed attributes and store stream to CJavaProperty as
       
   359      * special ESerializedAttribute
       
   360      * If don't exists any attribute method do nothing
       
   361      *
       
   362      * @since S60 v5.0
       
   363      *
       
   364      */
       
   365     IMPORT_C virtual void SerializeAttributesL();
       
   366 
       
   367 
       
   368 
       
   369 protected:
       
   370 
       
   371     // constructor
       
   372     /**
       
   373      * CWriteableJavaRegistryPackageEntry::
       
   374      *                        CWriteableJavaRegistryPackageEntry constructor
       
   375      *
       
   376      * @since S60 v3.2
       
   377      * @param aUid The Uid of this entry.
       
   378      */
       
   379     IMPORT_C CWriteableJavaRegistryPackageEntry(const TUid& aUid);
       
   380 
       
   381     /**
       
   382     * CWriteableJavaRegistryEntry::iAttributes member stores the
       
   383     * additional attributes. The addtional attributes is also stored in the
       
   384     * iProperties as BLOB, and are synchronised at every modification.
       
   385     */
       
   386     CJavaAttributes* iAttributes;
       
   387 
       
   388 private: // Data
       
   389 
       
   390     /**
       
   391      * CWriteableJavaRegistryPackageEntry::iDownloadPlugin member
       
   392      * stores the 8bit descriptor represented downloadplugin
       
   393      * property. This property is stored also in the
       
   394      * iProperties, and are synchronised at every modification.
       
   395      *
       
   396      * @since S60 v3.2
       
   397      */
       
   398     HBufC8* iDownloadPlugin;
       
   399 
       
   400     /**
       
   401      * CWriteableJavaRegistryPackageEntry::iInstallPlugin member
       
   402      * stores the 8bit descriptor represented installplugin
       
   403      * property. This property is stored also in the
       
   404      * iProperties, and are synchronised at every modification.
       
   405      *
       
   406      * @since S60 v3.2
       
   407      */
       
   408     HBufC8* iInstallPlugin;
       
   409 
       
   410     RPointerArray<MJavaAttribute> iAttrib;
       
   411 
       
   412 
       
   413 };
       
   414 
       
   415 }// namespace Registry
       
   416 }// namespace Manager
       
   417 }// namespace Java
       
   418 
       
   419 #endif // WRITEABLEJAVAREGISTRYPACKAGEENTRY_H
       
   420 
       
   421 // End of File