author | William Roberts <williamr@symbian.org> |
Thu, 22 Jul 2010 16:32:06 +0100 | |
branch | GCC_SURGE |
changeset 47 | 5b14749788d7 |
parent 27 | e4592d119491 |
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 |
||
26 |
#ifdef BUILD_MSGUI_UTILS_DLL |
|
27 |
#define MSGUI_UTILS_DLL_EXPORT Q_DECL_EXPORT |
|
28 |
#else |
|
29 |
#define MSGUI_UTILS_DLL_EXPORT Q_DECL_IMPORT |
|
30 |
#endif |
|
31 |
||
32 |
class CMmsConformance; |
|
33 |
class CMsgMediaResolver; |
|
34 |
class CDRMHelper; |
|
35 |
class HbAction; |
|
36 |
||
37 |
enum MmsConformanceCheckErrors |
|
38 |
{ |
|
39 |
EInsertSuccess = 0, EInsertQueryAbort, EInsertNotSupported |
|
40 |
}; |
|
41 |
||
42 |
/** |
|
43 |
* This class provides interfaces which validate the media for |
|
44 |
* insertion into editor and also validates if the mms message |
|
45 |
* can be forwarded. |
|
46 |
* |
|
47 |
*/ |
|
48 |
||
49 |
class MSGUI_UTILS_DLL_EXPORT MmsConformanceCheck : public QObject |
|
50 |
{ |
|
51 |
Q_OBJECT |
|
52 |
||
53 |
public: |
|
54 |
||
55 |
/** |
|
56 |
* Constructor |
|
57 |
*/ |
|
58 |
MmsConformanceCheck(); |
|
59 |
||
60 |
/** |
|
61 |
* Destructor |
|
62 |
*/ |
|
63 |
~MmsConformanceCheck(); |
|
64 |
||
65 |
/** |
|
66 |
* Checks if the file passes conformance checks |
|
67 |
* @param file, filepath |
|
68 |
* @param showNote, note is shown if enabled |
|
69 |
* @return EInsertSuccess for successfull cases |
|
70 |
*/ |
|
71 |
int checkModeForInsert(const QString& file,bool showNote = true); |
|
72 |
||
43
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
73 |
/** |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
74 |
* Validates if message can be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
75 |
* 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
|
76 |
* 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
|
77 |
* @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
|
78 |
* @return true if message can be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
79 |
* false if message cant be forwarded |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
80 |
*/ |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
81 |
bool validateMsgForForward(int messageId); |
35b64624a9e7
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
34
diff
changeset
|
82 |
|
31 | 83 |
private: |
84 |
||
85 |
/* |
|
86 |
* Launch notification dialog |
|
87 |
*/ |
|
88 |
void showPopup(const QString& text); |
|
89 |
||
90 |
private slots: |
|
91 |
||
92 |
/** |
|
93 |
* This slot is called when insert media dialog is launched. |
|
94 |
* @param action selected action (yes or no). |
|
95 |
*/ |
|
96 |
void onDialogInsertMedia(HbAction* action); |
|
97 |
private: |
|
98 |
||
99 |
/* |
|
100 |
* Mms creation mode |
|
101 |
*/ |
|
102 |
TInt iCreationMode; |
|
103 |
||
104 |
/** |
|
105 |
* Max MMS composition size |
|
106 |
*/ |
|
107 |
int iMaxMmsSize; |
|
108 |
||
109 |
/** |
|
110 |
* Conformance status |
|
111 |
*/ |
|
112 |
TUint32 iConfStatus; |
|
113 |
||
114 |
}; |
|
115 |
#endif //MMS_CONFORMANCE_CHECK_OPERATION_H |