|
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 /** |
|
17 @file |
|
18 * @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __WS_OBSVR_H__ |
|
22 #define __WS_OBSVR_H__ |
|
23 |
|
24 #include <e32base.h> |
|
25 |
|
26 #include "smsuaddr.H" |
|
27 #include "smspcomm.h" |
|
28 |
|
29 class CWapSmsProvider; |
|
30 class CSmsMessage; |
|
31 class CWapDatagram; |
|
32 class CSmsProtocol; |
|
33 class CWapSmsProtocol; |
|
34 |
|
35 /** |
|
36 * @internalComponent |
|
37 */ |
|
38 class CWapSapMessageSender : public CBase, public MSmsMessageObserver |
|
39 { |
|
40 public: |
|
41 static CWapSapMessageSender* NewL(CSmsProtocol* aSmsProtocol, CWapSmsProvider* aWapSap); |
|
42 ~CWapSapMessageSender(); |
|
43 void SendDatagramL(CWapDatagram* aMsg); |
|
44 public: |
|
45 // From MSmsMessageObserver |
|
46 virtual const TSmsAddr& GetLocalAddress() const; |
|
47 virtual void SetLocalAddress(const TSmsAddr& aSmsAddr); |
|
48 virtual void ModemNotificationCompleted(TInt aStatus); |
|
49 virtual void MessageSendCompleted(TInt aStatus); |
|
50 virtual TInt MessageReceived(const CSmsMessage& aSmsMessage,TDes& aDes); |
|
51 virtual TBool ClientConfirmsMessage()const; |
|
52 virtual TInt SmsAddrIsDuplicate(const MSmsMessageObserver* aObserver,const TSmsAddr& aAddr)const; |
|
53 virtual void EnumeratePhoneCompleted(TInt aStatus); |
|
54 virtual void MessageWriteCompleted(TInt aStatus, const CSmsMessage* aSmsMessage = NULL); |
|
55 virtual void MessageDeleteCompleted(TInt aStatus); |
|
56 virtual void ReadSmsParamsCompleted(TInt aStatus,CMobilePhoneSmspList* aSmspList); |
|
57 virtual void WriteSmsParamsCompleted(TInt aStatus); |
|
58 protected: |
|
59 CWapSapMessageSender(CSmsProtocol* aSmsProtocol, CWapSmsProvider* aWapSap); |
|
60 private: |
|
61 void SendNextSms(); |
|
62 void SetSmsMessageSettingsL(CSmsMessage* aSmsMessage); |
|
63 private: |
|
64 |
|
65 TSmsAddr iSmsAddr; |
|
66 CSmsProtocol* iSmsProtocol; |
|
67 CWapSmsProvider* iProvider; |
|
68 CArrayPtrFlat<CSmsMessage>* iSmsMsgArray; |
|
69 }; |
|
70 |
|
71 |
|
72 /** |
|
73 * @internalComponent |
|
74 */ |
|
75 class CWapProtocolObserver : public CBase, public MSmsMessageObserver |
|
76 { |
|
77 public: |
|
78 static CWapProtocolObserver* NewL(CWapSmsProtocol* aProtocol); |
|
79 public: |
|
80 // From MSmsMessageObserver |
|
81 virtual const TSmsAddr& GetLocalAddress() const; |
|
82 virtual void SetLocalAddress(const TSmsAddr& aSmsAddr); |
|
83 virtual void ModemNotificationCompleted(TInt aStatus); |
|
84 virtual void MessageSendCompleted(TInt aStatus); |
|
85 virtual TInt MessageReceived(const CSmsMessage& aSmsMessage,TDes& aDes); |
|
86 virtual TBool ClientConfirmsMessage()const; |
|
87 virtual TInt SmsAddrIsDuplicate(const MSmsMessageObserver* aObserver,const TSmsAddr& aAddr)const; |
|
88 virtual void EnumeratePhoneCompleted(TInt aStatus); |
|
89 virtual void MessageWriteCompleted(TInt aStatus, const CSmsMessage* aSmsMessage = NULL); |
|
90 virtual void MessageDeleteCompleted(TInt aStatus); |
|
91 virtual void ReadSmsParamsCompleted(TInt aStatus,CMobilePhoneSmspList* aSmspList); |
|
92 virtual void WriteSmsParamsCompleted(TInt aStatus); |
|
93 private: |
|
94 |
|
95 TSmsAddr iSmsAddr; |
|
96 CWapSmsProtocol* iWapSmsProtocol; |
|
97 }; |
|
98 |
|
99 #endif |