mmsharing/mmshavailability/inc/musavasettingavailability.h
changeset 22 496ad160a278
parent 0 f0cf47e981f9
equal deleted inserted replaced
15:ccd8e69b5392 22:496ad160a278
       
     1 /*
       
     2 * Copyright (c) 2005-2007 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:  Implements Settings Availability
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __MUSAVASETTINGAVAILABILITY_H__
       
    21 #define __MUSAVASETTINGAVAILABILITY_H__
       
    22 
       
    23 class CMusAvaAvailability;
       
    24 class MMusAvaAvailabilityObserver;
       
    25 class MMusAvaObserver;
       
    26 
       
    27 /**
       
    28  *  Implemets settings availability.
       
    29  *
       
    30  *  @lib musavailabilityplugin.lib
       
    31  *  @since S60 v3.2
       
    32  */
       
    33 class CMusAvaSettingAvailability : public CMusAvaAvailability
       
    34                                     
       
    35 	{
       
    36 public:
       
    37 
       
    38 	/**
       
    39      * Two-phased constructor
       
    40      *
       
    41      * @since S60 v3.2
       
    42      * @param aObserver Pointer to observer intercase
       
    43      * @param aModules is data container
       
    44      * @return Returns pointer to CMusAvaInterface object
       
    45      */
       
    46 	static CMusAvaSettingAvailability* NewL(
       
    47         MMusAvaAvailabilityObserver& aObserver);
       
    48 
       
    49 
       
    50 	static CMusAvaSettingAvailability* NewLC(
       
    51 	    MMusAvaAvailabilityObserver& aObserver);
       
    52 
       
    53     /**
       
    54      * Destructor
       
    55      */
       
    56 
       
    57     ~CMusAvaSettingAvailability();
       
    58 
       
    59     protected:
       
    60 
       
    61     /**
       
    62      * Constructor
       
    63      *
       
    64      * @since S60 v3.2
       
    65      * @param aObserver Pointer to observer intercase
       
    66      * @param aName availability name
       
    67      * @param aModules is data container
       
    68      * @return
       
    69      */
       
    70     CMusAvaSettingAvailability(
       
    71         MMusAvaAvailabilityObserver& aObserver);
       
    72 
       
    73     void ConstructL();
       
    74 
       
    75 // from base class CMusAvaAvailability
       
    76 
       
    77 public:
       
    78 
       
    79    /**
       
    80     * Executes for the availability.
       
    81     */
       
    82     virtual void DoExecuteL();
       
    83 
       
    84    /**
       
    85     * Stop the execution.
       
    86     */
       
    87     virtual void Stop();
       
    88     
       
    89     /**
       
    90      * From CMusAvaAvailability.
       
    91      * Returns availability name.
       
    92      *
       
    93      * @return Name of *this* availability.
       
    94      */
       
    95     virtual MMusAvaObserver::TAvailabilityName Name();
       
    96 
       
    97 private:
       
    98     
       
    99     /**
       
   100      * Checks the options response state.
       
   101      *
       
   102      * @since S60 v3.2          
       
   103      * @return Returns ETrue if options response is 200
       
   104      *                 else otherwise.
       
   105      */
       
   106     TBool IsForbiddenByOptionsResponse();
       
   107 
       
   108 
       
   109     /**
       
   110      * Checks the activation & Options response state.
       
   111      *
       
   112      * @since S60 v3.2               
       
   113      */
       
   114     void CheckActivationState();
       
   115  
       
   116 
       
   117 
       
   118     MUS_UNITTEST( UT_CMusAvaSettingAvailability )
       
   119     };
       
   120 
       
   121 
       
   122 #endif // __MUSAVASETTINGAVAILABILITY_H__
       
   123