|
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 : CSatNotifyPlayTone.h |
|
16 * Part of : Common SIM ATK TSY / commonsimatktsy |
|
17 * Specific notifications class |
|
18 * Version : 1.0 |
|
19 * |
|
20 */ |
|
21 |
|
22 |
|
23 |
|
24 #ifndef CSATNOTIFYPLAYTONE_H |
|
25 #define CSATNOTIFYPLAYTONE_H |
|
26 |
|
27 |
|
28 // INCLUDES |
|
29 #include <etelsat.h> |
|
30 #include "MSatNotificationsBase.h" |
|
31 |
|
32 // FORWARD DECLARATIONS |
|
33 class CSatDataPackage; |
|
34 class CSatNotificationsTsy; |
|
35 |
|
36 /** |
|
37 * DESCRIPTION |
|
38 * SAT Play Tone notification class. |
|
39 * Created when client requests to be notified when Play Tone |
|
40 * command arrives from SIM. |
|
41 * |
|
42 * This command instructs the SAT to play an audio tone. |
|
43 * @lib Commonsimatktsy |
|
44 * @since 3.1 |
|
45 */ |
|
46 NONSHARABLE_CLASS ( CSatNotifyPlayTone ) : public CBase, |
|
47 public MSatNotificationsBase |
|
48 { |
|
49 public: // Constructors and destructor |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
54 * return CSatNotifyPlayTone*: created object |
|
55 */ |
|
56 static CSatNotifyPlayTone* NewL( |
|
57 CSatNotificationsTsy* aNotificationsTsy ); |
|
58 |
|
59 /** |
|
60 * C++ Destructor. |
|
61 */ |
|
62 ~CSatNotifyPlayTone(); |
|
63 |
|
64 private: |
|
65 |
|
66 /** |
|
67 * By default C++ constructor is private. |
|
68 * @param aNotificationsTsy: Pointer to NotificationsTsy |
|
69 * @return None |
|
70 */ |
|
71 CSatNotifyPlayTone( CSatNotificationsTsy* aNotificationsTsy ); |
|
72 |
|
73 /** |
|
74 * Class attributes are created in ConstructL. |
|
75 * @param None |
|
76 * @return None |
|
77 */ |
|
78 void ConstructL(); |
|
79 |
|
80 public: // Functions from base classes |
|
81 |
|
82 /** |
|
83 * Play Tone Notification request received from client |
|
84 * @param aTsyReqHandle: request handle from ETel |
|
85 * @param aPackage: Packed data |
|
86 * @return KErrNone |
|
87 */ |
|
88 TInt Notify( const TTsyReqHandle aTsyReqHandle, |
|
89 const TDataPackage& aPackage ); |
|
90 |
|
91 /** |
|
92 * Cancels notification request for Play Tone. |
|
93 * @param aReqHandle notify request handle |
|
94 * @return KErrNone |
|
95 */ |
|
96 TInt CancelNotification( const TTsyReqHandle aReqHandle ); |
|
97 |
|
98 /** |
|
99 * Completes Play Tone message to client |
|
100 * @param aDataPackage: Packaged return data |
|
101 * @param aErrorCode: Possible error code |
|
102 * @return KErrNone/ KErrCorrupt |
|
103 */ |
|
104 TInt CompleteNotifyL( CSatDataPackage* aDataPackage, TInt aErrorCode ); |
|
105 |
|
106 /** |
|
107 * From CSatNotificationsBase handles Play Tone terminal response |
|
108 * coming from client. |
|
109 * @param aRsp: Response structure |
|
110 * @return KErrNone/ KErrCorrupt |
|
111 */ |
|
112 TInt TerminalResponseL( TDes8* aRsp ); |
|
113 |
|
114 public: // New functions |
|
115 |
|
116 /** |
|
117 * Create notification specific terminal response data |
|
118 * @param aPCmdNumber: Proactive command number |
|
119 * @param aGeneralResult: Result of the proactive command |
|
120 * @param aAdditionalInfo: Additional info for terminal response |
|
121 * @return Success/Failure value |
|
122 */ |
|
123 TInt CreateTerminalRespL( TUint8 aPCmdNumber, TUint8 aGeneralResult, |
|
124 TDesC16& aAdditionalInfo ); |
|
125 |
|
126 private: // Data |
|
127 |
|
128 // Play Tone package store. Package allocated |
|
129 // in this class and received from ETel |
|
130 RSat::TPlayToneV2Pckg* iPlayToneV2Pckg; |
|
131 // Pointer to the notifications tsy class |
|
132 CSatNotificationsTsy* iNotificationsTsy; |
|
133 }; |
|
134 |
|
135 |
|
136 #endif // CSATNOTIFYPLAYTONE_H |