class CMTPDataProvider : public CActive |
Implements the API portion of the API/SPI interface pair by which MTP framework and data provider plug-ins interact. A unique CMTPDataProvider instance is created and bound to each CMTPDataProviderPlugin instance that is loaded, and functions on its behalf to: a) Process MTP operational and media object data to and from the MTP framework, and; b) Manage MTP transaction protocol state transitions to ensure that the MTP transaction state remains valid under both normal and error recovery processing conditions.
Private Member Functions | |
---|---|
CMTPDataProvider(TUint, TUid, CMTPDataProviderConfig *) | |
void | ConstructL() |
void | DoCancel() |
TInt | RunError(TInt) |
void | RunL() |
void | Schedule() |
void | SendErrorResponseL(TInt) |
Public Member Enumerations | |
---|---|
enum | TEnumerationStates { EUnenumerated = 0x00000000, EObjectsEnumerationState = 0x0000000F, EObjectsEnumerating = 0x00000003, EObjectsEnumerated = 0x00000001, EStoragesEnumerationState = 0x000000F0, EStoragesEnumerating = 0x00000030, EStoragesEnumerated = 0x00000010, EEnumerated = (EStoragesEnumerated | EObjectsEnumerated) } |
Inherited Enumerations | |
---|---|
CActive:TPriority |
Inherited Attributes | |
---|---|
CActive::iStatus |
CMTPDataProvider | ( | TUint | aId, |
TUid | aImplementationUid, | ||
CMTPDataProviderConfig * | aConfig | ||
) | [private] |
Constructor.
TUint aId | The data provider identifier. |
TUid aImplementationUid | The data provider implementation UID. |
CMTPDataProviderConfig * aConfig | The data provider configurability parameter data. Ownership IS transfered. |
void | ConstructL | ( | ) | [private] |
void | DoCancel | ( | ) | [private, virtual] |
Implements cancellation of an outstanding request.
This function is called as part of the active object's Cancel().
It must call the appropriate cancel function offered by the active object's asynchronous service provider. The asynchronous service provider's cancel is expected to act immediately.
DoCancel() must not wait for event completion; this is handled by Cancel().
IMPORT_C TUint | EnumerationState | ( | ) | const |
Provides the data provider's enumeration state.
void | ExecuteEventL | ( | const TMTPTypeEvent & | aEvent, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeEvent & aEvent | |
MMTPConnection & aConnection |
IMPORT_C void | ExecuteProxyRequestL | ( | const TMTPTypeRequest & | aRequest, |
MMTPConnection & | aConnection, | |||
MMTPTransactionProxy & | aProxy | |||
) |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection | |
MMTPTransactionProxy & aProxy |
void | ExecuteRequestL | ( | const TMTPTypeRequest & | aRequest, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
IMPORT_C TUid | ImplementationUid | ( | ) | const |
Provides the data provider's implementation UID
TInt | LinearOrderDPId | ( | const TUint * | aDPId, |
const CMTPDataProvider & | aObject | |||
) | [static] |
Implements a TLinearOrder for CMTPDataProvider objects based on relative CMTPDataProvider::DataProviderId.
const TUint * aDPId | The Dataprovider ID to match. |
const CMTPDataProvider & aObject |
TInt | LinearOrderDPId | ( | const CMTPDataProvider & | aL, |
const CMTPDataProvider & | aR | |||
) | [static] |
Implements a TLinearOrder for CMTPDataProvider objects based on relative CMTPDataProvider::DataProviderId.
const CMTPDataProvider & aL | The first object instance. |
const CMTPDataProvider & aR | The second object instance. |
TInt | LinearOrderEnumerationPhase | ( | const CMTPDataProvider & | aL, |
const CMTPDataProvider & | aR | |||
) | [static] |
Implements a TLinearOrder for CMTPDataProvider objects based on relative enumeration phase
const CMTPDataProvider & aL | The first object instance. |
const CMTPDataProvider & aR | The second object instance. |
TInt | LinearOrderUid | ( | const TUid * | aUid, |
const CMTPDataProvider & | aObject | |||
) | [static] |
Implements a linear order relation for CMTPDataProvider objects based on relative CMTPDataProvider::ImplementationUid.
const TUid * aUid | The implementation UID object to match. |
const CMTPDataProvider & aObject | The object instance to match. |
TInt | LinearOrderUid | ( | const CMTPDataProvider & | aL, |
const CMTPDataProvider & | aR | |||
) | [static] |
Implements a TLinearOrder for CMTPDataProvider objects based on relative CMTPDataProvider::ImplementationUid.
const CMTPDataProvider & aL | The first object instance. |
const CMTPDataProvider & aR | The second object instance. |
CMTPDataProvider * | NewL | ( | TUint | aId, |
TUid | aImplementationUid, | |||
CMTPDataProviderConfig * | aConfig | |||
) | [static] |
TUint aId | The data provider identifier. |
TUid aImplementationUid | The data provider implementation UID. |
CMTPDataProviderConfig * aConfig | The data provider configurability parameter data. Ownership IS transfered. |
CMTPDataProvider * | NewLC | ( | TUint | aId, |
TUid | aImplementationUid, | |||
CMTPDataProviderConfig * | aConfig | |||
) | [static] |
TUint aId | |
TUid aImplementationUid | The data provider implementation UID. |
CMTPDataProviderConfig * aConfig | The data provider configurability parameter data. Ownership IS transfered. |
void | NotifyFrameworkL | ( | TMTPNotificationToFramework | aNotification, |
const TAny * | aParams | |||
) |
TMTPNotificationToFramework aNotification | |
const TAny * aParams |
void | ObjectEnumerationCompleteL | ( | TUint32 | aStorageId | ) |
TUint32 aStorageId |
IMPORT_C CMTPDataProviderPlugin & | Plugin | ( | ) | const |
Provides the handle of the bound data provider plug-in.
void | ReceiveDataL | ( | MMTPType & | aData, |
const TMTPTypeRequest & | aRequest, | |||
MMTPConnection & | aConnection | |||
) |
MMTPType & aData | |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
void | RegisterPendingRequest | ( | TUint | aTimeOut = 0 | ) |
TUint aTimeOut = 0 |
void | RouteRequestRegisterL | ( | const TMTPTypeRequest & | aRequest, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
void | RouteRequestUnregisterL | ( | const TMTPTypeRequest & | aRequest, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
void | RunL | ( | ) | [private, virtual] |
Handles an active object's request completion event.
A derived class must provide an implementation to handle the completed request. If appropriate, it may issue another request.
The function is called by the active scheduler when a request completion event occurs, i.e. after the active scheduler's WaitForAnyRequest() function completes.
Before calling this active object's RunL() function, the active scheduler has:
1. decided that this is the highest priority active object with a completed request
2. marked this active object's request as complete (i.e. the request is no longer outstanding)
RunL() runs under a trap harness in the active scheduler. If it leaves, then the active scheduler calls RunError() to handle the leave.
Note that once the active scheduler's Start() function has been called, all user code is run under one of the program's active object's RunL() or RunError() functions.
CActiveScheduler::Start CActiveScheduler::Error CActiveScheduler::WaitForAnyRequest TRAPD
void | SendDataL | ( | const MMTPType & | aData, |
const TMTPTypeRequest & | aRequest, | |||
MMTPConnection & | aConnection | |||
) |
const MMTPType & aData | |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
void | SendErrorResponseL | ( | TInt | aError | ) | [private] |
TInt aError | The error code. |
void | SendEventL | ( | const TMTPTypeEvent & | aEvent, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeEvent & aEvent | |
MMTPConnection & aConnection |
void | SendEventL | ( | const TMTPTypeEvent & | aEvent | ) |
const TMTPTypeEvent & aEvent |
void | SendResponseL | ( | const TMTPTypeResponse & | aResponse, |
const TMTPTypeRequest & | aRequest, | |||
MMTPConnection & | aConnection | |||
) |
const TMTPTypeResponse & aResponse | |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
IMPORT_C TBool | Supported | ( | TMTPSupportCategory | aCategory, |
TUint | aCode | |||
) | const |
TMTPSupportCategory aCategory | |
TUint aCode |
IMPORT_C const RArray< TUint > & | SupportedCodes | ( | TMTPSupportCategory | aCategory | ) | const |
TMTPSupportCategory aCategory |
void | TransactionCompleteL | ( | const TMTPTypeRequest & | aRequest, |
MMTPConnection & | aConnection | |||
) |
const TMTPTypeRequest & aRequest | |
MMTPConnection & aConnection |
The enumeration state bit flags.
EUnenumerated = 0x00000000 | |
EObjectsEnumerationState = 0x0000000F | |
EObjectsEnumerating = 0x00000003 | |
EObjectsEnumerated = 0x00000001 | |
EStoragesEnumerationState = 0x000000F0 | |
EStoragesEnumerating = 0x00000030 | |
EStoragesEnumerated = 0x00000010 | |
EEnumerated = (EStoragesEnumerated | EObjectsEnumerated) |
__FLOG_DECLARATION_MEMBER_MUTABLE | [private] |
FLOGGER debug trace member variable.
CMTPDataProviderConfig * | iConfig | [private] |
The data provider configurability parameter data.
TBool | iConstructed | [private] |
The construction completed flag. This is used to indicate that ownership of passed objects has been assumed.
CMTPConnection * | iCurrentConnection | [private] |
The MTP connection on which the currently active operation is being processed.
const TMTPTypeRequest * | iCurrentRequest | [private] |
The MTP request dataset buffer.
TMTPTransactionPhase | iCurrentTransactionPhase | [private] |
The transaction phase of the currently active operation.
TInt | iErrorRecovery | [private] |
The error recovery flag, indicating that an error occurred while processing a request.
CMTPDataProviderPlugin * | iImplementation | [private] |
The data provider implementation plug-in.
MMTPTransactionProxy * | iProxy | [private] |
The currently active transaction proxy.
TMTPTransactionPhase | iProxyTransactionPhase | [private] |
The transaction phase of the currently active transaction proxy.
RPointerArray< CSupportedCodes > | iSupported | [private] |
The data provider's support categories table.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.