iaupdate/IAD/tools/inc/iaupdatetools.h
branchRCL_3
changeset 26 8b7f4e561641
parent 0 ba25891c3a9e
equal deleted inserted replaced
25:7333d7932ef7 26:8b7f4e561641
       
     1 /*
       
     2 * Copyright (c) 2007-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:   This file contains the header file of the IAUpdateTools functions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef IA_UPDATE_TOOLS_H
       
    21 #define IA_UPDATE_TOOLS_H
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <e32cmn.h>
       
    25 
       
    26 class RReadStream;
       
    27 class RWriteStream;
       
    28 
       
    29 
       
    30 /**
       
    31  * IAUpdateTools provides general tool functions
       
    32  *
       
    33  * @since S60 v3.2
       
    34  */
       
    35 namespace IAUpdateTools
       
    36     {
       
    37 
       
    38     /**
       
    39      * @param aTarget The old pointer data will be deleted and the pointer will point to the new data 
       
    40      * that will contain externalization of the CIAUpdateParameters object.
       
    41      * @param aSource CIAUpdateParameters object that will be externalized to a descriptor.
       
    42      * @exception Leaves with system wide error code.
       
    43      */
       
    44     IMPORT_C void ExternalizeParametersL( HBufC8*& aTarget,
       
    45                                           const CIAUpdateParameters& aSource );
       
    46 
       
    47     /**
       
    48      * Internalizes CIAUpdateParameters from the source descriptor data.
       
    49      *
       
    50      * @param aTarget CIAUpdateParameters object that will be internalized.
       
    51      * @param aSource Data that is used to internalize CIAUpdateParameters object.
       
    52      * @exception Leaves with system wide error code.
       
    53      */
       
    54     IMPORT_C void InternalizeParametersL( CIAUpdateParameters& aTarget, 
       
    55                                           const TDesC8& aSource );
       
    56 
       
    57 
       
    58     /**
       
    59      * Externalizes the descriptor to the stream with length information
       
    60      *
       
    61      * @param aDes Descriptor to externalize
       
    62      * @param aStream Target stream
       
    63      * @exception Leaves with system wide error code.
       
    64      */
       
    65     IMPORT_C void ExternalizeDesL( const TDesC& aDes, 
       
    66                                    RWriteStream& aStream );
       
    67 
       
    68     /**
       
    69      * Internalizes a descriptor written with ExternalizeDesL() from the stream
       
    70      *
       
    71      * @param Target descriptor pointer. Old descriptor is deleted if the read is 
       
    72      * successful.
       
    73      * @param aStream Source stream
       
    74      * @return Length of the read data
       
    75      * @exception Leaves with system wide error code. 
       
    76      */
       
    77     IMPORT_C TInt InternalizeDesL( HBufC*& aDes, 
       
    78                                    RReadStream& aStream );
       
    79 
       
    80 
       
    81     /**
       
    82      * @see ExternalizeDesL
       
    83      */
       
    84     IMPORT_C void ExternalizeDes8L( const TDesC8& aDes, 
       
    85                                     RWriteStream& aStream );
       
    86 
       
    87     /**
       
    88      * @see InternalizeDesL
       
    89      */
       
    90     IMPORT_C TInt InternalizeDes8L( HBufC8*& aDes, 
       
    91                                     RReadStream& aStream );
       
    92 
       
    93     }
       
    94 
       
    95 #endif // IA_UPDATE_TOOLS_H