CEComServer Class Reference

class CEComServer : private CServer2
Since
7.0 A concrete implementation which supplies instantiation & destruction of a class via the ECom framework.

Inherits from

Public Member Functions
~CEComServer ()
void AddSession ()
void DropSession ()
void GetImplementationInformationL (const TUid &, CImplementationInformation *&, const TClientRequest &)
void GetResolvedDllInfoL (const TUid , TEntry &, TUid &, const TClientRequest &)
void GetResolvedDllInfoL (const TUid , const TEComResolverParams &, const RExtendedInterfacesArray &, TEntry &, TUid &, const TClientRequest &)
void GetResolvedDllInfoL (const TUid , const TEComResolverParams &, const TUid , const RExtendedInterfacesArray &, TEntry &, TUid &, const TClientRequest &)
TBool IsSSA ( RFs &)
RImplInfoArray * ListImplementationsL ( TUid , const TEComResolverParams &, const RExtendedInterfacesArray &, const TClientRequest &)
RImplInfoArray * ListImplementationsL ( TUid , const RExtendedInterfacesArray &, const TClientRequest &)
RImplInfoArray * ListImplementationsL ( TUid , const TEComResolverParams &, TUid , const RExtendedInterfacesArray &, const TClientRequest &)
RImplInfoArray * ListImplementationsL ( TUid , TUid , const RExtendedInterfacesArray &, const TClientRequest &)
CEComServer * NewLC ()
void Notification ( TInt )
TInt NotifyEvents ( TAny *, TInt , TAny *)
TBool RegistryIndexValid ()
Private Member Functions
CEComServer ()
void ConstructL ()
CResolver * CreateCustomResolverLC ( TUid , CRegistryResolveTransaction *)
CResolver * CreateResolverLC (const TUid &, CRegistryResolveTransaction *)
TBool IsCachable ( TBool )
RImplInfoArray * ListImplementationsL ( TUid , const TEComResolverParams &, CResolver *)
RImplInfoArray * ListImplementationsL ( TUid , CResolver *)
CSession2 * NewSessionL (const TVersion &, const RMessage2 &)
void NotifyBUREvent ( TAny *)
void NotifySWIEvent ( TAny *)
void NotifyUpgrade (const TUid )
TInt RunError ( TInt )
void UpdateSpecialEvents ( TUint32 , TCallBackState )
Inherited Functions
CActive::CActive(TInt)
CActive::Cancel()
CActive::Deque()
CActive::IsActive()const
CActive::IsAdded()const
CActive::Priority()const
CActive::SetActive()
CActive::SetPriority(TInt)
CActive::~CActive()
CBase::CBase()
CBase::Delete(CBase *)
CBase::operator new(TUint)
CBase::operator new(TUint,TAny *)
CBase::operator new(TUint,TLeave)
CBase::operator new(TUint,TLeave,TUint)
CBase::operator new(TUint,TUint)
CBase::~CBase()
CServer2::CServer2(TInt,TServerType)
CServer2::DoCancel()
CServer2::DoConnect(const RMessage2 &)
CServer2::Extension_(TUint,TAny *&,TAny *)
CServer2::Message()const
CServer2::ReStart()
CServer2::RunL()
CServer2::Server()const
CServer2::SetMaster(const CServer2 *)
CServer2::SetPinClientDescriptors(TBool)
CServer2::Start(const TDesC &)
CServer2::StartL(const TDesC &)
CServer2::~CServer2()
Inherited Enumerations
CActive:TPriority
CServer2:TPanic
CServer2:TServerType
Private Attributes
RFs iFs
CRegistrar * iRegistrar
CRegistryData * iRegistryData
CRegistryResolveTransaction * iRegistryResolveTransaction
CCustomResolverCache * iResolverCache
RLibrary iResolverLibrary
CServerStartupMgr * iServerStartupMgr
TInt iSessionCount
CShutdown iShutdown
TBitFlags32 iSpecialEvents
Inherited Attributes
CActive::iStatus
CServer2::iSessionIter

Constructor & Destructor Documentation

CEComServer()

CEComServer ( ) [private]
Intended Usage : Default c'tor Error Condition : None
Since
7.0
Pre-condition
None
Post-condition
CEComServer is fully constructed

~CEComServer()

~CEComServer ( )
Intended Usage : d'tor Error Condition : None
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer is destroyed.

Member Functions Documentation

AddSession()

void AddSession ( )
Intended Usage : (Server Session management) Add a new session connection for a client. Error Condition : None.
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The new CEComServerSession to handle service provision for a new ECom client has been recorded. If the server was preparing to shutdown, that shutdown is cancelled

