java_stubs/javaregistry/clientserver/client/inc/writeablejavaregistryapplicationentry.h
branchRCL_3
changeset 8 014f8c42e1d4
parent 0 3fd91c96c86c
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:  writeablejavaregistryapplicationentry definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef WRITEABLEJAVAREGISTRYAPPLICATIONENTRY_H
       
    20 #define WRITEABLEJAVAREGISTRYAPPLICATIONENTRY_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32cmn.h>
       
    24 #include "writeablejavaregistryentry.h"
       
    25 #include "javaattributes.h"
       
    26 
       
    27 using namespace Java;
       
    28 
       
    29 namespace Java
       
    30 {
       
    31 namespace Manager
       
    32 {
       
    33 namespace Registry
       
    34 {
       
    35 
       
    36 // FORWARD DECLARATION
       
    37 class CWriteableJavaRegistry;
       
    38 class CWriteableJavaRegistryPackageEntry;
       
    39 
       
    40 
       
    41 // CLASS DECLARATION
       
    42 /**
       
    43  * This subclass of CWriteableJavaRegistryEntry supports attributes
       
    44  * for single applications, that can't contain embedded entries.
       
    45  *
       
    46  * @lib javaregistryclient.lib
       
    47  * @since S60 v3.2
       
    48  */
       
    49 class CWriteableJavaRegistryApplicationEntry :
       
    50         public CWriteableJavaRegistryEntry
       
    51 {
       
    52 public:
       
    53 
       
    54     // constructors
       
    55 
       
    56     /**
       
    57      * CWriteableJavaRegistryApplicationEntry::NewL method creates a
       
    58      * CWriteableJavaRegistryApplicationEntry object. This constructor
       
    59      * sets the type-property to EGeneralApplication.
       
    60      * The function may leave with one of the system-wide error codes.
       
    61      *
       
    62      * @since S60 v3.2
       
    63      * @param aUid The Uid of this entry.
       
    64      * @return A pointer to a CWriteableJavaRegistryApplicationEntry
       
    65      *         object. Caller takes over the ownership of the object being
       
    66      *         transferred.
       
    67      */
       
    68     IMPORT_C static CWriteableJavaRegistryApplicationEntry*
       
    69     NewL(const TUid& aUid);
       
    70 
       
    71     /**
       
    72      * CWriteableJavaRegistryApplicationEntry::NewLC method creates a
       
    73      * CWriteableJavaRegistryApplicationEntry object. This constructor
       
    74      * sets the type-property to EGeneralApplication.
       
    75      * The function may leave with one of the system-wide error codes.
       
    76      *
       
    77      * @since S60 v3.2
       
    78      * @param aUid The Uid of this entry.
       
    79      * @return A pointer to a CWriteableJavaRegistryApplicationEntry
       
    80      *         object. Caller takes over the ownership of the object being
       
    81      *         transferred.
       
    82      */
       
    83     IMPORT_C static CWriteableJavaRegistryApplicationEntry*
       
    84     NewLC(const TUid& aUid);
       
    85 
       
    86     // destructor
       
    87     /**
       
    88      * CWriteableJavaRegistryApplicationEntry::~CWriteableJavaRegistryApplicationEntry destructor
       
    89      *
       
    90      * @since S60 v3.2
       
    91      */
       
    92     IMPORT_C ~CWriteableJavaRegistryApplicationEntry();
       
    93 
       
    94     // general methods
       
    95     /**
       
    96      * Tells if this application is startable.
       
    97      *
       
    98      * @since S60 v3.2
       
    99      * @return ETrue if the application is startable, EFalse otherwise.
       
   100      *         Default value if not set: ETrue.
       
   101      */
       
   102     IMPORT_C TBool IsStartable() const;
       
   103 
       
   104 
       
   105     /**
       
   106      * Tells if this application must be shown in Application Shell or
       
   107      * it must rather be hidden.
       
   108      *
       
   109      * @since S60 v3.2
       
   110      * @return ETrue if the application is shown in Application Shell,
       
   111      *         EFalse otherwise.
       
   112      *         Default value if not set: ETrue.
       
   113      */
       
   114     IMPORT_C TBool IsVisible() const;
       
   115 
       
   116 
       
   117     /**
       
   118      * Tells if this application is resident.
       
   119      *
       
   120      * @since S60 v3.2
       
   121      * @return ETrue if the application is resident, EFalse otherwise.
       
   122      *         Default value if not set: EFalse.
       
   123      */
       
   124     IMPORT_C TBool IsResident() const;
       
   125 
       
   126 
       
   127     /**
       
   128      * CWriteableJavaRegistryApplicationEntry::GroupName method gets
       
   129      * the group name of this application. This property tells in what
       
   130      * folder should this application to be put.
       
   131      *
       
   132      * @since S60 v3.2
       
   133      * @return Group name of this application.
       
   134      *         Default value if not set: "Installed".
       
   135      */
       
   136     IMPORT_C const TDesC& GroupName() const;
       
   137 
       
   138 
       
   139     /**
       
   140      * CWriteableJavaRegistryApplicationEntry::InstallPackageUid method
       
   141      * gets the Uid of the install package entry, which is the parent
       
   142      * of this application.
       
   143      *
       
   144      * @since S60 v3.2
       
   145      * @return The Uid of the parent package.
       
   146      *         Default value if not set: TUid( 0 ).
       
   147      */
       
   148     IMPORT_C TUid InstallPackageUid() const;
       
   149 
       
   150 
       
   151     /**
       
   152      * Clients can set startability of an application, i.e. whether
       
   153      * this application is startable or not.
       
   154      * The function may leave with one of the system-wide error codes.
       
   155      *
       
   156      * @since S60 v3.2
       
   157      * @param aStartable ETrue if the application shall be startable,
       
   158      *                   EFalse otherwise.
       
   159      */
       
   160     IMPORT_C void SetStartableL(TBool aStartable);
       
   161 
       
   162 
       
   163     /**
       
   164      * Clients can specify if this application is visible in Application
       
   165      * Shell or not.
       
   166      * The function may leave with one of the system-wide error codes.
       
   167      *
       
   168      * @since S60 v3.2
       
   169      * @param aVisible ETrue if the application shall be shown in
       
   170      *                 Application Shell, EFalse otherwise.
       
   171      */
       
   172     IMPORT_C void SetVisibleL(TBool aVisible);
       
   173 
       
   174 
       
   175     /**
       
   176      * Clients can specify whether this application shall be resident or
       
   177      * not.
       
   178      * The function may leave with one of the system-wide error codes.
       
   179      *
       
   180      * @since S60 v3.2
       
   181      * @param aResident ETrue if the application shall be resident,
       
   182      *                  EFalse otherwise.
       
   183      */
       
   184     IMPORT_C void SetResidentL(TBool aResident);
       
   185 
       
   186 
       
   187     /**
       
   188      * CWriteableJavaRegistryApplicationEntry::SetGroupNameL method sets
       
   189      * the group name of this application. This property tells in what
       
   190      * folder should this application to be put.
       
   191      * The function may leave with one of the system-wide error codes.
       
   192      *
       
   193      * @since S60 v3.2
       
   194      * @param aGroupName Group name of this application.
       
   195      */
       
   196     IMPORT_C void SetGroupNameL(const TDesC& aGroupName);
       
   197 
       
   198 
       
   199     /**
       
   200      * CWriteableJavaRegistryApplicationEntry::SetInstallPackageL method
       
   201      * sets the Uid of the install package entry, which is the parent
       
   202      * of this application.
       
   203      * The function may leave with one of the system-wide error codes.
       
   204      *
       
   205      * @since S60 v3.2
       
   206      * @param aInstallPackage The Uid of the parent package.
       
   207      */
       
   208     IMPORT_C void SetInstallPackageUidL(const TUid& aInstallPackage);
       
   209 
       
   210     /**
       
   211      * CWriteableJavaRegistryApplicationEntry::SetPropertyL method sets
       
   212      * a new, or updtates a stored property if already exists.
       
   213      * The function may leave with one of the system-wide error codes.
       
   214      *
       
   215      * @since S60 v3.2
       
   216      * @param aProperty Property to be setted. Pointer ownership taken.
       
   217      */
       
   218     IMPORT_C virtual void SetPropertyL(CJavaProperty* aProperty);
       
   219 
       
   220 
       
   221     /**
       
   222      * CWriteableJavaRegistryApplicationEntry::PackageEntryL method
       
   223      * gets a reference to the install package entry, which is the parent
       
   224      * of this application.
       
   225      * The function may leave with one of the system-wide error codes.
       
   226      *
       
   227      * @since S60 v3.2
       
   228      * @return A pointer to a CJavaRegistryEntry object. Caller takes
       
   229      *         over the ownership of the object being transferred.
       
   230      */
       
   231     IMPORT_C CWriteableJavaRegistryPackageEntry* PackageEntryL() const;
       
   232 
       
   233     /**
       
   234      * CWriteableJavaRegistryAplicationEntry::AttributeL method gets the
       
   235      * additional attribute.
       
   236      *
       
   237      * @since S60 v5.0
       
   238      * @param aName The name of the searched attribute.
       
   239      * @return MJavaAttribute poiter to instance, which contain attribute.
       
   240      * If attribute doesn't exist return NULL.
       
   241      */
       
   242     IMPORT_C virtual const MJavaAttribute* AttributeL(const TDesC& aName) const;
       
   243 
       
   244     /**
       
   245      * CWriteableJavaRegistryApplicationEntry::AttributesL method gets the
       
   246      * additional attributes array.
       
   247      *
       
   248      * @since S60 v5.0
       
   249      * @return RPointerArray& with all additional attributes.
       
   250      */
       
   251     IMPORT_C virtual const RPointerArray<MJavaAttribute>& AttributesL() const;
       
   252 
       
   253 
       
   254 
       
   255 protected:
       
   256 
       
   257     // constructor
       
   258     /**
       
   259      * CWriteableJavaRegistryApplicationEntry::
       
   260      *             CWriteableJavaRegistryApplicationEntry constructor
       
   261      *
       
   262      * @since S60 v3.2
       
   263      * @param aUid The Uid of this entry.
       
   264      */
       
   265     IMPORT_C CWriteableJavaRegistryApplicationEntry(const TUid& aUid);
       
   266 
       
   267 private: // Data
       
   268 
       
   269     CWriteableJavaRegistryPackageEntry* iWriteablePackage;
       
   270 
       
   271     RPointerArray<MJavaAttribute> iAttributes;
       
   272 
       
   273 };
       
   274 
       
   275 }// namespace Registry
       
   276 }// namespace Manager
       
   277 }// namespace Java
       
   278 
       
   279 #endif // WRITEABLEJAVAREGISTRYAPPLICATIONENTRY_H
       
   280 
       
   281 // End of File