|
1 /** @file |
|
2 * Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: CUpnpFileSender declaration |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef UPNPFILESENDER_H |
|
19 #define UPNPFILESENDER_H |
|
20 |
|
21 // INCLUDES |
|
22 #include <e32std.h> |
|
23 #include <e32base.h> |
|
24 #include "httptransferobserver.h" |
|
25 |
|
26 class CHttpUploader; |
|
27 class CUpnpHttpMessage; |
|
28 class CUpnpControlPoint; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * CUpnpFileSender |
|
34 * |
|
35 */ |
|
36 NONSHARABLE_CLASS( CUpnpFileSender ) : public CBase, public MHttpTransferObserver |
|
37 { |
|
38 public: |
|
39 // Constructors and destructor |
|
40 |
|
41 /** |
|
42 * Destructor. |
|
43 */ |
|
44 ~CUpnpFileSender(); |
|
45 |
|
46 /** |
|
47 * Two-phased constructor. |
|
48 */ |
|
49 static CUpnpFileSender* NewL( CUpnpControlPoint& aCPToNotifyOfSendingResult ); |
|
50 |
|
51 /** |
|
52 * Two-phased constructor. |
|
53 */ |
|
54 static CUpnpFileSender* NewLC( CUpnpControlPoint& aCPToNotifyOfSendingResult ); |
|
55 |
|
56 /** |
|
57 * Send particular file by http post |
|
58 * Message should have post method and outfilenama set, and proper destination |
|
59 * address set. Response will be notified to control point object |
|
60 */ |
|
61 void SendL( CUpnpHttpMessage& aMessageToSend ); |
|
62 |
|
63 private: |
|
64 //from MHttpTransferObserver |
|
65 |
|
66 virtual void TransferProgress( TAny* aKey, |
|
67 TInt aBytes, |
|
68 TInt aTotalBytes ); |
|
69 |
|
70 virtual void ReadyForTransferL( TAny* aKey ); |
|
71 |
|
72 virtual void TransferCompleted( TAny* aKey, TInt aStatus ); |
|
73 |
|
74 private: |
|
75 |
|
76 /** |
|
77 * Constructor for performing 1st stage construction |
|
78 */ |
|
79 CUpnpFileSender( CUpnpControlPoint& aCPToNotifyOfSendingResult ); |
|
80 |
|
81 /** |
|
82 * EPOC default constructor for performing 2nd stage construction |
|
83 */ |
|
84 void ConstructL(); |
|
85 |
|
86 private: |
|
87 |
|
88 // control point, not owned |
|
89 CUpnpControlPoint& iControlPoint; |
|
90 |
|
91 CHttpUploader* iUploader; |
|
92 |
|
93 }; |
|
94 |
|
95 #endif // UPNPFILESENDER_H |