upnpavcontrolpoint/avcontrolframework/inc/upnprcactionfactory.h
branchIOP_Improvements
changeset 40 08b5eae9f9ff
parent 39 6369bfd1b60d
child 41 b4d83ea1d6e2
equal deleted inserted replaced
39:6369bfd1b60d 40:08b5eae9f9ff
     1 /** @file
       
     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:  Produces rc actions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CUPNPRCACTIONFACTORY_H
       
    21 #define C_CUPNPRCACTIONFACTORY_H
       
    22 
       
    23 
       
    24 //  INCLUDES
       
    25 #include <e32base.h>
       
    26 #include "upnpavcontrolpointobserver.h"
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CUpnpService;
       
    30 class CUpnpAVControlPoint;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  RC action factory class.
       
    36 *  This class provides a Rendering Control action creation services.
       
    37 *
       
    38 *  @since Series 60 2.6
       
    39 */
       
    40 class CUpnpRcActionFactory : public CBase
       
    41     {
       
    42     public:  // Constructors and destructor
       
    43         
       
    44         /**
       
    45         * Two-phased constructor.
       
    46         */
       
    47 	    static CUpnpRcActionFactory* NewL( MUpnpAVControlPointObserver& aAVCPObserver,
       
    48 	    									CUpnpAVControlPoint& aAVCP );
       
    49         
       
    50         /**
       
    51         * Destructor.
       
    52         */
       
    53         ~CUpnpRcActionFactory();
       
    54 
       
    55     public: // New functions
       
    56 
       
    57         /**
       
    58         * Creates a GetVolume action.
       
    59         * @since Series 60 2.6
       
    60         * @param aAction Pointer for returning created action.
       
    61         * @param aDevice Target of the action.
       
    62         * @param aInstanceID rendering instance.
       
    63         * @param aChannel audio channel.
       
    64         * @return error code. KErrNone if no errors
       
    65         */
       
    66         TInt RcGetVolumeActionLC(
       
    67             CUpnpAction*& aAction,
       
    68             CUpnpDevice* aDevice,
       
    69             TInt aInstanceID,
       
    70             const TDesC8& aChannel);
       
    71         /**
       
    72         * Creates a SetVolume action.
       
    73         * @since Series 60 2.6
       
    74         * @param aAction Pointer for returning created action.
       
    75         * @param aDevice Target of the action.
       
    76         * @param aInstanceID rendering instance.
       
    77         * @param aChannel audio channel.
       
    78         * @param aVolume volume.
       
    79         * @return error code. KErrNone if no errors
       
    80         */
       
    81         TInt RcSetVolumeActionLC(
       
    82             CUpnpAction*& aAction,
       
    83             CUpnpDevice* aDevice,
       
    84             TInt aInstanceID,
       
    85             const TDesC8& aChannel,
       
    86             TInt aVolume);
       
    87          /**
       
    88         * Creates a GetMuteAction.
       
    89         * @since Series 60 2.6
       
    90         * @param aAction Pointer for returning created action.
       
    91         * @param aDevice Target of the action.
       
    92         * @param aInstanceID rendering instance.
       
    93         * @param aChannel audio channel.
       
    94         * @return error code. KErrNone if no errors
       
    95         */
       
    96         TInt RcGetMuteActionLC(
       
    97             CUpnpAction*& aAction,
       
    98             CUpnpDevice* aDevice,
       
    99             TInt aInstanceID,
       
   100             const TDesC8& aChannel);
       
   101         /**
       
   102         * ?Creates a SetMute action.
       
   103         * @since Series 60 2.6
       
   104         * @param aAction Pointer for returning created action.
       
   105         * @param aDevice Target of the action.
       
   106         * @param aInstanceID rendering instance.
       
   107         * @param aChannel audio channel.
       
   108         * @param aMute 
       
   109         * @return error code. KErrNone if no errors
       
   110         */
       
   111         TInt RcSetMuteActionLC(
       
   112             CUpnpAction*& aAction,
       
   113             CUpnpDevice* aDevice,
       
   114             TInt aInstanceID,
       
   115             const TDesC8& aChannel,
       
   116             const TDesC8& aMute);
       
   117 
       
   118 
       
   119     private:
       
   120 
       
   121         /**
       
   122         * C++ default constructor.
       
   123         */
       
   124 	    CUpnpRcActionFactory( MUpnpAVControlPointObserver& aAVCPObserver, 
       
   125 	    						CUpnpAVControlPoint& aAVCP );
       
   126 
       
   127         /**
       
   128         * By default Symbian 2nd phase constructor is private.
       
   129         */
       
   130 	    void ConstructL();
       
   131 
       
   132     private:    // Data
       
   133         //observer that is intrested about AVCP actions.
       
   134         MUpnpAVControlPointObserver& iAVControlPointObserver;
       
   135         // AVCP main class.
       
   136         CUpnpAVControlPoint& iAVCP;
       
   137 
       
   138     };
       
   139 
       
   140 #endif      // C_CUPNPRCACTIONFACTORY_H  
       
   141             
       
   142 // End of File