|
1 /* |
|
2 * Copyright (c) 2003 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: Interface for getting read access to history files |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __MCALOGGERREADINTERFACE_H__ |
|
20 #define __MCALOGGERREADINTERFACE_H__ |
|
21 |
|
22 // FORWARD CLASS DECLERATIONS |
|
23 |
|
24 class MCALoggerMessageFactory; |
|
25 class MCALoggerMessageHeader; |
|
26 class MCALoggerMessage; |
|
27 |
|
28 // CLASS DECLARATION |
|
29 |
|
30 /** |
|
31 * Interface for getting read access to history files |
|
32 * |
|
33 * @lib CALogger.dll |
|
34 * @since 2.1 |
|
35 */ |
|
36 class MCALoggerReadInterface |
|
37 { |
|
38 |
|
39 protected: |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 virtual ~MCALoggerReadInterface() {}; |
|
45 |
|
46 public: // Interface |
|
47 |
|
48 /** |
|
49 * Client gets pointer to message header array trough parameter. |
|
50 * @since 2.1 |
|
51 * @param aHeaderArray Pointer to message header array is set to this |
|
52 * parameter. Ownership of array does not change. |
|
53 */ |
|
54 virtual void GetLoggerMessageHeaderArray( |
|
55 RPointerArray< MCALoggerMessageHeader >*& aHeaderArray ) = 0; |
|
56 |
|
57 /** |
|
58 * Client asks logger to create messages to array concerning one header |
|
59 * Leaves with KErrNotFound if history file does not exists. |
|
60 * Leaves if history file read fails. |
|
61 * @since 2.1 |
|
62 * @param aMessageArray Client provides array for messages read from |
|
63 * file. Messages are appended to array. |
|
64 * @param aKey File to be read is recognized by header. Pointer to |
|
65 * aKey reference is used for task. |
|
66 */ |
|
67 virtual void CreateLoggerMessagesL( |
|
68 RPointerArray< MCALoggerMessage >& aMessageArray, |
|
69 MCALoggerMessageHeader& aKey ) = 0; |
|
70 |
|
71 /** |
|
72 * Delete one history file recognized by header. |
|
73 * Leaves if MCALoggerMessageHeader::FileNameL fails. |
|
74 * WARNING: header passed will be deleted and removed from header |
|
75 * array. Array is same that client has been given to with |
|
76 * GetLoggerMessageHeaderArray so removal will be seen directly in |
|
77 * client side too. |
|
78 * @since 2.1 |
|
79 * @param aKey File to be read is recognized by header. Pointer to |
|
80 * aKey reference is used for task. |
|
81 */ |
|
82 virtual void DeleteHistoryFileL( MCALoggerMessageHeader& aKey ) = 0; |
|
83 |
|
84 /** |
|
85 * Set message factory. Factory is used to create messages and message |
|
86 * headers for logger and client use. |
|
87 * @since 2.1 |
|
88 * @param aMessageFactory Pointer to message factory. Pass NULL to |
|
89 * reset messageFactory. |
|
90 */ |
|
91 virtual void SetLoggerMessageFactory( |
|
92 MCALoggerMessageFactory* aMessageFactory ) = 0; |
|
93 }; |
|
94 |
|
95 #endif // __MCALOGGERREADINTERFACE_H__ |
|
96 |
|
97 // End of File |