srsf/vcommandhandler/inc/desarrayconverter.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 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:  A utility class for converting arrays to descriptors and vise versa
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19  
       
    20 #ifndef DESARRAYCONVERTER_H
       
    21 #define DESARRAYCONVERTER_H
       
    22 
       
    23 #include <nssvasmrrd.h> // NssRRDText
       
    24 
       
    25 /**
       
    26 * A utility class for converting arrays to descriptors and vise versa
       
    27 */
       
    28 class CDesArrayConverter : public CBase
       
    29 	{
       
    30 	public:
       
    31 		/**
       
    32         * Converts the stream data into the array of fixed size descriptors
       
    33         * @param aSource 8-bit descriptor to convert
       
    34         */
       
    35 		static CArrayFixFlat<NssRRDText>* DesC8ToArrayLC( const TDesC8& aSource );
       
    36     	
       
    37     	/**
       
    38         * Constructs DesC8 descriptor from the given array slice. Almost a 
       
    39         * counterpart of the DesC8ToArrayLC
       
    40         * @param aArray Array to convert
       
    41         * @param aStartIndex First element to convert. Zero-based
       
    42         * @param aCount number of elements to convert. 
       
    43         * @leave KErrArgument if aStartIndex or aCount are out of the array bounds
       
    44         */
       
    45     	static TDesC8* ArrayToDesC8LC( const CArrayFixFlat<NssRRDText>& aArray, 
       
    46     											TInt aStartIndex, TInt aCount );
       
    47 	};
       
    48 
       
    49 #endif // DESARRAYCONVERTER_H