ProtocolManager Class Reference

class ProtocolManager

Member Functions Documentation

AddDependencyL(const TDesC &, const TDesC &)

voidAddDependencyL(const TDesC &aDependentsList,
const TDesC &aModuleToLoad
)[private, static]

Adds a module to the dependency list. Dependency list is of form b,c<d>e,f meaning that module "a" is dependant on "b" and "c" and requires module b and c to be loaded.

Parameters

const TDesC & aDependentsListlist of dependant components to be loaded
const TDesC & aModuleToLoadThe module for which the dependency is added

CleanupProtocol(TAny *)

voidCleanupProtocol(TAny *aProtocol)[private, static]

Parameters

TAny * aProtocol

FindAndLoadProtocolL(const TDesC &, TProtocolType)

CProtocolBase *FindAndLoadProtocolL(const TDesC &aName,
TProtocolTypeaType = ENormalProtocol
)[static]

Find a protocol by name and load it. Caller is responsible for ultimately deleting the protocol

This is for use by extension DLLs as it does not attach the protocol to a session.

Parameters

const TDesC & aName
TProtocolType aType = ENormalProtocol

FindAndLoadProtocolL(TUint, TUint, TUint)

CProtocolBase *FindAndLoadProtocolL(TUintaAddrFamily,
TUintaSockType,
TUintaProtocol
)[static]

Find a protocol by address family, socket type, and protocol ID and load it. Caller is responsible for ultimately deleting the protocol

This is for use by extension DLLs as it does not attach the protocol to a session.

Parameters

TUint aAddrFamily
TUint aSockType
TUint aProtocol

FindProtocolL(TInt, TUint, TInt)

CProtocolRef *FindProtocolL(TIntanAddrFamily,
TUintaSocketType,
TIntaProtocol
)[private, static]

Find a protocol from the lists.

Parameters

TInt anAddrFamily
TUint aSocketType
TInt aProtocol

GetDependency(const TDesC &, TPtrC &)

TBool GetDependency(const TDesC &aTag,
TPtrC &aList
)[static]

Goes through the dependency list and gets the dependant modules for aTag

Parameters

const TDesC & aTagThe protocol tag based on which the dependancy list is searched
TPtrC & aListA list of components dependant on aTag protocol which are returned

InitL()

voidInitL()[static]

Init data structures and hunt for protocols.

LoadProtocolL(TUint, TUint, TUint, CPlayer *)

voidLoadProtocolL(TUintanAddrFamily,
TUintaSocketType,
TUintaProtocol,
CPlayer *aPlayer
)[static]

Manually load the specified protocol This is used by clients who need to ensure that an open call will not take a significant amount of time (e.g. IrCOMM) It effectively makes all the lengthy parts of Open asynchronous.

Parameters

TUint anAddrFamily
TUint aSocketType
TUint aProtocol
CPlayer * aPlayer

NewHostResolverL(TUint, TUint, CPlayer *, const TSubSessionUniqueId)

ESock::CHostResolver *NewHostResolverL(TUintanAddrFamily,
TUintaSocketType,
CPlayer *aPlayer,
const TSubSessionUniqueIdaSubSessionUniqueId
)[static]

Create a new host resolver object

Parameters

TUint anAddrFamily
TUint aSocketType
CPlayer * aPlayer
const TSubSessionUniqueId aSubSessionUniqueId

NewInternalSocketL(TAny *, const TDesC &)

CInternalSocketImpl *NewInternalSocketL(TAny *aParams,
const TDesC &aName
)[static]

Parameters

TAny * aParams
const TDesC & aName

NewInternalSocketL(TAny *, TUint, TUint, TUint)

CInternalSocketImpl *NewInternalSocketL(TAny *aParams,
TUintaAddrFamily,
TUintaSockType,
TUintaProtocol
)[static]

Parameters

TAny * aParams
TUint aAddrFamily
TUint aSockType
TUint aProtocol

NewNetDatabaseL(TUint, TUint, CPlayer *, const TSubSessionUniqueId)

ESock::CNetDatabase *NewNetDatabaseL(TUintanAddrFamily,
TUintaSocketType,
CPlayer *aPlayer,
const TSubSessionUniqueIdaSubSessionUniqueId
)[static]

Create a new database type thang

Parameters

TUint anAddrFamily
TUint aSocketType
CPlayer * aPlayer
const TSubSessionUniqueId aSubSessionUniqueId

NewServiceResolverL(TUint, TUint, TUint, CPlayer *, const TSubSessionUniqueId)

ESock::CServiceResolver *NewServiceResolverL(TUintanAddrFamily,
TUintaSocketType,
TUintaProtocolId,
CPlayer *aPlayer,
const TSubSessionUniqueIdaSubSessionUniqueId
)[static]

Create a new service resolver provider

Parameters

TUint anAddrFamily
TUint aSocketType
TUint aProtocolId
CPlayer * aPlayer
const TSubSessionUniqueId aSubSessionUniqueId

NumProtocols(void)

TUint NumProtocols(void)[static]

Parameters

void

ProcessIniDataL()

voidProcessIniDataL()[static]

ProtocolInfo(TUint, TProtocolDesc &)

TInt ProtocolInfo(TUintanIndex,
TProtocolDesc &aProtocol
)[static]

Parameters

TUint anIndex
TProtocolDesc & aProtocol

ProtocolInfo(const TDesC &, TProtocolDesc &)

TInt ProtocolInfo(const TDesC &aName,
TProtocolDesc &aProtocol
)[static]

Parameters

const TDesC & aName
TProtocolDesc & aProtocol

ProtocolInfo(const TDesC &, TServerProtocolDesc &)

TInt ProtocolInfo(const TDesC &aName,
TServerProtocolDesc &aProtocol
)[static]

Find a protocol by name - no wildcard support.

Parameters

const TDesC & aName
TServerProtocolDesc & aProtocol

SafeCleanupProtocol(TAny *)

voidSafeCleanupProtocol(TAny *aProtocolRef)[private, static]

Try to clean up a protocol instance

This routine is pushed onto the cleanup stack in order to clean up a protocol instance. The check against the protocol pointer being non-NULL is a safety check. This routine was created because ProtocolManager::CleanupProtocol(protocol) was being called in circumstances where the protocol had already gone and the pointer to it had become invalid. This routine takes as argument a pointer to the CProtocolRef instance of the protocol, so that the protocol pointer can be checked against NULL.

Parameters

TAny * aProtocolRefpointer to the CProtocolRef instance whose protocol needs to be deleted

ShutDown(void)

voidShutDown(void)[private, static]

free data structures

Parameters

void

TransferSocketL(ESock::CSocket *, CPlayer *)

voidTransferSocketL(ESock::CSocket *aSocket,
CPlayer *aPlayer
)[static]

Parameters

ESock::CSocket * aSocket
CPlayer * aPlayer

UnLoadProtocolL(TUint, TUint, TUint, CPlayer *)

voidUnLoadProtocolL(TUintanAddrFamily,
TUintaSocketType,
TUintaProtocol,
CPlayer *aPlayer
)[static]

Do the opposite of the above function

Parameters

TUint anAddrFamily
TUint aSocketType
TUint aProtocol
CPlayer * aPlayer