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