CMTPParserRouter Class Reference

class CMTPParserRouter : public CBase

Implements the MTP framework parser/router singleton.

The MTP framework parser/router singleton is responsible for directing received MTP operation request (and event) datasets to the appropriate data provider(s) for processing, and performs the following major functions:

1. Parses received operation request and event datasets to extract and coarse grain validate routing data (ParseOperationRequestL). 2. Executes one or more routing algorithms to select the set of data provider targets able to service the operation or event (RouteOperationRequestL). 3. (Optionally) dispatches the request or event (ProcessRequestL).There are two basic scenarios which the parser/router must handle, and a different set of APIs is provided for each. These scenarios are:

1. The initial routing of operations as they are first received. This routing is initiated by the MTP framework using the ProcessRequestL API. This API executes all three of the functions identified above. 2. The secondary routing of those operations which cannot be dispatched directly. Either because they require the combined processing capabilities of multiple data providers to produce an aggregated response, or; because they cannot be routed using data available during the operation request phase and can only be routed to their final target using data available during the operation data phase. This secondary routing is performed by the MTP framework's proxy data provider using the ParseOperationRequestL and RouteOperationRequestL APIs. These APIs respectively execute the first two functions identified above, which are separated in order to allow additional information to be added to the routing data by the proxy data provider. The third function identified above is not executed in this scenario, since a very different dispatching mechanism must be used by the proxy data provider.The parser/router implements a number of different routing algorithm types, some of which are further decomposed into sub-types to achieve a finer level of routing granularity and control. In combination these algorithms support the following general routing mechanisms:

1. Device - A subset of device oriented MTP operations are always dispatched to the device data provider. 2. Proxy - A subset of MTP operations cannot be dispatched directly. Either they require the combined processing capabilities of multiple data providers to produce an aggregated response, or cannot be routed using data available from the operation dataset alone. These operations are dispatched to the proxy data provider for additional processing. 3. Object Handle - MTP object handles generated by the MTP framework are encoded with a data provider identifier to efficiently route those MTP operations which supply an object handle as a parameter. 4. StorageID - MTP storage identifiers generated by the MTP framework are encoded with a data provider identifier to efficiently route those MTP operations which supply a storage identifier as a parameter. 5. Operation Parameter - On being loaded each data provider supplies a set of configuration data (MTP operation codes, event codes, object property codes, device property codes, and storage system types) which collectively define the set of MTP operation requests that it wishes to receive. 6. Request Registration - Data providers may optionally register MTP operation request datasets with the framework which, when subsequently matched, will be routed to them. This mechanism is used to route those MTP operation types which are paired to complete over two transaction cycles (e.g. SendObjectInfo/SendObject). It may also be used to route vendor extension operation requests.

The following routing algorithm types are implemeted:

1. Operation Parameter Routing

Operation parameter routing is the primary routing mechanism and by default is enabled for both initial and secondary proxy routing scenarios. Operation parameter routing involves selecting one or more data provider targets using routing data obtained from or related to the supplied operation dataset parameters using one of the following sub-types:

o Parameter lookup routing sub-types, which match operation dataset parameter data with the set of supported capabilities registered by each data provider on being loaded, or; o Parameter decode routing sub-types, which extract data provider target identifiers encoded into the parameter data itself.

The parameter lookup routing sub-types are table driven and utilise binary search techniques to minimise processing overhead. The following parameter lookup routing sub-types (tables) are implemented, each characterised by the combination of parameters they require to map to a routing target:

o DevicePropCode o ObjectPropCode o OperationCode o StorageType o FormatCode + FormatSubcode o FormatCode + OperationCode o StorageType + OperationCode o FormatCode + FormatSubcode + StorageType

These routing tables may be further characterised by modifier flags which e.g. allow or disallow duplicate entries, or specify ascending or descending sort orders which in turn can manipulate the order in which proxy targets are processed.

The parameter decode routing sub-types extract routing target identifiers directly from the operation dataset parameter data itself. The following parameter decode routing sub-types are implemented:

o Object Handle o StorageID

2. Framework Routing

By default, framework routing is enabled during initial operation routing only and not during secondary proxy routing. Framework routing directs a sub-set of MTP operations to one or other of the framework data providers. Using one of the following routing sub-types:

