|
1 /* |
|
2 * Copyright (c) 2005-2009 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 * Name : CSatNotifySendSs.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYSENDSS_H |
|
25 #define CSATNOTIFYSENDSS_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include <etelsat.h> |
|
30 #include "MSatNotificationsBase.h" |
|
31 |
|
32 |
|
33 // FORWARD DECLARATIONS |
|
34 class CSatDataPackage; |
|
35 class CSatNotificationsTsy; |
|
36 |
|
37 /** |
|
38 * DESCRIPTION |
|
39 * SAT Send SS notification class. |
|
40 * Created when client requests to be notified when Send SS |
|
41 * command arrives from SIM. |
|
42 * |
|
43 * Sends a SS string towards the network. Upon receiving this command, |
|
44 * the SAT shall decide if it is able to execute the command. |
|
45 * @lib Commonsimatktsy |
|
46 * @since 3.1 |
|
47 */ |
|
48 NONSHARABLE_CLASS ( CSatNotifySendSs ) : public CBase, |
|
49 public MSatNotificationsBase |
|
50 { |
|
51 public: // Constructors and destructor |
|
52 |
|
53 /** |
|
54 * Two-phased constructor. |
|
55 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
56 * return CSatNotifySendSs*: created object |
|
57 */ |
|
58 static CSatNotifySendSs* NewL( |
|
59 CSatNotificationsTsy* aNotificationsTsy ); |
|
60 |
|
61 /** |
|
62 * C++ Destructor. |
|
63 */ |
|
64 ~CSatNotifySendSs(); |
|
65 |
|
66 private: |
|
67 /** |
|
68 * By default C++ constructor is private. |
|
69 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
70 * @return None |
|
71 */ |
|
72 CSatNotifySendSs( CSatNotificationsTsy* aNotificationsTsy ); |
|
73 |
|
74 /** |
|
75 * Class attributes are created in ConstructL. |
|
76 * @param None |
|
77 * @return None |
|
78 */ |
|
79 void ConstructL(); |
|
80 |
|
81 public: // Functions from base classes |
|
82 |
|
83 /** |
|
84 * Send Ss Notification request received from client |
|
85 * @param aTsyReqHandle: request handle from ETel |
|
86 * @param aPackage: Packed data |
|
87 * @return KErrNone |
|
88 */ |
|
89 TInt Notify( const TTsyReqHandle aTsyReqHandle, |
|
90 const TDataPackage& aPackage ); |
|
91 |
|
92 /** |
|
93 * Cancels notification request for Send Ss. |
|
94 * @param aReqHandle notify request handle |
|
95 * @return KErrNone |
|
96 */ |
|
97 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
98 |
|
99 /** |
|
100 * Completes Send Ss message to client |
|
101 * @param aDataPackage: Packaged return data |
|
102 * @param aErrorCode: Possible error code |
|
103 * @return KErrNone/ KErrCorrupt |
|
104 */ |
|
105 TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode ); |
|
106 |
|
107 /** |
|
108 * From CSatNotificationsBase handles Send Ss terminal response |
|
109 * coming from client. |
|
110 * @param aRsp: Response structure |
|
111 * @return KErrNone/ KErrCorrupt |
|
112 */ |
|
113 TInt TerminalResponseL( TDes8* aRsp ); |
|
114 |
|
115 public: // New functions |
|
116 |
|
117 /** |
|
118 * Create notification specific terminal response data |
|
119 * @param aPCmdNumber: Proactive command number |
|
120 * @param aGeneralResult: Result of the proactive command |
|
121 * @param aAdditionalInfo: Additional info for terminal response |
|
122 * @return Success/Failure value |
|
123 */ |
|
124 TInt CreateTerminalRespL( TUint8 aPCmdNumber, |
|
125 TUint8 aGeneralResult, const TDesC16& aAdditionalInfo ); |
|
126 |
|
127 public: // New functions |
|
128 |
|
129 /** |
|
130 * Checks SS string if it is call forwarding and append '+' character. |
|
131 * @param aSource Original string is received from SIM |
|
132 * @param aSsString SS string |
|
133 * @return None |
|
134 */ |
|
135 void CheckCallForwarding( TPtrC8 aSource, |
|
136 RSat::TSsString& aSsString ); |
|
137 /** |
|
138 * Checks validity of SS string. If string includes undefined SS |
|
139 * characters or length is zero then return KErrCorrupt |
|
140 * @param aSsString Original string is received from SIM |
|
141 * @return value: KErrNone or KErrCorrupt |
|
142 */ |
|
143 TInt CheckSsStringValidity( TPtrC8 aSsString ); |
|
144 |
|
145 |
|
146 private: // Data |
|
147 |
|
148 // Send Ss package store. Package received from ETel |
|
149 RSat::TSendSsV1Pckg* iSendSsV1Pckg; |
|
150 |
|
151 // Requested response format |
|
152 TUint8 iRequestedRspFormat; |
|
153 |
|
154 // Pointer to the notifications tsy class |
|
155 CSatNotificationsTsy* iNotificationsTsy; |
|
156 }; |
|
157 |
|
158 |
|
159 #endif // CSATNOTIFYSENDSS_H |