java_stubs/javaregistry/clientserver/client/inc/javaregconverter.h
branchRCL_3
changeset 8 014f8c42e1d4
parent 0 3fd91c96c86c
child 14 64bf9e47f05e
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:  javaregconverter definition
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef JAVAREGCONVERTER_H
       
    20 #define JAVAREGCONVERTER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>
       
    24 
       
    25 // FORWARD DECLARATION
       
    26 class TAppVersion;
       
    27 
       
    28 namespace Java
       
    29 {
       
    30 namespace Manager
       
    31 {
       
    32 namespace Registry
       
    33 {
       
    34 // FORWARD DECLARATION
       
    35 class CJavaProperty;
       
    36 
       
    37 // CLASS DECLARATION
       
    38 /**
       
    39  * This class has only static methods, that help to store some types,
       
    40  * and structures in descriptors, and to retrieve them. It is mainly used
       
    41  * by the javaregistry internal API.
       
    42  *
       
    43  * @lib javaregistryclient.lib
       
    44  * @since S60 v3.2
       
    45  */
       
    46 class JavaRegConverter
       
    47 {
       
    48 public:
       
    49 
       
    50     /**
       
    51      * JavaRegConverter::GetTAppVersion method converts the descriptor
       
    52      * parameter to a TAppVersion.
       
    53      *
       
    54      * @since S60 v3.2
       
    55      * @param aValue A descriptor storing a TAppVersion.
       
    56      * @param aDefault The value to be returned if aValue does'nt contain
       
    57      *                 valid data.
       
    58      * @return A TAppVersion stored in the descriptor parameter.
       
    59      */
       
    60     IMPORT_C static TAppVersion GetTAppVersion(
       
    61         const TDesC& aValue,
       
    62         TAppVersion aDefault);
       
    63 
       
    64     /**
       
    65      * JavaRegConverter::GetTAppVersionL method converts the descriptor
       
    66      * parameter to a TAppVersion.
       
    67      * The function may leave with one of the system-wide error codes.
       
    68      *
       
    69      * @since S60 v3.2
       
    70      * @param aValue A descriptor storing a TAppVersion.
       
    71      * @return A TAppVersion stored in the descriptor parameter.
       
    72      */
       
    73     IMPORT_C static TAppVersion GetTAppVersionL(const TDesC& aValue);
       
    74 
       
    75     /**
       
    76      * JavaRegConverter::StoreTAppVersionL method stores the TAppVersion
       
    77      * parameter into the descriptor paramameter, that is instantiated by
       
    78      * this method.
       
    79      * The function may leave with one of the system-wide error codes.
       
    80      *
       
    81      * @since S60 v3.2
       
    82      * @param aValue The TAppVersion value to be stored.
       
    83      * @param aDes [out] Descriptor parameter, storing, and the returning
       
    84      * the TAppVersion value.
       
    85      */
       
    86     IMPORT_C static void StoreTAppVersionL(
       
    87         const TAppVersion& aValue,
       
    88         HBufC*& aDes);
       
    89 
       
    90 
       
    91     /**
       
    92      * JavaRegConverter::GetTInt method converts the descriptor
       
    93      * parameter to a TInt32.
       
    94      *
       
    95      * @since S60 v3.2
       
    96      * @param aValue A descriptor storing a TInt32.
       
    97      * @param aDefault The value to be returned if aValue does'nt contain
       
    98      *                 valid data.
       
    99      * @return A TInt32 stored in the descriptor parameter.
       
   100      */
       
   101     IMPORT_C static TInt32 GetTInt(const TDesC& aValue, TInt32 aDefault);
       
   102 
       
   103     /**
       
   104      * JavaRegConverter::GetTIntL method converts the descriptor
       
   105      * parameter to a TInt32.
       
   106      * The function may leave with one of the system-wide error codes.
       
   107      *
       
   108      * @since S60 v3.2
       
   109      * @param aValue A descriptor storing a TInt32.
       
   110      * @return A TInt32 stored in the descriptor parameter.
       
   111      */
       
   112     IMPORT_C static TInt32 GetTIntL(const TDesC& aValue);
       
   113 
       
   114 
       
   115     /**
       
   116      * JavaRegConverter::StoreTIntL method stores the TInt32
       
   117      * parameter into the descriptor paramameter, that is instantiated by
       
   118      * this method.
       
   119      * The function may leave with one of the system-wide error codes.
       
   120      *
       
   121      * @since S60 v3.2
       
   122      * @param aValue The TInt32 value to be stored.
       
   123      * @param aDes [out] Descriptor parameter, storing, and the returning
       
   124      * the TInt32 value.
       
   125      */
       
   126     IMPORT_C static void StoreTIntL(const TInt32 aValue, HBufC*& aDes);
       
   127 
       
   128     /**
       
   129      * JavaRegConverter::GetTBool method converts the descriptor
       
   130      * parameter to a TBool.
       
   131      *
       
   132      * @since S60 v3.2
       
   133      * @param aValue A descriptor storing a TBool.
       
   134      * @param aDefault The value to be returned if aValue does'nt contain
       
   135      *                 valid data.
       
   136      * @return A TBool stored in the descriptor parameter.
       
   137      */
       
   138     IMPORT_C static TBool GetTBool(const TDesC& aValue, TBool aDefault);
       
   139 
       
   140 
       
   141     /**
       
   142      * JavaRegConverter::GetTBoolL method converts the descriptor
       
   143      * parameter to a TBool.
       
   144      * The function may leave with one of the system-wide error codes.
       
   145      *
       
   146      * @since S60 v3.2
       
   147      * @param aValue A descriptor storing a TBool.
       
   148      * @return A TBool stored in the descriptor parameter.
       
   149      */
       
   150     IMPORT_C static TBool GetTBoolL(const TDesC& aValue);
       
   151 
       
   152 
       
   153     /**
       
   154      * JavaRegConverter::StoreTBoolL method stores the TBool
       
   155      * parameter into the descriptor paramameter, that is instantiated by
       
   156      * this method.
       
   157      * The function may leave with one of the system-wide error codes.
       
   158      *
       
   159      * @since S60 v3.2
       
   160      * @param aValue The TBool value to be stored.
       
   161      * @param aDes [out] Descriptor parameter, storing, and the returning
       
   162      * the TBool value.
       
   163      */
       
   164     IMPORT_C static void StoreTBoolL(const TBool aValue, HBufC*& aDes);
       
   165 
       
   166 
       
   167 
       
   168     /**
       
   169      * JavaRegConverter::GetCertificateChainsL method converts the
       
   170      * descriptor parameter to a RPointerArray<HBufC8> storing
       
   171      * certificate chains.
       
   172      * The function may leave with one of the system-wide error codes.
       
   173      *
       
   174      * @since S60 v3.2
       
   175      * @param aValue A descriptor storing certificate chains.
       
   176      * @param aCertChains [out] The method converts the certificate chains
       
   177      *                          into this RPointerArray<HBufC>.
       
   178      */
       
   179     IMPORT_C static void GetCertificateChainsL(
       
   180         const TDesC& aValue,
       
   181         RPointerArray<HBufC8>& aCertChains);
       
   182 
       
   183 
       
   184     /**
       
   185      * JavaRegConverter::StoreCertificateChainsL method stores the
       
   186      * certificate chains ( given in the first parameter ),
       
   187      * into the descriptor paramameter, that is instantiated by
       
   188      * this method.
       
   189      * The function may leave with one of the system-wide error codes.
       
   190      *
       
   191      * @since S60 v3.2
       
   192      * @param aValue The certificate chains to be stored.
       
   193      * @param aDes [out] Descriptor parameter, storing, and the returning
       
   194      * the certificate chains.
       
   195      */
       
   196     IMPORT_C static void StoreCertificateChainsL(
       
   197         const RPointerArray<HBufC8>& aValue,
       
   198         HBufC*& aDes);
       
   199 
       
   200 
       
   201     /**
       
   202      * JavaRegConverter::GetUnicodeDescriptorsL method converts the
       
   203      * descriptor parameter to a RPointerArray<HBufC> storing
       
   204      * unicode descriptors.
       
   205      * The function may leave with one of the system-wide error codes.
       
   206      *
       
   207      * @since S60 v3.2
       
   208      * @param aValue A descriptor storing unicode descriptors.
       
   209      * @param aCertChains [out] The method converts the unicode descriptors
       
   210      *                          into this RPointerArray<HBufC>.
       
   211      */
       
   212     IMPORT_C static void JavaRegConverter::GetUnicodeDescriptorsL(
       
   213         const TDesC& aValue,
       
   214         RPointerArray<HBufC>& aDescriptors);
       
   215     /**
       
   216      * JavaRegConverter::StoreUnicodeDescriptorsL method stores the
       
   217      * unicode descriptors ( given in the first parameter ),
       
   218      * into the descriptor paramameter, that is instantiated by
       
   219      * this method.
       
   220      * The function may leave with one of the system-wide error codes.
       
   221      *
       
   222      * @since S60 v3.2
       
   223      * @param aValue The certificate chains to be stored.
       
   224      * @param aDes [out] Descriptor parameter, storing, and the returning
       
   225      * the certificate chains.
       
   226      */
       
   227     IMPORT_C static void JavaRegConverter::StoreUnicodeDescriptorsL(
       
   228         const RPointerArray<HBufC>& aValue,
       
   229         HBufC*& aDes);
       
   230 };
       
   231 
       
   232 }// namespace Registry
       
   233 }// namespace Manager
       
   234 }// namespace Java
       
   235 
       
   236 #endif // JAVAREGCONVERTER_H
       
   237 
       
   238 // End of File