ConstructL()

void ConstructL ( ) [private]
Intended Usage : Standardised 2nd, (Initialisation) phase of two phase construction. Error Condition : None
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer is fully constructed.
Post-condition
CEComServer is fully initialised.

CreateCustomResolverLC(TUid, CRegistryResolveTransaction *)

CResolver * CreateCustomResolverLC ( TUid aResolverUid,
CRegistryResolveTransaction * aRegistryResolveTransaction
) [private]
Intended Usage: Creates custom resolver object with aResolverUid UID. The method leaves custom resolver onto the cleanup stack.
leave
System-wide error codes, including KErrNoMemory.
Creates custom resolver object with aResolverUid UID. The method leaves custom resolver onto the cleanup stack.
leave
System-wide error codes, including KErrNoMemory.

Parameters

TUid aResolverUid Custom resolver UID.
CRegistryResolveTransaction * aRegistryResolveTransaction A pointer to Registry resolve transaction object

CreateResolverLC(const TUid &, CRegistryResolveTransaction *)

CResolver * CreateResolverLC ( const TUid & aResolverUid,
CRegistryResolveTransaction * aRegistryResolveTransaction
) [private]
Intended Usage: Creates resolver object with aResolverUid UID. The method leaves resolver onto the cleanup stack.
leave
System-wide error codes, including KErrNoMemory.
Creates resolver object with aResolverUid UID. The method leaves resolver onto the cleanup stack.
leave
System-wide error codes, including KErrNoMemory.

Parameters

const TUid & aResolverUid Resolver UID.
CRegistryResolveTransaction * aRegistryResolveTransaction A pointer to Registry resolve transaction object

DropSession()

void DropSession ( )
Intended Usage : (Server Session management) Destroy a session connection with a client. Error Condition : None.
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The appropriate CEComServerSession has been destroyed and the ECom client has been disconnected from this server.

GetImplementationInformationL(const TUid &, CImplementationInformation *&, const TClientRequest &)

void GetImplementationInformationL ( const TUid & aImplementationUid,
CImplementationInformation *& aImplInfo,
const TClientRequest & aClientRequest
)

Get implementation info for one implementation, and return to client

Parameters

const TUid & aImplementationUid A UID specifying the required implementation.
CImplementationInformation *& aImplInfo Return value, implementation info for client. If the call succeeds, it will point to the found implementation information in registrydata. The function does not return ownership of the pointer, so the caller must not destroy it.
const TClientRequest & aClientRequest client's request

GetResolvedDllInfoL(const TUid, TEntry &, TUid &, const TClientRequest &)

void GetResolvedDllInfoL ( const TUid aImplementationUid,
TEntry & aDllInfo,
TUid & aInstanceKey,
const TClientRequest & aClientRequest
)
Intended Usage :Instantiate an interface implementation to satisfy the specified interface. Error Condition : Lack of memory, or not connected.
leave
KErrNoMemory
leave
KErrNotConnected
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The requested interface implementation is identified, and the instantiation method pointer is returned.

Parameters

const TUid aImplementationUid A UID specifying the required interface implementation.
TEntry & aDllInfo containing the Dll info to be loaded on the client side
TUid & aInstanceKey A 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequest client's request

GetResolvedDllInfoL(const TUid, const TEComResolverParams &, const RExtendedInterfacesArray &, TEntry &, TUid &, const TClientRequest &)

void GetResolvedDllInfoL ( const TUid aInterfaceUid,
const TEComResolverParams & aAdditionalParameters,
const RExtendedInterfacesArray & aExtendedInterfaces,
TEntry & aDllInfo,
TUid & aInstanceKey,
const TClientRequest & aClientRequest
)
Intended Usage :Instantiate an interface implementation to satisfy the specified interface. Error Condition : Lack of memory
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The requested interface implementation is identified, and the instantiation method pointer is returned.

Parameters

const TUid aInterfaceUid A UID specifying the required interface.
const TEComResolverParams & aAdditionalParameters A descriptor specifying any additional implementation characteristics to be fulfilled.
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
TEntry & aDllInfo containing the Dll info to be loaded on the client side
TUid & aInstanceKey A 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequest client's request

GetResolvedDllInfoL(const TUid, const TEComResolverParams &, const TUid, const RExtendedInterfacesArray &, TEntry &, TUid &, const TClientRequest &)

