idlehomescreen/inc/xnvolumecontrol.h
changeset 0 f72a12da539e
equal deleted inserted replaced
-1:000000000000 0:f72a12da539e
       
     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:  Wrapper class for AknVolumeControl
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _XNVOLUMECONTROL_H
       
    20 #define _XNVOLUMECONTROL_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "xncomponent.h"
       
    25 #include "mxncomponentinterface.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MXnVolumeControlObserver;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 namespace XnVolumeControlInterface
       
    32 {
       
    33 _LIT8(KType, "volumecontrol");
       
    34 class MXnVolumeControlInterface : public XnComponentInterface::MXnComponentInterface
       
    35    {
       
    36 public:
       
    37 		
       
    38     static inline const TDesC8& Type()
       
    39         {
       
    40         return KType;
       
    41         }
       
    42 		
       
    43 public: // New functions
       
    44 	
       
    45 	/**
       
    46 	* Commented in xnvolumecontroladapter.h
       
    47 	*/	
       
    48 	virtual void SetValue( TInt aValue ) = 0;
       
    49 	
       
    50 	/**
       
    51 	* Commented in xnvolumecontroladapter.h
       
    52 	*/	
       
    53 	virtual TInt Value() = 0;
       
    54 	
       
    55 	/**
       
    56 	* Commented in xnvolumecontroladapter.h
       
    57 	*/
       
    58 	virtual void SetRange( TInt aMinimumValue, TInt aMaximumValue ) = 0;
       
    59 	
       
    60 	/**
       
    61 	* Commented in xnvolumecontroladapter.h
       
    62 	*/	
       
    63 	virtual void GetRange( TInt& aMiminumValue, TInt& aMaximumValue ) = 0;
       
    64 	
       
    65 	/**
       
    66 	* Commented in xnvolumecontroladapter.h
       
    67 	*/
       
    68 	virtual void SetObserver( MXnVolumeControlObserver* aObserver ) = 0;
       
    69 
       
    70 private:
       
    71 
       
    72    };
       
    73  }   
       
    74 
       
    75 /**
       
    76 *  @ingroup group_xnvolumecontrolfactory
       
    77 *  @lib xnvolumecontrol.lib
       
    78 *  @since Series 60 3.2
       
    79 */
       
    80 class CXnVolumeControl : public CXnComponent, public XnVolumeControlInterface::MXnVolumeControlInterface
       
    81    {
       
    82 
       
    83 public:
       
    84 	/**
       
    85 	 * 2 phase construction.
       
    86 	 */
       
    87 	static CXnVolumeControl* NewL();
       
    88 
       
    89 	/**
       
    90 	 * Destructor.
       
    91 	 */
       
    92 	virtual ~CXnVolumeControl();
       
    93 
       
    94 public: // New functions
       
    95 	
       
    96 	/**
       
    97 	* Commented in xnvolumecontroladapter.h
       
    98 	*/
       
    99 	void SetValue( TInt aValue );
       
   100 	
       
   101 	/**
       
   102 	* Commented in xnvolumecontroladapter.h
       
   103 	*/
       
   104 	TInt Value();
       
   105 	
       
   106 	/**
       
   107 	* Commented in xnvolumecontroladapter.h
       
   108 	*/
       
   109 	void SetRange( TInt aMinimumValue, TInt aMaximumValue );
       
   110 	
       
   111 	/**
       
   112 	* Commented in xnvolumecontroladapter.h
       
   113 	*/
       
   114 	void GetRange( TInt& aMiminumValue, TInt& aMaximumValue );
       
   115 	
       
   116 	/**
       
   117 	* Commented in xnvolumecontroladapter.h
       
   118 	*/
       
   119 	void SetObserver( MXnVolumeControlObserver* aObserver );
       
   120 
       
   121 public:
       
   122 
       
   123    	/**
       
   124       * Create a component interface according to the given type.
       
   125       * @param aType Type of the interface to create
       
   126       * @return Created interface or NULL if the provided type is not supported.
       
   127       */ 
       
   128     virtual XnComponentInterface::MXnComponentInterface* MakeInterfaceL(const TDesC8& aType);        
       
   129         
       
   130 private:
       
   131 	CXnVolumeControl();
       
   132 	void ConstructL();
       
   133    };
       
   134 
       
   135 #endif      // _XNVOLUMECONTROL_H
       
   136             
       
   137 // End of File