|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 |
|
22 #ifndef CMTPPICTBRIDGEDP_H |
|
23 #define CMTPPICTBRIDGEDP_H |
|
24 |
|
25 #include <mtp/cmtpdataproviderplugin.h> |
|
26 #include <comms-infras/commsdebugutility.h> |
|
27 |
|
28 #include "mmtppictbridgeenumeratorcallback.h" |
|
29 #include "cmtprequestprocessor.h" |
|
30 #include "mtpdebug.h" |
|
31 |
|
32 class CMTPPictBridgeEnumerator; |
|
33 class CPtpServer; |
|
34 |
|
35 /** |
|
36 Implements the pictbridge data provider plugin. |
|
37 */ |
|
38 |
|
39 class CMTPPictBridgeDataProvider: |
|
40 public CMTPDataProviderPlugin, |
|
41 public MMTPPictBridgeEnumeratorCallback |
|
42 { |
|
43 public: |
|
44 |
|
45 static TAny* NewL(TAny* aParams); |
|
46 ~CMTPPictBridgeDataProvider(); |
|
47 const CPtpServer* PtpServer()const {return iServerP;} |
|
48 |
|
49 public: |
|
50 TUint32 DeviceDiscoveryHandle() const; |
|
51 |
|
52 public: // From CMTPDataProviderPlugin |
|
53 |
|
54 void Cancel(); |
|
55 void ProcessEventL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection); |
|
56 void ProcessNotificationL(TMTPNotification aNotification, const TAny* aParams); |
|
57 void ProcessRequestPhaseL(TMTPTransactionPhase aPhase, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
58 void StartObjectEnumerationL(TUint32 aStorageId, TBool aPersistentFullEnumeration); |
|
59 void StartStorageEnumerationL(); |
|
60 void Supported (TMTPSupportCategory aCategory, RArray<TUint>& aArray) const; |
|
61 void SupportedL(TMTPSupportCategory aCategory, CDesCArray& aStrings) const; |
|
62 |
|
63 private: // From MMTPEnumerationCallback |
|
64 |
|
65 void NotifyStorageEnumerationCompleteL(); |
|
66 void NotifyEnumerationCompleteL(TUint32 aStorageId, TInt aError); |
|
67 |
|
68 private: |
|
69 CMTPPictBridgeDataProvider(TAny* aParams); |
|
70 void ConstructL(); |
|
71 TInt LocateRequestProcessorL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection); |
|
72 TInt LocateRequestProcessorL(const TMTPTypeEvent& aEvent, MMTPConnection& aConnection); |
|
73 void SessionClosedL(const TMTPNotificationParamsSessionChange& aSession); |
|
74 void SessionOpenedL(const TMTPNotificationParamsSessionChange& aSession); |
|
75 |
|
76 private: |
|
77 CMTPPictBridgeEnumerator* iPictBridgeEnumeratorP; // owned |
|
78 CPtpServer* iServerP; // owned |
|
79 |
|
80 /** |
|
81 The active request processors table. |
|
82 */ |
|
83 RPointerArray<MMTPRequestProcessor> iActiveProcessors; |
|
84 /** |
|
85 FLOGGER debug trace member variable. |
|
86 */ |
|
87 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
88 }; |
|
89 |
|
90 #endif // CMTPPICTBRIDGEDP_H |
|
91 |