void GetResolvedDllInfoL ( const TUid aInterfaceUid,
const TEComResolverParams & aAdditionalParameters,
const TUid aResolverUid,
const RExtendedInterfacesArray & aExtendedInterfaces,
TEntry & aDllInfo,
TUid & aInstanceKey,
const TClientRequest & aClientRequest
)
Intended Usage :Instantiate an interface implementation to satisfy the specified interface. Overload with a client provided CResolver . Error Condition : Lack of memory
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The requested interface implementation is identified, and the instantiation method pointer is returned.

Parameters

const TUid aInterfaceUid A UID specifying the required interface.
const TEComResolverParams & aAdditionalParameters A descriptor specifying any additional implementation characteristics to be fulfilled.
const TUid aResolverUid
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
TEntry & aDllInfo containing the Dll info to be loaded on the client side
TUid & aInstanceKey A 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequest client's request

IsCachable(TBool)

TBool IsCachable ( TBool aEntryIsOnRWDrive ) [private]

Determine if a resolver entry is cachable.

Parameters

TBool aEntryIsOnRWDrive

IsSSA(RFs &)

TBool IsSSA ( RFs & aFs )
Intended Usage : Reads the EComSrvr.ini file to determine if ECOM should be SSA or not.
Pre-condition
CEComServer must have been fully constructed.

Parameters

RFs & aFs A reference to a connected file server session.

ListImplementationsL(TUid, const TEComResolverParams &, const RExtendedInterfacesArray &, const TClientRequest &)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
const TEComResolverParams & aAdditionalParameters,
const RExtendedInterfacesArray & aExtendedInterfaces,
const TClientRequest & aMessage
)
Intended Usage : Retrieve a list of all the implementations which satisfy the specified interface. Error Condition : Lack of memory.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RImplInfoArray* contains the list of CImplementationInformations regigistered for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
const TEComResolverParams & aAdditionalParameters A descriptor specifying any additional implementation characteristics to be fulfilled.
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessage Client's request

ListImplementationsL(TUid, const RExtendedInterfacesArray &, const TClientRequest &)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
const RExtendedInterfacesArray & aExtendedInterfaces,
const TClientRequest & aMessage
)
Intended Usage : Retrieve a list of all the implementations which satisfy the specified interface. Error Condition : Lack of memory.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RImplInfoArray* contains the list of CImplementationInformations regigistered for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessage Client's request

ListImplementationsL(TUid, const TEComResolverParams &, TUid, const RExtendedInterfacesArray &, const TClientRequest &)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
const TEComResolverParams & aAdditionalParameters,
TUid aResolverUid,
const RExtendedInterfacesArray & aExtendedInterfaces,
const TClientRequest & aMessage
)
Intended Usage : Retrieve a list of all the implementations which satisfy the specified interface. Error Condition : Lack of memory.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RImplInfoArray* contains the list of CImplementationInformations regigistered for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
const TEComResolverParams & aAdditionalParameters A descriptor specifying any additional implementation characteristics to be fulfilled.
TUid aResolverUid The CResolver implementation to use.
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessage Client's request

ListImplementationsL(TUid, TUid, const RExtendedInterfacesArray &, const TClientRequest &)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
TUid aResolverUid,
const RExtendedInterfacesArray & aExtendedInterfaces,
const TClientRequest & aMessage
)
Intended Usage : Retrieve a list of all the implementations which satisfy the specified interface. Error Condition : Lack of memory.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RPointerArray<TUid>* contains the list of Implementations for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
TUid aResolverUid The CResolver implementation to use.
const RExtendedInterfacesArray & aExtendedInterfaces Identifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessage Client's request

ListImplementationsL(TUid, const TEComResolverParams &, CResolver *)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
const TEComResolverParams & aAdditionalParameters,
CResolver * aResolver
) const [private]
Intended Usage : Helper method to retrieve a list of all the implementations which satisfy the specified interface. Overload with a provided CResolver*.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RPointerArray<TUid>* contains the list of Implementations for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
const TEComResolverParams & aAdditionalParameters A descriptor specifying any additional implementation characteristics to be fulfilled.
CResolver * aResolver A CResolver with client defined behaviour.

ListImplementationsL(TUid, CResolver *)

RImplInfoArray * ListImplementationsL ( TUid aInterfaceUid,
CResolver * aResolver
) const [private]
Intended Usage : Helper method to retrieve a list of all the implementations which satisfy the specified interface. Overload with a provided CResolver*.
leave
KErrNoMemory
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has not changed, and RPointerArray<TUid>* contains the list of Implementations for the interface.

Parameters

TUid aInterfaceUid A UID specifying the required interface.
CResolver * aResolver A CResolver with client defined behaviour.

NewLC()

