|
1 /* |
|
2 * Copyright (c) 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef JAVASMSATTRIBUTES_H |
|
19 #define JAVASMSATTRIBUTES_H |
|
20 |
|
21 #include <gsmuelem.h> |
|
22 #include <es_sock.h> |
|
23 #include <etelmm.h> |
|
24 |
|
25 #define MESSAGE_TEXT 0L |
|
26 #define MESSAGE_BINARY 1L |
|
27 |
|
28 |
|
29 _LIT(KSmsProtocol, "sms"); |
|
30 _LIT(KCbsProtocol, "cbs"); |
|
31 _LIT(KCBSEmptyAddress, ""); |
|
32 _LIT(KUriColonAndSlashes, "://"); |
|
33 |
|
34 const int KMaxUriSize = 287; |
|
35 const int KPortFieldStartIndex = 7; |
|
36 const int KSmsSendAndReceiveTotal = 10; |
|
37 const int KCharacterConversionBufferSize = 100; |
|
38 const bool KUse16BitPortAddressing = ETrue; |
|
39 const int KSmsPayloadSizeInBytesWithPortAddressing = 133; |
|
40 const int KSmsMaxDataSize = KSmsSendAndReceiveTotal |
|
41 * KSmsPayloadSizeInBytesWithPortAddressing; |
|
42 |
|
43 class TCBSParameters |
|
44 { |
|
45 public: |
|
46 TBuf<TGsmSmsTelNumberMaxLen> mAddress; |
|
47 TUint16 mPort; |
|
48 TSmsDataCodingScheme::TSmsAlphabet mEncoding; |
|
49 TInt mDataSize; |
|
50 }; |
|
51 |
|
52 const TInt KCBSMaxDataSize = |
|
53 (RMobileBroadcastMessaging::KGsmBroadcastDataSize * 8) / 7; |
|
54 |
|
55 typedef TBuf16<KCBSMaxDataSize> TCBSDataBuf; |
|
56 |
|
57 typedef TPckgBuf<TCBSParameters> TCBSParametersBuf; |
|
58 |
|
59 class TSMSParameters |
|
60 { |
|
61 public: |
|
62 TBuf<TGsmSmsTelNumberMaxLen> mAddress; |
|
63 TUint16 mPort; |
|
64 TSmsDataCodingScheme::TSmsAlphabet mEncoding; |
|
65 TInt mDataSize; |
|
66 TTime mTimestamp; |
|
67 }; |
|
68 |
|
69 typedef TPckgBuf<TSMSParameters> TSMSParametersBuf; |
|
70 |
|
71 typedef TBuf16<KSmsMaxDataSize> TSmsDataBuf; |
|
72 |
|
73 class TJavaMessageParameters |
|
74 { |
|
75 public: |
|
76 TBuf<TGsmSmsTelNumberMaxLen> mAddress; |
|
77 TUint16 mPort; |
|
78 TSmsDataCodingScheme::TSmsAlphabet mEncoding; |
|
79 TInt mDataSize; |
|
80 TTime mTimestamp; |
|
81 TBuf16<KSmsMaxDataSize> mData; |
|
82 }; |
|
83 |
|
84 typedef TPckgBuf<TJavaMessageParameters> TJavaMessageParametersBuf; |
|
85 |
|
86 |
|
87 #endif // JAVASMSATTRIBUTES_H |