uifw/AvKon/src/akndiscreetpopupserverhandler.cpp
branchRCL_3
changeset 4 8ca85d2f0db7
parent 0 2f259fa3e83a
child 55 aecbbf00d063
equal deleted inserted replaced
0:2f259fa3e83a 4:8ca85d2f0db7
    18 
    18 
    19 #include <eikcmobs.h>
    19 #include <eikcmobs.h>
    20 #include <avkon.hrh>
    20 #include <avkon.hrh>
    21 #include "akndiscreetpopupserverhandler.h"
    21 #include "akndiscreetpopupserverhandler.h"
    22 #include "akndiscreetpopupdata.h"
    22 #include "akndiscreetpopupdata.h"
    23 
    23 #include "akntrace.h"
    24 
    24 
    25 // ======== MEMBER FUNCTIONS ========
    25 // ======== MEMBER FUNCTIONS ========
    26 
    26 
    27 // ---------------------------------------------------------------------------
    27 // ---------------------------------------------------------------------------
    28 // CAknDiscreetPopupServerHandler::NewL
    28 // CAknDiscreetPopupServerHandler::NewL
    55 // CAknDiscreetPopupServerHandler::~CAknDiscreetPopupServerHandler
    55 // CAknDiscreetPopupServerHandler::~CAknDiscreetPopupServerHandler
    56 // ---------------------------------------------------------------------------
    56 // ---------------------------------------------------------------------------
    57 //
    57 //
    58 CAknDiscreetPopupServerHandler::~CAknDiscreetPopupServerHandler()
    58 CAknDiscreetPopupServerHandler::~CAknDiscreetPopupServerHandler()
    59     {
    59     {
       
    60     _AKNTRACE_FUNC_ENTER;
    60     iLaunchers.ResetAndDestroy();
    61     iLaunchers.ResetAndDestroy();
    61     iUiServer.Close();
    62     iUiServer.Close();
       
    63     _AKNTRACE_FUNC_EXIT;
    62     }
    64     }
    63 
    65 
    64 
    66 
    65 // ---------------------------------------------------------------------------
    67 // ---------------------------------------------------------------------------
    66 // CAknDiscreetPopupServerHandler::LaunchGlobalPopup
    68 // CAknDiscreetPopupServerHandler::LaunchGlobalPopup
   189 // CAknDiscreetPopupServerHandler::ConstructL
   191 // CAknDiscreetPopupServerHandler::ConstructL
   190 // ---------------------------------------------------------------------------
   192 // ---------------------------------------------------------------------------
   191 //
   193 //
   192 void CAknDiscreetPopupServerHandler::ConstructL()
   194 void CAknDiscreetPopupServerHandler::ConstructL()
   193     {
   195     {
       
   196     _AKNTRACE_FUNC_ENTER;
   194     User::LeaveIfError( iUiServer.Connect() );
   197     User::LeaveIfError( iUiServer.Connect() );
       
   198     _AKNTRACE_FUNC_EXIT;
   195     }
   199     }
   196 
   200 
   197 
   201 
   198 // ---------------------------------------------------------------------------
   202 // ---------------------------------------------------------------------------
   199 // CAknDiscreetPopupServerHandler::PopupIdInUse
   203 // CAknDiscreetPopupServerHandler::PopupIdInUse
   219 // CAknDiscreetPopupGlobalLauncher::~CAknDiscreetPopupGlobalLauncher
   223 // CAknDiscreetPopupGlobalLauncher::~CAknDiscreetPopupGlobalLauncher
   220 // ---------------------------------------------------------------------------
   224 // ---------------------------------------------------------------------------
   221 //
   225 //
   222 CAknDiscreetPopupGlobalLauncher::~CAknDiscreetPopupGlobalLauncher()
   226 CAknDiscreetPopupGlobalLauncher::~CAknDiscreetPopupGlobalLauncher()
   223     {
   227     {
       
   228     _AKNTRACE( "[%s][%s] Enter ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   224     if ( IsActive() && iHandler )
   229     if ( IsActive() && iHandler )
   225         {
   230         {
   226         // Cancel request using status handle
   231         // Cancel request using status handle
   227         TAknDiscreetPopupCancelRequestData cancelData;
   232         TAknDiscreetPopupCancelRequestData cancelData;
   228         cancelData.SetStatusHandle( ( TUint ) &iStatus );
   233         cancelData.SetStatusHandle( ( TUint ) &iStatus );
   229         iHandler->UiServer()->DoDiscreetPopupAction( &cancelData );
   234         iHandler->UiServer()->DoDiscreetPopupAction( &cancelData );
   230         }
   235         }
   231     Cancel();
   236     Cancel();
       
   237     _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   232     }
   238     }
   233 
   239 
   234 
   240 
   235 // ---------------------------------------------------------------------------
   241 // ---------------------------------------------------------------------------
   236 // CAknDiscreetPopupGlobalLauncher::LaunchDiscreetPopup
   242 // CAknDiscreetPopupGlobalLauncher::LaunchDiscreetPopup
   237 // ---------------------------------------------------------------------------
   243 // ---------------------------------------------------------------------------
   238 //
   244 //
   239 void CAknDiscreetPopupGlobalLauncher::LaunchDiscreetPopup()
   245 void CAknDiscreetPopupGlobalLauncher::LaunchDiscreetPopup()
   240     {
   246     {
       
   247     _AKNTRACE( "[%s][%s] Enter ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   241     if ( IsActive() )
   248     if ( IsActive() )
   242         {
   249         {
       
   250         _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   243         return;
   251         return;
   244         }
   252         }
   245     RenewRequest();
   253     RenewRequest();
       
   254     _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   246     }
   255     }
   247 
   256 
   248 
   257 
   249 // ---------------------------------------------------------------------------
   258 // ---------------------------------------------------------------------------
   250 // CAknDiscreetPopupGlobalLauncher::RunL
   259 // CAknDiscreetPopupGlobalLauncher::RunL
   251 // ---------------------------------------------------------------------------
   260 // ---------------------------------------------------------------------------
   252 //
   261 //
   253 void CAknDiscreetPopupGlobalLauncher::RunL()
   262 void CAknDiscreetPopupGlobalLauncher::RunL()
   254     {
   263     {
       
   264     _AKNTRACE( "[%s][%s] Enter,  iStatus : %d", 
       
   265     		"CAknDiscreetPopupGlobalLauncher", __FUNCTION__, iStatus.Int() );
   255     if ( iStatus.Int() != KRequestPending )
   266     if ( iStatus.Int() != KRequestPending )
   256         {
   267         {
   257         if( iCommandObserver )
   268         if( iCommandObserver )
   258         	{
   269         	{
   259         	if( iStatus.Int() == KErrCompletion && iCommandId )
   270         	if( iStatus.Int() == KErrCompletion && iCommandId )
   269         }
   280         }
   270     else
   281     else
   271         {
   282         {
   272         RenewRequest();
   283         RenewRequest();
   273         }
   284         }
       
   285     _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalLauncher", __FUNCTION__ );
   274     }
   286     }
   275 
   287 
   276 
   288 
   277 // ---------------------------------------------------------------------------
   289 // ---------------------------------------------------------------------------
   278 // CAknDiscreetPopupGlobalLauncher::DoCancel
   290 // CAknDiscreetPopupGlobalLauncher::DoCancel
   316 //
   328 //
   317 void CAknDiscreetPopupGlobalLauncher::RenewRequest()
   329 void CAknDiscreetPopupGlobalLauncher::RenewRequest()
   318     {
   330     {
   319     if ( iHandler )
   331     if ( iHandler )
   320         {
   332         {
       
   333         _AKNTRACE( "CAknDiscreetPopupGlobalLauncher::RenewRequest, issue request." );
   321         iHandler->UiServer()->DoDiscreetPopupAction( PopupData(), &iStatus );
   334         iHandler->UiServer()->DoDiscreetPopupAction( PopupData(), &iStatus );
   322         }
   335         }
   323     SetActive();
   336     SetActive();
   324     }
   337     }
   325 
   338 
   343         const TInt& aCommandId,
   356         const TInt& aCommandId,
   344         const TInt& aPopupId,
   357         const TInt& aPopupId,
   345         const TUid& aAppUid,
   358         const TUid& aAppUid,
   346         const TUid& aViewUid )
   359         const TUid& aViewUid )
   347     {
   360     {
       
   361     _AKNTRACE( "[%s][%s] Enter ", "CAknDiscreetPopupGlobalParamLauncher", __FUNCTION__ );
   348     CAknDiscreetPopupGlobalParamLauncher* self = 
   362     CAknDiscreetPopupGlobalParamLauncher* self = 
   349         new ( ELeave ) CAknDiscreetPopupGlobalParamLauncher(
   363         new ( ELeave ) CAknDiscreetPopupGlobalParamLauncher(
   350                 aHandler, aObserver, aCommandId, aPopupId, aAppUid, aViewUid );
   364                 aHandler, aObserver, aCommandId, aPopupId, aAppUid, aViewUid );
   351     CleanupStack::PushL( self );
   365     CleanupStack::PushL( self );
   352     self->ConstructL();
   366     self->ConstructL();
   353     CleanupStack::Pop( self );
   367     CleanupStack::Pop( self );
       
   368     _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalParamLauncher", __FUNCTION__ );
   354     return self;
   369     return self;
   355     }
   370     }
   356 
   371 
   357 
   372 
   358 // ---------------------------------------------------------------------------
   373 // ---------------------------------------------------------------------------
   436         const TInt& aCommandId,
   451         const TInt& aCommandId,
   437         const TInt& aPopupId,
   452         const TInt& aPopupId,
   438         const TUid& aAppUid,
   453         const TUid& aAppUid,
   439         const TUid& aViewUid )
   454         const TUid& aViewUid )
   440     {
   455     {
       
   456     _AKNTRACE( "[%s][%s] Enter ", "CAknDiscreetPopupGlobalResourceLauncher", __FUNCTION__ );
   441     CAknDiscreetPopupGlobalResourceLauncher* self = 
   457     CAknDiscreetPopupGlobalResourceLauncher* self = 
   442         new ( ELeave ) CAknDiscreetPopupGlobalResourceLauncher(
   458         new ( ELeave ) CAknDiscreetPopupGlobalResourceLauncher(
   443                 aHandler, aObserver, aCommandId, aPopupId, aAppUid, aViewUid );
   459                 aHandler, aObserver, aCommandId, aPopupId, aAppUid, aViewUid );
   444     CleanupStack::PushL( self );
   460     CleanupStack::PushL( self );
   445     self->ConstructL();
   461     self->ConstructL();
   446     CleanupStack::Pop( self );
   462     CleanupStack::Pop( self );
       
   463     _AKNTRACE( "[%s][%s] Exit ", "CAknDiscreetPopupGlobalResourceLauncher", __FUNCTION__ );
   447     return self;
   464     return self;
   448     }
   465     }
   449 
   466 
   450 
   467 
   451 // ---------------------------------------------------------------------------
   468 // ---------------------------------------------------------------------------