author | vnuitven <> |
Mon, 06 Sep 2010 18:50:40 +0530 | |
branch | rcs |
changeset 50 | 1d8943dd8be6 |
parent 49 | 64c62431ac08 |
permissions | -rw-r--r-- |
49 | 1 |
/* |
50
1d8943dd8be6
changed copy right year to 2010 for all newly added files
vnuitven <>
parents:
49
diff
changeset
|
2 |
* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
49 | 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: |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
||
19 |
||
20 |
#ifndef CMCEMSRPSINK_H |
|
21 |
#define CMCEMSRPSINK_H |
|
22 |
||
23 |
// INCLUDES |
|
24 |
#include <mcemediasink.h> |
|
25 |
#include <e32std.h> |
|
26 |
#include <bamdesca.h> |
|
27 |
#include<uri8.h> |
|
28 |
#include<e32des8.h> |
|
29 |
#include <mcemessagestream.h> |
|
30 |
#include <badesca.h> |
|
31 |
||
32 |
// CONSTANTS |
|
33 |
const TMceSinkType KMceMSRPSink = 5; |
|
34 |
||
35 |
// CLASS DECLARATION |
|
36 |
||
37 |
/** |
|
38 |
* Class representing a MSRP sink (RFC 4975). |
|
39 |
* |
|
40 |
* @lib mceclient.lib |
|
41 |
*/ |
|
42 |
class CMceMsrpSink: public CMceMediaSink |
|
43 |
{ |
|
44 |
public: // Constructors and destructor |
|
45 |
||
46 |
/** |
|
47 |
* Two-phased constructor. |
|
48 |
*/ |
|
49 |
IMPORT_C static CMceMsrpSink* NewL(); |
|
50 |
||
51 |
/** |
|
52 |
* Two-phased constructor. |
|
53 |
*/ |
|
54 |
IMPORT_C static CMceMsrpSink* NewLC(); |
|
55 |
||
56 |
/** |
|
57 |
* Destructor. |
|
58 |
*/ |
|
59 |
IMPORT_C ~CMceMsrpSink(); |
|
60 |
||
61 |
public: // From CMceMediaSink |
|
62 |
||
63 |
/** |
|
64 |
* Sets the sink enabled. |
|
65 |
*/ |
|
66 |
IMPORT_C void EnableL(); |
|
67 |
||
68 |
/** |
|
69 |
* Sets the sink disabled. |
|
70 |
*/ |
|
71 |
IMPORT_C void DisableL(); |
|
72 |
||
73 |
public: // New functions |
|
74 |
||
75 |
/** |
|
76 |
* Gets the value for "path" attribute. |
|
77 |
*/ |
|
78 |
IMPORT_C RPointerArray<TUriC8>& Path(); |
|
79 |
||
80 |
/** |
|
81 |
* Sets the value for "path" attribute. |
|
82 |
*/ |
|
83 |
IMPORT_C void SetPathL( const RPointerArray<TUriC8>& aPath ); |
|
84 |
||
85 |
/** |
|
86 |
* Gets the values for "accept-types" attribute. |
|
87 |
*/ |
|
88 |
IMPORT_C void AcceptTypesL(CDesC8ArrayFlat& aAcceptTypes); |
|
89 |
||
90 |
/** |
|
91 |
* Sets the values for "accept-types" attribute. |
|
92 |
*/ |
|
93 |
IMPORT_C void SetAcceptTypesL( const MDesC8Array& aAcceptTypes ); |
|
94 |
||
95 |
/** |
|
96 |
* Gets the values for "accept-wrapped-types" attribute |
|
97 |
*/ |
|
98 |
||
99 |
IMPORT_C TDes8& AcceptWrappedTypesL(); |
|
100 |
||
101 |
/** |
|
102 |
* Sets the values for "accept-wrapped-types" attribute. |
|
103 |
* @param aAcceptWrappedTypes list of MIME types that are allowed inside compound types |
|
104 |
*/ |
|
105 |
||
106 |
IMPORT_C void SetAcceptWrappedTypesL ( const TDes8& aAcceptWrappedTypes ); |
|
107 |
||
108 |
/** |
|
109 |
* Sets the values for file-selector attributes ('name', 'type', 'size'). |
|
110 |
* @param aName name of the file to be transferred |
|
111 |
* @param aPath path of the file to be transferred |
|
112 |
*/ |
|
113 |
IMPORT_C void SetFileSelectorL(const TDesC& aName = KNullDesC, |
|
114 |
const TDesC8& aFileType = KNullDesC8, |
|
115 |
TUint aSize = 0 ); |
|
116 |
||
117 |
/** |
|
118 |
* Sets the value for file-disposition attribute. |
|
119 |
* @param aDispositionValue indicate a preferred disposition of the file to be transferred |
|
120 |
*/ |
|
121 |
IMPORT_C void SetFileDispositionL (const TDes8& aDispositionValue); |
|
122 |
||
123 |
/** |
|
124 |
* Sets the value for file-transfer-id attribute. |
|
125 |
* @returns the value of the file-transfer-id |
|
126 |
*/ |
|
127 |
IMPORT_C void SetFileTransferIdL (TDes8& aId); |
|
128 |
||
129 |
/** |
|
130 |
* Sets the information attribue. |
|
131 |
* @param aInfo information to be set |
|
132 |
*/ |
|
133 |
IMPORT_C void SetInformationAttrL(const TDes8& aInfo); |
|
134 |
||
135 |
/** |
|
136 |
* Set the path to save the received file in file sharing use case |
|
137 |
* It is mandatory for the clients to set this path to let |
|
138 |
* the MCE know the path where the received file will be shared |
|
139 |
* |
|
140 |
* @Param aFilePath Holds the path to save the received file |
|
141 |
*/ |
|
142 |
IMPORT_C void SetPathToSaveReceivedFile(const TDesC16& aFilePath); |
|
143 |
||
144 |
/* |
|
145 |
* Used to get the file transfer progress notifications like transferred x bytes |
|
146 |
* out of total y file size. This is true by default. |
|
147 |
* @param enableFlag Default value is ETrue. |
|
148 |
*/ |
|
149 |
IMPORT_C void EnableFileTransferProgressNotifications(TBool enableFlag = ETrue); |
|
150 |
||
151 |
public: // for internal purpose |
|
152 |
/** |
|
153 |
* |
|
154 |
*/ |
|
155 |
void InitializeL( CMceMediaStream& aParent ); |
|
156 |
||
157 |
||
158 |
private: |
|
159 |
/** |
|
160 |
* C++ default constructor. |
|
161 |
*/ |
|
162 |
CMceMsrpSink(); |
|
163 |
/** |
|
164 |
* C++ parameterized constructor. |
|
165 |
*/ |
|
166 |
||
167 |
/** |
|
168 |
* Second phase constructior. |
|
169 |
*/ |
|
170 |
void ConstructL(); |
|
171 |
||
172 |
/** |
|
173 |
* Sets the local media port form the MSRP path attribute |
|
174 |
* @par aMsrpUri The Uri from which the port has to be extracted |
|
175 |
* @aStream Sets the local media port with the port extracted form the aMsrpUri |
|
176 |
*/ |
|
177 |
void SetPortFromPathAttrL(TUriC8& aMsrpUri, CMceMessageStream& aStream); |
|
178 |
||
179 |
//for testing |
|
180 |
||
181 |
MCE_UNIT_TEST_DEFS |
|
182 |
}; |
|
183 |
||
184 |
#endif // CMCEMSRPSINK_H |