1 // Copyright (c) 2000-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 #ifndef __SMSSENDSESSION_H__ |
|
17 #define __SMSSENDSESSION_H__ |
|
18 |
|
19 #include <e32base.h> |
|
20 #include <msvstd.h> |
|
21 |
|
22 #include "smssactive.h" |
|
23 |
|
24 class TSmsProgress; |
|
25 class CRichText; |
|
26 class CSmsSend; |
|
27 class CSmsRecipientSend; |
|
28 |
|
29 class CSmsSendSession : public CSmssActive |
|
30 /** |
|
31 @internalComponent |
|
32 @released |
|
33 */ |
|
34 { |
|
35 public: |
|
36 |
|
37 static CSmsSendSession* NewL(TSmsProgress& aProgress, CMsvServerEntry& aServerEntry, RFs& aFs, CSmsHeader& aHeader, CRichText& aRichText, TMsvEntry& aEntry); |
|
38 ~CSmsSendSession(); |
|
39 |
|
40 void SendSms(TRequestStatus& aStatus); |
|
41 TMsvId IncSms(); |
|
42 TMsvId Id() {return iId;} |
|
43 void DivideMessagesL(CMsvEntrySelection& aSelection); |
|
44 |
|
45 private: |
|
46 |
|
47 CSmsSendSession(TSmsProgress& aProgress, RFs& aFs, CMsvServerEntry& aServerEntry, CSmsHeader& aHeader); |
|
48 void ConstructL(CRichText& aRichText, TMsvEntry& aEntry); |
|
49 void CreateRecipientsL(); |
|
50 |
|
51 void DoSmssCancel(); |
|
52 void DoRunL(); |
|
53 void DoComplete(TInt& aStatus); //from CSmssActive |
|
54 |
|
55 enum TSmsSendSessionState |
|
56 { |
|
57 ESessionSending, |
|
58 ESessionNoMoreMessages, |
|
59 ESessionNoSendTypes |
|
60 } iState; |
|
61 |
|
62 class CSmsSendType : public CBase |
|
63 { |
|
64 public: |
|
65 static CSmsSendType* NewL(CSmsRecipientSend* aRecipientSend); |
|
66 ~CSmsSendType(); |
|
67 |
|
68 CSmsRecipientSend* iRecipientSend; |
|
69 CMsvEntrySelection* iSelection; |
|
70 TInt iCurrentMessage; |
|
71 |
|
72 private: |
|
73 CSmsSendType(CSmsRecipientSend* aRecipient); |
|
74 void ConstructL(); |
|
75 }; |
|
76 |
|
77 TMsvId GetNextSms(TInt& aCurType, CSmsSendType* aSendType, TInt& aCurMsg); |
|
78 |
|
79 CArrayPtrFlat<CSmsSendType>* iSendTypes; |
|
80 CSmsSend* iSmsSend; |
|
81 TSmsProgress& iProgress; |
|
82 TInt iCurrentSendType; |
|
83 TMsvId iId; |
|
84 CSmsHeader& iSmsHeader; |
|
85 }; |
|
86 |
|
87 #endif // __SMSSENDSESSION_H__ |
|