activityfw/storage/server/src/afobservertask.cpp
changeset 124 e36b2f4799c0
parent 115 3ab5c078b490
equal deleted inserted replaced
121:0b3699f6c654 124:e36b2f4799c0
    77 // -----------------------------------------------------------------------------
    77 // -----------------------------------------------------------------------------
    78 /**
    78 /**
    79  * Interface implementation
    79  * Interface implementation
    80  * @see CActivityTask::BroadcastReceivedL(const RMessage2&)
    80  * @see CActivityTask::BroadcastReceivedL(const RMessage2&)
    81  */
    81  */
    82 void CAfObserverTask::BroadcastReceivedL(const RMessage2& msg)
    82 void CAfObserverTask::BroadcastReceivedL(const RMessage2& msg, TBool applicationUninstalled)
    83 {
    83 {
    84     if(EFalse != mMsg.IsNull()) {
    84     if (!applicationUninstalled && mMsg.IsNull()) {
    85         mGlobalStorage.Pop(this);//
    85         mGlobalStorage.Pop(this);//
    86         mLocalStorage.Pop(this);
    86         mLocalStorage.Pop(this);
       
    87         delete this;
       
    88     } else if(NotifyChange == mMsg.Function() &&
       
    89               (applicationUninstalled ||
       
    90                SaveActivity == msg.Function() ||
       
    91                RemoveActivity == msg.Function() ||
       
    92                RemoveApplicationActivities == msg.Function())){
       
    93         mMsg.Complete(KErrNone);
       
    94         mGlobalStorage.Pop(this);
    87         delete this;
    95         delete this;
    88     } else if (WaitActivity == mMsg.Function() &&
    96     } else if (WaitActivity == mMsg.Function() &&
    89                LaunchActivity == msg.Function()) {
    97                LaunchActivity == msg.Function()) {
    90                
    98                
    91         CAfEntry* entry = CAfEntry::NewLC(msg);
    99         CAfEntry* entry = CAfEntry::NewLC(msg);
   111                CancelNotify == msg.Function() &&
   119                CancelNotify == msg.Function() &&
   112                mMsg.Session() == msg.Session()) {
   120                mMsg.Session() == msg.Session()) {
   113         mGlobalStorage.Pop(this);
   121         mGlobalStorage.Pop(this);
   114         mMsg.Complete(KErrCancel);
   122         mMsg.Complete(KErrCancel);
   115         delete this;
   123         delete this;
   116     } else if(NotifyChange == mMsg.Function() &&
       
   117               (AddActivity == msg.Function() ||
       
   118                UpdateActivity == msg.Function() ||
       
   119                SaveActivity == msg.Function() ||
       
   120                RemoveActivity == msg.Function() ||
       
   121                RemoveApplicationActivities == msg.Function())){
       
   122         mMsg.Complete(KErrNone);
       
   123         mGlobalStorage.Pop(this);
       
   124         delete this;
       
   125     }
   124     }
   126 }
   125 }
   127 
   126 
   128 // -----------------------------------------------------------------------------
   127 // -----------------------------------------------------------------------------
   129 /**
   128 /**