|
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: MNcdProtocolDefaultObserverImpl declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CNCDPROTOCOLDEFAULTOBSERVER_H |
|
20 #define CNCDPROTOCOLDEFAULTOBSERVER_H |
|
21 |
|
22 #include "ncdprotocoldefaultobserver.h" |
|
23 |
|
24 class MCatalogsContext; |
|
25 class MNcdConfigurationManager; |
|
26 class CNcdSubscriptionManager; |
|
27 |
|
28 class CNcdProtocolDefaultObserver : public CBase, |
|
29 public MNcdProtocolDefaultObserver |
|
30 { |
|
31 public: |
|
32 /** |
|
33 * |
|
34 * parameters needed, at least: |
|
35 * - context |
|
36 * - conf manager: client spesific config, provider global config |
|
37 * - cookie handler: cookies from config protocol |
|
38 */ |
|
39 static CNcdProtocolDefaultObserver* NewL( |
|
40 MCatalogsContext& aContext, |
|
41 MNcdConfigurationManager& aConfigurationManager, |
|
42 CNcdSubscriptionManager& aSubscriptionManager, |
|
43 const TDesC& aServerUri ); |
|
44 /** |
|
45 * |
|
46 */ |
|
47 ~CNcdProtocolDefaultObserver(); |
|
48 |
|
49 |
|
50 public: // New methods |
|
51 |
|
52 const MCatalogsContext& Context() const; |
|
53 |
|
54 private: |
|
55 /** |
|
56 * Constructor |
|
57 */ |
|
58 CNcdProtocolDefaultObserver( MCatalogsContext& aContext, |
|
59 MNcdConfigurationManager& aConfigurationManager, |
|
60 CNcdSubscriptionManager& aSubscriptionManager ); |
|
61 /** |
|
62 * Constructor |
|
63 */ |
|
64 void ConstructL( const TDesC& aServerUri ); |
|
65 |
|
66 private: // From MNcdProtocolDefaultObserver |
|
67 |
|
68 private: |
|
69 // From MNcdParserConfigurationProtocolObserver |
|
70 |
|
71 void ConfigurationBeginL( const TDesC& version, |
|
72 TInt expirationdelta ); |
|
73 void ConfigurationQueryL( MNcdConfigurationProtocolQuery* aQuery ); |
|
74 void ClientConfigurationL( |
|
75 MNcdConfigurationProtocolClientConfiguration* aConfiguration ); |
|
76 void ConfigurationDetailsL( |
|
77 CArrayPtr<MNcdConfigurationProtocolDetail>* aDetails ); |
|
78 void ConfigurationActionRequestL( |
|
79 MNcdConfigurationProtocolActionRequest* aActionRequest ); |
|
80 void ConfigurationServerDetailsL( MNcdConfigurationProtocolServerDetails* aServerDetails ); |
|
81 void ConfigurationErrorL( MNcdConfigurationProtocolError* aError ); |
|
82 void ConfigurationEndL(); |
|
83 |
|
84 // From MNcdParserInformationObserver |
|
85 void InformationL( MNcdPreminetProtocolInformation* aData ); |
|
86 |
|
87 // From MNcdParserDataBlocksObserver |
|
88 void DataBlocksL( CArrayPtr<MNcdPreminetProtocolDataBlock>* aData ); |
|
89 |
|
90 // From MNcdParserErrorObserver |
|
91 void ErrorL( MNcdPreminetProtocolError* aData ); |
|
92 |
|
93 // From MNCdParserQueryObserver |
|
94 void QueryL( MNcdConfigurationProtocolQuery* aData ); |
|
95 |
|
96 // From MNcdParserSubscriptionObserver |
|
97 virtual void ValidSubscriptionL( |
|
98 MNcdPreminetProtocolSubscription* aData ); |
|
99 virtual void OldSubscriptionL( |
|
100 MNcdPreminetProtocolSubscription* aData ); |
|
101 |
|
102 |
|
103 |
|
104 private: // data |
|
105 |
|
106 MCatalogsContext& iContext; |
|
107 MNcdConfigurationManager& iConfigurationManager; |
|
108 CNcdSubscriptionManager& iSubscriptionManager; |
|
109 HBufC* iServerUri; |
|
110 }; |
|
111 |
|
112 #endif |
|
113 |