|
1 // Copyright (c) 2007-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 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 |
|
23 #ifndef MSYNCCISUPPORT_H |
|
24 #define MSYNCCISUPPORT_H |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <a3f/a3fbase.h> |
|
28 |
|
29 const TUid KUidExtensionInferface = { 0x1028348B }; |
|
30 |
|
31 /** |
|
32 * An interface to get notifications from Custom Interface state change. |
|
33 */ |
|
34 class MCustomInterfaceSupportObserver |
|
35 { |
|
36 public: |
|
37 /* * |
|
38 * Called to state that CI is being removed use depends on which type of CI is involved. |
|
39 * @param aUid the Uid of the CI. |
|
40 * |
|
41 * @param aPtr on returns contains a pointer to the CI. |
|
42 */ |
|
43 virtual void CustomInterfaceRemoval(TUid aInterfaceUid, TAny* aPtr) = 0; |
|
44 }; |
|
45 |
|
46 |
|
47 /** |
|
48 * An interface to get Custom Interface. |
|
49 */ |
|
50 class MCustomInterfaceSupport |
|
51 { |
|
52 public: |
|
53 /** |
|
54 * Request custom interface associated with aUid. |
|
55 * Whether multiple calls returns the same pointer and/or |
|
56 * ownership is transferred depends on the specific uid. |
|
57 * |
|
58 * @param aUid the Uid of the CI . |
|
59 * @param aPtr on returns contains a pointer to the CI. |
|
60 */ |
|
61 virtual TInt RequestCustomInterface(TUid aUid, TAny*& aPtr) = 0; |
|
62 |
|
63 /** |
|
64 * Registers an interface support observer. |
|
65 * |
|
66 * The observer will be notified when the custom interface has been removed . |
|
67 * |
|
68 * @param aObserver the observer reference to register. |
|
69 * @return An error code. KErrNone on success, otherwise one of the system wide error codes. |
|
70 */ |
|
71 virtual TInt RegisterObserver(MCustomInterfaceSupportObserver& aObserver) = 0; |
|
72 |
|
73 /** |
|
74 * Unregisters an interface support observer. |
|
75 * |
|
76 * @param aObserver the observer reference to unregister. |
|
77 * @return An error code. KErrNone on success, otherwise one of the system wide error codes. |
|
78 */ |
|
79 virtual void UnRegisterObserver(MCustomInterfaceSupportObserver& aObserver) = 0; |
|
80 }; |
|
81 |
|
82 #endif // MSYNCCISUPPORT_H |