ProtocolManager Class Reference

class ProtocolManager

Member Functions Documentation

AddDependencyL(const TDesC &, const TDesC &)

void AddDependencyL ( 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 & aDependentsList list of dependant components to be loaded
const TDesC & aModuleToLoad The module for which the dependency is added

CleanupProtocol(TAny *)

void CleanupProtocol ( TAny * aProtocol ) [private, static]

Parameters

TAny * aProtocol

FindAndLoadProtocolL(const TDesC &, TProtocolType)

CProtocolBase * FindAndLoadProtocolL ( const TDesC & aName,
TProtocolType aType = 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 ( TUint aAddrFamily,
TUint aSockType,
TUint aProtocol
) [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 ( TInt anAddrFamily,
TUint aSocketType,
TInt aProtocol
) [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 & aTag The protocol tag based on which the dependancy list is searched
TPtrC & aList A list of components dependant on aTag protocol which are returned

InitL()

void InitL ( ) [static]

Init data structures and hunt for protocols.

LoadProtocolL(TUint, TUint, TUint, CPlayer *)

void LoadProtocolL ( TUint anAddrFamily,
TUint aSocketType,
TUint aProtocol,
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 ( TUint anAddrFamily,
TUint aSocketType,
CPlayer * aPlayer,
const TSubSessionUniqueId aSubSessionUniqueId
) [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,
TUint aAddrFamily,
TUint aSockType,
TUint aProtocol
) [static]

Parameters

TAny * aParams
TUint aAddrFamily
TUint aSockType
TUint aProtocol

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

ESock::CNetDatabase * NewNetDatabaseL ( TUint anAddrFamily,
TUint aSocketType,
CPlayer * aPlayer,
const TSubSessionUniqueId aSubSessionUniqueId
) [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 ( TUint anAddrFamily,
TUint aSocketType,
TUint aProtocolId,
CPlayer * aPlayer,
const TSubSessionUniqueId aSubSessionUniqueId
) [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()

void ProcessIniDataL ( ) [static]

ProtocolInfo(TUint, TProtocolDesc &)

TInt ProtocolInfo ( TUint anIndex,
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 *)

void SafeCleanupProtocol ( 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 * aProtocolRef pointer to the CProtocolRef instance whose protocol needs to be deleted

ShutDown(void)

void ShutDown ( void ) [private, static]

free data structures

Parameters

void

TransferSocketL(ESock::CSocket *, CPlayer *)

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

Parameters

ESock::CSocket * aSocket
CPlayer * aPlayer

UnLoadProtocolL(TUint, TUint, TUint, CPlayer *)

void UnLoadProtocolL ( TUint anAddrFamily,
TUint aSocketType,
TUint aProtocol,
CPlayer * aPlayer
) [static]

Do the opposite of the above function

Parameters

TUint anAddrFamily
TUint aSocketType
TUint aProtocol
CPlayer * aPlayer