javauis/amms_qt/ammscontrol/inc/cammsvolumecontrolgroup.h
branchRCL_3
changeset 24 0fd27995241b
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2005 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:  Group for volume controls
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CAMMSVOLUMECONTROLGROUP_H
       
    20 #define CAMMSVOLUMECONTROLGROUP_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <e32base.h>
       
    24 #include "cammscontrolgroup.h"
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CAMMSVolumeControl;
       
    28 
       
    29 // CONSTANTS
       
    30 _LIT(KAMMSVolumeControlClassName, ".amms.control.VolumeControl");
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35  *  Group for volume controls.
       
    36  *  This volume control group can be used with many CAMMSVolumeControl
       
    37  *  instances. Controls that belong to this group are identified with
       
    38  *  aClassName parameter given to the NewL / NewLC method.
       
    39  *
       
    40  *  @since 3.0
       
    41  */
       
    42 NONSHARABLE_CLASS(CAMMSVolumeControlGroup): public CAMMSControlGroup
       
    43 {
       
    44 public:  // Constructors and destructor
       
    45 
       
    46     /**
       
    47      * Two-phased constructor.
       
    48      * @param aControlName Class name that identifies controls
       
    49      * belonging tothis control group.
       
    50      */
       
    51     static CAMMSVolumeControlGroup* NewLC(const TDesC& aControlName);
       
    52 
       
    53     /**
       
    54      * Destructor.
       
    55      */
       
    56     ~CAMMSVolumeControlGroup();
       
    57 
       
    58 public: // New functions
       
    59     /**
       
    60      * Sets the current volume.
       
    61      *
       
    62      * @param aVolume Volume to be set.
       
    63      */
       
    64     void SetVolumeL(TInt aVolume);
       
    65 
       
    66 private: // New functions
       
    67     /**
       
    68      * Gets control. Ownership is not tranferred.
       
    69      *
       
    70      * @param aIndex Control index.
       
    71      */
       
    72     CAMMSVolumeControl* TypeSafeControl(TInt aIndex) const;
       
    73 
       
    74 public: // Functions from base class
       
    75     /**
       
    76      * Returns class name that identifies this control group.
       
    77      *
       
    78      * @return Control group name.
       
    79      */
       
    80     const TDesC16& ClassName();
       
    81 
       
    82 protected: // From
       
    83     /**
       
    84      * Called by when a new player is added
       
    85      *
       
    86      * @param aPlayer   The player being added
       
    87      * @param aControl  The player's control relevant to this group
       
    88      */
       
    89     void NotifyPlayerAddedL(CMMAPlayer *aPlayer, CMMAControl* aControl);
       
    90 
       
    91 private:
       
    92     /**
       
    93      * C++ default constructor.
       
    94      * @param aControlName Class name that identifies controls
       
    95      * belonging tothis control group.
       
    96      */
       
    97     CAMMSVolumeControlGroup(const TDesC& aControlName);
       
    98 
       
    99 protected: //Data
       
   100 
       
   101     TInt iVolume;
       
   102 };
       
   103 
       
   104 #endif // CAMMSVOLUMECONTROLGROUP_H
       
   105 
       
   106