javamanager/javacaptain/extensionplugins/settingslistener/src.s60/settingslistenerimpl.h
changeset 49 35baca0e7a2e
child 50 023eef975703
equal deleted inserted replaced
35:85266cc22c7f 49:35baca0e7a2e
       
     1 /*
       
     2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  Platform specific component which manages all the listeners
       
    15 *                     listening changes in system configuration. Currently only Central
       
    16 *                     Repository listening is supported.
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef SETTINGSLISTENERIMPL_H
       
    21 #define SETTINGSLISTENERIMPL_H
       
    22 
       
    23 #include "javaosheaders.h"
       
    24 
       
    25 #include "settingslistenerinterface.h"
       
    26 
       
    27 #include <vector>
       
    28 #include <memory>
       
    29 #include <cenrepnotifyhandler.h>
       
    30 
       
    31 namespace java
       
    32 {
       
    33 namespace captain
       
    34 {
       
    35 
       
    36 class CoreInterface;
       
    37 class CenRepListener;
       
    38 
       
    39 OS_NONSHARABLE_CLASS(SettingsListenerImpl) :  public SettingsListenerInterface
       
    40 {
       
    41 public:
       
    42     SettingsListenerImpl(CoreInterface* aCore);
       
    43     virtual ~SettingsListenerImpl();
       
    44 
       
    45     // SystemSettingsChangeListenerInterface
       
    46     virtual void StartListening();
       
    47     virtual void StopListening();
       
    48 
       
    49 private:
       
    50     void cleanUp();
       
    51     int createCenRepKeyListener(TUid aRepoId, TUint32 aKeyId,
       
    52                             CCenRepNotifyHandler::TCenRepKeyType aKeyType,
       
    53                             std::auto_ptr<CenRepListener>& aListener);
       
    54     int createCenRepListener(TUid aRepoId, CenRepListener*& aListener);
       
    55 
       
    56     CoreInterface* mCore;  // resource not owned
       
    57     typedef std::vector<CenRepListener*> crListeners_t;
       
    58     crListeners_t mCenRepListeners; // listeners are owned resources.
       
    59 
       
    60 };
       
    61 
       
    62 } // namespace captain
       
    63 } // namespace java
       
    64 
       
    65 #endif // SETTINGSLISTENERIMPL_H
       
    66