|
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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CPPLUGINCOMMON_H |
|
19 #define CPPLUGINCOMMON_H |
|
20 |
|
21 #include <qvariant.h> |
|
22 #include <qsysteminfo.h> |
|
23 #include "cptelephonyutilsdefs.h" |
|
24 |
|
25 class XQSettingsManager; |
|
26 |
|
27 using namespace CpTelephonyUtils; |
|
28 using namespace QtMobility; |
|
29 |
|
30 /*! |
|
31 \class Tools |
|
32 \brief The static functionality. |
|
33 */ |
|
34 class CPTELEPHONYUTILS_EXPORT Tools : public QObject |
|
35 { |
|
36 Q_OBJECT |
|
37 |
|
38 public: |
|
39 /*! |
|
40 Is VoIP currently supported |
|
41 */ |
|
42 static bool voipSupported(); |
|
43 |
|
44 /*! |
|
45 Is video currently supported |
|
46 */ |
|
47 static bool videoSupported(); |
|
48 |
|
49 /*! |
|
50 Error code text conversion |
|
51 */ |
|
52 static bool errorCodeTextMapping(const int errorcode, QString &errorText); |
|
53 |
|
54 }; |
|
55 |
|
56 /*! |
|
57 \class SettingsWrapper |
|
58 \brief Wraps central repository and P&S dependency. |
|
59 */ |
|
60 class CPTELEPHONYUTILS_EXPORT CpSettingsWrapper : public QObject |
|
61 { |
|
62 Q_OBJECT |
|
63 public: |
|
64 CpSettingsWrapper(QObject *parent = NULL); |
|
65 ~CpSettingsWrapper(); |
|
66 public: |
|
67 /*! |
|
68 Show call duration setting |
|
69 */ |
|
70 bool showCallDuration(); |
|
71 int setShowCallDuration(bool value); |
|
72 |
|
73 /*! |
|
74 Own video in received call setting |
|
75 */ |
|
76 int readVtVideoSending(); |
|
77 int writeVtVideoSending(int value); |
|
78 |
|
79 /*! |
|
80 Soft reject text setting |
|
81 */ |
|
82 void readSoftRejectText( QString &text, bool &userDefined ); |
|
83 int writeSoftRejectText(const QString &text, bool userDefined ); |
|
84 |
|
85 /*! |
|
86 Number grouping support |
|
87 */ |
|
88 bool numberGroupingSupported() const; |
|
89 |
|
90 /*! |
|
91 Call waiting distiquish not provisioned support |
|
92 */ |
|
93 bool isFeatureCallWaitingDistiquishNotProvisionedEnabled(); |
|
94 |
|
95 /*! |
|
96 Checks if phone is in offline mode or not. |
|
97 Return true if phone is in offline mode. |
|
98 Return false if phone is not in offline mode. |
|
99 */ |
|
100 bool isPhoneOffline() const; |
|
101 |
|
102 /*! |
|
103 Checks if ongoing call exists. |
|
104 Return true if ongoing call exists. |
|
105 Return false if ongoing call does not exist. |
|
106 */ |
|
107 bool isOngoingCall() const; |
|
108 |
|
109 /*! |
|
110 Forbidden Icon support |
|
111 */ |
|
112 bool forbiddenIconSupported() const; |
|
113 |
|
114 private: |
|
115 /*! |
|
116 Read cenrep value. |
|
117 */ |
|
118 QVariant readCenrepValue( const long int uid, const unsigned long int key) const; |
|
119 |
|
120 /*! |
|
121 Read pubsub value. |
|
122 */ |
|
123 QVariant readPubSubValue( const long int uid, const unsigned long int key) const; |
|
124 |
|
125 /*! |
|
126 Read cenrep string. |
|
127 */ |
|
128 QString readCenrepString( const long int uid, const unsigned long int key) const; |
|
129 |
|
130 /*! |
|
131 Write cenrep value or string. |
|
132 */ |
|
133 int writeCenrepValue( const long int uid, const unsigned long int key, |
|
134 const QVariant &settingsKeyValue ) const; |
|
135 |
|
136 private: // Data |
|
137 // Own |
|
138 XQSettingsManager *m_settings; |
|
139 |
|
140 QSystemDeviceInfo *m_deviceInfo; |
|
141 }; |
|
142 |
|
143 #endif // CPPLUGINCOMMON_H |