5
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2007 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: This Class provides the interface for
|
|
15 |
* calling the functionality to Application Manager SAPI.
|
|
16 |
*
|
|
17 |
*/
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef __CAPPMANAGERINTERFACE_H
|
|
22 |
#define __CAPPMANAGERINTERFACE_H
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
class CAppManagerService;
|
|
27 |
class CAppManagerServiceObserver;
|
|
28 |
|
|
29 |
#include <Liwvariant.h>
|
|
30 |
// CLASS DECLARATION
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
/**
|
|
35 |
* Interface class for Application Manager SAPI.
|
|
36 |
*
|
|
37 |
* @code
|
|
38 |
* MLiwInterface* Interface = CAppManagerInterface::NewL();
|
|
39 |
* Interface->ExecuteCmdL(KGetList,input,output,KLiwOptSyncronous);
|
|
40 |
* @endcode
|
|
41 |
*
|
|
42 |
*
|
|
43 |
* @since Series60 v3.2
|
|
44 |
*/
|
|
45 |
|
|
46 |
class CAppManagerInterface : public CBase, public MLiwInterface
|
|
47 |
{
|
|
48 |
public:
|
|
49 |
/**
|
|
50 |
* Two-phased constructor
|
|
51 |
* @since Series60 v3.2
|
|
52 |
* @param void
|
|
53 |
* @return CAppManagerInterface* Returns the instance of
|
|
54 |
* CAppManagerInterface.
|
|
55 |
*/
|
|
56 |
static CAppManagerInterface* NewL();
|
|
57 |
|
|
58 |
/**
|
|
59 |
* Destructor.
|
|
60 |
*/
|
|
61 |
virtual ~CAppManagerInterface();
|
|
62 |
|
|
63 |
/**
|
|
64 |
* This function handles the request of consumer
|
|
65 |
* @since Series60 v3.2
|
|
66 |
* @param aCmdName Command name of SAPI
|
|
67 |
* @param aInParamList Contains argument on which operation has to
|
|
68 |
be performed
|
|
69 |
* @param aOutParamList Result of given command will be
|
|
70 |
* stored in the output paramater list
|
|
71 |
* @param aCmdOptions Set option for asyncronous request or
|
|
72 |
* for canceling the asyncronous request
|
|
73 |
* @param aCallback Contains the callback for Asynchronous request
|
|
74 |
*/
|
|
75 |
|
|
76 |
virtual void ExecuteCmdL(const TDesC8& aCmdName,
|
|
77 |
const CLiwGenericParamList& aInParamList,
|
|
78 |
CLiwGenericParamList& aOutParamList,
|
|
79 |
TUint aCmdOptions = 0,
|
|
80 |
MLiwNotifyCallback* aCallback = 0);
|
|
81 |
|
|
82 |
|
|
83 |
/**
|
|
84 |
* This function will release all the internal resources
|
|
85 |
* @since Series60 v3.2
|
|
86 |
* @param void
|
|
87 |
* @return void
|
|
88 |
*/
|
|
89 |
virtual void Close() {delete this;}
|
|
90 |
|
|
91 |
/**
|
|
92 |
* This function will convert Symbian error codes to
|
|
93 |
* SAPI specific error codes
|
|
94 |
* @since Series60 v3.2
|
|
95 |
* @param aSymbianErr Symbian error code to be converted to SAPI specific
|
|
96 |
* error code
|
|
97 |
* @return An integer error code
|
|
98 |
*/
|
|
99 |
static TInt SapiError( TInt aSymbianErr );
|
|
100 |
|
|
101 |
private:
|
|
102 |
|
|
103 |
/**
|
|
104 |
* constructor
|
|
105 |
* @since Series60 v3.2
|
|
106 |
* @param void
|
|
107 |
* @return void
|
|
108 |
*/
|
|
109 |
CAppManagerInterface();
|
|
110 |
|
|
111 |
/**
|
|
112 |
* Two-phased constructor
|
|
113 |
* @since Series60 v3.2
|
|
114 |
* @param void
|
|
115 |
* @return void
|
|
116 |
*/
|
|
117 |
void ConstructL();
|
|
118 |
/**
|
|
119 |
* This function will send the request to SAPI core class
|
|
120 |
* @since Series60 v3.2
|
|
121 |
* @param void
|
|
122 |
* @return void
|
|
123 |
*/
|
|
124 |
void GetListL( const CLiwGenericParamList& aInParamList ,
|
|
125 |
CLiwGenericParamList& aOutParamList );
|
|
126 |
|
|
127 |
/**
|
|
128 |
* This function will send the request to SAPI core class
|
|
129 |
* @since Series60 v3.2
|
|
130 |
* @param void
|
|
131 |
* @return void
|
|
132 |
*/
|
|
133 |
void LaunchAppL( const CLiwGenericParamList& aInParamList ,
|
|
134 |
CLiwGenericParamList& aOutParamList ,
|
|
135 |
MLiwNotifyCallback* aCallBack = NULL,
|
|
136 |
TInt32 aTransactionID = 0 );
|
|
137 |
/**
|
|
138 |
* This function will send the request to SAPI core class
|
|
139 |
* @since Series60 v3.2
|
|
140 |
* @param void
|
|
141 |
* @return void
|
|
142 |
*/
|
|
143 |
void LaunchDocL( const CLiwGenericParamList& aInParamList,
|
|
144 |
CLiwGenericParamList& aOutParamList,
|
|
145 |
MLiwNotifyCallback* aCallBack = NULL,
|
|
146 |
TInt32 aTransactionID = 0 );
|
|
147 |
|
|
148 |
|
|
149 |
private:
|
|
150 |
/**
|
|
151 |
* Stores the instance of SAPI Core Class
|
|
152 |
*/
|
|
153 |
CAppManagerService *iCoreClass;
|
|
154 |
|
|
155 |
|
|
156 |
};
|
|
157 |
|
|
158 |
#endif __CAPPMANAGERINTERFACE_H |