telephonyserverplugins/multimodetsy/Multimode/sms/smsutil.h
changeset 0 3553901f7fa8
child 24 6638e7f4bd8f
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 // Copyright (c) 1997-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 /**
       
    17  @file
       
    18  @internalAll 
       
    19 */
       
    20 
       
    21 #ifndef __ATSMSUTIL_H__
       
    22 #define	__ATSMSUTIL_H__
       
    23 
       
    24 #include <etelmm.h>		// for RMobilePhone::TMobileAddress
       
    25 
       
    26 const TInt KMaxAsciiPduLength=400;	
       
    27 const TInt KMaxAsciiSCALength=80;	
       
    28 
       
    29 class CATParamListEntry;
       
    30 
       
    31 class CATSmsUtils : public CBase
       
    32 	{
       
    33 public:
       
    34 	static TInt AppendAddressToAscii(TDes8& aAscii,const RMobilePhone::TMobileAddress& aAddress,TBool aUse0340Format=EFalse);
       
    35 	static void AppendDataToAscii(TDes8& aAscii,const TDesC8& aData);
       
    36 	static TInt ConvertAsciiToBinary(const TDesC8& aAscii,TDes8& aData);
       
    37 	static TInt ReadAddressFromAscii(const TDesC8& aAscii,RMobilePhone::TMobileAddress& aAddress,TBool aPduUses0340Format=EFalse);
       
    38 	static TInt ReadAndRemoveAddressFromAscii(TDes8& aAscii,RMobilePhone::TMobileAddress& aAddress,TBool aPduUses0340Format=EFalse);
       
    39 	static TInt CopyAddressStringToAddressStruct(const TDesC8& aAddressValueString,const TDesC8& aAddressTypeString,RMobilePhone::TMobileAddress& aAddress);
       
    40 	static void GetTypeOfAddressInDecimal(const RMobilePhone::TMobileAddress& aAddress, TUint& aVal);
       
    41 	static void SetTypeOfAddressFromDecimal(RMobilePhone::TMobileAddress& aAddress,const TUint& aVal);
       
    42 	static TBool IsAddressChar(TChar aChar);
       
    43 	static void ConvertStoreNameToEtelMMVersion(TDes& aEtelMMVersion,const TDesC8& aPhoneVersion);
       
    44 	static void ConvertStoreNameToPhoneVersion(const TDesC& aEtelMMVersion,TDes8& aPhoneVersion);
       
    45 
       
    46 
       
    47 private:
       
    48 	// Enum conversion functions 
       
    49 	static RMobilePhone::TMobileTON ConvertTypeOfNumber(TInt aValue);
       
    50 	static TInt ConvertTypeOfNumber(RMobilePhone::TMobileTON aEnum);
       
    51 	static RMobilePhone::TMobileNPI ConvertNumberingPlan(TInt aValue);
       
    52 	static TInt ConvertNumberingPlan(RMobilePhone::TMobileNPI aEnum);
       
    53 
       
    54 	// ASCII/Binary conversion functions
       
    55 	static void AppendOctet(TInt aOctet,TDes8& aAscii);
       
    56 	static TInt ConvertAddressChar(TChar aChar);
       
    57 	static TChar ConvertAddressChar(TInt aBinary);
       
    58 	};
       
    59 
       
    60 
       
    61 
       
    62 
       
    63 
       
    64 #endif