upnpframework/upnputilities/inc/upnpmetadatafetcher.h
changeset 0 7f85d04be362
child 38 5360b7ddc251
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:  Meta data fetching utilities
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef UPNPMETADATAFETCHER_H
       
    20 #define UPNPMETADATAFETCHER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CUpnpObject;
       
    27 
       
    28 // CLASS DECLARATION
       
    29     
       
    30 /**
       
    31 * Static meta data fetching utilities.
       
    32 *
       
    33 * @lib upnputilities.lib
       
    34 * @since S60 3.1
       
    35 */
       
    36 class UPnPMetadataFetcher
       
    37     {
       
    38 
       
    39 public:
       
    40 
       
    41     /**
       
    42      * Resolves the metadata and fills in the CUpnpObject's metadata 
       
    43      * fields accordingly.
       
    44      * 
       
    45      * @since Series 60 3.1
       
    46      * @param aObject (CUpnpObject&) the target CUpnpObject
       
    47      * @param aFilePath (const TDesC&) the filepath of the file
       
    48      * @param aMimeType (const TDesC8&) the mime type of the file
       
    49      */
       
    50     IMPORT_C static void FetchMetadataL( CUpnpObject& aObject, 
       
    51                                          const TDesC& aFilePath, 
       
    52                                          const TDesC8& aMimeType );
       
    53 
       
    54     /**
       
    55      * Resolves the metadata and fills in the CUpnpObject's metadata 
       
    56      * fields accordingly.
       
    57      * 
       
    58      * @since Series 60 3.1
       
    59      * @param aObject (CUpnpObject&) the target CUpnpObject
       
    60      * @param aFilePath (const TDesC&) the filepath of the file
       
    61      */
       
    62     IMPORT_C static void FetchMetadataL( CUpnpObject& aObject, 
       
    63                                          const TDesC& aFilePath );
       
    64 
       
    65     /**
       
    66      * Creates a new CUpnpItem from a local file. Resolves the metadata and 
       
    67      * fills in the new CUpnpItem's metadata fields accordingly.
       
    68      * 
       
    69      * @since Series 60 3.1
       
    70      * @param aFilePath (const TDesC&) the filepath of the file
       
    71      * @return (CUpnpItem*) pointer to the newly created CUpnpItem,
       
    72      *         or NULL if the creation of the item or metadata resolving
       
    73      *         fails. Pushes the object into the CleanupStack.
       
    74      */
       
    75     IMPORT_C static CUpnpItem* CreateItemFromFileLC( 
       
    76                                             const TDesC& aFilePath );
       
    77 
       
    78     /**
       
    79      * Creates a new CUpnpItem from a local file. Resolves the metadata and 
       
    80      * fills in the new CUpnpItem's metadata fields accordingly.
       
    81      * 
       
    82      * @since Series 60 3.1
       
    83      * @param aFilePath (const TDesC&) the filepath of the file
       
    84      * @return (CUpnpItem*) pointer to the newly created CUpnpItem,
       
    85      *         or NULL if the creation of the item or metadata resolving
       
    86      *         fails.
       
    87      */
       
    88     IMPORT_C static CUpnpItem* CreateItemFromFileL(
       
    89                                             const TDesC& aFilePath );
       
    90 
       
    91     };
       
    92 
       
    93 #endif // UPNPMETADATAFETCHER_H
       
    94 
       
    95 // End of File