24
|
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 |
// Declares the CSmsuActiveBase based class CSmsMessageSend.
|
|
15 |
//
|
|
16 |
//
|
|
17 |
|
|
18 |
/**
|
|
19 |
@file
|
|
20 |
@internalAll
|
|
21 |
*/
|
|
22 |
|
|
23 |
#ifndef __SMSPSEND_H__
|
|
24 |
#define __SMSPSEND_H__
|
|
25 |
|
|
26 |
#include "smspcomm.h"
|
|
27 |
#include <logwrap.h>
|
|
28 |
#include <logsmspdudata.h>
|
|
29 |
#include "smsuaddr.H"
|
|
30 |
#include <etelmm.h>
|
|
31 |
#include "Gsmumsg.h"
|
|
32 |
#include "smsuact.h"
|
|
33 |
#include "smspcdb.h"
|
|
34 |
|
|
35 |
|
|
36 |
class TSmsSettings;
|
|
37 |
class CSmsSegmentationStore;
|
|
38 |
class CLogWrapper;
|
|
39 |
class CLogEvent;
|
|
40 |
class CSmsEventLogger;
|
|
41 |
class CSmspSetBearer;
|
|
42 |
|
|
43 |
|
|
44 |
/**
|
|
45 |
* @internalComponent
|
|
46 |
*/
|
|
47 |
const TUint8 KTpFcsUnspecifiedError = 0xFF; // TP-FCS Unspecified error cause (GSM 03.40/3G TS 23.040)
|
|
48 |
|
|
49 |
|
|
50 |
/**
|
|
51 |
* @internalComponent
|
|
52 |
*/
|
|
53 |
class CSmsMessageSend : public CSmsuActiveBase
|
|
54 |
{
|
|
55 |
public:
|
|
56 |
static CSmsMessageSend* NewL(CSmsSegmentationStore& aSegmentationStore,
|
|
57 |
const TSmsSettings& aSmsSettings,
|
|
58 |
const RMobileSmsMessaging::TMobileSmsCapsV1& aMobileSmsCaps,
|
|
59 |
RMobileSmsMessaging& aSmsMessaging,
|
|
60 |
TInt aPriority,
|
|
61 |
CSmspSetBearer& aSmspSetBearer);
|
|
62 |
~CSmsMessageSend();
|
|
63 |
|
|
64 |
void Start(CSmsMessage& aSmsMessage, TInt aOptions,
|
|
65 |
const TSmsAddr& aSmsAddr, TRequestStatus& aStatus);
|
|
66 |
|
|
67 |
protected:
|
|
68 |
void DoRunL();
|
|
69 |
void DoCancel();
|
|
70 |
|
|
71 |
private:
|
|
72 |
enum TSmsMessageSendState
|
|
73 |
{
|
|
74 |
ESmsMessageSendIdle,
|
|
75 |
ESmsMessageSendSetBearer,
|
|
76 |
ESmsMessageSendSegmentingMessage,
|
|
77 |
ESmsMessageSendCreatingLogServerEvent,
|
|
78 |
ESmsMessageSendPDU,
|
|
79 |
ESmsMessageSendUpdatingSegmentationStore,
|
|
80 |
ESmsMessageSendUpdatingLogEvent
|
|
81 |
};
|
|
82 |
|
|
83 |
CSmsMessageSend(CSmsSegmentationStore& aSegmentationStore,
|
|
84 |
const TSmsSettings& aSmsSettings,
|
|
85 |
const RMobileSmsMessaging::TMobileSmsCapsV1& aMobileSmsCaps,
|
|
86 |
RMobileSmsMessaging& aSmsMessaging,
|
|
87 |
TInt aPriority,
|
|
88 |
CSmspSetBearer& aSmspSetBearer);
|
|
89 |
void ConstructL();
|
|
90 |
|
|
91 |
void SegmentMessage();
|
|
92 |
void DoSegmentMessageL();
|
|
93 |
void CreateLogServerEvent();
|
|
94 |
void SendNextPDU();
|
|
95 |
void UpdateSegmentationStore();
|
|
96 |
void DoUpdateSegmentationStoreL();
|
|
97 |
void UpdateLogServerEvent();
|
|
98 |
void SetData();
|
|
99 |
void Complete(TInt aStatus);
|
|
100 |
void DecodeSubmitReportL();
|
|
101 |
TBool IsRPError() const;
|
|
102 |
|
|
103 |
TSmsMessageSendState iState;
|
|
104 |
CSmsSegmentationStore& iSegmentationStore;
|
|
105 |
CSmspSetBearer& iSmspSetBearer; // a reference to owner class' instance
|
|
106 |
const TSmsSettings& iSmsSettings; //< Reference to object that contains timeout settings
|
|
107 |
const RMobileSmsMessaging::TMobileSmsCapsV1& iMobileSmsCaps; //< Reference to the SMS messaging capabilities of TSY/phone.
|
|
108 |
RMobileSmsMessaging& iSmsMessaging; //< Reference to ETEL SMS messaging subsession
|
|
109 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1 iMobileSmsSendAttributesV1; //< Attribute class for sending SMS message
|
|
110 |
RMobileSmsMessaging::TMobileSmsSendAttributesV1Pckg iMobileSmsSendAttributesV1Pckg; //< Packaged attribute class for sending SMS message
|
|
111 |
|
|
112 |
CSmsMessage* iSmsMessage;
|
|
113 |
TSmsAddr iSmsAddr;
|
|
114 |
TInt iOptions;
|
|
115 |
CSmsEventLogger* iSmsEventLogger;
|
|
116 |
TLogSmsPduData iSmsPDUData;
|
|
117 |
TInt iSendError;
|
|
118 |
CArrayFixFlat<TGsmSms> iSmsArray;
|
|
119 |
TGsmSmsTelNumber iToFromTelNumber;
|
|
120 |
TInt iSegmentSequenceNumber;
|
|
121 |
};
|
|
122 |
|
|
123 |
|
|
124 |
#endif // __SMSPSEND_H__
|