commsprocess/commsrootserverconfig/configurator/src/c32startserv.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #if !defined(__C32STARTSERV_H__)
       
    17 #define __C32STARTSERV_H__
       
    18 
       
    19 #include <e32base.h>
       
    20 #include "c32start.h"
       
    21 
       
    22 
       
    23 class CRsConfiguratorServer : public CPolicyServer
       
    24 /** The main class implementing the Configurator server.
       
    25 @internalComponent
       
    26 */
       
    27 	{
       
    28 	public:
       
    29 	CSession2* NewSessionL(const TVersion& aVersion, const RMessage2& aMessage) const;
       
    30 
       
    31 	public :
       
    32 	
       
    33 	static CRsConfiguratorServer* NewLC(CCommsProcessStarter& aCommsProcess);
       
    34 	~CRsConfiguratorServer();
       
    35 	static CRsConfiguratorServer* NewL(CCommsProcessStarter& aCommsProcess);
       
    36 
       
    37 	TInt EnumerateModules(const TCFGroupNameF& aGroupName, TInt& aStartAt, TCFModuleNameF& aName);
       
    38 	TInt LoadCpm(const TCFModuleNameF& aName,const RMessage2& aMessage);
       
    39 	TInt GetModuleIniData(const TCFModuleNameF& aName, TDes8& aIniData,TInt& aActualSize);//to be deleted
       
    40 	TInt GetModuleIniData(const TCFModuleNameF& aName, const RMessage2& aMessage);
       
    41 	TInt UnLoadCpm(const TCFModuleNameF& aName, const RMessage2& aMessage);
       
    42 	TInt CancelLoadCpm(const TCFModuleNameF& aName);
       
    43 	TInt CancelUnLoadCpm(const TCFModuleNameF& aName);
       
    44 
       
    45 	private:
       
    46 	RPointerArray<CModuleRef>& GetModulesList() // Get the modules listed.
       
    47 		{
       
    48 		return iCommsProcess.GetModulesList();
       
    49 		};
       
    50 
       
    51 	protected:
       
    52 	CRsConfiguratorServer(CCommsProcessStarter& aCommsProcess);
       
    53 	void ConstructL();
       
    54 	static const CPolicyServer::TPolicy Policy;
       
    55 
       
    56 	private:
       
    57 	CModuleRef* FindCpm(const TCFModuleNameF& aName);
       
    58 	CCommsProcessStarter& iCommsProcess;
       
    59 	static const TUint iPolicyRangeCount;
       
    60 	static const TInt iPolicyRanges[];
       
    61 	static const TUint8 iPolicyElementsIndex[];
       
    62 	static const CPolicyServer::TPolicyElement iPolicyElements[];
       
    63 	static const CPolicyServer::TPolicy iPolicy;
       
    64 	// Debug build logging
       
    65 	__FLOG_DECLARATION_MEMBER;
       
    66 	};
       
    67 
       
    68 class CRsConfiguratorServerSession : public CSession2
       
    69 /** Session object as required by the client/server framework. 
       
    70 Implements the "Secure IPC" API for configurator server.
       
    71 @internalComponent 
       
    72 */
       
    73 	{
       
    74 	public:
       
    75 	CRsConfiguratorServerSession(const CRsConfiguratorServer* aConfiguratorServer);
       
    76 
       
    77 	  //service request
       
    78 	void ServiceL(const RMessage2& aMessage);
       
    79 
       
    80 	 //services available 
       
    81 	private:
       
    82 	TInt LoadCpm(const RMessage2& aMessage);
       
    83 	TInt UnloadCpm(const RMessage2& aMessage);
       
    84 	TInt CancelLoadCpm(const RMessage2& aMessage);
       
    85 	TInt CancelUnloadCpm(const RMessage2& aMessage);
       
    86 	TInt EnumerateModules(const RMessage2& aMessage);
       
    87 	TInt GetModuleIniData(const RMessage2& aMessage);
       
    88 	
       
    89 	private:
       
    90 	CRsConfiguratorServer* iConfiguratorServer;
       
    91 	// Debug build logging
       
    92 	__FLOG_DECLARATION_MEMBER;
       
    93 	
       
    94 	};
       
    95 
       
    96 
       
    97 #endif
       
    98