dcmofw/dcmoserver/inc/dcmoserver.h
branchRCL_3
changeset 62 19bba8228ff0
parent 61 b183ec05bd8c
child 76 3cdbd92ee07b
equal deleted inserted replaced
61:b183ec05bd8c 62:19bba8228ff0
    19 #define __DCMO_SERVER_H__
    19 #define __DCMO_SERVER_H__
    20 
    20 
    21 // INCLUDES
    21 // INCLUDES
    22 
    22 
    23 #include <e32base.h>
    23 #include <e32base.h>
    24 #include <hbdevicemessageboxsymbian.h>
       
    25 #include "dcmoclientserver.h"
    24 #include "dcmoclientserver.h"
    26 #include "dcmoconst.h"
    25 #include "dcmoconst.h"
    27 #include "dcmomessagebox.h"
    26 #include "dcmonotifieraob.h"
    28 
    27 #include <lawmocallbackinterface.h>
    29 
       
    30 // CONSTANTS
    28 // CONSTANTS
    31 const TUid KCRUidDCMOServer={0x2001FE47};
    29 const TUid KCRUidDCMOServer={0x2001FE47};
    32 const TInt KDCMOKeyMaxNumber = 16;
    30 const TInt KDCMOKeyMaxNumber = 16;
    33 // FORWARD DECLARATIONS
    31 // FORWARD DECLARATIONS
    34 // CLASS DECLARATION
    32 // CLASS DECLARATION
    35 
    33 class CLAWMOPluginInterface;
    36 /**
    34 /**
    37 *  CDCMOServer
    35 *  CDCMOServer
    38 *  Description.
    36 *  Description.
    39 */
    37 */
    40 
    38 
    41 
    39 
    42 class CDCMOServer : public CServer2
    40 class CDCMOServer : public CServer2,
       
    41                     public MLawmoPluginWipeObserver
    43 	{
    42 	{
    44 	friend class CDCMOSession;
    43 	friend class CDCMOSession;
    45 	friend class CDCMOMessageBox;
    44 	friend class CDCMONotifierAob;
    46 
    45 
    47 public:
    46 public:
    48 	/**
    47 	/**
    49 	 * Structure to hold the plug-in details
    48 	 * Structure to hold the plug-in details
    50 	 */ 
    49 	 */ 
    85 	 * Stops the session and closes the server
    84 	 * Stops the session and closes the server
    86 	 * @param None
    85 	 * @param None
    87 	 * @return None
    86 	 * @return None
    88 	 */
    87 	 */
    89 	void DropSession();
    88 	void DropSession();
       
    89 public:
       
    90 	
       
    91 	// Callback from MLawmoPluginWipeObserver
       
    92 	void HandleWipeCompleted(TInt status);
       
    93 	//void SendGenericAlert();
    90 	
    94 	
    91 private:
    95 private:
    92 	/**
    96 	/**
    93 	 * Default constructor
    97 	 * Default constructor
    94 	 */
    98 	 */
   167 	 * @param aValue, ETrue if it is Starter else EFalse
   171 	 * @param aValue, ETrue if it is Starter else EFalse
   168 	 * @return 
   172 	 * @return 
   169 	 */
   173 	 */
   170 	void SetStarter(TBool aValue);	
   174 	void SetStarter(TBool aValue);	
   171 	
   175 	
   172 	/**
   176     TLawMoStatus WipeItem(TInt aValue=0);
   173 	 * Deletes the idcmoArray value if any
   177 	
   174 	 * @param none
   178     TLawMoStatus WipeAllItem();
   175 	 * @return none
   179 
   176 	 */
   180 	TLawMoStatus GetListItemL(TDesC& item, TDes& strValue);
   177 	void CleanDcmoArray();	
   181 
       
   182 	TLawMoStatus GetToBeWipedL(TDesC& item, TDes& wipeValue);
       
   183 
       
   184 	TLawMoStatus SetToBeWipedL(TDesC& item, TInt wipeValue);
   178 	
   185 	
   179 private:
   186 private:
   180 	
   187 	
   181 	/**
   188 	/**
   182 	 * Get the uid of plug-in adapter
   189 	 * Get the uid of plug-in adapter
   183 	 * @param aCategory
   190 	 * @param aCategory
   184 	 * @return the uid
   191 	 * @return the uid
   185 	 */
   192 	 */
   186 	TUid GetAdapterUidL(const TDesC& aCategory);
   193 	TUid GetAdapterUidL(const TDesC& aCategory, TBool aIsLawmo = EFalse);
   187 	
   194 	
   188 	/**
   195 	/**
   189 	 * Finds whether the plug-in adapter is a generic category
   196 	 * Finds whether the plug-in adapter is a generic category
   190 	 * @param aCategory
   197 	 * @param aCategory
   191 	 * @return the integer
   198 	 * @return the integer
   192 	 */
   199 	 */
   193 		TInt GetLocalCategoryL(const TDesC& aCategory);	
   200 		TInt GetLocalCategoryL(const TDesC& aCategory);	
   194 	
   201 	
       
   202 	void GetLawmoPluginUidsL();
       
   203 	
       
   204 	void StartDMNetworkMonitorL(TDesC& aServerId, TInt iapid=0);
   195 private:
   205 private:
   196 	RArray<dcmoInfoList> idcmoArray;
   206 	RArray<dcmoInfoList> idcmoArray;
   197 	static TInt iSessionCount;
   207 	static TInt iSessionCount;
   198 	TBool iStarter;	
   208 	TBool iStarter;	
   199 	CDCMOMessageBox* iMessageBox;
   209 	CDCMONotifierAob* iNotifier;
       
   210 	RArray<TUid> ilawmoPluginUidToBeWiped;
       
   211 	RArray<CLAWMOPluginInterface*> ilawmoPlugins;
       
   212 	TInt iwipeStatus;
       
   213     TInt iCount;
       
   214     TInt iSessionIap;
   200 	};
   215 	};
   201 	
   216 	
   202 #endif //__DCMO_SERVER_H__
   217 #endif //__DCMO_SERVER_H__