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 "cptelephonyutilsdefs.h" |
|
23 |
|
24 class XQSettingsManager; |
|
25 |
|
26 using namespace CpTelephonyUtils; |
|
27 |
|
28 /*! |
|
29 \class Tools |
|
30 \brief The static functionality. |
|
31 */ |
|
32 class CPTELEPHONYUTILS_EXPORT Tools : public QObject |
|
33 { |
|
34 Q_OBJECT |
|
35 |
|
36 public: |
|
37 /*! |
|
38 Is VoIP currently supported |
|
39 */ |
|
40 static bool voipSupported(); |
|
41 |
|
42 /*! |
|
43 Is video currently supported |
|
44 */ |
|
45 static bool videoSupported(); |
|
46 |
|
47 /*! |
|
48 Error code text conversion |
|
49 */ |
|
50 static bool errorCodeTextMapping(const int errorcode, QString &errorText); |
|
51 |
|
52 }; |
|
53 |
|
54 /*! |
|
55 \class SettingsWrapper |
|
56 \brief Wraps central repository and P&S dependency. |
|
57 */ |
|
58 class CPTELEPHONYUTILS_EXPORT CpSettingsWrapper : public QObject |
|
59 { |
|
60 Q_OBJECT |
|
61 public: |
|
62 CpSettingsWrapper(QObject *parent = NULL); |
|
63 ~CpSettingsWrapper(); |
|
64 public: |
|
65 /*! |
|
66 Show call duration setting |
|
67 */ |
|
68 bool showCallDuration(); |
|
69 int setShowCallDuration(bool value); |
|
70 |
|
71 /*! |
|
72 Soft reject text setting |
|
73 */ |
|
74 void readSoftRejectText( QString &text, bool &userDefined ); |
|
75 int writeSoftRejectText(const QString &text, bool userDefined ); |
|
76 |
|
77 /*! |
|
78 Number grouping support |
|
79 */ |
|
80 bool numberGroupingSupported() const; |
|
81 |
|
82 /*! |
|
83 Call waiting distiquish not provisioned support |
|
84 */ |
|
85 bool isFeatureCallWaitingDistiquishNotProvisionedEnabled(); |
|
86 |
|
87 /*! |
|
88 Checks if phone is in offline mode or not. |
|
89 Return true if phone is in offline mode. |
|
90 Return false if phone is not in offline mode. |
|
91 */ |
|
92 bool isPhoneOffline() const; |
|
93 |
|
94 private: |
|
95 /*! |
|
96 Read cenrep value. |
|
97 */ |
|
98 QVariant readCenrepValue( const long int uid, const unsigned long int key) const; |
|
99 |
|
100 /*! |
|
101 Read cenrep string. |
|
102 */ |
|
103 QString readCenrepString( const long int uid, const unsigned long int key) const; |
|
104 |
|
105 /*! |
|
106 Write cenrep value or string. |
|
107 */ |
|
108 int writeCenrepValue( const long int uid, const unsigned long int key, |
|
109 const QVariant &settingsKeyValue ) const; |
|
110 |
|
111 private: // Data |
|
112 // Own |
|
113 XQSettingsManager* m_Settings; |
|
114 }; |
|
115 |
|
116 #endif // CPPLUGINCOMMON_H |
|