src/hbservers/hbthemeserver/hbthemewatcher_symbian_p.h
changeset 3 11d3954df52a
child 30 80e4d18b72f5
equal deleted inserted replaced
2:06ff229162e9 3:11d3954df52a
       
     1 /****************************************************************************
       
     2 **
       
     3 ** Copyright (C) 2008-2010 Nokia Corporation and/or its subsidiary(-ies).
       
     4 ** All rights reserved.
       
     5 ** Contact: Nokia Corporation (developer.feedback@nokia.com)
       
     6 **
       
     7 ** This file is part of the HbServers module of the UI Extensions for Mobile.
       
     8 **
       
     9 ** GNU Lesser General Public License Usage
       
    10 ** This file may be used under the terms of the GNU Lesser General Public
       
    11 ** License version 2.1 as published by the Free Software Foundation and
       
    12 ** appearing in the file LICENSE.LGPL included in the packaging of this file.
       
    13 ** Please review the following information to ensure the GNU Lesser General
       
    14 ** Public License version 2.1 requirements will be met:
       
    15 ** http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
       
    16 **
       
    17 ** In addition, as a special exception, Nokia gives you certain additional
       
    18 ** rights.  These rights are described in the Nokia Qt LGPL Exception
       
    19 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
       
    20 **
       
    21 ** If you have questions regarding the use of this file, please contact
       
    22 ** Nokia at developer.feedback@nokia.com.
       
    23 **
       
    24 ****************************************************************************/
       
    25 
       
    26 #ifndef HBTHEMEWATCHER_SYMBIAN_P_H
       
    27 #define HBTHEMEWATCHER_SYMBIAN_P_H
       
    28 
       
    29 #include <QString>
       
    30 
       
    31 #include "hbthemecommon_p.h"
       
    32 
       
    33 #include <e32property.h>
       
    34 #include <e32base.h>
       
    35 #include <f32file.h>
       
    36 
       
    37 class HbThemeServerPrivate;
       
    38 
       
    39 //**********************************
       
    40 //CHbThemeWatcher
       
    41 //**********************************
       
    42 /**
       
    43 This class is for watching changes in active theme e.g. ejection of the MMC.
       
    44 */
       
    45 class CHbThemeWatcher : public CActive
       
    46 {
       
    47 public:
       
    48     static CHbThemeWatcher* NewL(HbThemeServerPrivate& aObserver);
       
    49     ~CHbThemeWatcher();
       
    50     void startWatchingL(const QString &file);
       
    51 
       
    52 protected: // From CActive
       
    53     void RunL();
       
    54     void DoCancel();
       
    55 
       
    56 private:
       
    57     CHbThemeWatcher(HbThemeServerPrivate& aObserver);
       
    58     void ConstructL();    
       
    59 
       
    60 private: // data
       
    61     RFs iFs;
       
    62     QString iFile;
       
    63     HbThemeServerPrivate& iObserver;
       
    64 };
       
    65 
       
    66 //**********************************
       
    67 //CHbThemeChangeNotificationListener
       
    68 //**********************************
       
    69 /**
       
    70 This class represents a listener for Pub/Sub events sent from the clients.
       
    71 Functions are provided to parse clients messages.
       
    72 */
       
    73 class CHbThemeChangeNotificationListener : public CActive
       
    74 {
       
    75 public:
       
    76     static CHbThemeChangeNotificationListener* NewL(HbThemeServerPrivate& aObserver);
       
    77     virtual ~CHbThemeChangeNotificationListener();
       
    78     void startListeningL();
       
    79     void stopListening();
       
    80 
       
    81 protected: // From CActive
       
    82     void RunL();
       
    83     void DoCancel();
       
    84 
       
    85 private:
       
    86     CHbThemeChangeNotificationListener(HbThemeServerPrivate& aObserver);
       
    87     void ConstructL();
       
    88     bool parseData(const TDesC& requestData, HbThemeServerRequest& etype, TDes& data);
       
    89 
       
    90 private: // data
       
    91     RProperty themeRequestProp;
       
    92     HbThemeServerPrivate& iObserver;
       
    93 };
       
    94 
       
    95 #endif // HBTHEMEWATCHER_SYMBIAN_P_H