|
1 /* |
|
2 * Copyright (c) 2007 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: ECom search interface definition |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPRESYNC_PLUGIN_H |
|
20 #define CPRESYNC_PLUGIN_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <s32mem.h> |
|
25 #include <ecom/ecom.h> |
|
26 #include <SyncMLDef.h> |
|
27 |
|
28 /** |
|
29 * CenRep key for storing the roaming setting. |
|
30 * |
|
31 * |
|
32 * Possible integer values: |
|
33 * |
|
34 * 0 Always Ask |
|
35 * 1 Always Allow |
|
36 * 2 Never Allow |
|
37 * 3 Block |
|
38 * Default value: 0 (Always Ask) |
|
39 * |
|
40 */ |
|
41 const TUint32 KNSmlRoamingSettingKey = 0x00000005; |
|
42 |
|
43 /** |
|
44 * CenRep key for storing the roaming setting feature. |
|
45 * |
|
46 * |
|
47 * Possible integer values: |
|
48 * |
|
49 * 0 Feature disabled |
|
50 * 1 Feature enabled |
|
51 * |
|
52 */ |
|
53 const TUint32 KNSmlDSRoamingFeature = 0x00000006; |
|
54 |
|
55 |
|
56 /** |
|
57 * Constant: KPreSyncPluginInterfaceUid |
|
58 * |
|
59 * Description: UID of this ECOM interface. |
|
60 */ |
|
61 const TUid KPreSyncPluginInterfaceUid = {0x2001955C}; |
|
62 |
|
63 enum TASpRoamingSettingFeature |
|
64 { |
|
65 EAspRoamingSettingFeatureDisabled = 0, |
|
66 EAspRoamingSettingFeatureEnabled = 1 |
|
67 }; |
|
68 |
|
69 /** |
|
70 * Class: MSyncExtObserver |
|
71 * |
|
72 * Description: |
|
73 */ |
|
74 |
|
75 class MSyncExtObserver |
|
76 { |
|
77 public: // Public pure virtual functions. |
|
78 |
|
79 /** |
|
80 * Function: SyncCompleted |
|
81 * |
|
82 */ |
|
83 virtual void SyncCompleted(TInt err) = 0; |
|
84 }; |
|
85 |
|
86 |
|
87 /** |
|
88 * Class: CPreSyncPlugin |
|
89 * |
|
90 * Description: Custom ECOM interface definition. This interface is used by |
|
91 * clients to handle roamong . |
|
92 */ |
|
93 class CPreSyncPlugin: public CBase |
|
94 { |
|
95 public: |
|
96 /** |
|
97 * Function : NewL(TUid aImplementationUid); |
|
98 * Description: Implementation created based on implementation ID |
|
99 */ |
|
100 static CPreSyncPlugin* NewL(TUid aImplementationUid); |
|
101 |
|
102 /** |
|
103 * Function : NewL(const TDesC8& aParam); |
|
104 * Description: Implementation created based Implemetation resolution parameter |
|
105 */ |
|
106 static CPreSyncPlugin* NewL(const TDesC8& aParam); |
|
107 |
|
108 |
|
109 /** |
|
110 * Function: ~CPreSyncPlugin |
|
111 * |
|
112 * Description: Wraps ECom object destruction. Notifies the ECOM |
|
113 * framework that specific instance is being destroyed. |
|
114 */ |
|
115 virtual ~CPreSyncPlugin(); |
|
116 |
|
117 |
|
118 public: // Public pure virtual functions. |
|
119 |
|
120 /** |
|
121 * Function: IsSupported |
|
122 * |
|
123 */ |
|
124 virtual TBool IsSupported() = 0; |
|
125 |
|
126 /** |
|
127 * Function: CanSync |
|
128 * |
|
129 */ |
|
130 virtual TBool CanSyncL() = 0; |
|
131 |
|
132 /** |
|
133 * Function: SetProfile |
|
134 * |
|
135 */ |
|
136 virtual TBool SetProfile(const TSmlProfileId& aProfileId) = 0; |
|
137 |
|
138 /** |
|
139 * Function: SyncNow |
|
140 * |
|
141 */ |
|
142 virtual TInt SyncNow(MSyncExtObserver* aObserver) = 0 ; |
|
143 |
|
144 public: |
|
145 |
|
146 /** iDtor_ID_Key Instance identifier key. When instance of an |
|
147 * implementation is created by ECOM framework, the |
|
148 * framework will assign UID for it. The UID is used in |
|
149 * destructor to notify framework that this instance is |
|
150 * being destroyed and resources can be released. |
|
151 */ |
|
152 TUid iDtor_ID_Key; |
|
153 |
|
154 |
|
155 }; |
|
156 |
|
157 #include "CPreSyncPlugin.inl" // Own base implementations for ECOM |
|
158 |
|
159 #endif // CPCS_PLUGIN_H |
|
160 |
|
161 // End of File |
|
162 |