author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Fri, 11 Jun 2010 13:35:48 +0300 | |
changeset 34 | 84197e66a4bd |
parent 31 | ebfee66fde93 |
child 47 | 5b14749788d7 |
child 52 | 12db4185673b |
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: Utility class for conersationengine. |
|
15 |
*/ |
|
16 |
#include <QFile> |
|
17 |
#include <qversitcontactimporter.h> |
|
18 |
#include <qversitdocument.h> |
|
19 |
#include <qversitreader.h> |
|
20 |
#include <qtcontacts.h> |
|
21 |
#include <qmobilityglobal.h> |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
22 |
#include <SendUiConsts.h> |
31 | 23 |
|
24 |
#include "conversationsengineutility.h" |
|
25 |
#include "convergedmessage.h" |
|
26 |
||
27 |
QTM_USE_NAMESPACE |
|
28 |
||
29 |
||
30 |
//--------------------------------------------------------------- |
|
31 |
// ConversationsEngineUtility::messageType |
|
32 |
// @see header |
|
33 |
//--------------------------------------------------------------- |
|
34 |
int ConversationsEngineUtility::messageType(TCsType value) |
|
35 |
{ |
|
36 |
int mMessageType; |
|
37 |
switch (value) { |
|
38 |
case ECsSMS: |
|
39 |
mMessageType = ConvergedMessage::Sms; |
|
40 |
break; |
|
41 |
case ECsMMS: |
|
42 |
case ECsAudio: |
|
43 |
mMessageType = ConvergedMessage::Mms; |
|
44 |
break; |
|
45 |
case ECsBioMsg: |
|
46 |
case ECsRingingTone: |
|
47 |
case ECsProvisioning: |
|
48 |
case ECsBioMsg_VCard: |
|
49 |
case ECsBioMsg_VCal: |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
50 |
case ECsBioMgs_NokiaService: |
31 | 51 |
mMessageType = ConvergedMessage::BioMsg; |
52 |
break; |
|
53 |
case ECsBlueTooth: |
|
54 |
mMessageType = ConvergedMessage::BT; |
|
55 |
break; |
|
56 |
case ECsMmsNotification: |
|
57 |
mMessageType = ConvergedMessage::MmsNotification; |
|
58 |
break; |
|
59 |
default: |
|
60 |
mMessageType = ConvergedMessage::None; |
|
61 |
break; |
|
62 |
} |
|
63 |
return mMessageType; |
|
64 |
} |
|
65 |
||
66 |
//--------------------------------------------------------------- |
|
67 |
// ConversationsEngineUtility::mapMsgType |
|
68 |
// @see header |
|
69 |
//--------------------------------------------------------------- |
|
70 |
int ConversationsEngineUtility::messageType(TInt32 value) |
|
71 |
{ |
|
72 |
int type; |
|
73 |
switch (value) { |
|
74 |
case KSenduiMtmSmsUidValue: |
|
75 |
type = ConvergedMessage::Sms; |
|
76 |
break; |
|
77 |
case KSenduiMtmBtUidValue: |
|
78 |
type = ConvergedMessage::BT; |
|
79 |
break; |
|
80 |
case KSenduiMtmMmsUidValue: |
|
81 |
type = ConvergedMessage::Mms; |
|
82 |
break; |
|
83 |
case KSenduiMtmBioUidValue: |
|
84 |
type = ConvergedMessage::BioMsg; |
|
85 |
break; |
|
86 |
default: |
|
87 |
type = ConvergedMessage::None; |
|
88 |
break; |
|
89 |
} |
|
90 |
return type; |
|
91 |
} |
|
92 |
||
93 |
//--------------------------------------------------------------- |
|
94 |
// ConversationsEngineUtility::messageSubType |
|
95 |
// @see header |
|
96 |
//--------------------------------------------------------------- |
|
97 |
int ConversationsEngineUtility::messageSubType(TCsType value) |
|
98 |
{ |
|
99 |
int messageSubType; |
|
100 |
switch (value) { |
|
101 |
case ECsRingingTone: |
|
102 |
messageSubType = ConvergedMessage::RingingTone; |
|
103 |
break; |
|
104 |
case ECsProvisioning: |
|
105 |
messageSubType = ConvergedMessage::Provisioning; |
|
106 |
break; |
|
107 |
case ECsBioMsg_VCard: |
|
108 |
messageSubType = ConvergedMessage::VCard; |
|
109 |
break; |
|
110 |
case ECsBioMsg_VCal: |
|
111 |
messageSubType = ConvergedMessage::VCal; |
|
112 |
break; |
|
113 |
case ECsAudio: |
|
114 |
messageSubType = ConvergedMessage::Audio; |
|
115 |
break; |
|
34
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
116 |
case ECsBioMgs_NokiaService: |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
117 |
messageSubType = ConvergedMessage::NokiaService; |
84197e66a4bd
Revision: 201021
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
31
diff
changeset
|
118 |
break; |
31 | 119 |
default: |
120 |
messageSubType = ConvergedMessage::None; |
|
121 |
break; |
|
122 |
} |
|
123 |
return messageSubType; |
|
124 |
} |
|
125 |
||
126 |
// End of file |