o Device DP. A fixed sub-set of MTP operations are always dispatched to the device data provider. o Proxy DP. A fixed sub-set of MTP operations are always dispatched to the proxy data provider. In addition, any operations which yield multiple routing targets will also be routed to the proxy data provider.

3. Request Registration Routing

By default, request registration routing is enabled during initial operation routing only and not during secondary proxy routing. Data providers may optionally register MTP operation request datasets with the framework which, when subsequently matched, will be routed to them. This mechanism is used to process those MTP operation types which are paired to complete over two transaction cycles (e.g. SendObjectInfo/SendObject). It may also be used to route vendor extension operation requests.

Request registration routing does not implement any routing sub-types.

Inherits from

Public Member Functions
~CMTPParserRouter()
IMPORT_C voidConfigureL()
CMTPParserRouter *NewL()
IMPORT_C TBoolOperationSupportedL(TUint16)
IMPORT_C voidParseOperationRequestL(TRoutingParameters &)
voidProcessEventL(const TMTPTypeEvent &, CMTPConnection &)
voidProcessRequestL(const TMTPTypeRequest &, CMTPConnection &)
IMPORT_C voidRouteOperationRequestL(const TRoutingParameters &, RArray< TUint > &)
voidRouteRequestRegisterL(const TMTPTypeRequest &, MMTPConnection &, TInt)
IMPORT_C TBoolRouteRequestRegisteredL(const TMTPTypeRequest &, MMTPConnection &)
voidRouteRequestUnregisterL(const TMTPTypeRequest &, MMTPConnection &)
Private Member Functions
CMTPParserRouter()
voidConfigure1ParameterMapL(TUint, const RArray< TUint > &)
voidConfigure2ParameterMapL(TUint, const RArray< TUint > &, const RArray< TUint > &)
voidConfigure3ParameterMapL(TUint, const RArray< TUint > &, const RArray< TUint > &, const RArray< TUint > &)
voidConstructL()
TUint Flags(TUint)
voidGetConfigParametersL(const CMTPDataProvider &, const RArray< TUint > &, RArray< TUint > &)
voidGetMapParameterIdsL(TUint, RArray< TUint > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesCopyMoveRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesDeleteObjectPropListL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesDeleteRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesGetFormatCapabilitiesL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesGetObjectPropListRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
voidGetRoutingSubTypesSendObjectPropListRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)
TUint Index(TUint)
TUint Params(TUint)
TUint ParamsCount(TUint)
voidParseOperationRequestParameterL(TMTPTypeRequest::TElements, TRoutingParameters::TParameterType, TRoutingParameters &)
voidRouteOperationRequest0ParametersL(TUint, const TRoutingParameters &, RArray< TUint > &)
voidRouteOperationRequestNParametersL(TUint, const TRoutingParameters &, RArray< TUint > &)
TUint RoutingTargetL(const TMTPTypeRequest &, CMTPConnection &)
voidSelectSubTypeRoutingL(TRoutingSubType, RArray< TUint > &, RArray< TUint > &, RArray< TRoutingParameters > &)
voidSelectSubTypeValidationL(TRoutingSubType, RArray< TUint > &)
voidSelectTargetL(TUint, RArray< TUint > &)
TUint SubType(TUint, TUint, TUint)
voidValidateOperationRequestParametersL(TRoutingParameters &)
voidValidateTargetsL(const TRoutingParameters &, const RArray< TUint > &, RArray< TUint > &)
Inherited Functions
CBase::CBase()
CBase::Delete(CBase *)
CBase::Extension_(TUint,TAny *&,TAny *)
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()
Private Member Enumerations
enumTRoutingParams { EParam1 = 0, EParam2 = 1, EParam3 = 2 }
enumTRoutingSubType {
ESubTypeIndexMask = 0x0000FFFF, ESubTypeFlagMask = 0x00FF0000, ESubTypeFlagNone = 0x00000000, ESubTypeFlagEnableDuplicates = 0x00010000, ESubTypeFlagOrderDescending = 0x00020000, ESubTypeParamsMask = 0xFF000000, ESubTypeParams0 = 0x00000000, ESubTypeParams1 = 0x01000000, ESubTypeParams2 = 0x02000000, ESubTypeParams3 = 0x03000000, ESubTypeDevicePropCode = (0x00000000 | ESubTypeParams1 | ESubTypeFlagNone), ESubTypeObjectPropCode = (0x00000001 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates), ESubTypeOperationCode = (0x00000002 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates), ESubTypeStorageType = (0x00000003 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates), ESubTypeFormatCodeFormatSubcode = (0x00000004 | ESubTypeParams2 | (ESubTypeFlagEnableDuplicates | ESubTypeFlagOrderDescending)), ESubTypeFormatCodeOperationCode = (0x00000005 | ESubTypeParams2 | ESubTypeFlagEnableDuplicates), ESubTypeStorageTypeOperationCode = (0x00000006 | ESubTypeParams2 | ESubTypeFlagEnableDuplicates), ESubTypeFormatCodeFormatSubcodeStorageType = (0x00000007 | ESubTypeParams3 | ESubTypeFlagNone), ESubTypeServiceIDOperationCode = (0x00000008 | ESubTypeParams1 | ESubTypeFlagNone), ESubTypeDpDevice = (0x00000009 | ESubTypeParams0 | ESubTypeFlagNone), ESubTypeDpProxy = (0x0000000A | ESubTypeParams0 | ESubTypeFlagNone), ESubTypeOwnerObject = (0x0000000B | ESubTypeParams0 | ESubTypeFlagNone), ESubTypeOwnerStorage = (0x0000000C | ESubTypeParams0 | ESubTypeFlagNone), ESubTypeRequestRegistration = (0x0000000D | ESubTypeParams0 | ESubTypeFlagNone)
}
enumTRoutingType {
ETypeFlagMask = 0xFF000000, ETypeFlagSingleTarget = 0x01000000, ETypeMask = 0x0000FFFF, ETypeFramework = 0x00000001, ETypeOperationParameter = 0x00000002, ETypeRequestRegistration = 0x00000004
}
Private Attributes
__FLOG_DECLARATION_MEMBER_MUTABLE
RPointerArray< CMap >iMaps
RMTPFramework iSingletons

