idlefw/plugins/devicestatus/inc/aicugmcnpublisher.h
changeset 0 79c6a41cd166
child 8 d0529222e3f0
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     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_AICUGMCNPUBLISHER_H
       
    20 #define C_AICUGMCNPUBLISHER_H
       
    21 
       
    22 
       
    23 #include <e32base.h>
       
    24 #include <RSSSettings.h>
       
    25 #include <MSSSettingsObserver.h>
       
    26 #include "aidevicestatuspublisher.h"
       
    27 #include "aidevicestatuscontentmodel.h"
       
    28 #include "ainetworkinfoobserver.h"
       
    29 
       
    30 class MAiDeviceStatusContentObserver;
       
    31 class MAiPropertyExtension;
       
    32 class CAiNetworkInfoListener;
       
    33 
       
    34 const TInt KAnimDelay = 2000000;
       
    35 
       
    36 /**
       
    37  *  @ingroup group_devicestatusplugin
       
    38  *
       
    39  *  Closed user group (CUG) and Micro Cellular Network (MCN) publisher.
       
    40  *
       
    41  *  @since S60 3.2
       
    42  */
       
    43 class CAiCUGMCNPublisher : public CBase, public MAiDeviceStatusPublisher,
       
    44                         public MSSSettingsObserver, public MAiNetworkInfoObserver
       
    45     {
       
    46 public:
       
    47 
       
    48     static CAiCUGMCNPublisher* NewL();
       
    49 
       
    50     virtual ~CAiCUGMCNPublisher();
       
    51 
       
    52 protected:
       
    53 
       
    54 // from base class MAiDeviceStatusPublisher
       
    55 
       
    56     void ResumeL();
       
    57     void Subscribe( MAiContentObserver& aObserver, 
       
    58                     MAiPropertyExtension& aExtension,
       
    59                     MAiPublishPrioritizer& aPrioritizer,
       
    60                     MAiPublisherBroadcaster& aBroadcaster );
       
    61     void RefreshL( TBool aClean );
       
    62     TBool RefreshL( TInt aContentId, TBool aClean );
       
    63 
       
    64 // from base class MSSSettingsObserver
       
    65 
       
    66     void PhoneSettingChanged( TSSSettingsSetting aSetting, TInt aNewValue );
       
    67 
       
    68 //from base class MAiNetworkInfoObserver
       
    69 
       
    70     void HandleNetworkInfoChange( const MNWMessageObserver::TNWMessages& aMessage, 
       
    71         						const TNWInfo& aInfo, 
       
    72         						const TBool aShowOpInd );
       
    73 
       
    74 private:
       
    75 
       
    76     CAiCUGMCNPublisher();
       
    77 
       
    78     void ConstructL();
       
    79 
       
    80     /**
       
    81      * Updates CUGMCN indicator if needed.
       
    82      */
       
    83     void UpdateCUGMCNIndicatorL( TInt aValue );
       
    84     
       
    85     void Animate();
       
    86     
       
    87     void PublishCUG();
       
    88     
       
    89     void PublishMCN();
       
    90     
       
    91     /**
       
    92      * The call back function.
       
    93      * \param aAny A pointer to this class.
       
    94      */
       
    95     static TInt PeriodicTimerCallBack(TAny* aAny);
       
    96     
       
    97     void DoAnimation();
       
    98 
       
    99 
       
   100 private: // data
       
   101 
       
   102     /**
       
   103      * Used for doing the animation.
       
   104      * Own.
       
   105      */
       
   106     CPeriodic* iPeriodic;
       
   107     
       
   108     /**
       
   109      * Content observer.
       
   110      * Not own.
       
   111      */
       
   112     MAiContentObserver* iContentObserver;
       
   113 
       
   114     /**
       
   115      * Property extension.
       
   116      * Not own.
       
   117      */
       
   118     MAiPropertyExtension* iExtension;
       
   119 
       
   120     /**
       
   121      * SS Settings client. Used to observer CUGMCN changes.
       
   122      */
       
   123     RSSSettings iSSSettings;
       
   124     
       
   125     /**
       
   126      * Network info listener.
       
   127      * Own.
       
   128      */
       
   129     CAiNetworkInfoListener* iListener;
       
   130     
       
   131     /**
       
   132      * Soft indicators.
       
   133      */
       
   134     HBufC* iCUG;
       
   135     HBufC* iMCN;
       
   136     
       
   137     TBool iAnimationDone;
       
   138     };
       
   139 
       
   140 #endif // C_AICUGMCNPUBLISHER_H