|
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; |
|
20 using System.Collections.Generic; |
|
21 using System.Text; |
|
22 using SymbianUtils; |
|
23 using CrashItemLib.Crash.Source; |
|
24 |
|
25 namespace CrashItemLib.PluginAPI |
|
26 { |
|
27 public class CFFFileSpecification |
|
28 { |
|
29 #region Static factory functions |
|
30 public static CFFFileSpecification Custom( string aDescription, string aExtensions ) |
|
31 { |
|
32 return new CFFFileSpecification( aDescription, aExtensions ); |
|
33 } |
|
34 |
|
35 public static CFFFileSpecification AllFiles() |
|
36 { |
|
37 return new CFFFileSpecification(); |
|
38 } |
|
39 |
|
40 public static CFFFileSpecification TraceFiles() |
|
41 { |
|
42 CFFFileSpecification ret = new CFFFileSpecification(); |
|
43 ret.Description = "Text files"; |
|
44 // |
|
45 StringBuilder extensions = new StringBuilder(); |
|
46 foreach ( string extn in CISource.KExtensionsTrace ) |
|
47 { |
|
48 extensions.Append( "*" + extn + ";" ); |
|
49 } |
|
50 |
|
51 // Remove last trailing semi-colon |
|
52 extensions.Remove( extensions.Length - 1, 1 ); |
|
53 ret.Extensions = extensions.ToString(); |
|
54 return ret; |
|
55 } |
|
56 #endregion |
|
57 |
|
58 #region Constructors |
|
59 private CFFFileSpecification() |
|
60 { |
|
61 } |
|
62 |
|
63 private CFFFileSpecification( string aDescription, string aExtensions ) |
|
64 { |
|
65 Description = aDescription; |
|
66 Extensions = aExtensions; |
|
67 } |
|
68 #endregion |
|
69 |
|
70 #region API |
|
71 #endregion |
|
72 |
|
73 #region Properties |
|
74 public string Description |
|
75 { |
|
76 get { return iDescription; } |
|
77 set { iDescription = value; } |
|
78 } |
|
79 |
|
80 public string Extensions |
|
81 { |
|
82 get { return iExtensions; } |
|
83 set { iExtensions = value; } |
|
84 } |
|
85 #endregion |
|
86 |
|
87 #region Data members |
|
88 private string iDescription = "All Files"; |
|
89 private string iExtensions = "*.*"; |
|
90 #endregion |
|
91 } |
|
92 } |