Constructor & Destructor Documentation

CMTPParserRouter()

CMTPParserRouter()[private]

Constructor.

~CMTPParserRouter()

~CMTPParserRouter()[virtual]

Destructor

Member Functions Documentation

Configure1ParameterMapL(TUint, const RArray< TUint > &)

voidConfigure1ParameterMapL(TUintaSubType,
const RArray< TUint > &aP1Codes
)[private]
Configures (loads) the specified one lookup parameter routing sub-type map. The map is constructed by interrogating each data provider in turn and building a set of map table entries which resolve each supported TMTPSupportCategory code to its data provider (target) identifier. TMTPSupportCategory codes which comprise the first lookup parameter.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aSubTypeThe routing sub-type identifier.
const RArray< TUint > & aP1CodesThe set of

Configure2ParameterMapL(TUint, const RArray< TUint > &, const RArray< TUint > &)

voidConfigure2ParameterMapL(TUintaSubType,
const RArray< TUint > &aP1Codes,
const RArray< TUint > &aP2Codes
)[private]
Configures (loads) the specified two lookup parameter routing sub-type map. The map is constructed by interrogating each data provider in turn and building a set of map table entries which resolve each combination of supported TMTPSupportCategory codes to its data provider (target) identifier. TMTPSupportCategory codes which comprise the first lookup parameter. TMTPSupportCategory codes which comprise the second lookup parameter.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aSubTypeThe routing sub-type identifier.
const RArray< TUint > & aP1CodesThe set of
const RArray< TUint > & aP2CodesThe set of

Configure3ParameterMapL(TUint, const RArray< TUint > &, const RArray< TUint > &, const RArray< TUint > &)

voidConfigure3ParameterMapL(TUintaSubType,
const RArray< TUint > &aP1Codes,
const RArray< TUint > &aP2Codes,
const RArray< TUint > &aP3Codes
)[private]
Configures (loads) the specified three lookup parameter routing sub-type map. The map is constructed by interrogating each data provider in turn and building a set of map table entries which resolve each combination of supported TMTPSupportCategory codes to its data provider (target) identifier. TMTPSupportCategory codes which comprise the first lookup parameter. TMTPSupportCategory codes which comprise the second lookup parameter. TMTPSupportCategory codes which comprise the third lookup parameter.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aSubTypeThe routing sub-type identifier.
const RArray< TUint > & aP1CodesThe set of
const RArray< TUint > & aP2CodesThe set of
const RArray< TUint > & aP3CodesThe set of

