upnpframework/upnpaiwprovider/inc/upnpaiwcopytoexternalservice.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     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:  Header file for the UpnpAiwCopyToExternalService.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef _UPNP_AIW_COPY_TO_EXTERNAL_SERVICE_H
       
    20 #define _UPNP_AIW_COPY_TO_EXTERNAL_SERVICE_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <AiwServiceIfMenu.h>
       
    24 #include "upnpaiwengineobserver.h"
       
    25 
       
    26 // FUNCTION PROTOTYPES
       
    27 class CUPnPAiwEngine;
       
    28 class CUpnpDrmFilter;
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 *  CUPnPAiwCopyToExternalService
       
    34 *  The class implements the "Copy to external" service of the
       
    35 *  UPnP AIW Media Provider.
       
    36 *  @since Series S60 3.0
       
    37 */
       
    38 class CUPnPAiwCopyToExternalService : public CAiwServiceIfMenu,
       
    39                                       public MUPnPAiwEngineObserver
       
    40     {
       
    41 
       
    42     public: // Constructors and destructor
       
    43 
       
    44         // Two-phased constructor.
       
    45         static CUPnPAiwCopyToExternalService* NewL();
       
    46 
       
    47         // Destructor.
       
    48         virtual ~CUPnPAiwCopyToExternalService();
       
    49 
       
    50     public: // Methods from the CAiwServiceIfMenu
       
    51 
       
    52         // Unnecessary methods 
       
    53         void InitialiseL(   MAiwNotifyCallback& /*aFrameworkCallback*/,
       
    54                             const RCriteriaArray& /*aInterest*/ ) {}
       
    55         void HandleServiceCmdL(
       
    56                             const TInt& /*aCmdId*/,
       
    57                             const CAiwGenericParamList& /*aInParamList*/,
       
    58                             CAiwGenericParamList& /*aOutParamList*/,
       
    59                             TUint /*aCmdOptions*/,
       
    60                             const MAiwNotifyCallback* /*aCallback*/ ) {}
       
    61 
       
    62         /**
       
    63         * Initialises menu pane by adding provider specific menu items.
       
    64         * The AIW Framework gives the parameters to be used in addition.
       
    65         * @param aMenuPane Menu pane handle
       
    66         * @param aIndex position of item where to add menu items.
       
    67         * @param aCascadeId ID of cascade menu item.
       
    68         * @param aInParamList input parameter list for provider's parameters 
       
    69         *        checking
       
    70         */
       
    71         void InitializeMenuPaneL( CAiwMenuPane& aMenuPane,
       
    72                                   TInt aIndex,
       
    73                                   TInt aCascadeId,
       
    74                                   const CAiwGenericParamList& aInParamList);
       
    75 
       
    76         /**
       
    77         * Handle a menu command invoked by the Handler.
       
    78         * @param aMenuCmdId Command ID for the menu command,
       
    79         *        defined by the provider when adding the menu commands.
       
    80         * @param aInParamList Input parameters, could be empty list
       
    81         * @param aOutParamList Output parameters, could be empty list
       
    82         * @param aCmdOptions Options for the command, see KAiwCmdOpt* 
       
    83         *        constants.
       
    84         * @param aCallback callback if asynchronous command handling is wanted
       
    85         *        by consumer. The provider may or may not support this, leaves
       
    86         *        with KErrNotSupported, it not.
       
    87         */
       
    88         void HandleMenuCmdL( TInt aMenuCmdId,
       
    89                              const CAiwGenericParamList& aInParamList,
       
    90                              CAiwGenericParamList& aOutParamList,
       
    91                              TUint aCmdOptions = 0,
       
    92                              const MAiwNotifyCallback* aCallback = NULL);
       
    93 
       
    94     public:  // MUPnPAiwEngineObserver
       
    95 
       
    96         /**
       
    97          * Indicates that the play operation is complete.
       
    98          *
       
    99          * @since Series 60 3.0
       
   100          * @param aStatus status information
       
   101          * @return None
       
   102          */
       
   103         void PlayCompleteL( TInt /*aStatus*/ ) {}
       
   104 
       
   105         /**
       
   106          * Indicates that the connection with the target UPnP
       
   107          * device has been lost.
       
   108          *
       
   109          * @since Series 60 3.0
       
   110          * @param None
       
   111          * @return None
       
   112          */
       
   113         void ConnectionLostL();
       
   114 
       
   115     private: // private methods
       
   116 
       
   117        /**
       
   118        * Deletes the contents of the iFileNames pointer array
       
   119        *
       
   120        * @since Series 60 3.0
       
   121        * @param None
       
   122        * @returns None
       
   123        */
       
   124        void EmptyFileNameArray();
       
   125 
       
   126 
       
   127     private: // construction
       
   128 
       
   129         // Constructor
       
   130         CUPnPAiwCopyToExternalService();
       
   131 
       
   132         // ConstructL
       
   133         void ConstructL();
       
   134 
       
   135     private: // Data members
       
   136 
       
   137         // reference to the engine component
       
   138         CUPnPAiwEngine* iEngine;                // not owned (singleton)
       
   139 
       
   140         // reference to the client (call back reference)
       
   141         MAiwNotifyCallback* iClient;            // not owned
       
   142 
       
   143         // The list of file names received as a parameter
       
   144         RPointerArray<TDesC16> iFileNames;      // owned
       
   145         
       
   146         // The playlist name (if we are doing a playlist copy)
       
   147         HBufC* iPlaylistName;                   // owned
       
   148     };
       
   149 
       
   150 #endif // _UPNP_AIW_COPY_TO_EXTERNAL_SERVICE_H
       
   151 
       
   152 // End of file