upnpavcontrolpoint/avcontrolframework/inc/upnpavtactionfactory.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 avt actions
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef C_CUPNPAVTACTIONFACTORY_H
       
    21 #define C_CUPNPAVTACTIONFACTORY_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include "upnpavcontrolpointobserver.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CUpnpService;
       
    29 class CUpnpAVControlPoint;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  AV Transport factory class.
       
    35 *  This class creates AV Transport actions.
       
    36 *
       
    37 *  @since Series 60 2.6
       
    38 */
       
    39 class CUpnpAvtActionFactory : public CBase
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42         
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46 	    static CUpnpAvtActionFactory* NewL( MUpnpAVControlPointObserver& aAVCPObserver,
       
    47 	    									CUpnpAVControlPoint& aAVCP );
       
    48         /**
       
    49         * Destructor.
       
    50         */
       
    51         ~CUpnpAvtActionFactory();
       
    52 
       
    53     public: // New functions
       
    54         /**
       
    55         * Cretes and places in CU-stack a SetTransportURI action.
       
    56         * @since Series 60 2.6
       
    57         * @param aAction CUpnpAction pointer for created action.
       
    58         * @param aMediaRenderer Action's target device.
       
    59         * @param aInstanceId Media Renderer instance number.
       
    60         * @param aCurrentUri Resource URI.
       
    61         * @param aCurrentMetaData Resource metadata.
       
    62         * @return Error code. KErrNone if no errors.
       
    63         */
       
    64         TInt AvtSetTransportUriActionLC(
       
    65             CUpnpAction*& aAction,
       
    66             CUpnpDevice* aMediaRenderer,
       
    67             TInt aInstanceId,
       
    68             const TDesC8& aCurrentUri,
       
    69             const TDesC8& aCurrentMetaData );
       
    70         /**
       
    71         * Cretes and places in CU-stack a SetNextTransportURI action.
       
    72         * @since Series 60 2.6
       
    73         * @param aAction CUpnpAction pointer for created action.
       
    74         * @param aMediaRenderer Action's target device.
       
    75         * @param aInstanceId Media Renderer instance number.
       
    76         * @param aNextUri Resource URI.
       
    77         * @param aNextMetaData Resource metadata.
       
    78         * @return Error code. KErrNone if no errors.
       
    79         */
       
    80         TInt AvtSetNextTransportUriActionLC(
       
    81             CUpnpAction*& aAction,
       
    82             CUpnpDevice* aMediaRenderer,
       
    83             TInt aInstanceId,
       
    84             const TDesC8& aNextUri,
       
    85             const TDesC8& aNextMetaData );
       
    86         /**
       
    87         * Cretes and places in CU-stack a Seek action.
       
    88         * @since Series 60 2.6
       
    89         * @param aAction CUpnpAction pointer for created action.
       
    90         * @param aMediaRenderer Action's target device.
       
    91         * @param aInstanceId Media Renderer instance number.
       
    92         * @param aUnit 
       
    93         * @param aTarget 
       
    94         * @return Error code. KErrNone if no errors.
       
    95         */
       
    96         TInt AvtSeekActionLC(
       
    97             CUpnpAction*& aAction,
       
    98             CUpnpDevice* aMediaRenderer,
       
    99             TInt aInstanceId,
       
   100             const TDesC8& aUnit,
       
   101             const TDesC8& aTarget);
       
   102         /**
       
   103         * Cretes and places in CU-stack a GetMediaInfo action.
       
   104         * @since Series 60 2.6
       
   105         * @param aAction CUpnpAction pointer for created action.
       
   106         * @param aMediaRenderer Action's target device.
       
   107         * @param aInstanceId Media Renderer instance number.
       
   108         * @return Error code. KErrNone if no errors.
       
   109         */
       
   110         TInt AvtMediaInfoActionLC(
       
   111             CUpnpAction*& aAction,
       
   112             CUpnpDevice* aMediaRenderer,
       
   113             TInt aInstanceId);
       
   114         /**
       
   115         * Cretes and places in CU-stack a GetTransportInfo action.
       
   116         * @since Series 60 2.6
       
   117         * @param aAction CUpnpAction pointer for created action.
       
   118         * @param aMediaRenderer Action's target device.
       
   119         * @param aInstanceId Media Renderer instance number.
       
   120         * @return Error code. KErrNone if no errors.
       
   121         */
       
   122         TInt AvtTransportInfoActionLC(
       
   123             CUpnpAction*& aAction,
       
   124             CUpnpDevice* aMediaRenderer,
       
   125             TInt aInstanceId);
       
   126         /**
       
   127         * Cretes and places in CU-stack a GetPositionInfo action.
       
   128         * @since Series 60 2.6
       
   129         * @param aAction CUpnpAction pointer for created action.
       
   130         * @param aMediaRenderer Action's target device.
       
   131         * @param aInstanceId Media Renderer instance number.
       
   132         * @return Error code. KErrNone if no errors.
       
   133         */
       
   134         TInt AvtPositionInfoActionLC(
       
   135             CUpnpAction*& aAction,
       
   136             CUpnpDevice* aMediaRenderer,
       
   137             TInt aInstanceId);
       
   138         /**
       
   139         * Cretes and places in CU-stack a GetDeviceCapabilities action.
       
   140         * @since Series 60 2.6
       
   141         * @param aAction CUpnpAction pointer for created action.
       
   142         * @param aMediaRenderer Action's target device.
       
   143         * @param aInstanceId Media Renderer instance number.
       
   144         * @return Error code. KErrNone if no errors.
       
   145         */
       
   146         TInt AvtDeviceCapabilitiesActionLC(
       
   147             CUpnpAction*& aAction,
       
   148             CUpnpDevice* aMediaRenderer,
       
   149             TInt aInstanceId);
       
   150         /**
       
   151         * Cretes and places in CU-stack a GetTransportSettings action.
       
   152         * @since Series 60 2.6
       
   153         * @param aAction CUpnpAction pointer for created action.
       
   154         * @param aMediaRenderer Action's target device.
       
   155         * @param aInstanceId Media Renderer instance number.
       
   156         * @return Error code. KErrNone if no errors.
       
   157         */
       
   158         TInt AvtTransportSettingsActionLC(
       
   159             CUpnpAction*& aAction,
       
   160             CUpnpDevice* aMediaRenderer,
       
   161             TInt aInstanceId);
       
   162         /**
       
   163         * Cretes and places in CU-stack a Stop action.
       
   164         * @since Series 60 2.6
       
   165         * @param aAction CUpnpAction pointer for created action.
       
   166         * @param aMediaRenderer Action's target device.
       
   167         * @param aInstanceId Media Renderer instance number.
       
   168         * @return Error code. KErrNone if no errors.
       
   169         */
       
   170         TInt AvtStopActionLC(
       
   171             CUpnpAction*& aAction,
       
   172             CUpnpDevice* aMediaRenderer,
       
   173             TInt aInstanceId);
       
   174         /**
       
   175         * Cretes and places in CU-stack a Play action.
       
   176         * @since Series 60 2.6
       
   177         * @param aAction CUpnpAction pointer for created action.
       
   178         * @param aMediaRenderer Action's target device.
       
   179         * @param aInstanceId Media Renderer instance number.
       
   180         * @param aSpeed Play speed.
       
   181         * @return Error code. KErrNone if no errors.
       
   182         */
       
   183         TInt AvtPlayActionLC(
       
   184             CUpnpAction*& aAction,
       
   185             CUpnpDevice* aMediaRenderer,
       
   186             TInt aInstanceId,
       
   187             const TDesC8& aSpeed);
       
   188         /**
       
   189         * Cretes and places in CU-stack a Pause action.
       
   190         * @since Series 60 2.6
       
   191         * @param aAction CUpnpAction pointer for created action.
       
   192         * @param aMediaRenderer Action's target device.
       
   193         * @param aInstanceId Media Renderer instance number.
       
   194         * @return Error code. KErrNone if no errors.
       
   195         */
       
   196         TInt AvtPauseActionLC(
       
   197             CUpnpAction*& aAction,
       
   198             CUpnpDevice* aMediaRenderer,
       
   199             TInt aInstanceId);
       
   200         /**
       
   201         * Cretes and places in CU-stack a Record action.
       
   202         * @since Series 60 2.6
       
   203         * @param aAction CUpnpAction pointer for created action.
       
   204         * @param aMediaRenderer Action's target device.
       
   205         * @param aInstanceId Media Renderer instance number.
       
   206         * @return Error code. KErrNone if no errors.
       
   207         */
       
   208         TInt AvtRecordActionLC(
       
   209             CUpnpAction*& aAction,
       
   210             CUpnpDevice* aMediaRenderer,
       
   211             TInt aInstanceId);
       
   212         /**
       
   213         * Cretes and places in CU-stack a Next action.
       
   214         * @since Series 60 2.6
       
   215         * @param aAction CUpnpAction pointer for created action.
       
   216         * @param aMediaRenderer Action's target device.
       
   217         * @param aInstanceId Media Renderer instance number.
       
   218         * @return Error code. KErrNone if no errors.
       
   219         */
       
   220         TInt AvtNextActionLC(
       
   221             CUpnpAction*& aAction,
       
   222             CUpnpDevice* aMediaRenderer,
       
   223             TInt aInstanceId);
       
   224         /**
       
   225         * Cretes and places in CU-stack a Previous action.
       
   226         * @since Series 60 2.6
       
   227         * @param aAction CUpnpAction pointer for created action.
       
   228         * @param aMediaRenderer Action's target device.
       
   229         * @param aInstanceId Media Renderer instance number.
       
   230         * @return Error code. KErrNone if no errors.
       
   231         */
       
   232         TInt AvtPreviousActionLC(
       
   233             CUpnpAction*& aAction,
       
   234             CUpnpDevice* aMediaRenderer,
       
   235             TInt aInstanceId);
       
   236         /**
       
   237         * Cretes and places in CU-stack a SetPlayMode action.
       
   238         * @since Series 60 2.6
       
   239         * @param aAction CUpnpAction pointer for created action.
       
   240         * @param aMediaRenderer Action's target device.
       
   241         * @param aInstanceId Media Renderer instance number.
       
   242         * @param aPlayMode Mode of play.
       
   243         * @return Error code. KErrNone if no errors.
       
   244         */
       
   245         TInt AvtSetPlayModeActionLC(
       
   246             CUpnpAction*& aAction,
       
   247             CUpnpDevice* aMediaRenderer,
       
   248             TInt aInstanceId,
       
   249             const TDesC8& aPlayMode);
       
   250         /**
       
   251         * Cretes and places in CU-stack a SetRecordQualityMode action.
       
   252         * @since Series 60 2.6
       
   253         * @param aAction CUpnpAction pointer for created action.
       
   254         * @param aMediaRenderer Action's target device.
       
   255         * @param aInstanceId Media Renderer instance number.
       
   256         * @param aRecordMode Mode of recording.
       
   257         * @return Error code. KErrNone if no errors.
       
   258         */
       
   259         TInt AvtSetRecordModeActionLC(
       
   260             CUpnpAction*& aAction,
       
   261             CUpnpDevice* aMediaRenderer,
       
   262             TInt aInstanceId,
       
   263             const TDesC8& aRecordMode);
       
   264         /**
       
   265         * Cretes and places in CU-stack a GetTransportIDs action.
       
   266         * @since Series 60 2.6
       
   267         * @param aAction CUpnpAction pointer for created action.
       
   268         * @param aMediaRenderer Action's target device.
       
   269         * @param aInstanceId Media Renderer instance number.
       
   270         * @return Error code. KErrNone if no errors.
       
   271         */
       
   272         TInt AvtTransportsActionLC(
       
   273             CUpnpAction*& aAction,
       
   274             CUpnpDevice* aMediaRenderer,
       
   275             TInt aInstanceId);
       
   276 
       
   277     private:
       
   278         
       
   279     /**
       
   280     * C++ default constructor.
       
   281         */
       
   282         CUpnpAvtActionFactory( MUpnpAVControlPointObserver& aAVCPObserver,
       
   283         						CUpnpAVControlPoint& aAVCP );
       
   284         
       
   285         /**
       
   286         * By default Symbian 2nd phase constructor is private.
       
   287         */
       
   288         void ConstructL();
       
   289         
       
   290     private:    // Data
       
   291         //observer that is intrested about AVCP actions
       
   292         MUpnpAVControlPointObserver& iAVControlPointObserver;
       
   293         // AVCP main class
       
   294         CUpnpAVControlPoint& iAVCP;
       
   295     };
       
   296     
       
   297 #endif      // C_CUPNPAVTACTIONFACTORY_H
       
   298     
       
   299     // End of File