|
1 /* |
|
2 * Copyright (c) 2009 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 */ |
|
17 package com.nokia.s60tools.memspy.export; |
|
18 |
|
19 /** |
|
20 * Interface for binding external trace data providers for MemSpy. |
|
21 * Only a single trace data provider instance at a time is supported. |
|
22 * In case more that a single trace data providers are available |
|
23 * the selection among them is undeterministic. |
|
24 */ |
|
25 public interface ITraceProvider { |
|
26 |
|
27 /** |
|
28 * Connects to trace source. |
|
29 * @param traceClient Client to send information about changes in connectivity status and errors etc. |
|
30 * @return <code>true</code> on success, otherwise <code>false</code> |
|
31 */ |
|
32 public boolean connectTraceSource(ITraceClientNotificationsIf traceClient); |
|
33 |
|
34 /** |
|
35 * Disconnects to trace source. |
|
36 */ |
|
37 public void disconnectTraceSource(); |
|
38 |
|
39 /** |
|
40 * Sends current usage context-specific integer data to launcher. |
|
41 * Integer data can contain values that can be expressed with 10 bytes |
|
42 * i.e. only 10 lower bytes are taken into account when setting data. |
|
43 * @param integerData integer data to be sent |
|
44 * @return <code>false</code> if failed to send integer data, otherwise <code>true</code> |
|
45 */ |
|
46 public boolean sendIntData(int integerData); |
|
47 |
|
48 /** |
|
49 * Sends current usage context-specific string message to launcher. |
|
50 * @param stringData string data to send |
|
51 * @return <code>true</code> on success, otherwise <code>false</code> |
|
52 */ |
|
53 boolean sendStringData( String stringData); |
|
54 |
|
55 /** |
|
56 * Activates trace with given group ID. |
|
57 * @param traceGroupID trace group ID |
|
58 * @return <code>true</code> on success, otherwise <code>false</code> |
|
59 */ |
|
60 boolean activateTrace(String traceGroupID); |
|
61 |
|
62 /** |
|
63 * Starts trace data listening |
|
64 * @param dataProcessor data processor that further handles trace data at MemSpy side. |
|
65 * @return <code>true</code> in case data processor is registered properly, otherwise <code>false</code> |
|
66 */ |
|
67 public boolean startListenTraceData(ITraceDataProcessor dataProcessor); |
|
68 |
|
69 /** |
|
70 * Stops trace data listening |
|
71 */ |
|
72 public void stopListenTraceData(); |
|
73 |
|
74 /** |
|
75 * Gets preference page ID for the user trace source. |
|
76 * @return preference page ID for the user trace source |
|
77 */ |
|
78 public String getTraceSourcePreferencePageId(); |
|
79 |
|
80 /** |
|
81 * Gets current connections display name. |
|
82 * @return current connections display name |
|
83 */ |
|
84 public String getDisplayNameForCurrentConnection(); |
|
85 |
|
86 } |