|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef M_CATALOGSHTTPSESSIONMANAGER_H |
|
20 #define M_CATALOGSHTTPSESSIONMANAGER_H |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 class MCatalogsHttpOperation; |
|
25 class MCatalogsHttpConfig; |
|
26 class CCatalogsHttpConfig; |
|
27 class MCatalogsHttpObserver; |
|
28 class CCatalogsHttpConnectionCreator; |
|
29 class CCatalogsHttpConnectionManager; |
|
30 class CDocumentHandler; |
|
31 |
|
32 class MCatalogsHttpSessionManager |
|
33 { |
|
34 public: |
|
35 |
|
36 virtual void AddRef() = 0; |
|
37 virtual TInt Release() = 0; |
|
38 |
|
39 /** |
|
40 * Starts the operation if there are enough free connections. Otherwise |
|
41 * the operation is queued |
|
42 * @param aOperation The operation |
|
43 * @return |
|
44 */ |
|
45 virtual TInt StartOperation( MCatalogsHttpOperation* aOperation ) = 0; |
|
46 virtual TInt PauseOperation( MCatalogsHttpOperation* aOperation ) = 0; |
|
47 virtual TInt CompleteOperation( MCatalogsHttpOperation* aOperation ) = 0; |
|
48 |
|
49 /** |
|
50 * The operations priority has changed |
|
51 * @param aOperation The operation |
|
52 * @param Symbian error code |
|
53 */ |
|
54 virtual TInt OperationPriorityChanged( MCatalogsHttpOperation* aOperation ) = 0; |
|
55 |
|
56 |
|
57 /** |
|
58 * Connection creator getter |
|
59 * Connection creator is created if necessary |
|
60 */ |
|
61 virtual CCatalogsHttpConnectionCreator& ConnectionCreatorL() = 0; |
|
62 |
|
63 /** |
|
64 * Sets resume mode |
|
65 * If resume mode is true, then an operation is resumed when some operation is canceled. |
|
66 * If resume mode is false, then nothing is resumed when some operation is canceled. |
|
67 * This is used when all operations are canceled at once |
|
68 */ |
|
69 virtual void SetResumeMode( TBool aResumeQueued ) = 0; |
|
70 |
|
71 /** |
|
72 * Document handler getter |
|
73 * @return Document handler instance |
|
74 */ |
|
75 virtual CDocumentHandler& DocumentHandler() = 0; |
|
76 |
|
77 /** |
|
78 * Disconnects network connection if it is not used by any |
|
79 * client anymore |
|
80 * |
|
81 * @return ETrue if the connection was up |
|
82 */ |
|
83 virtual TBool DisconnectL() = 0; |
|
84 |
|
85 protected: |
|
86 |
|
87 virtual ~MCatalogsHttpSessionManager() |
|
88 { |
|
89 } |
|
90 }; |
|
91 |
|
92 |
|
93 #endif // M_CATALOGSHTTPSESSIONMANAGER_H |