|
1 // Copyright (c) 1999-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 SMSSERV_H_ |
|
17 #define SMSSERV_H_ |
|
18 |
|
19 #include <etelmm.h> |
|
20 #include <smuthdr.h> |
|
21 #include <schedulebaseservermtm.h> |
|
22 #include <smutset.h> |
|
23 |
|
24 class CSmsOutboxSend; |
|
25 class CSmsSimUtils; |
|
26 |
|
27 class CSmsServerMtm : public CScheduleBaseServerMtm |
|
28 /** |
|
29 @internalTechnology |
|
30 @released |
|
31 */ |
|
32 { |
|
33 public: |
|
34 IMPORT_C static CSmsServerMtm* NewL(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); |
|
35 ~CSmsServerMtm(); |
|
36 |
|
37 void CopyToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
38 void CopyFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
39 void CopyWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
40 void MoveToLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
41 void MoveFromLocalL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
42 void MoveWithinServiceL(const CMsvEntrySelection& aSelection,TMsvId aDestination, TRequestStatus& aStatus); |
|
43 // void DeleteL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); |
|
44 void DeleteAllL(const CMsvEntrySelection& aSelection, TRequestStatus& aStatus); |
|
45 void CreateL(TMsvEntry aNewEntry, TRequestStatus& aStatus); |
|
46 void ChangeL(TMsvEntry aNewEntry, TRequestStatus& aStatus); |
|
47 // |
|
48 void StartCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus); |
|
49 // |
|
50 TBool CommandExpected(); |
|
51 // |
|
52 const TDesC8& Progress(); |
|
53 // |
|
54 |
|
55 protected: |
|
56 void DoCancel(); |
|
57 void DoRunL(); |
|
58 void CompleteCommand(TInt aError); |
|
59 void DoComplete(TInt aError); |
|
60 |
|
61 // --- Functions derived from CScheduleBaseServerMtm --- |
|
62 TInt Extension_(TUint aExtensionId, TAny*& a0, TAny* a1); |
|
63 void ConstructL(); |
|
64 void RestoreScheduleSettingsL(); |
|
65 private: |
|
66 CSmsServerMtm(CRegisteredMtmDll& aRegisteredMtmDll, CMsvServerEntry* aServerEntry); |
|
67 void RestoreSettingsL(); |
|
68 void LoadResourceFileL(); |
|
69 void FindServiceId(); |
|
70 void PopulateSchedulePackage(const TDesC8& aParameter, const TBool aMove, TMsvSchedulePackage& aPackage) const; |
|
71 void ScheduleCommandL(CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus); |
|
72 void SimUtilsL(const CMsvEntrySelection& aSelection, TInt aCommand, const TDesC8& aParameter, TRequestStatus& aStatus); |
|
73 |
|
74 private: |
|
75 TMsvId iSmsServiceId; |
|
76 TSmsProgress iProgress; |
|
77 TSmsProgressBuf iProgressBuf; |
|
78 CSmsOutboxSend* iOutboxSend; |
|
79 CSmsSimUtils* iSimUtils; |
|
80 enum TSmsServerMtmState |
|
81 { |
|
82 ESmsServerMtmWaiting, |
|
83 ESmsServerMtmSending, |
|
84 ESmsServerMtmScheduling, |
|
85 ESmsServerMtmSimUtils |
|
86 } iState; |
|
87 #if (defined SYMBIAN_USER_PROMPT_SERVICE) |
|
88 TThreadId iClientThreadId; |
|
89 TBool iHasCapability; |
|
90 #endif |
|
91 }; |
|
92 |
|
93 #endif |