cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp
changeset 39 cee7e9e0906c
parent 12 ae8abd0db65c
child 50 2313cb430f28
equal deleted inserted replaced
32:1f002146abb4 39:cee7e9e0906c
    38 #include "CCbsDbImpSettings.H"
    38 #include "CCbsDbImpSettings.H"
    39 #include "CCbsDbImpTopicList.h"
    39 #include "CCbsDbImpTopicList.h"
    40 #include "CCbsDbImpTopicMessages.h"
    40 #include "CCbsDbImpTopicMessages.h"
    41 #include "CCbsDbImpTopicCollection.h"
    41 #include "CCbsDbImpTopicCollection.h"
    42 #include "CCbsRecMessage.h"
    42 #include "CCbsRecMessage.h"
    43 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    43 // <-- QT PHONE START -->
    44 #include <viewcli.h>            // View server access
    44 //#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    45 #else
    45 //#include <viewcli.h>            // View server access
    46 #include <viewclipartner.h>
    46 //#else
    47 #endif
    47 //#include <viewclipartner.h>
    48 #include <AknNotifyStd.h>       // ECellBroadcastNotification
    48 //#endif
    49 #include <AknSoftNotifier.h>    // Soft Notification API
    49 //#include <AknNotifyStd.h>       // ECellBroadcastNotification
       
    50 //#include <AknSoftNotifier.h>    // Soft Notification API
       
    51 // <-- QT PHONE END -->
    50 #include <e32property.h>
    52 #include <e32property.h>
    51 #include <coreapplicationuisdomainpskeys.h>
    53 #include <coreapplicationuisdomainpskeys.h>
    52 // <-- QT PHONE START -->
    54 // <-- QT PHONE START -->
    53 //#include <NcnListDomainPSKeys.h> 
    55 //#include <NcnListDomainPSKeys.h> 
    54 // <-- QT PHONE END -->
    56 // <-- QT PHONE END -->
    60 #include "cbsinternalcrkeys.h"  // for local variation
    62 #include "cbsinternalcrkeys.h"  // for local variation
    61 #include "cbsvariant.hrh"       // for local variation
    63 #include "cbsvariant.hrh"       // for local variation
    62 
    64 
    63 // CONSTANTS
    65 // CONSTANTS
    64 
    66 
       
    67 // <-- QT PHONE START -->
    65 // UID of CBS UI application
    68 // UID of CBS UI application
    66 #define KUidCbsUiappDef 0x101F4CD3
    69 //#define KUidCbsUiappDef 0x101F4CD3
    67 const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
    70 //const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
    68 
    71 // <-- QT PHONE END -->
    69 const TInt KCbsImmediateMessageIdInt = 313;
    72 
    70 const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt };
    73 // <-- QT PHONE START -->
       
    74 //const TInt KCbsImmediateMessageIdInt = 313;
       
    75 //const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt };
       
    76 // <-- QT PHONE END -->
       
    77 
    71 // <-- QT PHONE START -->
    78 // <-- QT PHONE START -->
    72 //const TInt KCbsMessageTone  = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
    79 //const TInt KCbsMessageTone  = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
    73 // <-- QT PHONE END -->
    80 // <-- QT PHONE END -->
    74 // DATA TYPES
    81 // DATA TYPES
    75 // CbsUi application view ID's
    82 // CbsUi application view ID's
   323 //
   330 //
   324 void CCbsReceiverHelper::ConstructL()
   331 void CCbsReceiverHelper::ConstructL()
   325     {
   332     {
   326     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::ConstructL()");
   333     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::ConstructL()");
   327 
   334 
       
   335     // <-- QT PHONE START -->
       
   336     /*
   328     iVwsSession = CVwsSessionWrapper::NewL();
   337     iVwsSession = CVwsSessionWrapper::NewL();
       
   338     */
       
   339     // <-- QT PHONE END-->
   329 
   340 
   330     // Array for SIM Topic numbers. This way we know which topics
   341     // Array for SIM Topic numbers. This way we know which topics
   331     // to delete also from the SIM card (when deleting all topics).
   342     // to delete also from the SIM card (when deleting all topics).
   332     iSimTopics = new ( ELeave ) CArrayFixFlat<TInt>( 1 );
   343     iSimTopics = new ( ELeave ) CArrayFixFlat<TInt>( 1 );
   333     
   344     
   364 CCbsReceiverHelper::~CCbsReceiverHelper()
   375 CCbsReceiverHelper::~CCbsReceiverHelper()
   365     {
   376     {
   366     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::~CCbsReceiverHelper()");
   377     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::~CCbsReceiverHelper()");
   367 
   378 
   368     delete iSimTopics;
   379     delete iSimTopics;
       
   380     // <-- QT PHONE START -->
       
   381     /*
   369     delete iVwsSession;
   382     delete iVwsSession;
       
   383     */
       
   384     // <-- QT PHONE END-->
   370 
   385 
   371     CBSLOGSTRING("CBSSERVER: <<< CCbsReceiverHelper::~CCbsReceiverHelper()");
   386     CBSLOGSTRING("CBSSERVER: <<< CCbsReceiverHelper::~CCbsReceiverHelper()");
   372     }
   387     }
   373 
   388 
   374 // -----------------------------------------------------------------------------
   389 // -----------------------------------------------------------------------------
   833 // CCbsReceiverHelper::LaunchMessageSoftNotificationL
   848 // CCbsReceiverHelper::LaunchMessageSoftNotificationL
   834 // Requests to launch a soft notification.
   849 // Requests to launch a soft notification.
   835 // (other items were commented in a header).
   850 // (other items were commented in a header).
   836 // -----------------------------------------------------------------------------
   851 // -----------------------------------------------------------------------------
   837 //
   852 //
   838 void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool aPlayTone )
   853 void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool /*aPlayTone*/ )
   839     {
   854     {
       
   855     // <-- QT PHONE START -->
       
   856     /*
   840     TInt numberOfHotMsgs( 0 );
   857     TInt numberOfHotMsgs( 0 );
   841     numberOfHotMsgs = iDatabase.TopicListL().UnreadHotmarkedMessageCount();
   858     numberOfHotMsgs = iDatabase.TopicListL().UnreadHotmarkedMessageCount();
   842 
   859 
   843     CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS
   860     CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS
   844 
   861 
   849         PlayCbsTone();
   866         PlayCbsTone();
   850         }
   867         }
   851 
   868 
   852     notifier->SetNotificationCountL( ECellBroadcastNotification, numberOfHotMsgs );
   869     notifier->SetNotificationCountL( ECellBroadcastNotification, numberOfHotMsgs );
   853     CleanupStack::PopAndDestroy( notifier );
   870     CleanupStack::PopAndDestroy( notifier );
       
   871     */
       
   872     // <-- QT PHONE END-->
   854     }
   873     }
   855 
   874 
   856 // -----------------------------------------------------------------------------
   875 // -----------------------------------------------------------------------------
   857 // CCbsReceiverHelper::LaunchMessageImmediateDisplay
   876 // CCbsReceiverHelper::LaunchMessageImmediateDisplay
   858 // Requests to show the message immediately.
   877 // Requests to show the message immediately.
   859 // (other items were commented in a header).
   878 // (other items were commented in a header).
   860 // -----------------------------------------------------------------------------
   879 // -----------------------------------------------------------------------------
   861 //
   880 //
   862 void CCbsReceiverHelper::LaunchMessageImmediateDisplay(
   881 void CCbsReceiverHelper::LaunchMessageImmediateDisplay(
   863     const TCbsDbMessage& aMessage )
   882     const TCbsDbMessage& /*aMessage*/ )
   864     {
   883     {
       
   884     // <-- QT PHONE START -->
       
   885     /*
   865     TUid uiViewUid( TUid::Uid( ECbsUiMsgViewId ) );
   886     TUid uiViewUid( TUid::Uid( ECbsUiMsgViewId ) );
   866     TVwsViewId id( KUidCbsUiappApp, uiViewUid );
   887     TVwsViewId id( KUidCbsUiappApp, uiViewUid );
   867     TPckgBuf<TCbsMessageHandle> pckg( aMessage.iHandle );
   888     TPckgBuf<TCbsMessageHandle> pckg( aMessage.iHandle );
   868 
   889 
   869     // Ignore result value.
   890     // Ignore result value.
   870     iVwsSession->CreateActivateViewEvent( id, KCbsImmediateMessageId, pckg );
   891     iVwsSession->CreateActivateViewEvent( id, KCbsImmediateMessageId, pckg );
       
   892     */
       
   893     // <-- QT PHONE END-->
   871     }
   894     }
   872 
   895 
   873 // -----------------------------------------------------------------------------
   896 // -----------------------------------------------------------------------------
   874 // CCbsReceiverHelper::TurnLightsOn
   897 // CCbsReceiverHelper::TurnLightsOn
   875 // Turns lights on
   898 // Turns lights on