|
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 using System; |
|
18 using System.Text; |
|
19 using System.IO; |
|
20 using System.Collections.Generic; |
|
21 using System.Reflection; |
|
22 using SymbianDebugLib.Engine; |
|
23 using SymbianUtils.Settings; |
|
24 using SymbianUtils.PluginManager; |
|
25 using CrashAnalyserEngine.Engine; |
|
26 using CrashAnalyserEngine.Interfaces; |
|
27 |
|
28 namespace CrashAnalyserEngine.Plugins |
|
29 { |
|
30 public abstract class CAPlugin |
|
31 { |
|
32 #region Enumerations |
|
33 public enum TType |
|
34 { |
|
35 ETypeEngine = 0, |
|
36 ETypeUi |
|
37 } |
|
38 #endregion |
|
39 |
|
40 #region Constructors |
|
41 protected CAPlugin( CAEngine aEngine, string aName ) |
|
42 { |
|
43 iEngine = aEngine; |
|
44 iName = aName; |
|
45 } |
|
46 #endregion |
|
47 |
|
48 #region Constants |
|
49 public const int KErrCommandLineNone = 0; |
|
50 public const int KErrCommandLineGeneral = -1; |
|
51 public const int KErrCommandLinePluginNotFound = -2; |
|
52 public const int KErrCommandLinePluginArgumentsMissing = -3; |
|
53 public const int KErrCommandLinePluginArgumentsInvalid = -4; |
|
54 public const int KErrCommandLinePluginArgumentsFileNotFound = -5; |
|
55 public const int KErrCommandLinePluginArgumentsFileInvalid = -6; |
|
56 public const int KErrCommandLinePluginSinkNotAvailable = -7; |
|
57 #endregion |
|
58 |
|
59 #region Framework API |
|
60 public virtual void AllPluginsLoaded() |
|
61 { |
|
62 } |
|
63 |
|
64 public virtual bool IsCommandLineHandler( string aName ) |
|
65 { |
|
66 return false; |
|
67 } |
|
68 |
|
69 public virtual int RunCommandLineOperations() |
|
70 { |
|
71 return 0; |
|
72 } |
|
73 |
|
74 public abstract TType Type |
|
75 { |
|
76 get; |
|
77 } |
|
78 #endregion |
|
79 |
|
80 #region API |
|
81 #endregion |
|
82 |
|
83 #region Properties |
|
84 public string Name |
|
85 { |
|
86 get { return iName; } |
|
87 } |
|
88 |
|
89 public XmlSettings Settings |
|
90 { |
|
91 get { return iEngine.Settings; } |
|
92 } |
|
93 |
|
94 public CAEngine UIEngine |
|
95 { |
|
96 get { return iEngine; } |
|
97 } |
|
98 |
|
99 public IEngineUIManager UIManager |
|
100 { |
|
101 get { return UIEngine.UIManager; } |
|
102 } |
|
103 |
|
104 public DbgEngine DebugEngine |
|
105 { |
|
106 get { return iEngine.DebugEngine; } |
|
107 } |
|
108 #endregion |
|
109 |
|
110 #region Internal methods |
|
111 #endregion |
|
112 |
|
113 #region From System.Object |
|
114 public override string ToString() |
|
115 { |
|
116 return Name; |
|
117 } |
|
118 #endregion |
|
119 |
|
120 #region Data members |
|
121 private readonly CAEngine iEngine; |
|
122 private readonly string iName; |
|
123 #endregion |
|
124 } |
|
125 } |