ConfigureL()

IMPORT_C voidConfigureL()
Configures the parser/router. This processing primarily involves retrieving each data provider's set of supported category codes and using them to build up the operation parameter lookup routing sub-type tables.
leave
One of the system wide error codes, if a processing failure occurs.

ConstructL()

voidConstructL()[private]

Second-phase constructor.

Flags(TUint)

TUint Flags(TUintaSubType)[private, static]

Provides the routing sub-type modifier flags of the specified routing sub-type.

Parameters

TUint aSubTypeThe routing sub-type identifier.

GetConfigParametersL(const CMTPDataProvider &, const RArray< TUint > &, RArray< TUint > &)

voidGetConfigParametersL(const CMTPDataProvider &aDp,
const RArray< TUint > &aCodes,
RArray< TUint > &aParams
)const [private]
Obtains the set of supported TMTPSupportCategory code parameter values supported by the specified data provider. TMTPSupportCategory codes which comprise the parameter.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

const CMTPDataProvider & aDpThe data provider.
const RArray< TUint > & aCodesThe set of
RArray< TUint > & aParamsOn exit, the set of supported parameter values.

GetMapParameterIdsL(TUint, RArray< TUint > &, RArray< TUint > &, RArray< TUint > &)

voidGetMapParameterIdsL(TUintaSubType,
RArray< TUint > &aP1Codes,
RArray< TUint > &aP2Codes,
RArray< TUint > &aP3Codes
)[private, static]
Provides the set of TMTPSupportCategory codes which comprise each of the lookup parameters for the specified routing sub-type (routing map). TMTPSupportCategory codes which comprise the first lookup parameter. This set will be empty if the routing sub-type implements fewer than one parameter. TMTPSupportCategory codes which comprise the second lookup parameter. This set will be empty if the routing sub-type implements fewer than two parameters. TMTPSupportCategory codes which comprise the third lookup parameter. This set will be empty if the routing sub-type implements fewer than three parameters.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aSubTypeThe routing sub-type identifier.
RArray< TUint > & aP1CodesOn exit, the set of
RArray< TUint > & aP2CodesOn exit, the set of
RArray< TUint > & aP3Codes

GetRoutingSubTypesCopyMoveRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesCopyMoveRequestL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]
Provides the set of operation parameter routing and validation sub-types to be executed against each of the specified MTP CopyObject and MoveObject operation routing parameter data.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.
RArray< TUint > & aRoutingSubTypesOn exit, the set of routing sub-types to be executed.
RArray< TUint > & aValidationSubTypesOn exit, the set of validation sub-types to be executed.

GetRoutingSubTypesDeleteObjectPropListL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesDeleteObjectPropListL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]

Parameters

RArray< TRoutingParameters > & aParams
RArray< TUint > & aRoutingSubTypes
RArray< TUint > & aValidationSubTypes

GetRoutingSubTypesDeleteRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesDeleteRequestL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]
Provides the set of operation parameter routing and validation sub-types to be executed against each of the specified MTP DeleteObject operation routing parameter data.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.
RArray< TUint > & aRoutingSubTypesOn exit, the set of routing sub-types to be executed.
RArray< TUint > & aValidationSubTypesOn exit, the set of validation sub-types to be executed.

GetRoutingSubTypesGetFormatCapabilitiesL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesGetFormatCapabilitiesL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]

Parameters

RArray< TRoutingParameters > & aParams
RArray< TUint > & aRoutingSubTypes
RArray< TUint > & aValidationSubTypes

GetRoutingSubTypesGetObjectPropListRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesGetObjectPropListRequestL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]
Provides the set of operation parameter routing and validation sub-types to be executed against each of the specified MTP GetObjectPropList operation routing parameter data.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.
RArray< TUint > & aRoutingSubTypesOn exit, the set of routing sub-types to be executed.
RArray< TUint > & aValidationSubTypesOn exit, the set of validation sub-types to be executed.

