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()
voidAddSession()
voidDropSession()
voidGetImplementationInformationL(const TUid &, CImplementationInformation *&, const TClientRequest &)
voidGetResolvedDllInfoL(const TUid, TEntry &, TUid &, const TClientRequest &)
voidGetResolvedDllInfoL(const TUid, const TEComResolverParams &, const RExtendedInterfacesArray &, TEntry &, TUid &, const TClientRequest &)
voidGetResolvedDllInfoL(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()
voidNotification(TInt)
TInt NotifyEvents(TAny *, TInt, TAny *)
TBool RegistryIndexValid()
Private Member Functions
CEComServer()
voidConstructL()
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 &)
voidNotifyBUREvent(TAny *)
voidNotifySWIEvent(TAny *)
voidNotifyUpgrade(const TUid)
TInt RunError(TInt)
voidUpdateSpecialEvents(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()

voidAddSession()
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()

voidConstructL()[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(TUidaResolverUid,
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 aResolverUidCustom resolver UID.
CRegistryResolveTransaction * aRegistryResolveTransactionA 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 & aResolverUidResolver UID.
CRegistryResolveTransaction * aRegistryResolveTransactionA pointer to Registry resolve transaction object

DropSession()

voidDropSession()
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 &)

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

Get implementation info for one implementation, and return to client

Parameters

const TUid & aImplementationUidA UID specifying the required implementation.
CImplementationInformation *& aImplInfoReturn 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 & aClientRequestclient's request

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

voidGetResolvedDllInfoL(const TUidaImplementationUid,
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 aImplementationUidA UID specifying the required interface implementation.
TEntry & aDllInfocontaining the Dll info to be loaded on the client side
TUid & aInstanceKeyA 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequestclient's request

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

voidGetResolvedDllInfoL(const TUidaInterfaceUid,
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 aInterfaceUidA UID specifying the required interface.
const TEComResolverParams & aAdditionalParametersA descriptor specifying any additional implementation characteristics to be fulfilled.
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
TEntry & aDllInfocontaining the Dll info to be loaded on the client side
TUid & aInstanceKeyA 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequestclient's request

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

voidGetResolvedDllInfoL(const TUidaInterfaceUid,
const TEComResolverParams &aAdditionalParameters,
const TUidaResolverUid,
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 aInterfaceUidA UID specifying the required interface.
const TEComResolverParams & aAdditionalParametersA descriptor specifying any additional implementation characteristics to be fulfilled.
const TUid aResolverUid
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
TEntry & aDllInfocontaining the Dll info to be loaded on the client side
TUid & aInstanceKeyA 32 bit identifer returned by ECom to identify this instance to the framework.
const TClientRequest & aClientRequestclient's request

IsCachable(TBool)

TBool IsCachable(TBoolaEntryIsOnRWDrive)[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 & aFsA reference to a connected file server session.

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

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
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 aInterfaceUidA UID specifying the required interface.
const TEComResolverParams & aAdditionalParametersA descriptor specifying any additional implementation characteristics to be fulfilled.
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessageClient's request

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

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
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 aInterfaceUidA UID specifying the required interface.
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessageClient's request

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

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
const TEComResolverParams &aAdditionalParameters,
TUidaResolverUid,
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 aInterfaceUidA UID specifying the required interface.
const TEComResolverParams & aAdditionalParametersA descriptor specifying any additional implementation characteristics to be fulfilled.
TUid aResolverUidThe CResolver implementation to use.
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessageClient's request

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

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
TUidaResolverUid,
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 aInterfaceUidA UID specifying the required interface.
TUid aResolverUidThe CResolver implementation to use.
const RExtendedInterfacesArray & aExtendedInterfacesIdentifies a set of zero or more extended interfaces to match. Must match all extended interfaces for a match to occur.
const TClientRequest & aMessageClient's request

ListImplementationsL(TUid, const TEComResolverParams &, CResolver *)

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
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 aInterfaceUidA UID specifying the required interface.
const TEComResolverParams & aAdditionalParametersA descriptor specifying any additional implementation characteristics to be fulfilled.
CResolver * aResolverA CResolver with client defined behaviour.

ListImplementationsL(TUid, CResolver *)

RImplInfoArray *ListImplementationsL(TUidaInterfaceUid,
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 aInterfaceUidA UID specifying the required interface.
CResolver * aResolverA 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)

voidNotification(TIntaNotificationCode)
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 *)

voidNotifyBUREvent(TAny *aData)[private]

Called when there is BUR status change.

Parameters

TAny * aDatais TCallBackState* indicating start or end of BUR.

NotifyEvents(TAny *, TInt, TAny *)

TInt NotifyEvents(TAny *aObj,
TIntaEvent,
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 * aObjPointer to CEComServer object.
TInt aEventIdentify the event.
TAny * aDataData associated with the callback.

NotifySWIEvent(TAny *)

voidNotifySWIEvent(TAny *aData)[private]

Called when there is SWI status change.

Parameters

TAny * aDatais TCallBackState* indicating start or end of SWI.

NotifyUpgrade(const TUid)

voidNotifyUpgrade(const TUidaImplementationUid)[private]

This method is called when an implementation is upgraded.

Parameters

const TUid aImplementationUididentify 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(TIntaError)[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)

voidUpdateSpecialEvents(TUint32aBit,
TCallBackStateaState
)[private]

Updates the BUR/SWI status.

Parameters

TUint32 aBitIndicate which bit to update.
TCallBackState aStateIndicate 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