smf/smfcredentialmgr/smfcredmgrcommon/inc/smfutils.h
changeset 14 a469c0e6e7fb
equal deleted inserted replaced
13:b5d63d5fc252 14:a469c0e6e7fb
       
     1 /**
       
     2  * Copyright (c) 2010 Sasken Communication Technologies Ltd.
       
     3  * All rights reserved.
       
     4  * This component and the accompanying materials are made available
       
     5  * under the terms of the "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  * Lasse Laasonen, Sasken Communication Technologies Ltd - Initial contribution
       
    11  *
       
    12  * Description:
       
    13  * This header contains utility routines used by server and client
       
    14  */
       
    15 
       
    16 #ifndef SMFUTILS_H_
       
    17 #define SMFUTILS_H_
       
    18 
       
    19 #include <e32base.h>
       
    20 
       
    21 class RWriteStream;
       
    22 class RReadStream;
       
    23 
       
    24 /**
       
    25  * Utility to serialize data
       
    26  */
       
    27 namespace SmfUtils
       
    28 	{
       
    29 	/**
       
    30 	 * Method to externalize
       
    31 	 * @param aDes descriptor to be externalized
       
    32 	 * @param aStream The Write Stream to be filled.
       
    33 	 */
       
    34 	void ExternalizeDesL(const TDesC8& aDes, RWriteStream& aStream);
       
    35 
       
    36 	/**
       
    37 	 * Method to internalize 
       
    38 	 * @param aDes descriptor to be internalized
       
    39 	 * @param aStream the stream to read from.
       
    40 	 */
       
    41 	TInt InternalizeDesL(RBuf8& aDes, RReadStream& aStream);
       
    42 
       
    43 	/**
       
    44 	 * Method to externalize
       
    45 	 * @param aDes descriptor to be externalized
       
    46 	 * @param aStream The Write Stream to be filled.
       
    47 	 */
       
    48 	void ExternalizeDesL(const TDesC16& aDes, RWriteStream& aStream);
       
    49 
       
    50 	/**
       
    51 	 * Method to internalize 
       
    52 	 * @param aStream the stream to read from.
       
    53 	 */
       
    54 	HBufC16* InternalizeDesL(RReadStream& aStream);
       
    55 
       
    56 	TInt InternalizeDesL( RBuf16& aDes, RReadStream& aStream );
       
    57 	/**
       
    58 	 * Method to externalize 
       
    59 	 * @param aInt integer to be externalized
       
    60 	 * @param aStream The Write Stream to be filled.
       
    61 	 */
       
    62 	void ExternalizeInt64L(const TInt64& aInt, RWriteStream& aStream);
       
    63 
       
    64 	/**
       
    65 	 * Method to internalize 
       
    66 	 * @param aInt integer to be internalized
       
    67 	 * @param aStream the stream to read from.
       
    68 	 */
       
    69 	void InternalizeInt64L(TInt64& aInt, RReadStream& aStream);
       
    70 	}
       
    71 
       
    72 #endif /* SMFUTILS_H_ */