|
1 /* |
|
2 * Copyright (c) 2003 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: The observer class for monitoring SIP profiles. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MSIPPROFILEREGISTRYOBSERVER_H |
|
20 #define MSIPPROFILEREGISTRYOBSERVER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include "musavasipprofileregistryobserver.h" |
|
24 #include "musunittesting.h" |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <e32std.h> |
|
28 #include <sipprofileregistryobserver.h> |
|
29 |
|
30 // FORWARD DECLARATIONS |
|
31 |
|
32 class MMusAvaSipProfileRegistryAdapter; |
|
33 |
|
34 // CLASS DECLARATION |
|
35 /** |
|
36 * @publishedAll |
|
37 * @released |
|
38 * |
|
39 * The observer class for monitoring SIP profiles. |
|
40 * Class must be implemented by the user in order to |
|
41 * observe changes in the SIP profiles. |
|
42 */ |
|
43 class CMusAvaSipProfileRegistryObserver : public CBase, |
|
44 public MSIPProfileRegistryObserver |
|
45 |
|
46 { |
|
47 public: |
|
48 |
|
49 /** |
|
50 * |
|
51 **/ |
|
52 static CMusAvaSipProfileRegistryObserver* NewL(); |
|
53 |
|
54 /** |
|
55 * |
|
56 **/ |
|
57 ~CMusAvaSipProfileRegistryObserver(); |
|
58 |
|
59 public: |
|
60 |
|
61 /** |
|
62 * |
|
63 **/ |
|
64 void AddAdapterL( MMusAvaSipProfileRegistryAdapter& aAdapter ); |
|
65 |
|
66 /** |
|
67 * |
|
68 **/ |
|
69 void RemoveAdapter( MMusAvaSipProfileRegistryAdapter& aAdapter ); |
|
70 |
|
71 public: // from MSIPProfileRegistryObserver |
|
72 |
|
73 /** |
|
74 * An event related to SIP Profile has accorred |
|
75 * @param aProfileId a profile Id |
|
76 * @param aEvent an occurred event |
|
77 **/ |
|
78 void ProfileRegistryEventOccurred(TUint32 aProfileId, |
|
79 TEvent aEvent); |
|
80 |
|
81 /** |
|
82 * An asynchronous error has occurred related to SIP profile |
|
83 * Event is send to those observers, who have the |
|
84 * corresponding profile instantiated. |
|
85 * @param aProfileId the id of failed profile |
|
86 * @param aError an occurred error |
|
87 */ |
|
88 void ProfileRegistryErrorOccurred(TUint32 aProfileId, |
|
89 TInt aError); |
|
90 |
|
91 private: |
|
92 |
|
93 /** |
|
94 * |
|
95 **/ |
|
96 CMusAvaSipProfileRegistryObserver(); |
|
97 |
|
98 private: |
|
99 |
|
100 MMusAvaSipProfileRegistryAdapter* iAdapter; |
|
101 |
|
102 MUS_UNITTEST( UT_CMusAvaSipProfileRegistryObserver ) |
|
103 }; |
|
104 |
|
105 #endif // MSIPPROFILEREGISTRYOBSERVER_H |