|
1 // Copyright (c) 2001-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 @warning : This file contains Rose Model ID comments - please do not delete |
|
19 */ |
|
20 |
|
21 #ifndef __MHTTPFILTERBASE_H__ |
|
22 #define __MHTTPFILTERBASE_H__ |
|
23 |
|
24 // System includes |
|
25 #include <e32std.h> |
|
26 |
|
27 // Forward declarations |
|
28 class RHTTPTransaction; |
|
29 class THTTPEvent; |
|
30 class THTTPSessionEvent; |
|
31 |
|
32 |
|
33 //##ModelId=3A914DF9034F |
|
34 class MHTTPFilterBase |
|
35 /** |
|
36 A HTTP Filter. This is the base class for normal filters |
|
37 (MHTTPFilter) which adds an unload function, and |
|
38 MHTTPTransactionCallback, which doesn't add an unload function. |
|
39 @publishedAll |
|
40 @released |
|
41 */ |
|
42 { |
|
43 public: |
|
44 /** Called when the filter's registration conditions are satisfied for events that |
|
45 occur on a transaction. Any Leaves must be handled by the appropriate MHFRunError. |
|
46 Note that this function is not allowed to leave if called with |
|
47 certain events. @see THTTPEvent |
|
48 @param aTransaction The transaction that the event has occurred on. |
|
49 @param aEvent The event that has occurred. |
|
50 */ |
|
51 //##ModelId=3A914DF9035D |
|
52 IMPORT_C virtual void MHFRunL(RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
53 |
|
54 /** Called when the filters registration conditions are satisfied for events that occur |
|
55 on the session. Any leaves must be handled by the appropriate MHFRunError. |
|
56 @param aEvent The session event that has occured. |
|
57 */ |
|
58 //##ModelId=3C4C37D401C1 |
|
59 IMPORT_C virtual void MHFSessionRunL(const THTTPSessionEvent& aEvent); |
|
60 |
|
61 /** Called when RunL leaves from a transaction event. This works in the same |
|
62 way as CActve::RunError; return KErrNone if you have handled the error. |
|
63 If you don't completely handle the error, a panic will occur. |
|
64 @param aError The leave code that RunL left with. |
|
65 @param aTransaction The transaction that was being processed. |
|
66 @param aEvent The Event that was being processed. |
|
67 @return KErrNone if the error has been cancelled or the code |
|
68 of the continuing error otherwise. |
|
69 */ |
|
70 //##ModelId=3A914DF90359 |
|
71 IMPORT_C virtual TInt MHFRunError(TInt aError, RHTTPTransaction aTransaction, const THTTPEvent& aEvent); |
|
72 |
|
73 /** Called when MHFRunL leaves from a session event. This works in the same |
|
74 way as CActve::RunError |
|
75 If you don't completely handle the error, a panic will occur. |
|
76 @param aError The leave code that RunL left with. |
|
77 @param aEvent The Event that was being processed. |
|
78 @return KErrNone if the error has been cancelled or the code |
|
79 of the continuing error otherwise. |
|
80 */ |
|
81 //##ModelId=3C4C37D302C4 |
|
82 IMPORT_C virtual TInt MHFSessionRunError(TInt aError, const THTTPSessionEvent& aEvent); |
|
83 }; |
|
84 |
|
85 |
|
86 #endif // __MHTTPFILTERBASE_H__ |