|
1 /* |
|
2 * Copyright (c) 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 "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: |
|
15 * |
|
16 * Trace API formatter plug-in |
|
17 * |
|
18 */ |
|
19 package com.nokia.tracecompiler.plugin; |
|
20 |
|
21 /** |
|
22 * Trace API formatter plug-in |
|
23 * |
|
24 */ |
|
25 public interface TraceAPIFormatter { |
|
26 |
|
27 /** |
|
28 * Formatting types for traces |
|
29 */ |
|
30 public enum TraceFormatType { |
|
31 |
|
32 /** |
|
33 * Format for extension function header |
|
34 */ |
|
35 HEADER, |
|
36 |
|
37 /** |
|
38 * Format for trace buffer function. Added to extension function |
|
39 * definition if trace contains more data than is supported by the API |
|
40 */ |
|
41 TRACE_BUFFER, |
|
42 |
|
43 /** |
|
44 * Format for trace function if the extension function parameters can be |
|
45 * packed into normal trace API call. For example, if the extension |
|
46 * function takes 4 8-bit arguments, they are packed into a single |
|
47 * 32-bit parameter |
|
48 */ |
|
49 TRACE_PACKED, |
|
50 |
|
51 /** |
|
52 * Format for trace activation check function. Added to extension |
|
53 * function definition |
|
54 */ |
|
55 TRACE_ACTIVATION, |
|
56 |
|
57 /** |
|
58 * Empty declaration for an extension function header |
|
59 */ |
|
60 EMPTY_MACRO |
|
61 } |
|
62 |
|
63 /** |
|
64 * Gets the name of this formatter |
|
65 * |
|
66 * @return the name |
|
67 */ |
|
68 public String getName(); |
|
69 |
|
70 /** |
|
71 * Gets the title shown in the API selection preferences dialog |
|
72 * |
|
73 * @return the title |
|
74 */ |
|
75 public String getTitle(); |
|
76 |
|
77 /** |
|
78 * Gets the trace format based on format type |
|
79 * |
|
80 * @param type |
|
81 * the format type |
|
82 * @return the trace format |
|
83 */ |
|
84 public String getTraceFormat(TraceFormatType type); |
|
85 |
|
86 } |