author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 04 Oct 2010 00:13:15 +0300 | |
changeset 72 | 6f657153cbc5 |
parent 43 | 35b64624a9e7 |
permissions | -rw-r--r-- |
31 | 1 |
/* |
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: mms creation mode checks |
|
15 |
* |
|
16 |
*/ |
|
17 |
||
18 |
#ifndef MMS_CONFORMANCE_CHECK_OPERATION_H |
|
19 |
#define MMS_CONFORMANCE_CHECK_OPERATION_H |
|
20 |
||
21 |
#include <QObject> |
|
22 |
||
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
23 |
#include <MsgMediaInfo.h> |
31 | 24 |
#include <qstring.h> |
25 |
||
72
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
26 |
#ifdef MSGUI_UNIT_TEST |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
27 |
#define MSGUI_UTILS_DLL_EXPORT |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
28 |
#else |
31 | 29 |
#ifdef BUILD_MSGUI_UTILS_DLL |
72
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
30 |
#define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT |
31 | 31 |
#else |
72
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
32 |
#define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
33 |
#endif |
31 | 34 |
#endif |
35 |
||
36 |
class CMmsConformance; |
|
37 |
class CMsgMediaResolver; |
|
38 |
class CDRMHelper; |
|
39 |
class HbAction; |
|
40 |
||
41 |
enum MmsConformanceCheckErrors |
|
42 |
{ |
|
43 |
EInsertSuccess = 0, EInsertQueryAbort, EInsertNotSupported |
|
44 |
}; |
|
45 |
||
46 |
/** |
|
47 |
* This class provides interfaces which validate the media for |
|
48 |
* insertion into editor and also validates if the mms message |
|
49 |
* can be forwarded. |
|
50 |
* |
|
51 |
*/ |
|
52 |
||
53 |
class MSGUI_UTILS_DLL_EXPORT MmsConformanceCheck : public QObject |
|
54 |
{ |
|
55 |
Q_OBJECT |
|
56 |
||
57 |
public: |
|
58 |
||
59 |
/** |
|
60 |
* Constructor |
|
61 |
*/ |
|
62 |
MmsConformanceCheck(); |
|
63 |
||
64 |
/** |
|
65 |
* Destructor |
|
66 |
*/ |
|
67 |
~MmsConformanceCheck(); |
|
68 |
||
69 |
/** |
|
70 |
* Checks if the file passes conformance checks |
|
71 |
* @param file, filepath |
|
72 |
* @param showNote, note is shown if enabled |
|
73 |
* @return EInsertSuccess for successfull cases |
|
74 |
*/ |
|
75 |
int checkModeForInsert(const QString& file,bool showNote = true); |
|
76 |
||
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
77 |
/** |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
78 |
* Validates if message can be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
79 |
* The validation checks include slide count check,MMS size check and |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
80 |
* media conformance checks and this fucntion should be called only for mms |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
81 |
* @param messageId message Id of the message to be validate |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
82 |
* @return true if message can be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
83 |
* false if message cant be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
84 |
*/ |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
85 |
bool validateMsgForForward(int messageId); |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
86 |
|
31 | 87 |
private: |
88 |
||
89 |
/* |
|
90 |
* Launch notification dialog |
|
91 |
*/ |
|
92 |
void showPopup(const QString& text); |
|
93 |
||
94 |
private slots: |
|
95 |
||
96 |
/** |
|
97 |
* This slot is called when insert media dialog is launched. |
|
98 |
* @param action selected action (yes or no). |
|
99 |
*/ |
|
100 |
void onDialogInsertMedia(HbAction* action); |
|
101 |
private: |
|
102 |
||
103 |
/* |
|
104 |
* Mms creation mode |
|
105 |
*/ |
|
106 |
TInt iCreationMode; |
|
107 |
||
108 |
/** |
|
109 |
* Max MMS composition size |
|
110 |
*/ |
|
111 |
int iMaxMmsSize; |
|
112 |
||
113 |
/** |
|
114 |
* Conformance status |
|
115 |
*/ |
|
116 |
TUint32 iConfStatus; |
|
72
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
117 |
|
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
118 |
#ifdef MSGUI_UNIT_TEST |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
119 |
/** |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
120 |
* Unit Testing |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
121 |
*/ |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
122 |
friend class TestMmsConformanceCheck; |
6f657153cbc5
Revision: 201037
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
43
diff
changeset
|
123 |
#endif |
31 | 124 |
}; |
125 |
#endif //MMS_CONFORMANCE_CHECK_OPERATION_H |