|
1 /* |
|
2 * Copyright (c) 2008-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 the License "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 * SCR Accessor - client interface |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 @test |
|
23 @internalComponent |
|
24 */ |
|
25 |
|
26 #ifndef TSCRACCESSOR_CLIENT_H |
|
27 #define TSCRACCESSOR_CLIENT_H |
|
28 |
|
29 #include <e32std.h> |
|
30 #include <usif/scr/scr.h> |
|
31 |
|
32 |
|
33 class RScrAccessor : public RSessionBase |
|
34 { |
|
35 public: |
|
36 enum TAccessorOperationType |
|
37 { |
|
38 EAddNonLocalizedSoftwareType, |
|
39 EAddLocalizedSoftwareType, |
|
40 EAddSofwtareTypeWithoutMimeTypes, |
|
41 EAddLocalizedSoftwareTypeWithDifferentPluginUid, |
|
42 EAddLocalizedSoftwareTypeWithExtraName, |
|
43 EAddLocalizedSoftwareTypeWithMissingName, |
|
44 EAddLocalizedSoftwareTypeWithExtraMime, |
|
45 EAddLocalizedSoftwareTypeWithMissingMime, |
|
46 }; |
|
47 |
|
48 enum TAccessorOperationResult |
|
49 { |
|
50 EOpSucessful, |
|
51 EOpFailSwTypeNotFound, |
|
52 EOpFailUnexpectedPluginUid, |
|
53 EOpFailUnexpectedMimeTypeNum, |
|
54 EOpFailReturnedUnexpectedMimeType, |
|
55 EOpFailSwTypeStillExists |
|
56 }; |
|
57 public: |
|
58 TInt Connect(); |
|
59 |
|
60 /** |
|
61 Adds a new software type name to the SCR database. |
|
62 The properties of the software type are chosen by the server. |
|
63 |
|
64 @param aOpType The type of the software type adding operation. For example, add a software type with localized names. |
|
65 @param aOpResult Specific information about the result of the operation. |
|
66 @param aSpentTimeInMillisecond The time spent to perform this operation. |
|
67 */ |
|
68 void AddSoftwareTypeL(TAccessorOperationType aOpType, TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond); |
|
69 |
|
70 /** |
|
71 Deletes a sofware type name entry and all its mime types from the registry. |
|
72 The server decides which software type will be deleted. |
|
73 |
|
74 @param aOpResult Specific information about the result of the operation. |
|
75 @param aSpentTimeInMillisecond The time spent to perform this operation. |
|
76 */ |
|
77 void DeleteSoftwareTypeL(TAccessorOperationResult& aOpResult, TInt& aSpentTimeInMillisecond); |
|
78 |
|
79 /** |
|
80 Deletes a given file from the system. |
|
81 This function is intended to mainly delete TCB files. |
|
82 |
|
83 @param aFilePath The full path of the file being deleted. |
|
84 @return KErrNone if successful, otherwise one of the other system-wide error codes. |
|
85 */ |
|
86 TInt DeleteFile(const TDesC& aFilePath); |
|
87 |
|
88 /** |
|
89 Copies a given file into a destination file. |
|
90 This function is intended to mainly copy TCB files. |
|
91 |
|
92 @param aSourceFilePath Path indicating the file to be copied. |
|
93 @param aDestinationFilePath Path indicating the directory into which the file is to be copied. |
|
94 @return KErrNone if successful, otherwise one of the other system-wide error codes. |
|
95 */ |
|
96 TInt CopyFile(const TDesC& aSourceFilePath, const TDesC& aDestinationFilePath); |
|
97 }; |
|
98 |
|
99 #endif // TSCRACCESSOR_CLIENT_H |