GetRoutingSubTypesL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]
Provides the set of operation parameter routing and validation sub-types to be executed against each of the specified operation routing parameter data.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.
RArray< TUint > & aRoutingSubTypesOn exit, the set of routing sub-types to be executed.
RArray< TUint > & aValidationSubTypesOn exit, the set of validation sub-types to be executed.

GetRoutingSubTypesSendObjectPropListRequestL(RArray< TRoutingParameters > &, RArray< TUint > &, RArray< TUint > &)

voidGetRoutingSubTypesSendObjectPropListRequestL(RArray< TRoutingParameters > &aParams,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes
)const [private]
Provides the set of operation parameter routing and validation sub-types to be executed against each of the specified MTP SendObjectPropList operation routing parameter data.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.
RArray< TUint > & aRoutingSubTypesOn exit, the set of routing sub-types to be executed.
RArray< TUint > & aValidationSubTypesOn exit, the set of validation sub-types to be executed.

Index(TUint)

TUint Index(TUintaSubType)[private, static]

Provides the routing sub-type (map) index of the specified routing sub-type.

Parameters

TUint aSubTypeThe routing sub-type identifier.

NewL()

CMTPParserRouter *NewL()[static]
CMTPParserRouter factory method.
leave
One of the system wide error codes if a processing failure occurs.

OperationSupportedL(TUint16)

IMPORT_C TBoolOperationSupportedL(TUint16aOperation)const
Indicates if the specified MTP operation code is supported by any of the set of loaded data providers.
leave
One of the system wide error codes, if a processing failure occurs.

Parameters

TUint16 aOperationThe MTP operation code.

Params(TUint)

TUint Params(TUintaSubType)[private, static]

Provides the routing sub-type parameter count type of the specified routing sub-type.

Parameters

TUint aSubTypeThe routing sub-type identifier.

ParamsCount(TUint)

TUint ParamsCount(TUintaSubType)[private, static]

Provides the routing sub-type parameter count of the specified routing sub-type.

Parameters

TUint aSubTypeThe routing sub-type identifier.

ParseOperationRequestL(TRoutingParameters &)

IMPORT_C voidParseOperationRequestL(TRoutingParameters &aParams)const

Parses the operation dataset supplied in the specified routing parameters object which encapsulates all information required to route the operation. The parsing process involves:

1. Extracting all relevant routing information from the received operation dataset. Note that not all parameter data is extracted, only that which is required to route the operation. 2. Coarse grain validating the parsed data. Specifically this involves validating that any MTP StorageID or Object Handle parameter data refers to valid entities that exist on the device. 3. Extracting additional meta-data related to specific data objects and/or storages referred to in the operation dataset and which is required to route the operation.

leave
One of the system wide error codes if a processing failure occurs,

Parameters

TRoutingParameters & aParamsThe routing parameters object. On entry this contains the operation dataset to be parsed and the handle of the MTP connection on which it was received. On exit this contains all information required to route the operation.

ParseOperationRequestParameterL(TMTPTypeRequest::TElements, TRoutingParameters::TParameterType, TRoutingParameters &)

voidParseOperationRequestParameterL(TMTPTypeRequest::TElementsaParam,
TRoutingParameters::TParameterTypeaType,
TRoutingParameters &aParams
)const [private]
Parses the specified MTP operation request dataset to extract the specified parameter value together with any applicable meta-data. The parameter value will be extracted only if not null (0x00000000).
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TMTPTypeRequest::TElements aParamThe operation request dataset parameter identifier.
TRoutingParameters::TParameterType aTypeThe operation request dataset parameter type.
TRoutingParameters & aParamsThe operation routing parameter data, updated on exit with the parameter value together with any associated meta-data.

ProcessEventL(const TMTPTypeEvent &, CMTPConnection &)

voidProcessEventL(const TMTPTypeEvent &aEvent,
CMTPConnection &aConnection
)const
Routes and dispatches the specified MTP event dataset. The only valid event that is accepted is CancelTransaction, all other event types are discarded. Events are routed to the same target to which the currently active operation was dispatched. If there is no active transaction in progress then the event will be discarded.
leave
One of the system wide error codes, if a processing failure occurs.

Parameters

const TMTPTypeEvent & aEventThe MTP event dataset.
CMTPConnection & aConnectionThe MTP connection on which the event was received.

