--- a/menufw/hierarchynavigator/hnutilities/inc/hnservicehandler.h Tue Feb 02 00:04:13 2010 +0200
+++ b/menufw/hierarchynavigator/hnutilities/inc/hnservicehandler.h Fri Feb 19 22:42:37 2010 +0200
@@ -11,7 +11,7 @@
*
* Contributors:
*
-* Description:
+* Description:
*
*/
@@ -22,7 +22,7 @@
//#include <mnaiwservices.h>
#include <liwcommon.h>
#include <e32base.h>
-#include <xmlengelement.h>
+#include <xmlengelement.h>
#include "hnglobals.h"
@@ -36,7 +36,7 @@
class CHnServiceHandler;
/**
- * Class represeting request to LIW service.
+ * Class represeting request to LIW service.
* The request can be synchronous or asynchronous.
*
* @since S60 5.0
@@ -59,7 +59,7 @@
* @return Fully cosntructed object.
*/
IMPORT_C static CHnServiceHandler* NewL(
- const TDesC8& aService, const TDesC8& aInterface,
+ const TDesC8& aService, const TDesC8& aInterface,
const TDesC8& aCommand, TServiceMode aMode,
CLiwGenericParamList* aConstructor,
CLiwGenericParamList* aServiceCommand );
@@ -98,7 +98,7 @@
* @return Error code.
*/
IMPORT_C TInt ExecuteL( CLiwGenericParamList& aOutParamList, TRequestStatus& aStatus );
-
+
/**
* Executes the query on the service, with external
* notification callback.
@@ -110,17 +110,42 @@
*/
IMPORT_C TInt ExecuteL( MLiwNotifyCallback* aCallback,
TInt aCmdOptions = 0 );
-
-
+
+
/**
* Executes the query on the service.
* Deprecated - Do not Use this method!!!! Will be removed asap.
- *
+ *
* since S60 v5.0
* @return Error code.
*/
IMPORT_C TInt ExecuteL();
+
+ /**
+ * Checks if an action model matches an existing service.
+ *
+ * since S60 v5.0
+ * @param aService service.
+ * @param aInterface interface.
+ * @param aConstructor constructor.
+ * @return true if an action model matches the service.
+ */
+ IMPORT_C TBool ServiceHandlerMatchesModel(
+ const TDesC8& aService,
+ const TDesC8& aInterface,
+ const CLiwGenericParamList* aConstructor ) const;
+ /**
+ * Allows for reusing the object when a request needs to be invoked on
+ * the same interface of the same service.
+ *
+ * @param aCommand Request to the Service.
+ * @param aMode Asynchronous or Synchronous Request.
+ * @param aServiceCommand Additional Parameters for the Request.
+ */
+ IMPORT_C void PrepareForNextExecutionL( const TDesC8& aCommand,
+ TServiceMode aMode, CLiwGenericParamList* aServiceCommand );
+
private:
/**
@@ -129,7 +154,7 @@
* @since S60 5.0
* @param aMode Synchronous or asynchronous.
*/
- CHnServiceHandler( TServiceMode aMode );
+ CHnServiceHandler( TServiceMode aMode );
/**
@@ -140,7 +165,7 @@
* @param aInterface Interface name.
* @param aCommandName Request to the Service.
* @param aConstructor Parameters used during Service construction.
- * @param aServiceCommand Additional Parameters for the Request.
+ * @param aServiceCommand Additional Parameters for the Request.
*/
void ConstructL(
const TDesC8& aService, const TDesC8& aInterface,
@@ -148,7 +173,7 @@
CLiwGenericParamList* aConstructor,
CLiwGenericParamList* aServiceCommand );
-
+
/**
* Handles notifications caused by an asynchronous Request.
*
@@ -168,12 +193,12 @@
/**
* Creates interface.
- *
+ *
* @param aConstructor constructor
* @return Error code.
*/
TInt SetServiceInterfaceL( CLiwGenericParamList* aConstructor );
-
+
private: // data
/**
@@ -187,7 +212,7 @@
* Own.
*/
RBuf8 iInterfaceName;
-
+
/**
* Command (Request) name.
* Own.
@@ -198,62 +223,62 @@
* Service mode.
*/
TServiceMode iMode;
-
+
/**
* Stores input parameters (not data) of the service search method\
* (ExecuteServiceCmdL).
- * Own.
+ * Own.
*/
CLiwGenericParamList* iConstructor;
/**
- *
+ *
* Own.
*/
CLiwGenericParamList* iCommand;
-
+
/**
* Parameters for the Request.
* Own.
*/
CLiwGenericParamList* iInput;
-
+
/**
* Request results from ExecuteL();
* Own.
*/
CLiwGenericParamList* iOutputForAS;
-
+
/**
- * Request results from
+ * Request results from
* ExecuteL( CLiwGenericParamList& aOutParamList, TRequestStatus& aStatus ).
* Own.
*/
CLiwGenericParamList* iOutputForAO;
-
+
/**
- * Service interface.
+ * Service interface.
*/
MLiwInterface* iServiceInterface;
-
+
/**
* Service Handler.
* Own.
*/
CLiwServiceHandler* iServiceHandler;
-
+
/**
* Client status.
* Not Own.
*/
TRequestStatus* iClientStatus;
-
+
/**
* Waits for asynchronous queries.
* Own.
*/
CActiveSchedulerWait* iWait;
-
+
};
#endif // C_HNMDSERVICEHANDLER_H