usbengines/usbotgwatcher/src/cusbmessagenotificationobserver.cpp
branchRCL_3
changeset 7 ff9df6630274
parent 6 a15c582fbf97
equal deleted inserted replaced
6:a15c582fbf97 7:ff9df6630274
     1 /*
     1 /*
     2  * Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies).
     2  * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
     3  * All rights reserved.
     3  * All rights reserved.
     4  * This component and the accompanying materials are made available
     4  * This component and the accompanying materials are made available
     5  * under the terms of "Eclipse Public License v1.0"
     5  * under the terms of "Eclipse Public License v1.0"
     6  * which accompanies this distribution, and is available
     6  * which accompanies this distribution, and is available
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     7  * at the URL "http://www.eclipse.org/legal/epl-v10.html".
    87 
    87 
    88     // check if the same observer already exist in a list
    88     // check if the same observer already exist in a list
    89     if (KErrNotFound != iObservers.Find(&aObserver))
    89     if (KErrNotFound != iObservers.Find(&aObserver))
    90         {
    90         {
    91         LOG("Observer already exists");
    91         LOG("Observer already exists");
    92         Panic( EObserverAlreadyExists);
    92         PANIC( EObserverAlreadyExists);
    93         return;
    93         return;
    94         }
    94         }
    95     iObservers.AppendL(&aObserver);
    95     iObservers.AppendL(&aObserver);
    96 
    96 
    97     if (KFirst == iObservers.Count()) // first item
    97     if (KFirst == iObservers.Count()) // first item
   112 
   112 
   113     TInt i(iObservers.Find(&aObserver));
   113     TInt i(iObservers.Find(&aObserver));
   114     if (KErrNotFound == i)
   114     if (KErrNotFound == i)
   115         {
   115         {
   116         LOG("Observer not found" )
   116         LOG("Observer not found" )
   117         Panic( ECanNotFindMessageNotificationObserver);
   117         PANIC( ECanNotFindMessageNotificationObserver);
   118         return;
   118         return;
   119         }
   119         }
   120 
   120 
   121     iObservers.Remove(i);
   121     iObservers.Remove(i);
   122 
   122