cbs/CbsServer/ServerSrc/CCbsReceiverHelper.cpp
branchRCL_3
changeset 20 987c9837762f
parent 19 7d48bed6ce0c
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
    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 // <-- QT PHONE START -->
    43 #ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    44 //#ifndef SYMBIAN_ENABLE_SPLIT_HEADERS
    44 #include <viewcli.h>            // View server access
    45 //#include <viewcli.h>            // View server access
    45 #else
    46 //#else
    46 #include <viewclipartner.h>
    47 //#include <viewclipartner.h>
    47 #endif
    48 //#endif
    48 #include <AknNotifyStd.h>       // ECellBroadcastNotification
    49 //#include <AknNotifyStd.h>       // ECellBroadcastNotification
    49 #include <AknSoftNotifier.h>    // Soft Notification API
    50 //#include <AknSoftNotifier.h>    // Soft Notification API
       
    51 // <-- QT PHONE END -->
       
    52 #include <e32property.h>
    50 #include <e32property.h>
    53 #include <coreapplicationuisdomainpskeys.h>
    51 #include <coreapplicationuisdomainpskeys.h>
    54 // <-- QT PHONE START -->
    52 #include <NcnListDomainPSKeys.h>
    55 //#include <NcnListDomainPSKeys.h> 
       
    56 // <-- QT PHONE END -->
       
    57 
    53 
    58 #include <data_caging_path_literals.hrh>
    54 #include <data_caging_path_literals.hrh>
    59 #include "CbsLogger.h"
    55 #include "CbsLogger.h"
    60 
    56 
    61 #include <centralrepository.h>  // for local variation
    57 #include <centralrepository.h>  // for local variation
    62 #include "cbsinternalcrkeys.h"  // for local variation
    58 #include "cbsinternalcrkeys.h"  // for local variation
    63 #include "cbsvariant.hrh"       // for local variation
    59 #include "cbsvariant.hrh"       // for local variation
    64 
    60 
    65 // CONSTANTS
    61 // CONSTANTS
    66 
    62 
    67 // <-- QT PHONE START -->
       
    68 // UID of CBS UI application
    63 // UID of CBS UI application
    69 //#define KUidCbsUiappDef 0x101F4CD3
    64 #define KUidCbsUiappDef 0x101F4CD3
    70 //const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
    65 const TUid KUidCbsUiappApp = { KUidCbsUiappDef };
    71 // <-- QT PHONE END -->
    66 
    72 
    67 const TInt KCbsImmediateMessageIdInt = 313;
    73 // <-- QT PHONE START -->
    68 const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt };
    74 //const TInt KCbsImmediateMessageIdInt = 313;
    69 
    75 //const TUid KCbsImmediateMessageId = { KCbsImmediateMessageIdInt };
    70 const TInt KCbsMessageTone  = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
    76 // <-- QT PHONE END -->
    71 
    77 
       
    78 // <-- QT PHONE START -->
       
    79 //const TInt KCbsMessageTone  = 2; // See SharedDataKeysVariant.h or NcnListInternalPSKeys.h
       
    80 // <-- QT PHONE END -->
       
    81 // DATA TYPES
    72 // DATA TYPES
    82 // CbsUi application view ID's
    73 // CbsUi application view ID's
    83 enum TCbsUiViewIds
    74 enum TCbsUiViewIds
    84     {
    75     {
    85     ECbsUiTopicViewId = 1,
    76     ECbsUiTopicViewId = 1,
   330 //
   321 //
   331 void CCbsReceiverHelper::ConstructL()
   322 void CCbsReceiverHelper::ConstructL()
   332     {
   323     {
   333     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::ConstructL()");
   324     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::ConstructL()");
   334 
   325 
   335     // <-- QT PHONE START -->
       
   336     /*
       
   337     iVwsSession = CVwsSessionWrapper::NewL();
   326     iVwsSession = CVwsSessionWrapper::NewL();
   338     */
       
   339     // <-- QT PHONE END-->
       
   340 
   327 
   341     // Array for SIM Topic numbers. This way we know which topics
   328     // Array for SIM Topic numbers. This way we know which topics
   342     // to delete also from the SIM card (when deleting all topics).
   329     // to delete also from the SIM card (when deleting all topics).
   343     iSimTopics = new ( ELeave ) CArrayFixFlat<TInt>( 1 );
   330     iSimTopics = new ( ELeave ) CArrayFixFlat<TInt>( 1 );
   344     
   331     
   375 CCbsReceiverHelper::~CCbsReceiverHelper()
   362 CCbsReceiverHelper::~CCbsReceiverHelper()
   376     {
   363     {
   377     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::~CCbsReceiverHelper()");
   364     CBSLOGSTRING("CBSSERVER: >>> CCbsReceiverHelper::~CCbsReceiverHelper()");
   378 
   365 
   379     delete iSimTopics;
   366     delete iSimTopics;
   380     // <-- QT PHONE START -->
       
   381     /*
       
   382     delete iVwsSession;
   367     delete iVwsSession;
   383     */
       
   384     // <-- QT PHONE END-->
       
   385 
   368 
   386     CBSLOGSTRING("CBSSERVER: <<< CCbsReceiverHelper::~CCbsReceiverHelper()");
   369     CBSLOGSTRING("CBSSERVER: <<< CCbsReceiverHelper::~CCbsReceiverHelper()");
   387     }
   370     }
   388 
   371 
   389 // -----------------------------------------------------------------------------
   372 // -----------------------------------------------------------------------------
   848 // CCbsReceiverHelper::LaunchMessageSoftNotificationL
   831 // CCbsReceiverHelper::LaunchMessageSoftNotificationL
   849 // Requests to launch a soft notification.
   832 // Requests to launch a soft notification.
   850 // (other items were commented in a header).
   833 // (other items were commented in a header).
   851 // -----------------------------------------------------------------------------
   834 // -----------------------------------------------------------------------------
   852 //
   835 //
   853 void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool /*aPlayTone*/ )
   836 void CCbsReceiverHelper::LaunchMessageSoftNotificationL( const TBool aPlayTone )
   854     {
   837     {
   855     // <-- QT PHONE START -->
       
   856     /*
       
   857     TInt numberOfHotMsgs( 0 );
   838     TInt numberOfHotMsgs( 0 );
   858     numberOfHotMsgs = iDatabase.TopicListL().UnreadHotmarkedMessageCount();
   839     numberOfHotMsgs = iDatabase.TopicListL().UnreadHotmarkedMessageCount();
   859 
   840 
   860     CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS
   841     CAknSoftNotifier* notifier = CAknSoftNotifier::NewLC(); // on CS
   861 
   842 
   866         PlayCbsTone();
   847         PlayCbsTone();
   867         }
   848         }
   868 
   849 
   869     notifier->SetNotificationCountL( ECellBroadcastNotification, numberOfHotMsgs );
   850     notifier->SetNotificationCountL( ECellBroadcastNotification, numberOfHotMsgs );
   870     CleanupStack::PopAndDestroy( notifier );
   851     CleanupStack::PopAndDestroy( notifier );
   871     */
       
   872     // <-- QT PHONE END-->
       
   873     }
   852     }
   874 
   853 
   875 // -----------------------------------------------------------------------------
   854 // -----------------------------------------------------------------------------
   876 // CCbsReceiverHelper::LaunchMessageImmediateDisplay
   855 // CCbsReceiverHelper::LaunchMessageImmediateDisplay
   877 // Requests to show the message immediately.
   856 // Requests to show the message immediately.
   878 // (other items were commented in a header).
   857 // (other items were commented in a header).
   879 // -----------------------------------------------------------------------------
   858 // -----------------------------------------------------------------------------
   880 //
   859 //
   881 void CCbsReceiverHelper::LaunchMessageImmediateDisplay(
   860 void CCbsReceiverHelper::LaunchMessageImmediateDisplay(
   882     const TCbsDbMessage& /*aMessage*/ )
   861     const TCbsDbMessage& aMessage )
   883     {
   862     {
   884     // <-- QT PHONE START -->
       
   885     /*
       
   886     TUid uiViewUid( TUid::Uid( ECbsUiMsgViewId ) );
   863     TUid uiViewUid( TUid::Uid( ECbsUiMsgViewId ) );
   887     TVwsViewId id( KUidCbsUiappApp, uiViewUid );
   864     TVwsViewId id( KUidCbsUiappApp, uiViewUid );
   888     TPckgBuf<TCbsMessageHandle> pckg( aMessage.iHandle );
   865     TPckgBuf<TCbsMessageHandle> pckg( aMessage.iHandle );
   889 
   866 
   890     // Ignore result value.
   867     // Ignore result value.
   891     iVwsSession->CreateActivateViewEvent( id, KCbsImmediateMessageId, pckg );
   868     iVwsSession->CreateActivateViewEvent( id, KCbsImmediateMessageId, pckg );
   892     */
       
   893     // <-- QT PHONE END-->
       
   894     }
   869     }
   895 
   870 
   896 // -----------------------------------------------------------------------------
   871 // -----------------------------------------------------------------------------
   897 // CCbsReceiverHelper::TurnLightsOn
   872 // CCbsReceiverHelper::TurnLightsOn
   898 // Turns lights on
   873 // Turns lights on
   911 // Plays a tone
   886 // Plays a tone
   912 // -----------------------------------------------------------------------------
   887 // -----------------------------------------------------------------------------
   913 //
   888 //
   914 void CCbsReceiverHelper::PlayCbsTone()
   889 void CCbsReceiverHelper::PlayCbsTone()
   915     {
   890     {
   916     // <-- QT PHONE START -->
       
   917     /*
       
   918     RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt,
   891     RProperty::Define( KPSUidNcnList, KNcnPlayAlertTone, RProperty::EInt,
   919         ECapability_None , ECapabilityWriteDeviceData );
   892         ECapability_None , ECapabilityWriteDeviceData );
   920     RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KCbsMessageTone );
   893     RProperty::Set( KPSUidNcnList, KNcnPlayAlertTone, KCbsMessageTone );
   921     */
       
   922     // <-- QT PHONE END-->
       
   923     }
   894     }
   924 
   895 
   925 // ================= OTHER EXPORTED FUNCTIONS ==============
   896 // ================= OTHER EXPORTED FUNCTIONS ==============
   926 
   897 
   927 //  End of File
   898 //  End of File