|
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.IO; |
|
19 using System.Collections.Generic; |
|
20 using System.Text; |
|
21 using System.Text.RegularExpressions; |
|
22 using SymbianUtils; |
|
23 using SymbianUtils.SerializedOperations; |
|
24 |
|
25 namespace SymbolLib.CodeSegDef |
|
26 { |
|
27 public class CodeSegDefinitionPrimer : SerializedOperationManager |
|
28 { |
|
29 #region Constructor |
|
30 internal CodeSegDefinitionPrimer( CodeSegResolver aResolver ) |
|
31 : base( aResolver ) |
|
32 { |
|
33 iResolver = aResolver; |
|
34 base.Start(); |
|
35 } |
|
36 #endregion |
|
37 |
|
38 #region Constants |
|
39 #endregion |
|
40 |
|
41 #region API |
|
42 public CodeSegResolverOperation PrimeFromDirectory( DirectoryInfo aDirectory ) |
|
43 { |
|
44 return PrimeFromDirectory( aDirectory, false ); |
|
45 } |
|
46 |
|
47 public CodeSegResolverOperation PrimeFromDirectory( DirectoryInfo aDirectory, bool aResetResolver ) |
|
48 { |
|
49 CodeSegResolverOperation ret = new CSROpScanDirectory( iResolver, aResetResolver, aDirectory ); |
|
50 Queue( ret ); |
|
51 return ret; |
|
52 } |
|
53 |
|
54 public CodeSegResolverOperation PrimeFromObey( FileInfo aFile ) |
|
55 { |
|
56 return PrimeFromObey( aFile, false ); |
|
57 } |
|
58 |
|
59 public CodeSegResolverOperation PrimeFromObey( FileInfo aFile, bool aResetResolver ) |
|
60 { |
|
61 CodeSegResolverOperation ret = new CSROpScanObey( iResolver, aResetResolver, aFile ); |
|
62 Queue( ret ); |
|
63 return ret; |
|
64 } |
|
65 |
|
66 public CodeSegResolverOperation PrimeFromBinaries( FileInfo aFile, IEnumerable<string> aBinaryNames ) |
|
67 { |
|
68 return PrimeFromBinaries( aFile, aBinaryNames, false ); |
|
69 } |
|
70 |
|
71 public CodeSegResolverOperation PrimeFromBinaries( FileInfo aFile, IEnumerable<string> aBinaryNames, bool aResetResolver ) |
|
72 { |
|
73 CodeSegResolverOperation ret = new CSROpScanSymbol( iResolver, aResetResolver, aFile, aBinaryNames ); |
|
74 Queue( ret ); |
|
75 return ret; |
|
76 } |
|
77 #endregion |
|
78 |
|
79 #region Properties |
|
80 #endregion |
|
81 |
|
82 #region Internal properties |
|
83 internal string DriveLetter |
|
84 { |
|
85 get |
|
86 { |
|
87 lock ( iDriveLetter ) |
|
88 { |
|
89 return iDriveLetter; |
|
90 } |
|
91 } |
|
92 set |
|
93 { |
|
94 lock ( iDriveLetter ) |
|
95 { |
|
96 iDriveLetter = value; |
|
97 } |
|
98 } |
|
99 } |
|
100 #endregion |
|
101 |
|
102 #region Data members |
|
103 private readonly CodeSegResolver iResolver; |
|
104 private string iDriveLetter = string.Empty; |
|
105 #endregion |
|
106 } |
|
107 } |