|
1 // Copyright (c) 2007-2010 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 // Media interface base class |
|
15 // |
|
16 |
|
17 #ifndef __TRACECOREMEDIAIF_H__ |
|
18 #define __TRACECOREMEDIAIF_H__ |
|
19 |
|
20 |
|
21 // Include files |
|
22 #include <kernel/kernel.h> |
|
23 |
|
24 |
|
25 // Forward declarations |
|
26 class MTraceCoreMediaIfCallback; |
|
27 class TTraceMessage; |
|
28 |
|
29 /** |
|
30 * Flag, which tells that this interface supports the Send function |
|
31 */ |
|
32 const TUint32 KMediaIfSendSupported = 0x01; |
|
33 |
|
34 /** |
|
35 * Flag, which tells that this interface supports the SendTrace function |
|
36 */ |
|
37 const TUint32 KMediaIfSendTraceSupported = 0x02; |
|
38 |
|
39 /** |
|
40 * Flag for the plug-in interface |
|
41 */ |
|
42 const TUint32 KMediaIfPluginSupported = 0x04; |
|
43 |
|
44 |
|
45 /** |
|
46 * Media interface base class |
|
47 */ |
|
48 NONSHARABLE_CLASS( DTraceCoreMediaIf ) : public DBase |
|
49 { |
|
50 public: |
|
51 |
|
52 /** |
|
53 * Constructor |
|
54 * |
|
55 * @param aFlags the media flags |
|
56 */ |
|
57 DTraceCoreMediaIf( TUint32 aFlags ); |
|
58 |
|
59 /** |
|
60 * Initializes this interface |
|
61 * |
|
62 * @param aCallback Callback interface which is notified when ISI messages are received |
|
63 */ |
|
64 virtual TInt Init( MTraceCoreMediaIfCallback& aCallback ) = 0; |
|
65 |
|
66 /** |
|
67 * Gets the properties of this interface |
|
68 */ |
|
69 inline TUint32 GetFlags(); |
|
70 |
|
71 /** |
|
72 * Sends a message |
|
73 * |
|
74 * @param aMsg The message to be sent |
|
75 */ |
|
76 virtual TInt Send( TTraceMessage& aMsg ); |
|
77 |
|
78 /** |
|
79 * Sends a trace |
|
80 * |
|
81 * @param aMsg The trace to be sent |
|
82 */ |
|
83 virtual TInt SendTrace( const TDesC8& aMsg ); |
|
84 |
|
85 protected: |
|
86 |
|
87 /** |
|
88 * Callback to TraceCore |
|
89 */ |
|
90 MTraceCoreMediaIfCallback* iCallback; |
|
91 |
|
92 private: |
|
93 |
|
94 /** |
|
95 * Media properties |
|
96 */ |
|
97 TUint32 iFlags; |
|
98 }; |
|
99 |
|
100 #endif // __TRACECOREISAIF_H__ |
|
101 |
|
102 #include "TraceCoreMediaIf.inl" |
|
103 |
|
104 // End of File |