homescreensrv_plat/sapi_menucontent/inc/mcsdsinterface.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 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:  Defination of class CMCSInterface
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MCSDSINTERFACE_H
       
    20 #define __MCSDSINTERFACE_H
       
    21 
       
    22 #include <liwcommon.h>
       
    23 #include <liwserviceifbase.h>
       
    24 #include <liwbufferextension.h>
       
    25 
       
    26 class CMCSService;
       
    27 class CMenuFilter;
       
    28 class TMenuItem;
       
    29 /**
       
    30  * This class provides the MCS SAPI interface to LIW Framework 
       
    31 */
       
    32 class CMCSDSInterface : public CBase, public MLiwInterface
       
    33 	{
       
    34 		
       
    35 	public:
       
    36 
       
    37 	    /**
       
    38 	     * Two-phased constructor.
       
    39 	     * @return CMCSDSInterface* 
       
    40 	    */
       
    41 		static CMCSDSInterface* NewL(const TDesC& aContent);
       
    42 
       
    43 	    /**
       
    44 	    * Destructor.
       
    45 	    */
       
    46 		virtual ~CMCSDSInterface();
       
    47 
       
    48 	private:
       
    49 
       
    50 		/**
       
    51 	     * Constructor
       
    52 	    */
       
    53 		CMCSDSInterface();
       
    54 
       
    55 		/**
       
    56 	     * Symbian Constructor
       
    57 	    */
       
    58 		void ConstructL(const TDesC& aContent);
       
    59 
       
    60 	// MLiwInterface member functions
       
    61 	public:
       
    62 
       
    63 		/**
       
    64 	     * Executes the SAPI as per params
       
    65 	     * @param aCmdName Command name defining which operation is to be performed
       
    66 	     * @param aInParamList  Input param list
       
    67 	     * @param aOutParamList Output list
       
    68 	     * @param aCmdOptions Command option
       
    69 	     * @param aCallback Callback object pointer
       
    70 	    */
       
    71 		virtual void ExecuteCmdL( const TDesC8& aCmdName,
       
    72 		                       const CLiwGenericParamList& aInParamList,
       
    73 		                       CLiwGenericParamList& aOutParamList,
       
    74 		                       TUint aCmdOptions = 0,
       
    75 		                       MLiwNotifyCallback* aCallback = 0 );
       
    76 		
       
    77 		/**
       
    78 	     * Closes the interface 
       
    79 	    */
       
    80 		virtual void Close();
       
    81 		
       
    82 	/**
       
    83      * Static Functions
       
    84 	 * 
       
    85 	 * Same functionality required outside the CMCSDSInterface class in case of async
       
    86 	 * operation. Those set of functions can be given as static.
       
    87     */
       
    88 	public:
       
    89  
       
    90 		/**
       
    91 	     * Converts symbian errcode to equivalent SAPI error code
       
    92 	     * @param aErrorCode Symbian error code
       
    93 		 *
       
    94 	     * @return mapped SAPI error code
       
    95 	    */
       
    96  		static TInt32 ErrCodeConversion(TInt aErrorCode);
       
    97 
       
    98 	private:
       
    99 	
       
   100 	    /**
       
   101          * Issues GetList
       
   102          * @param aInParamList Input param list
       
   103          * @param aCallback Callback object pointer
       
   104          * @return void
       
   105         */
       
   106         void AddItemL(const CLiwGenericParamList& aInParamList, 
       
   107                       MLiwNotifyCallback* aCallback );
       
   108 		/**
       
   109 	     * Issues GetList
       
   110 	     * @param aInParamList Input param list
       
   111 	     * @param aCallback Callback object pointer
       
   112 	     * @return void
       
   113 	    */
       
   114 		void GetListL(const CLiwGenericParamList& aInParamList, 
       
   115    					  MLiwNotifyCallback* aCallback );
       
   116 
       
   117 		/**
       
   118 		*
       
   119 	    */
       
   120 		void CheckGetListInputListL( const CLiwGenericParamList&
       
   121 					aInParamList );
       
   122 		
       
   123 		/**
       
   124 	     * Issues Change Notification
       
   125 	     * @param aInParamList Input param list
       
   126 	     * @param aCallback Callback object pointer
       
   127 	     * @return void
       
   128 	    */
       
   129 		void RequestNotificationL( const CLiwGenericParamList& aInParamList, 
       
   130 				                       			MLiwNotifyCallback* aCallback );
       
   131 		/**
       
   132          * Issues Delete an item 
       
   133          * @param aInParamList Input param list
       
   134          * @param aCallback Callback object pointer
       
   135          * @return void
       
   136         */
       
   137         void DeleteL(const CLiwGenericParamList& aInParamList, 
       
   138                       MLiwNotifyCallback* aCallback );
       
   139 
       
   140          
       
   141 	private:
       
   142 
       
   143 	  	/**
       
   144 	     * CMCSService class pointer
       
   145 	    */		
       
   146 		CMCSService* iMCSService;
       
   147 
       
   148 	};
       
   149 
       
   150 
       
   151 #endif // __MCSDSINTERFACE_H
       
   152 
       
   153 // End of file