33
|
1 |
/*
|
|
2 |
* Copyright (c) 2010 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 SATAPPCONSTANT_H
|
|
19 |
#define SATAPPCONSTANT_H
|
|
20 |
|
|
21 |
#ifdef _UDEB
|
|
22 |
#define SAT_ASSERT Q_ASSERT
|
|
23 |
#else
|
|
24 |
#define SAT_ASSERT(cond) cond
|
|
25 |
#endif
|
|
26 |
|
|
27 |
// CONSTANTS
|
|
28 |
|
|
29 |
const int KDisplayTxtUserClearTimeout( 60000 );
|
|
30 |
// As the QT for S60 is slow, we use 6 sec, in symbian sat ui we use 3 sec.
|
|
31 |
// Rollback to 3s
|
|
32 |
const int KDisplayTxtDefaultduration( 3000 );
|
|
33 |
|
|
34 |
const unsigned int KGetInputStringMaxSize = 0xEF;
|
|
35 |
|
|
36 |
const int KExtendTimeoutMseconds(3000);
|
|
37 |
// 1 minute
|
|
38 |
const int KDefaultSelectionTimeoutMseconds(60000);
|
|
39 |
const int KSymbianTimeConvertQtTime(100);
|
|
40 |
const int KMoSmControlTimeOut(3000);
|
|
41 |
const int KPlayToneSymbianConvertQtTime(1000);
|
|
42 |
|
|
43 |
// extensions to ConfirmAction
|
|
44 |
const int ESatConfirmAction = 0x35;
|
|
45 |
// extensions to TSatAction
|
|
46 |
const int ESatNotifyAction = 0x1001;
|
|
47 |
|
|
48 |
// SatAppAction
|
|
49 |
// parameter keys
|
|
50 |
const QString KeyText="text"; // QString
|
|
51 |
const QString KeyMenu="menu"; // QList<QVariant/QString>
|
|
52 |
const QString KeyDefault="default"; // int - default selected item index
|
|
53 |
const QString KeySelection="selection"; // int - real selected index
|
|
54 |
const QString KeyCharacterSet="charset"; // int(TSatCharacterSet)
|
|
55 |
const QString KeyInKey="inkey"; // int(char pressed)
|
|
56 |
const QString KeyDuration="duration"; // int(milliseconds)
|
|
57 |
const QString KeyImmediate="immediate"; // bool - immediate response
|
|
58 |
const QString KeyInputString="input"; // QString - user input string
|
|
59 |
const QString KeyMinLength="min"; // int
|
|
60 |
const QString KeyMaxLength="max"; // int
|
|
61 |
const QString KeyHideInput="hide"; // bool - password mode
|
|
62 |
const QString KeyToneId="tone"; // int(TSatTone)
|
|
63 |
const QString KeySustainedText="sustained"; // bool - sustained text
|
|
64 |
const QString KeyWaitUserToClear="waitusertoclear"; // bool
|
|
65 |
const QString KeyHelpRequested="helprequested"; // bool
|
|
66 |
const QString KeyApplicationName="applicationname"; // QString - app.name
|
|
67 |
const QString KeyCommandId="commandid"; // int(TSatSNotifyCommand)
|
|
68 |
const QString KeyControlResult="controlresult"; // int(TSatControlResult)
|
|
69 |
const QString KeyAlphaIdStatus="alphaidstatus"; // int(TSatAlphaIdStatus)
|
|
70 |
const QString KeyAdditionalText="additionaltext"; //QString - aAdditionalText
|
|
71 |
const QString KeyQueryCommandId="querycommandid";//int(TSatSQueryCommand)
|
|
72 |
const QString KeyActionAccepted="actionaccepted";//bool
|
|
73 |
|
|
74 |
const QString KeyselfExp="sekfexp";//bool
|
|
75 |
|
|
76 |
// icon identifiers
|
|
77 |
const QString KeyIconId="iconid"; // int - icon id
|
|
78 |
const QString KeyIconIdArray="iconidarray"; // QList<QVariant/int> (icon id)
|
|
79 |
const QString KeyIconQualifier="iconqualifier"; // int (TSatIconQualifier)
|
|
80 |
|
|
81 |
// icons
|
|
82 |
const QString KeyIcon="icon"; // HbIcon
|
|
83 |
const QString KeyIconArray="icons"; // QList<QVariant/QPixmap>
|
|
84 |
|
|
85 |
/**
|
|
86 |
* Play Tone Constants
|
|
87 |
*/
|
|
88 |
// Tone Sequence
|
|
89 |
const char KNetToneSeqNetBusy[] = "\x00\x11\x05\x4E\x30\x40\x30\x07\x0B";
|
|
90 |
const char KNetToneSeqNetCallWaiting[] = "\x00\x11\x05\x4E\x14\x40\x3C\x4E\x14"
|
|
91 |
"\x40\x64\x40\x64\x40\x64\x4E\x14\x40\x3C\x4E\x14\x40\x64\x40\x64\x40\x64"
|
|
92 |
"\x07\x0B";
|
|
93 |
const char KNetToneSeqNetCongestion[] = "\x00\x11\x05\x4E\x14\x40\x14\x07\x0B";
|
|
94 |
const char KNetToneSeqNetSpecialInformation[] = "\x00\x11\x05\x4F\x21\x50"
|
|
95 |
"\x21\x51\x21\x40\x64\x07\x0B";
|
|
96 |
const char KNetToneSeqDial[] = "\x00\x11\x05\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE\x4E\xFE"
|
|
97 |
"\x4E\xFE\x4E\xFE\x4E\xFE\x07\x0B";
|
|
98 |
const char KNetToneSeqRingGoing[] = "\x00\x11\x05\x4E\x64\x05\x04\x40\x64\06\x07\x0B";
|
|
99 |
const char KGeneralBeep[] = "\x00\x11\x0A\x76\x00\x0B";
|
|
100 |
const char KErrorTone[] = "\x00\x11\x0A\x6C\x19\x0B";
|
|
101 |
const char KRadioPathNotAvailable[] = "\x00\x11\x0A\x05\x03\x4E\x14\x40\x14\x06\x0B";
|
|
102 |
const char KRadioPathAck[] = "\x00\x11\x0A\x02\xFC\x0A\x80\x4E\x14\x0A\x7f\x0B";
|
|
103 |
|
|
104 |
// PlayTone durations
|
|
105 |
const int KSatDur170ms = 170; // 170ms
|
|
106 |
const int KSatDur200ms = 200; // 200ms
|
|
107 |
const int KSatDur250ms = 250; // 250ms
|
|
108 |
const int KSatDur1200ms = 1200; // 1200ms
|
|
109 |
|
|
110 |
//enum for SendSms
|
|
111 |
/**Sat send sms user response*/
|
|
112 |
enum TSatAppConfirmType
|
|
113 |
{
|
|
114 |
ESatUiConfirmSendSms = 1,
|
|
115 |
ESatUiConfirmSendSs,
|
|
116 |
ESatUiConfirmSendUssd
|
|
117 |
};
|
|
118 |
|
|
119 |
enum TSatAppUserResponse
|
|
120 |
{
|
|
121 |
/**
|
|
122 |
* default, user no response
|
|
123 |
*/
|
|
124 |
EUserNoResponse = 0,
|
|
125 |
/**
|
|
126 |
* OK, user response
|
|
127 |
*/
|
|
128 |
EUserPrimaryResponse,
|
|
129 |
/**
|
|
130 |
* Back, user response
|
|
131 |
*/
|
|
132 |
EUserSecondaryResponse,
|
|
133 |
/**
|
|
134 |
* requested to clear by the server
|
|
135 |
*/
|
|
136 |
EUserClearResponse,
|
|
137 |
/**
|
|
138 |
* requested to close application by the server
|
|
139 |
*/
|
|
140 |
EUserCloseResponse
|
|
141 |
};
|
|
142 |
|
|
143 |
enum TSatAppDialogActionType
|
|
144 |
{
|
|
145 |
ESatDialogDisplayText = 0, // Ok Back
|
|
146 |
ESatDialogGetInput, // Cancel ->Ok Cancel
|
|
147 |
ESatDialogGetInkey, // Cancel ->Ok Cancel
|
|
148 |
ESatDialogGetYesNo, // Yes No
|
|
149 |
ESatDialogGetDigitalRsp, // Cancel
|
|
150 |
ESatDialogSetUpCall, // Call Cancel
|
|
151 |
ESatDialogConfirmSend, // Yes No
|
|
152 |
ESatDialogConfirmBip // Ok Cancel
|
|
153 |
};
|
|
154 |
|
|
155 |
#endif
|