ProcessRequestL(const TMTPTypeRequest &, CMTPConnection &)

voidProcessRequestL(const TMTPTypeRequest &aRequest,
CMTPConnection &aConnection
)const
Routes and dispatches the specified MTP operation (request) dataset.
leave
One of the system wide error codes, if a processing failure occurs.

Parameters

const TMTPTypeRequest & aRequestThe MTP operation (request) dataset.
CMTPConnection & aConnectionThe MTP connection on which the event was received.

RouteOperationRequest0ParametersL(TUint, const TRoutingParameters &, RArray< TUint > &)

voidRouteOperationRequest0ParametersL(TUintaRoutingSubType,
const TRoutingParameters &aParams,
RArray< TUint > &aTargets
)const [private]
Resolves set of zero or more routing targets using the specified parameterless routing sub-type.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aRoutingSubTypeThe routing sub-type.
const TRoutingParameters & aParamsThe operation routing parameter data.
RArray< TUint > & aTargetsOn exit, the seto of resolved routing targets.

RouteOperationRequestL(const TRoutingParameters &, RArray< TUint > &)

IMPORT_C voidRouteOperationRequestL(const TRoutingParameters &aParams,
RArray< TUint > &aTargets
)const
Routes an MTP operation using the specified routing parameters. By default only operation parameter routing is performed.
leave
One of the system wide error codes if a processing failure occurs,

Parameters

const TRoutingParameters & aParamsThe routing parameters.
RArray< TUint > & aTargetsOne exit, the set of data provider targets to which the operation should be dispatched.

RouteOperationRequestNParametersL(TUint, const TRoutingParameters &, RArray< TUint > &)

voidRouteOperationRequestNParametersL(TUintaRoutingSubType,
const TRoutingParameters &aParams,
RArray< TUint > &aTargets
)const [private]
Resolves set of zero or more routing targets using the specified lookup parameter based routing sub-type.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aRoutingSubTypeThe routing sub-type.
const TRoutingParameters & aParamsThe operation routing parameter data.
RArray< TUint > & aTargetsOn exit, the seto of resolved routing targets.

RouteRequestRegisterL(const TMTPTypeRequest &, MMTPConnection &, TInt)

voidRouteRequestRegisterL(const TMTPTypeRequest &aRequest,
MMTPConnection &aConnection,
TIntaId
)
Registers the calling data provider to receive one or more occurrences of the specified request dataset that are received on the specified connection.
leave
One of the system wide error codes, if a processing failure occurs.
MMTPDataProviderFramework::RouteRequestRegisterL

Parameters

const TMTPTypeRequest & aRequestThe operation request dataset being registered.
MMTPConnection & aConnectionThe handle of the MTP connection on which the operation request is expected to be received.
TInt aIdThe data provider identifier.

RouteRequestRegisteredL(const TMTPTypeRequest &, MMTPConnection &)

IMPORT_C TBoolRouteRequestRegisteredL(const TMTPTypeRequest &aRequest,
MMTPConnection &aConnection
)const
Indicates if a routing request with the specified MTP operation code is registered on the specified session.
leave
One of the system wide error codes, if a processing failure occurs.

Parameters

const TMTPTypeRequest & aRequestThe MTP operation requesty dataset specifying MTP operation code and session.
MMTPConnection & aConnectionThe handle of the MTP connection on which the operation request is expected to be received.

RouteRequestUnregisterL(const TMTPTypeRequest &, MMTPConnection &)

voidRouteRequestUnregisterL(const TMTPTypeRequest &aRequest,
MMTPConnection &aConnection
)
Cancels a pending RouteRequestRegisterL registration.
leave
One of the system wide error codes, if a general processing error occurs.
MMTPDataProviderFramework::RouteRequestUnregisterL

Parameters

const TMTPTypeRequest & aRequestThe registered operation request dataset.
MMTPConnection & aConnectionThe handle of the MTP connection for which the operation request was registered.

RoutingTargetL(const TMTPTypeRequest &, CMTPConnection &)

TUint RoutingTargetL(const TMTPTypeRequest &aRequest,
CMTPConnection &aConnection
)const [private]

Provides a single suitable routing target for the specified request. A target is selected such that:

