|
1 /* |
|
2 * Copyright (c) 2004 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: Defines an abstract class CNcnMsvSessionObserverBase. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 #ifndef NCNMSVSESSIONOBSERVERBASE_H |
|
21 #define NCNMSVSESSIONOBSERVERBASE_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <msvapi.h> // MsvSession class |
|
25 #include "MNcnMsvSessionHandlerObserver.h" |
|
26 |
|
27 // CONSTANTS |
|
28 const TUid KNcnSmsUid = { 0x1000102c }; |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 class CNcnModelBase; |
|
32 class CMsvSession; |
|
33 class CNcnHandlerAudio; |
|
34 class TVwsViewId; |
|
35 class CNcnNotifApiObserver; |
|
36 class CNcnMsvSessionHandler; |
|
37 class CVoiceMailManager; |
|
38 |
|
39 // CLASS DECLARATION |
|
40 |
|
41 /** |
|
42 * Receives and handles In-box events. |
|
43 */ |
|
44 class CNcnMsvSessionObserverBase : |
|
45 public CBase, public MMsvEntryObserver, |
|
46 public MNcnMsvSessionHandlerObserver |
|
47 { |
|
48 public: // Constructors and destructor |
|
49 |
|
50 /** |
|
51 * Class factory. |
|
52 */ |
|
53 static CNcnMsvSessionObserverBase* NewL( |
|
54 CNcnModelBase* aModel, CVoiceMailManager& aVMManager ); |
|
55 |
|
56 /** |
|
57 * Destructor. |
|
58 */ |
|
59 virtual ~CNcnMsvSessionObserverBase(); |
|
60 |
|
61 |
|
62 public: // From MNcnMsvSessionHandlerObserver |
|
63 |
|
64 virtual void HandleMsvSessionReadyL( CMsvSession& aMsvSession ); |
|
65 virtual void HandleMsvSessionClosedL(); |
|
66 |
|
67 public: // Functions from base classes |
|
68 |
|
69 /** |
|
70 * From MMsvEntryObserver. Callback function. Handles global In-box |
|
71 * events. This is a pure virtual function must be implemented in |
|
72 * protocol specific subclasses. |
|
73 * @param aEvent An entry event. |
|
74 */ |
|
75 virtual void HandleEntryEventL( |
|
76 TMsvEntryEvent aEvent, |
|
77 TAny* aArg1, |
|
78 TAny* aArg2, |
|
79 TAny* aArg3 ) = 0; |
|
80 |
|
81 protected: |
|
82 |
|
83 /** |
|
84 * C++ default constructor. |
|
85 */ |
|
86 CNcnMsvSessionObserverBase( |
|
87 CNcnModelBase* aModel ); |
|
88 |
|
89 /** |
|
90 * By default Symbian OS constructor is private. |
|
91 */ |
|
92 virtual void ConstructL(); |
|
93 |
|
94 /** |
|
95 * Checks the amount of unread messages in the global In-box. |
|
96 * This is a pure virtual function must be implemented in protocol specific subclasses. |
|
97 */ |
|
98 virtual void CheckAmountOfUnreadMessagesInInboxL( TInt& aMsgCount, TInt& aAudioMsgCount ) = 0; |
|
99 |
|
100 protected: //data |
|
101 |
|
102 // A pointer to the event monitor object. |
|
103 CNcnModelBase* iModel; |
|
104 |
|
105 // In-box folder entry. Note that the entry is not owned by this class. |
|
106 CMsvEntry* iInboxFolder; |
|
107 |
|
108 }; |
|
109 |
|
110 #endif // NCNMSVSESSIONOBSERVERBASE_H |
|
111 |
|
112 // End of File |