|
1 /* |
|
2 * Copyright (c) 2006-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 the License "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: Header file for logging SAPI core implementation. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef LOGGINGSERVICEHANDLER_H |
|
20 #define LOGGINGSERVICEHANDLER_H |
|
21 |
|
22 |
|
23 #include <liwserviceifbase.h> |
|
24 #include <liwCommon.h> |
|
25 |
|
26 /** |
|
27 * InterfaceName ILogging |
|
28 * Contenttypes Service.Logging |
|
29 */ |
|
30 |
|
31 _LIT8(KDsInterfaceName , "IDataSource") ; |
|
32 _LIT8(KLoggingContents , "Service.Logging") ; |
|
33 |
|
34 /** |
|
35 * A const member which holds max supported to be stored as part of |
|
36 * iPositionGeneric member of class CLogServiceHandler |
|
37 */ |
|
38 const TUint KMaxFields = 25 ; |
|
39 |
|
40 /** |
|
41 * This is the service interface to access logging base service provider |
|
42 * this class is inherited from CLiwServiceIfBase class |
|
43 * |
|
44 * @lib ServiceHandler.lib depenedncy |
|
45 * @see CLiwServiceIfBase in liwserviceifbase.h file |
|
46 * |
|
47 */ |
|
48 class CLogServiceHandler : public CLiwServiceIfBase |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * NewL: Two phased construction |
|
54 */ |
|
55 IMPORT_C static CLogServiceHandler* NewL(); |
|
56 |
|
57 /** |
|
58 * NewLC: Creates an instance of CLoggingServiceClass |
|
59 * Two Phased constructor |
|
60 * returns newly allocated object. |
|
61 */ |
|
62 static CLogServiceHandler* NewLC() ; |
|
63 |
|
64 /** |
|
65 * Default destruct |
|
66 */ |
|
67 virtual ~CLogServiceHandler(); |
|
68 |
|
69 /** |
|
70 * Called by the AIW framework to initialise provider with necessary information |
|
71 * from the Service Handler. This method is called when the consumer makes |
|
72 * the attach operation. |
|
73 * |
|
74 * @param aFrameworkCallback callback handle function |
|
75 * @param aInterest consumer application's intrest |
|
76 */ |
|
77 virtual void InitialiseL( MLiwNotifyCallback& aFrameworkCallback, |
|
78 const RCriteriaArray& aInterest ); |
|
79 |
|
80 /** |
|
81 * Executes generic service commands included in criteria, derived from CLiwServiceIfBase |
|
82 * |
|
83 * @param aCmdId Command to be executed. |
|
84 * @param aInParamList Input parameters, can be an empty list. |
|
85 * @param aOutParamList Output parameters, can be an empty list. |
|
86 * @param aCmdOptions Options for the command, see KLiwOpt* in LiwCommon.hrh. |
|
87 * @param aCallback Callback for asynchronous command handling, parameter checking, etc. |
|
88 * |
|
89 */ |
|
90 virtual void HandleServiceCmdL( const TInt& aCmdId, |
|
91 const CLiwGenericParamList& aInParamList, |
|
92 CLiwGenericParamList& aOutParamList, |
|
93 TUint aCmdOptions = 0, |
|
94 const MLiwNotifyCallback* aCallback = NULL); |
|
95 |
|
96 protected: |
|
97 |
|
98 /** |
|
99 * default constructor |
|
100 */ |
|
101 |
|
102 CLogServiceHandler(); |
|
103 |
|
104 /** |
|
105 * Internal CmdExecute function which parses the input parameters |
|
106 * this function is called by HandleCmdL() function |
|
107 * |
|
108 * @param aCmdId Command to be executed. |
|
109 * @param aInParamList Input parameters, can be an empty list. |
|
110 * @param aOutParamList Output parameters, can be an empty list. |
|
111 * @param aCmdOptions Options for the command, see KLiwOpt* in LiwCommon.hrh. |
|
112 * @param aCallback Callback for asynchronous command handling, parameter checking, etc. |
|
113 * @leave KErrArgument Callback is missing when required. |
|
114 * @leave KErrNotSupported No provider supports service. |
|
115 * |
|
116 */ |
|
117 void CmdExecuteL( const TInt& aCmdId, |
|
118 const CLiwGenericParamList& aInParamList, |
|
119 CLiwGenericParamList& aOutParamList, |
|
120 TUint aCmdOptions , |
|
121 const MLiwNotifyCallback* aCallback ); |
|
122 |
|
123 private: |
|
124 |
|
125 TBuf8<KMaxFields> iContentType; |
|
126 |
|
127 }; |
|
128 |
|
129 |
|
130 |
|
131 #endif //LOGGINGSERVICEHANDLER_H |