|
1 /* |
|
2 * Copyright (c) 2006 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: Interface MCatalogsAccessPointManager declation |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_CATALOGSACCESSPOINTMANAGER_H |
|
20 #define M_CATALOGSACCESSPOINTMANAGER_H |
|
21 |
|
22 class CCatalogsAccessPoint; |
|
23 class MNcdConfigurationProtocolDetail; |
|
24 class MNcdConfigurationProtocolClientConfiguration; |
|
25 class CNcdNodeIdentifier; |
|
26 class CNcdKeyValuePair; |
|
27 |
|
28 class MCatalogsAccessPointManager |
|
29 { |
|
30 public: |
|
31 enum TAction |
|
32 { |
|
33 EDownload, |
|
34 EBrowse, |
|
35 EPurchase, |
|
36 }; |
|
37 |
|
38 /** |
|
39 * Virtual destructor. |
|
40 */ |
|
41 virtual ~MCatalogsAccessPointManager() |
|
42 { |
|
43 } |
|
44 |
|
45 /** |
|
46 * Sets fixed access point. If fixed access point is set, it is created to |
|
47 * commsDB and always used. That is, when AccessPointIdL is called, it will always |
|
48 * return the fixed AP, if it is set with this function. |
|
49 * |
|
50 * @param aApDetails Details of the access point. Key-value pairs are AP properties |
|
51 * where key is the name of the property and value is its value. |
|
52 */ |
|
53 virtual void SetFixedApL( const RPointerArray<CNcdKeyValuePair>& aApDetails ) = 0; |
|
54 |
|
55 /** |
|
56 * Gets fixed accesspoint. |
|
57 * |
|
58 * @param aAccessPointId ID of the fixed accesspoint. Value is unchanged if fixed accesspoint is not set. |
|
59 * @leave Symbian error code |
|
60 */ |
|
61 virtual void GetFixedApL( TUint32& aAccessPointId ) = 0; |
|
62 |
|
63 /** |
|
64 * Parses the client configuration details and creates the access points to |
|
65 * commsDB if it is missing them. Also parses the contentSources section and |
|
66 * maps download, browse and purchase access points to correct namespaces. |
|
67 * |
|
68 * @param aConfiguration The client configuration response. |
|
69 * @param aClientUid The client UID. |
|
70 * @param aIgnoreFixedAp If true, accesspoint data is parsed even if fixed |
|
71 * accesspoint was set |
|
72 * @param aCreatedAps If a pointer is given then ids of created accesspoints are |
|
73 * added to it. Ownership is NOT transferred |
|
74 */ |
|
75 virtual void ParseAccessPointDataFromClientConfL( |
|
76 const MNcdConfigurationProtocolClientConfiguration& aConfiguration, |
|
77 const TUid& aClientUid, |
|
78 TBool aIgnoreFixedAp = EFalse, |
|
79 RArray<TUint32>* aCreatedAps = NULL ) = 0; |
|
80 |
|
81 /** |
|
82 * Get accesspoint's id in comms database. Method also validates that |
|
83 * correct accesspoint settings exists in the commsdatabase. |
|
84 * So for example if accesspoint has been removed from the commsdatabase |
|
85 * it is created again based on the correct settings. |
|
86 * |
|
87 * @param aNameSpace The namespace of content source. |
|
88 * @param aAction The action. |
|
89 * @param aClientUid The UID of the client. |
|
90 * @param aAccessPointId Id of the accesspoint in the comms database |
|
91 * @return Error code, KErrNotFound if the access point is undefined. |
|
92 */ |
|
93 virtual TInt AccessPointIdL( |
|
94 const TDesC& aNameSpace, |
|
95 const MCatalogsAccessPointManager::TAction& aAction, |
|
96 const TUid& aClientUid, |
|
97 TUint32& aAccessPointId) = 0; |
|
98 |
|
99 |
|
100 /** |
|
101 * Get accesspoint's id in comms database. Method also validates that |
|
102 * correct accesspoint settings exists in the commsdatabase. |
|
103 * So for example if accesspoint has been removed from the commsdatabase |
|
104 * it is created again based on the correct settings. |
|
105 * |
|
106 * @param aNameSpace The namespace of content source. |
|
107 * @param aCatalogId Id of the catalog. |
|
108 * @param aAction The action. |
|
109 * @param aClientUid The UID of the client. |
|
110 * @param aAccessPointId Id of the accesspoint in the comms database |
|
111 * @return Error code, KErrNotFound if the access point is undefined. |
|
112 */ |
|
113 virtual TInt AccessPointIdL( |
|
114 const TDesC& aNameSpace, |
|
115 const TDesC& aCatalogId, |
|
116 const MCatalogsAccessPointManager::TAction& aAction, |
|
117 const TUid& aClientUid, |
|
118 TUint32& aAccessPointId) = 0; |
|
119 |
|
120 /** |
|
121 * Get accesspoint's id in comms database. Method also validates that |
|
122 * correct accesspoint settings exists in the commsdatabase. |
|
123 * So for example if accesspoint has been removed from the commsdatabase |
|
124 * it is created again based on the correct settings. |
|
125 * NOTE! The function leaves if the node with the given identifier does not exist. |
|
126 * |
|
127 * @param aNodeIdentifier The node identifier. |
|
128 * @param aAction The action. |
|
129 * @param aClientUid The UID of the client. |
|
130 * @param aAccessPointId Id of the accesspoint in the comms database |
|
131 * @return Error code, KErrNotFound if the access point is undefined. |
|
132 */ |
|
133 virtual TInt AccessPointIdL( |
|
134 const CNcdNodeIdentifier& aNodeIdentifier, |
|
135 const MCatalogsAccessPointManager::TAction& aAction, const TUid& aClientUid, |
|
136 TUint32& aAccessPointId) = 0; |
|
137 |
|
138 }; |
|
139 |
|
140 #endif |