CEComServer * NewLC ( ) [static]
Intended Usage : Standardised safe construction which leaves the returned object on the cleanup stack. Error Condition : Cannot fully construct because of memory limitations.
leave
KErrNoMemory
leave
RFs , CRegistryData , CRegistrar , CDefaultResolver
leave
CShutdownTimer & CServer::StartL
Since
7.0
Pre-condition
None
Post-condition
CEComServer is fully constructed, initialised, and remains upon the cleanup stack.

NewSessionL(const TVersion &, const RMessage2 &)

CSession2 * NewSessionL ( const TVersion & aVersion,
const RMessage2 & aMessage
) const [private, virtual]
Intended Usage : Creates a new CEComServerSession to handle client service requests.
leave
KErrNoMemory
leave
CSharableSession
Pre-condition
CEComServer must have been fully constructed.
Post-condition
CEComServer has created a new CEComServerSession .

Parameters

const TVersion & aVersion
const RMessage2 & aMessage

Notification(TInt)

void Notification ( TInt aNotificationCode )
Intended Usage : The overloaded method from the MRegistrarObserver class Used for firing notifications to the client sessions that the underlying registry data has changed. Error Condition : None
Since
7.0
Pre-condition
CEComServer must have been fully constructed.
Post-condition
The CEComServer has notified all its client sessions registered for notifications that the data changed.

Parameters

TInt aNotificationCode

NotifyBUREvent(TAny *)

void NotifyBUREvent ( TAny * aData ) [private]

Called when there is BUR status change.

Parameters

TAny * aData is TCallBackState* indicating start or end of BUR.

NotifyEvents(TAny *, TInt, TAny *)

TInt NotifyEvents ( TAny * aObj,
TInt aEvent,
TAny * aData
) [static]

Callback function. CRegistryData uses this to notify of implementation upgrade. CDiscoverer uses this to notify state changes in SWI/BUR.

Parameters

TAny * aObj Pointer to CEComServer object.
TInt aEvent Identify the event.
TAny * aData Data associated with the callback.

NotifySWIEvent(TAny *)

void NotifySWIEvent ( TAny * aData ) [private]

Called when there is SWI status change.

Parameters

TAny * aData is TCallBackState* indicating start or end of SWI.

NotifyUpgrade(const TUid)

void NotifyUpgrade ( const TUid aImplementationUid ) [private]

This method is called when an implementation is upgraded.

Parameters

const TUid aImplementationUid identify the implementation being upgraded.

RegistryIndexValid()

TBool RegistryIndexValid ( ) const
Intended Usage : Indicates whether the registry index is currently valid. The index will not be valid if discoveries are currently taking place. If the index is not currently valid then calls to ListImplementationsL() cannot be serviced. Error Condition : None.
Since
7.0
Pre-condition
CEComServer is fully constructed

RunError(TInt)

TInt RunError ( TInt aError ) [private, virtual]
Intended Usage : Intercept the panic caused by a RunL leave, to restore the CEComServer object to a sensible state. (called by the Active Scheduler immediately before the Panic). Error Condition : None.
Since
7.0
Pre-condition
CEComServer is fully constructed.
Post-condition
CEComServer has been restored to a sensible state.

Parameters

TInt aError

UpdateSpecialEvents(TUint32, TCallBackState)

void UpdateSpecialEvents ( TUint32 aBit,
TCallBackState aState
) [private]

Updates the BUR/SWI status.

Parameters

TUint32 aBit Indicate which bit to update.
TCallBackState aState Indicate start or end of event.

Member Data Documentation

RFs iFs

RFs iFs [private]

Singleton connection to the file server

CRegistrar * iRegistrar

CRegistrar * iRegistrar [private]

Singleton Registrar to handle the interface registration

CRegistryData * iRegistryData

CRegistryData * iRegistryData [private]

Singleton registry information handler

CRegistryResolveTransaction * iRegistryResolveTransaction

CRegistryResolveTransaction * iRegistryResolveTransaction [private]

Registry resolve transaction object

CCustomResolverCache * iResolverCache

CCustomResolverCache * iResolverCache [private]

cache of recently used custom resolvers.

RLibrary iResolverLibrary

RLibrary iResolverLibrary [private]

Library which is used to load a non-default resolver when required

CServerStartupMgr * iServerStartupMgr

CServerStartupMgr * iServerStartupMgr [private]

CServerStartupMgr object which interacts with Domain Manager

TInt iSessionCount

TInt iSessionCount [private]

The count of the number of sessions open upon this server

CShutdown iShutdown

CShutdown iShutdown [private]

The timer controlling the server shutdown process

TBitFlags32 iSpecialEvents

TBitFlags32 iSpecialEvents [private]

Keep track of special system events such as BUR / SWI in progress