00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef MTPDATAPROVIDERPLUGINEXAMPLE_H
00017 #define MTPDATAPROVIDERPLUGINEXAMPLE_H
00018
00019 #include <mtp/cmtpdataproviderplugin.h>
00020
00021
00022 class MMTPExampleDpRequestProcessor;
00023 class CMTPObjectMetaData;
00024
00028 class CMTPExampleDataProvider :
00029 public CMTPDataProviderPlugin
00030 {
00031 public:
00032 static TAny* NewL(TAny* aParams);
00033 virtual ~CMTPExampleDataProvider();
00034
00035 private:
00036
00037 void Cancel();
00038 void ProcessEventL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection);
00039 void ProcessNotificationL(TMTPNotification aNotification, const TAny* aParams);
00040 void ProcessRequestPhaseL(TMTPTransactionPhase aPhase, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection);
00041 void SessionClosedL(const TMTPNotificationParamsSessionChange& aSession);
00042 void SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession);
00043 void StartObjectEnumerationL(TUint32 aStorageId);
00044 void StartStorageEnumerationL();
00045 void Supported(TMTPSupportCategory aCategory, RArray<TUint>& aArray) const;
00046 void SupportedL(TMTPSupportCategory aCategory, CDesCArray& aStrings) const;
00047
00048 TAny* GetExtendedInterface(TUid aInterfaceUid);
00049
00050 private:
00051 CMTPExampleDataProvider(TAny* aParams);
00052 void ConstructL();
00053
00054 TInt LocateRequestProcessorL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection);
00055 TInt LocateRequestProcessorL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection);
00056
00057 private:
00058
00059 RPointerArray<MMTPExampleDpRequestProcessor> iActiveProcessors;
00060 TInt iActiveProcessor;
00061 TBool iActiveProcessorRemoved;
00062 };
00063
00064 #endif // MTPDATAPROVIDERPLUGINEXAMPLE_H