1. Any request that resolves to multiple targets will always be directed to the proxy data provider. 2. Any request that cannot be resolved to at least one target will always be directed to the device data provider.

leave
One of the system wide error codes, if a general processing error occurs.

Parameters

const TMTPTypeRequest & aRequestThe operation request dataset of the MTP operation to be routed.
CMTPConnection & aConnectionThe MTP connection on which the operation request is being processed.

SelectSubTypeRoutingL(TRoutingSubType, RArray< TUint > &, RArray< TUint > &, RArray< TRoutingParameters > &)

voidSelectSubTypeRoutingL(TRoutingSubTypeaSubType,
RArray< TUint > &aRoutingSubTypes,
RArray< TUint > &aValidationSubTypes,
RArray< TRoutingParameters > &aParams
)const [private]
Selects the specified routing sub-type together with any applicable validation sub-types.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TRoutingSubType aSubTypeThe selected routing sub-type.
RArray< TUint > & aRoutingSubTypesThe set of selected routing sub-types, updated on exit.
RArray< TUint > & aValidationSubTypesThe set of selected validation sub-types, potentially updated on exit.
RArray< TRoutingParameters > & aParamsThe set of operation routing parameter data.

SelectSubTypeValidationL(TRoutingSubType, RArray< TUint > &)

voidSelectSubTypeValidationL(TRoutingSubTypeaSubType,
RArray< TUint > &aValidationSubTypes
)const [private]
Selects the specified validation sub-type.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TRoutingSubType aSubTypeThe selected validation sub-type.
RArray< TUint > & aValidationSubTypesThe set of selected validation sub-types, updated on exit.

SelectTargetL(TUint, RArray< TUint > &)

voidSelectTargetL(TUintaTarget,
RArray< TUint > &aTargets
)[private, static]
Selects the specified data provider target identifier by appending it to the set of selected targets. Each target identifier may only appear once in the set of selected targets. A selected target which is already a member of the selected set will be replaced to ensure that targets are dispatched in order of most recent selection.
leave
One of the system wide error codes, if a general processing error occurs.

Parameters

TUint aTargetThe data provider target identifier.
RArray< TUint > & aTargetsThe set of selected targets.

SubType(TUint, TUint, TUint)

TUint SubType(TUintaIndex,
TUintaFlags,
TUintaParamsCount
)[private, static]

Encodes a routing sub-type identifier using the specified sub-field values.

Parameters

TUint aIndexThe routing sub-type (map) index.
TUint aFlagsThe routing sub-type modifier flags.
TUint aParamsCountThe routing sub-type parameter count.

ValidateOperationRequestParametersL(TRoutingParameters &)

voidValidateOperationRequestParametersL(TRoutingParameters &aParams)const [private]

Parameters

TRoutingParameters & aParams

ValidateTargetsL(const TRoutingParameters &, const RArray< TUint > &, RArray< TUint > &)

voidValidateTargetsL(const TRoutingParameters &aParams,
const RArray< TUint > &aValidationSubTypes,
RArray< TUint > &aTargets
)const [private]

Validates the specified set of routing targets.

Parameters

const TRoutingParameters & aParamsThe operation routing parameter data.
const RArray< TUint > & aValidationSubTypesThe set of validation sub-types.
RArray< TUint > & aTargetsThe set of data provider targets to be validated. Invalid targets are removed from this set.

Member Enumerations Documentation

Enum TRoutingParams

Defines the routing parameter IDs.

Enumerators

EParam1 = 0

The first parameter.

EParam2 = 1

The second parameter.

EParam3 = 2

Enum TRoutingSubType

Defines the routing sub-type codes. These codes are partitioned into two sub-fields as follows:

1. Bits 0-15 - routing sub-type (map) index. 2. Bits 16-23 - routing sub-type modifier flags. 3. Bits 24-31 - routing sub-type parameter count type.

Enumerators

ESubTypeIndexMask = 0x0000FFFF

The routing sub-type identifier (table index) mask.

ESubTypeFlagMask = 0x00FF0000

The routing sub-type modifier bit flags mask.

ESubTypeFlagNone = 0x00000000

The null flag bits.

ESubTypeFlagEnableDuplicates = 0x00010000

The duplicates enabled flag bits. When set this flag indicates that duplicate routing table entries are permitted.

