diff -r f5050f1da672 -r 04becd199f91 javaextensions/wma/sms_cbs/inc.s60/javasmsattributes.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javaextensions/wma/sms_cbs/inc.s60/javasmsattributes.h Tue Apr 27 16:30:29 2010 +0300 @@ -0,0 +1,87 @@ +/* +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: + * +*/ + +#ifndef JAVASMSATTRIBUTES_H +#define JAVASMSATTRIBUTES_H + +#include +#include +#include + +#define MESSAGE_TEXT 0L +#define MESSAGE_BINARY 1L + + +_LIT(KSmsProtocol, "sms"); +_LIT(KCbsProtocol, "cbs"); +_LIT(KCBSEmptyAddress, ""); +_LIT(KUriColonAndSlashes, "://"); + +const int KMaxUriSize = 287; +const int KPortFieldStartIndex = 7; +const int KSmsSendAndReceiveTotal = 10; +const int KCharacterConversionBufferSize = 100; +const bool KUse16BitPortAddressing = ETrue; +const int KSmsPayloadSizeInBytesWithPortAddressing = 133; +const int KSmsMaxDataSize = KSmsSendAndReceiveTotal + * KSmsPayloadSizeInBytesWithPortAddressing; + +class TCBSParameters +{ +public: + TBuf mAddress; + TUint16 mPort; + TSmsDataCodingScheme::TSmsAlphabet mEncoding; + TInt mDataSize; +}; + +const TInt KCBSMaxDataSize = + (RMobileBroadcastMessaging::KGsmBroadcastDataSize * 8) / 7; + +typedef TBuf16 TCBSDataBuf; + +typedef TPckgBuf TCBSParametersBuf; + +class TSMSParameters +{ +public: + TBuf mAddress; + TUint16 mPort; + TSmsDataCodingScheme::TSmsAlphabet mEncoding; + TInt mDataSize; + TTime mTimestamp; +}; + +typedef TPckgBuf TSMSParametersBuf; + +typedef TBuf16 TSmsDataBuf; + +class TJavaMessageParameters +{ +public: + TBuf mAddress; + TUint16 mPort; + TSmsDataCodingScheme::TSmsAlphabet mEncoding; + TInt mDataSize; + TTime mTimestamp; + TBuf16 mData; +}; + +typedef TPckgBuf TJavaMessageParametersBuf; + + +#endif // JAVASMSATTRIBUTES_H