diff -r 14dc2103a631 -r ed1c9f64298a trace/tracebuilder/com.nokia.tracebuilder/src/com/nokia/tracebuilder/plugin/TraceAPIFormatter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/trace/tracebuilder/com.nokia.tracebuilder/src/com/nokia/tracebuilder/plugin/TraceAPIFormatter.java Wed Jun 23 14:35:40 2010 +0300 @@ -0,0 +1,102 @@ +/* +* Copyright (c) 2007 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +* Trace API formatter plug-in +* +*/ +package com.nokia.tracebuilder.plugin; + +/** + * Trace API formatter plug-in + * + */ +public interface TraceAPIFormatter { + + /** + * Formatting types for traces + * + */ + public enum TraceFormatType { + + /** + * Format for normal trace which does not need extension function + */ + NORMAL_TRACE, + + /** + * Format for calling an extension function from source file + */ + COMPLEX_TRACE, + + /** + * Format for extension function header + */ + HEADER, + + /** + * Format for trace buffer function. Added to extension function + * definition if trace contains more data than is supported by the API + */ + TRACE_BUFFER, + + /** + * Format for trace function if the extension function parameters can be + * packed into normal trace API call. For example, if the extension + * function takes 4 8-bit arguments, they are packed into a single + * 32-bit parameter + */ + TRACE_PACKED, + + /** + * Format for trace activation check function. Added to extension + * function definition + */ + TRACE_ACTIVATION, + + /** + * Empty declaration for an extension function header + */ + EMPTY_MACRO, + + /** + * Include that is added to source + */ + INCLUDE_FORMAT + } + + /** + * Gets the name of this formatter + * + * @return the name + */ + public String getName(); + + /** + * Gets the title shown in the API selection preferences dialog + * + * @return the title + */ + public String getTitle(); + + /** + * Gets the trace format based on format type + * + * @param type + * the format type + * @return the trace format + */ + public String getTraceFormat(TraceFormatType type); + +}