upnpavcontroller/upnpavcontrollerhelper/inc/upnpfileutility.h
changeset 0 7f85d04be362
equal deleted inserted replaced
-1:000000000000 0:7f85d04be362
       
     1 /*
       
     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:      Utility for working with files in upnp context
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 
       
    23 #ifndef UPNPFILEUTILITY_H
       
    24 #define UPNPFILEUTILITY_H
       
    25 
       
    26 //  INCLUDES
       
    27 #include <e32base.h>
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class CUpnpElement;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 * Utility for working with local files in upnp context. The class
       
    36 * contains static methods that can be used to check various things
       
    37 * related to downloading files to local filesystem, or when playing
       
    38 * local files via upnp.
       
    39 *
       
    40 * @lib upnpavcontrollerhelper.lib
       
    41 * @since S60 3.2
       
    42 */
       
    43 class UPnPFileUtility
       
    44     {
       
    45 
       
    46 public: // Business logic methods
       
    47 
       
    48     /**
       
    49      * Checks if given file content is protected.
       
    50      * Note that if a file is protected, it can not be copied to
       
    51      * a remote upnp mediaserver, nor it can be played via a remote
       
    52      * renderer. A client should use this interface before attempting
       
    53      * any of these operations for usability sake.
       
    54      * Currently supports checks for OEM-DRM and WM-DRM.
       
    55      * The method will leave if the file is not found, or if the
       
    56      * protection status can not be checked for some reason.
       
    57      *
       
    58      * @since S60 3.2
       
    59      * @param aFilePath full path to file
       
    60      * @return ETrue if file is protected 
       
    61      */
       
    62     IMPORT_C static TBool IsFileProtectedL(
       
    63         const TDesC& aFilePath );
       
    64 
       
    65     /**
       
    66      * Checks if the given remote object (and the given particular
       
    67      * resource) can fit in memory when downloaded using current
       
    68      * default copy target setting
       
    69      * @since S60 3.2
       
    70      *
       
    71      * @param aResource the resource to download
       
    72      * @return EFalse if the target drive does not have enough space
       
    73      */
       
    74     IMPORT_C static TBool FitsInMemory(
       
    75         const CUpnpElement& aResource );
       
    76 
       
    77 private:
       
    78     
       
    79     /**
       
    80      * Checks if the given remote object (and the given particular
       
    81      * resource) can fit in memory when downloaded using current
       
    82      * default copy target setting
       
    83      * @since S60 3.2
       
    84      *
       
    85      * @param aResource the resource to download
       
    86      * @return EFalse if the target drive does not have enough space
       
    87      */
       
    88     static TBool FitsInMemoryL(
       
    89         const CUpnpElement& aResource );
       
    90     
       
    91     };
       
    92 
       
    93 
       
    94 
       
    95 #endif  // UPNPFILEUTILITY_H
       
    96 
       
    97 // End of File