idlefw/plugins/devicestatus/inc/aicugpublisher.h
branchRCL_3
changeset 30 a5a39a295112
equal deleted inserted replaced
29:0efa10d348c0 30:a5a39a295112
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Closed user group (CUG) publisher.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_AICUGPUBLISHER_H
       
    20 #define C_AICUGPUBLISHER_H
       
    21 
       
    22 // System includes
       
    23 #include <e32base.h>
       
    24 #include <aidevicestatuscontentmodel.h>
       
    25 #include <RSSSettings.h>
       
    26 #include <MSSSettingsObserver.h>
       
    27 
       
    28 // User includes
       
    29 #include "aidevicestatuspublisher.h"
       
    30 
       
    31 // Forward declarations
       
    32 class MAiDeviceStatusContentObserver;
       
    33 class CHsContentPublisher;
       
    34 
       
    35 /**
       
    36  *  @ingroup group_devicestatusplugin
       
    37  *
       
    38  *  Closed user group (CUG) publisher.
       
    39  *
       
    40  *  @since S60 3.2
       
    41  */
       
    42 NONSHARABLE_CLASS( CAiCUGPublisher ): public CBase, 
       
    43     public MAiDeviceStatusPublisher,
       
    44     public MSSSettingsObserver
       
    45     {
       
    46 public:
       
    47 
       
    48     static CAiCUGPublisher* NewL();
       
    49 
       
    50     virtual ~CAiCUGPublisher();
       
    51 
       
    52 
       
    53 protected:
       
    54 
       
    55 // from base class MAiDeviceStatusPublisher
       
    56 
       
    57     void ResumeL();
       
    58     void Subscribe( MAiContentObserver& aObserver, 
       
    59                     CHsContentPublisher& aExtension,
       
    60                     MAiPublishPrioritizer& aPrioritizer,
       
    61                     MAiPublisherBroadcaster& aBroadcaster );
       
    62     void RefreshL( TBool aClean );
       
    63     TBool RefreshL( TInt aContentId, TBool aClean );
       
    64 
       
    65 // from base class MSSSettingsObserver
       
    66 
       
    67     void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue );
       
    68 
       
    69 
       
    70 private:
       
    71 
       
    72     CAiCUGPublisher();
       
    73 
       
    74     void ConstructL();
       
    75 
       
    76     /**
       
    77      * Updates CUG indicator if needed.
       
    78      */
       
    79     void UpdateCUGIndicatorL( TInt aValue );
       
    80     
       
    81 
       
    82 private: // data
       
    83 
       
    84     /**
       
    85      * Content observer.
       
    86      * Not own.
       
    87      */
       
    88     MAiContentObserver* iContentObserver;
       
    89 
       
    90     /**
       
    91      * Property extension.
       
    92      * Not own.
       
    93      */
       
    94     CHsContentPublisher* iExtension;
       
    95 
       
    96     /**
       
    97      * SS Settings client. Used to observer CUG changes.
       
    98      */
       
    99     RSSSettings iSSSettings;
       
   100     
       
   101     /**
       
   102      * Published CUG text. Owned.
       
   103      */
       
   104     HBufC* iCugText;
       
   105     
       
   106     /**
       
   107      * Previous CUG value
       
   108      */
       
   109     TInt iCugValue;
       
   110     };
       
   111 
       
   112 
       
   113 #endif // C_AICUGPUBLISHER_H