diff -r 73a1feb507fb -r bc78a40cd63c mmshplugins/mmshaoplugin/src/musaoplugin.cpp --- a/mmshplugins/mmshaoplugin/src/musaoplugin.cpp Tue Aug 31 15:12:07 2010 +0300 +++ b/mmshplugins/mmshaoplugin/src/musaoplugin.cpp Wed Sep 01 12:31:01 2010 +0100 @@ -16,7 +16,6 @@ */ -#include "musmanager.h" #include "musresourceproperties.h" #include "mussesseioninformationapi.h" #include "mussettingskeys.h" @@ -33,6 +32,9 @@ #include #include #include +#include + +using namespace NMusSessionInformationApi; // ----------------------------------------------------------------------------- // Symbian two-phase constructor. @@ -65,14 +67,19 @@ void CMusAoPlugin::ConstructL() { MUS_LOG( "mus: [MUSAO] -> CMusAoPlugin::ConstructL" ) - DefinePropertiesL(); - User::LeaveIfError( iServer.Connect() ); - User::LeaveIfError( iPhone.Open( iServer, KMmTsyPhoneName() ) ); - iTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL(iPhone, *this ); - iPropertyMonitor = CMusPropertyMonitor::NewL(*this); - // Enable the below line if Kodiak Ptt has to be monitered - // iPttCallMonitor = CMusPttCallMonitor::NewL(*iLineMonitor); - + FeatureManager::InitializeLibL(); + TBool support = FeatureManager::FeatureSupported( KFeatureIdMultimediaSharing ); + FeatureManager::UnInitializeLib(); + if ( support ) + { + DefinePropertiesL(); + User::LeaveIfError( iServer.Connect() ); + User::LeaveIfError( iPhone.Open( iServer, KMmTsyPhoneName() ) ); + iTsyPropertyMonitor = CMusTsyPropertyMonitor::NewL(iPhone); + iPropertyMonitor = CMusPropertyMonitor::NewL(); + // Enable the below line if Kodiak Ptt has to be monitered + // iPttCallMonitor = CMusPttCallMonitor::NewL(*iLineMonitor); + } MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::ConstructL" ) } @@ -84,7 +91,6 @@ { MUS_LOG( "-> CMusAoPlugin::~CMusAoPlugin" ) // should never come here, because service should always be on - delete iManager; delete iPropertyMonitor; delete iTsyPropertyMonitor; // Enable the below line if Kodiak Ptt has to be monitered @@ -136,10 +142,12 @@ RProperty::EInt,( TInt ) NMusSessionInformationApi::EMUSAllowed); DefinePropertyL(NMusSessionInformationApi::KMusCallDirection, RProperty::EInt,( TInt ) NMusSessionInformationApi::ENoDirection); - _LIT( KEmptyCallProvider,"" ); - DefinePropertyL(NMusSessionInformationApi::KMUSCallProvider, - RProperty::EText,KEmptyCallProvider); - + DefinePropertyL(NMusSessionInformationApi::KMUSPrivacy, + RProperty::EInt,( TInt ) NMusSessionInformationApi::EPrivacyOff); + DefinePropertyL(KMusClirSetting, + RProperty::EInt,( TInt ) ESendOwnNumber); + + MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::DefineResourceProperties" ) } @@ -220,9 +228,10 @@ DeleteProperty(NMusSessionInformationApi::KMusCallEvent); DeleteProperty(NMusSessionInformationApi::KMusCallCount); DeleteProperty(NMusSessionInformationApi::KMusTelNumber); - DeleteProperty(NMusSessionInformationApi::KMUSCallProvider); DeleteProperty(NMusSessionInformationApi::KMUSForbidden); DeleteProperty(NMusSessionInformationApi::KMusCallDirection); + DeleteProperty(NMusSessionInformationApi::KMUSPrivacy); + DeleteProperty(KMusClirSetting); MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::DeleteResourcePropertiesL" ) } @@ -250,72 +259,5 @@ return &iError;; } -// ----------------------------------------------------------------------------- -// CMusAoPlugin::StartMusClient() -// This will start the MusManager Client which inturn should start -// MusManager Server and Availability Plugin. -// ----------------------------------------------------------------------------- -// -void CMusAoPlugin::StartMusClientL() - { - MUS_LOG( "mus: [MUSAO] -> CMusAoPlugin::StartMusClient" ) - if( !iManager ) - { - iManager = CMusManager::NewL(); - } - iManager->ExamineAvailabilityL(); - MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::StartMusClient" ) - } - -// ----------------------------------------------------------------------------- -// CMusAoPlugin::StopMusClient() -// This will stop the MusManager Client which inturn should stop -// MusManager Server and Availability Plugin. -// ----------------------------------------------------------------------------- -// -void CMusAoPlugin::StopMusClient() - { - MUS_LOG( "mus: [MUSAO] -> CMusAoPlugin::StopMusClient" ) - if( iManager ) - { - delete iManager; - iManager = NULL; - } - MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::StopMusClient" ) - } - -// ----------------------------------------------------------------------------- -// From MMusCallStateObserver -// CMusAoPlugin::MusCallStateChanged() -// ----------------------------------------------------------------------------- -// -void CMusAoPlugin::MusCallStateChanged( ) - { - MUS_LOG( "mus: [MUSAO] -> CMusAoPlugin::MusCallStateChanged" ) - - TBool dataReady = EFalse; - TRAPD( error, dataReady = iTsyPropertyMonitor->IsDataReadyL() ) - - if ( error == KErrNone && - dataReady && - iPropertyMonitor->IsCallConnected() ) - { - MUS_LOG( "mus: [MUSAO] Starting Mush Client" ) - TRAP( error, StartMusClientL() ) - - MUS_LOG1("mus: [MUSAO] Error Ocurred = %d",error ) - - if ( error != KErrNone ) - { - StopMusClient(); - } - } - else - { - MUS_LOG( "mus: [MUSAO] Stopping Mush Client" ) - StopMusClient(); - } - MUS_LOG( "mus: [MUSAO] <- CMusAoPlugin::MusCallStateChanged" ) - } // End of file