ESubTypeFlagOrderDescending = 0x00020000

The order descending flag bits. When set this flag indicates that routing table entries are to be arranged in descending rather than ascending order.

ESubTypeParamsMask = 0xFF000000

The routing sub-type parameter count mask.

ESubTypeParams0 = 0x00000000

The zero parameter count code.

ESubTypeParams1 = 0x01000000

The one parameter count code.

ESubTypeParams2 = 0x02000000

The two parameter count code.

ESubTypeParams3 = 0x03000000

The three parameter count code.

ESubTypeDevicePropCode = (0x00000000 | ESubTypeParams1 | ESubTypeFlagNone)

The DevicePropCode operation parameter lookup routing sub-type.

ESubTypeObjectPropCode = (0x00000001 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates)

The ObjectPropCode operation parameter lookup routing sub-type.

ESubTypeOperationCode = (0x00000002 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates)

The OperationCode operation parameter lookup routing sub-type.

ESubTypeStorageType = (0x00000003 | ESubTypeParams1 | ESubTypeFlagEnableDuplicates)

The StorageType operation parameter lookup routing sub-type.

ESubTypeFormatCodeFormatSubcode = (0x00000004 | ESubTypeParams2 | (ESubTypeFlagEnableDuplicates | ESubTypeFlagOrderDescending))

The FormatCode + FormatSubcode operation parameter lookup routing sub-type.

ESubTypeFormatCodeOperationCode = (0x00000005 | ESubTypeParams2 | ESubTypeFlagEnableDuplicates)

The FormatCode + OperationCode operation parameter lookup routing sub-type.

ESubTypeStorageTypeOperationCode = (0x00000006 | ESubTypeParams2 | ESubTypeFlagEnableDuplicates)

The StorageType + OperationCode operation parameter lookup routing sub-type.

ESubTypeFormatCodeFormatSubcodeStorageType = (0x00000007 | ESubTypeParams3 | ESubTypeFlagNone)

The FormatCode + FormatSubcode + StorageType operation parameter lookup routing sub-type.

ESubTypeServiceIDOperationCode = (0x00000008 | ESubTypeParams1 | ESubTypeFlagNone)

The ServiceID operation parameter lookup routing sub-type.

ESubTypeDpDevice = (0x00000009 | ESubTypeParams0 | ESubTypeFlagNone)

The device DP framework routing sub-type.

ESubTypeDpProxy = (0x0000000A | ESubTypeParams0 | ESubTypeFlagNone)

The proxy DP framework routing sub-type.

ESubTypeOwnerObject = (0x0000000B | ESubTypeParams0 | ESubTypeFlagNone)

The object owner operation parameter decode routing sub-type.

ESubTypeOwnerStorage = (0x0000000C | ESubTypeParams0 | ESubTypeFlagNone)

The storage owner operation parameter decode routing sub-type.

ESubTypeRequestRegistration = (0x0000000D | ESubTypeParams0 | ESubTypeFlagNone)

The default request registration routing sub-type.

Enum TRoutingType

Defines the routing type codes. These codes are partitioned into two sub-fields as follows:

1. Bits 0-15 - routing type identifier. 2. Bits 16-23 - unused. 3. Bits 24-31 - routing type modifier flags.

Enumerators

ETypeFlagMask = 0xFF000000

The routing type modifier flags mask.

ETypeFlagSingleTarget = 0x01000000

The single target flag. When set this flag will result in at most one eligible routing target being selected. If multiple eligible targets exists then the first eligible target will be selected.

ETypeMask = 0x0000FFFF

The routing type identifier mask.

ETypeFramework = 0x00000001

The framework routing type identifier.

ETypeOperationParameter = 0x00000002

The operation parameter routing type identifier.

ETypeRequestRegistration = 0x00000004

The request registration routing type identifier.

Member Data Documentation

__FLOG_DECLARATION_MEMBER_MUTABLE

__FLOG_DECLARATION_MEMBER_MUTABLE[private]

FLOGGER debug trace member variable.

RPointerArray< CMap > iMaps

RPointerArray< CMap >iMaps[private]

The operation parameter routing sub-type map tables.

RMTPFramework iSingletons

RMTPFramework iSingletons[private]

The framework singletons.