dlnasrv_plat/upnp_command_api/inc/upnpmovecommand.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /** @file
       
     2 * Copyright (c) 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:  Helper class to ease the use of the Upnp Framework's
       
    15 *                UpnpCommand API when moving files via Upnp.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef UPNP_MOVE_COMMAND_H
       
    21 #define UPNP_MOVE_COMMAND_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <badesca.h>                  // CDesCArrayFlat
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CUpnpCommand;
       
    28 
       
    29 // CLASS DEFINITION
       
    30 class CUpnpMoveCommand: public CBase
       
    31     {
       
    32 
       
    33     public: // Construction/destruction methods
       
    34 
       
    35         /**
       
    36          * Creates a new UpnpCommand for file moving purposes. Does not
       
    37          * instantiate Upnp Framework services yet at this point.
       
    38          *
       
    39          * Leaves with KErrNotReady if Upnp dedicated IAP is not set, or with
       
    40          * using standard e32err.h error code if construction fails.
       
    41          *
       
    42          * @since S60 3.2
       
    43          * @return a new CUpnpMoveCommand object
       
    44          */
       
    45         IMPORT_C static CUpnpMoveCommand* NewL();
       
    46 
       
    47         /**
       
    48          * Destructor.
       
    49          *
       
    50          * @since S60 3.2
       
    51          */
       
    52         virtual ~CUpnpMoveCommand();
       
    53 
       
    54     public: // Business logic methods
       
    55 
       
    56         /**
       
    57          * Returns the availability information of the command.
       
    58          *
       
    59          * @since S60 3.2
       
    60          * @return TBool (ETrue if available)
       
    61          */
       
    62         IMPORT_C static TBool IsAvailableL();
       
    63 
       
    64         /**
       
    65          * Moves the given list of files to a remote Upnp Media Server. The
       
    66          * method is synchronous. The target server device will be queried
       
    67          * from the user using an UI component.
       
    68          *
       
    69          * The files that are successfully moved are removed from the array.
       
    70          * DRM protected files are skipped (not copied and left in the array)
       
    71          *
       
    72          * Leaves if the operation fails. Standard system wide (e32err.h)
       
    73          * error codes will be used.
       
    74          *
       
    75          * @since S60 3.2
       
    76          * @param aFiles (CDesCArrayFlat*) list of filenames (including path)
       
    77          */
       
    78         IMPORT_C void MoveFilesL( CDesCArrayFlat* aFiles );
       
    79 
       
    80     private: // Private construction methods
       
    81 
       
    82         /**
       
    83          * Constructor
       
    84          *
       
    85          * @since S60 3.2
       
    86          */
       
    87         CUpnpMoveCommand();
       
    88 
       
    89         /**
       
    90          * Second phase constructor
       
    91          *
       
    92          * @since S60 3.2
       
    93          */
       
    94         void ConstructL();
       
    95 
       
    96     private: // Data members
       
    97 
       
    98         /*
       
    99          * UpnpCommand instance. Owned.
       
   100          */
       
   101         CUpnpCommand*    iCommand;
       
   102 
       
   103     };
       
   104 
       
   105 #endif // UPNP_MOVE_COMMAND_H
       
   106 
       
   107 // End of File