|
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 CPTPRECEIVEDMSGHANDLER_H |
|
23 #define CPTPRECEIVEDMSGHANDLER_H |
|
24 |
|
25 #include <e32debug.h> |
|
26 #include "ptpdef.h" |
|
27 #include "rptp.h" |
|
28 |
|
29 class CPtpServer; |
|
30 |
|
31 /** |
|
32 * Ptp Message Handler class |
|
33 * Handles PTP Operations and Responses, |
|
34 **/ |
|
35 NONSHARABLE_CLASS(CPtpReceivedMsgHandler) : public CBase |
|
36 { |
|
37 public: |
|
38 |
|
39 /** |
|
40 * 2-phased constructor. |
|
41 * @param |
|
42 * @return None. |
|
43 */ |
|
44 static CPtpReceivedMsgHandler* NewL(CPtpServer* aServerP); |
|
45 |
|
46 |
|
47 |
|
48 /** |
|
49 * C++ destructor. |
|
50 * @return None. |
|
51 **/ |
|
52 ~CPtpReceivedMsgHandler(); |
|
53 |
|
54 /** |
|
55 * Performs Initialization |
|
56 * @return None. |
|
57 **/ |
|
58 void Initialize(); |
|
59 |
|
60 |
|
61 /** |
|
62 * Register for Receive Object Notification |
|
63 * @param aExtension, File Extension |
|
64 * @return None. |
|
65 **/ |
|
66 void RegisterReceiveObjectNotify(const TDesC& aExtention); |
|
67 |
|
68 /** |
|
69 * RegisterSendObjectNotify |
|
70 * @return None. |
|
71 **/ |
|
72 void DeRegisterReceiveObjectNotify(); |
|
73 |
|
74 /** |
|
75 * Handles Object received |
|
76 * @return None. |
|
77 **/ |
|
78 TBool ObjectReceived(TUint32 aHandle); |
|
79 |
|
80 private: |
|
81 /** |
|
82 * C++ constructor. |
|
83 * @return None. |
|
84 **/ |
|
85 CPtpReceivedMsgHandler(CPtpServer* aServerP); |
|
86 void ConstructL(); |
|
87 private: |
|
88 |
|
89 CPtpServer* iServerP; // not owned |
|
90 |
|
91 // the handle of the rceived object |
|
92 TUint32 iReceiveHandle; |
|
93 |
|
94 TBuf<KFileExtLength> iExtension; |
|
95 |
|
96 // transaction IDs |
|
97 TUint32 iTransactionID; |
|
98 |
|
99 RArray<TUint32> iReceiveQ; |
|
100 /** |
|
101 FLOGGER debug trace member variable. |
|
102 */ |
|
103 __FLOG_DECLARATION_MEMBER_MUTABLE; |
|
104 }; |
|
105 #endif // CPTPRECEIVEDMSGHANDLER_H |
|
106 |
|
107 |