|
1 /* |
|
2 * Copyright (c) 2008-2008 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: CCFScriptService class declaration.h |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CFSCRIPTSERVICE_H |
|
20 #define CFSCRIPTSERVICE_H |
|
21 |
|
22 // SYSTEM INCLUDE FILES |
|
23 |
|
24 // USER INCLUDE FILES |
|
25 #include "cfservicebase.h" |
|
26 |
|
27 // FORWARD DECLARATIONS |
|
28 class RCFClientSession; |
|
29 class CCFScriptMessageListener; |
|
30 |
|
31 // DATA TYPES |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * Service class for script related features. |
|
37 * |
|
38 * @lib cfclient.lib |
|
39 * @since S60 5.0 |
|
40 */ |
|
41 NONSHARABLE_CLASS( CCFScriptService ): public CCFServiceBase |
|
42 { |
|
43 public: |
|
44 |
|
45 /** |
|
46 * Symbian two phased constructors. |
|
47 * |
|
48 * @since S60 5.0 |
|
49 * @param None. |
|
50 * @return CCFScriptService |
|
51 */ |
|
52 static CCFScriptService* NewL( RCFClientSession& aSession, |
|
53 MCFListener& aListener ); |
|
54 static CCFScriptService* NewLC( RCFClientSession& aSession, |
|
55 MCFListener& aListener ); |
|
56 |
|
57 /** |
|
58 * C++ destructor. |
|
59 */ |
|
60 virtual ~CCFScriptService( ); |
|
61 |
|
62 public: |
|
63 |
|
64 // @see CCFClient |
|
65 TInt RegisterScript( const TDesC& aScriptFileName ); |
|
66 |
|
67 // @see CCFClient |
|
68 TInt DeregisterScript( TInt aScriptId ); |
|
69 |
|
70 // @see CCFClient |
|
71 TInt RegisterScript( const TDesC8& aScript, |
|
72 const TDesC& aScriptFileName ); |
|
73 |
|
74 // @see CCFClient |
|
75 TInt SaveScript( const TDesC& aScriptFileName ); |
|
76 |
|
77 // @see CCFClient |
|
78 TInt SaveScript( const TDesC8& aScript, |
|
79 const TDesC& aScriptFileName ); |
|
80 |
|
81 // @see CCFClient |
|
82 TInt DeleteScript( const TDesC& aScriptFileName ); |
|
83 |
|
84 // @see CCFClient |
|
85 TInt DeleteScripts(); |
|
86 |
|
87 // @see CCFClient |
|
88 TInt UpgradeRomScript( const TDesC& aScriptFileName ); |
|
89 |
|
90 // @see CCFClient |
|
91 TInt UpgradeRomScriptDes( const TDesC& aScriptFileName, |
|
92 const TDesC8& aScript ); |
|
93 |
|
94 // @see CCFClient |
|
95 TInt RestoreRomScript( const TDesC& aScriptFileName ); |
|
96 |
|
97 private: |
|
98 |
|
99 // Share a file handle with server and send request |
|
100 TInt ShareFileAndSendSyncL( const TDesC& aScriptFileName, TInt aOpCode ); |
|
101 |
|
102 private: |
|
103 |
|
104 CCFScriptService( RCFClientSession& aSession, MCFListener& aListener ); |
|
105 void ConstructL( ); |
|
106 |
|
107 private: // Data |
|
108 |
|
109 /** Message listener for removed scripts */ |
|
110 CCFScriptMessageListener* iMessageListener; |
|
111 }; |
|
112 |
|
113 #endif // CFSCRIPTSERVICE_H |
|
114 |