messagingapp/msgnotifications/msgnotifier/src/msgnotifier.cpp
changeset 52 12db4185673b
parent 31 ebfee66fde93
child 70 a15d9966050f
equal deleted inserted replaced
44:36f374c67aa8 52:12db4185673b
    33 #include "msgcontacthandler.h"
    33 #include "msgcontacthandler.h"
    34 
    34 
    35 #include "debugtraces.h"
    35 #include "debugtraces.h"
    36 
    36 
    37 // LOCALIZATION CONSTANTS
    37 // LOCALIZATION CONSTANTS
    38 #define LOC_RECEIVED_FILES           hbTrId("txt_messaging_title_received_files")
    38 #define LOC_RECEIVED_FILES hbTrId("txt_messaging_title_received_files")
    39 #define LOC_BUSINESS_CARD           hbTrId("txt_messaging_dpopinfo_business_card")
    39 #define LOC_BUSINESS_CARD hbTrId("txt_messaging_dpopinfo_business_card")
    40 #define CARD_SEPERATOR "-"
    40 #define CARD_SEPERATOR "-"
       
    41 #define LOC_MULTIMEDIA_MSG hbTrId("txt_messaging_dpopinfo_multimedia_message")
    41 
    42 
    42 // plugin ids 
    43 // plugin ids 
    43 const QString IndicationsPluginId("com.nokia.messaging.newindicatorplugin");
    44 const QString IndicationsPluginId("com.nokia.messaging.newindicatorplugin");
    44 const QString PendingMsgPluginId("com.nokia.messaging.pendingindicatorplugin");
    45 const QString PendingMsgPluginId("com.nokia.messaging.pendingindicatorplugin");
    45 const QString FailedMsgPluginId("com.nokia.messaging.failedindicatorplugin");
    46 const QString FailedMsgPluginId("com.nokia.messaging.failedindicatorplugin");
    52 MsgNotifier::MsgNotifier(QObject* parent) :
    53 MsgNotifier::MsgNotifier(QObject* parent) :
    53     QObject(parent)
    54     QObject(parent)
    54 {
    55 {
    55     QDEBUG_WRITE("MsgNotifier::MsgNotifier : Enter")
    56     QDEBUG_WRITE("MsgNotifier::MsgNotifier : Enter")
    56 
    57 
    57     d_ptr = new MsgNotifierPrivate(this);
    58     d_ptr = q_check_ptr(new MsgNotifierPrivate(this));
    58 
    59 
    59     mSimHandler = new MsgSimNumDetector();
    60     mSimHandler = new MsgSimNumDetector();
    60 
    61 
    61     QDEBUG_WRITE("MsgNotifier::MsgNotifier : Exit")
    62     QDEBUG_WRITE("MsgNotifier::MsgNotifier : Exit")
    62 }
    63 }
   116             description.append(
   117             description.append(
   117                     MsgContactHandler::getVCardDisplayName(attachmentPath));
   118                     MsgContactHandler::getVCardDisplayName(attachmentPath));
   118             } 
   119             } 
   119         delete pluginLoader;
   120         delete pluginLoader;
   120         }
   121         }
       
   122     else if( data.mDescription.isEmpty() && (ECsMMS == data.mMsgType || ECsAudio == data.mMsgType) )
       
   123         {
       
   124         description = LOC_MULTIMEDIA_MSG;
       
   125         }
   121     else
   126     else
   122         {
   127         {
   123         description =  data.mDescription;
   128         description =  data.mDescription;
   124         }
   129         }
       
   130 
   125     notificationData[QString(KDisplayNameKey)] = data.mDisplayName ;
   131     notificationData[QString(KDisplayNameKey)] = data.mDisplayName ;
   126     notificationData[QString(KConversationIdKey)] = data.mConversationId;
   132     notificationData[QString(KConversationIdKey)] = data.mConversationId;
   127     notificationData[QString(KMessageTypeKey)] = data.mMsgType;
   133     notificationData[QString(KMessageTypeKey)] = data.mMsgType;
   128     notificationData[QString(KMessageBodyKey)] = description;
   134     notificationData[QString(KMessageBodyKey)] = description;
   129     notificationData[QString(KMessageSubjectKey)] = description;
   135     notificationData[QString(KMessageSubjectKey)] = description;