appinstall_plat/appmngr2runtimeapi/inc/appmngr2recognizedfile.h
changeset 80 9dcba1ee99f7
parent 77 d1838696558c
equal deleted inserted replaced
77:d1838696558c 80:9dcba1ee99f7
     1 /*
       
     2 * Copyright (c) 2008 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:   Class that contains file name and it's MIME type
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_APPMNGR2RECOGNIZEDFILE_H
       
    20 #define C_APPMNGR2RECOGNIZEDFILE_H
       
    21 
       
    22 #include <e32base.h>                    // CBase
       
    23 
       
    24 class TDataType;
       
    25 
       
    26 /**
       
    27  * File and it's MIME type.
       
    28  * 
       
    29  * @lib appmngr2pluginapi.lib
       
    30  * @since S60 v5.1
       
    31  */
       
    32 class CAppMngr2RecognizedFile : public CBase
       
    33     {
       
    34 public:     // constructor and destructor
       
    35     /**
       
    36      * Creates new CAppMngr2RecognizedFile.
       
    37      * 
       
    38      * File name and data type are copied into the new CAppMngr2RecognizedFile object.
       
    39      * 
       
    40      * @param aFileName  File name
       
    41      * @param aDataType  Data (MIME) type
       
    42      * @returns new CAppMngr2RecognizedFile object
       
    43      */
       
    44     IMPORT_C static CAppMngr2RecognizedFile* NewL( const TDesC& aFileName,
       
    45             const TDataType& aDataType );
       
    46     
       
    47     /**
       
    48      * Creates new CAppMngr2RecognizedFile by taking ownership of given parameters.
       
    49      *
       
    50      * Note the construction order - the caller must take care of deleting the given
       
    51      * parameters if this function leaves.
       
    52      * 
       
    53      * @param aFileName  File name
       
    54      * @param aMimeType  MIME type
       
    55      * @returns new CAppMngr2RecognizedFile object
       
    56      */
       
    57     IMPORT_C static CAppMngr2RecognizedFile* NewL( HBufC* aFileName, HBufC* aMimeType );
       
    58 
       
    59     /**
       
    60      * Destructor.
       
    61      */
       
    62     IMPORT_C ~CAppMngr2RecognizedFile();
       
    63 
       
    64 public:     // new functions
       
    65     /**
       
    66      * Returns file name.
       
    67      * @return const TDesC&  File name 
       
    68      */
       
    69     IMPORT_C const TDesC& FileName();
       
    70 
       
    71     /**
       
    72      * Returns data (MIME) type as TDataType.
       
    73      * @return const TDataType&  Data type.
       
    74      */
       
    75     IMPORT_C const TDataType& DataType();
       
    76     
       
    77 private:    // new functions
       
    78     CAppMngr2RecognizedFile();
       
    79     
       
    80 private:    // data
       
    81     HBufC* iFileName;
       
    82     TDataType* iDataType;
       
    83     };
       
    84 
       
    85 #endif  // C_APPMNGR2RECOGNIZEDFILE_H
       
    86